@angular/material 11.0.0-rc.4 → 11.0.3

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 (367) hide show
  1. package/_theming.scss +31 -1
  2. package/autocomplete/autocomplete.d.ts +6 -0
  3. package/autocomplete/index.metadata.json +1 -1
  4. package/bottom-sheet/index.metadata.json +1 -1
  5. package/bundles/material-autocomplete-testing.umd.js +5 -5
  6. package/bundles/material-autocomplete-testing.umd.js.map +1 -1
  7. package/bundles/material-autocomplete-testing.umd.min.js +1 -1
  8. package/bundles/material-autocomplete-testing.umd.min.js.map +1 -1
  9. package/bundles/material-autocomplete.umd.js +17 -7
  10. package/bundles/material-autocomplete.umd.js.map +1 -1
  11. package/bundles/material-autocomplete.umd.min.js +3 -3
  12. package/bundles/material-autocomplete.umd.min.js.map +1 -1
  13. package/bundles/material-badge-testing.umd.js +5 -5
  14. package/bundles/material-badge-testing.umd.js.map +1 -1
  15. package/bundles/material-badge-testing.umd.min.js +1 -1
  16. package/bundles/material-badge-testing.umd.min.js.map +1 -1
  17. package/bundles/material-badge.umd.js +5 -5
  18. package/bundles/material-badge.umd.js.map +1 -1
  19. package/bundles/material-badge.umd.min.js +1 -1
  20. package/bundles/material-badge.umd.min.js.map +1 -1
  21. package/bundles/material-bottom-sheet-testing.umd.js +5 -5
  22. package/bundles/material-bottom-sheet-testing.umd.js.map +1 -1
  23. package/bundles/material-bottom-sheet-testing.umd.min.js +1 -1
  24. package/bundles/material-bottom-sheet-testing.umd.min.js.map +1 -1
  25. package/bundles/material-bottom-sheet.umd.js +10 -6
  26. package/bundles/material-bottom-sheet.umd.js.map +1 -1
  27. package/bundles/material-bottom-sheet.umd.min.js +1 -1
  28. package/bundles/material-bottom-sheet.umd.min.js.map +1 -1
  29. package/bundles/material-button-testing.umd.js +5 -5
  30. package/bundles/material-button-testing.umd.js.map +1 -1
  31. package/bundles/material-button-testing.umd.min.js +1 -1
  32. package/bundles/material-button-testing.umd.min.js.map +1 -1
  33. package/bundles/material-button-toggle-testing.umd.js +5 -5
  34. package/bundles/material-button-toggle-testing.umd.js.map +1 -1
  35. package/bundles/material-button-toggle-testing.umd.min.js +1 -1
  36. package/bundles/material-button-toggle-testing.umd.min.js.map +1 -1
  37. package/bundles/material-button-toggle.umd.js +6 -8
  38. package/bundles/material-button-toggle.umd.js.map +1 -1
  39. package/bundles/material-button-toggle.umd.min.js +1 -1
  40. package/bundles/material-button-toggle.umd.min.js.map +1 -1
  41. package/bundles/material-button.umd.js +5 -5
  42. package/bundles/material-button.umd.js.map +1 -1
  43. package/bundles/material-button.umd.min.js +1 -1
  44. package/bundles/material-button.umd.min.js.map +1 -1
  45. package/bundles/material-card-testing.umd.js +5 -5
  46. package/bundles/material-card-testing.umd.js.map +1 -1
  47. package/bundles/material-card-testing.umd.min.js +1 -1
  48. package/bundles/material-card-testing.umd.min.js.map +1 -1
  49. package/bundles/material-checkbox-testing.umd.js +8 -8
  50. package/bundles/material-checkbox-testing.umd.js.map +1 -1
  51. package/bundles/material-checkbox-testing.umd.min.js +1 -1
  52. package/bundles/material-checkbox-testing.umd.min.js.map +1 -1
  53. package/bundles/material-checkbox.umd.js +11 -11
  54. package/bundles/material-checkbox.umd.js.map +1 -1
  55. package/bundles/material-checkbox.umd.min.js +3 -3
  56. package/bundles/material-checkbox.umd.min.js.map +1 -1
  57. package/bundles/material-chips-testing.umd.js +5 -5
  58. package/bundles/material-chips-testing.umd.js.map +1 -1
  59. package/bundles/material-chips-testing.umd.min.js +1 -1
  60. package/bundles/material-chips-testing.umd.min.js.map +1 -1
  61. package/bundles/material-chips.umd.js +8 -6
  62. package/bundles/material-chips.umd.js.map +1 -1
  63. package/bundles/material-chips.umd.min.js +4 -4
  64. package/bundles/material-chips.umd.min.js.map +1 -1
  65. package/bundles/material-core-testing.umd.js +5 -5
  66. package/bundles/material-core-testing.umd.js.map +1 -1
  67. package/bundles/material-core-testing.umd.min.js +2 -2
  68. package/bundles/material-core-testing.umd.min.js.map +1 -1
  69. package/bundles/material-core.umd.js +9 -8
  70. package/bundles/material-core.umd.js.map +1 -1
  71. package/bundles/material-core.umd.min.js +4 -4
  72. package/bundles/material-core.umd.min.js.map +1 -1
  73. package/bundles/material-datepicker-testing.umd.js +5 -5
  74. package/bundles/material-datepicker-testing.umd.js.map +1 -1
  75. package/bundles/material-datepicker-testing.umd.min.js +1 -1
  76. package/bundles/material-datepicker-testing.umd.min.js.map +1 -1
  77. package/bundles/material-datepicker.umd.js +31 -11
  78. package/bundles/material-datepicker.umd.js.map +1 -1
  79. package/bundles/material-datepicker.umd.min.js +5 -5
  80. package/bundles/material-datepicker.umd.min.js.map +1 -1
  81. package/bundles/material-dialog-testing.umd.js +5 -5
  82. package/bundles/material-dialog-testing.umd.js.map +1 -1
  83. package/bundles/material-dialog-testing.umd.min.js +2 -2
  84. package/bundles/material-dialog-testing.umd.min.js.map +1 -1
  85. package/bundles/material-dialog.umd.js +5 -5
  86. package/bundles/material-dialog.umd.js.map +1 -1
  87. package/bundles/material-dialog.umd.min.js +4 -4
  88. package/bundles/material-dialog.umd.min.js.map +1 -1
  89. package/bundles/material-divider-testing.umd.js +5 -5
  90. package/bundles/material-divider-testing.umd.js.map +1 -1
  91. package/bundles/material-divider-testing.umd.min.js +1 -1
  92. package/bundles/material-divider-testing.umd.min.js.map +1 -1
  93. package/bundles/material-expansion-testing.umd.js +5 -5
  94. package/bundles/material-expansion-testing.umd.js.map +1 -1
  95. package/bundles/material-expansion-testing.umd.min.js +1 -1
  96. package/bundles/material-expansion-testing.umd.min.js.map +1 -1
  97. package/bundles/material-expansion.umd.js +14 -10
  98. package/bundles/material-expansion.umd.js.map +1 -1
  99. package/bundles/material-expansion.umd.min.js +6 -6
  100. package/bundles/material-expansion.umd.min.js.map +1 -1
  101. package/bundles/material-form-field-testing-control.umd.js +5 -5
  102. package/bundles/material-form-field-testing-control.umd.js.map +1 -1
  103. package/bundles/material-form-field-testing-control.umd.min.js +2 -2
  104. package/bundles/material-form-field-testing-control.umd.min.js.map +1 -1
  105. package/bundles/material-form-field-testing.umd.js +5 -5
  106. package/bundles/material-form-field-testing.umd.js.map +1 -1
  107. package/bundles/material-form-field-testing.umd.min.js +3 -3
  108. package/bundles/material-form-field-testing.umd.min.js.map +1 -1
  109. package/bundles/material-form-field.umd.js +5 -5
  110. package/bundles/material-form-field.umd.js.map +1 -1
  111. package/bundles/material-form-field.umd.min.js +1 -1
  112. package/bundles/material-form-field.umd.min.js.map +1 -1
  113. package/bundles/material-grid-list-testing.umd.js +5 -5
  114. package/bundles/material-grid-list-testing.umd.js.map +1 -1
  115. package/bundles/material-grid-list-testing.umd.min.js +1 -1
  116. package/bundles/material-grid-list-testing.umd.min.js.map +1 -1
  117. package/bundles/material-grid-list.umd.js +5 -5
  118. package/bundles/material-grid-list.umd.js.map +1 -1
  119. package/bundles/material-grid-list.umd.min.js +1 -1
  120. package/bundles/material-grid-list.umd.min.js.map +1 -1
  121. package/bundles/material-icon-testing.umd.js +5 -5
  122. package/bundles/material-icon-testing.umd.js.map +1 -1
  123. package/bundles/material-icon-testing.umd.min.js +1 -1
  124. package/bundles/material-icon-testing.umd.min.js.map +1 -1
  125. package/bundles/material-icon.umd.js +5 -5
  126. package/bundles/material-icon.umd.js.map +1 -1
  127. package/bundles/material-icon.umd.min.js +3 -3
  128. package/bundles/material-icon.umd.min.js.map +1 -1
  129. package/bundles/material-input-testing.umd.js +5 -5
  130. package/bundles/material-input-testing.umd.js.map +1 -1
  131. package/bundles/material-input-testing.umd.min.js +1 -1
  132. package/bundles/material-input-testing.umd.min.js.map +1 -1
  133. package/bundles/material-input.umd.js +6 -5
  134. package/bundles/material-input.umd.js.map +1 -1
  135. package/bundles/material-input.umd.min.js +3 -3
  136. package/bundles/material-input.umd.min.js.map +1 -1
  137. package/bundles/material-list-testing.umd.js +5 -5
  138. package/bundles/material-list-testing.umd.js.map +1 -1
  139. package/bundles/material-list-testing.umd.min.js +1 -1
  140. package/bundles/material-list-testing.umd.min.js.map +1 -1
  141. package/bundles/material-list.umd.js +5 -5
  142. package/bundles/material-list.umd.js.map +1 -1
  143. package/bundles/material-list.umd.min.js +1 -1
  144. package/bundles/material-list.umd.min.js.map +1 -1
  145. package/bundles/material-menu-testing.umd.js +5 -5
  146. package/bundles/material-menu-testing.umd.js.map +1 -1
  147. package/bundles/material-menu-testing.umd.min.js +1 -1
  148. package/bundles/material-menu-testing.umd.min.js.map +1 -1
  149. package/bundles/material-menu.umd.js +10 -5
  150. package/bundles/material-menu.umd.js.map +1 -1
  151. package/bundles/material-menu.umd.min.js +5 -5
  152. package/bundles/material-menu.umd.min.js.map +1 -1
  153. package/bundles/material-paginator-testing.umd.js +5 -5
  154. package/bundles/material-paginator-testing.umd.js.map +1 -1
  155. package/bundles/material-paginator-testing.umd.min.js +1 -1
  156. package/bundles/material-paginator-testing.umd.min.js.map +1 -1
  157. package/bundles/material-paginator.umd.js +10 -9
  158. package/bundles/material-paginator.umd.js.map +1 -1
  159. package/bundles/material-paginator.umd.min.js +2 -2
  160. package/bundles/material-paginator.umd.min.js.map +1 -1
  161. package/bundles/material-progress-bar-testing.umd.js +5 -5
  162. package/bundles/material-progress-bar-testing.umd.js.map +1 -1
  163. package/bundles/material-progress-bar-testing.umd.min.js +1 -1
  164. package/bundles/material-progress-bar-testing.umd.min.js.map +1 -1
  165. package/bundles/material-progress-bar.umd.js +5 -5
  166. package/bundles/material-progress-bar.umd.js.map +1 -1
  167. package/bundles/material-progress-bar.umd.min.js +1 -1
  168. package/bundles/material-progress-bar.umd.min.js.map +1 -1
  169. package/bundles/material-progress-spinner-testing.umd.js +5 -5
  170. package/bundles/material-progress-spinner-testing.umd.js.map +1 -1
  171. package/bundles/material-progress-spinner-testing.umd.min.js +1 -1
  172. package/bundles/material-progress-spinner-testing.umd.min.js.map +1 -1
  173. package/bundles/material-progress-spinner.umd.js +5 -5
  174. package/bundles/material-progress-spinner.umd.js.map +1 -1
  175. package/bundles/material-progress-spinner.umd.min.js +1 -1
  176. package/bundles/material-progress-spinner.umd.min.js.map +1 -1
  177. package/bundles/material-radio-testing.umd.js +5 -5
  178. package/bundles/material-radio-testing.umd.js.map +1 -1
  179. package/bundles/material-radio-testing.umd.min.js +1 -1
  180. package/bundles/material-radio-testing.umd.min.js.map +1 -1
  181. package/bundles/material-radio.umd.js +10 -7
  182. package/bundles/material-radio.umd.js.map +1 -1
  183. package/bundles/material-radio.umd.min.js +2 -2
  184. package/bundles/material-radio.umd.min.js.map +1 -1
  185. package/bundles/material-select-testing.umd.js +5 -5
  186. package/bundles/material-select-testing.umd.js.map +1 -1
  187. package/bundles/material-select-testing.umd.min.js +1 -1
  188. package/bundles/material-select-testing.umd.min.js.map +1 -1
  189. package/bundles/material-select.umd.js +12 -8
  190. package/bundles/material-select.umd.js.map +1 -1
  191. package/bundles/material-select.umd.min.js +3 -3
  192. package/bundles/material-select.umd.min.js.map +1 -1
  193. package/bundles/material-sidenav-testing.umd.js +5 -5
  194. package/bundles/material-sidenav-testing.umd.js.map +1 -1
  195. package/bundles/material-sidenav-testing.umd.min.js +1 -1
  196. package/bundles/material-sidenav-testing.umd.min.js.map +1 -1
  197. package/bundles/material-sidenav.umd.js +5 -5
  198. package/bundles/material-sidenav.umd.js.map +1 -1
  199. package/bundles/material-sidenav.umd.min.js +1 -1
  200. package/bundles/material-sidenav.umd.min.js.map +1 -1
  201. package/bundles/material-slide-toggle-testing.umd.js +5 -5
  202. package/bundles/material-slide-toggle-testing.umd.js.map +1 -1
  203. package/bundles/material-slide-toggle-testing.umd.min.js +1 -1
  204. package/bundles/material-slide-toggle-testing.umd.min.js.map +1 -1
  205. package/bundles/material-slide-toggle.umd.js +5 -5
  206. package/bundles/material-slide-toggle.umd.js.map +1 -1
  207. package/bundles/material-slide-toggle.umd.min.js +1 -1
  208. package/bundles/material-slide-toggle.umd.min.js.map +1 -1
  209. package/bundles/material-slider-testing.umd.js +5 -5
  210. package/bundles/material-slider-testing.umd.js.map +1 -1
  211. package/bundles/material-slider-testing.umd.min.js +1 -1
  212. package/bundles/material-slider-testing.umd.min.js.map +1 -1
  213. package/bundles/material-slider.umd.js +6 -6
  214. package/bundles/material-slider.umd.js.map +1 -1
  215. package/bundles/material-slider.umd.min.js +1 -1
  216. package/bundles/material-slider.umd.min.js.map +1 -1
  217. package/bundles/material-snack-bar-testing.umd.js +5 -5
  218. package/bundles/material-snack-bar-testing.umd.js.map +1 -1
  219. package/bundles/material-snack-bar-testing.umd.min.js +1 -1
  220. package/bundles/material-snack-bar-testing.umd.min.js.map +1 -1
  221. package/bundles/material-snack-bar.umd.js +5 -5
  222. package/bundles/material-snack-bar.umd.js.map +1 -1
  223. package/bundles/material-snack-bar.umd.min.js +1 -1
  224. package/bundles/material-snack-bar.umd.min.js.map +1 -1
  225. package/bundles/material-sort-testing.umd.js +5 -5
  226. package/bundles/material-sort-testing.umd.js.map +1 -1
  227. package/bundles/material-sort-testing.umd.min.js +1 -1
  228. package/bundles/material-sort-testing.umd.min.js.map +1 -1
  229. package/bundles/material-sort.umd.js +6 -6
  230. package/bundles/material-sort.umd.js.map +1 -1
  231. package/bundles/material-sort.umd.min.js +2 -2
  232. package/bundles/material-sort.umd.min.js.map +1 -1
  233. package/bundles/material-stepper-testing.umd.js +5 -5
  234. package/bundles/material-stepper-testing.umd.js.map +1 -1
  235. package/bundles/material-stepper-testing.umd.min.js +2 -2
  236. package/bundles/material-stepper-testing.umd.min.js.map +1 -1
  237. package/bundles/material-stepper.umd.js +5 -5
  238. package/bundles/material-stepper.umd.js.map +1 -1
  239. package/bundles/material-stepper.umd.min.js +1 -1
  240. package/bundles/material-stepper.umd.min.js.map +1 -1
  241. package/bundles/material-table-testing.umd.js +5 -5
  242. package/bundles/material-table-testing.umd.js.map +1 -1
  243. package/bundles/material-table-testing.umd.min.js +1 -1
  244. package/bundles/material-table-testing.umd.min.js.map +1 -1
  245. package/bundles/material-table.umd.js +5 -5
  246. package/bundles/material-table.umd.js.map +1 -1
  247. package/bundles/material-table.umd.min.js +1 -1
  248. package/bundles/material-table.umd.min.js.map +1 -1
  249. package/bundles/material-tabs-testing.umd.js +5 -5
  250. package/bundles/material-tabs-testing.umd.js.map +1 -1
  251. package/bundles/material-tabs-testing.umd.min.js +1 -1
  252. package/bundles/material-tabs-testing.umd.min.js.map +1 -1
  253. package/bundles/material-tabs.umd.js +5 -5
  254. package/bundles/material-tabs.umd.js.map +1 -1
  255. package/bundles/material-tabs.umd.min.js +5 -5
  256. package/bundles/material-tabs.umd.min.js.map +1 -1
  257. package/bundles/material-toolbar-testing.umd.js +5 -5
  258. package/bundles/material-toolbar-testing.umd.js.map +1 -1
  259. package/bundles/material-toolbar-testing.umd.min.js +1 -1
  260. package/bundles/material-toolbar-testing.umd.min.js.map +1 -1
  261. package/bundles/material-toolbar.umd.js +5 -5
  262. package/bundles/material-toolbar.umd.js.map +1 -1
  263. package/bundles/material-toolbar.umd.min.js +1 -1
  264. package/bundles/material-toolbar.umd.min.js.map +1 -1
  265. package/bundles/material-tooltip-testing.umd.js +5 -5
  266. package/bundles/material-tooltip-testing.umd.js.map +1 -1
  267. package/bundles/material-tooltip-testing.umd.min.js +1 -1
  268. package/bundles/material-tooltip-testing.umd.min.js.map +1 -1
  269. package/bundles/material-tooltip.umd.js +5 -5
  270. package/bundles/material-tooltip.umd.js.map +1 -1
  271. package/bundles/material-tooltip.umd.min.js.map +1 -1
  272. package/bundles/material-tree-testing.umd.js +5 -5
  273. package/bundles/material-tree-testing.umd.js.map +1 -1
  274. package/bundles/material-tree-testing.umd.min.js +1 -1
  275. package/bundles/material-tree-testing.umd.min.js.map +1 -1
  276. package/bundles/material-tree.umd.js +5 -5
  277. package/bundles/material-tree.umd.js.map +1 -1
  278. package/bundles/material-tree.umd.min.js +3 -3
  279. package/bundles/material-tree.umd.min.js.map +1 -1
  280. package/button-toggle/index.metadata.json +1 -1
  281. package/checkbox/index.metadata.json +1 -1
  282. package/checkbox/testing/checkbox-harness.d.ts +3 -3
  283. package/chips/index.metadata.json +1 -1
  284. package/core/index.metadata.json +1 -1
  285. package/core/typography/_typography.scss +28 -0
  286. package/datepicker/calendar.d.ts +1 -0
  287. package/datepicker/datepicker-input-base.d.ts +2 -0
  288. package/datepicker/index.metadata.json +1 -1
  289. package/datepicker/month-view.d.ts +1 -1
  290. package/esm2015/autocomplete/autocomplete-trigger.js +3 -2
  291. package/esm2015/autocomplete/autocomplete.js +11 -2
  292. package/esm2015/bottom-sheet/bottom-sheet-container.js +6 -2
  293. package/esm2015/button-toggle/button-toggle.js +2 -4
  294. package/esm2015/checkbox/checkbox.js +8 -8
  295. package/esm2015/checkbox/testing/checkbox-harness.js +4 -4
  296. package/esm2015/chips/chip.js +3 -2
  297. package/esm2015/chips/chips-module.js +3 -2
  298. package/esm2015/core/common-behaviors/common-module.js +1 -1
  299. package/esm2015/core/option/index.js +3 -2
  300. package/esm2015/core/selection/index.js +3 -1
  301. package/esm2015/core/version.js +1 -1
  302. package/esm2015/datepicker/calendar.js +5 -2
  303. package/esm2015/datepicker/date-range-input.js +11 -2
  304. package/esm2015/datepicker/datepicker-base.js +1 -1
  305. package/esm2015/datepicker/datepicker-input-base.js +7 -3
  306. package/esm2015/datepicker/datepicker-input.js +5 -2
  307. package/esm2015/datepicker/datepicker-module.js +3 -1
  308. package/esm2015/datepicker/month-view.js +1 -1
  309. package/esm2015/expansion/accordion.js +6 -2
  310. package/esm2015/expansion/expansion-module.js +3 -2
  311. package/esm2015/input/input-module.js +3 -2
  312. package/esm2015/menu/menu.js +6 -1
  313. package/esm2015/paginator/paginator-module.js +3 -1
  314. package/esm2015/radio/radio.js +6 -3
  315. package/esm2015/select/select.js +8 -4
  316. package/esm2015/slider/slider.js +2 -2
  317. package/esm2015/sort/sort-module.js +3 -2
  318. package/expansion/accordion.d.ts +3 -2
  319. package/expansion/index.metadata.json +1 -1
  320. package/fesm2015/autocomplete.js +12 -2
  321. package/fesm2015/autocomplete.js.map +1 -1
  322. package/fesm2015/bottom-sheet.js +5 -1
  323. package/fesm2015/bottom-sheet.js.map +1 -1
  324. package/fesm2015/button-toggle.js +1 -3
  325. package/fesm2015/button-toggle.js.map +1 -1
  326. package/fesm2015/checkbox/testing.js +3 -3
  327. package/fesm2015/checkbox/testing.js.map +1 -1
  328. package/fesm2015/checkbox.js +6 -6
  329. package/fesm2015/checkbox.js.map +1 -1
  330. package/fesm2015/chips.js +4 -2
  331. package/fesm2015/chips.js.map +1 -1
  332. package/fesm2015/core.js +4 -3
  333. package/fesm2015/core.js.map +1 -1
  334. package/fesm2015/datepicker.js +27 -7
  335. package/fesm2015/datepicker.js.map +1 -1
  336. package/fesm2015/expansion.js +6 -1
  337. package/fesm2015/expansion.js.map +1 -1
  338. package/fesm2015/input.js +2 -1
  339. package/fesm2015/input.js.map +1 -1
  340. package/fesm2015/menu.js +5 -0
  341. package/fesm2015/menu.js.map +1 -1
  342. package/fesm2015/paginator.js +2 -1
  343. package/fesm2015/paginator.js.map +1 -1
  344. package/fesm2015/radio.js +5 -2
  345. package/fesm2015/radio.js.map +1 -1
  346. package/fesm2015/select.js +7 -3
  347. package/fesm2015/select.js.map +1 -1
  348. package/fesm2015/slider.js +1 -1
  349. package/fesm2015/slider.js.map +1 -1
  350. package/fesm2015/sort.js +2 -2
  351. package/fesm2015/sort.js.map +1 -1
  352. package/input/index.metadata.json +1 -1
  353. package/menu/_menu-theme.scss +3 -1
  354. package/menu/index.metadata.json +1 -1
  355. package/package.json +6 -6
  356. package/paginator/index.metadata.json +1 -1
  357. package/prebuilt-themes/deeppurple-amber.css +1 -1
  358. package/prebuilt-themes/indigo-pink.css +1 -1
  359. package/prebuilt-themes/pink-bluegrey.css +1 -1
  360. package/prebuilt-themes/purple-green.css +1 -1
  361. package/radio/index.metadata.json +1 -1
  362. package/schematics/migration.json +5 -0
  363. package/schematics/ng-add/index.js +2 -2
  364. package/schematics/ng-update/index.d.ts +2 -0
  365. package/schematics/ng-update/index.js +7 -2
  366. package/select/index.metadata.json +1 -1
  367. package/sort/index.metadata.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"button-toggle.js","sources":["../../../../../../src/material/button-toggle/button-toggle.ts","../../../../../../src/material/button-toggle/button-toggle-module.ts","../../../../../../src/material/button-toggle/public-api.ts","../../../../../../src/material/button-toggle/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {FocusMonitor} from '@angular/cdk/a11y';\nimport {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {SelectionModel} from '@angular/cdk/collections';\nimport {\n AfterContentInit,\n Attribute,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChildren,\n Directive,\n ElementRef,\n EventEmitter,\n forwardRef,\n Input,\n OnDestroy,\n OnInit,\n Optional,\n Output,\n QueryList,\n ViewChild,\n ViewEncapsulation,\n InjectionToken,\n Inject,\n AfterViewInit,\n} from '@angular/core';\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from '@angular/forms';\nimport {\n CanDisableRipple,\n mixinDisableRipple,\n CanDisableRippleCtor,\n} from '@angular/material/core';\n\n\n/**\n * @deprecated No longer used.\n * @breaking-change 11.0.0\n */\nexport type ToggleType = 'checkbox' | 'radio';\n\n/** Possible appearance styles for the button toggle. */\nexport type MatButtonToggleAppearance = 'legacy' | 'standard';\n\n/**\n * Represents the default options for the button toggle that can be configured\n * using the `MAT_BUTTON_TOGGLE_DEFAULT_OPTIONS` injection token.\n */\nexport interface MatButtonToggleDefaultOptions {\n appearance?: MatButtonToggleAppearance;\n}\n\n/**\n * Injection token that can be used to configure the\n * default options for all button toggles within an app.\n */\nexport const MAT_BUTTON_TOGGLE_DEFAULT_OPTIONS =\n new InjectionToken<MatButtonToggleDefaultOptions>('MAT_BUTTON_TOGGLE_DEFAULT_OPTIONS');\n\n/**\n * Injection token that can be used to reference instances of `MatButtonToggleGroup`.\n * It serves as alternative token to the actual `MatButtonToggleGroup` class which\n * could cause unnecessary retention of the class and its component metadata.\n */\nexport const MAT_BUTTON_TOGGLE_GROUP =\n new InjectionToken<MatButtonToggleGroup>('MatButtonToggleGroup');\n\n/**\n * Provider Expression that allows mat-button-toggle-group to register as a ControlValueAccessor.\n * This allows it to support [(ngModel)].\n * @docs-private\n */\nexport const MAT_BUTTON_TOGGLE_GROUP_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => MatButtonToggleGroup),\n multi: true\n};\n\nlet _uniqueIdCounter = 0;\n\n/** Change event object emitted by MatButtonToggle. */\nexport class MatButtonToggleChange {\n constructor(\n /** The MatButtonToggle that emits the event. */\n public source: MatButtonToggle,\n\n /** The value assigned to the MatButtonToggle. */\n public value: any) {}\n}\n\n/** Exclusive selection button toggle group that behaves like a radio-button group. */\n@Directive({\n selector: 'mat-button-toggle-group',\n providers: [\n MAT_BUTTON_TOGGLE_GROUP_VALUE_ACCESSOR,\n {provide: MAT_BUTTON_TOGGLE_GROUP, useExisting: MatButtonToggleGroup},\n ],\n host: {\n 'role': 'group',\n 'class': 'mat-button-toggle-group',\n '[attr.aria-disabled]': 'disabled',\n '[class.mat-button-toggle-vertical]': 'vertical',\n '[class.mat-button-toggle-group-appearance-standard]': 'appearance === \"standard\"',\n },\n exportAs: 'matButtonToggleGroup',\n})\nexport class MatButtonToggleGroup implements ControlValueAccessor, OnInit, AfterContentInit {\n private _vertical = false;\n private _multiple = false;\n private _disabled = false;\n private _selectionModel: SelectionModel<MatButtonToggle>;\n\n /**\n * Reference to the raw value that the consumer tried to assign. The real\n * value will exclude any values from this one that don't correspond to a\n * toggle. Useful for the cases where the value is assigned before the toggles\n * have been initialized or at the same that they're being swapped out.\n */\n private _rawValue: any;\n\n /**\n * The method to be called in order to update ngModel.\n * Now `ngModel` binding is not supported in multiple selection mode.\n */\n _controlValueAccessorChangeFn: (value: any) => void = () => {};\n\n /** onTouch function registered via registerOnTouch (ControlValueAccessor). */\n _onTouched: () => any = () => {};\n\n /** Child button toggle buttons. */\n @ContentChildren(forwardRef(() => MatButtonToggle), {\n // Note that this would technically pick up toggles\n // from nested groups, but that's not a case that we support.\n descendants: true\n }) _buttonToggles: QueryList<MatButtonToggle>;\n\n /** The appearance for all the buttons in the group. */\n @Input() appearance: MatButtonToggleAppearance;\n\n /** `name` attribute for the underlying `input` element. */\n @Input()\n get name(): string { return this._name; }\n set name(value: string) {\n this._name = value;\n\n if (this._buttonToggles) {\n this._buttonToggles.forEach(toggle => {\n toggle.name = this._name;\n toggle._markForCheck();\n });\n }\n }\n private _name = `mat-button-toggle-group-${_uniqueIdCounter++}`;\n\n /** Whether the toggle group is vertical. */\n @Input()\n get vertical(): boolean { return this._vertical; }\n set vertical(value: boolean) {\n this._vertical = coerceBooleanProperty(value);\n }\n\n /** Value of the toggle group. */\n @Input()\n get value(): any {\n const selected = this._selectionModel ? this._selectionModel.selected : [];\n\n if (this.multiple) {\n return selected.map(toggle => toggle.value);\n }\n\n return selected[0] ? selected[0].value : undefined;\n }\n set value(newValue: any) {\n this._setSelectionByValue(newValue);\n this.valueChange.emit(this.value);\n }\n\n /**\n * Event that emits whenever the value of the group changes.\n * Used to facilitate two-way data binding.\n * @docs-private\n */\n @Output() readonly valueChange = new EventEmitter<any>();\n\n /** Selected button toggles in the group. */\n get selected() {\n const selected = this._selectionModel ? this._selectionModel.selected : [];\n return this.multiple ? selected : (selected[0] || null);\n }\n\n /** Whether multiple button toggles can be selected. */\n @Input()\n get multiple(): boolean { return this._multiple; }\n set multiple(value: boolean) {\n this._multiple = coerceBooleanProperty(value);\n }\n\n /** Whether multiple button toggle group is disabled. */\n @Input()\n get disabled(): boolean { return this._disabled; }\n set disabled(value: boolean) {\n this._disabled = coerceBooleanProperty(value);\n\n if (this._buttonToggles) {\n this._buttonToggles.forEach(toggle => toggle._markForCheck());\n }\n }\n\n /** Event emitted when the group's value changes. */\n @Output() readonly change: EventEmitter<MatButtonToggleChange> =\n new EventEmitter<MatButtonToggleChange>();\n\n constructor(\n private _changeDetector: ChangeDetectorRef,\n @Optional() @Inject(MAT_BUTTON_TOGGLE_DEFAULT_OPTIONS)\n defaultOptions?: MatButtonToggleDefaultOptions) {\n\n this.appearance =\n defaultOptions && defaultOptions.appearance ? defaultOptions.appearance : 'standard';\n }\n\n ngOnInit() {\n this._selectionModel = new SelectionModel<MatButtonToggle>(this.multiple, undefined, false);\n }\n\n ngAfterContentInit() {\n this._selectionModel.select(...this._buttonToggles.filter(toggle => toggle.checked));\n }\n\n /**\n * Sets the model value. Implemented as part of ControlValueAccessor.\n * @param value Value to be set to the model.\n */\n writeValue(value: any) {\n this.value = value;\n this._changeDetector.markForCheck();\n }\n\n // Implemented as part of ControlValueAccessor.\n registerOnChange(fn: (value: any) => void) {\n this._controlValueAccessorChangeFn = fn;\n }\n\n // Implemented as part of ControlValueAccessor.\n registerOnTouched(fn: any) {\n this._onTouched = fn;\n }\n\n // Implemented as part of ControlValueAccessor.\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n }\n\n /** Dispatch change event with current selection and group value. */\n _emitChangeEvent(): void {\n const selected = this.selected;\n const source = Array.isArray(selected) ? selected[selected.length - 1] : selected;\n const event = new MatButtonToggleChange(source!, this.value);\n this._controlValueAccessorChangeFn(event.value);\n this.change.emit(event);\n }\n\n /**\n * Syncs a button toggle's selected state with the model value.\n * @param toggle Toggle to be synced.\n * @param select Whether the toggle should be selected.\n * @param isUserInput Whether the change was a result of a user interaction.\n * @param deferEvents Whether to defer emitting the change events.\n */\n _syncButtonToggle(toggle: MatButtonToggle,\n select: boolean,\n isUserInput = false,\n deferEvents = false) {\n // Deselect the currently-selected toggle, if we're in single-selection\n // mode and the button being toggled isn't selected at the moment.\n if (!this.multiple && this.selected && !toggle.checked) {\n (this.selected as MatButtonToggle).checked = false;\n }\n\n if (this._selectionModel) {\n if (select) {\n this._selectionModel.select(toggle);\n } else {\n this._selectionModel.deselect(toggle);\n }\n } else {\n deferEvents = true;\n }\n\n // We need to defer in some cases in order to avoid \"changed after checked errors\", however\n // the side-effect is that we may end up updating the model value out of sequence in others\n // The `deferEvents` flag allows us to decide whether to do it on a case-by-case basis.\n if (deferEvents) {\n Promise.resolve().then(() => this._updateModelValue(isUserInput));\n } else {\n this._updateModelValue(isUserInput);\n }\n }\n\n /** Checks whether a button toggle is selected. */\n _isSelected(toggle: MatButtonToggle) {\n return this._selectionModel && this._selectionModel.isSelected(toggle);\n }\n\n /** Determines whether a button toggle should be checked on init. */\n _isPrechecked(toggle: MatButtonToggle) {\n if (typeof this._rawValue === 'undefined') {\n return false;\n }\n\n if (this.multiple && Array.isArray(this._rawValue)) {\n return this._rawValue.some(value => toggle.value != null && value === toggle.value);\n }\n\n return toggle.value === this._rawValue;\n }\n\n /** Updates the selection state of the toggles in the group based on a value. */\n private _setSelectionByValue(value: any|any[]) {\n this._rawValue = value;\n\n if (!this._buttonToggles) {\n return;\n }\n\n if (this.multiple && value) {\n if (!Array.isArray(value) && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error('Value must be an array in multiple-selection mode.');\n }\n\n this._clearSelection();\n value.forEach((currentValue: any) => this._selectValue(currentValue));\n } else {\n this._clearSelection();\n this._selectValue(value);\n }\n }\n\n /** Clears the selected toggles. */\n private _clearSelection() {\n this._selectionModel.clear();\n this._buttonToggles.forEach(toggle => toggle.checked = false);\n }\n\n /** Selects a value if there's a toggle that corresponds to it. */\n private _selectValue(value: any) {\n const correspondingOption = this._buttonToggles.find(toggle => {\n return toggle.value != null && toggle.value === value;\n });\n\n if (correspondingOption) {\n correspondingOption.checked = true;\n this._selectionModel.select(correspondingOption);\n }\n }\n\n /** Syncs up the group's value with the model and emits the change event. */\n private _updateModelValue(isUserInput: boolean) {\n // Only emit the change event for user input.\n if (isUserInput) {\n this._emitChangeEvent();\n }\n\n // Note: we emit this one no matter whether it was a user interaction, because\n // it is used by Angular to sync up the two-way data binding.\n this.valueChange.emit(this.value);\n }\n\n static ngAcceptInputType_disabled: BooleanInput;\n static ngAcceptInputType_multiple: BooleanInput;\n static ngAcceptInputType_vertical: BooleanInput;\n}\n\n// Boilerplate for applying mixins to the MatButtonToggle class.\n/** @docs-private */\nclass MatButtonToggleBase {}\nconst _MatButtonToggleMixinBase: CanDisableRippleCtor & typeof MatButtonToggleBase =\n mixinDisableRipple(MatButtonToggleBase);\n\n/** Single button inside of a toggle group. */\n@Component({\n selector: 'mat-button-toggle',\n templateUrl: 'button-toggle.html',\n styleUrls: ['button-toggle.css'],\n encapsulation: ViewEncapsulation.None,\n exportAs: 'matButtonToggle',\n changeDetection: ChangeDetectionStrategy.OnPush,\n inputs: ['disableRipple'],\n host: {\n '[class.mat-button-toggle-standalone]': '!buttonToggleGroup',\n '[class.mat-button-toggle-checked]': 'checked',\n '[class.mat-button-toggle-disabled]': 'disabled',\n '[class.mat-button-toggle-appearance-standard]': 'appearance === \"standard\"',\n 'class': 'mat-button-toggle',\n // Always reset the tabindex to -1 so it doesn't conflict with the one on the `button`,\n // but can still receive focus from things like cdkFocusInitial.\n '[attr.tabindex]': '-1',\n '[attr.aria-label]': 'null',\n '[attr.aria-labelledby]': 'null',\n '[attr.id]': 'id',\n '[attr.name]': 'null',\n '(focus)': 'focus()',\n }\n})\nexport class MatButtonToggle extends _MatButtonToggleMixinBase implements OnInit, AfterViewInit,\n CanDisableRipple, OnDestroy {\n\n private _isSingleSelector = false;\n private _checked = false;\n\n /**\n * Attached to the aria-label attribute of the host element. In most cases, aria-labelledby will\n * take precedence so this may be omitted.\n */\n @Input('aria-label') ariaLabel: string;\n\n /**\n * Users can specify the `aria-labelledby` attribute which will be forwarded to the input element\n */\n @Input('aria-labelledby') ariaLabelledby: string | null = null;\n\n @ViewChild('button') _buttonElement: ElementRef<HTMLButtonElement>;\n\n /** The parent button toggle group (exclusive selection). Optional. */\n buttonToggleGroup: MatButtonToggleGroup;\n\n /** Unique ID for the underlying `button` element. */\n get buttonId(): string { return `${this.id}-button`; }\n\n /** The unique ID for this button toggle. */\n @Input() id: string;\n\n /** HTML's 'name' attribute used to group radios for unique selection. */\n @Input() name: string;\n\n /** MatButtonToggleGroup reads this to assign its own value. */\n @Input() value: any;\n\n /** Tabindex for the toggle. */\n @Input() tabIndex: number | null;\n\n /** The appearance style of the button. */\n @Input()\n get appearance(): MatButtonToggleAppearance {\n return this.buttonToggleGroup ? this.buttonToggleGroup.appearance : this._appearance;\n }\n set appearance(value: MatButtonToggleAppearance) {\n this._appearance = value;\n }\n private _appearance: MatButtonToggleAppearance;\n\n /** Whether the button is checked. */\n @Input()\n get checked(): boolean {\n return this.buttonToggleGroup ? this.buttonToggleGroup._isSelected(this) : this._checked;\n }\n set checked(value: boolean) {\n const newValue = coerceBooleanProperty(value);\n\n if (newValue !== this._checked) {\n this._checked = newValue;\n\n if (this.buttonToggleGroup) {\n this.buttonToggleGroup._syncButtonToggle(this, this._checked);\n }\n\n this._changeDetectorRef.markForCheck();\n }\n }\n\n /** Whether the button is disabled. */\n @Input()\n get disabled(): boolean {\n return this._disabled || (this.buttonToggleGroup && this.buttonToggleGroup.disabled);\n }\n set disabled(value: boolean) { this._disabled = coerceBooleanProperty(value); }\n private _disabled: boolean = false;\n\n /** Event emitted when the group value changes. */\n @Output() readonly change: EventEmitter<MatButtonToggleChange> =\n new EventEmitter<MatButtonToggleChange>();\n\n constructor(@Optional() @Inject(MAT_BUTTON_TOGGLE_GROUP) toggleGroup: MatButtonToggleGroup,\n private _changeDetectorRef: ChangeDetectorRef,\n private _elementRef: ElementRef<HTMLElement>,\n private _focusMonitor: FocusMonitor,\n @Attribute('tabindex') defaultTabIndex: string,\n @Optional() @Inject(MAT_BUTTON_TOGGLE_DEFAULT_OPTIONS)\n defaultOptions?: MatButtonToggleDefaultOptions) {\n super();\n\n const parsedTabIndex = Number(defaultTabIndex);\n this.tabIndex = (parsedTabIndex || parsedTabIndex === 0) ? parsedTabIndex : null;\n this.buttonToggleGroup = toggleGroup;\n this.appearance =\n defaultOptions && defaultOptions.appearance ? defaultOptions.appearance : 'standard';\n }\n\n ngOnInit() {\n const group = this.buttonToggleGroup;\n this._isSingleSelector = group && !group.multiple;\n this.id = this.id || `mat-button-toggle-${_uniqueIdCounter++}`;\n\n if (this._isSingleSelector) {\n this.name = group.name;\n }\n\n if (group) {\n if (group._isPrechecked(this)) {\n this.checked = true;\n } else if (group._isSelected(this) !== this._checked) {\n // As as side effect of the circular dependency between the toggle group and the button,\n // we may end up in a state where the button is supposed to be checked on init, but it\n // isn't, because the checked value was assigned too early. This can happen when Ivy\n // assigns the static input value before the `ngOnInit` has run.\n group._syncButtonToggle(this, this._checked);\n }\n }\n }\n\n ngAfterViewInit() {\n this._focusMonitor.monitor(this._elementRef, true);\n }\n\n ngOnDestroy() {\n const group = this.buttonToggleGroup;\n\n this._focusMonitor.stopMonitoring(this._elementRef);\n\n // Remove the toggle from the selection once it's destroyed. Needs to happen\n // on the next tick in order to avoid \"changed after checked\" errors.\n if (group && group._isSelected(this)) {\n group._syncButtonToggle(this, false, false, true);\n }\n }\n\n /** Focuses the button. */\n focus(options?: FocusOptions): void {\n this._buttonElement.nativeElement.focus(options);\n }\n\n /** Checks the button toggle due to an interaction with the underlying native button. */\n _onButtonClick() {\n const newChecked = this._isSingleSelector ? true : !this._checked;\n\n if (newChecked !== this._checked) {\n this._checked = newChecked;\n if (this.buttonToggleGroup) {\n this.buttonToggleGroup._syncButtonToggle(this, this._checked, true);\n this.buttonToggleGroup._onTouched();\n }\n }\n // Emit a change event when it's the single selector\n this.change.emit(new MatButtonToggleChange(this, this.value));\n }\n\n /**\n * Marks the button toggle as needing checking for change detection.\n * This method is exposed because the parent button toggle group will directly\n * update bound properties of the radio button.\n */\n _markForCheck() {\n // When the group value changes, the button will not be notified.\n // Use `markForCheck` to explicit update button toggle's status.\n this._changeDetectorRef.markForCheck();\n }\n\n static ngAcceptInputType_checked: BooleanInput;\n static ngAcceptInputType_disabled: BooleanInput;\n static ngAcceptInputType_vertical: BooleanInput;\n static ngAcceptInputType_multiple: BooleanInput;\n static ngAcceptInputType_disableRipple: BooleanInput;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {NgModule} from '@angular/core';\nimport {MatCommonModule, MatRippleModule} from '@angular/material/core';\nimport {MatButtonToggle, MatButtonToggleGroup} from './button-toggle';\n\n\n@NgModule({\n imports: [MatCommonModule, MatRippleModule],\n exports: [MatCommonModule, MatButtonToggleGroup, MatButtonToggle],\n declarations: [MatButtonToggleGroup, MatButtonToggle],\n})\nexport class MatButtonToggleModule {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './button-toggle';\nexport * from './button-toggle-module';\n\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;AAAA;;;;;;;AAQA,AAmDA;;;;AAIA,MAAa,iCAAiC,GAC1C,IAAI,cAAc,CAAgC,mCAAmC,CAAC,CAAC;;;;;;AAO3F,MAAa,uBAAuB,GAChC,IAAI,cAAc,CAAuB,sBAAsB,CAAC,CAAC;;;;;;AAOrE,MAAa,sCAAsC,GAAQ;IACzD,OAAO,EAAE,iBAAiB;IAC1B,WAAW,EAAE,UAAU,CAAC,MAAM,oBAAoB,CAAC;IACnD,KAAK,EAAE,IAAI;CACZ,CAAC;AAEF,IAAI,gBAAgB,GAAG,CAAC,CAAC;;AAGzB,MAAa,qBAAqB;IAChC;;IAES,MAAuB;;IAGvB,KAAU;QAHV,WAAM,GAAN,MAAM,CAAiB;QAGvB,UAAK,GAAL,KAAK,CAAK;KAAI;CACxB;;AAkBD,MAAa,oBAAoB;IA0G/B,YACU,eAAkC,EAEtC,cAA8C;QAF1C,oBAAe,GAAf,eAAe,CAAmB;QA1GpC,cAAS,GAAG,KAAK,CAAC;QAClB,cAAS,GAAG,KAAK,CAAC;QAClB,cAAS,GAAG,KAAK,CAAC;;;;;Q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BAAmB;gBAC7B,iwBAAiC;gBAEjC,aAAa,EAAE,iBAAiB,CAAC,IAAI;gBACrC,QAAQ,EAAE,iBAAiB;gBAC3B,eAAe,EAAE,uBAAuB,CAAC,MAAM;gBAC/C,MAAM,EAAE,CAAC,eAAe,CAAC;gBACzB,IAAI,EAAE;oBACJ,sCAAsC,EAAE,oBAAoB;oBAC5D,mCAAmC,EAAE,SAAS;oBAC9C,oCAAoC,EAAE,UAAU;oBAChD,+CAA+C,EAAE,2BAA2B;oBAC5E,OAAO,EAAE,mBAAmB;;;oBAG5B,iBAAiB,EAAE,IAAI;oBACvB,mBAAmB,EAAE,MAAM;oBAC3B,wBAAwB,EAAE,MAAM;oBAChC,WAAW,EAAE,IAAI;oBACjB,aAAa,EAAE,MAAM;oBACrB,SAAS,EAAE,SAAS;iBACrB;;aACF;;;YA+EuE,oBAAoB,uBAA7E,QAAQ,YAAI,MAAM,SAAC,uBAAuB;YA1dvD,iBAAiB;YAIjB,UAAU;YAXJ,YAAY;yCAqeL,SAAS,SAAC,UAAU;4CACpB,QAAQ,YAAI,MAAM,SAAC,iCAAiC;;;wBAzEhE,KAAK,SAAC,YAAY;6BAKlB,KAAK,SAAC,iBAAiB;6BAEvB,SAAS,SAAC,QAAQ;iBASlB,KAAK;mBAGL,KAAK;oBAGL,KAAK;uBAGL,KAAK;yBAGL,KAAK;sBAUL,KAAK;uBAmBL,KAAK;qBAQL,MAAM;;;ACteT;;;;;;;AAQA,MAUa,qBAAqB;;;YALjC,QAAQ,SAAC;gBACR,OAAO,EAAE,CAAC,eAAe,EAAE,eAAe,CAAC;gBAC3C,OAAO,EAAE,CAAC,eAAe,EAAE,oBAAoB,EAAE,eAAe,CAAC;gBACjE,YAAY,EAAE,CAAC,oBAAoB,EAAE,eAAe,CAAC;aACtD;;;ACjBD;;;;;;GAMG;;ACNH;;GAEG;;;;"}
