@angular/material 15.1.0-next.0 → 15.1.0-next.2

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 (165) hide show
  1. package/autocomplete/testing/index.d.ts +2 -0
  2. package/button/testing/index.d.ts +2 -0
  3. package/button-toggle/testing/index.d.ts +4 -0
  4. package/card/_card-theme.scss +10 -3
  5. package/checkbox/testing/index.d.ts +2 -0
  6. package/chips/_chips-theme.scss +11 -1
  7. package/chips/index.d.ts +2 -0
  8. package/chips/testing/index.d.ts +8 -0
  9. package/core/index.d.ts +3 -3
  10. package/core/mdc-helpers/_mdc-helpers.scss +35 -19
  11. package/esm2020/autocomplete/testing/autocomplete-harness-filters.mjs +1 -1
  12. package/esm2020/autocomplete/testing/autocomplete-harness.mjs +6 -2
  13. package/esm2020/button/icon-button.mjs +4 -4
  14. package/esm2020/button/testing/button-harness-filters.mjs +1 -1
  15. package/esm2020/button/testing/button-harness.mjs +5 -2
  16. package/esm2020/button-toggle/testing/button-toggle-group-harness-filters.mjs +1 -1
  17. package/esm2020/button-toggle/testing/button-toggle-group-harness.mjs +4 -2
  18. package/esm2020/button-toggle/testing/button-toggle-harness-filters.mjs +1 -1
  19. package/esm2020/button-toggle/testing/button-toggle-harness.mjs +5 -2
  20. package/esm2020/checkbox/testing/checkbox-harness-filters.mjs +1 -1
  21. package/esm2020/checkbox/testing/checkbox-harness.mjs +5 -2
  22. package/esm2020/chips/chip-action.mjs +3 -5
  23. package/esm2020/chips/chip-option.mjs +3 -3
  24. package/esm2020/chips/chip-row.mjs +3 -3
  25. package/esm2020/chips/chip.mjs +9 -1
  26. package/esm2020/chips/testing/chip-grid-harness.mjs +4 -2
  27. package/esm2020/chips/testing/chip-harness-filters.mjs +1 -1
  28. package/esm2020/chips/testing/chip-harness.mjs +6 -2
  29. package/esm2020/chips/testing/chip-input-harness.mjs +4 -1
  30. package/esm2020/chips/testing/chip-listbox-harness.mjs +4 -2
  31. package/esm2020/core/ripple/ripple-event-manager.mjs +69 -0
  32. package/esm2020/core/ripple/ripple-renderer.mjs +31 -23
  33. package/esm2020/core/version.mjs +1 -1
  34. package/esm2020/form-field/directives/prefix.mjs +12 -7
  35. package/esm2020/form-field/directives/suffix.mjs +12 -7
  36. package/esm2020/form-field/form-field.mjs +3 -3
  37. package/esm2020/form-field/testing/form-field-harness-filters.mjs +1 -1
  38. package/esm2020/form-field/testing/form-field-harness.mjs +3 -2
  39. package/esm2020/legacy-autocomplete/testing/autocomplete-harness-filters.mjs +1 -1
  40. package/esm2020/legacy-autocomplete/testing/autocomplete-harness.mjs +6 -2
  41. package/esm2020/legacy-button/testing/button-harness.mjs +5 -2
  42. package/esm2020/legacy-checkbox/testing/checkbox-harness.mjs +5 -2
  43. package/esm2020/legacy-form-field/testing/form-field-harness.mjs +3 -2
  44. package/esm2020/list/list-option.mjs +2 -5
  45. package/esm2020/list/selection-list.mjs +2 -9
  46. package/esm2020/menu/menu-item.mjs +3 -3
  47. package/esm2020/progress-spinner/progress-spinner.mjs +4 -5
  48. package/esm2020/slider/slider-input.mjs +11 -10
  49. package/esm2020/slider/testing/slider-harness-filters.mjs +1 -1
  50. package/esm2020/slider/testing/slider-harness.mjs +6 -2
  51. package/esm2020/tabs/tab-group.mjs +6 -6
  52. package/esm2020/tabs/tab-nav-bar/tab-nav-bar.mjs +7 -7
  53. package/esm2020/toolbar/toolbar.mjs +2 -2
  54. package/fesm2015/autocomplete/testing.mjs +5 -1
  55. package/fesm2015/autocomplete/testing.mjs.map +1 -1
  56. package/fesm2015/button/testing.mjs +4 -1
  57. package/fesm2015/button/testing.mjs.map +1 -1
  58. package/fesm2015/button-toggle/testing.mjs +7 -2
  59. package/fesm2015/button-toggle/testing.mjs.map +1 -1
  60. package/fesm2015/button.mjs +4 -4
  61. package/fesm2015/button.mjs.map +1 -1
  62. package/fesm2015/checkbox/testing.mjs +4 -1
  63. package/fesm2015/checkbox/testing.mjs.map +1 -1
  64. package/fesm2015/chips/testing.mjs +15 -4
  65. package/fesm2015/chips/testing.mjs.map +1 -1
  66. package/fesm2015/chips.mjs +14 -8
  67. package/fesm2015/chips.mjs.map +1 -1
  68. package/fesm2015/core.mjs +100 -24
  69. package/fesm2015/core.mjs.map +1 -1
  70. package/fesm2015/form-field/testing.mjs +2 -1
  71. package/fesm2015/form-field/testing.mjs.map +1 -1
  72. package/fesm2015/form-field.mjs +22 -12
  73. package/fesm2015/form-field.mjs.map +1 -1
  74. package/fesm2015/legacy-autocomplete/testing.mjs +6 -8
  75. package/fesm2015/legacy-autocomplete/testing.mjs.map +1 -1
  76. package/fesm2015/legacy-button/testing.mjs +4 -1
  77. package/fesm2015/legacy-button/testing.mjs.map +1 -1
  78. package/fesm2015/legacy-checkbox/testing.mjs +4 -1
  79. package/fesm2015/legacy-checkbox/testing.mjs.map +1 -1
  80. package/fesm2015/legacy-form-field/testing.mjs +2 -1
  81. package/fesm2015/legacy-form-field/testing.mjs.map +1 -1
  82. package/fesm2015/list.mjs +2 -12
  83. package/fesm2015/list.mjs.map +1 -1
  84. package/fesm2015/menu.mjs +2 -2
  85. package/fesm2015/menu.mjs.map +1 -1
  86. package/fesm2015/progress-spinner.mjs +3 -4
  87. package/fesm2015/progress-spinner.mjs.map +1 -1
  88. package/fesm2015/slider/testing.mjs +5 -1
  89. package/fesm2015/slider/testing.mjs.map +1 -1
  90. package/fesm2015/slider.mjs +10 -9
  91. package/fesm2015/slider.mjs.map +1 -1
  92. package/fesm2015/tabs.mjs +11 -11
  93. package/fesm2015/tabs.mjs.map +1 -1
  94. package/fesm2015/toolbar.mjs +2 -2
  95. package/fesm2015/toolbar.mjs.map +1 -1
  96. package/fesm2020/autocomplete/testing.mjs +5 -1
  97. package/fesm2020/autocomplete/testing.mjs.map +1 -1
  98. package/fesm2020/button/testing.mjs +4 -1
  99. package/fesm2020/button/testing.mjs.map +1 -1
  100. package/fesm2020/button-toggle/testing.mjs +7 -2
  101. package/fesm2020/button-toggle/testing.mjs.map +1 -1
  102. package/fesm2020/button.mjs +4 -4
  103. package/fesm2020/button.mjs.map +1 -1
  104. package/fesm2020/checkbox/testing.mjs +4 -1
  105. package/fesm2020/checkbox/testing.mjs.map +1 -1
  106. package/fesm2020/chips/testing.mjs +14 -3
  107. package/fesm2020/chips/testing.mjs.map +1 -1
  108. package/fesm2020/chips.mjs +14 -8
  109. package/fesm2020/chips.mjs.map +1 -1
  110. package/fesm2020/core.mjs +99 -24
  111. package/fesm2020/core.mjs.map +1 -1
  112. package/fesm2020/form-field/testing.mjs +2 -1
  113. package/fesm2020/form-field/testing.mjs.map +1 -1
  114. package/fesm2020/form-field.mjs +22 -12
  115. package/fesm2020/form-field.mjs.map +1 -1
  116. package/fesm2020/legacy-autocomplete/testing.mjs +5 -1
  117. package/fesm2020/legacy-autocomplete/testing.mjs.map +1 -1
  118. package/fesm2020/legacy-button/testing.mjs +4 -1
  119. package/fesm2020/legacy-button/testing.mjs.map +1 -1
  120. package/fesm2020/legacy-checkbox/testing.mjs +4 -1
  121. package/fesm2020/legacy-checkbox/testing.mjs.map +1 -1
  122. package/fesm2020/legacy-form-field/testing.mjs +2 -1
  123. package/fesm2020/legacy-form-field/testing.mjs.map +1 -1
  124. package/fesm2020/list.mjs +2 -12
  125. package/fesm2020/list.mjs.map +1 -1
  126. package/fesm2020/menu.mjs +2 -2
  127. package/fesm2020/menu.mjs.map +1 -1
  128. package/fesm2020/progress-spinner.mjs +3 -4
  129. package/fesm2020/progress-spinner.mjs.map +1 -1
  130. package/fesm2020/slider/testing.mjs +5 -1
  131. package/fesm2020/slider/testing.mjs.map +1 -1
  132. package/fesm2020/slider.mjs +10 -9
  133. package/fesm2020/slider.mjs.map +1 -1
  134. package/fesm2020/tabs.mjs +11 -11
  135. package/fesm2020/tabs.mjs.map +1 -1
  136. package/fesm2020/toolbar.mjs +2 -2
  137. package/fesm2020/toolbar.mjs.map +1 -1
  138. package/form-field/_form-field-focus-overlay.scss +2 -0
  139. package/form-field/_mdc-text-field-theme-variable-refresh.scss +40 -15
  140. package/form-field/index.d.ts +4 -4
  141. package/form-field/testing/index.d.ts +2 -0
  142. package/legacy-autocomplete/testing/index.d.ts +2 -0
  143. package/list/_interactive-list-theme.scss +0 -17
  144. package/list/index.d.ts +0 -12
  145. package/menu/index.d.ts +1 -1
  146. package/package.json +2 -2
  147. package/prebuilt-themes/deeppurple-amber.css +1 -1
  148. package/prebuilt-themes/indigo-pink.css +1 -1
  149. package/prebuilt-themes/pink-bluegrey.css +1 -1
  150. package/prebuilt-themes/purple-green.css +1 -1
  151. package/progress-bar/_progress-bar-theme.scss +9 -2
  152. package/progress-spinner/index.d.ts +3 -4
  153. package/schematics/ng-add/index.js +1 -1
  154. package/schematics/ng-add/index.mjs +1 -1
  155. package/schematics/ng-generate/mdc-migration/index_bundled.js +16 -11
  156. package/schematics/ng-generate/mdc-migration/index_bundled.js.map +2 -2
  157. package/schematics/ng-generate/mdc-migration/mdc_migration_bundle_metadata.json +1 -1
  158. package/schematics/ng-update/index_bundled.js +1 -1
  159. package/schematics/ng-update/index_bundled.js.map +2 -2
  160. package/schematics/ng-update/ng_update_index_metadata.json +1 -1
  161. package/slider/index.d.ts +2 -2
  162. package/slider/testing/index.d.ts +2 -0
  163. package/snack-bar/_snack-bar-theme.scss +11 -7
  164. package/tabs/_tabs-common.scss +40 -0
  165. package/tabs/_tabs-theme.scss +4 -30
