@angular/material-experimental 13.2.0-next.0 → 13.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (300) hide show
  1. package/LICENSE +1 -1
  2. package/esm2020/column-resize/column-resize-directives/column-resize-flex.mjs +3 -3
  3. package/esm2020/column-resize/column-resize-directives/column-resize.mjs +3 -3
  4. package/esm2020/column-resize/column-resize-directives/default-enabled-column-resize-flex.mjs +3 -3
  5. package/esm2020/column-resize/column-resize-directives/default-enabled-column-resize.mjs +3 -3
  6. package/esm2020/column-resize/column-resize-module.mjs +12 -12
  7. package/esm2020/column-resize/overlay-handle.mjs +3 -3
  8. package/esm2020/column-resize/resizable-directives/default-enabled-resizable.mjs +3 -3
  9. package/esm2020/column-resize/resizable-directives/resizable.mjs +3 -3
  10. package/esm2020/column-resize/resize-strategy.mjs +3 -3
  11. package/esm2020/mdc-autocomplete/autocomplete-origin.mjs +3 -3
  12. package/esm2020/mdc-autocomplete/autocomplete-trigger.mjs +3 -3
  13. package/esm2020/mdc-autocomplete/autocomplete.mjs +3 -3
  14. package/esm2020/mdc-autocomplete/module.mjs +4 -4
  15. package/esm2020/mdc-button/button-base.mjs +24 -21
  16. package/esm2020/mdc-button/button.mjs +9 -9
  17. package/esm2020/mdc-button/fab.mjs +18 -18
  18. package/esm2020/mdc-button/icon-button.mjs +11 -13
  19. package/esm2020/mdc-button/module.mjs +4 -4
  20. package/esm2020/mdc-card/card.mjs +42 -42
  21. package/esm2020/mdc-card/module.mjs +4 -4
  22. package/esm2020/mdc-checkbox/checkbox.mjs +9 -16
  23. package/esm2020/mdc-checkbox/module.mjs +6 -7
  24. package/esm2020/mdc-chips/chip-action.mjs +123 -0
  25. package/esm2020/mdc-chips/chip-edit-input.mjs +5 -5
  26. package/esm2020/mdc-chips/chip-grid.mjs +49 -99
  27. package/esm2020/mdc-chips/chip-icons.mjs +39 -101
  28. package/esm2020/mdc-chips/chip-input.mjs +6 -13
  29. package/esm2020/mdc-chips/chip-listbox.mjs +51 -156
  30. package/esm2020/mdc-chips/chip-option.mjs +84 -95
  31. package/esm2020/mdc-chips/chip-row.mjs +82 -90
  32. package/esm2020/mdc-chips/chip-set.mjs +119 -120
  33. package/esm2020/mdc-chips/chip.mjs +188 -180
  34. package/esm2020/mdc-chips/emit-event.mjs +27 -0
  35. package/esm2020/mdc-chips/module.mjs +8 -10
  36. package/esm2020/mdc-chips/testing/chip-harness.mjs +5 -1
  37. package/esm2020/mdc-chips/testing/chip-option-harness.mjs +2 -2
  38. package/esm2020/mdc-chips/testing/chip-row-harness.mjs +10 -1
  39. package/esm2020/mdc-core/option/index.mjs +4 -4
  40. package/esm2020/mdc-core/option/optgroup.mjs +3 -3
  41. package/esm2020/mdc-core/option/option.mjs +5 -5
  42. package/esm2020/mdc-core/public-api.mjs +2 -2
  43. package/esm2020/mdc-dialog/dialog-container.mjs +4 -4
  44. package/esm2020/mdc-dialog/dialog-content-directives.mjs +12 -12
  45. package/esm2020/mdc-dialog/dialog.mjs +3 -3
  46. package/esm2020/mdc-dialog/module.mjs +4 -4
  47. package/esm2020/mdc-form-field/directives/error.mjs +3 -3
  48. package/esm2020/mdc-form-field/directives/floating-label.mjs +3 -3
  49. package/esm2020/mdc-form-field/directives/hint.mjs +3 -3
  50. package/esm2020/mdc-form-field/directives/label.mjs +3 -3
  51. package/esm2020/mdc-form-field/directives/line-ripple.mjs +3 -3
  52. package/esm2020/mdc-form-field/directives/notched-outline.mjs +3 -3
  53. package/esm2020/mdc-form-field/directives/prefix.mjs +3 -3
  54. package/esm2020/mdc-form-field/directives/suffix.mjs +3 -3
  55. package/esm2020/mdc-form-field/form-field.mjs +21 -5
  56. package/esm2020/mdc-form-field/module.mjs +4 -4
  57. package/esm2020/mdc-input/input.mjs +5 -4
  58. package/esm2020/mdc-input/module.mjs +4 -4
  59. package/esm2020/mdc-list/action-list.mjs +4 -4
  60. package/esm2020/mdc-list/interactive-list-base.mjs +3 -3
  61. package/esm2020/mdc-list/list-base.mjs +138 -41
  62. package/esm2020/mdc-list/list-item-sections.mjs +138 -0
  63. package/esm2020/mdc-list/list-option.mjs +25 -17
  64. package/esm2020/mdc-list/list.mjs +24 -18
  65. package/esm2020/mdc-list/module.mjs +46 -23
  66. package/esm2020/mdc-list/nav-list.mjs +4 -4
  67. package/esm2020/mdc-list/public-api.mjs +3 -2
  68. package/esm2020/mdc-list/selection-list.mjs +8 -8
  69. package/esm2020/mdc-list/subheader.mjs +27 -0
  70. package/esm2020/mdc-list/testing/list-harness-filters.mjs +1 -1
  71. package/esm2020/mdc-list/testing/list-item-harness-base.mjs +100 -12
  72. package/esm2020/mdc-list/testing/public-api.mjs +2 -1
  73. package/esm2020/mdc-list/testing/selection-list-harness.mjs +1 -5
  74. package/esm2020/mdc-menu/directives.mjs +6 -6
  75. package/esm2020/mdc-menu/menu-item.mjs +3 -3
  76. package/esm2020/mdc-menu/menu.mjs +3 -3
  77. package/esm2020/mdc-menu/module.mjs +4 -4
  78. package/esm2020/mdc-paginator/module.mjs +4 -4
  79. package/esm2020/mdc-paginator/paginator.mjs +3 -3
  80. package/esm2020/mdc-progress-bar/module.mjs +4 -4
  81. package/esm2020/mdc-progress-bar/progress-bar.mjs +3 -3
  82. package/esm2020/mdc-progress-spinner/module.mjs +4 -4
  83. package/esm2020/mdc-progress-spinner/progress-spinner.mjs +3 -3
  84. package/esm2020/mdc-radio/module.mjs +4 -4
  85. package/esm2020/mdc-radio/radio.mjs +8 -8
  86. package/esm2020/mdc-select/module.mjs +4 -4
  87. package/esm2020/mdc-select/select.mjs +8 -8
  88. package/esm2020/mdc-sidenav/module.mjs +4 -4
  89. package/esm2020/mdc-slide-toggle/module.mjs +4 -4
  90. package/esm2020/mdc-slide-toggle/slide-toggle.mjs +5 -5
  91. package/esm2020/mdc-slider/global-change-and-input-listener.mjs +3 -3
  92. package/esm2020/mdc-slider/module.mjs +4 -4
  93. package/esm2020/mdc-slider/slider.mjs +33 -12
  94. package/esm2020/mdc-snack-bar/module.mjs +7 -7
  95. package/esm2020/mdc-snack-bar/public-api.mjs +2 -2
  96. package/esm2020/mdc-snack-bar/simple-snack-bar.mjs +7 -7
  97. package/esm2020/mdc-snack-bar/snack-bar-container.mjs +3 -3
  98. package/esm2020/mdc-snack-bar/snack-bar-content.mjs +9 -9
  99. package/esm2020/mdc-snack-bar/snack-bar.mjs +26 -12
  100. package/esm2020/mdc-table/cell.mjs +21 -21
  101. package/esm2020/mdc-table/module.mjs +4 -4
  102. package/esm2020/mdc-table/row.mjs +21 -21
  103. package/esm2020/mdc-table/table.mjs +8 -8
  104. package/esm2020/mdc-table/text-column.mjs +3 -3
  105. package/esm2020/mdc-tabs/module.mjs +10 -6
  106. package/esm2020/mdc-tabs/public-api.mjs +2 -2
  107. package/esm2020/mdc-tabs/tab-body.mjs +8 -8
  108. package/esm2020/mdc-tabs/tab-content.mjs +3 -3
  109. package/esm2020/mdc-tabs/tab-group.mjs +7 -7
  110. package/esm2020/mdc-tabs/tab-header.mjs +5 -5
  111. package/esm2020/mdc-tabs/tab-label-wrapper.mjs +3 -3
  112. package/esm2020/mdc-tabs/tab-label.mjs +3 -3
  113. package/esm2020/mdc-tabs/tab-nav-bar/tab-nav-bar.mjs +48 -11
  114. package/esm2020/mdc-tabs/tab.mjs +5 -5
  115. package/esm2020/mdc-tabs/testing/tab-harness-filters.mjs +1 -1
  116. package/esm2020/mdc-tabs/testing/tab-nav-bar-harness.mjs +13 -1
  117. package/esm2020/mdc-tabs/testing/tab-nav-panel-harness.mjs +27 -0
  118. package/esm2020/mdc-tooltip/module.mjs +4 -4
  119. package/esm2020/mdc-tooltip/tooltip.mjs +6 -6
  120. package/esm2020/menubar/menubar-item.mjs +3 -3
  121. package/esm2020/menubar/menubar-module.mjs +4 -4
  122. package/esm2020/menubar/menubar.mjs +3 -3
  123. package/esm2020/popover-edit/lens-directives.mjs +9 -9
  124. package/esm2020/popover-edit/popover-edit-module.mjs +4 -4
  125. package/esm2020/popover-edit/table-directives.mjs +12 -12
  126. package/esm2020/selection/row-selection.mjs +3 -3
  127. package/esm2020/selection/select-all.mjs +3 -3
  128. package/esm2020/selection/selection-column.mjs +3 -3
  129. package/esm2020/selection/selection-module.mjs +4 -4
  130. package/esm2020/selection/selection-toggle.mjs +3 -3
  131. package/esm2020/selection/selection.mjs +3 -3
  132. package/esm2020/version.mjs +1 -1
  133. package/fesm2015/column-resize.mjs +36 -36
  134. package/fesm2015/material-experimental.mjs +1 -1
  135. package/fesm2015/material-experimental.mjs.map +1 -1
  136. package/fesm2015/mdc-autocomplete.mjs +13 -13
  137. package/fesm2015/mdc-button.mjs +61 -60
  138. package/fesm2015/mdc-button.mjs.map +1 -1
  139. package/fesm2015/mdc-card.mjs +46 -46
  140. package/fesm2015/mdc-checkbox.mjs +13 -21
  141. package/fesm2015/mdc-checkbox.mjs.map +1 -1
  142. package/fesm2015/mdc-chips/testing.mjs +18 -8
  143. package/fesm2015/mdc-chips/testing.mjs.map +1 -1
  144. package/fesm2015/mdc-chips.mjs +753 -1063
  145. package/fesm2015/mdc-chips.mjs.map +1 -1
  146. package/fesm2015/mdc-core.mjs +12 -12
  147. package/fesm2015/mdc-core.mjs.map +1 -1
  148. package/fesm2015/mdc-dialog.mjs +23 -23
  149. package/fesm2015/mdc-form-field.mjs +50 -32
  150. package/fesm2015/mdc-form-field.mjs.map +1 -1
  151. package/fesm2015/mdc-input.mjs +8 -7
  152. package/fesm2015/mdc-input.mjs.map +1 -1
  153. package/fesm2015/mdc-list/testing.mjs +110 -18
  154. package/fesm2015/mdc-list/testing.mjs.map +1 -1
  155. package/fesm2015/mdc-list.mjs +353 -148
  156. package/fesm2015/mdc-list.mjs.map +1 -1
  157. package/fesm2015/mdc-menu.mjs +16 -16
  158. package/fesm2015/mdc-paginator.mjs +7 -7
  159. package/fesm2015/mdc-progress-bar.mjs +7 -7
  160. package/fesm2015/mdc-progress-spinner.mjs +7 -7
  161. package/fesm2015/mdc-radio.mjs +11 -11
  162. package/fesm2015/mdc-radio.mjs.map +1 -1
  163. package/fesm2015/mdc-select.mjs +12 -12
  164. package/fesm2015/mdc-sidenav.mjs +4 -4
  165. package/fesm2015/mdc-slide-toggle.mjs +8 -8
  166. package/fesm2015/mdc-slide-toggle.mjs.map +1 -1
  167. package/fesm2015/mdc-slider.mjs +39 -18
  168. package/fesm2015/mdc-slider.mjs.map +1 -1
  169. package/fesm2015/mdc-snack-bar.mjs +46 -41
  170. package/fesm2015/mdc-snack-bar.mjs.map +1 -1
  171. package/fesm2015/mdc-table.mjs +57 -57
  172. package/fesm2015/mdc-tabs/testing.mjs +34 -0
  173. package/fesm2015/mdc-tabs/testing.mjs.map +1 -1
  174. package/fesm2015/mdc-tabs.mjs +86 -45
  175. package/fesm2015/mdc-tabs.mjs.map +1 -1
  176. package/fesm2015/mdc-tooltip.mjs +10 -10
  177. package/fesm2015/menubar.mjs +10 -10
  178. package/fesm2015/popover-edit.mjs +25 -25
  179. package/fesm2015/selection.mjs +19 -19
  180. package/fesm2020/column-resize.mjs +36 -36
  181. package/fesm2020/material-experimental.mjs +1 -1
  182. package/fesm2020/material-experimental.mjs.map +1 -1
  183. package/fesm2020/mdc-autocomplete.mjs +13 -13
  184. package/fesm2020/mdc-button.mjs +62 -61
  185. package/fesm2020/mdc-button.mjs.map +1 -1
  186. package/fesm2020/mdc-card.mjs +46 -46
  187. package/fesm2020/mdc-checkbox.mjs +13 -21
  188. package/fesm2020/mdc-checkbox.mjs.map +1 -1
  189. package/fesm2020/mdc-chips/testing.mjs +14 -1
  190. package/fesm2020/mdc-chips/testing.mjs.map +1 -1
  191. package/fesm2020/mdc-chips.mjs +733 -1068
  192. package/fesm2020/mdc-chips.mjs.map +1 -1
  193. package/fesm2020/mdc-core.mjs +12 -12
  194. package/fesm2020/mdc-core.mjs.map +1 -1
  195. package/fesm2020/mdc-dialog.mjs +23 -23
  196. package/fesm2020/mdc-form-field.mjs +48 -32
  197. package/fesm2020/mdc-form-field.mjs.map +1 -1
  198. package/fesm2020/mdc-input.mjs +8 -7
  199. package/fesm2020/mdc-input.mjs.map +1 -1
  200. package/fesm2020/mdc-list/testing.mjs +100 -16
  201. package/fesm2020/mdc-list/testing.mjs.map +1 -1
  202. package/fesm2020/mdc-list.mjs +351 -148
  203. package/fesm2020/mdc-list.mjs.map +1 -1
  204. package/fesm2020/mdc-menu.mjs +16 -16
  205. package/fesm2020/mdc-paginator.mjs +7 -7
  206. package/fesm2020/mdc-progress-bar.mjs +7 -7
  207. package/fesm2020/mdc-progress-spinner.mjs +7 -7
  208. package/fesm2020/mdc-radio.mjs +11 -11
  209. package/fesm2020/mdc-radio.mjs.map +1 -1
  210. package/fesm2020/mdc-select.mjs +12 -12
  211. package/fesm2020/mdc-sidenav.mjs +4 -4
  212. package/fesm2020/mdc-slide-toggle.mjs +8 -8
  213. package/fesm2020/mdc-slide-toggle.mjs.map +1 -1
  214. package/fesm2020/mdc-slider.mjs +39 -18
  215. package/fesm2020/mdc-slider.mjs.map +1 -1
  216. package/fesm2020/mdc-snack-bar.mjs +44 -34
  217. package/fesm2020/mdc-snack-bar.mjs.map +1 -1
  218. package/fesm2020/mdc-table.mjs +57 -57
  219. package/fesm2020/mdc-tabs/testing.mjs +37 -0
  220. package/fesm2020/mdc-tabs/testing.mjs.map +1 -1
  221. package/fesm2020/mdc-tabs.mjs +86 -45
  222. package/fesm2020/mdc-tabs.mjs.map +1 -1
  223. package/fesm2020/mdc-tooltip.mjs +10 -10
  224. package/fesm2020/menubar.mjs +10 -10
  225. package/fesm2020/popover-edit.mjs +25 -25
  226. package/fesm2020/selection.mjs +19 -19
  227. package/mdc-button/_button-base.scss +28 -15
  228. package/mdc-button/_button-theme-private.scss +35 -28
  229. package/mdc-button/_button-theme.scss +118 -80
  230. package/mdc-button/_fab-theme.scss +31 -37
  231. package/mdc-button/_icon-button-theme.scss +15 -22
  232. package/mdc-button/button-base.d.ts +7 -5
  233. package/mdc-button/fab.d.ts +1 -1
  234. package/mdc-button/icon-button.d.ts +2 -2
  235. package/mdc-checkbox/_checkbox-private.scss +46 -0
  236. package/mdc-checkbox/_checkbox-theme.scss +19 -46
  237. package/mdc-checkbox/checkbox.d.ts +0 -6
  238. package/mdc-checkbox/module.d.ts +2 -3
  239. package/mdc-chips/_chips-theme.scss +53 -53
  240. package/mdc-chips/chip-action.d.ts +40 -0
  241. package/mdc-chips/chip-grid.d.ts +6 -24
  242. package/mdc-chips/chip-icons.d.ts +14 -37
  243. package/mdc-chips/chip-listbox.d.ts +4 -40
  244. package/mdc-chips/chip-option.d.ts +15 -11
  245. package/mdc-chips/chip-row.d.ts +13 -28
  246. package/mdc-chips/chip-set.d.ts +25 -42
  247. package/mdc-chips/chip.d.ts +37 -36
  248. package/mdc-chips/emit-event.d.ts +16 -0
  249. package/mdc-chips/module.d.ts +13 -12
  250. package/mdc-chips/testing/chip-harness.d.ts +1 -0
  251. package/mdc-chips/testing/chip-row-harness.d.ts +4 -0
  252. package/mdc-core/option/_option-theme.scss +3 -3
  253. package/mdc-core/option/option.d.ts +3 -3
  254. package/mdc-core/public-api.d.ts +1 -1
  255. package/mdc-form-field/_form-field-subscript.scss +11 -0
  256. package/mdc-form-field/form-field.d.ts +12 -1
  257. package/mdc-helpers/_focus-indicators.scss +15 -3
  258. package/mdc-list/_interactive-list-theme.scss +17 -11
  259. package/mdc-list/_list-option-theme.scss +3 -3
  260. package/mdc-list/_list-option-trailing-avatar-compat.scss +18 -13
  261. package/mdc-list/_list-theme.scss +18 -13
  262. package/mdc-list/list-base.d.ts +56 -11
  263. package/mdc-list/list-item-sections.d.ts +77 -0
  264. package/mdc-list/list-option.d.ts +11 -8
  265. package/mdc-list/list.d.ts +6 -2
  266. package/mdc-list/module.d.ts +7 -5
  267. package/mdc-list/public-api.d.ts +2 -1
  268. package/mdc-list/subheader.d.ts +9 -0
  269. package/mdc-list/testing/list-harness-filters.d.ts +8 -0
  270. package/mdc-list/testing/list-item-harness-base.d.ts +36 -3
  271. package/mdc-list/testing/public-api.d.ts +1 -1
  272. package/mdc-list/testing/selection-list-harness.d.ts +0 -2
  273. package/mdc-radio/_radio-theme.scss +0 -6
  274. package/mdc-select/_select-theme.scss +6 -27
  275. package/mdc-slider/slider.d.ts +13 -1
  276. package/mdc-snack-bar/module.d.ts +1 -1
  277. package/mdc-snack-bar/public-api.d.ts +1 -1
  278. package/mdc-snack-bar/simple-snack-bar.d.ts +4 -4
  279. package/mdc-snack-bar/snack-bar.d.ts +17 -5
  280. package/mdc-table/_table-theme.scss +1 -1
  281. package/mdc-tabs/_tabs-common.scss +8 -1
  282. package/mdc-tabs/_tabs-theme.scss +8 -55
  283. package/mdc-tabs/module.d.ts +1 -1
  284. package/mdc-tabs/public-api.d.ts +1 -1
  285. package/mdc-tabs/tab-nav-bar/tab-nav-bar.d.ts +11 -0
  286. package/mdc-tabs/testing/tab-harness-filters.d.ts +3 -0
  287. package/mdc-tabs/testing/tab-nav-bar-harness.d.ts +3 -0
  288. package/mdc-tabs/testing/tab-nav-panel-harness.d.ts +23 -0
  289. package/mdc-theming/prebuilt/deeppurple-amber.css +1 -0
  290. package/mdc-theming/prebuilt/indigo-pink.css +1 -1
  291. package/mdc-theming/prebuilt/pink-bluegrey.css +1 -0
  292. package/mdc-theming/prebuilt/purple-green.css +1 -0
  293. package/mdc-tooltip/_tooltip-theme.scss +1 -1
  294. package/package.json +16 -2
  295. package/esm2020/mdc-chips/grid-focus-key-manager.mjs +0 -21
  296. package/esm2020/mdc-chips/grid-key-manager.mjs +0 -218
  297. package/esm2020/mdc-list/list-styling.mjs +0 -92
  298. package/mdc-chips/grid-focus-key-manager.d.ts +0 -28
  299. package/mdc-chips/grid-key-manager.d.ts +0 -116
  300. package/mdc-list/list-styling.d.ts +0 -40
