@angular/material-experimental 18.0.0-next.4 → 18.0.0-next.6

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 (38) hide show
  1. package/_index.scss +0 -7
  2. package/esm2022/column-resize/column-resize-directives/column-resize-flex.mjs +3 -3
  3. package/esm2022/column-resize/column-resize-directives/column-resize.mjs +3 -3
  4. package/esm2022/column-resize/column-resize-directives/default-enabled-column-resize-flex.mjs +3 -3
  5. package/esm2022/column-resize/column-resize-directives/default-enabled-column-resize.mjs +3 -3
  6. package/esm2022/column-resize/column-resize-module.mjs +12 -12
  7. package/esm2022/column-resize/overlay-handle.mjs +3 -3
  8. package/esm2022/column-resize/resizable-directives/default-enabled-resizable.mjs +3 -3
  9. package/esm2022/column-resize/resizable-directives/resizable.mjs +3 -3
  10. package/esm2022/column-resize/resize-strategy.mjs +3 -3
  11. package/esm2022/menubar/menubar-item.mjs +3 -3
  12. package/esm2022/menubar/menubar-module.mjs +4 -4
  13. package/esm2022/menubar/menubar.mjs +3 -3
  14. package/esm2022/popover-edit/lens-directives.mjs +9 -9
  15. package/esm2022/popover-edit/popover-edit-module.mjs +4 -4
  16. package/esm2022/popover-edit/table-directives.mjs +12 -12
  17. package/esm2022/selection/row-selection.mjs +3 -3
  18. package/esm2022/selection/select-all.mjs +3 -3
  19. package/esm2022/selection/selection-column.mjs +3 -3
  20. package/esm2022/selection/selection-module.mjs +4 -4
  21. package/esm2022/selection/selection-toggle.mjs +3 -3
  22. package/esm2022/selection/selection.mjs +3 -3
  23. package/esm2022/version.mjs +1 -1
  24. package/fesm2022/column-resize.mjs +36 -36
  25. package/fesm2022/material-experimental.mjs +1 -1
  26. package/fesm2022/material-experimental.mjs.map +1 -1
  27. package/fesm2022/menubar.mjs +10 -10
  28. package/fesm2022/popover-edit.mjs +25 -25
  29. package/fesm2022/selection.mjs +19 -19
  30. package/package.json +4 -3
  31. package/theming/_color-api-back-compat.scss +0 -111
  32. package/theming/_config-validation.scss +0 -166
  33. package/theming/_custom-tokens.scss +0 -1918
  34. package/theming/_definition.scss +0 -104
  35. package/theming/_format-tokens.scss +0 -5
  36. package/theming/_m3-density.scss +0 -191
  37. package/theming/_m3-palettes.scss +0 -947
  38. package/theming/_m3-tokens.scss +0 -1042