@@ -3,9 +3,12 @@
3
3
  @use '@material/theme/theme-color' as mdc-theme-color;
4
4
  @use '@material/linear-progress/linear-progress-theme' as mdc-linear-progress-theme;
5
5
  @use 'sass:color';
6
+ @use 'sass:meta';
6
7
 
7
8
 
8
9
  @mixin _palette-styles($color) {
10
+ $color-value: mdc-theme-color.prop-value($color);
11
+
9
12
  // We can't set the `track-color` using `theme`, because it isn't possible for it to use a CSS
10
13
  // variable since MDC's buffer animation works by constructing an SVG string from this color.
11
14
  @include mdc-linear-progress-theme.theme-styles((
@@ -13,11 +16,15 @@
13
16
  // writing, their buffer color is hardcoded to #e6e6e6 which both doesn't account for theming
14
17
  // and doesn't match the Material design spec. For now we approximate the buffer background by
15
18
  // applying an opacity to the color of the bar.
16
- track-color: color.adjust(mdc-theme-color.prop-value($color), $alpha: -0.75),
19
+ track-color: if(
20
+ meta.type-of($color-value) == color,
21
+ color.adjust($color-value, $alpha: -0.75),
22
+ $color-value
23
+ ),
17
24
  ));
18
25
 
19
26
  @include mdc-linear-progress-theme.theme((
20
- active-indicator-color: mdc-theme-color.prop-value($color),
27
+ active-indicator-color: $color-value,
21
28
  ));
22
29
  }
