@angular/material-experimental 18.0.0-next.1 → 18.0.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 (30) hide show
  1. package/esm2022/column-resize/column-resize-directives/column-resize-flex.mjs +3 -3
  2. package/esm2022/column-resize/column-resize-directives/column-resize.mjs +3 -3
  3. package/esm2022/column-resize/column-resize-directives/default-enabled-column-resize-flex.mjs +3 -3
  4. package/esm2022/column-resize/column-resize-directives/default-enabled-column-resize.mjs +3 -3
  5. package/esm2022/column-resize/column-resize-module.mjs +12 -12
  6. package/esm2022/column-resize/overlay-handle.mjs +3 -3
  7. package/esm2022/column-resize/resizable-directives/default-enabled-resizable.mjs +3 -3
  8. package/esm2022/column-resize/resizable-directives/resizable.mjs +3 -3
  9. package/esm2022/column-resize/resize-strategy.mjs +3 -3
  10. package/esm2022/menubar/menubar-item.mjs +3 -3
  11. package/esm2022/menubar/menubar-module.mjs +4 -4
  12. package/esm2022/menubar/menubar.mjs +3 -3
  13. package/esm2022/popover-edit/lens-directives.mjs +9 -9
  14. package/esm2022/popover-edit/popover-edit-module.mjs +4 -4
  15. package/esm2022/popover-edit/table-directives.mjs +12 -12
  16. package/esm2022/selection/row-selection.mjs +3 -3
  17. package/esm2022/selection/select-all.mjs +3 -3
  18. package/esm2022/selection/selection-column.mjs +3 -3
  19. package/esm2022/selection/selection-module.mjs +4 -4
  20. package/esm2022/selection/selection-toggle.mjs +3 -3
  21. package/esm2022/selection/selection.mjs +3 -3
  22. package/esm2022/version.mjs +1 -1
  23. package/fesm2022/column-resize.mjs +36 -36
  24. package/fesm2022/material-experimental.mjs +1 -1
  25. package/fesm2022/material-experimental.mjs.map +1 -1
  26. package/fesm2022/menubar.mjs +10 -10
  27. package/fesm2022/popover-edit.mjs +25 -25
  28. package/fesm2022/selection.mjs +19 -19
  29. package/package.json +3 -3
  30. package/theming/_color-api-back-compat.scss +36 -23
@@ -1,75 +1,85 @@
1
1
  @use '@angular/material' as mat;
2
2
 