@@ -1,111 +0,0 @@
1
- @use '@angular/material' as mat;
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
-
8
- @mixin color-variant-styles($theme, $color-variant) {
9
- $primary-options: (color-variant: $color-variant, emit-overrides-only: $_overrides-only);
10
-
11
- // Some components use the secondary color rather than primary color for `.mat-primary`.
12
- // Those components should use the $secondary-color-variant.
13
- $secondary-options: (
14
- color-variant: if($color-variant == primary, secondary, $color-variant),
15
- emit-overrides-only: $_overrides-only
16
- );
17
-
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...);
22
-
23
- &.mat-icon {
24
- @include mat.icon-color($theme, $primary-options...);
25
- }
26
-
27
- &.mat-mdc-checkbox {
28
- @include mat.checkbox-color($theme, $primary-options...);
29
- }
30
-
31
- &.mat-mdc-slider {
32
- @include mat.slider-color($theme, $primary-options...);
33
- }
34
-
35
- &.mat-mdc-tab-group,
36
- &.mat-mdc-tab-nav-bar {
37
- @include mat.tabs-color($theme, $primary-options...);
38
- }
39
-
40
- &.mat-mdc-slide-toggle {
41
- @include mat.slide-toggle-color($theme, $primary-options...);
42
- }
43
-
44
- &.mat-mdc-form-field {
45
- @include mat.select-color($theme, $primary-options...);
46
- }
47
-
48
- &.mat-mdc-radio-button {
49
- @include mat.radio-color($theme, $primary-options...);
50
- }
51
-
52
- &.mat-mdc-progress-bar {
53
- @include mat.progress-bar-color($theme, $primary-options...);
54
- }
55
-
56
- &.mat-mdc-form-field {
57
- @include mat.form-field-color($theme, $primary-options...);
58
- }
59
-
60
- &.mat-datepicker-content {
61
- @include mat.datepicker-color($theme, $primary-options...);
62
- }
63
-
64
- &.mat-mdc-button-base {
65
- @include mat.button-color($theme, $primary-options...);
66
- }
67
-
68
- &.mat-mdc-standard-chip {
69
- @include mat.chips-color($theme, $secondary-options...);
70
- }
71
-
72
- .mdc-list-item__start,
73
- .mdc-list-item__end {
74
- @include mat.checkbox-color($theme, $primary-options...);
75
- @include mat.radio-color($theme, $primary-options...);
76
- }
77
-
78
- // M3 dropped support for warn/error color FABs.
79
- @if $color-variant != error {
80
- &.mat-mdc-fab,
81
- &.mat-mdc-mini-fab {
82
- @include mat.fab-color($theme, $primary-options...);
83
- }
84
- }
85
- }
86
-
87
- @mixin color-variants-back-compat($theme) {
88
- .mat-primary {
89
- @include color-variant-styles($theme, primary);
90
- }
91
- .mat-badge {
92
- @include mat.badge-color($theme, $color-variant: primary,
93
- $emit-overrides-only: $_overrides-only);
94
- }
95
-
96
- .mat-accent {
97
- @include color-variant-styles($theme, tertiary);
98
- }
99
- .mat-badge-accent {
100
- @include mat.badge-color($theme, $color-variant: tertiary,
101
- $emit-overrides-only: $_overrides-only);
102
- }
103
-
104
- .mat-warn {
105
- @include color-variant-styles($theme, error);
106
- }
107
- .mat-badge-warn {
108
- @include mat.badge-color($theme, $color-variant: error,
109
- $emit-overrides-only: $_overrides-only);
110
- }
111
- }
@@ -1,166 +0,0 @@
1
- @use 'sass:list';
2
- @use 'sass:map';
3
- @use 'sass:meta';
4
- @use 'sass:string';
5
- @use '@angular/material' as mat;
6
- @use './m3-palettes';
7
-
8
- /// Creates an error message by finding `$config` in the existing message and appending a suffix to
9
- /// it.
10
- /// @param {List|String} $err The error message.
11
- /// @param {String} $suffix The suffix to add.
12
- /// @return {List|String} The updated error message.
13
- @function _create-dollar-config-error-message($err, $suffix) {
14
- @if meta.type-of($err) == 'list' {
15
- @for $i from 1 through list.length($err) {
16
- $err: list.set-nth($err, $i,
17
- _create-dollar-config-error-message(list.nth($err, $i), $suffix));
18
- }
19
- }
20
- @else if meta.type-of($err) == 'string' {
21
- $start: string.index($err, '$config');
22
- @if $start {
23
- $err: string.insert($err, $suffix, $start + 7);
24
- }
25
- }
26
- @return $err;
27
- }
28
-
29
- /// Validates that the given object is an M3 palette.
30
- /// @param {*} $palette The object to test
31
- /// @return {Boolean|null} null if it is a valid M3 palette, else true.
32
- @function _validate-palette($palette) {
33
- @if not meta.type-of($palette) == 'map' {
34
- @return true;
35
- }
36
- $keys: map.keys($palette);
37
- $expected-keys: map.keys(m3-palettes.$red-palette);
38
- @if mat.private-validate-allowed-values($keys, $expected-keys...) or
39
- mat.private-validate-required-values($keys, $expected-keys...) {
40
- @return true;
41
- }
42
- $nv-keys: map.keys(map.get($palette, neutral-variant));
43
- $expected-nv-keys: map.keys(map.get(m3-palettes.$red-palette, neutral-variant));
44
- @if mat.private-validate-allowed-values($nv-keys, $expected-nv-keys...) or
45
- mat.private-validate-required-values($nv-keys, $expected-nv-keys...) {
46
- @return true;
47
- }
48
- @return null;
49
- }
50
-
51
- /// Validates a theme config.
52
- /// @param {Map} $config The config to test.
53
- /// @return {List} null if no error, else the error message
54
- @function validate-theme-config($config) {
55
- $err: mat.private-validate-type($config, 'map', 'null');
56
- @if $err {
57
- @return (#{'$config should be a configuration object. Got:'} $config);
58
- }
59
- $allowed: (color, typography, density);
60
- $err: mat.private-validate-allowed-values(map.keys($config or ()), $allowed...);
61
- @if $err {
62
- @return (
63
- #{'$config has unexpected properties. Valid properties are'}
64
- #{'#{$allowed}.'}
65
- #{'Found:'}
66
- $err
67
- );
68
- }
69
- $err: validate-color-config(map.get($config, color));
70
- @if $err {
71
- @return _create-dollar-config-error-message($err, '.color');
72
- }
73
- $err: validate-typography-config(map.get($config, typography));
74
- @if $err {
75
- @return _create-dollar-config-error-message($err, '.typography');
76
- }
77
- $err: validate-density-config(map.get($config, density));
78
- @if $err {
79
- @return _create-dollar-config-error-message($err, '.density');
80
- }
81
- @return null;
82
- }
83
-
84
- /// Validates a theme color config.
85
- /// @param {Map} $config The config to test.
86
- /// @return {List} null if no error, else the error message
87
- @function validate-color-config($config) {
88
- $err: mat.private-validate-type($config, 'map', 'null');
89
- @if $err {
90
- @return (#{'$config should be a color configuration object. Got:'} $config);
91
- }
92
- $allowed: (theme-type, primary, tertiary);
93
- $err: mat.private-validate-allowed-values(map.keys($config or ()), $allowed...);
94
- @if $err {
95
- @return (
96
- #{'$config has unexpected properties. Valid properties are'}
97
- #{'#{$allowed}.'}
98
- #{'Found:'}
99
- $err
100
- );
101
- }
102
- @if $config and map.has-key($config, theme-type) and
103
- not list.index((light, dark), map.get($config, theme-type)) {
104
- @return (
105
- #{'Expected $config.theme-type to be one of: light, dark. Got:'}
106
- map.get($config, theme-type)
107
- );
108
- }
109
- @each $palette in (primary, secondary, tertiary) {
110
- @if $config and map.has-key($config, $palette) {
111
- $err: _validate-palette(map.get($config, $palette));
112
- @if $err {
113
- @return (
114
- #{'Expected $config.#{$palette} to be a valid M3 palette. Got:'}
115
- map.get($config, $palette)
116
- );
117
- }
118
- }
119
- }
120
- @return null;
121
- }
122
-
123
- /// Validates a theme typography config.
124
- /// @param {Map} $config The config to test.
125
- /// @return {List} null if no error, else the error message
126
- @function validate-typography-config($config) {
127
- $err: mat.private-validate-type($config, 'map', 'null');
128
- @if $err {
129
- @return (#{'$config should be a typography configuration object. Got:'} $config);
130
- }
131
- $allowed: (brand-family, plain-family, bold-weight, medium-weight, regular-weight);
132
- $err: mat.private-validate-allowed-values(map.keys($config or ()), $allowed...);
133
- @if $err {
134
- @return (
135
- #{'$config has unexpected properties. Valid properties are'}
136
- #{'#{$allowed}.'}
137
- #{'Found:'}
138
- $err
139
- );
140
- }
141
- @return null;
142
- }
143
-
144
- /// Validates a theme density config.
145
- /// @param {Map} $config The config to test.
146
- /// @return {List} null if no error, else the error message
147
- @function validate-density-config($config) {
148
- $err: mat.private-validate-type($config, 'map', 'null');
149
- @if $err {
150
- @return (#{'$config should be a density configuration object. Got:'} $config);
151
- }
152
- $err: mat.private-validate-allowed-values(map.keys($config or ()), scale);
153
- @if $err {
154
- @return (#{'$config has unexpected properties. Valid properties are: scale. Found:'} $err);
155
- }
156
- @if $config and map.has-key($config, scale) {
157
- $allowed-scales: (0, -1, -2, -3, -4, -5, minimum, maximum);
158
- @if mat.private-validate-allowed-values(map.get($config, scale), $allowed-scales...) {
159
- @return (
160
- #{'Expected $config.scale to be one of: #{$allowed-scales}. Got:'}
161
- map.get($config, scale)
162
- );
163
- }
164
- }
165
- @return null;
166
- }