@angular/material 20.1.0-next.2 → 20.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (214) hide show
  1. package/autocomplete/_autocomplete-theme.scss +4 -4
  2. package/autocomplete/_m2-autocomplete.scss +10 -22
  3. package/badge/_badge-theme.scss +4 -4
  4. package/badge/_m2-badge.scss +49 -63
  5. package/bottom-sheet/_bottom-sheet-theme.scss +4 -4
  6. package/bottom-sheet/_m2-bottom-sheet.scss +16 -30
  7. package/button/_button-theme.scss +4 -4
  8. package/button/_fab-theme.scss +4 -4
  9. package/button/_icon-button-theme.scss +10 -8
  10. package/button/_m2-button.scss +135 -154
  11. package/button/_m2-fab.scss +60 -69
  12. package/button/_m2-icon-button.scss +30 -50
  13. package/button/_m3-button.scss +1 -2
  14. package/button/_m3-fab.scss +1 -2
  15. package/button/_m3-icon-button.scss +1 -2
  16. package/button-toggle/_button-toggle-theme.scss +4 -4
  17. package/button-toggle/_m2-button-toggle.scss +58 -75
  18. package/button-toggle/_m3-button-toggle.scss +1 -2
  19. package/card/_card-theme.scss +4 -4
  20. package/card/_m2-card.scss +30 -43
  21. package/checkbox/_checkbox-theme.scss +10 -8
  22. package/checkbox/_m2-checkbox.scss +30 -41
  23. package/checkbox/_m3-checkbox.scss +1 -2
  24. package/chips/_chips-theme.scss +10 -7
  25. package/chips/_m2-chip.scss +40 -54
  26. package/chips/_m3-chip.scss +1 -2
  27. package/core/_core-theme.scss +4 -4
  28. package/core/_m2-app.scss +11 -23
  29. package/core/m2/_theming.scss +8 -4
  30. package/core/option/_m2-optgroup.scss +13 -25
  31. package/core/option/_m2-option.scss +16 -23
  32. package/core/option/_optgroup-theme.scss +4 -4
  33. package/core/option/_option-theme.scss +6 -6
  34. package/core/ripple/_m2-ripple.scss +8 -20
  35. package/core/ripple/_ripple-theme.scss +4 -4
  36. package/core/selection/pseudo-checkbox/_m2-pseudo-checkbox.scss +14 -21
  37. package/core/selection/pseudo-checkbox/_pseudo-checkbox-theme.scss +8 -8
  38. package/core/theming/_definition.scss +3 -1
  39. package/core/tokens/_m2-utils.scss +14 -6
  40. package/core/tokens/m3/_theme.scss +1 -1
  41. package/datepicker/_datepicker-theme.scss +6 -6
  42. package/datepicker/_m2-datepicker.scss +26 -33
  43. package/dialog/_dialog-theme.scss +4 -4
  44. package/dialog/_m2-dialog.scss +34 -46
  45. package/divider/_divider-theme.scss +4 -4
  46. package/divider/_m2-divider.scss +10 -21
  47. package/expansion/_expansion-theme.scss +4 -4
  48. package/expansion/_m2-expansion.scss +51 -67
  49. package/expansion/_m3-expansion.scss +1 -2
  50. package/fesm2022/animation-DfMFjxHu.mjs.map +1 -1
  51. package/fesm2022/autocomplete/testing.mjs.map +1 -1
  52. package/fesm2022/autocomplete.mjs.map +1 -1
  53. package/fesm2022/badge/testing.mjs.map +1 -1
  54. package/fesm2022/badge.mjs.map +1 -1
  55. package/fesm2022/bottom-sheet/testing.mjs.map +1 -1
  56. package/fesm2022/bottom-sheet.mjs.map +1 -1
  57. package/fesm2022/button/testing.mjs.map +1 -1
  58. package/fesm2022/button-toggle/testing.mjs.map +1 -1
  59. package/fesm2022/button-toggle.mjs.map +1 -1
  60. package/fesm2022/button.mjs.map +1 -1
  61. package/fesm2022/card/testing.mjs.map +1 -1
  62. package/fesm2022/card.mjs.map +1 -1
  63. package/fesm2022/checkbox/testing.mjs.map +1 -1
  64. package/fesm2022/checkbox.mjs.map +1 -1
  65. package/fesm2022/chips/testing.mjs.map +1 -1
  66. package/fesm2022/chips.mjs.map +1 -1
  67. package/fesm2022/common-module-cKSwHniA.mjs.map +1 -1
  68. package/fesm2022/core/testing.mjs.map +1 -1
  69. package/fesm2022/core.mjs +1 -1
  70. package/fesm2022/core.mjs.map +1 -1
  71. package/fesm2022/date-formats-K6TQue-Y.mjs.map +1 -1
  72. package/fesm2022/date-range-input-harness-DEyfkeOs.mjs.map +1 -1
  73. package/fesm2022/datepicker/testing.mjs.map +1 -1
  74. package/fesm2022/datepicker.mjs.map +1 -1
  75. package/fesm2022/dialog/testing.mjs.map +1 -1
  76. package/fesm2022/dialog.mjs.map +1 -1
  77. package/fesm2022/divider/testing.mjs.map +1 -1
  78. package/fesm2022/divider.mjs.map +1 -1
  79. package/fesm2022/error-options-DCNQlTOA.mjs.map +1 -1
  80. package/fesm2022/error-state-Dtb1IHM-.mjs.map +1 -1
  81. package/fesm2022/expansion/testing.mjs.map +1 -1
  82. package/fesm2022/expansion.mjs.map +1 -1
  83. package/fesm2022/form-field/testing/control.mjs.map +1 -1
  84. package/fesm2022/form-field/testing.mjs.map +1 -1
  85. package/fesm2022/form-field-CFbrnFED.mjs.map +1 -1
  86. package/fesm2022/form-field.mjs.map +1 -1
  87. package/fesm2022/grid-list/testing.mjs.map +1 -1
  88. package/fesm2022/grid-list.mjs.map +1 -1
  89. package/fesm2022/icon/testing.mjs.map +1 -1
  90. package/fesm2022/icon-button-DxiIc1ex.mjs.map +1 -1
  91. package/fesm2022/icon-registry-CwOTJ7YM.mjs.map +1 -1
  92. package/fesm2022/icon.mjs.map +1 -1
  93. package/fesm2022/index-BFRo2fUq.mjs.map +1 -1
  94. package/fesm2022/index-DwiL-HGk.mjs.map +1 -1
  95. package/fesm2022/input/testing.mjs.map +1 -1
  96. package/fesm2022/input-harness-C5Msdc4-.mjs.map +1 -1
  97. package/fesm2022/input-value-accessor-D1GvPuqO.mjs.map +1 -1
  98. package/fesm2022/input.mjs.map +1 -1
  99. package/fesm2022/internal-form-field-D5iFxU6d.mjs.map +1 -1
  100. package/fesm2022/line-Bz5f9Cyx.mjs.map +1 -1
  101. package/fesm2022/list/testing.mjs.map +1 -1
  102. package/fesm2022/list.mjs.map +1 -1
  103. package/fesm2022/material.mjs.map +1 -1
  104. package/fesm2022/menu/testing.mjs.map +1 -1
  105. package/fesm2022/menu.mjs.map +1 -1
  106. package/fesm2022/module-B0CLRw5e.mjs.map +1 -1
  107. package/fesm2022/module-B62K-792.mjs.map +1 -1
  108. package/fesm2022/module-CWxMD37a.mjs.map +1 -1
  109. package/fesm2022/module-Ce6F7TNm.mjs.map +1 -1
  110. package/fesm2022/option-BzhYL_xC.mjs.map +1 -1
  111. package/fesm2022/option-harness-BFcc-M_4.mjs.map +1 -1
  112. package/fesm2022/paginator/testing.mjs.map +1 -1
  113. package/fesm2022/paginator.mjs.map +1 -1
  114. package/fesm2022/progress-bar/testing.mjs.map +1 -1
  115. package/fesm2022/progress-bar.mjs.map +1 -1
  116. package/fesm2022/progress-spinner/testing.mjs.map +1 -1
  117. package/fesm2022/progress-spinner.mjs.map +1 -1
  118. package/fesm2022/pseudo-checkbox-DDmgx3P4.mjs.map +1 -1
  119. package/fesm2022/pseudo-checkbox-module-4F8Up4PL.mjs.map +1 -1
  120. package/fesm2022/public-api-BoO5eSq-.mjs.map +1 -1
  121. package/fesm2022/radio/testing.mjs.map +1 -1
  122. package/fesm2022/radio.mjs.map +1 -1
  123. package/fesm2022/ripple-BYgV4oZC.mjs.map +1 -1
  124. package/fesm2022/ripple-loader-BnMiRtmT.mjs.map +1 -1
  125. package/fesm2022/select/testing.mjs.map +1 -1
  126. package/fesm2022/select.mjs.map +1 -1
  127. package/fesm2022/sidenav/testing.mjs.map +1 -1
  128. package/fesm2022/sidenav.mjs +2 -4
  129. package/fesm2022/sidenav.mjs.map +1 -1
  130. package/fesm2022/slide-toggle/testing.mjs.map +1 -1
  131. package/fesm2022/slide-toggle.mjs.map +1 -1
  132. package/fesm2022/slider/testing.mjs.map +1 -1
  133. package/fesm2022/slider.mjs.map +1 -1
  134. package/fesm2022/snack-bar/testing.mjs.map +1 -1
  135. package/fesm2022/snack-bar.mjs.map +1 -1
  136. package/fesm2022/sort/testing.mjs.map +1 -1
  137. package/fesm2022/sort.mjs.map +1 -1
  138. package/fesm2022/stepper/testing.mjs.map +1 -1
  139. package/fesm2022/stepper.mjs.map +1 -1
  140. package/fesm2022/structural-styles-CObeNzjn.mjs.map +1 -1
  141. package/fesm2022/table/testing.mjs.map +1 -1
  142. package/fesm2022/table.mjs.map +1 -1
  143. package/fesm2022/tabs/testing.mjs.map +1 -1
  144. package/fesm2022/tabs.mjs +4 -4
  145. package/fesm2022/tabs.mjs.map +1 -1
  146. package/fesm2022/timepicker/testing.mjs.map +1 -1
  147. package/fesm2022/timepicker.mjs.map +1 -1
  148. package/fesm2022/toolbar/testing.mjs.map +1 -1
  149. package/fesm2022/toolbar.mjs.map +1 -1
  150. package/fesm2022/tooltip/testing.mjs.map +1 -1
  151. package/fesm2022/tooltip.mjs.map +1 -1
  152. package/fesm2022/tree/testing.mjs.map +1 -1
  153. package/fesm2022/tree.mjs.map +1 -1
  154. package/form-field/_form-field-theme.scss +4 -4
  155. package/form-field/_m2-form-field.scss +125 -138
  156. package/form-field/_m3-form-field.scss +1 -2
  157. package/grid-list/_grid-list-theme.scss +4 -4
  158. package/grid-list/_m2-grid-list.scss +14 -25
  159. package/icon/_icon-theme.scss +4 -4
  160. package/icon/_m2-icon.scss +7 -21
  161. package/list/_list-theme.scss +14 -12
  162. package/list/_m2-list.scss +84 -98
  163. package/list/_m3-list.scss +1 -2
  164. package/menu/_m2-menu.scss +33 -46
  165. package/menu/_menu-theme.scss +4 -4
  166. package/package.json +6 -6
  167. package/paginator/_m2-paginator.scss +38 -57
  168. package/paginator/_m3-paginator.scss +1 -2
  169. package/paginator/_paginator-theme.scss +4 -4
  170. package/prebuilt-themes/deeppurple-amber.css +1 -1
  171. package/prebuilt-themes/indigo-pink.css +1 -1
  172. package/prebuilt-themes/pink-bluegrey.css +1 -1
  173. package/prebuilt-themes/purple-green.css +1 -1
  174. package/progress-bar/_m2-progress-bar.scss +11 -24
  175. package/progress-bar/_progress-bar-theme.scss +6 -6
  176. package/progress-spinner/_m2-progress-spinner.scss +9 -20
  177. package/progress-spinner/_progress-spinner-theme.scss +6 -6
  178. package/radio/_m2-radio.scss +30 -41
  179. package/radio/_m3-radio.scss +1 -2
  180. package/radio/_radio-theme.scss +6 -6
  181. package/schematics/ng-add/index.js +2 -2
  182. package/schematics/ng-generate/theme-color/schema.json +1 -1
  183. package/select/_m2-select.scss +23 -31
  184. package/select/_m3-select.scss +1 -2
  185. package/select/_select-theme.scss +6 -6
  186. package/sidenav/_m2-sidenav.scss +26 -36
  187. package/sidenav/_sidenav-theme.scss +4 -4
  188. package/slide-toggle/_m2-slide-toggle.scss +94 -113
  189. package/slide-toggle/_slide-toggle-theme.scss +6 -6
  190. package/slider/_m2-slider.scss +34 -52
  191. package/slider/_slider-theme.scss +4 -4
  192. package/snack-bar/_m2-snack-bar.scss +16 -36
  193. package/snack-bar/_snack-bar-theme.scss +4 -4
  194. package/sort/_m2-sort.scss +7 -18
  195. package/sort/_sort-theme.scss +4 -4
  196. package/stepper/_m2-stepper.scss +39 -54
  197. package/stepper/_m3-stepper.scss +1 -2
  198. package/stepper/_stepper-theme.scss +4 -4
  199. package/table/_m2-table.scss +54 -65
  200. package/table/_m3-table.scss +1 -2
  201. package/table/_table-theme.scss +4 -4
  202. package/tabs/_m2-tabs.scss +31 -47
  203. package/tabs/_m3-tabs.scss +1 -2
  204. package/tabs/_tabs-theme.scss +9 -9
  205. package/timepicker/_m2-timepicker.scss +10 -22
  206. package/timepicker/_timepicker-theme.scss +4 -4
  207. package/toolbar/_m2-toolbar.scss +26 -45
  208. package/toolbar/_m3-toolbar.scss +1 -2
  209. package/toolbar/_toolbar-theme.scss +4 -4
  210. package/tooltip/_m2-tooltip.scss +16 -33
  211. package/tooltip/_tooltip-theme.scss +4 -4
  212. package/tree/_m2-tree.scss +21 -39
  213. package/tree/_m3-tree.scss +1 -2
  214. package/tree/_tree-theme.scss +4 -4