23
30
 
@@ -94,10 +94,9 @@ export declare class MatProgressSpinnerModule {
94
94
  }
95
95
 
96
96
  /**
97
- * `<mat-spinner>` component.
98
- *
99
- * This is a component definition to be used as a convenience reference to create an
100
- * indeterminate `<mat-progress-spinner>` instance.
97
+ * @deprecated Import Progress Spinner instead. Note that the
98
+ * `mat-spinner` selector isn't deprecated.
99
+ * @breaking-change 16.0.0
101
100
  */
102
101
  export declare const MatSpinner: typeof MatProgressSpinner;
103
102
 
@@ -18,7 +18,7 @@ const package_config_1 = require("./package-config");
18
18
  * Note that the fallback version range does not use caret, but tilde because that is
19
19
  * the default for Angular framework dependencies in CLI projects.
20
20
  */
21
- const fallbackMaterialVersionRange = `~15.0.1`;
21
+ const fallbackMaterialVersionRange = `~15.0.3`;
22
22
  /**
23
23
  * Schematic factory entry-point for the `ng-add` schematic. The ng-add schematic will be
24
24
  * automatically executed if developers run `ng add @angular/material`.
@@ -18,7 +18,7 @@ const package_config_1 = require("./package-config");
18
18
  * Note that the fallback version range does not use caret, but tilde because that is
19
19
  * the default for Angular framework dependencies in CLI projects.
20
20
  */