@@ -0,0 +1,46 @@
1
+ @use 'sass:map';
2
+ @use 'sass:color';
3
+ @use '@material/checkbox/checkbox-theme' as mdc-checkbox-theme;
4
+ @use '@material/theme/theme-color' as mdc-theme-color;
5
+
6
+ // Configuration used to define the theme-related CSS variables.
7
+ $private-checkbox-theme-config: map.merge(mdc-checkbox-theme.$light-theme, (
8
+ // Exclude all of the ripple-related styles.
9
+ selected-focus-state-layer-color: null,
10
+ selected-focus-state-layer-opacity: null,
11
+ selected-hover-state-layer-color: null,
12
+ selected-hover-state-layer-opacity: null,
13
+ selected-pressed-state-layer-color: null,
14
+ selected-pressed-state-layer-opacity: null,
15
+ unselected-focus-state-layer-color: null,
16
+ unselected-focus-state-layer-opacity: null,
17
+ unselected-hover-state-layer-color: null,
18
+ unselected-hover-state-layer-opacity: null,
19
+ unselected-pressed-state-layer-color: null,
20
+ unselected-pressed-state-layer-opacity: null,
21
+ ));
22
+
23
+ // Mixin that includes the checkbox theme styles with a given palette.
24
+ // By default, the MDC checkbox always uses the `secondary` palette.
25
+ @mixin private-checkbox-styles-with-color($color, $mdc-color) {
26
+ $on-surface: mdc-theme-color.prop-value(on-surface);
27
+ $border-color: rgba($on-surface, color.opacity(mdc-checkbox-theme.$border-color));
28
+ $disabled-color: rgba($on-surface, color.opacity(mdc-checkbox-theme.$disabled-color));
29
+
30
+ @include mdc-checkbox-theme.theme((
31
+ selected-checkmark-color: mdc-theme-color.prop-value(on-#{$mdc-color}),
32
+
33
+ selected-focus-icon-color: $color,
34
+ selected-hover-icon-color: $color,
35
+ selected-icon-color: $color,
36
+ selected-pressed-icon-color: $color,
37
+ unselected-focus-icon-color: $color,
38
+ unselected-hover-icon-color: $color,
39
+
40
+ disabled-selected-icon-color: $disabled-color,
41
+ disabled-unselected-icon-color: $disabled-color,
42
+
43
+ unselected-icon-color: $border-color,
44
+ unselected-pressed-icon-color: $border-color,
45
+ ));
46
+ }
@@ -4,33 +4,21 @@
4
4
  @use '@material/theme/theme-color' as mdc-theme-color;
5
5
  @use '@material/theme/theme';
6
6
  @use 'sass:map';
7
+ @use 'sass:color';
7
8
  @use '../mdc-helpers/mdc-helpers';
8
9
  @use '../../material/core/typography/typography';
9
10
  @use '../../material/core/theming/theming';
10
11
  @use '../../material/core/ripple/ripple-theme';
11
-
12
-
13
- // Mixin that includes the checkbox theme styles with a given palette.
14
- // By default, the MDC checkbox always uses the `secondary` palette.
15
- @mixin private-checkbox-styles-with-color($color) {
16
- @include mdc-checkbox-theme.theme-deprecated(
17
- (
18
- checkmark-color: mdc-theme-color.prop-value(on-#{$color}),
19
- container-checked-color: $color,
20
- container-disabled-color: rgba(mdc-theme-color.prop-value(on-surface), 0.38),
21
- outline-color: rgba(mdc-theme-color.prop-value(on-surface), 0.54),
22
- )
23
- );
24
- }
12
+ @use './checkbox-private';
25
13
 
26
14
  // Apply ripple colors to the MatRipple element and the MDC ripple element when the
27
15
  // checkbox is selected.
28
- @mixin _selected-ripple-colors($theme, $mdcColor) {
16
+ @mixin _selected-ripple-colors($theme, $mdc-color) {
29
17
  .mdc-checkbox--selected ~ {
30
18
  .mat-mdc-checkbox-ripple {
31
19
  @include ripple-theme.color((
32
20
  foreground: (
33
- base: mdc-theme-color.prop-value($mdcColor)
21
+ base: mdc-theme-color.prop-value($mdc-color)
34
22
  ),
35
23
  ));
36
24
  }
@@ -47,21 +35,7 @@
47
35
  $accent: theming.get-color-from-palette(map.get($config, accent));
48
36
  $warn: theming.get-color-from-palette(map.get($config, warn));
49
37
 
50
- // Save original values of MDC global variables. We need to save these so we can restore the
51
- // variables to their original values and prevent unintended side effects from using this mixin.
52
- $orig-border-color: mdc-checkbox-theme.$border-color;
53
- $orig-disabled-color: mdc-checkbox-theme.$disabled-color;
54
-
55
38
  @include mdc-helpers.mat-using-mdc-theme($config) {
56
- mdc-checkbox-theme.$border-color: rgba(
57
- mdc-theme-color.prop-value(on-surface),
58
- 0.54
59
- );
60
- mdc-checkbox-theme.$disabled-color: rgba(
61
- mdc-theme-color.prop-value(on-surface),
62
- 0.26
63
- );
64
-
65
39
  .mat-mdc-checkbox {
66
40
  @include mdc-form-field.core-styles($query: mdc-helpers.$mat-theme-styles-query);
67
41
  @include ripple-theme.color((
@@ -78,25 +52,21 @@
78
52
  // class for accent and warn style, and applying the appropriate overrides below. Since we
79
53
  // don't use MDC's ripple, we also need to set the color for our replacement ripple.
80
54
  &.mat-primary {
81
- @include private-checkbox-styles-with-color(primary);
55
+ @include checkbox-private.private-checkbox-styles-with-color($primary, primary);
82
56
  @include _selected-ripple-colors($primary, primary);
83
57
  }
84
58
 
85
59
  &.mat-accent {
86
- @include private-checkbox-styles-with-color(secondary);
60
+ @include checkbox-private.private-checkbox-styles-with-color($accent, secondary);
87
61
  @include _selected-ripple-colors($accent, secondary);
88
62
  }
89
63
 
90
64
  &.mat-warn {
91
- @include private-checkbox-styles-with-color(error);
65
+ @include checkbox-private.private-checkbox-styles-with-color($warn, error);
92
66
  @include _selected-ripple-colors($warn, error);
93
67
  }
94
68
  }
95
69
  }
96
-
97
- // Restore original values of MDC global variables.
98
- mdc-checkbox-theme.$border-color: $orig-border-color;
99
- mdc-checkbox-theme.$disabled-color: $orig-disabled-color;
100
70
  }
101
71
 
102
72
  @mixin typography($config-or-theme) {
@@ -110,16 +80,19 @@
110
80
 
111
81
  @mixin density($config-or-theme) {
112
82
  $density-scale: theming.get-density-config($config-or-theme);
113
- .mat-mdc-checkbox .mdc-checkbox {
114
- @include mdc-checkbox-theme.density(
115
- $density-scale,
116
- $query: mdc-helpers.$mat-base-styles-query
117
- );
118
- }
119
83
 
120
- @if ($density-scale == -2 or $density-scale == 'minimum') {
121
- .mat-mdc-checkbox-touch-target {
122
- display: none;
84
+ @include mdc-helpers.disable-fallback-declarations {
85
+ .mat-mdc-checkbox .mdc-checkbox {
86
+ @include mdc-checkbox-theme.density(
87
+ $density-scale,
88
+ $query: mdc-helpers.$mat-base-styles-query
89
+ );
90
+ }
91
+
92
+ @if ($density-scale == -2 or $density-scale == 'minimum') {
93
+ .mat-mdc-checkbox-touch-target {
94
+ display: none;
95
+ }
123
96
  }
124
97
  }
125
98
  }
@@ -87,10 +87,6 @@ export declare class MatCheckbox extends _MatCheckboxBase implements AfterViewIn
87
87
  get inputId(): string;
88
88
  /** The `MDCCheckboxFoundation` instance for this checkbox. */
89
89
  _checkboxFoundation: MDCCheckboxFoundation;
90
- /** The set of classes that should be applied to the native input. */
91
- _classes: {
92
- [key: string]: boolean;
93
- };
94
90
  /** ControlValueAccessor onChange */
95
91
  private _cvaOnChange;
96
92
  /** ControlValueAccessor onTouch */
@@ -144,8 +140,6 @@ export declare class MatCheckbox extends _MatCheckboxBase implements AfterViewIn
144
140
  _onClick(): void;
145
141
  /** Gets the value for the `aria-checked` attribute of the native input. */
146
142
  _getAriaChecked(): 'true' | 'false' | 'mixed';
147
- /** Sets whether the given CSS class should be applied to the native input. */
148
- private _setClass;
149
143
  /**
150
144
  * Syncs the indeterminate value with the checkbox DOM node.
151
145
  *
@@ -1,10 +1,9 @@
1
1
  import * as i0 from "@angular/core";
2
2
  import * as i1 from "./checkbox";
3
3
  import * as i2 from "@angular/material-experimental/mdc-core";
4
- import * as i3 from "@angular/common";
5
- import * as i4 from "@angular/material/checkbox";
4
+ import * as i3 from "@angular/material/checkbox";
6
5
  export declare class MatCheckboxModule {
7
6
  static ɵfac: i0.ɵɵFactoryDeclaration<MatCheckboxModule, never>;
8
- static ɵmod: i0.ɵɵNgModuleDeclaration<MatCheckboxModule, [typeof i1.MatCheckbox], [typeof i2.MatCommonModule, typeof i2.MatRippleModule, typeof i3.CommonModule, typeof i4._MatCheckboxRequiredValidatorModule], [typeof i1.MatCheckbox, typeof i2.MatCommonModule, typeof i4._MatCheckboxRequiredValidatorModule]>;
7
+ static ɵmod: i0.ɵɵNgModuleDeclaration<MatCheckboxModule, [typeof i1.MatCheckbox], [typeof i2.MatCommonModule, typeof i2.MatRippleModule, typeof i3._MatCheckboxRequiredValidatorModule], [typeof i1.MatCheckbox, typeof i2.MatCommonModule, typeof i3._MatCheckboxRequiredValidatorModule]>;
9
8
  static ɵinj: i0.ɵɵInjectorDeclaration<MatCheckboxModule>;
10
9
  }
@@ -1,93 +1,93 @@
1
- @use '@material/chips/deprecated' as mdc-chips;
1
+ @use '@material/chips/chip' as mdc-chip;
2
+ @use '@material/chips/chip-theme' as mdc-chip-theme;
3
+ @use '@material/chips/chip-set' as mdc-chip-set;
2
4
  @use '@material/theme/theme-color' as mdc-theme-color;
5
+ @use '@material/theme/color-palette' as mdc-color-palette;
3
6
  @use 'sass:color';
4
7
  @use 'sass:map';
5
8
  @use '../mdc-helpers/mdc-helpers';
6
9
  @use '../../material/core/typography/typography';
7
10
  @use '../../material/core/theming/theming';
8
11
 
9
- @mixin _selected-color($color) {
10
- @include mdc-chips.fill-color($color, $query: mdc-helpers.$mat-theme-styles-query);
11
- @include mdc-chips.ink-color(text-primary-on-dark, $query: mdc-helpers.$mat-theme-styles-query);
12
- @include mdc-chips.selected-ink-color-without-ripple_(
13
- text-primary-on-dark,
14
- $query: mdc-helpers.$mat-theme-styles-query
15
- );
16
- @include mdc-chips.leading-icon-color(text-primary-on-dark,
17
- $query: mdc-helpers.$mat-theme-styles-query);
18
- @include mdc-chips.trailing-icon-color(text-primary-on-dark,
19
- $query: mdc-helpers.$mat-theme-styles-query);
12
+ // Customizes the appearance of a chip. Note that ideally we would be doing this using the
13
+ // `theme-styles` mixin, however it has the following problems:
14
+ // 1. Some of MDC's base styles have **very** high specificity. E.g. setting the background of a
15
+ // non-selected, enabled chip uses a selector like `.chip:not(.selected):not(.disabled)` instead of
16
+ // just `.chip`. This specificity increase has a ripple effect over all other components that are
17
+ // built on top of ours, making overrides extremely difficult and brittle.
18
+ // 2. Including the individual mixins allows us to avoid a lot of unnecessary CSS (~35kb in the
19
+ // dev app theme).
20
+ @mixin _chip-variant($background, $foreground) {
21
+ @include mdc-chip-theme.container-color($background);
22
+ @include mdc-chip-theme.icon-color($foreground);
23
+ @include mdc-chip-theme.trailing-action-color($foreground);
24
+ @include mdc-chip-theme.checkmark-color($foreground);
25
+ @include mdc-chip-theme.text-label-color($foreground);
26
+
27
+ // Technically the avatar is only supposed to have an image, but we also allow for icons.
28
+ // Set the color so the icons inherit the correct color.
29
+ .mat-mdc-chip-avatar {
30
+ color: $foreground;
31
+ }
32
+ }
33
+
34
+ @mixin _colored-chip($palette) {
35
+ $background: theming.get-color-from-palette($palette);
36
+ $foreground: theming.get-color-from-palette($palette, default-contrast);
37
+
38
+ &.mat-mdc-chip-selected,
39
+ &.mat-mdc-chip-highlighted {
40
+ @include _chip-variant($background, $foreground);
41
+ }
20
42
  }
21
43
 
22
44
  @mixin color($config-or-theme) {
23
45
  $config: theming.get-color-config($config-or-theme);
24
- $primary: theming.get-color-from-palette(map.get($config, primary));
25
- $accent: theming.get-color-from-palette(map.get($config, accent));
26
- $warn: theming.get-color-from-palette(map.get($config, warn));
27
- $background: map.get($config, background);
28
- $unselected-background: theming.get-color-from-palette($background, unselected-chip);
29
-
30
- // Save original values of MDC global variables. We need to save these so we can restore the
31
- // variables to their original values and prevent unintended side effects from using this mixin.
32
- $orig-mdc-chips-fill-color-default: mdc-chips.$fill-color-default;
33
- $orig-mdc-chips-ink-color-default: mdc-chips.$ink-color-default;
34
- $orig-mdc-chips-icon-color: mdc-chips.$icon-color;
46
+ $primary: map.get($config, primary);
47
+ $accent: map.get($config, accent);
48
+ $warn: map.get($config, warn);
49
+ $foreground: map.get($config, foreground);
50
+ $is-dark: map.get($config, is-dark);
35
51
 
36
52
  @include mdc-helpers.mat-using-mdc-theme($config) {
37
- mdc-chips.$fill-color-default:
38
- color.mix(mdc-theme-color.prop-value(on-surface), mdc-theme-color.prop-value(surface), 12%);
39
- mdc-chips.$ink-color-default: rgba(mdc-theme-color.prop-value(on-surface), 0.87);
40
- mdc-chips.$icon-color: mdc-theme-color.prop-value(on-surface);
41
-
42
- @include mdc-chips.set-core-styles($query: mdc-helpers.$mat-theme-styles-query);
43
- @include mdc-chips.without-ripple($query: mdc-helpers.$mat-theme-styles-query);
53
+ .mat-mdc-standard-chip {
54
+ @include _chip-variant(
55
+ color.mix(mdc-theme-color.prop-value(on-surface), mdc-theme-color.prop-value(surface), 12%),
56
+ if($is-dark, mdc-color-palette.$grey-50, mdc-color-palette.$grey-900)
57
+ );
44
58
 
45
- .mat-mdc-chip {
46
- @include mdc-chips.fill-color-accessible($unselected-background,
47
- $query: mdc-helpers.$mat-theme-styles-query);
48
-
49
- // mdc-chip-fill-color-accessible includes mdc-chip-selected-ink-color which overrides the
50
- // opacity so selected chips always show a ripple.
51
- // Include the same mixins but use mdc-chip-selected-ink-color-without-ripple
52
59
  &.mat-primary {
53
- &.mdc-chip--selected, &.mat-mdc-chip-highlighted {
54
- @include _selected-color($primary);
55
- }
60
+ @include _colored-chip($primary);
56
61
  }
57
62
 
58
63
  &.mat-accent {
59
- &.mdc-chip--selected, &.mat-mdc-chip-highlighted {
60
- @include _selected-color($accent);
61
- }
64
+ @include _colored-chip($accent);
62
65
  }
63
66
 
64
67
  &.mat-warn {
65
- &.mdc-chip--selected, &.mat-mdc-chip-highlighted {
66
- @include _selected-color($warn);
67
- }
68
+ @include _colored-chip($warn);
68
69
  }
69
70
  }
70
71
  }
71
72
 
72
- // Restore original values of MDC global variables.
73
- mdc-chips.$fill-color-default: $orig-mdc-chips-fill-color-default;
74
- mdc-chips.$ink-color-default: $orig-mdc-chips-ink-color-default;
75
- mdc-chips.$icon-color: $orig-mdc-chips-icon-color;
73
+ .mat-mdc-chip-focus-overlay {
74
+ background: map.get($foreground, base);
75
+ }
76
76
  }
77
77
 
78
78
  @mixin typography($config-or-theme) {
79
79
  $config: typography.private-typography-to-2018-config(
80
80
  theming.get-typography-config($config-or-theme));
81
- @include mdc-chips.set-core-styles($query: mdc-helpers.$mat-typography-styles-query);
81
+ @include mdc-chip-set.core-styles($query: mdc-helpers.$mat-typography-styles-query);
82
82
  @include mdc-helpers.mat-using-mdc-typography($config) {
83
- @include mdc-chips.without-ripple($query: mdc-helpers.$mat-typography-styles-query);
83
+ @include mdc-chip.without-ripple-styles($query: mdc-helpers.$mat-typography-styles-query);
84
84
  }
85
85
  }
86
86
 
87
87
  @mixin density($config-or-theme) {
88
88
  $density-scale: theming.get-density-config($config-or-theme);
89
89
  .mat-mdc-chip {
90
- @include mdc-chips.density($density-scale, $query: mdc-helpers.$mat-base-styles-query);
90
+ @include mdc-chip-theme.density($density-scale, $query: mdc-helpers.$mat-base-styles-query);
91
91
  }
92
92
  }
93
93
 
@@ -0,0 +1,40 @@
1
+ /**
2
+ * @license
3
+ * Copyright Google LLC All Rights Reserved.
4
+ *
5
+ * Use of this source code is governed by an MIT-style license that can be
6
+ * found in the LICENSE file at https://angular.io/license
7
+ */
8
+ import { AfterViewInit, ChangeDetectorRef, ElementRef, OnChanges, OnDestroy, SimpleChanges } from '@angular/core';
9
+ import { MDCChipActionAdapter, MDCChipActionFoundation } from '@material/chips';
10
+ import { CanDisable, HasTabIndex } from '@angular/material-experimental/mdc-core';
11
+ import * as i0 from "@angular/core";
12
+ declare const _MatChipActionMixinBase: import("@angular/material-experimental/mdc-core")._Constructor<HasTabIndex> & import("@angular/material-experimental/mdc-core")._AbstractConstructor<HasTabIndex> & import("@angular/material-experimental/mdc-core")._Constructor<CanDisable> & import("@angular/material-experimental/mdc-core")._AbstractConstructor<CanDisable> & {
13
+ new (): {};
14
+ };
15
+ /**
16
+ * Interactive element within a chip.
17
+ * @docs-private
18
+ */
19
+ export declare class MatChipAction extends _MatChipActionMixinBase implements AfterViewInit, OnDestroy, CanDisable, HasTabIndex, OnChanges {
20
+ _elementRef: ElementRef;
21
+ private _changeDetectorRef;
22
+ private _document;
23
+ private _foundation;
24
+ private _adapter;
25
+ /** Whether the action is interactive. */
26
+ isInteractive: boolean;
27
+ _handleClick(_event: MouseEvent): void;
28
+ _handleKeydown(event: KeyboardEvent): void;
29
+ protected _createFoundation(adapter: MDCChipActionAdapter): MDCChipActionFoundation;
30
+ constructor(_elementRef: ElementRef, _document: any, _changeDetectorRef: ChangeDetectorRef);
31
+ ngAfterViewInit(): void;
32
+ ngOnChanges(changes: SimpleChanges): void;
33
+ ngOnDestroy(): void;
34
+ focus(): void;
35
+ _getFoundation(): MDCChipActionFoundation;
36
+ _updateTabindex(value: number): void;
37
+ static ɵfac: i0.ɵɵFactoryDeclaration<MatChipAction, never>;
38
+ static ɵdir: i0.ɵɵDirectiveDeclaration<MatChipAction, "[matChipAction]", never, { "disabled": "disabled"; "tabIndex": "tabIndex"; "isInteractive": "isInteractive"; }, {}, never>;
39
+ }
40
+ export {};
@@ -5,18 +5,17 @@
5
5
  * Use of this source code is governed by an MIT-style license that can be
6
6
  * found in the LICENSE file at https://angular.io/license
7
7
  */
8
- import { Directionality } from '@angular/cdk/bidi';
9
8
  import { BooleanInput } from '@angular/cdk/coercion';
10
9
  import { AfterContentInit, AfterViewInit, ChangeDetectorRef, DoCheck, ElementRef, EventEmitter, OnDestroy, QueryList } from '@angular/core';
11
10
  import { ControlValueAccessor, FormGroupDirective, NgControl, NgForm } from '@angular/forms';
12
11
  import { CanUpdateErrorState, ErrorStateMatcher } from '@angular/material-experimental/mdc-core';
13
12
  import { MatFormFieldControl } from '@angular/material-experimental/mdc-form-field';
13
+ import { LiveAnnouncer } from '@angular/cdk/a11y';
14
14
  import { MatChipTextControl } from './chip-text-control';
15
15
  import { Observable } from 'rxjs';
16
16
  import { MatChipEvent } from './chip';
17
17
  import { MatChipRow } from './chip-row';
18
18
  import { MatChipSet } from './chip-set';
19
- import { GridFocusKeyManager } from './grid-focus-key-manager';
20
19
  import * as i0 from "@angular/core";
21
20
  /** Change event object that is emitted when the chip grid value has changed. */
22
21
  export declare class MatChipGridChange {
@@ -40,7 +39,7 @@ declare class MatChipGridBase extends MatChipSet {
40
39
  _parentFormGroup: FormGroupDirective;
41
40
  /** @docs-private */
42
41
  ngControl: NgControl;
43
- constructor(_elementRef: ElementRef, _changeDetectorRef: ChangeDetectorRef, _dir: Directionality, _defaultErrorStateMatcher: ErrorStateMatcher, _parentForm: NgForm, _parentFormGroup: FormGroupDirective,
42
+ constructor(liveAnnouncer: LiveAnnouncer, document: any, elementRef: ElementRef, changeDetectorRef: ChangeDetectorRef, _defaultErrorStateMatcher: ErrorStateMatcher, _parentForm: NgForm, _parentFormGroup: FormGroupDirective,
44
43
  /** @docs-private */
45
44
  ngControl: NgControl);
46
45
  }
@@ -55,10 +54,6 @@ export declare class MatChipGrid extends _MatChipGridMixinBase implements AfterC
55
54
  * @docs-private
56
55
  */
57
56
  readonly controlType: string;
58
- /** Subscription to focus changes in the chips. */
59
- private _chipFocusSubscription;
60
- /** Subscription to blur changes in the chips. */
61
- private _chipBlurSubscription;
62
57
  /** The chip input to add more chips */
63
58
  protected _chipInput: MatChipTextControl;
64
59
  /**
@@ -71,8 +66,6 @@ export declare class MatChipGrid extends _MatChipGridMixinBase implements AfterC
71
66
  * @docs-private
72
67
  */
73
68
  _onChange: (value: any) => void;
74
- /** The GridFocusKeyManager which handles focus. */
75
- _keyManager: GridFocusKeyManager;
76
69
  /**
77
70
  * Implemented as part of MatFormFieldControl.
78
71
  * @docs-private
@@ -134,7 +127,7 @@ export declare class MatChipGrid extends _MatChipGridMixinBase implements AfterC
134
127
  */
135
128
  readonly valueChange: EventEmitter<any>;
136
129
  _chips: QueryList<MatChipRow>;
137
- constructor(_elementRef: ElementRef, _changeDetectorRef: ChangeDetectorRef, _dir: Directionality, _parentForm: NgForm, _parentFormGroup: FormGroupDirective, _defaultErrorStateMatcher: ErrorStateMatcher, ngControl: NgControl);
130
+ constructor(liveAnnouncer: LiveAnnouncer, document: any, elementRef: ElementRef, changeDetectorRef: ChangeDetectorRef, parentForm: NgForm, parentFormGroup: FormGroupDirective, defaultErrorStateMatcher: ErrorStateMatcher, ngControl: NgControl);
138
131
  ngAfterContentInit(): void;
139
132
  ngAfterViewInit(): void;
140
133
  ngDoCheck(): void;
@@ -183,19 +176,10 @@ export declare class MatChipGrid extends _MatChipGridMixinBase implements AfterC
183
176
  * user to tab out of it. This prevents the grid from capturing focus and redirecting
184
177
  * it back to the first chip, creating a focus trap, if it user tries to tab away.
185
178
  */
186
- _allowFocusEscape(): void;
179
+ protected _allowFocusEscape(): void;
187
180
  /** Handles custom keyboard events. */
188
181
  _keydown(event: KeyboardEvent): void;
189
- /** Unsubscribes from all chip events. */
190
- protected _dropSubscriptions(): void;
191
- /** Subscribes to events on the child chips. */
192
- protected _subscribeToChipEvents(): void;
193
- /** Initializes the key manager to manage focus. */
194
- private _initKeyManager;
195
- /** Subscribes to chip focus events. */
196
- private _listenToChipsFocus;
197
- /** Subscribes to chip blur events. */
198
- private _listenToChipsBlur;
182
+ _focusLastChip(): void;
199
183
  /** Emits change event to set the model value. */
200
184
  private _propagateChanges;
201
185
  /** Mark the field as touched */
@@ -204,9 +188,7 @@ export declare class MatChipGrid extends _MatChipGridMixinBase implements AfterC
204
188
  * If the amount of chips changed, we need to focus the next closest chip.
205
189
  */
206
190
  private _updateFocusForDestroyedChips;
207
- /** Focus input element. */
208
- private _focusInput;
209
- static ɵfac: i0.ɵɵFactoryDeclaration<MatChipGrid, [null, null, { optional: true; }, { optional: true; }, { optional: true; }, null, { optional: true; self: true; }]>;
191
+ static ɵfac: i0.ɵɵFactoryDeclaration<MatChipGrid, [null, null, null, null, { optional: true; }, { optional: true; }, null, { optional: true; self: true; }]>;
210
192
  static ɵcmp: i0.ɵɵComponentDeclaration<MatChipGrid, "mat-chip-grid", never, { "tabIndex": "tabIndex"; "disabled": "disabled"; "placeholder": "placeholder"; "required": "required"; "value": "value"; "errorStateMatcher": "errorStateMatcher"; }, { "change": "change"; "valueChange": "valueChange"; }, ["_chips"], ["*"]>;
211
193
  }
212
194
  export {};
@@ -5,9 +5,9 @@
5
5
  * Use of this source code is governed by an MIT-style license that can be
6
6
  * found in the LICENSE file at https://angular.io/license
7
7
  */
8
- import { ChangeDetectorRef, ElementRef, InjectionToken, OnDestroy } from '@angular/core';
9
- import { CanDisable, HasTabIndex } from '@angular/material-experimental/mdc-core';
10
- import { Subject } from 'rxjs';
8
+ import { InjectionToken } from '@angular/core';
9
+ import { MDCChipActionAdapter, MDCChipTrailingActionFoundation } from '@material/chips';
10
+ import { MatChipAction } from './chip-action';
11
11
  import * as i0 from "@angular/core";
12
12
  /**
13
13
  * Injection token that can be used to reference instances of `MatChipAvatar`. It serves as
@@ -20,11 +20,6 @@ export declare const MAT_CHIP_AVATAR: InjectionToken<MatChipAvatar>;
20
20
  * @docs-private
21
21
  */
22
22
  export declare class MatChipAvatar {
23
- private _changeDetectorRef;
24
- private _elementRef;
25
- constructor(_changeDetectorRef: ChangeDetectorRef, _elementRef: ElementRef<HTMLElement>);
26
- /** Sets whether the given CSS class should be applied to the leading icon. */
27
- setClass(cssClass: string, active: boolean): void;
28
23
  static ɵfac: i0.ɵɵFactoryDeclaration<MatChipAvatar, never>;
29
24
  static ɵdir: i0.ɵɵDirectiveDeclaration<MatChipAvatar, "mat-chip-avatar, [matChipAvatar]", never, {}, {}, never>;
30
25
  }
@@ -38,16 +33,13 @@ export declare const MAT_CHIP_TRAILING_ICON: InjectionToken<MatChipTrailingIcon>
38
33
  * Directive to add CSS classes to and configure attributes for chip trailing icon.
39
34
  * @docs-private
40
35
  */
41
- export declare class MatChipTrailingIcon implements OnDestroy {
42
- _elementRef: ElementRef;
43
- private _foundation;
44
- private _adapter;
45
- constructor(_elementRef: ElementRef);
46
- ngOnDestroy(): void;
47
- focus(): void;
48
- /** Sets an attribute on the icon. */
49
- setAttribute(name: string, value: string): void;
50
- isNavigable(): boolean;
36
+ export declare class MatChipTrailingIcon extends MatChipAction {
37
+ /**
38
+ * MDC considers all trailing actions as a remove icon,
39
+ * but we support non-interactive trailing icons.
40
+ */
41
+ isInteractive: boolean;
42
+ protected _createFoundation(adapter: MDCChipActionAdapter): MDCChipTrailingActionFoundation;
51
43
  static ɵfac: i0.ɵɵFactoryDeclaration<MatChipTrailingIcon, never>;
52
44
  static ɵdir: i0.ɵɵDirectiveDeclaration<MatChipTrailingIcon, "mat-chip-trailing-icon, [matChipTrailingIcon]", never, {}, {}, never>;
53
45
  }
@@ -57,14 +49,6 @@ export declare class MatChipTrailingIcon implements OnDestroy {
57
49
  * retention of the class and its directive metadata.
58
50
  */
59
51
  export declare const MAT_CHIP_REMOVE: InjectionToken<MatChipRemove>;
60
- /**
61
- * Boilerplate for applying mixins to MatChipRemove.
62
- * @docs-private
63
- */
64
- declare class MatChipRemoveBase extends MatChipTrailingIcon {
65
- constructor(elementRef: ElementRef);
66
- }
67
- declare const _MatChipRemoveMixinBase: import("@angular/material-experimental/mdc-core")._Constructor<HasTabIndex> & import("@angular/material-experimental/mdc-core")._AbstractConstructor<HasTabIndex> & import("@angular/material-experimental/mdc-core")._Constructor<CanDisable> & import("@angular/material-experimental/mdc-core")._AbstractConstructor<CanDisable> & typeof MatChipRemoveBase;
68
52
  /**
69
53
  * Directive to remove the parent chip when the trailing icon is clicked or
70
54
  * when the ENTER key is pressed on it.
@@ -80,17 +64,10 @@ declare const _MatChipRemoveMixinBase: import("@angular/material-experimental/md
80
64
  * </mat-chip>
81
65
  * ```
82
66
  */
83
- export declare class MatChipRemove extends _MatChipRemoveMixinBase implements CanDisable, HasTabIndex {
84
- /**
85
- * Emits when the user interacts with the icon.
86
- * @docs-private
87
- */
88
- readonly interaction: Subject<MouseEvent | KeyboardEvent>;
89
- constructor(elementRef: ElementRef);
90
- /** Emits a MouseEvent when the user clicks on the remove icon. */
67
+ export declare class MatChipRemove extends MatChipAction {
68
+ protected _createFoundation(adapter: MDCChipActionAdapter): MDCChipTrailingActionFoundation;
91
69
  _handleClick(event: MouseEvent): void;
92
- focus(): void;
70
+ _handleKeydown(event: KeyboardEvent): void;
93
71
  static ɵfac: i0.ɵɵFactoryDeclaration<MatChipRemove, never>;
94
- static ɵdir: i0.ɵɵDirectiveDeclaration<MatChipRemove, "[matChipRemove]", never, { "disabled": "disabled"; "tabIndex": "tabIndex"; }, {}, never>;
72
+ static ɵdir: i0.ɵɵDirectiveDeclaration<MatChipRemove, "[matChipRemove]", never, {}, {}, never>;
95
73
  }
96
- export {};
@@ -5,13 +5,11 @@
5
5
  * Use of this source code is governed by an MIT-style license that can be
6
6
  * found in the LICENSE file at https://angular.io/license
7
7
  */
8
- import { FocusKeyManager } from '@angular/cdk/a11y';
9
- import { Directionality } from '@angular/cdk/bidi';
10
8
  import { BooleanInput } from '@angular/cdk/coercion';
11
- import { AfterContentInit, ChangeDetectorRef, ElementRef, EventEmitter, QueryList } from '@angular/core';
9
+ import { AfterContentInit, EventEmitter, OnDestroy, QueryList } from '@angular/core';
12
10
  import { ControlValueAccessor } from '@angular/forms';
13
11
  import { Observable } from 'rxjs';
14
- import { MatChip, MatChipEvent } from './chip';
12
+ import { MatChipEvent } from './chip';
15
13
  import { MatChipOption, MatChipSelectionChange } from './chip-option';
16
14
  import { MatChipSet } from './chip-set';
17
15
  import * as i0 from "@angular/core";
@@ -37,15 +35,7 @@ export declare const MAT_CHIP_LISTBOX_CONTROL_VALUE_ACCESSOR: any;
37
35
  * An extension of the MatChipSet component that supports chip selection.
38
36
  * Used with MatChipOption chips.
39
37
  */
40
- export declare class MatChipListbox extends MatChipSet implements AfterContentInit, ControlValueAccessor {
41
- /** Subscription to selection changes in the chips. */
42
- private _chipSelectionSubscription;
43
- /** Subscription to blur changes in the chips. */
44
- private _chipBlurSubscription;
45
- /** Subscription to focus changes in the chips. */
46
- private _chipFocusSubscription;
47
- /** The FocusKeyManager which handles focus. */
48
- _keyManager: FocusKeyManager<MatChip>;
38
+ export declare class MatChipListbox extends MatChipSet implements AfterContentInit, OnDestroy, ControlValueAccessor {
49
39
  /**
50
40
  * Function when touched. Set as part of ControlValueAccessor implementation.
51
41
  * @docs-private
@@ -100,7 +90,6 @@ export declare class MatChipListbox extends MatChipSet implements AfterContentIn
100
90
  /** Event emitted when the selected chip listbox value has been changed by the user. */
101
91
  readonly change: EventEmitter<MatChipListboxChange>;
102
92
  _chips: QueryList<MatChipOption>;
103
- constructor(elementRef: ElementRef, changeDetectorRef: ChangeDetectorRef, _dir: Directionality);
104
93
  ngAfterContentInit(): void;
105
94
  /**
106
95
  * Focuses the first selected chip in this chip listbox, or the first non-disabled chip when there
@@ -129,19 +118,8 @@ export declare class MatChipListbox extends MatChipSet implements AfterContentIn
129
118
  setDisabledState(isDisabled: boolean): void;
130
119
  /** Selects all chips with value. */
131
120
  _setSelectionByValue(value: any, isUserInput?: boolean): void;
132
- /** Selects or deselects a chip by id. */
133
- _setSelected(index: number, selected: boolean): void;
134
121
  /** When blurred, marks the field as touched when focus moved outside the chip listbox. */
135
122
  _blur(): void;
136
- /**
137
- * Removes the `tabindex` from the chip listbox and resets it back afterwards, allowing the
138
- * user to tab out of it. This prevents the listbox from capturing focus and redirecting
139
- * it back to the first chip, creating a focus trap, if it user tries to tab away.
140
- */
141
- _allowFocusEscape(): void;
142
- /**
143
- * Handles custom keyboard shortcuts, and passes other keyboard events to the keyboard manager.
144
- */
145
123
  _keydown(event: KeyboardEvent): void;
146
124
  /** Marks the field as touched */
147
125
  private _markAsTouched;
@@ -163,27 +141,13 @@ export declare class MatChipListbox extends MatChipSet implements AfterContentIn
163
141
  private _selectValue;
164
142
  /** Syncs the chip-listbox selection state with the individual chips. */
165
143
  private _syncListboxProperties;
166
- /** Sets the mdc classes for single vs multi selection. */
167
- private _updateMdcSelectionClasses;
168
- /** Initializes the key manager to manage focus. */
169
- private _initKeyManager;
170
144
  /** Returns the first selected chip in this listbox, or undefined if no chips are selected. */
171
145
  private _getFirstSelectedChip;
172
- /** Unsubscribes from all chip events. */
173
- protected _dropSubscriptions(): void;
174
- /** Subscribes to events on the child chips. */
175
- protected _subscribeToChipEvents(): void;
176
- /** Subscribes to chip focus events. */
177
- private _listenToChipsFocus;
178
- /** Subscribes to chip blur events. */
179
- private _listenToChipsBlur;
180
- /** Subscribes to selection changes in the option chips. */
181
- private _listenToChipsSelection;
182
146
  /**
183
147
  * If the amount of chips changed, we need to update the
184
148
  * key manager state and focus the next closest chip.
185
149
  */
186
150
  private _updateFocusForDestroyedChips;
187
- static ɵfac: i0.ɵɵFactoryDeclaration<MatChipListbox, [null, null, { optional: true; }]>;
151
+ static ɵfac: i0.ɵɵFactoryDeclaration<MatChipListbox, never>;
188
152
  static ɵcmp: i0.ɵɵComponentDeclaration<MatChipListbox, "mat-chip-listbox", never, { "tabIndex": "tabIndex"; "multiple": "multiple"; "ariaOrientation": "aria-orientation"; "selectable": "selectable"; "compareWith": "compareWith"; "required": "required"; "value": "value"; }, { "change": "change"; }, ["_chips"], ["*"]>;
189
153
  }