@angular/material 20.1.0-next.0 → 20.1.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 (53) hide show
  1. package/autocomplete/_m2-autocomplete.scss +5 -2
  2. package/bottom-sheet/_m2-bottom-sheet.scss +6 -2
  3. package/button/_m2-button.scss +39 -34
  4. package/button/_m2-fab.scss +14 -10
  5. package/button/_m2-icon-button.scss +7 -5
  6. package/card/_m2-card.scss +1 -1
  7. package/checkbox/_m2-checkbox.scss +2 -3
  8. package/chips/_m2-chip.scss +6 -23
  9. package/core/m2/_theming.scss +72 -108
  10. package/core/option/_m2-optgroup.scss +4 -1
  11. package/core/option/_m2-option.scss +7 -6
  12. package/core/ripple/_m2-ripple.scss +6 -10
  13. package/core/selection/pseudo-checkbox/_m2-pseudo-checkbox.scss +2 -3
  14. package/core/tokens/_m2-utils.scss +1 -11
  15. package/core/tokens/_m3-system.scss +11 -9
  16. package/datepicker/_datepicker-theme.scss +16 -54
  17. package/datepicker/_m2-datepicker.scss +26 -109
  18. package/datepicker/index.d.ts +1 -1
  19. package/dialog/_m2-dialog.scss +6 -4
  20. package/divider/_m2-divider.scss +4 -2
  21. package/fesm2022/button.mjs +2 -2
  22. package/fesm2022/button.mjs.map +1 -1
  23. package/fesm2022/core.mjs +1 -1
  24. package/fesm2022/core.mjs.map +1 -1
  25. package/fesm2022/datepicker.mjs.map +1 -1
  26. package/fesm2022/slider.mjs +2 -2
  27. package/fesm2022/slider.mjs.map +1 -1
  28. package/form-field/_m2-form-field.scss +2 -2
  29. package/list/_m2-list.scss +5 -9
  30. package/menu/_m2-menu.scss +12 -9
  31. package/package.json +2 -2
  32. package/paginator/_m2-paginator.scss +2 -1
  33. package/prebuilt-themes/azure-blue.css +1 -1
  34. package/prebuilt-themes/cyan-orange.css +1 -1
  35. package/prebuilt-themes/deeppurple-amber.css +1 -1
  36. package/prebuilt-themes/indigo-pink.css +1 -1
  37. package/prebuilt-themes/magenta-violet.css +1 -1
  38. package/prebuilt-themes/pink-bluegrey.css +1 -1
  39. package/prebuilt-themes/purple-green.css +1 -1
  40. package/prebuilt-themes/rose-red.css +1 -1
  41. package/radio/_m3-radio.scss +1 -1
  42. package/schematics/ng-add/index.js +1 -1
  43. package/select/_m2-select.scss +4 -3
  44. package/select/_select-theme.scss +6 -3
  45. package/slider/_m2-slider.scss +27 -26
  46. package/slider/_slider-theme.scss +2 -2
  47. package/snack-bar/_m2-snack-bar.scss +0 -1
  48. package/sort/_m2-sort.scss +5 -2
  49. package/table/_m2-table.scss +7 -5
  50. package/tabs/_m2-tabs.scss +5 -11
  51. package/timepicker/_m2-timepicker.scss +5 -2
  52. package/toolbar/_m2-toolbar.scss +4 -2
  53. package/tree/_m2-tree.scss +5 -2
@@ -1,6 +1,8 @@
1
1
  @use 'sass:map';
2
2
  @use '../core/theming/inspection';
3
3
  @use '../core/style/elevation';
4
+ @use '../core/tokens/m2-utils';
5
+ @use '../core/tokens/m3-utils';
4
6
 
5
7
  // Tokens that can't be configured through Angular Material's current theming API,
6
8
  // but may be in a future version of the theming API.
@@ -31,44 +33,43 @@
31
33
 
32
34
  // Tokens that can be configured through Angular Material's color theming API.
