@angular/material-experimental 13.2.0-rc.0 → 14.0.0-next.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 (254) hide show
  1. package/esm2020/column-resize/column-resize-directives/column-resize-flex.mjs +4 -4
  2. package/esm2020/column-resize/column-resize-directives/column-resize.mjs +4 -4
  3. package/esm2020/column-resize/column-resize-directives/default-enabled-column-resize-flex.mjs +4 -4
  4. package/esm2020/column-resize/column-resize-directives/default-enabled-column-resize.mjs +4 -4
  5. package/esm2020/column-resize/column-resize-module.mjs +13 -13
  6. package/esm2020/column-resize/overlay-handle.mjs +4 -4
  7. package/esm2020/column-resize/resizable-directives/default-enabled-resizable.mjs +4 -4
  8. package/esm2020/column-resize/resizable-directives/resizable.mjs +4 -4
  9. package/esm2020/column-resize/resize-strategy.mjs +4 -4
  10. package/esm2020/mdc-autocomplete/autocomplete-origin.mjs +4 -4
  11. package/esm2020/mdc-autocomplete/autocomplete-trigger.mjs +4 -4
  12. package/esm2020/mdc-autocomplete/autocomplete.mjs +4 -4
  13. package/esm2020/mdc-autocomplete/module.mjs +5 -5
  14. package/esm2020/mdc-button/button-base.mjs +9 -9
  15. package/esm2020/mdc-button/button.mjs +9 -9
  16. package/esm2020/mdc-button/fab.mjs +17 -17
  17. package/esm2020/mdc-button/icon-button.mjs +11 -13
  18. package/esm2020/mdc-button/module.mjs +5 -5
  19. package/esm2020/mdc-card/card.mjs +43 -43
  20. package/esm2020/mdc-card/module.mjs +5 -5
  21. package/esm2020/mdc-checkbox/checkbox.mjs +9 -16
  22. package/esm2020/mdc-checkbox/module.mjs +6 -7
  23. package/esm2020/mdc-chips/chip-action.mjs +4 -4
  24. package/esm2020/mdc-chips/chip-edit-input.mjs +4 -4
  25. package/esm2020/mdc-chips/chip-grid.mjs +7 -9
  26. package/esm2020/mdc-chips/chip-icons.mjs +10 -10
  27. package/esm2020/mdc-chips/chip-input.mjs +4 -4
  28. package/esm2020/mdc-chips/chip-listbox.mjs +4 -4
  29. package/esm2020/mdc-chips/chip-option.mjs +4 -4
  30. package/esm2020/mdc-chips/chip-row.mjs +4 -4
  31. package/esm2020/mdc-chips/chip-set.mjs +4 -4
  32. package/esm2020/mdc-chips/chip.mjs +4 -4
  33. package/esm2020/mdc-chips/module.mjs +5 -5
  34. package/esm2020/mdc-core/option/index.mjs +5 -5
  35. package/esm2020/mdc-core/option/optgroup.mjs +4 -4
  36. package/esm2020/mdc-core/option/option.mjs +5 -5
  37. package/esm2020/mdc-dialog/dialog-container.mjs +4 -4
  38. package/esm2020/mdc-dialog/dialog-content-directives.mjs +13 -13
  39. package/esm2020/mdc-dialog/dialog.mjs +4 -4
  40. package/esm2020/mdc-dialog/module.mjs +5 -5
  41. package/esm2020/mdc-form-field/directives/error.mjs +4 -4
  42. package/esm2020/mdc-form-field/directives/floating-label.mjs +4 -4
  43. package/esm2020/mdc-form-field/directives/hint.mjs +4 -4
  44. package/esm2020/mdc-form-field/directives/label.mjs +4 -4
  45. package/esm2020/mdc-form-field/directives/line-ripple.mjs +4 -4
  46. package/esm2020/mdc-form-field/directives/notched-outline.mjs +4 -4
  47. package/esm2020/mdc-form-field/directives/prefix.mjs +4 -4
  48. package/esm2020/mdc-form-field/directives/suffix.mjs +4 -4
  49. package/esm2020/mdc-form-field/form-field.mjs +21 -5
  50. package/esm2020/mdc-form-field/module.mjs +5 -5
  51. package/esm2020/mdc-input/input.mjs +4 -4
  52. package/esm2020/mdc-input/module.mjs +5 -5
  53. package/esm2020/mdc-list/action-list.mjs +4 -4
  54. package/esm2020/mdc-list/interactive-list-base.mjs +4 -4
  55. package/esm2020/mdc-list/list-base.mjs +7 -7
  56. package/esm2020/mdc-list/list-item-sections.mjs +19 -19
  57. package/esm2020/mdc-list/list-option.mjs +6 -6
  58. package/esm2020/mdc-list/list.mjs +7 -7
  59. package/esm2020/mdc-list/module.mjs +5 -5
  60. package/esm2020/mdc-list/nav-list.mjs +4 -4
  61. package/esm2020/mdc-list/selection-list.mjs +4 -4
  62. package/esm2020/mdc-list/subheader.mjs +4 -4
  63. package/esm2020/mdc-menu/directives.mjs +7 -7
  64. package/esm2020/mdc-menu/menu-item.mjs +4 -4
  65. package/esm2020/mdc-menu/menu.mjs +4 -4
  66. package/esm2020/mdc-menu/module.mjs +5 -5
  67. package/esm2020/mdc-paginator/module.mjs +5 -5
  68. package/esm2020/mdc-paginator/paginator.mjs +4 -4
  69. package/esm2020/mdc-progress-bar/module.mjs +5 -5
  70. package/esm2020/mdc-progress-bar/progress-bar.mjs +4 -4
  71. package/esm2020/mdc-progress-spinner/module.mjs +5 -5
  72. package/esm2020/mdc-progress-spinner/progress-spinner.mjs +4 -4
  73. package/esm2020/mdc-radio/module.mjs +5 -5
  74. package/esm2020/mdc-radio/radio.mjs +8 -8
  75. package/esm2020/mdc-select/module.mjs +5 -5
  76. package/esm2020/mdc-select/select.mjs +7 -7
  77. package/esm2020/mdc-sidenav/module.mjs +5 -5
  78. package/esm2020/mdc-slide-toggle/module.mjs +5 -5
  79. package/esm2020/mdc-slide-toggle/slide-toggle.mjs +4 -4
  80. package/esm2020/mdc-slider/global-change-and-input-listener.mjs +4 -4
  81. package/esm2020/mdc-slider/module.mjs +5 -5
  82. package/esm2020/mdc-slider/slider.mjs +10 -10
  83. package/esm2020/mdc-snack-bar/module.mjs +5 -5
  84. package/esm2020/mdc-snack-bar/simple-snack-bar.mjs +4 -4
  85. package/esm2020/mdc-snack-bar/snack-bar-container.mjs +4 -4
  86. package/esm2020/mdc-snack-bar/snack-bar-content.mjs +10 -10
  87. package/esm2020/mdc-snack-bar/snack-bar.mjs +4 -4
  88. package/esm2020/mdc-table/cell.mjs +22 -22
  89. package/esm2020/mdc-table/module.mjs +5 -5
  90. package/esm2020/mdc-table/row.mjs +22 -22
  91. package/esm2020/mdc-table/table.mjs +7 -7
  92. package/esm2020/mdc-table/text-column.mjs +4 -4
  93. package/esm2020/mdc-tabs/module.mjs +5 -5
  94. package/esm2020/mdc-tabs/tab-body.mjs +8 -8
  95. package/esm2020/mdc-tabs/tab-content.mjs +4 -4
  96. package/esm2020/mdc-tabs/tab-group.mjs +6 -6
  97. package/esm2020/mdc-tabs/tab-header.mjs +4 -4
  98. package/esm2020/mdc-tabs/tab-label-wrapper.mjs +4 -4
  99. package/esm2020/mdc-tabs/tab-label.mjs +4 -4
  100. package/esm2020/mdc-tabs/tab-nav-bar/tab-nav-bar.mjs +12 -12
  101. package/esm2020/mdc-tabs/tab.mjs +4 -4
  102. package/esm2020/mdc-tooltip/module.mjs +5 -5
  103. package/esm2020/mdc-tooltip/tooltip.mjs +7 -7
  104. package/esm2020/menubar/menubar-item.mjs +4 -4
  105. package/esm2020/menubar/menubar-module.mjs +5 -5
  106. package/esm2020/menubar/menubar.mjs +4 -4
  107. package/esm2020/popover-edit/lens-directives.mjs +10 -10
  108. package/esm2020/popover-edit/popover-edit-module.mjs +5 -5
  109. package/esm2020/popover-edit/table-directives.mjs +13 -13
  110. package/esm2020/selection/row-selection.mjs +4 -4
  111. package/esm2020/selection/select-all.mjs +4 -4
  112. package/esm2020/selection/selection-column.mjs +4 -4
  113. package/esm2020/selection/selection-module.mjs +5 -5
  114. package/esm2020/selection/selection-toggle.mjs +4 -4
  115. package/esm2020/selection/selection.mjs +4 -4
  116. package/esm2020/version.mjs +1 -1
  117. package/fesm2015/column-resize.mjs +36 -36
  118. package/fesm2015/column-resize.mjs.map +1 -1
  119. package/fesm2015/material-experimental.mjs +1 -1
  120. package/fesm2015/material-experimental.mjs.map +1 -1
  121. package/fesm2015/mdc-autocomplete.mjs +13 -13
  122. package/fesm2015/mdc-autocomplete.mjs.map +1 -1
  123. package/fesm2015/mdc-button.mjs +46 -48
  124. package/fesm2015/mdc-button.mjs.map +1 -1
  125. package/fesm2015/mdc-card.mjs +46 -46
  126. package/fesm2015/mdc-card.mjs.map +1 -1
  127. package/fesm2015/mdc-checkbox.mjs +13 -21
  128. package/fesm2015/mdc-checkbox.mjs.map +1 -1
  129. package/fesm2015/mdc-chips.mjs +43 -45
  130. package/fesm2015/mdc-chips.mjs.map +1 -1
  131. package/fesm2015/mdc-core.mjs +11 -11
  132. package/fesm2015/mdc-core.mjs.map +1 -1
  133. package/fesm2015/mdc-dialog.mjs +22 -22
  134. package/fesm2015/mdc-dialog.mjs.map +1 -1
  135. package/fesm2015/mdc-form-field.mjs +50 -32
  136. package/fesm2015/mdc-form-field.mjs.map +1 -1
  137. package/fesm2015/mdc-input.mjs +7 -7
  138. package/fesm2015/mdc-input.mjs.map +1 -1
  139. package/fesm2015/mdc-list.mjs +54 -54
  140. package/fesm2015/mdc-list.mjs.map +1 -1
  141. package/fesm2015/mdc-menu.mjs +16 -16
  142. package/fesm2015/mdc-menu.mjs.map +1 -1
  143. package/fesm2015/mdc-paginator.mjs +7 -7
  144. package/fesm2015/mdc-paginator.mjs.map +1 -1
  145. package/fesm2015/mdc-progress-bar.mjs +7 -7
  146. package/fesm2015/mdc-progress-bar.mjs.map +1 -1
  147. package/fesm2015/mdc-progress-spinner.mjs +7 -7
  148. package/fesm2015/mdc-progress-spinner.mjs.map +1 -1
  149. package/fesm2015/mdc-radio.mjs +11 -11
  150. package/fesm2015/mdc-radio.mjs.map +1 -1
  151. package/fesm2015/mdc-select.mjs +10 -10
  152. package/fesm2015/mdc-select.mjs.map +1 -1
  153. package/fesm2015/mdc-sidenav.mjs +4 -4
  154. package/fesm2015/mdc-sidenav.mjs.map +1 -1
  155. package/fesm2015/mdc-slide-toggle.mjs +7 -7
  156. package/fesm2015/mdc-slide-toggle.mjs.map +1 -1
  157. package/fesm2015/mdc-slider.mjs +16 -16
  158. package/fesm2015/mdc-slider.mjs.map +1 -1
  159. package/fesm2015/mdc-snack-bar.mjs +22 -22
  160. package/fesm2015/mdc-snack-bar.mjs.map +1 -1
  161. package/fesm2015/mdc-table.mjs +55 -55
  162. package/fesm2015/mdc-table.mjs.map +1 -1
  163. package/fesm2015/mdc-tabs.mjs +42 -42
  164. package/fesm2015/mdc-tabs.mjs.map +1 -1
  165. package/fesm2015/mdc-tooltip.mjs +10 -10
  166. package/fesm2015/mdc-tooltip.mjs.map +1 -1
  167. package/fesm2015/menubar.mjs +10 -10
  168. package/fesm2015/menubar.mjs.map +1 -1
  169. package/fesm2015/popover-edit.mjs +25 -25
  170. package/fesm2015/popover-edit.mjs.map +1 -1
  171. package/fesm2015/selection.mjs +19 -19
  172. package/fesm2015/selection.mjs.map +1 -1
  173. package/fesm2020/column-resize.mjs +36 -36
  174. package/fesm2020/column-resize.mjs.map +1 -1
  175. package/fesm2020/material-experimental.mjs +1 -1
  176. package/fesm2020/material-experimental.mjs.map +1 -1
  177. package/fesm2020/mdc-autocomplete.mjs +13 -13
  178. package/fesm2020/mdc-autocomplete.mjs.map +1 -1
  179. package/fesm2020/mdc-button.mjs +46 -48
  180. package/fesm2020/mdc-button.mjs.map +1 -1
  181. package/fesm2020/mdc-card.mjs +46 -46
  182. package/fesm2020/mdc-card.mjs.map +1 -1
  183. package/fesm2020/mdc-checkbox.mjs +13 -21
  184. package/fesm2020/mdc-checkbox.mjs.map +1 -1
  185. package/fesm2020/mdc-chips.mjs +43 -45
  186. package/fesm2020/mdc-chips.mjs.map +1 -1
  187. package/fesm2020/mdc-core.mjs +11 -11
  188. package/fesm2020/mdc-core.mjs.map +1 -1
  189. package/fesm2020/mdc-dialog.mjs +22 -22
  190. package/fesm2020/mdc-dialog.mjs.map +1 -1
  191. package/fesm2020/mdc-form-field.mjs +48 -32
  192. package/fesm2020/mdc-form-field.mjs.map +1 -1
  193. package/fesm2020/mdc-input.mjs +7 -7
  194. package/fesm2020/mdc-input.mjs.map +1 -1
  195. package/fesm2020/mdc-list.mjs +54 -54
  196. package/fesm2020/mdc-list.mjs.map +1 -1
  197. package/fesm2020/mdc-menu.mjs +16 -16
  198. package/fesm2020/mdc-menu.mjs.map +1 -1
  199. package/fesm2020/mdc-paginator.mjs +7 -7
  200. package/fesm2020/mdc-paginator.mjs.map +1 -1
  201. package/fesm2020/mdc-progress-bar.mjs +7 -7
  202. package/fesm2020/mdc-progress-bar.mjs.map +1 -1
  203. package/fesm2020/mdc-progress-spinner.mjs +7 -7
  204. package/fesm2020/mdc-progress-spinner.mjs.map +1 -1
  205. package/fesm2020/mdc-radio.mjs +11 -11
  206. package/fesm2020/mdc-radio.mjs.map +1 -1
  207. package/fesm2020/mdc-select.mjs +10 -10
  208. package/fesm2020/mdc-select.mjs.map +1 -1
  209. package/fesm2020/mdc-sidenav.mjs +4 -4
  210. package/fesm2020/mdc-sidenav.mjs.map +1 -1
  211. package/fesm2020/mdc-slide-toggle.mjs +7 -7
  212. package/fesm2020/mdc-slide-toggle.mjs.map +1 -1
  213. package/fesm2020/mdc-slider.mjs +16 -16
  214. package/fesm2020/mdc-slider.mjs.map +1 -1
  215. package/fesm2020/mdc-snack-bar.mjs +22 -22
  216. package/fesm2020/mdc-snack-bar.mjs.map +1 -1
  217. package/fesm2020/mdc-table.mjs +55 -55
  218. package/fesm2020/mdc-table.mjs.map +1 -1
  219. package/fesm2020/mdc-tabs.mjs +42 -42
  220. package/fesm2020/mdc-tabs.mjs.map +1 -1
  221. package/fesm2020/mdc-tooltip.mjs +10 -10
  222. package/fesm2020/mdc-tooltip.mjs.map +1 -1
  223. package/fesm2020/menubar.mjs +10 -10
  224. package/fesm2020/menubar.mjs.map +1 -1
  225. package/fesm2020/popover-edit.mjs +25 -25
  226. package/fesm2020/popover-edit.mjs.map +1 -1
  227. package/fesm2020/selection.mjs +19 -19
  228. package/fesm2020/selection.mjs.map +1 -1
  229. package/mdc-button/_button-base.scss +28 -15
  230. package/mdc-button/_button-theme-private.scss +35 -28
  231. package/mdc-button/_button-theme.scss +118 -80
  232. package/mdc-button/_fab-theme.scss +31 -37
  233. package/mdc-button/_icon-button-theme.scss +15 -22
  234. package/mdc-button/button-base.d.ts +2 -2
  235. package/mdc-button/icon-button.d.ts +2 -2
  236. package/mdc-checkbox/_checkbox-private.scss +46 -0
  237. package/mdc-checkbox/_checkbox-theme.scss +6 -38
  238. package/mdc-checkbox/checkbox.d.ts +0 -6
  239. package/mdc-checkbox/module.d.ts +2 -3
  240. package/mdc-chips/chip-grid.d.ts +0 -2
  241. package/mdc-core/option/_option-theme.scss +3 -3
  242. package/mdc-form-field/_form-field-subscript.scss +11 -0
  243. package/mdc-form-field/form-field.d.ts +12 -1
  244. package/mdc-list/_list-option-theme.scss +3 -3
  245. package/mdc-list/_list-option-trailing-avatar-compat.scss +18 -13
  246. package/mdc-list/_list-theme.scss +11 -10
  247. package/mdc-radio/_radio-theme.scss +0 -6
  248. package/mdc-tabs/_tabs-common.scss +8 -1
  249. package/mdc-tabs/_tabs-theme.scss +8 -55
  250. package/mdc-theming/prebuilt/deeppurple-amber.css +1 -1
  251. package/mdc-theming/prebuilt/indigo-pink.css +1 -1
  252. package/mdc-theming/prebuilt/pink-bluegrey.css +1 -1
  253. package/mdc-theming/prebuilt/purple-green.css +1 -1
  254. package/package.json +3 -3