21
- const fallbackMaterialVersionRange = `~15.0.1`;
21
+ const fallbackMaterialVersionRange = `~15.0.3`;
22
22
  /**
23
23
  * Schematic factory entry-point for the `ng-add` schematic. The ng-add schematic will be
24
24
  * automatically executed if developers run `ng add @angular/material`.
@@ -6398,7 +6398,7 @@ var ButtonStylesMigrator = class extends StyleMigrator {
6398
6398
  { old: ".mat-fab", new: ".mat-mdc-fab" },
6399
6399
  { old: ".mat-mini-fab", new: ".mat-mdc-mini-fab" },
6400
6400
  { old: ".mat-stroked-button", new: ".mat-mdc-outlined-button" },
6401
- { old: ".mat-flat-button", new: ".mat-mdc-flat-button" }
6401
+ { old: ".mat-flat-button", new: ".mat-mdc-unelevated-button" }
6402
6402
  ];
6403
6403
  }
6404
6404
  };
@@ -21461,16 +21461,19 @@ function updateAttribute(html, node, name, update) {
21461
21461
  const prefix = html.slice(0, index2);
21462
21462
  const suffix = html.slice(index2);
21463
21463
  const attrText = newValue ? `${name}="${newValue}"` : `${name}`;
21464
- if (node.startSourceSpan.start.line === node.startSourceSpan.end.line) {
21465
- return `${prefix} ${attrText}${suffix}`;
21466
- }
21467
- const attr = node.attributes[0];
21468
- if (attr) {
21469
- const ctx = attr.sourceSpan.start.getContext(attr.sourceSpan.start.col + 1, 1);
21470
- const indentation = ctx.before;
21471
- return prefix + indentation + attrText + suffix;
21464
+ const indentation = parseIndentation(html, node);
21465
+ return prefix + indentation + attrText + suffix;
21466
+ }
21467
+ function parseIndentation(html, node) {
21468
+ let whitespace = "";
21469
+ let startOffset = node.startSourceSpan.start.offset + node.name.length + 1;
21470
+ for (let i = startOffset; i < node.startSourceSpan.end.offset - 1; i++) {
21471
+ if (!/\s/.test(html.charAt(i))) {
21472
+ break;
21473
+ }
21474
+ whitespace += html.charAt(i);
21472
21475
  }
21473
- return prefix + attrText + suffix;
21476
+ return whitespace || " ";
21474
21477
  }
21475
21478
  function replaceAt(str, offset, oldSubstr, newSubstr) {
21476
21479
  const index2 = offset;
@@ -22035,7 +22038,9 @@ var SnackBarMigrator = class extends StyleMigrator {
22035
22038
  this.classChanges = [
22036
22039
  { old: ".mat-snack-bar-container", new: ".mat-mdc-snack-bar-container" },
22037
22040
  { old: ".mat-snack-bar-handset", new: ".mat-mdc-snack-bar-handset" },
22038
- { old: ".mat-simple-snackbar", new: ".mat-mdc-simple-snack-bar" }
22041
+ { old: ".mat-simple-snackbar", new: ".mat-mdc-simple-snack-bar" },
22042
+ { old: ".mat-simple-snack-bar-content", new: ".mat-mdc-snack-bar-label" },
22043
+ { old: ".mat-simple-snackbar-action", new: ".mat-mdc-snack-bar-action" }
22039
22044
  ];
22040
22045
  }
22041
22046
  };