33
35
  @function get-color-tokens($theme) {
36
+ $system: m2-utils.get-system($theme);
34
37
  $theme-color-tokens: private-get-color-palette-color-tokens($theme, primary);
35
- $is-dark: inspection.get-theme-type($theme) == dark;
36
- $on-surface: if($is-dark, #fff, #000);
37
38
 
38
39
  @return map.merge(
39
40
  $theme-color-tokens,
40
41
  (
41
- slider-disabled-active-track-color: inspection.get-theme-color($theme, system, on-surface),
42
- slider-disabled-handle-color: inspection.get-theme-color($theme, system, on-surface),
43
- slider-disabled-inactive-track-color: inspection.get-theme-color($theme, system, on-surface),
44
- slider-label-container-color: $on-surface,
45
- slider-label-label-text-color: if($is-dark, #000, #fff),
46
- slider-value-indicator-opacity: if($is-dark, 0.9, 0.6),
47
- slider-with-overlap-handle-outline-color: #fff,
48
- slider-with-tick-marks-disabled-container-color:
49
- inspection.get-theme-color($theme, system, on-surface),
42
+ slider-disabled-active-track-color: map.get($system, on-surface),
43
+ slider-disabled-handle-color: map.get($system, on-surface),
44
+ slider-disabled-inactive-track-color: map.get($system, on-surface),
45
+ slider-label-container-color: map.get($system, inverse-surface),
46
+ slider-label-label-text-color: map.get($system, inverse-on-surface),
47
+ slider-value-indicator-opacity: 1,
48
+ slider-with-overlap-handle-outline-color: map.get($system, on-surface),
49
+ slider-with-tick-marks-disabled-container-color: map.get($system, on-surface),
50
50
  ),
51
51
  );
52
52
  }
53
53
 
54
54
  // Generates tokens for the slider properties that change based on the theme.
55
- @function private-get-color-palette-color-tokens($theme, $palette-name) {
56
- $color: inspection.get-theme-color($theme, $palette-name);
57
- $hover-ripple-color: if($color == null, null, #{rgba($color, 0.05)});
58
- $focus-ripple-color: if($color == null, null, #{rgba($color, 0.2)});
59
- $on-color: inspection.get-theme-color($theme, $palette-name, default-contrast);
55
+ @function private-get-color-palette-color-tokens($theme, $color-variant) {
56
+ $system: m2-utils.get-system($theme);
57
+ $system: m3-utils.replace-colors-with-variant($system, primary, $color-variant);
58
+ $color: map.get($system, primary);
60
59
 
61
60
  @return (
62
- slider-active-track-color: $color,
63
- slider-focus-handle-color: $color,
64
- slider-focus-state-layer-color: $focus-ripple-color,
65
- slider-handle-color: $color,
66
- slider-hover-handle-color: $color,
67
- slider-hover-state-layer-color: $hover-ripple-color,
68
- slider-inactive-track-color: $color,
69
- slider-ripple-color: $color,
70
- slider-with-tick-marks-active-container-color: $on-color,
71
- slider-with-tick-marks-inactive-container-color: $color,
61
+ slider-active-track-color: map.get($system, primary),
62
+ slider-focus-handle-color: map.get($system, primary),
63
+ slider-handle-color: map.get($system, primary),
64
+ slider-hover-handle-color: map.get($system, primary),
65
+ slider-focus-state-layer-color: m3-utils.color-with-opacity(
66
+ map.get($system, primary), map.get($system, focus-state-layer-opacity)),
67
+ slider-hover-state-layer-color: m3-utils.color-with-opacity(
68
+ map.get($system, primary), map.get($system, hover-state-layer-opacity)),
69
+ slider-inactive-track-color: map.get($system, primary),
70
+ slider-ripple-color: map.get($system, primary),
71
+ slider-with-tick-marks-active-container-color: map.get($system, on-primary),
72
+ slider-with-tick-marks-inactive-container-color: map.get($system, primary),
72
73
  );
73
74
  }
74
75
 
@@ -33,12 +33,12 @@
33
33
 
34
34
  .mat-accent {
35
35
  @include token-utils.create-token-values-mixed(
36
- m2-slider.private-get-color-palette-color-tokens($theme, accent));
36
+ m2-slider.private-get-color-palette-color-tokens($theme, secondary));
37
37
  }
38
38
 
39
39
  .mat-warn {
40
40
  @include token-utils.create-token-values-mixed(
41
- m2-slider.private-get-color-palette-color-tokens($theme, warn));
41
+ m2-slider.private-get-color-palette-color-tokens($theme, error));
42
42
  }
43
43
  }
44
44
  }
@@ -14,7 +14,6 @@
14
14
  @function get-color-tokens($theme) {
15
15
  $is-dark: inspection.get-theme-type($theme) == dark;
16
16
  $system: m2-utils.get-system($theme);
17
- $surface: inspection.get-theme-color($theme, system, surface);
18
17
 
19
18
  @return (
20
19
  snack-bar-container-color: map.get($system, inverse-surface),
@@ -1,4 +1,5 @@
1
- @use '../core/theming/inspection';
1
+ @use '../core/tokens/m2-utils';
2
+ @use 'sass:map';
2
3
 
3
4
  // Tokens that can't be configured through Angular Material's current theming API,
4
5
  // but may be in a future version of the theming API.
@@ -8,8 +9,10 @@
8
9
 
9
10
  // Tokens that can be configured through Angular Material's color theming API.
10
11
  @function get-color-tokens($theme) {
12
+ $system: m2-utils.get-system($theme);
13
+
11
14
  @return (
12
- sort-arrow-color: inspection.get-theme-color($theme, system, on-surface),
15
+ sort-arrow-color: map.get($system, on-surface),
13
16
  );
14
17
  }
15
18
 
@@ -1,6 +1,7 @@
1
1
  @use 'sass:map';
2
2
  @use '../core/theming/theming';
3
3
  @use '../core/theming/inspection';
4
+ @use '../core/tokens/m2-utils';
4
5
 
5
6
  // Tokens that can't be configured through Angular Material's current theming API,
6
7
  // but may be in a future version of the theming API.
@@ -12,12 +13,13 @@
12
13
 
13
14
  // Tokens that can be configured through Angular Material's color theming API.
14
15
  @function get-color-tokens($theme) {
15
- @return (
16
- table-background-color: inspection.get-theme-color($theme, system, surface),
16
+ $system: m2-utils.get-system($theme);
17
17
 
18
- table-header-headline-color: inspection.get-theme-color($theme, system, on-surface),
19
- table-row-item-label-text-color: inspection.get-theme-color($theme, system, on-surface),
20
- table-row-item-outline-color: inspection.get-theme-color($theme, system, outline),
18
+ @return (
19
+ table-background-color: map.get($system, surface),
20
+ table-header-headline-color: map.get($system, on-surface),
21
+ table-row-item-label-text-color: map.get($system, on-surface),
22
+ table-row-item-outline-color: map.get($system, outline),
21
23
  );
22
24
  }
23
25
 
@@ -29,22 +29,16 @@
29
29
  @function get-color-tokens($theme, $color-variant, $exclude: ()) {
30
30
  $system: m2-utils.get-system($theme);
31
31
  $system: m3-utils.replace-colors-with-variant($system, primary, $color-variant);
32
- $is-dark: inspection.get-theme-type($theme) == dark;
33
- $inactive-label-text-color: inspection.get-theme-color($theme, foreground, base, 0.6);
34
32
 
35
33
  $tokens: (
36
- tab-disabled-ripple-color: inspection.get-theme-color($theme, foreground, disabled),
37
- tab-pagination-icon-color: inspection.get-theme-color($theme, system, on-surface),
38
-
39
- // Note: MDC has equivalents of these tokens, but they lead to much higher selector specificity.
40
- tab-inactive-label-text-color: $inactive-label-text-color,
34
+ tab-disabled-ripple-color: map.get($system, on-surface-variant),
35
+ tab-pagination-icon-color: map.get($system, on-surface),
36
+ tab-inactive-label-text-color: map.get($system, on-surface-variant),
41
37
  tab-active-label-text-color: map.get($system, primary),
42
-
43
- // Tokens needed to implement the gmat styles. Externally they don't change.
44
38
  tab-active-ripple-color: map.get($system, primary),
45
39
  tab-inactive-ripple-color: map.get($system, primary),
46
- tab-inactive-focus-label-text-color: $inactive-label-text-color,
47
- tab-inactive-hover-label-text-color: $inactive-label-text-color,
40
+ tab-inactive-focus-label-text-color: map.get($system, on-surface-variant),
41
+ tab-inactive-hover-label-text-color: map.get($system, on-surface-variant),
48
42
  tab-active-focus-label-text-color: map.get($system, primary),
49
43
  tab-active-hover-label-text-color: map.get($system, primary),
50
44
  tab-active-focus-indicator-color: map.get($system, primary),
@@ -1,5 +1,6 @@
1
- @use '../core/theming/inspection';
2
1
  @use '../core/style/elevation';
2
+ @use '../core/tokens/m2-utils';
3
+ @use 'sass:map';
3
4
 
4
5
  // Tokens that can't be configured through Angular Material's current theming API,
5
6
  // but may be in a future version of the theming API.
@@ -12,8 +13,10 @@
12
13
 
13
14
  // Tokens that can be configured through Angular Material's color theming API.
14
15
  @function get-color-tokens($theme) {
16
+ $system: m2-utils.get-system($theme);
17
+
15
18
  @return (
16
- timepicker-container-background-color: inspection.get-theme-color($theme, system, surface)
19
+ timepicker-container-background-color: map.get($system, surface)
17
20
  );
18
21
  }
19
22
 
@@ -1,6 +1,7 @@
1
1
  @use 'sass:map';
2
2
  @use '../core/theming/theming';
3
3
  @use '../core/theming/inspection';
4
+ @use '../core/tokens/m2-utils';
4
5
 
5
6
  // Tokens that can't be configured through Angular Material's current theming API,
6
7
  // but may be in a future version of the theming API.
@@ -10,9 +11,10 @@
10
11
 
11
12
  // Tokens that can be configured through Angular Material's color theming API.
12
13
  @function get-color-tokens($theme) {
14
+ $system: m2-utils.get-system($theme);
13
15
  @return private-get-color-palette-color-tokens(
14
- $background-color: inspection.get-theme-color($theme, system, surface),
15
- $text-color: inspection.get-theme-color($theme, system, on-surface),
16
+ $background-color: map.get($system, surface),
17
+ $text-color: map.get($system, on-surface),
16
18
  );
17
19
  }
18
20
 
@@ -1,6 +1,7 @@
1
1
  @use 'sass:map';
2
2
  @use '../core/theming/theming';
3
3
  @use '../core/theming/inspection';
4
+ @use '../core/tokens/m2-utils';
4
5
 
5
6
  // Tokens that can't be configured through Angular Material's current theming API,
6
7
  // but may be in a future version of the theming API.
@@ -10,9 +11,11 @@
10
11
 
11
12
  // Tokens that can be configured through Angular Material's color theming API.
12
13
  @function get-color-tokens($theme) {
14
+ $system: m2-utils.get-system($theme);
15
+
13
16
  @return (
14
- tree-container-background-color: inspection.get-theme-color($theme, system, surface),
15
- tree-node-text-color: inspection.get-theme-color($theme, system, on-surface),
17
+ tree-container-background-color: map.get($system, surface),
18
+ tree-node-text-color: map.get($system, on-surface),
16
19
  );
17
20
  }
18
21