@@ -23,12 +23,23 @@
23
23
  padding: 0 mdc-textfield-variables.$padding-horizontal;
24
24
  }
25
25
 
26
+ .mat-mdc-form-field-subscript-dynamic-size {
27
+ .mat-mdc-form-field-hint-wrapper,
28
+ .mat-mdc-form-field-error-wrapper {
29
+ position: static;
30
+ }
31
+ }
32
+
26
33
  .mat-mdc-form-field-bottom-align::before {
27
34
  content: '';
28
35
  display: inline-block;
29
36
  height: 16px;
30
37
  }
31
38
 
39
+ .mat-mdc-form-field-bottom-align.mat-mdc-form-field-subscript-dynamic-size::before {
40
+ content: unset;
41
+ }
42
+
32
43
  .mat-mdc-form-field-hint-end {
33
44
  order: 1;
34
45
  }
@@ -25,6 +25,8 @@ import * as i0 from "@angular/core";
25
25
  export declare type FloatLabelType = 'always' | 'auto';
26
26
  /** Possible appearance styles for the form field. */
27
27
  export declare type MatFormFieldAppearance = 'fill' | 'outline';
28
+ /** Behaviors for how the subscript height is set. */
29
+ export declare type SubscriptSizing = 'fixed' | 'dynamic';
28
30
  /**
29
31
  * Represents the default options for the form field that can be configured
30
32
  * using the `MAT_FORM_FIELD_DEFAULT_OPTIONS` injection token.
@@ -33,6 +35,7 @@ export interface MatFormFieldDefaultOptions {
33
35
  appearance?: MatFormFieldAppearance;
34
36
  hideRequiredMarker?: boolean;
35
37
  floatLabel?: FloatLabelType;
38
+ subscriptSizing?: SubscriptSizing;
36
39
  }
37
40
  /**
38
41
  * Injection token that can be used to configure the
@@ -76,6 +79,14 @@ export declare class MatFormField implements AfterViewInit, OnDestroy, AfterCont
76
79
  get appearance(): MatFormFieldAppearance;
77
80
  set appearance(value: MatFormFieldAppearance);
78
81
  private _appearance;
82
+ /**
83
+ * Whether the form field should reserve space for one line of hint/error text (default)
84
+ * or to have the spacing grow from 0px as needed based on the size of the hint/error content.
85
+ * Note that when using dynamic sizing, layout shifts will occur when hint/error text changes.
86
+ */
87
+ get subscriptSizing(): SubscriptSizing;
88
+ set subscriptSizing(value: SubscriptSizing);
89
+ private _subscriptSizing;
79
90
  /** Text for the form field hint. */