@@ -4,19 +4,37 @@
4
4
  @use '../core/tokens/m2-utils';
5
5
  @use 'sass:map';
6
6
 
7
- // Tokens that can't be configured through Angular Material's current theming API,
8
- // but may be in a future version of the theming API.
9
- @function get-unthemable-tokens() {
7
+ @function get-tokens($theme) {
8
+ $system: m2-utils.get-system($theme);
9
+
10
10
  @return (
11
- datepicker-calendar-container-shape: 4px,
12
- datepicker-calendar-container-touch-shape: 4px,
13
- datepicker-calendar-container-elevation-shadow: elevation.get-box-shadow(4),
14
- datepicker-calendar-container-touch-elevation-shadow: elevation.get-box-shadow(24),
11
+ base: (
12
+ datepicker-calendar-container-shape: 4px,
13
+ datepicker-calendar-container-touch-shape: 4px,
14
+ datepicker-calendar-container-elevation-shadow: elevation.get-box-shadow(4),
15
+ datepicker-calendar-container-touch-elevation-shadow: elevation.get-box-shadow(24),
16
+ ),
17
+ color: private-get-color-palette-color-tokens($theme, primary),
18
+ typography: (
19
+ // TODO(crisbeto): the typography tokens for other components set every typography dimension
20
+ // of an element (e.g. size, weight, line height, letter spacing). These tokens only set the
21
+ // values that were set in the previous theming API to reduce the amount of subtle screenshot
22
+ // differences. We should look into introducing the other tokens in a follow-up.
23
+ datepicker-calendar-text-font: map.get($system, body-large-font),
24
+ datepicker-calendar-text-size: 13px,
25
+ datepicker-calendar-body-label-text-size: map.get($system, label-small-size),
26
+ datepicker-calendar-body-label-text-weight: map.get($system, label-small-weight),
27
+ datepicker-calendar-period-button-text-size: map.get($system, label-small-size),
28
+ datepicker-calendar-period-button-text-weight: map.get($system, label-small-weight),
29
+ datepicker-calendar-header-text-size: 11px,
30
+ datepicker-calendar-header-text-weight: map.get($system, body-large-weight),
31
+ ),
32
+ density: (),
15
33
  );
16
34
  }
17
35
 
18
36
  // Tokens that can be configured through Angular Material's color theming API.
19
- @function get-color-tokens($theme, $color-variant) {
37
+ @function private-get-color-palette-color-tokens($theme, $color-variant) {
20
38
  $system: m2-utils.get-system($theme);
21
39
  $system: m3-utils.replace-colors-with-variant($system, primary, $color-variant);
22
40
  $disabled: m3-utils.color-with-opacity(map.get($system, on-surface), 38%);
@@ -61,28 +79,3 @@
61
79
  datepicker-calendar-container-text-color: map.get($system, on-surface),
62
80
  );
63
81
  }
64
-
65
- // Tokens that can be configured through Angular Material's typography theming API.
66
- @function get-typography-tokens($theme) {
67
- $system: m2-utils.get-system($theme);
68
- @return (
69
- // TODO(crisbeto): the typography tokens for other components set every typography dimension of
70
- // an element (e.g. size, weight, line height, letter spacing). These tokens only set the values
71
- // that were set in the previous theming API to reduce the amount of subtle screenshot
72
- // differences. We should look into introducing the other tokens in a follow-up.
73
- datepicker-calendar-text-font: map.get($system, body-large-font),
74
- datepicker-calendar-text-size: 13px,
75
- datepicker-calendar-body-label-text-size: map.get($system, label-small-size),
76
- datepicker-calendar-body-label-text-weight: map.get($system, label-small-weight),
77
- datepicker-calendar-period-button-text-size: map.get($system, label-small-size),
78
- datepicker-calendar-period-button-text-weight: map.get($system, label-small-weight),
79
- datepicker-calendar-header-text-size: 11px,
80
- datepicker-calendar-header-text-weight:
81
- map.get($system, body-large-weight),
82
- );
83
- }
84
-
85
- // Tokens that can be configured through Angular Material's density theming API.
86
- @function get-density-tokens($theme) {
87
- @return ();
88
- }
@@ -6,7 +6,7 @@
6
6
  @use '../core/typography/typography';
7
7
 
8
8
  @mixin base($theme) {
9
- $tokens: m2-dialog.get-unthemable-tokens();
9
+ $tokens: map.get(m2-dialog.get-tokens($theme), base);
10
10
  @if inspection.get-theme-version($theme) == 1 {
11
11
  $tokens: map.get(m3-dialog.get-tokens($theme), base);
12
12
  }
@@ -15,7 +15,7 @@
15
15
  }
16
16
 
17
17
  @mixin color($theme) {
18
- $tokens: m2-dialog.get-color-tokens($theme);
18
+ $tokens: map.get(m2-dialog.get-tokens($theme), color);
19
19
  @if inspection.get-theme-version($theme) == 1 {
20
20
  $tokens: map.get(m3-dialog.get-tokens($theme), color);
21
21
  }
@@ -24,7 +24,7 @@
24
24
  }
25
25
 
26
26
  @mixin typography($theme) {
27
- $tokens: m2-dialog.get-typography-tokens($theme);
27
+ $tokens: map.get(m2-dialog.get-tokens($theme), typography);
28
28
  @if inspection.get-theme-version($theme) == 1 {
29
29
  $tokens: map.get(m3-dialog.get-tokens($theme), typography);
30
30
  }
@@ -33,7 +33,7 @@
33
33
  }
34
34
 
35
35
  @mixin density($theme) {
36
- $tokens: m2-dialog.get-density-tokens($theme);
36
+ $tokens: map.get(m2-dialog.get-tokens($theme), density);
37
37
  @if inspection.get-theme-version($theme) == 1 {
38
38
  $tokens: map.get(m3-dialog.get-tokens($theme), density);
39
39
  }
@@ -2,54 +2,42 @@
2
2
  @use '../core/tokens/m2-utils';
3
3
  @use 'sass:map';
4
4
 
5
- // Tokens that can't be configured through Angular Material's current theming API,
6
- // but may be in a future version of the theming API.
7
- @function get-unthemable-tokens() {
8
- @return (
9
- dialog-container-shape: 4px,
10
- dialog-container-elevation-shadow: elevation.get-box-shadow(24),
11
- dialog-container-max-width: 80vw,
12
- dialog-container-small-max-width: 80vw,
13
- dialog-container-min-width: 0,
14
- dialog-actions-alignment: start,
15
- dialog-actions-padding: 8px,
16
- dialog-content-padding: 20px 24px,
17
- dialog-with-actions-content-padding: 20px 24px,
18
-
19
- // Note: the CSS class is `title` while the M2 tokens call it `subhead`.
20
- // M3 calls it `headline` which is what we're aligning with.
21
- dialog-headline-padding: 0 24px 9px,
22
- );
23
- }
24
-
25
- // Tokens that can be configured through Angular Material's color theming API.
26
- @function get-color-tokens($theme) {
5
+ @function get-tokens($theme) {
27
6
  $system: m2-utils.get-system($theme);
28
- @return (
29
- dialog-container-color: map.get($system, surface),
30
- dialog-subhead-color: map.get($system, on-surface),
31
- dialog-supporting-text-color: map.get($system, on-surface-variant),
32
- );
33
- }
34
7
 
35
- // Tokens that can be configured through Angular Material's typography theming API.
36
- @function get-typography-tokens($theme) {
37
- $system: m2-utils.get-system($theme);
38
8
  @return (
39
- dialog-subhead-font: map.get($system, title-small-font),
40
- dialog-subhead-line-height: map.get($system, title-small-line-height),
41
- dialog-subhead-size: map.get($system, title-small-size),
42
- dialog-subhead-weight: map.get($system, title-small-weight),
43
- dialog-subhead-tracking: map.get($system, title-small-tracking),
44
- dialog-supporting-text-font: map.get($system, body-large-font),
45
- dialog-supporting-text-line-height: map.get($system, body-large-line-height),
46
- dialog-supporting-text-size: map.get($system, body-large-size),
47
- dialog-supporting-text-weight: map.get($system, body-large-weight),
48
- dialog-supporting-text-tracking: map.get($system, body-large-tracking),
49
- );
50
- }
9
+ base: (
10
+ dialog-container-shape: 4px,
11
+ dialog-container-elevation-shadow: elevation.get-box-shadow(24),
12
+ dialog-container-max-width: 80vw,
13
+ dialog-container-small-max-width: 80vw,
14
+ dialog-container-min-width: 0,
15
+ dialog-actions-alignment: start,
16
+ dialog-actions-padding: 8px,
17
+ dialog-content-padding: 20px 24px,
18
+ dialog-with-actions-content-padding: 20px 24px,
51
19
 
52
- // Tokens that can be configured through Angular Material's density theming API.
53
- @function get-density-tokens($theme) {
54
- @return ();
20
+ // Note: the CSS class is `title` while the M2 tokens call it `subhead`.
21
+ // M3 calls it `headline` which is what we're aligning with.
22
+ dialog-headline-padding: 0 24px 9px,
23
+ ),
24
+ color: (
25
+ dialog-container-color: map.get($system, surface),
26
+ dialog-subhead-color: map.get($system, on-surface),
27
+ dialog-supporting-text-color: map.get($system, on-surface-variant),
28
+ ),
29
+ typography: (
30
+ dialog-subhead-font: map.get($system, title-small-font),
31
+ dialog-subhead-line-height: map.get($system, title-small-line-height),
32
+ dialog-subhead-size: map.get($system, title-small-size),
33
+ dialog-subhead-weight: map.get($system, title-small-weight),
34
+ dialog-subhead-tracking: map.get($system, title-small-tracking),
35
+ dialog-supporting-text-font: map.get($system, body-large-font),
36
+ dialog-supporting-text-line-height: map.get($system, body-large-line-height),
37
+ dialog-supporting-text-size: map.get($system, body-large-size),
38
+ dialog-supporting-text-weight: map.get($system, body-large-weight),
39
+ dialog-supporting-text-tracking: map.get($system, body-large-tracking),
40
+ ),
41
+ density: (),
42
+ );
55
43
  }
@@ -5,7 +5,7 @@
5
5
  @use './m3-divider';
6
6
 
7
7
  @mixin base($theme) {
8
- $tokens: m2-divider.get-unthemable-tokens();
8
+ $tokens: map.get(m2-divider.get-tokens($theme), base);
9
9
  @if inspection.get-theme-version($theme) == 1 {
10
10
  $tokens: map.get(m3-divider.get-tokens($theme), base);
11
11
  }
@@ -14,7 +14,7 @@
14
14
  }
15
15
 
16
16
  @mixin color($theme) {
17
- $tokens: m2-divider.get-color-tokens($theme);
17
+ $tokens: map.get(m2-divider.get-tokens($theme), color);
18
18
  @if inspection.get-theme-version($theme) == 1 {
19
19
  $tokens: map.get(m3-divider.get-tokens($theme), color);
20
20
  }
@@ -23,7 +23,7 @@
23
23
  }
24
24
 
25
25
  @mixin typography($theme) {
26
- $tokens: m2-divider.get-typography-tokens($theme);
26
+ $tokens: map.get(m2-divider.get-tokens($theme), typography);
27
27
  @if inspection.get-theme-version($theme) == 1 {
28
28
  $tokens: map.get(m3-divider.get-tokens($theme), typography);
29
29
  }
@@ -32,7 +32,7 @@
32
32
  }
33
33
 
34
34
  @mixin density($theme) {
35
- $tokens: m2-divider.get-density-tokens($theme);
35
+ $tokens: map.get(m2-divider.get-tokens($theme), density);
36
36
  @if inspection.get-theme-version($theme) == 1 {
37
37
  $tokens: map.get(m3-divider.get-tokens($theme), density);
38
38
  }
@@ -1,28 +1,17 @@
1
1
  @use '../core/tokens/m2-utils';
2
2
  @use 'sass:map';
3
3
 
4
- // Tokens that can't be configured through Angular Material's current theming API,
5
- // but may be in a future version of the theming API.
6
- @function get-unthemable-tokens() {
7
- @return (
8
- divider-width: 1px
9
- );
10
- }
11
-
12
- // Tokens that can be configured through Angular Material's color theming API.
13
- @function get-color-tokens($theme) {
4
+ @function get-tokens($theme) {
14
5
  $system: m2-utils.get-system($theme);
6
+
15
7
  @return (
16
- divider-color: map.get($system, outline)
8
+ base: (
9
+ divider-width: 1px
10
+ ),
11
+ color: (
12
+ divider-color: map.get($system, outline)
13
+ ),
14
+ typography: (),
15
+ density: (),
17
16
  );
18
17
  }
19
-
20
- // Tokens that can be configured through Angular Material's typography theming API.
21
- @function get-typography-tokens($theme) {
22
- @return ();
23
- }
24
-
25
- // Tokens that can be configured through Angular Material's density theming API.
26
- @function get-density-tokens($theme) {
27
- @return ();
28
- }
@@ -6,7 +6,7 @@
6
6
  @use './m3-expansion';
7
7
 
8
8
  @mixin base($theme) {
9
- $tokens: m2-expansion.get-unthemable-tokens();
9
+ $tokens: map.get(m2-expansion.get-tokens($theme), base);
10
10
  @if inspection.get-theme-version($theme) == 1 {
11
11
  $tokens: map.get(m3-expansion.get-tokens($theme), base);
12
12
  }
@@ -15,7 +15,7 @@
15
15
  }
16
16
 
17
17
  @mixin color($theme) {
18
- $tokens: m2-expansion.get-color-tokens($theme);
18
+ $tokens: map.get(m2-expansion.get-tokens($theme), color);
19
19
  @if inspection.get-theme-version($theme) == 1 {
20
20
  $tokens: map.get(m3-expansion.get-tokens($theme), color);
21
21
  }
@@ -24,7 +24,7 @@
24
24
  }
25
25
 
26
26
  @mixin typography($theme) {
27
- $tokens: m2-expansion.get-typography-tokens($theme);
27
+ $tokens: map.get(m2-expansion.get-tokens($theme), typography);
28
28
  @if inspection.get-theme-version($theme) == 1 {
29
29
  $tokens: map.get(m3-expansion.get-tokens($theme), typography);
30
30
  }
@@ -33,7 +33,7 @@
33
33
  }
34
34
 
35
35
  @mixin density($theme) {
36
- $tokens: m2-expansion.get-density-tokens($theme);
36
+ $tokens: map.get(m2-expansion.get-tokens($theme), density);
37
37
  @if inspection.get-theme-version($theme) == 1 {
38
38
  $tokens: map.get(m3-expansion.get-tokens($theme), density);
39
39
  }
@@ -1,80 +1,64 @@
1
1
  @use 'sass:map';
2
2
  @use '../core/theming/theming';
3
- @use '../core/theming/inspection';
4
3
  @use '../core/tokens/m2-utils';
5
4
  @use '../core/tokens/m3-utils';
6
5
  @use '../core/style/elevation';
7
6
 
8
- // Tokens that can't be configured through Angular Material's current theming API,
9
- // but may be in a future version of the theming API.
10
- @function get-unthemable-tokens() {
11
- @return (
12
- expansion-container-shape: 4px,
13
- expansion-container-elevation-shadow: elevation.get-box-shadow(2),
14
- expansion-legacy-header-indicator-display: inline-block,
15
- expansion-header-indicator-display: none,
16
- );
17
- }
18
-
19
- // Tokens that can be configured through Angular Material's color theming API.
20
- @function get-color-tokens($theme) {
7
+ @function get-tokens($theme) {
21
8
  $system: m2-utils.get-system($theme);
22
- @return (
23
- expansion-container-background-color: map.get($system, surface),
24
- expansion-container-text-color: map.get($system, on-surface),
25
- expansion-actions-divider-color: map.get($system, outline),
26
- expansion-header-hover-state-layer-color: m3-utils.color-with-opacity(
27
- map.get($system, on-surface), map.get($system, hover-state-layer-opacity)),
28
- expansion-header-focus-state-layer-color: m3-utils.color-with-opacity(
29
- map.get($system, on-surface), map.get($system, focus-state-layer-opacity)),
30
- expansion-header-disabled-state-text-color:
31
- m3-utils.color-with-opacity(map.get($system, on-surface), 38%),
32
- expansion-header-text-color: map.get($system, on-surface),
33
- expansion-header-description-color: map.get($system, on-surface-variant),
34
- expansion-header-indicator-color: map.get($system, on-surface-variant),
35
- );
36
- }
9
+ $density-scale: theming.clamp-density(map.get($system, density-scale), -3);
37
10
 
38
- // Tokens that can be configured through Angular Material's typography theming API.
39
- @function get-typography-tokens($theme) {
40
- $system: m2-utils.get-system($theme);
41
11
  @return (
42
- expansion-header-text-font: map.get($system, label-medium-font),
43
- expansion-header-text-size: map.get($system, label-medium-size),
44
- expansion-header-text-weight: map.get($system, label-medium-weight),
12
+ base: (
13
+ expansion-container-shape: 4px,
14
+ expansion-container-elevation-shadow: elevation.get-box-shadow(2),
15
+ expansion-legacy-header-indicator-display: inline-block,
16
+ expansion-header-indicator-display: none,
17
+ ),
18
+ color: (
19
+ expansion-container-background-color: map.get($system, surface),
20
+ expansion-container-text-color: map.get($system, on-surface),
21
+ expansion-actions-divider-color: map.get($system, outline),
22
+ expansion-header-hover-state-layer-color: m3-utils.color-with-opacity(
23
+ map.get($system, on-surface), map.get($system, hover-state-layer-opacity)),
24
+ expansion-header-focus-state-layer-color: m3-utils.color-with-opacity(
25
+ map.get($system, on-surface), map.get($system, focus-state-layer-opacity)),
26
+ expansion-header-disabled-state-text-color:
27
+ m3-utils.color-with-opacity(map.get($system, on-surface), 38%),
28
+ expansion-header-text-color: map.get($system, on-surface),
29
+ expansion-header-description-color: map.get($system, on-surface-variant),
30
+ expansion-header-indicator-color: map.get($system, on-surface-variant),
31
+ ),
32
+ typography: (
33
+ expansion-header-text-font: map.get($system, label-medium-font),
34
+ expansion-header-text-size: map.get($system, label-medium-size),
35
+ expansion-header-text-weight: map.get($system, label-medium-weight),
45
36
 
46
- // TODO(crisbeto): these two properties weren't set at all before the introduction of tokens,
47
- // but it's inconsistent not to provide them since the container sets all of them. Eventually
48
- // we should change the values to use come from `subtitle-2`.
49
- expansion-header-text-line-height: inherit,
50
- expansion-header-text-tracking: inherit,
37
+ // TODO(crisbeto): these two properties weren't set at all before the introduction of tokens,
38
+ // but it's inconsistent not to provide them since the container sets all of them. Eventually
39
+ // we should change the values to use come from `subtitle-2`.
40
+ expansion-header-text-line-height: inherit,
41
+ expansion-header-text-tracking: inherit,
51
42
 
52
- expansion-container-text-font: map.get($system, body-medium-font),
53
- expansion-container-text-line-height: map.get($system, body-medium-line-height),
54
- expansion-container-text-size: map.get($system, body-medium-size),
55
- expansion-container-text-tracking: map.get($system, body-medium-tracking),
56
- expansion-container-text-weight: map.get($system, body-medium-weight),
57
- );
58
- }
59
-
60
- // Tokens that can be configured through Angular Material's density theming API.
61
- @function get-density-tokens($theme) {
62
- $scale: theming.clamp-density(inspection.get-theme-density($theme), -3);
63
- $collapsed-scale: (
64
- 0: 48px,
65
- -1: 44px,
66
- -2: 40px,
67
- -3: 36px,
68
- );
69
- $expanded-scale: (
70
- 0: 64px,
71
- -1: 60px,
72
- -2: 56px,
73
- -3: 48px,
74
- );
75
-
76
- @return (
77
- expansion-header-collapsed-state-height: map.get($collapsed-scale, $scale),
78
- expansion-header-expanded-state-height: map.get($expanded-scale, $scale),
43
+ expansion-container-text-font: map.get($system, body-medium-font),
44
+ expansion-container-text-line-height: map.get($system, body-medium-line-height),
45
+ expansion-container-text-size: map.get($system, body-medium-size),
46
+ expansion-container-text-tracking: map.get($system, body-medium-tracking),
47
+ expansion-container-text-weight: map.get($system, body-medium-weight),
48
+ ),
49
+ density: (
50
+ expansion-header-collapsed-state-height: map.get((
51
+ 0: 48px,
52
+ -1: 44px,
53
+ -2: 40px,
54
+ -3: 36px,
55
+ ), $density-scale),
56
+ expansion-header-expanded-state-height: map.get((
57
+ 0: 64px,
58
+ -1: 60px,
59
+ -2: 56px,
60
+ -3: 48px,
61
+ ), $density-scale),
62
+ ),
79
63
  );
80
64
  }
@@ -2,7 +2,6 @@
2
2
  @use 'sass:list';
3
3
  @use '../core/tokens/m3-utils';
4
4
  @use '../core/theming/theming';
5
- @use '../core/theming/inspection';
6
5
  @use '../core/tokens/m3';
7
6
  @use '../core/style/elevation';
8
7
 
@@ -46,7 +45,7 @@ $prefix: (mat, expansion);
46
45
  expansion-header-text-tracking: map.get($system, title-medium-tracking),
47
46
  expansion-header-text-weight: map.get($system, title-medium-weight),
48
47
  ),
49
- density: get-density-tokens(map.get($theme, inspection.$internals, density-scale)),
48
+ density: get-density-tokens(map.get($system, density-scale)),
50
49
  );
51
50
  }
52
51
 
@@ -1 +1 @@
1
- {"version":3,"file":"animation-DfMFjxHu.mjs","sources":["../../../../../k8-fastbuild-ST-46c76129e412/bin/src/material/core/animation/animation.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.dev/license\n */\n\nimport {MediaMatcher} from '@angular/cdk/layout';\nimport {ANIMATION_MODULE_TYPE, inject, InjectionToken} from '@angular/core';\n\n/** Object used to configure the animation in Angular Material. */\nexport interface AnimationsConfig {\n /** Whether all animations should be disabled. */\n animationsDisabled?: boolean;\n}\n\n/** Injection token used to configure the animations in Angular Material. */\nexport const MATERIAL_ANIMATIONS = new InjectionToken<AnimationsConfig>('MATERIAL_ANIMATIONS');\n\n/**\n * @deprecated No longer used, will be removed.\n * @breaking-change 21.0.0\n * @docs-private\n */\nexport class AnimationCurves {\n static STANDARD_CURVE = 'cubic-bezier(0.4,0.0,0.2,1)';\n static DECELERATION_CURVE = 'cubic-bezier(0.0,0.0,0.2,1)';\n static ACCELERATION_CURVE = 'cubic-bezier(0.4,0.0,1,1)';\n static SHARP_CURVE = 'cubic-bezier(0.4,0.0,0.6,1)';\n}\n\n/**\n * @deprecated No longer used, will be removed.\n * @breaking-change 21.0.0\n * @docs-private\n */\nexport class AnimationDurations {\n static COMPLEX = '375ms';\n static ENTERING = '225ms';\n static EXITING = '195ms';\n}\n\n/**\n * Returns whether animations have been disabled by DI. Must be called in a DI context.\n * @docs-private\n */\nexport function _animationsDisabled(): boolean {\n if (\n inject(MATERIAL_ANIMATIONS, {optional: true})?.animationsDisabled ||\n inject(ANIMATION_MODULE_TYPE, {optional: true}) === 'NoopAnimations'\n ) {\n return true;\n }\n\n const mediaMatcher = inject(MediaMatcher);\n return mediaMatcher.matchMedia('(prefers-reduced-motion)').matches;\n}\n"],"names":[],"mappings":";;;AAiBA;MACa,mBAAmB,GAAG,IAAI,cAAc,CAAmB,qBAAqB;AAE7F;;;;AAIG;MACU,eAAe,CAAA;AAC1B,IAAA,OAAO,cAAc,GAAG,6BAA6B;AACrD,IAAA,OAAO,kBAAkB,GAAG,6BAA6B;AACzD,IAAA,OAAO,kBAAkB,GAAG,2BAA2B;AACvD,IAAA,OAAO,WAAW,GAAG,6BAA6B;;AAGpD;;;;AAIG;MACU,kBAAkB,CAAA;AAC7B,IAAA,OAAO,OAAO,GAAG,OAAO;AACxB,IAAA,OAAO,QAAQ,GAAG,OAAO;AACzB,IAAA,OAAO,OAAO,GAAG,OAAO;;AAG1B;;;AAGG;SACa,mBAAmB,GAAA;IACjC,IACE,MAAM,CAAC,mBAAmB,EAAE,EAAC,QAAQ,EAAE,IAAI,EAAC,CAAC,EAAE,kBAAkB;AACjE,QAAA,MAAM,CAAC,qBAAqB,EAAE,EAAC,QAAQ,EAAE,IAAI,EAAC,CAAC,KAAK,gBAAgB,EACpE;AACA,QAAA,OAAO,IAAI;;AAGb,IAAA,MAAM,YAAY,GAAG,MAAM,CAAC,YAAY,CAAC;IACzC,OAAO,YAAY,CAAC,UAAU,CAAC,0BAA0B,CAAC,CAAC,OAAO;AACpE;;;;"}
1
+ {"version":3,"file":"animation-DfMFjxHu.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/src/material/core/animation/animation.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.dev/license\n */\n\nimport {MediaMatcher} from '@angular/cdk/layout';\nimport {ANIMATION_MODULE_TYPE, inject, InjectionToken} from '@angular/core';\n\n/** Object used to configure the animation in Angular Material. */\nexport interface AnimationsConfig {\n /** Whether all animations should be disabled. */\n animationsDisabled?: boolean;\n}\n\n/** Injection token used to configure the animations in Angular Material. */\nexport const MATERIAL_ANIMATIONS = new InjectionToken<AnimationsConfig>('MATERIAL_ANIMATIONS');\n\n/**\n * @deprecated No longer used, will be removed.\n * @breaking-change 21.0.0\n * @docs-private\n */\nexport class AnimationCurves {\n static STANDARD_CURVE = 'cubic-bezier(0.4,0.0,0.2,1)';\n static DECELERATION_CURVE = 'cubic-bezier(0.0,0.0,0.2,1)';\n static ACCELERATION_CURVE = 'cubic-bezier(0.4,0.0,1,1)';\n static SHARP_CURVE = 'cubic-bezier(0.4,0.0,0.6,1)';\n}\n\n/**\n * @deprecated No longer used, will be removed.\n * @breaking-change 21.0.0\n * @docs-private\n */\nexport class AnimationDurations {\n static COMPLEX = '375ms';\n static ENTERING = '225ms';\n static EXITING = '195ms';\n}\n\n/**\n * Returns whether animations have been disabled by DI. Must be called in a DI context.\n * @docs-private\n */\nexport function _animationsDisabled(): boolean {\n if (\n inject(MATERIAL_ANIMATIONS, {optional: true})?.animationsDisabled ||\n inject(ANIMATION_MODULE_TYPE, {optional: true}) === 'NoopAnimations'\n ) {\n return true;\n }\n\n const mediaMatcher = inject(MediaMatcher);\n return mediaMatcher.matchMedia('(prefers-reduced-motion)').matches;\n}\n"],"names":[],"mappings":";;;AAiBA;MACa,mBAAmB,GAAG,IAAI,cAAc,CAAmB,qBAAqB;AAE7F;;;;AAIG;MACU,eAAe,CAAA;AAC1B,IAAA,OAAO,cAAc,GAAG,6BAA6B;AACrD,IAAA,OAAO,kBAAkB,GAAG,6BAA6B;AACzD,IAAA,OAAO,kBAAkB,GAAG,2BAA2B;AACvD,IAAA,OAAO,WAAW,GAAG,6BAA6B;;AAGpD;;;;AAIG;MACU,kBAAkB,CAAA;AAC7B,IAAA,OAAO,OAAO,GAAG,OAAO;AACxB,IAAA,OAAO,QAAQ,GAAG,OAAO;AACzB,IAAA,OAAO,OAAO,GAAG,OAAO;;AAG1B;;;AAGG;SACa,mBAAmB,GAAA;IACjC,IACE,MAAM,CAAC,mBAAmB,EAAE,EAAC,QAAQ,EAAE,IAAI,EAAC,CAAC,EAAE,kBAAkB;AACjE,QAAA,MAAM,CAAC,qBAAqB,EAAE,EAAC,QAAQ,EAAE,IAAI,EAAC,CAAC,KAAK,gBAAgB,EACpE;AACA,QAAA,OAAO,IAAI;;AAGb,IAAA,MAAM,YAAY,GAAG,MAAM,CAAC,YAAY,CAAC;IACzC,OAAO,YAAY,CAAC,UAAU,CAAC,0BAA0B,CAAC,CAAC,OAAO;AACpE;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"testing.mjs","sources":["../../../../../../k8-fastbuild-ST-46c76129e412/bin/src/material/autocomplete/testing/autocomplete-harness.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.dev/license\n */\n\nimport {coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {\n ComponentHarness,\n ComponentHarnessConstructor,\n HarnessPredicate,\n TestElement,\n} from '@angular/cdk/testing';\nimport {\n MatOptgroupHarness,\n MatOptionHarness,\n OptgroupHarnessFilters,\n OptionHarnessFilters,\n} from '../../core/testing';\nimport {AutocompleteHarnessFilters} from './autocomplete-harness-filters';\n\nexport class MatAutocompleteHarness extends ComponentHarness {\n private _documentRootLocator = this.documentRootLocatorFactory();\n\n /** The selector for the host element of a `MatAutocomplete` instance. */\n static hostSelector = '.mat-mdc-autocomplete-trigger';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for an autocomplete with specific\n * attributes.\n * @param options Options for filtering which autocomplete instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with<T extends MatAutocompleteHarness>(\n this: ComponentHarnessConstructor<T>,\n options: AutocompleteHarnessFilters = {},\n ): HarnessPredicate<T> {\n return new HarnessPredicate(this, options)\n .addOption('value', options.value, (harness, value) =>\n HarnessPredicate.stringMatches(harness.getValue(), value),\n )\n .addOption('disabled', options.disabled, async (harness, disabled) => {\n return (await harness.isDisabled()) === disabled;\n });\n }\n\n /** Gets the value of the autocomplete input. */\n async getValue(): Promise<string> {\n return (await this.host()).getProperty<string>('value');\n }\n\n /** Whether the autocomplete input is disabled. */\n async isDisabled(): Promise<boolean> {\n const disabled = (await this.host()).getAttribute('disabled');\n return coerceBooleanProperty(await disabled);\n }\n\n /** Focuses the autocomplete input. */\n async focus(): Promise<void> {\n return (await this.host()).focus();\n }\n\n /** Blurs the autocomplete input. */\n async blur(): Promise<void> {\n return (await this.host()).blur();\n }\n\n /** Whether the autocomplete input is focused. */\n async isFocused(): Promise<boolean> {\n return (await this.host()).isFocused();\n }\n\n /** Enters text into the autocomplete. */\n async enterText(value: string): Promise<void> {\n return (await this.host()).sendKeys(value);\n }\n\n /** Clears the input value. */\n async clear(): Promise<void> {\n return (await this.host()).clear();\n }\n\n /** Gets the options inside the autocomplete panel. */\n async getOptions(filters?: Omit<OptionHarnessFilters, 'ancestor'>): Promise<MatOptionHarness[]> {\n if (!(await this.isOpen())) {\n throw new Error('Unable to retrieve options for autocomplete. Autocomplete panel is closed.');\n }\n\n return this._documentRootLocator.locatorForAll(\n MatOptionHarness.with({\n ...(filters || {}),\n ancestor: await this._getPanelSelector(),\n } as OptionHarnessFilters),\n )();\n }\n\n /** Gets the option groups inside the autocomplete panel. */\n async getOptionGroups(\n filters?: Omit<OptgroupHarnessFilters, 'ancestor'>,\n ): Promise<MatOptgroupHarness[]> {\n if (!(await this.isOpen())) {\n throw new Error(\n 'Unable to retrieve option groups for autocomplete. Autocomplete panel is closed.',\n );\n }\n\n return this._documentRootLocator.locatorForAll(\n MatOptgroupHarness.with({\n ...(filters || {}),\n ancestor: await this._getPanelSelector(),\n } as OptgroupHarnessFilters),\n )();\n }\n\n /** Selects the first option matching the given filters. */\n async selectOption(filters: OptionHarnessFilters): Promise<void> {\n await this.focus(); // Focus the input to make sure the autocomplete panel is shown.\n const options = await this.getOptions(filters);\n if (!options.length) {\n throw Error(`Could not find a mat-option matching ${JSON.stringify(filters)}`);\n }\n await options[0].click();\n }\n\n /** Whether the autocomplete is open. */\n async isOpen(): Promise<boolean> {\n const panel = await this._getPanel();\n return !!panel && (await panel.hasClass(`mat-mdc-autocomplete-visible`));\n }\n\n /** Gets the panel associated with this autocomplete trigger. */\n private async _getPanel(): Promise<TestElement | null> {\n // Technically this is static, but it needs to be in a\n // function, because the autocomplete's panel ID can changed.\n return this._documentRootLocator.locatorForOptional(await this._getPanelSelector())();\n }\n\n /** Gets the selector that can be used to find the autocomplete trigger's panel. */\n protected async _getPanelSelector(): Promise<string> {\n return `#${await (await this.host()).getAttribute('aria-controls')}`;\n }\n}\n"],"names":[],"mappings":";;;;;AAuBM,MAAO,sBAAuB,SAAQ,gBAAgB,CAAA;AAClD,IAAA,oBAAoB,GAAG,IAAI,CAAC,0BAA0B,EAAE;;AAGhE,IAAA,OAAO,YAAY,GAAG,+BAA+B;AAErD;;;;;AAKG;AACH,IAAA,OAAO,IAAI,CAET,OAAA,GAAsC,EAAE,EAAA;AAExC,QAAA,OAAO,IAAI,gBAAgB,CAAC,IAAI,EAAE,OAAO;aACtC,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC,OAAO,EAAE,KAAK,KAChD,gBAAgB,CAAC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AAE;;;AAI7E,IAAA,MAAM,iBAAiB,GAAA;AAC/B,QAAA,OAAO,CAAI,CAAA,EAAA,MAAM,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,YAAY,CAAC,eAAe,CAAC,EAAE;;;;;;"}
1
+ {"version":3,"file":"testing.mjs","sources":["../../../../../../darwin_arm64-fastbuild-ST-46c76129e412/bin/src/material/autocomplete/testing/autocomplete-harness.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.dev/license\n */\n\nimport {coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {\n ComponentHarness,\n ComponentHarnessConstructor,\n HarnessPredicate,\n TestElement,\n} from '@angular/cdk/testing';\nimport {\n MatOptgroupHarness,\n MatOptionHarness,\n OptgroupHarnessFilters,\n OptionHarnessFilters,\n} from '../../core/testing';\nimport {AutocompleteHarnessFilters} from './autocomplete-harness-filters';\n\nexport class MatAutocompleteHarness extends ComponentHarness {\n private _documentRootLocator = this.documentRootLocatorFactory();\n\n /** The selector for the host element of a `MatAutocomplete` instance. */\n static hostSelector = '.mat-mdc-autocomplete-trigger';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for an autocomplete with specific\n * attributes.\n * @param options Options for filtering which autocomplete instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with<T extends MatAutocompleteHarness>(\n this: ComponentHarnessConstructor<T>,\n options: AutocompleteHarnessFilters = {},\n ): HarnessPredicate<T> {\n return new HarnessPredicate(this, options)\n .addOption('value', options.value, (harness, value) =>\n HarnessPredicate.stringMatches(harness.getValue(), value),\n )\n .addOption('disabled', options.disabled, async (harness, disabled) => {\n return (await harness.isDisabled()) === disabled;\n });\n }\n\n /** Gets the value of the autocomplete input. */\n async getValue(): Promise<string> {\n return (await this.host()).getProperty<string>('value');\n }\n\n /** Whether the autocomplete input is disabled. */\n async isDisabled(): Promise<boolean> {\n const disabled = (await this.host()).getAttribute('disabled');\n return coerceBooleanProperty(await disabled);\n }\n\n /** Focuses the autocomplete input. */\n async focus(): Promise<void> {\n return (await this.host()).focus();\n }\n\n /** Blurs the autocomplete input. */\n async blur(): Promise<void> {\n return (await this.host()).blur();\n }\n\n /** Whether the autocomplete input is focused. */\n async isFocused(): Promise<boolean> {\n return (await this.host()).isFocused();\n }\n\n /** Enters text into the autocomplete. */\n async enterText(value: string): Promise<void> {\n return (await this.host()).sendKeys(value);\n }\n\n /** Clears the input value. */\n async clear(): Promise<void> {\n return (await this.host()).clear();\n }\n\n /** Gets the options inside the autocomplete panel. */\n async getOptions(filters?: Omit<OptionHarnessFilters, 'ancestor'>): Promise<MatOptionHarness[]> {\n if (!(await this.isOpen())) {\n throw new Error('Unable to retrieve options for autocomplete. Autocomplete panel is closed.');\n }\n\n return this._documentRootLocator.locatorForAll(\n MatOptionHarness.with({\n ...(filters || {}),\n ancestor: await this._getPanelSelector(),\n } as OptionHarnessFilters),\n )();\n }\n\n /** Gets the option groups inside the autocomplete panel. */\n async getOptionGroups(\n filters?: Omit<OptgroupHarnessFilters, 'ancestor'>,\n ): Promise<MatOptgroupHarness[]> {\n if (!(await this.isOpen())) {\n throw new Error(\n 'Unable to retrieve option groups for autocomplete. Autocomplete panel is closed.',\n );\n }\n\n return this._documentRootLocator.locatorForAll(\n MatOptgroupHarness.with({\n ...(filters || {}),\n ancestor: await this._getPanelSelector(),\n } as OptgroupHarnessFilters),\n )();\n }\n\n /** Selects the first option matching the given filters. */\n async selectOption(filters: OptionHarnessFilters): Promise<void> {\n await this.focus(); // Focus the input to make sure the autocomplete panel is shown.\n const options = await this.getOptions(filters);\n if (!options.length) {\n throw Error(`Could not find a mat-option matching ${JSON.stringify(filters)}`);\n }\n await options[0].click();\n }\n\n /** Whether the autocomplete is open. */\n async isOpen(): Promise<boolean> {\n const panel = await this._getPanel();\n return !!panel && (await panel.hasClass(`mat-mdc-autocomplete-visible`));\n }\n\n /** Gets the panel associated with this autocomplete trigger. */\n private async _getPanel(): Promise<TestElement | null> {\n // Technically this is static, but it needs to be in a\n // function, because the autocomplete's panel ID can changed.\n return this._documentRootLocator.locatorForOptional(await this._getPanelSelector())();\n }\n\n /** Gets the selector that can be used to find the autocomplete trigger's panel. */\n protected async _getPanelSelector(): Promise<string> {\n return `#${await (await this.host()).getAttribute('aria-controls')}`;\n }\n}\n"],"names":[],"mappings":";;;;;AAuBM,MAAO,sBAAuB,SAAQ,gBAAgB,CAAA;AAClD,IAAA,oBAAoB,GAAG,IAAI,CAAC,0BAA0B,EAAE;;AAGhE,IAAA,OAAO,YAAY,GAAG,+BAA+B;AAErD;;;;;AAKG;AACH,IAAA,OAAO,IAAI,CAET,OAAA,GAAsC,EAAE,EAAA;AAExC,QAAA,OAAO,IAAI,gBAAgB,CAAC,IAAI,EAAE,OAAO;aACtC,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC,OAAO,EAAE,KAAK,KAChD,gBAAgB,CAAC,aAAa,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,KAAK,CAAC;AAE1D,aAAA,SAAS,CAAC,UAAU,EAAE,OAAO,CAAC,QAAQ,EAAE,OAAO,OAAO,EAAE,QAAQ,KAAI;YACnE,OAAO,CAAC,MAAM,OAAO,CAAC,UAAU,EAAE,MAAM,QAAQ;AAClD,SAAC,CAAC;;;AAIN,IAAA,MAAM,QAAQ,GAAA;AACZ,QAAA,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,WAAW,CAAS,OAAO,CAAC;;;AAIzD,IAAA,MAAM,UAAU,GAAA;AACd,QAAA,MAAM,QAAQ,GAAG,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,YAAY,CAAC,UAAU,CAAC;AAC7D,QAAA,OAAO,qBAAqB,CAAC,MAAM,QAAQ,CAAC;;;AAI9C,IAAA,MAAM,KAAK,GAAA;QACT,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAA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