3
+ // We want to emit only the overrides, because the backwards compatibility styles are usually
4
+ // emitted after all the tokens have been included once already. This allows us to save ~50kb
5
+ // from the bundle.
6
+ $_overrides-only: true;
7
+
3
8
  @mixin color-variant-styles($theme, $color-variant) {
9
+ $primary-options: (color-variant: $color-variant, emit-overrides-only: $_overrides-only);
10
+
4
11
  // Some components use the secondary color rather than primary color for `.mat-primary`.
5
12
  // Those components should use the $secondary-color-variant.
6
- $secondary-color-variant: if($color-variant == primary, secondary, $color-variant);
13
+ $secondary-options: (
14
+ color-variant: if($color-variant == primary, secondary, $color-variant),
15
+ emit-overrides-only: $_overrides-only
16
+ );
7
17
 
8
- @include mat.option-color($theme, $color-variant: $secondary-color-variant);
9
- @include mat.progress-spinner-color($theme, $color-variant: $color-variant);
10
- @include mat.pseudo-checkbox-color($theme, $color-variant: $color-variant);
11
- @include mat.stepper-color($theme, $color-variant: $color-variant);
18
+ @include mat.option-color($theme, $secondary-options...);
19
+ @include mat.progress-spinner-color($theme, $primary-options...);
20
+ @include mat.pseudo-checkbox-color($theme, $primary-options...);
21
+ @include mat.stepper-color($theme, $primary-options...);
12
22
 
13
23
  &.mat-icon {
14
- @include mat.icon-color($theme, $color-variant: $color-variant);
24
+ @include mat.icon-color($theme, $primary-options...);
15
25
  }
16
26
 
17
27
  &.mat-mdc-checkbox {
18
- @include mat.checkbox-color($theme, $color-variant: $color-variant);
28
+ @include mat.checkbox-color($theme, $primary-options...);
19
29
  }
20
30
 
21
31
  &.mat-mdc-slider {
22
- @include mat.slider-color($theme, $color-variant: $color-variant);
32
+ @include mat.slider-color($theme, $primary-options...);
23
33
  }
24
34
 
25
35
  &.mat-mdc-tab-group,
26
36
  &.mat-mdc-tab-nav-bar {
27
- @include mat.tabs-color($theme, $color-variant: $color-variant);
37
+ @include mat.tabs-color($theme, $primary-options...);
28
38
  }
29
39
 
30
40
  &.mat-mdc-slide-toggle {
31
- @include mat.slide-toggle-color($theme, $color-variant: $color-variant);
41
+ @include mat.slide-toggle-color($theme, $primary-options...);
32
42
  }
33
43
 
34
44
  &.mat-mdc-form-field {
35
- @include mat.select-color($theme, $color-variant: $color-variant);
45
+ @include mat.select-color($theme, $primary-options...);
36
46
  }
37
47
 
38
48
  &.mat-mdc-radio-button {
39
- @include mat.radio-color($theme, $color-variant: $color-variant);
49
+ @include mat.radio-color($theme, $primary-options...);
40
50
  }
41
51
 
42
52
  &.mat-mdc-progress-bar {
43
- @include mat.progress-bar-color($theme, $color-variant: $color-variant);
53
+ @include mat.progress-bar-color($theme, $primary-options...);
44
54
  }
45
55
 
46
56
  &.mat-mdc-form-field {
47
- @include mat.form-field-color($theme, $color-variant: $color-variant);
57
+ @include mat.form-field-color($theme, $primary-options...);
48
58
  }
49
59
 
50
60
  &.mat-datepicker-content {
51
- @include mat.datepicker-color($theme, $color-variant: $color-variant);
61
+ @include mat.datepicker-color($theme, $primary-options...);
52
62
  }
53
63
 
54
64
  &.mat-mdc-button-base {
55
- @include mat.button-color($theme, $color-variant: $color-variant);
65
+ @include mat.button-color($theme, $primary-options...);
56
66
  }
57
67
 
58
68
  &.mat-mdc-standard-chip {
59
- @include mat.chips-color($theme, $color-variant: $secondary-color-variant);
69
+ @include mat.chips-color($theme, $secondary-options...);
60
70
  }
61
71
 
62
72
  .mdc-list-item__start,
63
73
  .mdc-list-item__end {
64
- @include mat.checkbox-color($theme, $color-variant: $color-variant);
65
- @include mat.radio-color($theme, $color-variant: $color-variant);
74
+ @include mat.checkbox-color($theme, $primary-options...);
75
+ @include mat.radio-color($theme, $primary-options...);
66
76
  }
67
77
 
68
78
  // M3 dropped support for warn/error color FABs.
69
79
  @if $color-variant != error {
70
80
  &.mat-mdc-fab,
71
81
  &.mat-mdc-mini-fab {
72
- @include mat.fab-color($theme, $color-variant: $color-variant);
82
+ @include mat.fab-color($theme, $primary-options...);
73
83
  }
74
84
  }
75
85
  }
@@ -79,20 +89,23 @@
79
89
  @include color-variant-styles($theme, primary);
80
90
  }
81
91
  .mat-badge {
82
- @include mat.badge-color($theme, $color-variant: primary);
92
+ @include mat.badge-color($theme, $color-variant: primary,
93
+ $emit-overrides-only: $_overrides-only);
83
94
  }
84
95
 
85
96
  .mat-accent {
86
97
  @include color-variant-styles($theme, tertiary);
87
98
  }
88
99
  .mat-badge-accent {
89
- @include mat.badge-color($theme, $color-variant: tertiary);
100
+ @include mat.badge-color($theme, $color-variant: tertiary,
101
+ $emit-overrides-only: $_overrides-only);
90
102
  }
91
103
 
92
104
  .mat-warn {
93
105
  @include color-variant-styles($theme, error);
94
106
  }
95
107
  .mat-badge-warn {
96
- @include mat.badge-color($theme, $color-variant: error);
108
+ @include mat.badge-color($theme, $color-variant: error,
109
+ $emit-overrides-only: $_overrides-only);
97
110
  }
98
111
  }