80
91
  get hintLabel(): string;
81
92
  set hintLabel(value: string);
@@ -185,5 +196,5 @@ export declare class MatFormField implements AfterViewInit, OnDestroy, AfterCont
185
196
  /** Checks whether the form field is attached to the DOM. */
186
197
  private _isAttachedToDom;
187
198
  static ɵfac: i0.ɵɵFactoryDeclaration<MatFormField, [null, null, null, null, null, { optional: true; }, { optional: true; }, null]>;
188
- static ɵcmp: i0.ɵɵComponentDeclaration<MatFormField, "mat-form-field", ["matFormField"], { "hideRequiredMarker": "hideRequiredMarker"; "color": "color"; "floatLabel": "floatLabel"; "appearance": "appearance"; "hintLabel": "hintLabel"; }, {}, ["_labelChildNonStatic", "_labelChildStatic", "_formFieldControl", "_prefixChildren", "_suffixChildren", "_errorChildren", "_hintChildren"], ["mat-label", "[matPrefix], [matIconPrefix]", "[matTextPrefix]", "*", "[matTextSuffix]", "[matSuffix], [matIconSuffix]", "mat-error", "mat-hint:not([align='end'])", "mat-hint[align='end']"]>;
199
+ static ɵcmp: i0.ɵɵComponentDeclaration<MatFormField, "mat-form-field", ["matFormField"], { "hideRequiredMarker": "hideRequiredMarker"; "color": "color"; "floatLabel": "floatLabel"; "appearance": "appearance"; "subscriptSizing": "subscriptSizing"; "hintLabel": "hintLabel"; }, {}, ["_labelChildNonStatic", "_labelChildStatic", "_formFieldControl", "_prefixChildren", "_suffixChildren", "_errorChildren", "_hintChildren"], ["mat-label", "[matPrefix], [matIconPrefix]", "[matTextPrefix]", "*", "[matTextSuffix]", "[matSuffix], [matIconSuffix]", "mat-error", "mat-hint:not([align='end'])", "mat-hint[align='end']"]>;
189
200
  }