1
+ {"version":3,"file":"button-toggle.js","sources":["../../../../../../src/material/button-toggle/button-toggle.ts","../../../../../../src/material/button-toggle/button-toggle-module.ts","../../../../../../src/material/button-toggle/public-api.ts","../../../../../../src/material/button-toggle/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {FocusMonitor} from '@angular/cdk/a11y';\nimport {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {SelectionModel} from '@angular/cdk/collections';\nimport {\n AfterContentInit,\n Attribute,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChildren,\n Directive,\n ElementRef,\n EventEmitter,\n forwardRef,\n Input,\n OnDestroy,\n OnInit,\n Optional,\n Output,\n QueryList,\n ViewChild,\n ViewEncapsulation,\n InjectionToken,\n Inject,\n AfterViewInit,\n} from '@angular/core';\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from '@angular/forms';\nimport {\n CanDisableRipple,\n mixinDisableRipple,\n CanDisableRippleCtor,\n} from '@angular/material/core';\n\n\n/**\n * @deprecated No longer used.\n * @breaking-change 11.0.0\n */\nexport type ToggleType = 'checkbox' | 'radio';\n\n/** Possible appearance styles for the button toggle. */\nexport type MatButtonToggleAppearance = 'legacy' | 'standard';\n\n/**\n * Represents the default options for the button toggle that can be configured\n * using the `MAT_BUTTON_TOGGLE_DEFAULT_OPTIONS` injection token.\n */\nexport interface MatButtonToggleDefaultOptions {\n appearance?: MatButtonToggleAppearance;\n}\n\n/**\n * Injection token that can be used to configure the\n * default options for all button toggles within an app.\n */\nexport const MAT_BUTTON_TOGGLE_DEFAULT_OPTIONS =\n new InjectionToken<MatButtonToggleDefaultOptions>('MAT_BUTTON_TOGGLE_DEFAULT_OPTIONS');\n\n/**\n * Injection token that can be used to reference instances of `MatButtonToggleGroup`.\n * It serves as alternative token to the actual `MatButtonToggleGroup` class which\n * could cause unnecessary retention of the class and its component metadata.\n */\nexport const MAT_BUTTON_TOGGLE_GROUP =\n new InjectionToken<MatButtonToggleGroup>('MatButtonToggleGroup');\n\n/**\n * Provider Expression that allows mat-button-toggle-group to register as a ControlValueAccessor.\n * This allows it to support [(ngModel)].\n * @docs-private\n */\nexport const MAT_BUTTON_TOGGLE_GROUP_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => MatButtonToggleGroup),\n multi: true\n};\n\nlet _uniqueIdCounter = 0;\n\n/** Change event object emitted by MatButtonToggle. */\nexport class MatButtonToggleChange {\n constructor(\n /** The MatButtonToggle that emits the event. */\n public source: MatButtonToggle,\n\n /** The value assigned to the MatButtonToggle. */\n public value: any) {}\n}\n\n/** Exclusive selection button toggle group that behaves like a radio-button group. */\n@Directive({\n selector: 'mat-button-toggle-group',\n providers: [\n MAT_BUTTON_TOGGLE_GROUP_VALUE_ACCESSOR,\n {provide: MAT_BUTTON_TOGGLE_GROUP, useExisting: MatButtonToggleGroup},\n ],\n host: {\n 'role': 'group',\n 'class': 'mat-button-toggle-group',\n '[attr.aria-disabled]': 'disabled',\n '[class.mat-button-toggle-vertical]': 'vertical',\n '[class.mat-button-toggle-group-appearance-standard]': 'appearance === \"standard\"',\n },\n exportAs: 'matButtonToggleGroup',\n})\nexport class MatButtonToggleGroup implements ControlValueAccessor, OnInit, AfterContentInit {\n private _vertical = false;\n private _multiple = false;\n private _disabled = false;\n private _selectionModel: SelectionModel<MatButtonToggle>;\n\n /**\n * Reference to the raw value that the consumer tried to assign. The real\n * value will exclude any values from this one that don't correspond to a\n * toggle. Useful for the cases where the value is assigned before the toggles\n * have been initialized or at the same that they're being swapped out.\n */\n private _rawValue: any;\n\n /**\n * The method to be called in order to update ngModel.\n * Now `ngModel` binding is not supported in multiple selection mode.\n */\n _controlValueAccessorChangeFn: (value: any) => void = () => {};\n\n /** onTouch function registered via registerOnTouch (ControlValueAccessor). */\n _onTouched: () => any = () => {};\n\n /** Child button toggle buttons. */\n @ContentChildren(forwardRef(() => MatButtonToggle), {\n // Note that this would technically pick up toggles\n // from nested groups, but that's not a case that we support.\n descendants: true\n }) _buttonToggles: QueryList<MatButtonToggle>;\n\n /** The appearance for all the buttons in the group. */\n @Input() appearance: MatButtonToggleAppearance;\n\n /** `name` attribute for the underlying `input` element. */\n @Input()\n get name(): string { return this._name; }\n set name(value: string) {\n this._name = value;\n\n if (this._buttonToggles) {\n this._buttonToggles.forEach(toggle => {\n toggle.name = this._name;\n toggle._markForCheck();\n });\n }\n }\n private _name = `mat-button-toggle-group-${_uniqueIdCounter++}`;\n\n /** Whether the toggle group is vertical. */\n @Input()\n get vertical(): boolean { return this._vertical; }\n set vertical(value: boolean) {\n this._vertical = coerceBooleanProperty(value);\n }\n\n /** Value of the toggle group. */\n @Input()\n get value(): any {\n const selected = this._selectionModel ? this._selectionModel.selected : [];\n\n if (this.multiple) {\n return selected.map(toggle => toggle.value);\n }\n\n return selected[0] ? selected[0].value : undefined;\n }\n set value(newValue: any) {\n this._setSelectionByValue(newValue);\n this.valueChange.emit(this.value);\n }\n\n /**\n * Event that emits whenever the value of the group changes.\n * Used to facilitate two-way data binding.\n * @docs-private\n */\n @Output() readonly valueChange = new EventEmitter<any>();\n\n /** Selected button toggles in the group. */\n get selected() {\n const selected = this._selectionModel ? this._selectionModel.selected : [];\n return this.multiple ? selected : (selected[0] || null);\n }\n\n /** Whether multiple button toggles can be selected. */\n @Input()\n get multiple(): boolean { return this._multiple; }\n set multiple(value: boolean) {\n this._multiple = coerceBooleanProperty(value);\n }\n\n /** Whether multiple button toggle group is disabled. */\n @Input()\n get disabled(): boolean { return this._disabled; }\n set disabled(value: boolean) {\n this._disabled = coerceBooleanProperty(value);\n\n if (this._buttonToggles) {\n this._buttonToggles.forEach(toggle => toggle._markForCheck());\n }\n }\n\n /** Event emitted when the group's value changes. */\n @Output() readonly change: EventEmitter<MatButtonToggleChange> =\n new EventEmitter<MatButtonToggleChange>();\n\n constructor(\n private _changeDetector: ChangeDetectorRef,\n @Optional() @Inject(MAT_BUTTON_TOGGLE_DEFAULT_OPTIONS)\n defaultOptions?: MatButtonToggleDefaultOptions) {\n\n this.appearance =\n defaultOptions && defaultOptions.appearance ? defaultOptions.appearance : 'standard';\n }\n\n ngOnInit() {\n this._selectionModel = new SelectionModel<MatButtonToggle>(this.multiple, undefined, false);\n }\n\n ngAfterContentInit() {\n this._selectionModel.select(...this._buttonToggles.filter(toggle => toggle.checked));\n }\n\n /**\n * Sets the model value. Implemented as part of ControlValueAccessor.\n * @param value Value to be set to the model.\n */\n writeValue(value: any) {\n this.value = value;\n this._changeDetector.markForCheck();\n }\n\n // Implemented as part of ControlValueAccessor.\n registerOnChange(fn: (value: any) => void) {\n this._controlValueAccessorChangeFn = fn;\n }\n\n // Implemented as part of ControlValueAccessor.\n registerOnTouched(fn: any) {\n this._onTouched = fn;\n }\n\n // Implemented as part of ControlValueAccessor.\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n }\n\n /** Dispatch change event with current selection and group value. */\n _emitChangeEvent(): void {\n const selected = this.selected;\n const source = Array.isArray(selected) ? selected[selected.length - 1] : selected;\n const event = new MatButtonToggleChange(source!, this.value);\n this._controlValueAccessorChangeFn(event.value);\n this.change.emit(event);\n }\n\n /**\n * Syncs a button toggle's selected state with the model value.\n * @param toggle Toggle to be synced.\n * @param select Whether the toggle should be selected.\n * @param isUserInput Whether the change was a result of a user interaction.\n * @param deferEvents Whether to defer emitting the change events.\n */\n _syncButtonToggle(toggle: MatButtonToggle,\n select: boolean,\n isUserInput = false,\n deferEvents = false) {\n // Deselect the currently-selected toggle, if we're in single-selection\n // mode and the button being toggled isn't selected at the moment.\n if (!this.multiple && this.selected && !toggle.checked) {\n (this.selected as MatButtonToggle).checked = false;\n }\n\n if (this._selectionModel) {\n if (select) {\n this._selectionModel.select(toggle);\n } else {\n this._selectionModel.deselect(toggle);\n }\n } else {\n deferEvents = true;\n }\n\n // We need to defer in some cases in order to avoid \"changed after checked errors\", however\n // the side-effect is that we may end up updating the model value out of sequence in others\n // The `deferEvents` flag allows us to decide whether to do it on a case-by-case basis.\n if (deferEvents) {\n Promise.resolve().then(() => this._updateModelValue(isUserInput));\n } else {\n this._updateModelValue(isUserInput);\n }\n }\n\n /** Checks whether a button toggle is selected. */\n _isSelected(toggle: MatButtonToggle) {\n return this._selectionModel && this._selectionModel.isSelected(toggle);\n }\n\n /** Determines whether a button toggle should be checked on init. */\n _isPrechecked(toggle: MatButtonToggle) {\n if (typeof this._rawValue === 'undefined') {\n return false;\n }\n\n if (this.multiple && Array.isArray(this._rawValue)) {\n return this._rawValue.some(value => toggle.value != null && value === toggle.value);\n }\n\n return toggle.value === this._rawValue;\n }\n\n /** Updates the selection state of the toggles in the group based on a value. */\n private _setSelectionByValue(value: any|any[]) {\n this._rawValue = value;\n\n if (!this._buttonToggles) {\n return;\n }\n\n if (this.multiple && value) {\n if (!Array.isArray(value) && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error('Value must be an array in multiple-selection mode.');\n }\n\n this._clearSelection();\n value.forEach((currentValue: any) => this._selectValue(currentValue));\n } else {\n this._clearSelection();\n this._selectValue(value);\n }\n }\n\n /** Clears the selected toggles. */\n private _clearSelection() {\n this._selectionModel.clear();\n this._buttonToggles.forEach(toggle => toggle.checked = false);\n }\n\n /** Selects a value if there's a toggle that corresponds to it. */\n private _selectValue(value: any) {\n const correspondingOption = this._buttonToggles.find(toggle => {\n return toggle.value != null && toggle.value === value;\n });\n\n if (correspondingOption) {\n correspondingOption.checked = true;\n this._selectionModel.select(correspondingOption);\n }\n }\n\n /** Syncs up the group's value with the model and emits the change event. */\n private _updateModelValue(isUserInput: boolean) {\n // Only emit the change event for user input.\n if (isUserInput) {\n this._emitChangeEvent();\n }\n\n // Note: we emit this one no matter whether it was a user interaction, because\n // it is used by Angular to sync up the two-way data binding.\n this.valueChange.emit(this.value);\n }\n\n static ngAcceptInputType_disabled: BooleanInput;\n static ngAcceptInputType_multiple: BooleanInput;\n static ngAcceptInputType_vertical: BooleanInput;\n}\n\n// Boilerplate for applying mixins to the MatButtonToggle class.\n/** @docs-private */\nclass MatButtonToggleBase {}\nconst _MatButtonToggleMixinBase: CanDisableRippleCtor & typeof MatButtonToggleBase =\n mixinDisableRipple(MatButtonToggleBase);\n\n/** Single button inside of a toggle group. */\n@Component({\n selector: 'mat-button-toggle',\n templateUrl: 'button-toggle.html',\n styleUrls: ['button-toggle.css'],\n encapsulation: ViewEncapsulation.None,\n exportAs: 'matButtonToggle',\n changeDetection: ChangeDetectionStrategy.OnPush,\n inputs: ['disableRipple'],\n host: {\n '[class.mat-button-toggle-standalone]': '!buttonToggleGroup',\n '[class.mat-button-toggle-checked]': 'checked',\n '[class.mat-button-toggle-disabled]': 'disabled',\n '[class.mat-button-toggle-appearance-standard]': 'appearance === \"standard\"',\n 'class': 'mat-button-toggle',\n '[attr.aria-label]': 'null',\n '[attr.aria-labelledby]': 'null',\n '[attr.id]': 'id',\n '[attr.name]': 'null',\n '(focus)': 'focus()',\n 'role': 'presentation',\n }\n})\nexport class MatButtonToggle extends _MatButtonToggleMixinBase implements OnInit, AfterViewInit,\n CanDisableRipple, OnDestroy {\n\n private _isSingleSelector = false;\n private _checked = false;\n\n /**\n * Attached to the aria-label attribute of the host element. In most cases, aria-labelledby will\n * take precedence so this may be omitted.\n */\n @Input('aria-label') ariaLabel: string;\n\n /**\n * Users can specify the `aria-labelledby` attribute which will be forwarded to the input element\n */\n @Input('aria-labelledby') ariaLabelledby: string | null = null;\n\n @ViewChild('button') _buttonElement: ElementRef<HTMLButtonElement>;\n\n /** The parent button toggle group (exclusive selection). Optional. */\n buttonToggleGroup: MatButtonToggleGroup;\n\n /** Unique ID for the underlying `button` element. */\n get buttonId(): string { return `${this.id}-button`; }\n\n /** The unique ID for this button toggle. */\n @Input() id: string;\n\n /** HTML's 'name' attribute used to group radios for unique selection. */\n @Input() name: string;\n\n /** MatButtonToggleGroup reads this to assign its own value. */\n @Input() value: any;\n\n /** Tabindex for the toggle. */\n @Input() tabIndex: number | null;\n\n /** The appearance style of the button. */\n @Input()\n get appearance(): MatButtonToggleAppearance {\n return this.buttonToggleGroup ? this.buttonToggleGroup.appearance : this._appearance;\n }\n set appearance(value: MatButtonToggleAppearance) {\n this._appearance = value;\n }\n private _appearance: MatButtonToggleAppearance;\n\n /** Whether the button is checked. */\n @Input()\n get checked(): boolean {\n return this.buttonToggleGroup ? this.buttonToggleGroup._isSelected(this) : this._checked;\n }\n set checked(value: boolean) {\n const newValue = coerceBooleanProperty(value);\n\n if (newValue !== this._checked) {\n this._checked = newValue;\n\n if (this.buttonToggleGroup) {\n this.buttonToggleGroup._syncButtonToggle(this, this._checked);\n }\n\n this._changeDetectorRef.markForCheck();\n }\n }\n\n /** Whether the button is disabled. */\n @Input()\n get disabled(): boolean {\n return this._disabled || (this.buttonToggleGroup && this.buttonToggleGroup.disabled);\n }\n set disabled(value: boolean) { this._disabled = coerceBooleanProperty(value); }\n private _disabled: boolean = false;\n\n /** Event emitted when the group value changes. */\n @Output() readonly change: EventEmitter<MatButtonToggleChange> =\n new EventEmitter<MatButtonToggleChange>();\n\n constructor(@Optional() @Inject(MAT_BUTTON_TOGGLE_GROUP) toggleGroup: MatButtonToggleGroup,\n private _changeDetectorRef: ChangeDetectorRef,\n private _elementRef: ElementRef<HTMLElement>,\n private _focusMonitor: FocusMonitor,\n @Attribute('tabindex') defaultTabIndex: string,\n @Optional() @Inject(MAT_BUTTON_TOGGLE_DEFAULT_OPTIONS)\n defaultOptions?: MatButtonToggleDefaultOptions) {\n super();\n\n const parsedTabIndex = Number(defaultTabIndex);\n this.tabIndex = (parsedTabIndex || parsedTabIndex === 0) ? parsedTabIndex : null;\n this.buttonToggleGroup = toggleGroup;\n this.appearance =\n defaultOptions && defaultOptions.appearance ? defaultOptions.appearance : 'standard';\n }\n\n ngOnInit() {\n const group = this.buttonToggleGroup;\n this._isSingleSelector = group && !group.multiple;\n this.id = this.id || `mat-button-toggle-${_uniqueIdCounter++}`;\n\n if (this._isSingleSelector) {\n this.name = group.name;\n }\n\n if (group) {\n if (group._isPrechecked(this)) {\n this.checked = true;\n } else if (group._isSelected(this) !== this._checked) {\n // As as side effect of the circular dependency between the toggle group and the button,\n // we may end up in a state where the button is supposed to be checked on init, but it\n // isn't, because the checked value was assigned too early. This can happen when Ivy\n // assigns the static input value before the `ngOnInit` has run.\n group._syncButtonToggle(this, this._checked);\n }\n }\n }\n\n ngAfterViewInit() {\n this._focusMonitor.monitor(this._elementRef, true);\n }\n\n ngOnDestroy() {\n const group = this.buttonToggleGroup;\n\n this._focusMonitor.stopMonitoring(this._elementRef);\n\n // Remove the toggle from the selection once it's destroyed. Needs to happen\n // on the next tick in order to avoid \"changed after checked\" errors.\n if (group && group._isSelected(this)) {\n group._syncButtonToggle(this, false, false, true);\n }\n }\n\n /** Focuses the button. */\n focus(options?: FocusOptions): void {\n this._buttonElement.nativeElement.focus(options);\n }\n\n /** Checks the button toggle due to an interaction with the underlying native button. */\n _onButtonClick() {\n const newChecked = this._isSingleSelector ? true : !this._checked;\n\n if (newChecked !== this._checked) {\n this._checked = newChecked;\n if (this.buttonToggleGroup) {\n this.buttonToggleGroup._syncButtonToggle(this, this._checked, true);\n this.buttonToggleGroup._onTouched();\n }\n }\n // Emit a change event when it's the single selector\n this.change.emit(new MatButtonToggleChange(this, this.value));\n }\n\n /**\n * Marks the button toggle as needing checking for change detection.\n * This method is exposed because the parent button toggle group will directly\n * update bound properties of the radio button.\n */\n _markForCheck() {\n // When the group value changes, the button will not be notified.\n // Use `markForCheck` to explicit update button toggle's status.\n this._changeDetectorRef.markForCheck();\n }\n\n static ngAcceptInputType_checked: BooleanInput;\n static ngAcceptInputType_disabled: BooleanInput;\n static ngAcceptInputType_vertical: BooleanInput;\n static ngAcceptInputType_multiple: BooleanInput;\n static ngAcceptInputType_disableRipple: BooleanInput;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {NgModule} from '@angular/core';\nimport {MatCommonModule, MatRippleModule} from '@angular/material/core';\nimport {MatButtonToggle, MatButtonToggleGroup} from './button-toggle';\n\n\n@NgModule({\n imports: [MatCommonModule, MatRippleModule],\n exports: [MatCommonModule, MatButtonToggleGroup, MatButtonToggle],\n declarations: [MatButtonToggleGroup, MatButtonToggle],\n})\nexport class MatButtonToggleModule {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './button-toggle';\nexport * from './button-toggle-module';\n\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;AAAA;;;;;;;AAQA,AAmDA;;;;AAIA,MAAa,iCAAiC,GAC1C,IAAI,cAAc,CAAgC,mCAAmC,CAAC,CAAC;;;;;;AAO3F,MAAa,uBAAuB,GAChC,IAAI,cAAc,CAAuB,sBAAsB,CAAC,CAAC;;;;;;AAOrE,MAAa,sCAAsC,GAAQ;IACzD,OAAO,EAAE,iBAAiB;IAC1B,WAAW,EAAE,UAAU,CAAC,MAAM,oBAAoB,CAAC;IACnD,KAAK,EAAE,IAAI;CACZ,CAAC;AAEF,IAAI,gBAAgB,GAAG,CAAC,CAAC;;AAGzB,MAAa,qBAAqB;IAChC;;IAES,MAAuB;;IAGvB,KAAU;QAHV,WAAM,GAAN,MAAM,CAAiB;QAGvB,UAAK,GAAL,KAAK,CAAK;KAAI;CACxB;;AAkBD,MAAa,oBAAoB;IA0G/B,YACU,eAAkC,EAEtC,cAA8C;QAF1C,oBAAe,GAAf,eAAe,CAAmB;QA1GpC,cAAS,GAAG,KAAK,CAAC;QAClB,cAAS,GAAG,KAAK,CAAC;QAClB,cAAS,GAAG,KAAK,CAAC;;;;;QAe1B,kCAA6B,GAAyB,SAAQ,CAAC;;QAG/D,eAAU,GAAc,SAAQ,CAAC;QAyBzB,UAAK,GAAG,2BAA2B,gBAAgB,EAAE,EAAE,CAAC;;;;;;QA8B7C,gBAAW,G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AM,EAAE,CAAC,eAAe,CAAC;gBACzB,IAAI,EAAE;oBACJ,sCAAsC,EAAE,oBAAoB;oBAC5D,mCAAmC,EAAE,SAAS;oBAC9C,oCAAoC,EAAE,UAAU;oBAChD,+CAA+C,EAAE,2BAA2B;oBAC5E,OAAO,EAAE,mBAAmB;oBAC5B,mBAAmB,EAAE,MAAM;oBAC3B,wBAAwB,EAAE,MAAM;oBAChC,WAAW,EAAE,IAAI;oBACjB,aAAa,EAAE,MAAM;oBACrB,SAAS,EAAE,SAAS;oBACpB,MAAM,EAAE,cAAc;iBACvB;;aACF;;;YA+EuE,oBAAoB,uBAA7E,QAAQ,YAAI,MAAM,SAAC,uBAAuB;YAxdvD,iBAAiB;YAIjB,UAAU;YAXJ,YAAY;yCAmeL,SAAS,SAAC,UAAU;4CACpB,QAAQ,YAAI,MAAM,SAAC,iCAAiC;;;wBAzEhE,KAAK,SAAC,YAAY;6BAKlB,KAAK,SAAC,iBAAiB;6BAEvB,SAAS,SAAC,QAAQ;iBASlB,KAAK;mBAGL,KAAK;oBAGL,KAAK;uBAGL,KAAK;yBAGL,KAAK;sBAUL,KAAK;uBAmBL,KAAK;qBAQL,MAAM;;;ACpeT;;;;;;;AAQA,MAUa,qBAAqB;;;YALjC,QAAQ,SAAC;gBACR,OAAO,EAAE,CAAC,eAAe,EAAE,eAAe,CAAC;gBAC3C,OAAO,EAAE,CAAC,eAAe,EAAE,oBAAoB,EAAE,eAAe,CAAC;gBACjE,YAAY,EAAE,CAAC,oBAAoB,EAAE,eAAe,CAAC;aACtD;;;ACjBD;;;;;;GAMG;;ACNH;;GAEG;;;;"}
@@ -118,7 +118,7 @@ class MatCheckboxHarness extends ComponentHarness {
118
118
  * Toggles the checked state of the checkbox.
119
119
  *
120
120
  * Note: This attempts to toggle the checkbox as a user would, by clicking it. Therefore if you
121
- * are using `MAT_CHECKBOX_CLICK_ACTION` to change the behavior on click, calling this method
121
+ * are using `MAT_CHECKBOX_DEFAULT_OPTIONS` to change the behavior on click, calling this method
122
122
  * might not have the expected result.
123
123
  */
124
124
  toggle() {
@@ -131,7 +131,7 @@ class MatCheckboxHarness extends ComponentHarness {
131
131
  * nothing if it is already checked.
132
132
  *
133
133
  * Note: This attempts to check the checkbox as a user would, by clicking it. Therefore if you
134
- * are using `MAT_CHECKBOX_CLICK_ACTION` to change the behavior on click, calling this method
134
+ * are using `MAT_CHECKBOX_DEFAULT_OPTIONS` to change the behavior on click, calling this method
135
135
  * might not have the expected result.
136
136
  */
137
137
  check() {
@@ -146,7 +146,7 @@ class MatCheckboxHarness extends ComponentHarness {
146
146
  * nothing if it is already unchecked.
147
147
  *
148
148
  * Note: This attempts to uncheck the checkbox as a user would, by clicking it. Therefore if you
149
- * are using `MAT_CHECKBOX_CLICK_ACTION` to change the behavior on click, calling this method
149
+ * are using `MAT_CHECKBOX_DEFAULT_OPTIONS` to change the behavior on click, calling this method
150
150
  * might not have the expected result.
151
151
  */
152
152
  uncheck() {
@@ -1 +1 @@
1
- {"version":3,"file":"checkbox__testing.js","sources":["../../../../../../src/material/checkbox/testing/checkbox-harness.ts","../../../../../../src/material/checkbox/testing/checkbox-harness-filters.ts","../../../../../../src/material/checkbox/testing/public-api.ts","../../../../../../src/material/checkbox/testing/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {ComponentHarness, HarnessPredicate} from '@angular/cdk/testing';\nimport {CheckboxHarnessFilters} from './checkbox-harness-filters';\n\n/** Harness for interacting with a standard mat-checkbox in tests. */\nexport class MatCheckboxHarness extends ComponentHarness {\n /** The selector for the host element of a `MatCheckbox` instance. */\n static hostSelector = '.mat-checkbox';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatCheckboxHarness` that meets\n * certain criteria.\n * @param options Options for filtering which checkbox instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: CheckboxHarnessFilters = {}): HarnessPredicate<MatCheckboxHarness> {\n return new HarnessPredicate(MatCheckboxHarness, options)\n .addOption(\n 'label', options.label,\n (harness, label) => HarnessPredicate.stringMatches(harness.getLabelText(), label))\n // We want to provide a filter option for \"name\" because the name of the checkbox is\n // only set on the underlying input. This means that it's not possible for developers\n // to retrieve the harness of a specific checkbox with name through a CSS selector.\n .addOption('name', options.name, async (harness, name) => await harness.getName() === name);\n }\n\n private _label = this.locatorFor('.mat-checkbox-label');\n private _input = this.locatorFor('input');\n private _inputContainer = this.locatorFor('.mat-checkbox-inner-container');\n\n /** Whether the checkbox is checked. */\n async isChecked(): Promise<boolean> {\n const checked = (await this._input()).getProperty('checked');\n return coerceBooleanProperty(await checked);\n }\n\n /** Whether the checkbox is in an indeterminate state. */\n async isIndeterminate(): Promise<boolean> {\n const indeterminate = (await this._input()).getProperty('indeterminate');\n return coerceBooleanProperty(await indeterminate);\n }\n\n /** Whether the checkbox is disabled. */\n async isDisabled(): Promise<boolean> {\n const disabled = (await this._input()).getAttribute('disabled');\n return coerceBooleanProperty(await disabled);\n }\n\n /** Whether the checkbox is required. */\n async isRequired(): Promise<boolean> {\n const required = (await this._input()).getProperty('required');\n return coerceBooleanProperty(await required);\n }\n\n /** Whether the checkbox is valid. */\n async isValid(): Promise<boolean> {\n const invalid = (await this.host()).hasClass('ng-invalid');\n return !(await invalid);\n }\n\n /** Gets the checkbox's name. */\n async getName(): Promise<string|null> {\n return (await this._input()).getAttribute('name');\n }\n\n /** Gets the checkbox's value. */\n async getValue(): Promise<string|null> {\n return (await this._input()).getProperty('value');\n }\n\n /** Gets the checkbox's aria-label. */\n async getAriaLabel(): Promise<string|null> {\n return (await this._input()).getAttribute('aria-label');\n }\n\n /** Gets the checkbox's aria-labelledby. */\n async getAriaLabelledby(): Promise<string|null> {\n return (await this._input()).getAttribute('aria-labelledby');\n }\n\n /** Gets the checkbox's label text. */\n async getLabelText(): Promise<string> {\n return (await this._label()).text();\n }\n\n /** Focuses the checkbox. */\n async focus(): Promise<void> {\n return (await this._input()).focus();\n }\n\n /** Blurs the checkbox. */\n async blur(): Promise<void> {\n return (await this._input()).blur();\n }\n\n /** Whether the checkbox is focused. */\n async isFocused(): Promise<boolean> {\n return (await this._input()).isFocused();\n }\n\n /**\n * Toggles the checked state of the checkbox.\n *\n * Note: This attempts to toggle the checkbox as a user would, by clicking it. Therefore if you\n * are using `MAT_CHECKBOX_CLICK_ACTION` to change the behavior on click, calling this method\n * might not have the expected result.\n */\n async toggle(): Promise<void> {\n return (await this._inputContainer()).click();\n }\n\n /**\n * Puts the checkbox in a checked state by toggling it if it is currently unchecked, or doing\n * nothing if it is already checked.\n *\n * Note: This attempts to check the checkbox as a user would, by clicking it. Therefore if you\n * are using `MAT_CHECKBOX_CLICK_ACTION` to change the behavior on click, calling this method\n * might not have the expected result.\n */\n async check(): Promise<void> {\n if (!(await this.isChecked())) {\n await this.toggle();\n }\n }\n\n /**\n * Puts the checkbox in an unchecked state by toggling it if it is currently checked, or doing\n * nothing if it is already unchecked.\n *\n * Note: This attempts to uncheck the checkbox as a user would, by clicking it. Therefore if you\n * are using `MAT_CHECKBOX_CLICK_ACTION` to change the behavior on click, calling this method\n * might not have the expected result.\n */\n async uncheck(): Promise<void> {\n if (await this.isChecked()) {\n await this.toggle();\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {BaseHarnessFilters} from '@angular/cdk/testing';\n\n/** A set of criteria that can be used to filter a list of `MatCheckboxHarness` instances. */\nexport interface CheckboxHarnessFilters extends BaseHarnessFilters {\n /** Only find instances whose label matches the given value. */\n label?: string | RegExp;\n /** Only find instances whose name attribute is the given value. */\n name?: string;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './checkbox-harness';\nexport * from './checkbox-harness-filters';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;AAAA;;;;;;;AAYA;AACA,MAAa,kBAAmB,SAAQ,gBAAgB;IAAxD;;QAqBU,WAAM,GAAG,IAAI,CAAC,UAAU,CAAC,qBAAqB,CAAC,CAAC;QAChD,WAAM,GAAG,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;QAClC,oBAAe,GAAG,IAAI,CAAC,UAAU,CAAC,+BAA+B,CAAC,CAAC;KA8G5E;;;;;;;IA3HC,OAAO,IAAI,CAAC,UAAkC,EAAE;QAC9C,OAAO,IAAI,gBAAgB,CAAC,kBAAkB,EAAE,OAAO,CAAC;aACnD,SAAS,CACN,OAAO,EAAE,OAAO,CAAC,KAAK,EACtB,CAAC,OAAO,EAAE,KAAK,KAAK,gBAAgB,CAAC,aAAa,CAAC,OAAO,CAAC,YAAY,EAAE,EAAE,KAAK,CAAC,CAAC;;;;aAIrF,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,EAAE,CAAO,OAAO,EAAE,IAAI,oDAAK,OAAA,CAAA,MAAM,OAAO,CAAC,OAAO,EAAE,MAAK,IAAI,CAAA,GAAA,CAAC,CAAC;KACjG;;IAOK,SAAS;;YACb,MAAM,OAAO,GAAG,CAAC,MAAM,IAAI,CAAC,MAAM,EAAE,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC;YAC7D,OAAO,qBAAqB,CAAC,MAAM,OAAO,CAAC,CAAC;SAC7C;KAAA;;IAGK,eAAe;;YACnB,MAAM,aAAa,GAAG,CAAC,MAAM,IAAI,CAAC,MAAM,EAAE,EAAE,WAAW,CAAC,eAAe,CAAC,CAAC;YACzE,OAAO,qBAAqB,CAAC,MAAM,aAAa,CAAC,CAAC;SACnD;KAAA;;IAGK,UAAU;;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C;SACrC;KAAA;;IAGK,SAAS;;YACb,OAAO,CAAC,MAAM,IAAI,CAAC,MAAM,EAAE,EAAE,SAAS,EAAE,CAAC;SAC1C;KAAA;;;;;;;;IASK,MAAM;;YACV,OAAO,CAAC,MAAM,IAAI,CAAC,eAAe,EAAE,EAAE,KAAK,EAAE,CAAC;SAC/C;KAAA;;;;;;;;;IAUK,KAAK;;YACT,IAAI,EAAE,MAAM,IAAI,CAAC,SAAS,EAAE,CAAC,EAAE;gBAC7B,MAAM,IAAI,CAAC,MAAM,EAAE,CAAC;aACrB;SACF;KAAA;;;;;;;;;IAUK,OAAO;;YACX,IAAI,MAAM,IAAI,CAAC,SAAS,EAAE,EAAE;gBAC1B,MAAM,IAAI,CAAC,MAAM,EAAE,CAAC;aACrB;SACF;KAAA;;;AAlIM,+BAAY,GAAG,eAAe,CAAC;;ACfxC;;;;;;GAMG;;ACNH;;;;;;GAMG;;ACNH;;;;;;GAMG;;;;"}
1
+ {"version":3,"file":"checkbox__testing.js","sources":["../../../../../../src/material/checkbox/testing/checkbox-harness.ts","../../../../../../src/material/checkbox/testing/checkbox-harness-filters.ts","../../../../../../src/material/checkbox/testing/public-api.ts","../../../../../../src/material/checkbox/testing/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {ComponentHarness, HarnessPredicate} from '@angular/cdk/testing';\nimport {CheckboxHarnessFilters} from './checkbox-harness-filters';\n\n/** Harness for interacting with a standard mat-checkbox in tests. */\nexport class MatCheckboxHarness extends ComponentHarness {\n /** The selector for the host element of a `MatCheckbox` instance. */\n static hostSelector = '.mat-checkbox';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a `MatCheckboxHarness` that meets\n * certain criteria.\n * @param options Options for filtering which checkbox instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with(options: CheckboxHarnessFilters = {}): HarnessPredicate<MatCheckboxHarness> {\n return new HarnessPredicate(MatCheckboxHarness, options)\n .addOption(\n 'label', options.label,\n (harness, label) => HarnessPredicate.stringMatches(harness.getLabelText(), label))\n // We want to provide a filter option for \"name\" because the name of the checkbox is\n // only set on the underlying input. This means that it's not possible for developers\n // to retrieve the harness of a specific checkbox with name through a CSS selector.\n .addOption('name', options.name, async (harness, name) => await harness.getName() === name);\n }\n\n private _label = this.locatorFor('.mat-checkbox-label');\n private _input = this.locatorFor('input');\n private _inputContainer = this.locatorFor('.mat-checkbox-inner-container');\n\n /** Whether the checkbox is checked. */\n async isChecked(): Promise<boolean> {\n const checked = (await this._input()).getProperty('checked');\n return coerceBooleanProperty(await checked);\n }\n\n /** Whether the checkbox is in an indeterminate state. */\n async isIndeterminate(): Promise<boolean> {\n const indeterminate = (await this._input()).getProperty('indeterminate');\n return coerceBooleanProperty(await indeterminate);\n }\n\n /** Whether the checkbox is disabled. */\n async isDisabled(): Promise<boolean> {\n const disabled = (await this._input()).getAttribute('disabled');\n return coerceBooleanProperty(await disabled);\n }\n\n /** Whether the checkbox is required. */\n async isRequired(): Promise<boolean> {\n const required = (await this._input()).getProperty('required');\n return coerceBooleanProperty(await required);\n }\n\n /** Whether the checkbox is valid. */\n async isValid(): Promise<boolean> {\n const invalid = (await this.host()).hasClass('ng-invalid');\n return !(await invalid);\n }\n\n /** Gets the checkbox's name. */\n async getName(): Promise<string|null> {\n return (await this._input()).getAttribute('name');\n }\n\n /** Gets the checkbox's value. */\n async getValue(): Promise<string|null> {\n return (await this._input()).getProperty('value');\n }\n\n /** Gets the checkbox's aria-label. */\n async getAriaLabel(): Promise<string|null> {\n return (await this._input()).getAttribute('aria-label');\n }\n\n /** Gets the checkbox's aria-labelledby. */\n async getAriaLabelledby(): Promise<string|null> {\n return (await this._input()).getAttribute('aria-labelledby');\n }\n\n /** Gets the checkbox's label text. */\n async getLabelText(): Promise<string> {\n return (await this._label()).text();\n }\n\n /** Focuses the checkbox. */\n async focus(): Promise<void> {\n return (await this._input()).focus();\n }\n\n /** Blurs the checkbox. */\n async blur(): Promise<void> {\n return (await this._input()).blur();\n }\n\n /** Whether the checkbox is focused. */\n async isFocused(): Promise<boolean> {\n return (await this._input()).isFocused();\n }\n\n /**\n * Toggles the checked state of the checkbox.\n *\n * Note: This attempts to toggle the checkbox as a user would, by clicking it. Therefore if you\n * are using `MAT_CHECKBOX_DEFAULT_OPTIONS` to change the behavior on click, calling this method\n * might not have the expected result.\n */\n async toggle(): Promise<void> {\n return (await this._inputContainer()).click();\n }\n\n /**\n * Puts the checkbox in a checked state by toggling it if it is currently unchecked, or doing\n * nothing if it is already checked.\n *\n * Note: This attempts to check the checkbox as a user would, by clicking it. Therefore if you\n * are using `MAT_CHECKBOX_DEFAULT_OPTIONS` to change the behavior on click, calling this method\n * might not have the expected result.\n */\n async check(): Promise<void> {\n if (!(await this.isChecked())) {\n await this.toggle();\n }\n }\n\n /**\n * Puts the checkbox in an unchecked state by toggling it if it is currently checked, or doing\n * nothing if it is already unchecked.\n *\n * Note: This attempts to uncheck the checkbox as a user would, by clicking it. Therefore if you\n * are using `MAT_CHECKBOX_DEFAULT_OPTIONS` to change the behavior on click, calling this method\n * might not have the expected result.\n */\n async uncheck(): Promise<void> {\n if (await this.isChecked()) {\n await this.toggle();\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {BaseHarnessFilters} from '@angular/cdk/testing';\n\n/** A set of criteria that can be used to filter a list of `MatCheckboxHarness` instances. */\nexport interface CheckboxHarnessFilters extends BaseHarnessFilters {\n /** Only find instances whose label matches the given value. */\n label?: string | RegExp;\n /** Only find instances whose name attribute is the given value. */\n name?: string;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './checkbox-harness';\nexport * from './checkbox-harness-filters';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;AAAA;;;;;;;AAYA;AACA,MAAa,kBAAmB,SAAQ,gBAAgB;IAAxD;;QAqBU,WAAM,GAAG,IAAI,CAAC,UAAU,CAAC,qBAAqB,CAAC,CAAC;QAChD,WAAM,GAAG,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;QAClC,oBAAe,GAAG,IAAI,CAAC,UAAU,CAAC,+BAA+B,CAAC,CAAC;KA8G5E;;;;;;;IA3HC,OAAO,IAAI,CAAC,UAAkC,EAAE;QAC9C,OAAO,IAAI,gBAAgB,CAAC,kBAAkB,EAAE,OAAO,CAAC;aACnD,SAAS,CACN,OAAO,EAAE,OAAO,CAAC,KAAK,EACtB,CAAC,OAAO,EAAE,KAAK,KAAK,gBAAgB,CAAC,aAAa,CAAC,OAAO,CAAC,YAAY,EAAE,EAAE,KAAK,CAAC,CAAC;;;;aAIrF,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,EAAE,CAAO,OAAO,EAAE,IAAI,oDAAK,OAAA,CAAA,MAAM,OAAO,CAAC,OAAO,EAAE,MAAK,IAAI,CAAA,GAAA,CAAC,CAAC;KACjG;;IAOK,SAAS;;YACb,MAAM,OAAO,GAAG,CAAC,MAAM,IAAI,CAAC,MAAM,EAAE,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC;YAC7D,OAAO,qBAAqB,CAAC,MAAM,OAAO,CAAC,CAAC;SAC7C;KAAA;;IAGK,eAAe;;YACnB,MAAM,aAAa,GAAG,CAAC,MAAM,IAAI,CAAC,MAAM,EAAE,EAAE,WAAW,CAAC,eAAe,CAAC,CAAC;YACzE,OAAO,qBAAqB,CAAC,MAAM,aAAa,CAAC,CAAC;SACnD;KAAA;;IAGK,UAAU;;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C;SACrC;KAAA;;IAGK,SAAS;;YACb,OAAO,CAAC,MAAM,IAAI,CAAC,MAAM,EAAE,EAAE,SAAS,EAAE,CAAC;SAC1C;KAAA;;;;;;;;IASK,MAAM;;YACV,OAAO,CAAC,MAAM,IAAI,CAAC,eAAe,EAAE,EAAE,KAAK,EAAE,CAAC;SAC/C;KAAA;;;;;;;;;IAUK,KAAK;;YACT,IAAI,EAAE,MAAM,IAAI,CAAC,SAAS,EAAE,CAAC,EAAE;gBAC7B,MAAM,IAAI,CAAC,MAAM,EAAE,CAAC;aACrB;SACF;KAAA;;;;;;;;;IAUK,OAAO;;YACX,IAAI,MAAM,IAAI,CAAC,SAAS,EAAE,EAAE;gBAC1B,MAAM,IAAI,CAAC,MAAM,EAAE,CAAC;aACrB;SACF;KAAA;;;AAlIM,+BAAY,GAAG,eAAe,CAAC;;ACfxC;;;;;;GAMG;;ACNH;;;;;;GAMG;;ACNH;;;;;;GAMG;;;;"}
@@ -35,6 +35,8 @@ function MAT_CHECKBOX_DEFAULT_OPTIONS_FACTORY() {
35
35
  */
36
36
  // Increasing integer for generating unique ids for checkbox components.
37
37
  let nextUniqueId = 0;
38
+ // Default checkbox configuration.
39
+ const defaults = MAT_CHECKBOX_DEFAULT_OPTIONS_FACTORY();
38
40
  /**
39
41
  * Provider Expression that allows mat-checkbox to register as a ControlValueAccessor.
40
42
  * This allows it to support [(ngModel)].
@@ -103,10 +105,8 @@ class MatCheckbox extends _MatCheckboxMixinBase {
103
105
  this._checked = false;
104
106
  this._disabled = false;
105
107
  this._indeterminate = false;
106
- this._options = this._options || {};
107
- if (this._options.color) {
108
- this.color = this.defaultColor = this._options.color;
109
- }
108
+ this._options = this._options || defaults;
109
+ this.color = this.defaultColor = this._options.color || defaults.color;
110
110
  this.tabIndex = parseInt(tabIndex) || 0;
111
111
  }
112
112
  /** Returns the unique id for the visual hidden input. */
@@ -349,7 +349,7 @@ class MatCheckbox extends _MatCheckboxMixinBase {
349
349
  MatCheckbox.decorators = [
350
350
  { type: Component, args: [{
351
351
  selector: 'mat-checkbox',
352
- template: "<label [attr.for]=\"inputId\" class=\"mat-checkbox-layout\" #label>\n <div class=\"mat-checkbox-inner-container\"\n [class.mat-checkbox-inner-container-no-side-margin]=\"!checkboxLabel.textContent || !checkboxLabel.textContent.trim()\">\n <input #input\n class=\"mat-checkbox-input cdk-visually-hidden\" type=\"checkbox\"\n [id]=\"inputId\"\n [required]=\"required\"\n [checked]=\"checked\"\n [attr.value]=\"value\"\n [disabled]=\"disabled\"\n [attr.name]=\"name\"\n [tabIndex]=\"tabIndex\"\n [attr.aria-label]=\"ariaLabel || null\"\n [attr.aria-labelledby]=\"ariaLabelledby\"\n [attr.aria-checked]=\"_getAriaChecked()\"\n [attr.aria-describedby]=\"ariaDescribedby\"\n (change)=\"_onInteractionEvent($event)\"\n (click)=\"_onInputClick($event)\">\n <div matRipple class=\"mat-checkbox-ripple mat-focus-indicator\"\n [matRippleTrigger]=\"label\"\n [matRippleDisabled]=\"_isRippleDisabled()\"\n [matRippleRadius]=\"20\"\n [matRippleCentered]=\"true\"\n [matRippleAnimation]=\"{enterDuration: 150}\">\n <div class=\"mat-ripple-element mat-checkbox-persistent-ripple\"></div>\n </div>\n <div class=\"mat-checkbox-frame\"></div>\n <div class=\"mat-checkbox-background\">\n <svg version=\"1.1\"\n focusable=\"false\"\n class=\"mat-checkbox-checkmark\"\n viewBox=\"0 0 24 24\"\n xml:space=\"preserve\">\n <path class=\"mat-checkbox-checkmark-path\"\n fill=\"none\"\n stroke=\"white\"\n d=\"M4.1,12.7 9,17.6 20.3,6.3\"/>\n </svg>\n <!-- Element for rendering the indeterminate state checkbox. -->\n <div class=\"mat-checkbox-mixedmark\"></div>\n </div>\n </div>\n <span class=\"mat-checkbox-label\" #checkboxLabel (cdkObserveContent)=\"_onLabelTextChange()\">\n <!-- Add an invisible span so JAWS can read the label -->\n <span style=\"display:none\">&nbsp;</span>\n <ng-content></ng-content>\n </span>\n</label>\n",
352
+ template: "<label [attr.for]=\"inputId\" class=\"mat-checkbox-layout\" #label>\n <span class=\"mat-checkbox-inner-container\"\n [class.mat-checkbox-inner-container-no-side-margin]=\"!checkboxLabel.textContent || !checkboxLabel.textContent.trim()\">\n <input #input\n class=\"mat-checkbox-input cdk-visually-hidden\" type=\"checkbox\"\n [id]=\"inputId\"\n [required]=\"required\"\n [checked]=\"checked\"\n [attr.value]=\"value\"\n [disabled]=\"disabled\"\n [attr.name]=\"name\"\n [tabIndex]=\"tabIndex\"\n [attr.aria-label]=\"ariaLabel || null\"\n [attr.aria-labelledby]=\"ariaLabelledby\"\n [attr.aria-checked]=\"_getAriaChecked()\"\n [attr.aria-describedby]=\"ariaDescribedby\"\n (change)=\"_onInteractionEvent($event)\"\n (click)=\"_onInputClick($event)\">\n <span matRipple class=\"mat-checkbox-ripple mat-focus-indicator\"\n [matRippleTrigger]=\"label\"\n [matRippleDisabled]=\"_isRippleDisabled()\"\n [matRippleRadius]=\"20\"\n [matRippleCentered]=\"true\"\n [matRippleAnimation]=\"{enterDuration: 150}\">\n <span class=\"mat-ripple-element mat-checkbox-persistent-ripple\"></span>\n </span>\n <span class=\"mat-checkbox-frame\"></span>\n <span class=\"mat-checkbox-background\">\n <svg version=\"1.1\"\n focusable=\"false\"\n class=\"mat-checkbox-checkmark\"\n viewBox=\"0 0 24 24\"\n xml:space=\"preserve\">\n <path class=\"mat-checkbox-checkmark-path\"\n fill=\"none\"\n stroke=\"white\"\n d=\"M4.1,12.7 9,17.6 20.3,6.3\"/>\n </svg>\n <!-- Element for rendering the indeterminate state checkbox. -->\n <span class=\"mat-checkbox-mixedmark\"></span>\n </span>\n </span>\n <span class=\"mat-checkbox-label\" #checkboxLabel (cdkObserveContent)=\"_onLabelTextChange()\">\n <!-- Add an invisible span so JAWS can read the label -->\n <span style=\"display:none\">&nbsp;</span>\n <ng-content></ng-content>\n </span>\n</label>\n",
353
353
  exportAs: 'matCheckbox',
354
354
  host: {
355
355
  'class': 'mat-checkbox',
@@ -365,7 +365,7 @@ MatCheckbox.decorators = [
365
365
  inputs: ['disableRipple', 'color', 'tabIndex'],
366
366
  encapsulation: ViewEncapsulation.None,
367
367
  changeDetection: ChangeDetectionStrategy.OnPush,
368
- styles: ["@keyframes mat-checkbox-fade-in-background{0%{opacity:0}50%{opacity:1}}@keyframes mat-checkbox-fade-out-background{0%,50%{opacity:1}100%{opacity:0}}@keyframes mat-checkbox-unchecked-checked-checkmark-path{0%,50%{stroke-dashoffset:22.910259}50%{animation-timing-function:cubic-bezier(0, 0, 0.2, 0.1)}100%{stroke-dashoffset:0}}@keyframes mat-checkbox-unchecked-indeterminate-mixedmark{0%,68.2%{transform:scaleX(0)}68.2%{animation-timing-function:cubic-bezier(0, 0, 0, 1)}100%{transform:scaleX(1)}}@keyframes mat-checkbox-checked-unchecked-checkmark-path{from{animation-timing-function:cubic-bezier(0.4, 0, 1, 1);stroke-dashoffset:0}to{stroke-dashoffset:-22.910259}}@keyframes mat-checkbox-checked-indeterminate-checkmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 0.1);opacity:1;transform:rotate(0deg)}to{opacity:0;transform:rotate(45deg)}}@keyframes mat-checkbox-indeterminate-checked-checkmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);opacity:0;transform:rotate(45deg)}to{opacity:1;transform:rotate(360deg)}}@keyframes mat-checkbox-checked-indeterminate-mixedmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 0.1);opacity:0;transform:rotate(-45deg)}to{opacity:1;transform:rotate(0deg)}}@keyframes mat-checkbox-indeterminate-checked-mixedmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);opacity:1;transform:rotate(0deg)}to{opacity:0;transform:rotate(315deg)}}@keyframes mat-checkbox-indeterminate-unchecked-mixedmark{0%{animation-timing-function:linear;opacity:1;transform:scaleX(1)}32.8%,100%{opacity:0;transform:scaleX(0)}}.mat-checkbox-background,.mat-checkbox-frame{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:2px;box-sizing:border-box;pointer-events:none}.mat-checkbox{display:inline-block;transition:background 400ms cubic-bezier(0.25, 0.8, 0.25, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);cursor:pointer;-webkit-tap-highlight-color:transparent}._mat-animation-noopable.mat-checkbox{transition:none;animation:none}.mat-checkbox .mat-ripple-element:not(.mat-checkbox-persistent-ripple){opacity:.16}.mat-checkbox-layout{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:inherit;align-items:baseline;vertical-align:middle;display:inline-flex;white-space:nowrap}.mat-checkbox-label{-webkit-user-select:auto;-moz-user-select:auto;-ms-user-select:auto;user-select:auto}.mat-checkbox-inner-container{display:inline-block;height:16px;line-height:0;margin:auto;margin-right:8px;order:0;position:relative;vertical-align:middle;white-space:nowrap;width:16px;flex-shrink:0}[dir=rtl] .mat-checkbox-inner-container{margin-left:8px;margin-right:auto}.mat-checkbox-inner-container-no-side-margin{margin-left:0;margin-right:0}.mat-checkbox-frame{background-color:transparent;transition:border-color 90ms cubic-bezier(0, 0, 0.2, 0.1);border-width:2px;border-style:solid}._mat-animation-noopable .mat-checkbox-frame{transition:none}.cdk-high-contrast-active .mat-checkbox.cdk-keyboard-focused .mat-checkbox-frame{border-style:dotted}.mat-checkbox-background{align-items:center;display:inline-flex;justify-content:center;transition:background-color 90ms cubic-bezier(0, 0, 0.2, 0.1),opacity 90ms cubic-bezier(0, 0, 0.2, 0.1)}._mat-animation-noopable .mat-checkbox-background{transition:none}.cdk-high-contrast-active .mat-checkbox .mat-checkbox-background{background:none}.mat-checkbox-persistent-ripple{width:100%;height:100%;transform:none}.mat-checkbox-inner-container:hover .mat-checkbox-persistent-ripple{opacity:.04}.mat-checkbox.cdk-keyboard-focused .mat-checkbox-persistent-ripple{opacity:.12}.mat-checkbox-persistent-ripple,.mat-checkbox.mat-checkbox-disabled .mat-checkbox-inner-container:hover .mat-checkbox-persistent-ripple{opacity:0}@media(hover: none){.mat-checkbox-inner-container:hover .mat-checkbox-persistent-ripple{display:none}}.mat-checkbox-checkmark{top:0;left:0;right:0;bottom:0;position:absolute;width:100%}.mat-checkbox-checkmark-path{stroke-dashoffset:22.910259;stroke-dasharray:22.910259;stroke-width:2.1333333333px}.cdk-high-contrast-black-on-white .mat-checkbox-checkmark-path{stroke:#000 !important}.mat-checkbox-mixedmark{width:calc(100% - 6px);height:2px;opacity:0;transform:scaleX(0) rotate(0deg);border-radius:2px}.cdk-high-contrast-active .mat-checkbox-mixedmark{height:0;border-top:solid 2px;margin-top:2px}.mat-checkbox-label-before .mat-checkbox-inner-container{order:1;margin-left:8px;margin-right:auto}[dir=rtl] .mat-checkbox-label-before .mat-checkbox-inner-container{margin-left:auto;margin-right:8px}.mat-checkbox-checked .mat-checkbox-checkmark{opacity:1}.mat-checkbox-checked .mat-checkbox-checkmark-path{stroke-dashoffset:0}.mat-checkbox-checked .mat-checkbox-mixedmark{transform:scaleX(1) rotate(-45deg)}.mat-checkbox-indeterminate .mat-checkbox-checkmark{opacity:0;transform:rotate(45deg)}.mat-checkbox-indeterminate .mat-checkbox-checkmark-path{stroke-dashoffset:0}.mat-checkbox-indeterminate .mat-checkbox-mixedmark{opacity:1;transform:scaleX(1) rotate(0deg)}.mat-checkbox-unchecked .mat-checkbox-background{background-color:transparent}.mat-checkbox-disabled{cursor:default}.cdk-high-contrast-active .mat-checkbox-disabled{opacity:.5}.mat-checkbox-anim-unchecked-checked .mat-checkbox-background{animation:180ms linear 0ms mat-checkbox-fade-in-background}.mat-checkbox-anim-unchecked-checked .mat-checkbox-checkmark-path{animation:180ms linear 0ms mat-checkbox-unchecked-checked-checkmark-path}.mat-checkbox-anim-unchecked-indeterminate .mat-checkbox-background{animation:180ms linear 0ms mat-checkbox-fade-in-background}.mat-checkbox-anim-unchecked-indeterminate .mat-checkbox-mixedmark{animation:90ms linear 0ms mat-checkbox-unchecked-indeterminate-mixedmark}.mat-checkbox-anim-checked-unchecked .mat-checkbox-background{animation:180ms linear 0ms mat-checkbox-fade-out-background}.mat-checkbox-anim-checked-unchecked .mat-checkbox-checkmark-path{animation:90ms linear 0ms mat-checkbox-checked-unchecked-checkmark-path}.mat-checkbox-anim-checked-indeterminate .mat-checkbox-checkmark{animation:90ms linear 0ms mat-checkbox-checked-indeterminate-checkmark}.mat-checkbox-anim-checked-indeterminate .mat-checkbox-mixedmark{animation:90ms linear 0ms mat-checkbox-checked-indeterminate-mixedmark}.mat-checkbox-anim-indeterminate-checked .mat-checkbox-checkmark{animation:500ms linear 0ms mat-checkbox-indeterminate-checked-checkmark}.mat-checkbox-anim-indeterminate-checked .mat-checkbox-mixedmark{animation:500ms linear 0ms mat-checkbox-indeterminate-checked-mixedmark}.mat-checkbox-anim-indeterminate-unchecked .mat-checkbox-background{animation:180ms linear 0ms mat-checkbox-fade-out-background}.mat-checkbox-anim-indeterminate-unchecked .mat-checkbox-mixedmark{animation:300ms linear 0ms mat-checkbox-indeterminate-unchecked-mixedmark}.mat-checkbox-input{bottom:0;left:50%}.mat-checkbox .mat-checkbox-ripple{position:absolute;left:calc(50% - 20px);top:calc(50% - 20px);height:40px;width:40px;z-index:1;pointer-events:none}\n"]
368
+ styles: ["@keyframes mat-checkbox-fade-in-background{0%{opacity:0}50%{opacity:1}}@keyframes mat-checkbox-fade-out-background{0%,50%{opacity:1}100%{opacity:0}}@keyframes mat-checkbox-unchecked-checked-checkmark-path{0%,50%{stroke-dashoffset:22.910259}50%{animation-timing-function:cubic-bezier(0, 0, 0.2, 0.1)}100%{stroke-dashoffset:0}}@keyframes mat-checkbox-unchecked-indeterminate-mixedmark{0%,68.2%{transform:scaleX(0)}68.2%{animation-timing-function:cubic-bezier(0, 0, 0, 1)}100%{transform:scaleX(1)}}@keyframes mat-checkbox-checked-unchecked-checkmark-path{from{animation-timing-function:cubic-bezier(0.4, 0, 1, 1);stroke-dashoffset:0}to{stroke-dashoffset:-22.910259}}@keyframes mat-checkbox-checked-indeterminate-checkmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 0.1);opacity:1;transform:rotate(0deg)}to{opacity:0;transform:rotate(45deg)}}@keyframes mat-checkbox-indeterminate-checked-checkmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);opacity:0;transform:rotate(45deg)}to{opacity:1;transform:rotate(360deg)}}@keyframes mat-checkbox-checked-indeterminate-mixedmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 0.1);opacity:0;transform:rotate(-45deg)}to{opacity:1;transform:rotate(0deg)}}@keyframes mat-checkbox-indeterminate-checked-mixedmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);opacity:1;transform:rotate(0deg)}to{opacity:0;transform:rotate(315deg)}}@keyframes mat-checkbox-indeterminate-unchecked-mixedmark{0%{animation-timing-function:linear;opacity:1;transform:scaleX(1)}32.8%,100%{opacity:0;transform:scaleX(0)}}.mat-checkbox-background,.mat-checkbox-frame{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:2px;box-sizing:border-box;pointer-events:none}.mat-checkbox{display:inline-block;transition:background 400ms cubic-bezier(0.25, 0.8, 0.25, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);cursor:pointer;-webkit-tap-highlight-color:transparent}._mat-animation-noopable.mat-checkbox{transition:none;animation:none}.mat-checkbox .mat-ripple-element:not(.mat-checkbox-persistent-ripple){opacity:.16}.mat-checkbox-layout{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:inherit;align-items:baseline;vertical-align:middle;display:inline-flex;white-space:nowrap}.mat-checkbox-label{-webkit-user-select:auto;-moz-user-select:auto;-ms-user-select:auto;user-select:auto}.mat-checkbox-inner-container{display:inline-block;height:16px;line-height:0;margin:auto;margin-right:8px;order:0;position:relative;vertical-align:middle;white-space:nowrap;width:16px;flex-shrink:0}[dir=rtl] .mat-checkbox-inner-container{margin-left:8px;margin-right:auto}.mat-checkbox-inner-container-no-side-margin{margin-left:0;margin-right:0}.mat-checkbox-frame{background-color:transparent;transition:border-color 90ms cubic-bezier(0, 0, 0.2, 0.1);border-width:2px;border-style:solid}._mat-animation-noopable .mat-checkbox-frame{transition:none}.cdk-high-contrast-active .mat-checkbox.cdk-keyboard-focused .mat-checkbox-frame{border-style:dotted}.mat-checkbox-background{align-items:center;display:inline-flex;justify-content:center;transition:background-color 90ms cubic-bezier(0, 0, 0.2, 0.1),opacity 90ms cubic-bezier(0, 0, 0.2, 0.1)}._mat-animation-noopable .mat-checkbox-background{transition:none}.cdk-high-contrast-active .mat-checkbox .mat-checkbox-background{background:none}.mat-checkbox-persistent-ripple{display:block;width:100%;height:100%;transform:none}.mat-checkbox-inner-container:hover .mat-checkbox-persistent-ripple{opacity:.04}.mat-checkbox.cdk-keyboard-focused .mat-checkbox-persistent-ripple{opacity:.12}.mat-checkbox-persistent-ripple,.mat-checkbox.mat-checkbox-disabled .mat-checkbox-inner-container:hover .mat-checkbox-persistent-ripple{opacity:0}@media(hover: none){.mat-checkbox-inner-container:hover .mat-checkbox-persistent-ripple{display:none}}.mat-checkbox-checkmark{top:0;left:0;right:0;bottom:0;position:absolute;width:100%}.mat-checkbox-checkmark-path{stroke-dashoffset:22.910259;stroke-dasharray:22.910259;stroke-width:2.1333333333px}.cdk-high-contrast-black-on-white .mat-checkbox-checkmark-path{stroke:#000 !important}.mat-checkbox-mixedmark{width:calc(100% - 6px);height:2px;opacity:0;transform:scaleX(0) rotate(0deg);border-radius:2px}.cdk-high-contrast-active .mat-checkbox-mixedmark{height:0;border-top:solid 2px;margin-top:2px}.mat-checkbox-label-before .mat-checkbox-inner-container{order:1;margin-left:8px;margin-right:auto}[dir=rtl] .mat-checkbox-label-before .mat-checkbox-inner-container{margin-left:auto;margin-right:8px}.mat-checkbox-checked .mat-checkbox-checkmark{opacity:1}.mat-checkbox-checked .mat-checkbox-checkmark-path{stroke-dashoffset:0}.mat-checkbox-checked .mat-checkbox-mixedmark{transform:scaleX(1) rotate(-45deg)}.mat-checkbox-indeterminate .mat-checkbox-checkmark{opacity:0;transform:rotate(45deg)}.mat-checkbox-indeterminate .mat-checkbox-checkmark-path{stroke-dashoffset:0}.mat-checkbox-indeterminate .mat-checkbox-mixedmark{opacity:1;transform:scaleX(1) rotate(0deg)}.mat-checkbox-unchecked .mat-checkbox-background{background-color:transparent}.mat-checkbox-disabled{cursor:default}.cdk-high-contrast-active .mat-checkbox-disabled{opacity:.5}.mat-checkbox-anim-unchecked-checked .mat-checkbox-background{animation:180ms linear 0ms mat-checkbox-fade-in-background}.mat-checkbox-anim-unchecked-checked .mat-checkbox-checkmark-path{animation:180ms linear 0ms mat-checkbox-unchecked-checked-checkmark-path}.mat-checkbox-anim-unchecked-indeterminate .mat-checkbox-background{animation:180ms linear 0ms mat-checkbox-fade-in-background}.mat-checkbox-anim-unchecked-indeterminate .mat-checkbox-mixedmark{animation:90ms linear 0ms mat-checkbox-unchecked-indeterminate-mixedmark}.mat-checkbox-anim-checked-unchecked .mat-checkbox-background{animation:180ms linear 0ms mat-checkbox-fade-out-background}.mat-checkbox-anim-checked-unchecked .mat-checkbox-checkmark-path{animation:90ms linear 0ms mat-checkbox-checked-unchecked-checkmark-path}.mat-checkbox-anim-checked-indeterminate .mat-checkbox-checkmark{animation:90ms linear 0ms mat-checkbox-checked-indeterminate-checkmark}.mat-checkbox-anim-checked-indeterminate .mat-checkbox-mixedmark{animation:90ms linear 0ms mat-checkbox-checked-indeterminate-mixedmark}.mat-checkbox-anim-indeterminate-checked .mat-checkbox-checkmark{animation:500ms linear 0ms mat-checkbox-indeterminate-checked-checkmark}.mat-checkbox-anim-indeterminate-checked .mat-checkbox-mixedmark{animation:500ms linear 0ms mat-checkbox-indeterminate-checked-mixedmark}.mat-checkbox-anim-indeterminate-unchecked .mat-checkbox-background{animation:180ms linear 0ms mat-checkbox-fade-out-background}.mat-checkbox-anim-indeterminate-unchecked .mat-checkbox-mixedmark{animation:300ms linear 0ms mat-checkbox-indeterminate-unchecked-mixedmark}.mat-checkbox-input{bottom:0;left:50%}.mat-checkbox .mat-checkbox-ripple{position:absolute;left:calc(50% - 20px);top:calc(50% - 20px);height:40px;width:40px;z-index:1;pointer-events:none}\n"]
369
369
  },] }
370
370
  ];
371
371
  MatCheckbox.ctorParameters = () => [
@@ -1 +1 @@
1
- {"version":3,"file":"checkbox.js","sources":["../../../../../../src/material/checkbox/checkbox-config.ts","../../../../../../src/material/checkbox/checkbox.ts","../../../../../../src/material/checkbox/checkbox-required-validator.ts","../../../../../../src/material/checkbox/checkbox-module.ts","../../../../../../src/material/checkbox/public-api.ts","../../../../../../src/material/checkbox/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {InjectionToken} from '@angular/core';\nimport {ThemePalette} from '@angular/material/core';\n\n/** Default `mat-checkbox` options that can be overridden. */\nexport interface MatCheckboxDefaultOptions {\n color?: ThemePalette;\n clickAction?: MatCheckboxClickAction;\n}\n\n/** Injection token to be used to override the default options for `mat-checkbox`. */\nexport const MAT_CHECKBOX_DEFAULT_OPTIONS =\n new InjectionToken<MatCheckboxDefaultOptions>('mat-checkbox-default-options', {\n providedIn: 'root',\n factory: MAT_CHECKBOX_DEFAULT_OPTIONS_FACTORY\n });\n\n/** @docs-private */\nexport function MAT_CHECKBOX_DEFAULT_OPTIONS_FACTORY(): MatCheckboxDefaultOptions {\n return {\n color: 'accent',\n clickAction: 'check-indeterminate',\n };\n}\n\n/**\n * Checkbox click action when user click on input element.\n * noop: Do not toggle checked or indeterminate.\n * check: Only toggle checked status, ignore indeterminate.\n * check-indeterminate: Toggle checked status, set indeterminate to false. Default behavior.\n * undefined: Same as `check-indeterminate`.\n */\nexport type MatCheckboxClickAction = 'noop' | 'check' | 'check-indeterminate' | undefined;\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {FocusableOption, FocusMonitor, FocusOrigin} from '@angular/cdk/a11y';\nimport {BooleanInput, coerceBooleanProperty, NumberInput} from '@angular/cdk/coercion';\nimport {\n AfterViewChecked,\n Attribute,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n forwardRef,\n Inject,\n Input,\n NgZone,\n OnDestroy,\n Optional,\n Output,\n ViewChild,\n ViewEncapsulation,\n AfterViewInit,\n} from '@angular/core';\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from '@angular/forms';\nimport {\n CanColor,\n CanColorCtor,\n CanDisable,\n CanDisableCtor,\n CanDisableRipple,\n CanDisableRippleCtor,\n HasTabIndex,\n HasTabIndexCtor,\n MatRipple,\n mixinColor,\n mixinDisabled,\n mixinDisableRipple,\n mixinTabIndex,\n} from '@angular/material/core';\nimport {ANIMATION_MODULE_TYPE} from '@angular/platform-browser/animations';\nimport {\n MAT_CHECKBOX_DEFAULT_OPTIONS,\n MatCheckboxDefaultOptions\n} from './checkbox-config';\n\n\n// Increasing integer for generating unique ids for checkbox components.\nlet nextUniqueId = 0;\n\n/**\n * Provider Expression that allows mat-checkbox to register as a ControlValueAccessor.\n * This allows it to support [(ngModel)].\n * @docs-private\n */\nexport const MAT_CHECKBOX_CONTROL_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => MatCheckbox),\n multi: true\n};\n\n/**\n * Represents the different states that require custom transitions between them.\n * @docs-private\n */\nexport const enum TransitionCheckState {\n /** The initial state of the component before any user interaction. */\n Init,\n /** The state representing the component when it's becoming checked. */\n Checked,\n /** The state representing the component when it's becoming unchecked. */\n Unchecked,\n /** The state representing the component when it's becoming indeterminate. */\n Indeterminate\n}\n\n/** Change event object emitted by MatCheckbox. */\nexport class MatCheckboxChange {\n /** The source MatCheckbox of the event. */\n source: MatCheckbox;\n /** The new `checked` value of the checkbox. */\n checked: boolean;\n}\n\n// Boilerplate for applying mixins to MatCheckbox.\n/** @docs-private */\nclass MatCheckboxBase {\n constructor(public _elementRef: ElementRef) {}\n}\nconst _MatCheckboxMixinBase:\n HasTabIndexCtor &\n CanColorCtor &\n CanDisableRippleCtor &\n CanDisableCtor &\n typeof MatCheckboxBase =\n mixinTabIndex(mixinColor(mixinDisableRipple(mixinDisabled(MatCheckboxBase))));\n\n\n/**\n * A material design checkbox component. Supports all of the functionality of an HTML5 checkbox,\n * and exposes a similar API. A MatCheckbox can be either checked, unchecked, indeterminate, or\n * disabled. Note that all additional accessibility attributes are taken care of by the component,\n * so there is no need to provide them yourself. However, if you want to omit a label and still\n * have the checkbox be accessible, you may supply an [aria-label] input.\n * See: https://material.io/design/components/selection-controls.html\n */\n@Component({\n selector: 'mat-checkbox',\n templateUrl: 'checkbox.html',\n styleUrls: ['checkbox.css'],\n exportAs: 'matCheckbox',\n host: {\n 'class': 'mat-checkbox',\n '[id]': 'id',\n '[attr.tabindex]': 'null',\n '[class.mat-checkbox-indeterminate]': 'indeterminate',\n '[class.mat-checkbox-checked]': 'checked',\n '[class.mat-checkbox-disabled]': 'disabled',\n '[class.mat-checkbox-label-before]': 'labelPosition == \"before\"',\n '[class._mat-animation-noopable]': `_animationMode === 'NoopAnimations'`,\n },\n providers: [MAT_CHECKBOX_CONTROL_VALUE_ACCESSOR],\n inputs: ['disableRipple', 'color', 'tabIndex'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class MatCheckbox extends _MatCheckboxMixinBase implements ControlValueAccessor,\n AfterViewInit, AfterViewChecked, OnDestroy, CanColor, CanDisable, HasTabIndex, CanDisableRipple,\n FocusableOption {\n\n /**\n * Attached to the aria-label attribute of the host element. In most cases, aria-labelledby will\n * take precedence so this may be omitted.\n */\n @Input('aria-label') ariaLabel: string = '';\n\n /**\n * Users can specify the `aria-labelledby` attribute which will be forwarded to the input element\n */\n @Input('aria-labelledby') ariaLabelledby: string | null = null;\n\n /** The 'aria-describedby' attribute is read after the element's label and field type. */\n @Input('aria-describedby') ariaDescribedby: string;\n\n private _uniqueId: string = `mat-checkbox-${++nextUniqueId}`;\n\n /** A unique id for the checkbox input. If none is supplied, it will be auto-generated. */\n @Input() id: string = this._uniqueId;\n\n /** Returns the unique id for the visual hidden input. */\n get inputId(): string { return `${this.id || this._uniqueId}-input`; }\n\n /** Whether the checkbox is required. */\n @Input()\n get required(): boolean { return this._required; }\n set required(value: boolean) { this._required = coerceBooleanProperty(value); }\n private _required: boolean;\n\n /** Whether the label should appear after or before the checkbox. Defaults to 'after' */\n @Input() labelPosition: 'before' | 'after' = 'after';\n\n /** Name value will be applied to the input element if present */\n @Input() name: string | null = null;\n\n /** Event emitted when the checkbox's `checked` value changes. */\n @Output() readonly change: EventEmitter<MatCheckboxChange> =\n new EventEmitter<MatCheckboxChange>();\n\n /** Event emitted when the checkbox's `indeterminate` value changes. */\n @Output() readonly indeterminateChange: EventEmitter<boolean> = new EventEmitter<boolean>();\n\n /** The value attribute of the native input element */\n @Input() value: string;\n\n /** The native `<input type=\"checkbox\">` element */\n @ViewChild('input') _inputElement: ElementRef<HTMLInputElement>;\n\n /** Reference to the ripple instance of the checkbox. */\n @ViewChild(MatRipple) ripple: MatRipple;\n\n /**\n * Called when the checkbox is blurred. Needed to properly implement ControlValueAccessor.\n * @docs-private\n */\n _onTouched: () => any = () => {};\n\n private _currentAnimationClass: string = '';\n\n private _currentCheckState: TransitionCheckState = TransitionCheckState.Init;\n\n private _controlValueAccessorChangeFn: (value: any) => void = () => {};\n\n constructor(elementRef: ElementRef<HTMLElement>,\n private _changeDetectorRef: ChangeDetectorRef,\n private _focusMonitor: FocusMonitor,\n private _ngZone: NgZone,\n @Attribute('tabindex') tabIndex: string,\n @Optional() @Inject(ANIMATION_MODULE_TYPE) public _animationMode?: string,\n @Optional() @Inject(MAT_CHECKBOX_DEFAULT_OPTIONS)\n private _options?: MatCheckboxDefaultOptions) {\n super(elementRef);\n this._options = this._options || {};\n\n if (this._options.color) {\n this.color = this.defaultColor = this._options.color;\n }\n\n this.tabIndex = parseInt(tabIndex) || 0;\n }\n\n ngAfterViewInit() {\n this._focusMonitor.monitor(this._elementRef, true).subscribe(focusOrigin => {\n if (!focusOrigin) {\n // When a focused element becomes disabled, the browser *immediately* fires a blur event.\n // Angular does not expect events to be raised during change detection, so any state change\n // (such as a form control's 'ng-touched') will cause a changed-after-checked error.\n // See https://github.com/angular/angular/issues/17793. To work around this, we defer\n // telling the form control it has been touched until the next tick.\n Promise.resolve().then(() => {\n this._onTouched();\n this._changeDetectorRef.markForCheck();\n });\n }\n });\n\n this._syncIndeterminate(this._indeterminate);\n }\n\n // TODO: Delete next major revision.\n ngAfterViewChecked() {}\n\n ngOnDestroy() {\n this._focusMonitor.stopMonitoring(this._elementRef);\n }\n\n /**\n * Whether the checkbox is checked.\n */\n @Input()\n get checked(): boolean { return this._checked; }\n set checked(value: boolean) {\n if (value != this.checked) {\n this._checked = value;\n this._changeDetectorRef.markForCheck();\n }\n }\n private _checked: boolean = false;\n\n /**\n * Whether the checkbox is disabled. This fully overrides the implementation provided by\n * mixinDisabled, but the mixin is still required because mixinTabIndex requires it.\n */\n @Input()\n get disabled() { return this._disabled; }\n set disabled(value: any) {\n const newValue = coerceBooleanProperty(value);\n\n if (newValue !== this.disabled) {\n this._disabled = newValue;\n this._changeDetectorRef.markForCheck();\n }\n }\n private _disabled: boolean = false;\n\n /**\n * Whether the checkbox is indeterminate. This is also known as \"mixed\" mode and can be used to\n * represent a checkbox with three states, e.g. a checkbox that represents a nested list of\n * checkable items. Note that whenever checkbox is manually clicked, indeterminate is immediately\n * set to false.\n */\n @Input()\n get indeterminate(): boolean { return this._indeterminate; }\n set indeterminate(value: boolean) {\n const changed = value != this._indeterminate;\n this._indeterminate = coerceBooleanProperty(value);\n\n if (changed) {\n if (this._indeterminate) {\n this._transitionCheckState(TransitionCheckState.Indeterminate);\n } else {\n this._transitionCheckState(\n this.checked ? TransitionCheckState.Checked : TransitionCheckState.Unchecked);\n }\n this.indeterminateChange.emit(this._indeterminate);\n }\n\n this._syncIndeterminate(this._indeterminate);\n }\n private _indeterminate: boolean = false;\n\n _isRippleDisabled() {\n return this.disableRipple || this.disabled;\n }\n\n /** Method being called whenever the label text changes. */\n _onLabelTextChange() {\n // Since the event of the `cdkObserveContent` directive runs outside of the zone, the checkbox\n // component will be only marked for check, but no actual change detection runs automatically.\n // Instead of going back into the zone in order to trigger a change detection which causes\n // *all* components to be checked (if explicitly marked or not using OnPush), we only trigger\n // an explicit change detection for the checkbox view and its children.\n this._changeDetectorRef.detectChanges();\n }\n\n // Implemented as part of ControlValueAccessor.\n writeValue(value: any) {\n this.checked = !!value;\n }\n\n // Implemented as part of ControlValueAccessor.\n registerOnChange(fn: (value: any) => void) {\n this._controlValueAccessorChangeFn = fn;\n }\n\n // Implemented as part of ControlValueAccessor.\n registerOnTouched(fn: any) {\n this._onTouched = fn;\n }\n\n // Implemented as part of ControlValueAccessor.\n setDisabledState(isDisabled: boolean) {\n this.disabled = isDisabled;\n }\n\n _getAriaChecked(): 'true' | 'false' | 'mixed' {\n if (this.checked) {\n return 'true';\n }\n\n return this.indeterminate ? 'mixed' : 'false';\n }\n\n private _transitionCheckState(newState: TransitionCheckState) {\n let oldState = this._currentCheckState;\n let element: HTMLElement = this._elementRef.nativeElement;\n\n if (oldState === newState) {\n return;\n }\n if (this._currentAnimationClass.length > 0) {\n element.classList.remove(this._currentAnimationClass);\n }\n\n this._currentAnimationClass = this._getAnimationClassForCheckStateTransition(\n oldState, newState);\n this._currentCheckState = newState;\n\n if (this._currentAnimationClass.length > 0) {\n element.classList.add(this._currentAnimationClass);\n\n // Remove the animation class to avoid animation when the checkbox is moved between containers\n const animationClass = this._currentAnimationClass;\n\n this._ngZone.runOutsideAngular(() => {\n setTimeout(() => {\n element.classList.remove(animationClass);\n }, 1000);\n });\n }\n }\n\n private _emitChangeEvent() {\n const event = new MatCheckboxChange();\n event.source = this;\n event.checked = this.checked;\n\n this._controlValueAccessorChangeFn(this.checked);\n this.change.emit(event);\n }\n\n /** Toggles the `checked` state of the checkbox. */\n toggle(): void {\n this.checked = !this.checked;\n }\n\n /**\n * Event handler for checkbox input element.\n * Toggles checked state if element is not disabled.\n * Do not toggle on (change) event since IE doesn't fire change event when\n * indeterminate checkbox is clicked.\n * @param event\n */\n _onInputClick(event: Event) {\n const clickAction = this._options?.clickAction;\n\n // We have to stop propagation for click events on the visual hidden input element.\n // By default, when a user clicks on a label element, a generated click event will be\n // dispatched on the associated input element. Since we are using a label element as our\n // root container, the click event on the `checkbox` will be executed twice.\n // The real click event will bubble up, and the generated click event also tries to bubble up.\n // This will lead to multiple click events.\n // Preventing bubbling for the second event will solve that issue.\n event.stopPropagation();\n\n // If resetIndeterminate is false, and the current state is indeterminate, do nothing on click\n if (!this.disabled && clickAction !== 'noop') {\n // When user manually click on the checkbox, `indeterminate` is set to false.\n if (this.indeterminate && clickAction !== 'check') {\n\n Promise.resolve().then(() => {\n this._indeterminate = false;\n this.indeterminateChange.emit(this._indeterminate);\n });\n }\n\n this.toggle();\n this._transitionCheckState(\n this._checked ? TransitionCheckState.Checked : TransitionCheckState.Unchecked);\n\n // Emit our custom change event if the native input emitted one.\n // It is important to only emit it, if the native input triggered one, because\n // we don't want to trigger a change event, when the `checked` variable changes for example.\n this._emitChangeEvent();\n } else if (!this.disabled && clickAction === 'noop') {\n // Reset native input when clicked with noop. The native checkbox becomes checked after\n // click, reset it to be align with `checked` value of `mat-checkbox`.\n this._inputElement.nativeElement.checked = this.checked;\n this._inputElement.nativeElement.indeterminate = this.indeterminate;\n }\n }\n\n /** Focuses the checkbox. */\n focus(origin: FocusOrigin = 'keyboard', options?: FocusOptions): void {\n this._focusMonitor.focusVia(this._inputElement, origin, options);\n }\n\n _onInteractionEvent(event: Event) {\n // We always have to stop propagation on the change event.\n // Otherwise the change event, from the input element, will bubble up and\n // emit its event object to the `change` output.\n event.stopPropagation();\n }\n\n private _getAnimationClassForCheckStateTransition(\n oldState: TransitionCheckState, newState: TransitionCheckState): string {\n // Don't transition if animations are disabled.\n if (this._animationMode === 'NoopAnimations') {\n return '';\n }\n\n let animSuffix: string = '';\n\n switch (oldState) {\n case TransitionCheckState.Init:\n // Handle edge case where user interacts with checkbox that does not have [(ngModel)] or\n // [checked] bound to it.\n if (newState === TransitionCheckState.Checked) {\n animSuffix = 'unchecked-checked';\n } else if (newState == TransitionCheckState.Indeterminate) {\n animSuffix = 'unchecked-indeterminate';\n } else {\n return '';\n }\n break;\n case TransitionCheckState.Unchecked:\n animSuffix = newState === TransitionCheckState.Checked ?\n 'unchecked-checked' : 'unchecked-indeterminate';\n break;\n case TransitionCheckState.Checked:\n animSuffix = newState === TransitionCheckState.Unchecked ?\n 'checked-unchecked' : 'checked-indeterminate';\n break;\n case TransitionCheckState.Indeterminate:\n animSuffix = newState === TransitionCheckState.Checked ?\n 'indeterminate-checked' : 'indeterminate-unchecked';\n break;\n }\n\n return `mat-checkbox-anim-${animSuffix}`;\n }\n\n /**\n * Syncs the indeterminate value with the checkbox DOM node.\n *\n * We sync `indeterminate` directly on the DOM node, because in Ivy the check for whether a\n * property is supported on an element boils down to `if (propName in element)`. Domino's\n * HTMLInputElement doesn't have an `indeterminate` property so Ivy will warn during\n * server-side rendering.\n */\n private _syncIndeterminate(value: boolean) {\n const nativeCheckbox = this._inputElement;\n\n if (nativeCheckbox) {\n nativeCheckbox.nativeElement.indeterminate = value;\n }\n }\n\n static ngAcceptInputType_disabled: BooleanInput;\n static ngAcceptInputType_required: BooleanInput;\n static ngAcceptInputType_disableRipple: BooleanInput;\n static ngAcceptInputType_indeterminate: BooleanInput;\n static ngAcceptInputType_tabIndex: NumberInput;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {\n Directive,\n forwardRef,\n Provider,\n} from '@angular/core';\nimport {\n CheckboxRequiredValidator,\n NG_VALIDATORS,\n} from '@angular/forms';\n\nexport const MAT_CHECKBOX_REQUIRED_VALIDATOR: Provider = {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => MatCheckboxRequiredValidator),\n multi: true\n};\n\n/**\n * Validator for Material checkbox's required attribute in template-driven checkbox.\n * Current CheckboxRequiredValidator only work with `input type=checkbox` and does not\n * work with `mat-checkbox`.\n */\n@Directive({\n selector: `mat-checkbox[required][formControlName],\n mat-checkbox[required][formControl], mat-checkbox[required][ngModel]`,\n providers: [MAT_CHECKBOX_REQUIRED_VALIDATOR],\n})\nexport class MatCheckboxRequiredValidator extends CheckboxRequiredValidator {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ObserversModule} from '@angular/cdk/observers';\nimport {NgModule} from '@angular/core';\nimport {MatCommonModule, MatRippleModule} from '@angular/material/core';\nimport {MatCheckbox} from './checkbox';\nimport {MatCheckboxRequiredValidator} from './checkbox-required-validator';\n\n/** This module is used by both original and MDC-based checkbox implementations. */\n@NgModule({\n exports: [MatCheckboxRequiredValidator],\n declarations: [MatCheckboxRequiredValidator],\n})\nexport class _MatCheckboxRequiredValidatorModule {\n}\n\n@NgModule({\n imports: [\n MatRippleModule, MatCommonModule, ObserversModule,\n _MatCheckboxRequiredValidatorModule\n ],\n exports: [MatCheckbox, MatCommonModule, _MatCheckboxRequiredValidatorModule],\n declarations: [MatCheckbox],\n})\nexport class MatCheckboxModule {\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './checkbox';\nexport * from './checkbox-config';\nexport * from './checkbox-module';\nexport * from './checkbox-required-validator';\n\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;AAAA;;;;;;;AAOA,AASA;AACA,MAAa,4BAA4B,GACrC,IAAI,cAAc,CAA4B,8BAA8B,EAAE;IAC5E,UAAU,EAAE,MAAM;IAClB,OAAO,EAAE,oCAAo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;gBACT,QAAQ,EAAE;kFACsE;gBAChF,SAAS,EAAE,CAAC,+BAA+B,CAAC;aAC7C;;;ACjCD;;;;;;;AAQA,AAMA;AAKA,MAAa,mCAAmC;;;YAJ/C,QAAQ,SAAC;gBACR,OAAO,EAAE,CAAC,4BAA4B,CAAC;gBACvC,YAAY,EAAE,CAAC,4BAA4B,CAAC;aAC7C;;AAYD,MAAa,iBAAiB;;;YAR7B,QAAQ,SAAC;gBACR,OAAO,EAAE;oBACP,eAAe,EAAE,eAAe,EAAE,eAAe;oBACjD,mCAAmC;iBACpC;gBACD,OAAO,EAAE,CAAC,WAAW,EAAE,eAAe,EAAE,mCAAmC,CAAC;gBAC5E,YAAY,EAAE,CAAC,WAAW,CAAC;aAC5B;;;AC7BD;;;;;;GAMG;;ACNH;;GAEG;;;;"}
1
+ {"version":3,"file":"checkbox.js","sources":["../../../../../../src/material/checkbox/checkbox-config.ts","../../../../../../src/material/checkbox/checkbox.ts","../../../../../../src/material/checkbox/checkbox-required-validator.ts","../../../../../../src/material/checkbox/checkbox-module.ts","../../../../../../src/material/checkbox/public-api.ts","../../../../../../src/material/checkbox/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {InjectionToken} from '@angular/core';\nimport {ThemePalette} from '@angular/material/core';\n\n/** Default `mat-checkbox` options that can be overridden. */\nexport interface MatCheckboxDefaultOptions {\n color?: ThemePalette;\n clickAction?: MatCheckboxClickAction;\n}\n\n/** Injection token to be used to override the default options for `mat-checkbox`. */\nexport const MAT_CHECKBOX_DEFAULT_OPTIONS =\n new InjectionToken<MatCheckboxDefaultOptions>('mat-checkbox-default-options', {\n providedIn: 'root',\n factory: MAT_CHECKBOX_DEFAULT_OPTIONS_FACTORY\n });\n\n/** @docs-private */\nexport function MAT_CHECKBOX_DEFAULT_OPTIONS_FACTORY(): MatCheckboxDefaultOptions {\n return {\n color: 'accent',\n clickAction: 'check-indeterminate',\n };\n}\n\n/**\n * Checkbox click action when user click on input element.\n * noop: Do not toggle checked or indeterminate.\n * check: Only toggle checked status, ignore indeterminate.\n * check-indeterminate: Toggle checked status, set indeterminate to false. Default behavior.\n * undefined: Same as `check-indeterminate`.\n */\nexport type MatCheckboxClickAction = 'noop' | 'check' | 'check-indeterminate' | undefined;\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {FocusableOption, FocusMonitor, FocusOrigin} from '@angular/cdk/a11y';\nimport {BooleanInput, coerceBooleanProperty, NumberInput} from '@angular/cdk/coercion';\nimport {\n AfterViewChecked,\n Attribute,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n forwardRef,\n Inject,\n Input,\n NgZone,\n OnDestroy,\n Optional,\n Output,\n ViewChild,\n ViewEncapsulation,\n AfterViewInit,\n} from '@angular/core';\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from '@angular/forms';\nimport {\n CanColor,\n CanColorCtor,\n CanDisable,\n CanDisableCtor,\n CanDisableRipple,\n CanDisableRippleCtor,\n HasTabIndex,\n HasTabIndexCtor,\n MatRipple,\n mixinColor,\n mixinDisabled,\n mixinDisableRipple,\n mixinTabIndex,\n} from '@angular/material/core';\nimport {ANIMATION_MODULE_TYPE} from '@angular/platform-browser/animations';\nimport {\n MAT_CHECKBOX_DEFAULT_OPTIONS,\n MatCheckboxDefaultOptions,\n MAT_CHECKBOX_DEFAULT_OPTIONS_FACTORY,\n} from './checkbox-config';\n\n\n// Increasing integer for generating unique ids for checkbox components.\nlet nextUniqueId = 0;\n\n// Default checkbox configuration.\nconst defaults = MAT_CHECKBOX_DEFAULT_OPTIONS_FACTORY();\n\n/**\n * Provider Expression that allows mat-checkbox to register as a ControlValueAccessor.\n * This allows it to support [(ngModel)].\n * @docs-private\n */\nexport const MAT_CHECKBOX_CONTROL_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => MatCheckbox),\n multi: true\n};\n\n/**\n * Represents the different states that require custom transitions between them.\n * @docs-private\n */\nexport const enum TransitionCheckState {\n /** The initial state of the component before any user interaction. */\n Init,\n /** The state representing the component when it's becoming checked. */\n Checked,\n /** The state representing the component when it's becoming unchecked. */\n Unchecked,\n /** The state representing the component when it's becoming indeterminate. */\n Indeterminate\n}\n\n/** Change event object emitted by MatCheckbox. */\nexport class MatCheckboxChange {\n /** The source MatCheckbox of the event. */\n source: MatCheckbox;\n /** The new `checked` value of the checkbox. */\n checked: boolean;\n}\n\n// Boilerplate for applying mixins to MatCheckbox.\n/** @docs-private */\nclass MatCheckboxBase {\n constructor(public _elementRef: ElementRef) {}\n}\nconst _MatCheckboxMixinBase:\n HasTabIndexCtor &\n CanColorCtor &\n CanDisableRippleCtor &\n CanDisableCtor &\n typeof MatCheckboxBase =\n mixinTabIndex(mixinColor(mixinDisableRipple(mixinDisabled(MatCheckboxBase))));\n\n\n/**\n * A material design checkbox component. Supports all of the functionality of an HTML5 checkbox,\n * and exposes a similar API. A MatCheckbox can be either checked, unchecked, indeterminate, or\n * disabled. Note that all additional accessibility attributes are taken care of by the component,\n * so there is no need to provide them yourself. However, if you want to omit a label and still\n * have the checkbox be accessible, you may supply an [aria-label] input.\n * See: https://material.io/design/components/selection-controls.html\n */\n@Component({\n selector: 'mat-checkbox',\n templateUrl: 'checkbox.html',\n styleUrls: ['checkbox.css'],\n exportAs: 'matCheckbox',\n host: {\n 'class': 'mat-checkbox',\n '[id]': 'id',\n '[attr.tabindex]': 'null',\n '[class.mat-checkbox-indeterminate]': 'indeterminate',\n '[class.mat-checkbox-checked]': 'checked',\n '[class.mat-checkbox-disabled]': 'disabled',\n '[class.mat-checkbox-label-before]': 'labelPosition == \"before\"',\n '[class._mat-animation-noopable]': `_animationMode === 'NoopAnimations'`,\n },\n providers: [MAT_CHECKBOX_CONTROL_VALUE_ACCESSOR],\n inputs: ['disableRipple', 'color', 'tabIndex'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class MatCheckbox extends _MatCheckboxMixinBase implements ControlValueAccessor,\n AfterViewInit, AfterViewChecked, OnDestroy, CanColor, CanDisable, HasTabIndex, CanDisableRipple,\n FocusableOption {\n\n /**\n * Attached to the aria-label attribute of the host element. In most cases, aria-labelledby will\n * take precedence so this may be omitted.\n */\n @Input('aria-label') ariaLabel: string = '';\n\n /**\n * Users can specify the `aria-labelledby` attribute which will be forwarded to the input element\n */\n @Input('aria-labelledby') ariaLabelledby: string | null = null;\n\n /** The 'aria-describedby' attribute is read after the element's label and field type. */\n @Input('aria-describedby') ariaDescribedby: string;\n\n private _uniqueId: string = `mat-checkbox-${++nextUniqueId}`;\n\n /** A unique id for the checkbox input. If none is supplied, it will be auto-generated. */\n @Input() id: string = this._uniqueId;\n\n /** Returns the unique id for the visual hidden input. */\n get inputId(): string { return `${this.id || this._uniqueId}-input`; }\n\n /** Whether the checkbox is required. */\n @Input()\n get required(): boolean { return this._required; }\n set required(value: boolean) { this._required = coerceBooleanProperty(value); }\n private _required: boolean;\n\n /** Whether the label should appear after or before the checkbox. Defaults to 'after' */\n @Input() labelPosition: 'before' | 'after' = 'after';\n\n /** Name value will be applied to the input element if present */\n @Input() name: string | null = null;\n\n /** Event emitted when the checkbox's `checked` value changes. */\n @Output() readonly change: EventEmitter<MatCheckboxChange> =\n new EventEmitter<MatCheckboxChange>();\n\n /** Event emitted when the checkbox's `indeterminate` value changes. */\n @Output() readonly indeterminateChange: EventEmitter<boolean> = new EventEmitter<boolean>();\n\n /** The value attribute of the native input element */\n @Input() value: string;\n\n /** The native `<input type=\"checkbox\">` element */\n @ViewChild('input') _inputElement: ElementRef<HTMLInputElement>;\n\n /** Reference to the ripple instance of the checkbox. */\n @ViewChild(MatRipple) ripple: MatRipple;\n\n /**\n * Called when the checkbox is blurred. Needed to properly implement ControlValueAccessor.\n * @docs-private\n */\n _onTouched: () => any = () => {};\n\n private _currentAnimationClass: string = '';\n\n private _currentCheckState: TransitionCheckState = TransitionCheckState.Init;\n\n private _controlValueAccessorChangeFn: (value: any) => void = () => {};\n\n constructor(elementRef: ElementRef<HTMLElement>,\n private _changeDetectorRef: ChangeDetectorRef,\n private _focusMonitor: FocusMonitor,\n private _ngZone: NgZone,\n @Attribute('tabindex') tabIndex: string,\n @Optional() @Inject(ANIMATION_MODULE_TYPE) public _animationMode?: string,\n @Optional() @Inject(MAT_CHECKBOX_DEFAULT_OPTIONS)\n private _options?: MatCheckboxDefaultOptions) {\n super(elementRef);\n this._options = this._options || defaults;\n this.color = this.defaultColor = this._options.color || defaults.color;\n this.tabIndex = parseInt(tabIndex) || 0;\n }\n\n ngAfterViewInit() {\n this._focusMonitor.monitor(this._elementRef, true).subscribe(focusOrigin => {\n if (!focusOrigin) {\n // When a focused element becomes disabled, the browser *immediately* fires a blur event.\n // Angular does not expect events to be raised during change detection, so any state change\n // (such as a form control's 'ng-touched') will cause a changed-after-checked error.\n // See https://github.com/angular/angular/issues/17793. To work around this, we defer\n // telling the form control it has been touched until the next tick.\n Promise.resolve().then(() => {\n this._onTouched();\n this._changeDetectorRef.markForCheck();\n });\n }\n });\n\n this._syncIndeterminate(this._indeterminate);\n }\n\n // TODO: Delete next major revision.\n ngAfterViewChecked() {}\n\n ngOnDestroy() {\n this._focusMonitor.stopMonitoring(this._elementRef);\n }\n\n /**\n * Whether the checkbox is checked.\n */\n @Input()\n get checked(): boolean { return this._checked; }\n set checked(value: boolean) {\n if (value != this.checked) {\n this._checked = value;\n this._changeDetectorRef.markForCheck();\n }\n }\n private _checked: boolean = false;\n\n /**\n * Whether the checkbox is disabled. This fully overrides the implementation provided by\n * mixinDisabled, but the mixin is still required because mixinTabIndex requires it.\n */\n @Input()\n get disabled() { return this._disabled; }\n set disabled(value: any) {\n const newValue = coerceBooleanProperty(value);\n\n if (newValue !== this.disabled) {\n this._disabled = newValue;\n this._changeDetectorRef.markForCheck();\n }\n }\n private _disabled: boolean = false;\n\n /**\n * Whether the checkbox is indeterminate. This is also known as \"mixed\" mode and can be used to\n * represent a checkbox with three states, e.g. a checkbox that represents a nested list of\n * checkable items. Note that whenever checkbox is manually clicked, indeterminate is immediately\n * set to false.\n */\n @Input()\n get indeterminate(): boolean { return this._indeterminate; }\n set indeterminate(value: boolean) {\n const changed = value != this._indeterminate;\n this._indeterminate = coerceBooleanProperty(value);\n\n if (changed) {\n if (this._indeterminate) {\n this._transitionCheckState(TransitionCheckState.Indeterminate);\n } else {\n this._transitionCheckState(\n this.checked ? TransitionCheckState.Checked : TransitionCheckState.Unchecked);\n }\n this.indeterminateChange.emit(this._indeterminate);\n }\n\n this._syncIndeterminate(this._indeterminate);\n }\n private _indeterminate: boolean = false;\n\n _isRippleDisabled() {\n return this.disableRipple || this.disabled;\n }\n\n /** Method being called whenever the label text changes. */\n _onLabelTextChange() {\n // Since the event of the `cdkObserveContent` directive runs outside of the zone, the checkbox\n // component will be only marked for check, but no actual change detection runs automatically.\n // Instead of going back into the zone in order to trigger a change detection which causes\n // *all* components to be checked (if explicitly marked or not using OnPush), we only trigger\n // an explicit change detection for the checkbox view and its children.\n this._changeDetectorRef.detectChanges();\n }\n\n // Implemented as part of ControlValueAccessor.\n writeValue(value: any) {\n this.checked = !!value;\n }\n\n // Implemented as part of ControlValueAccessor.\n registerOnChange(fn: (value: any) => void) {\n this._controlValueAccessorChangeFn = fn;\n }\n\n // Implemented as part of ControlValueAccessor.\n registerOnTouched(fn: any) {\n this._onTouched = fn;\n }\n\n // Implemented as part of ControlValueAccessor.\n setDisabledState(isDisabled: boolean) {\n this.disabled = isDisabled;\n }\n\n _getAriaChecked(): 'true' | 'false' | 'mixed' {\n if (this.checked) {\n return 'true';\n }\n\n return this.indeterminate ? 'mixed' : 'false';\n }\n\n private _transitionCheckState(newState: TransitionCheckState) {\n let oldState = this._currentCheckState;\n let element: HTMLElement = this._elementRef.nativeElement;\n\n if (oldState === newState) {\n return;\n }\n if (this._currentAnimationClass.length > 0) {\n element.classList.remove(this._currentAnimationClass);\n }\n\n this._currentAnimationClass = this._getAnimationClassForCheckStateTransition(\n oldState, newState);\n this._currentCheckState = newState;\n\n if (this._currentAnimationClass.length > 0) {\n element.classList.add(this._currentAnimationClass);\n\n // Remove the animation class to avoid animation when the checkbox is moved between containers\n const animationClass = this._currentAnimationClass;\n\n this._ngZone.runOutsideAngular(() => {\n setTimeout(() => {\n element.classList.remove(animationClass);\n }, 1000);\n });\n }\n }\n\n private _emitChangeEvent() {\n const event = new MatCheckboxChange();\n event.source = this;\n event.checked = this.checked;\n\n this._controlValueAccessorChangeFn(this.checked);\n this.change.emit(event);\n }\n\n /** Toggles the `checked` state of the checkbox. */\n toggle(): void {\n this.checked = !this.checked;\n }\n\n /**\n * Event handler for checkbox input element.\n * Toggles checked state if element is not disabled.\n * Do not toggle on (change) event since IE doesn't fire change event when\n * indeterminate checkbox is clicked.\n * @param event\n */\n _onInputClick(event: Event) {\n const clickAction = this._options?.clickAction;\n\n // We have to stop propagation for click events on the visual hidden input element.\n // By default, when a user clicks on a label element, a generated click event will be\n // dispatched on the associated input element. Since we are using a label element as our\n // root container, the click event on the `checkbox` will be executed twice.\n // The real click event will bubble up, and the generated click event also tries to bubble up.\n // This will lead to multiple click events.\n // Preventing bubbling for the second event will solve that issue.\n event.stopPropagation();\n\n // If resetIndeterminate is false, and the current state is indeterminate, do nothing on click\n if (!this.disabled && clickAction !== 'noop') {\n // When user manually click on the checkbox, `indeterminate` is set to false.\n if (this.indeterminate && clickAction !== 'check') {\n\n Promise.resolve().then(() => {\n this._indeterminate = false;\n this.indeterminateChange.emit(this._indeterminate);\n });\n }\n\n this.toggle();\n this._transitionCheckState(\n this._checked ? TransitionCheckState.Checked : TransitionCheckState.Unchecked);\n\n // Emit our custom change event if the native input emitted one.\n // It is important to only emit it, if the native input triggered one, because\n // we don't want to trigger a change event, when the `checked` variable changes for example.\n this._emitChangeEvent();\n } else if (!this.disabled && clickAction === 'noop') {\n // Reset native input when clicked with noop. The native checkbox becomes checked after\n // click, reset it to be align with `checked` value of `mat-checkbox`.\n this._inputElement.nativeElement.checked = this.checked;\n this._inputElement.nativeElement.indeterminate = this.indeterminate;\n }\n }\n\n /** Focuses the checkbox. */\n focus(origin: FocusOrigin = 'keyboard', options?: FocusOptions): void {\n this._focusMonitor.focusVia(this._inputElement, origin, options);\n }\n\n _onInteractionEvent(event: Event) {\n // We always have to stop propagation on the change event.\n // Otherwise the change event, from the input element, will bubble up and\n // emit its event object to the `change` output.\n event.stopPropagation();\n }\n\n private _getAnimationClassForCheckStateTransition(\n oldState: TransitionCheckState, newState: TransitionCheckState): string {\n // Don't transition if animations are disabled.\n if (this._animationMode === 'NoopAnimations') {\n return '';\n }\n\n let animSuffix: string = '';\n\n switch (oldState) {\n case TransitionCheckState.Init:\n // Handle edge case where user interacts with checkbox that does not have [(ngModel)] or\n // [checked] bound to it.\n if (newState === TransitionCheckState.Checked) {\n animSuffix = 'unchecked-checked';\n } else if (newState == TransitionCheckState.Indeterminate) {\n animSuffix = 'unchecked-indeterminate';\n } else {\n return '';\n }\n break;\n case TransitionCheckState.Unchecked:\n animSuffix = newState === TransitionCheckState.Checked ?\n 'unchecked-checked' : 'unchecked-indeterminate';\n break;\n case TransitionCheckState.Checked:\n animSuffix = newState === TransitionCheckState.Unchecked ?\n 'checked-unchecked' : 'checked-indeterminate';\n break;\n case TransitionCheckState.Indeterminate:\n animSuffix = newState === TransitionCheckState.Checked ?\n 'indeterminate-checked' : 'indeterminate-unchecked';\n break;\n }\n\n return `mat-checkbox-anim-${animSuffix}`;\n }\n\n /**\n * Syncs the indeterminate value with the checkbox DOM node.\n *\n * We sync `indeterminate` directly on the DOM node, because in Ivy the check for whether a\n * property is supported on an element boils down to `if (propName in element)`. Domino's\n * HTMLInputElement doesn't have an `indeterminate` property so Ivy will warn during\n * server-side rendering.\n */\n private _syncIndeterminate(value: boolean) {\n const nativeCheckbox = this._inputElement;\n\n if (nativeCheckbox) {\n nativeCheckbox.nativeElement.indeterminate = value;\n }\n }\n\n static ngAcceptInputType_disabled: BooleanInput;\n static ngAcceptInputType_required: BooleanInput;\n static ngAcceptInputType_disableRipple: BooleanInput;\n static ngAcceptInputType_indeterminate: BooleanInput;\n static ngAcceptInputType_tabIndex: NumberInput;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {\n Directive,\n forwardRef,\n Provider,\n} from '@angular/core';\nimport {\n CheckboxRequiredValidator,\n NG_VALIDATORS,\n} from '@angular/forms';\n\nexport const MAT_CHECKBOX_REQUIRED_VALIDATOR: Provider = {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => MatCheckboxRequiredValidator),\n multi: true\n};\n\n/**\n * Validator for Material checkbox's required attribute in template-driven checkbox.\n * Current CheckboxRequiredValidator only work with `input type=checkbox` and does not\n * work with `mat-checkbox`.\n */\n@Directive({\n selector: `mat-checkbox[required][formControlName],\n mat-checkbox[required][formControl], mat-checkbox[required][ngModel]`,\n providers: [MAT_CHECKBOX_REQUIRED_VALIDATOR],\n})\nexport class MatCheckboxRequiredValidator extends CheckboxRequiredValidator {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ObserversModule} from '@angular/cdk/observers';\nimport {NgModule} from '@angular/core';\nimport {MatCommonModule, MatRippleModule} from '@angular/material/core';\nimport {MatCheckbox} from './checkbox';\nimport {MatCheckboxRequiredValidator} from './checkbox-required-validator';\n\n/** This module is used by both original and MDC-based checkbox implementations. */\n@NgModule({\n exports: [MatCheckboxRequiredValidator],\n declarations: [MatCheckboxRequiredValidator],\n})\nexport class _MatCheckboxRequiredValidatorModule {\n}\n\n@NgModule({\n imports: [\n MatRippleModule, MatCommonModule, ObserversModule,\n _MatCheckboxRequiredValidatorModule\n ],\n exports: [MatCheckbox, MatCommonModule, _MatCheckboxRequiredValidatorModule],\n declarations: [MatCheckbox],\n})\nexport class MatCheckboxModule {\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './checkbox';\nexport * from './checkbox-config';\nexport * from './checkbox-module';\nexport * from './checkbox-required-validator';\n\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;AAAA;;;;;;;AAOA,AASA;AACA,MAAa,4BAA4B,GACrC,IAAI,cAAc,CAA4B,8BAA8B,EAAE;IAC5E,UAAU,EAAE,MAAM;IAClB,OAAO,EAAE,oCAAoC;CAC9C,CAAC,CAAC;;AAGP,SAAgB,oCAAoC;IAClD,OAAO;QACL,KAAK,EAAE,QAAQ;QACf,WAAW,EAAE,qBAAqB;KACnC,CAAC;CACH;;AC7BD;;;;;;;AAQA,AA6CA;AACA,IAAI,YAAY,GAAG,CAAC,CAAC;;AAGrB,MAAM,QAAQ,GAAG,oCAAoC,EAAE,CAAC;;;;;;AAOxD,MAAa,mCAAmC,GAAQ;IACtD,OAAO,EAAE,iBAAiB;IAC1B,WAAW,EAAE,UAAU,CAAC,MAAM,WAAW,CAAC;IAC1C,KAAK,EAAE,IAAI;CACZ,CAAC;;AAkBF,MAAa,iBAAiB;CAK7B;;;AAID,MAAM,eAAe;IACnB,YAAmB,WAAuB;QAAvB,gBAAW,GAAX,WAAW,CAAY;KAAI;CAC/C;AACD,MAAM,qBAAqB,GAMnB,aAAa,CAAC,UAAU,CAAC,kBAAkB,CAAC,aAAa,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;;;;;;;;;AA+BtF,MAAa,WAAY,SAAQ,qBAAqB;IAkEpD,YAAY,UAAmC,EAC3B,kBAAqC,EACrC,aAA2B,EAC3B,OAAe,EACA,QAAgB,EACW,cAAuB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M,SAAC,4BAA4B;;;wBAhE3D,KAAK,SAAC,YAAY;6BAKlB,KAAK,SAAC,iBAAiB;8BAGvB,KAAK,SAAC,kBAAkB;iBAKxB,KAAK;uBAML,KAAK;4BAML,KAAK;mBAGL,KAAK;qBAGL,MAAM;kCAIN,MAAM;oBAGN,KAAK;4BAGL,SAAS,SAAC,OAAO;qBAGjB,SAAS,SAAC,SAAS;sBAwDnB,KAAK;uBAcL,KAAK;4BAkBL,KAAK;;;ACnRR;;;;;;;AAQA,MAUa,+BAA+B,GAAa;IACvD,OAAO,EAAE,aAAa;IACtB,WAAW,EAAE,UAAU,CAAC,MAAM,4BAA4B,CAAC;IAC3D,KAAK,EAAE,IAAI;CACZ,CAAC;;;;;;AAYF,MAAa,4BAA6B,SAAQ,yBAAyB;;;YAL1E,SAAS,SAAC;gBACT,QAAQ,EAAE;kFACsE;gBAChF,SAAS,EAAE,CAAC,+BAA+B,CAAC;aAC7C;;;ACjCD;;;;;;;AAQA,AAMA;AAKA,MAAa,mCAAmC;;;YAJ/C,QAAQ,SAAC;gBACR,OAAO,EAAE,CAAC,4BAA4B,CAAC;gBACvC,YAAY,EAAE,CAAC,4BAA4B,CAAC;aAC7C;;AAYD,MAAa,iBAAiB;;;YAR7B,QAAQ,SAAC;gBACR,OAAO,EAAE;oBACP,eAAe,EAAE,eAAe,EAAE,eAAe;oBACjD,mCAAmC;iBACpC;gBACD,OAAO,EAAE,CAAC,WAAW,EAAE,eAAe,EAAE,mCAAmC,CAAC;gBAC5E,YAAY,EAAE,CAAC,WAAW,CAAC;aAC5B;;;AC7BD;;;;;;GAMG;;ACNH;;GAEG;;;;"}
package/fesm2015/chips.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { SPACE, BACKSPACE, DELETE, TAB, hasModifierKey, ENTER } from '@angular/cdk/keycodes';
2
2
  import { InjectionToken, Directive, EventEmitter, ElementRef, NgZone, Optional, Inject, ChangeDetectorRef, Attribute, ContentChild, Input, Output, Component, ViewEncapsulation, ChangeDetectionStrategy, Self, ContentChildren, NgModule } from '@angular/core';
3
- import { mixinTabIndex, mixinColor, mixinDisableRipple, RippleRenderer, MAT_RIPPLE_GLOBAL_OPTIONS, mixinErrorState, ErrorStateMatcher } from '@angular/material/core';
3
+ import { mixinTabIndex, mixinColor, mixinDisableRipple, RippleRenderer, MAT_RIPPLE_GLOBAL_OPTIONS, mixinErrorState, ErrorStateMatcher, MatCommonModule } from '@angular/material/core';
4
4
  import { coerceBooleanProperty } from '@angular/cdk/coercion';
5
5
  import { Platform } from '@angular/cdk/platform';
6
6
  import { DOCUMENT } from '@angular/common';
@@ -135,7 +135,8 @@ class MatChip extends _MatChipMixinBase {
135
135
  * @docs-private
136
136
  */
137
137
  get rippleDisabled() {
138
- return this.disabled || this.disableRipple || !!this.rippleConfig.disabled;
138
+ return this.disabled || this.disableRipple || this._animationsDisabled ||
139
+ !!this.rippleConfig.disabled;
139
140
  }
140
141
  /** Whether the chip is selected. */
141
142
  get selected() { return this._selected; }
@@ -1231,6 +1232,7 @@ class MatChipsModule {
1231
1232
  }
1232
1233
  MatChipsModule.decorators = [
1233
1234
  { type: NgModule, args: [{
1235
+ imports: [MatCommonModule],
1234
1236
  exports: CHIP_DECLARATIONS,
1235
1237
  declarations: CHIP_DECLARATIONS,
1236
1238
  providers: [