@@ -1,14 +1,14 @@
1
1
  @use '@material/checkbox' as mdc-checkbox;
2
- @use '../mdc-checkbox/checkbox-theme';
2
+ @use '../mdc-checkbox/checkbox-private';
3
3
  @use '../mdc-helpers/mdc-helpers';
4
4
  @use './list-option-trailing-avatar-compat';
5
5
 
6
6
  // Mixin that overrides the selected item and checkbox colors for list options. By
7
7
  // default, the MDC list uses the `primary` color for list items. The MDC checkbox
8
8
  // inside list options by default uses the `primary` color too.
9
- @mixin private-list-option-color-override($color, $mdcColor) {
9
+ @mixin private-list-option-color-override($color, $mdc-color) {
10
10
  & .mdc-list-item__start, & .mdc-list-item__end {
11
- @include checkbox-theme.private-checkbox-styles-with-color($color, $mdcColor);
11
+ @include checkbox-private.private-checkbox-styles-with-color($color, $mdc-color);
12
12
  }
13
13
  }
14
14
 
@@ -3,6 +3,7 @@
3
3
  @use '@material/density/functions' as density-functions;
4
4
  @use '@material/list/evolution-mixins' as mdc-list;
5
5
  @use '@material/list/evolution-variables' as mdc-list-variables;
6
+ @use '../mdc-helpers/mdc-helpers';
6
7
 
7
8
  // For compatibility with the non-MDC selection list, we support avatars that are
8
9
  // shown at the end of the list option. This is not supported by the MDC list as the
@@ -15,19 +16,21 @@
15
16
  @mixin core-styles($query) {
16
17
  $feat-structure: feature-targeting.create-target($query, structure);
17
18
 
18
- .mat-mdc-list-option-with-trailing-avatar {
19
- @include mdc-list.item-end-spacing(16px, $query: $query);
20
- @include mdc-list.item-end-size(40px, $query: $query);
19
+ @include mdc-helpers.disable-fallback-declarations {
20
+ .mat-mdc-list-option-with-trailing-avatar {
21
+ @include mdc-list.item-end-spacing(16px, $query: $query);
22
+ @include mdc-list.item-end-size(40px, $query: $query);
21
23
 
22
- &.mdc-list-item--with-two-lines {
23
- .mdc-list-item__primary-text {
24
- @include typography.text-baseline($top: 32px, $bottom: 20px, $query: $query);
24
+ &.mdc-list-item--with-two-lines {
25
+ .mdc-list-item__primary-text {
26
+ @include typography.text-baseline($top: 32px, $bottom: 20px, $query: $query);
27
+ }
25
28
  }
26
- }
27
29
 
28
- .mdc-list-item__end {
29
- @include feature-targeting.targets($feat-structure) {
30
- border-radius: 50%;
30
+ .mdc-list-item__end {
31
+ @include feature-targeting.targets($feat-structure) {
32
+ border-radius: 50%;
33
+ }
31
34
  }
32
35
  }
33
36
  }
@@ -46,8 +49,10 @@
46
49
  $property-name: height,
47
50
  );
48
51
 
49
- .mat-mdc-list-option-with-trailing-avatar {
50
- @include mdc-list.one-line-item-height($one-line-tall-height);
51
- @include mdc-list.two-line-item-height($two-line-tall-height);
52
+ @include mdc-helpers.disable-fallback-declarations {
53
+ .mat-mdc-list-option-with-trailing-avatar {
54
+ @include mdc-list.one-line-item-height($one-line-tall-height);
55
+ @include mdc-list.two-line-item-height($two-line-tall-height);
56
+ }
52
57
  }
53
58
  }
@@ -16,11 +16,10 @@
16
16
  $accent: theming.get-color-from-palette(map.get($config, accent));
17
17
  $warn: theming.get-color-from-palette(map.get($config, warn));
18
18
 
19
- // MDC's state styles are tied in with their ripple. Since we don't use the MDC
20
- // ripple, we need to add the hover, focus and selected states manually.
21
- @include interactive-list-theme.private-interactive-list-item-state-colors($config);
22
-
23
19
  @include mdc-helpers.mat-using-mdc-theme($config) {
20
+ // MDC's state styles are tied in with their ripple. Since we don't use the MDC
21
+ // ripple, we need to add the hover, focus and selected states manually.
22
+ @include interactive-list-theme.private-interactive-list-item-state-colors($config);
24
23
  @include mdc-list.without-ripple($query: mdc-helpers.$mat-theme-styles-query);
25
24
 
26
25
  .mat-mdc-list-option {
@@ -38,13 +37,15 @@
38
37
  @mixin density($config-or-theme) {
39
38
  $density-scale: theming.get-density-config($config-or-theme);
40
39
 
41
- .mat-mdc-list-item {
42
- @include mdc-list.one-line-item-density($density-scale);
43
- @include mdc-list.two-line-item-density($density-scale);
44
- @include mdc-list.three-line-item-density($density-scale);
45
- }
40
+ @include mdc-helpers.disable-fallback-declarations {
41
+ .mat-mdc-list-item {
42
+ @include mdc-list.one-line-item-density($density-scale);
43
+ @include mdc-list.two-line-item-density($density-scale);
44
+ @include mdc-list.three-line-item-density($density-scale);
45
+ }
46
46
 
47
- @include list-option-theme.private-list-option-density-styles($density-scale);
47
+ @include list-option-theme.private-list-option-density-styles($density-scale);
48
+ }
48
49
  }
49
50
 
50
51
  @mixin typography($config-or-theme) {
@@ -10,12 +10,9 @@
10
10
  @mixin _color-palette($color-palette) {
11
11
  @include mdc-radio-theme.theme((
12
12
  selected-focus-icon-color: $color-palette,
13
- selected-focus-state-layer-color: $color-palette,
14
13
  selected-hover-icon-color: $color-palette,
15
- selected-hover-state-layer-color: $color-palette,
16
14
  selected-icon-color: $color-palette,
17
15
  selected-pressed-icon-color: $color-palette,
18
- selected-pressed-state-layer-color: $color-palette,
19
16
  ));
20
17
 
21
18
  // TODO(crisbeto): this should be included by MDC's `theme-styles`, but it isn't currently.
@@ -39,12 +36,9 @@
39
36
  disabled-selected-icon-color: mdc-theme-color.$on-surface,
40
37
  disabled-unselected-icon-color: mdc-theme-color.$on-surface,
41
38
  unselected-focus-icon-color: $on-surface,
42
- unselected-focus-state-layer-color: $on-surface,
43
39
  unselected-hover-icon-color: $on-surface,
44
- unselected-hover-state-layer-color: $on-surface,
45
40
  unselected-icon-color: $on-surface,
46
41
  unselected-pressed-icon-color: $on-surface,
47
- unselected-pressed-state-layer-color: $on-surface,
48
42
  ));
49
43
 
50
44
  &.mat-primary {
@@ -11,7 +11,7 @@ $mat-tab-animation-duration: 500ms !default;
11
11
  // Combines the various structural styles we need for the tab group and tab nav bar.
12
12
  @mixin structural-styles {
13
13
  @include mdc-helpers.disable-fallback-declarations {
14
- @include mdc-tab.without-ripple($query: mdc-helpers.$mat-base-styles-query);
14
+ @include mdc-tab.static-styles($query: mdc-helpers.$mat-base-styles-query);
15
15
  @include mdc-tab-indicator.core-styles($query: mdc-helpers.$mat-base-styles-query);
16
16
  }
17
17
 
@@ -51,6 +51,13 @@ $mat-tab-animation-duration: 500ms !default;
51
51
  pointer-events: none;
52
52
  }
53
53
 
54
+ // Required for `fitInkBarToContent` to work. This used to be included with MDC's `without-ripple`
55
+ // mixin, but that no longer appears to be the case with `static-styles`. Since the latter is
56
+ // ~10kb smaller, we include this one extra style ourselves.
57
+ .mdc-tab__content {
58
+ @include mdc-tab-indicator.surface;
59
+ }
60
+
54
61
  // We need to handle the hover and focus indication ourselves, because we don't use MDC's ripple.
55
62
  &:hover .mdc-tab__ripple::before {
56
63
  opacity: map.get(mdc-ripple.$dark-ink-opacities, hover);
@@ -4,7 +4,7 @@
4
4
  @use '@material/tab-indicator' as mdc-tab-indicator;
5
5
  @use '@material/tab-indicator/tab-indicator-theme' as mdc-tab-indicator-theme;
6
6
  @use '@material/tab' as mdc-tab;
7
- @use '@material/tab/tab-theme' as mdc-tab-theme;
7
+ @use '@material/tab/mixins' as mdc-tab-mixins;
8
8
  @use '@material/tab-bar' as mdc-tab-bar;
9
9
  @use '../mdc-helpers/mdc-helpers';
10
10
  @use '../../material/core/typography/typography';
@@ -18,39 +18,9 @@
18
18
 
19
19
  @include mdc-helpers.mat-using-mdc-theme($config) {
20
20
  .mat-mdc-tab, .mat-mdc-tab-link {
21
- $surface: mdc-theme-color.$surface;
22
- $on-surface: rgba(mdc-theme-color.$on-surface, 0.6);
23
-
24
- // TODO(crisbeto): these styles should actually be set through the `theme` mixin while the
25
- // `theme-styles` are included in the `tab` mixin inside `_tabs-common.scss`. Currently
26
- // they are not, because `theme-styles` outputs the token values directly, rather than
27
- // generating CSS variables.
28
- @include mdc-tab-theme.primary-navigation-tab-theme-styles(map.merge(
29
- mdc-tab-theme.$primary-light-theme,
30
- (
31
- container-color: $surface,
32
- inactive-focus-state-layer-color: $on-surface,
33
- inactive-hover-state-layer-color: $on-surface,
34
- inactive-pressed-state-layer-color: $on-surface,
35
- with-icon-inactive-focus-icon-color: $on-surface,
36
- with-icon-inactive-hover-icon-color: $on-surface,
37
- with-icon-inactive-icon-color: $on-surface,
38
- with-icon-inactive-pressed-icon-color: $on-surface,
39
- with-label-text-inactive-focus-label-text-color: $on-surface,
40
- with-label-text-inactive-hover-label-text-color: $on-surface,
41
- with-label-text-inactive-label-text-color: $on-surface,
42
- with-label-text-inactive-pressed-label-text-color: $on-surface,
43
-
44
- // TODO(crisbeto): MDC's styles are set up so that the icon size is set through a
45
- // `font-size` at the root of the tab while the text size of the tab is set on
46
- // `.mdc-tab__text-label` which overrides the one from the root. The problem is that
47
- // the `$light-theme` is looking for a `subhead2` level which doesn't exist in MDC's
48
- // code which in turn causes no text label styles to be emitted and for the icon size
49
- // to be applied to the entire tab. Since we don't support icons inside the tab
50
- // anyway, we can temporarily work around it by preventing MDC from emitting icon
51
- // styles. The correct label typography will be applied by our theme instead.
52
- with-icon-icon-size: null
53
- )));
21
+ &:not(.mat-mdc-tab-disabled) {
22
+ @include mdc-tab-mixins.text-label-color(rgba(mdc-theme-color.$on-surface, 0.6));
23
+ }
54
24
 
55
25
  // MDC seems to include a background color on tabs which only stands out on dark themes.
56
26
  // Disable for now for backwards compatibility. These styles are inside the theme in order
@@ -125,27 +95,10 @@
125
95
 
126
96
  @mixin _palette-styles($color) {
127
97
  .mat-mdc-tab, .mat-mdc-tab-link {
128
- // TODO(crisbeto): these styles should actually be set through the `theme` mixin while the
129
- // `theme-styles` are included in the `tab` mixin inside `_tabs-common.scss`. Currently
130
- // they are not, because `theme-styles` outputs the token values directly, rather than
131
- // generating CSS variables.
132
- @include mdc-tab-theme.primary-navigation-tab-theme-styles((
133
- active-focus-state-layer-color: $color,
134
- active-hover-state-layer-color: $color,
135
- active-pressed-state-layer-color: $color,
136
- with-icon-active-focus-icon-color: $color,
137
- with-icon-active-hover-icon-color: $color,
138
- with-icon-active-icon-color: $color,
139
- with-icon-active-pressed-icon-color: $color,
140
- with-label-text-active-focus-label-text-color: $color,
141
- with-label-text-active-hover-label-text-color: $color,
142
- with-label-text-active-label-text-color: $color,
143
- with-label-text-active-pressed-label-text-color: $color,
144
- ));
145
-
146
- @include mdc-tab-indicator-theme.theme-styles((
147
- active-indicator-color: $color
148
- ));
98
+ &:not(.mat-mdc-tab-disabled) {
99
+ @include mdc-tab-mixins.active-text-label-color($color);
100
+ @include mdc-tab-indicator-theme.theme-styles((active-indicator-color: $color));
101
+ }
149
102
  }
150
103
 
151
104
  .mdc-tab__ripple::before,