@angular/material 17.0.0-next.0 → 17.0.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.
- package/_index.scss +2 -2
- package/button/_button-base.scss +3 -3
- package/button/_button-theme-private.scss +3 -2
- package/button/_button-theme.scss +18 -25
- package/button/_fab-theme.scss +31 -49
- package/button/_icon-button-theme.scss +19 -26
- package/button/index.d.ts +22 -31
- package/card/_card-theme.scss +27 -38
- package/checkbox/_checkbox-theme.scss +28 -45
- package/core/_core-theme.scss +24 -39
- package/core/mdc-helpers/_mdc-helpers.scss +19 -22
- package/core/option/_optgroup-theme.scss +13 -23
- package/core/option/_option-theme.scss +23 -37
- package/core/ripple/_ripple-theme.scss +6 -10
- package/core/selection/pseudo-checkbox/_pseudo-checkbox-theme.scss +17 -24
- package/core/style/_private.scss +3 -3
- package/core/style/_sass-utils.scss +7 -0
- package/core/theming/_inspection.scss +87 -60
- package/core/theming/_m2-inspection.scss +211 -0
- package/core/theming/_theming.scss +59 -6
- package/core/tokens/m2/mat/_card.scss +15 -21
- package/core/tokens/m2/mat/_form-field.scss +21 -25
- package/core/tokens/m2/mat/_optgroup.scss +12 -17
- package/core/tokens/m2/mat/_option.scss +16 -28
- package/core/tokens/m2/mat/_paginator.scss +16 -18
- package/core/tokens/m2/mat/_radio.scss +7 -10
- package/core/tokens/m2/mat/_slide-toggle.scss +9 -17
- package/core/tokens/m2/mat/_slider.scss +5 -5
- package/core/tokens/m2/mdc/_checkbox.scss +21 -20
- package/core/tokens/m2/mdc/_elevated-card.scss +6 -9
- package/core/tokens/m2/mdc/_extended-fab.scss +8 -17
- package/core/tokens/m2/mdc/_fab.scss +6 -7
- package/core/tokens/m2/mdc/_filled-text-field.scss +16 -22
- package/core/tokens/m2/mdc/_icon-button.scss +1 -1
- package/core/tokens/m2/mdc/_linear-progress.scss +9 -10
- package/core/tokens/m2/mdc/_list.scss +44 -42
- package/core/tokens/m2/mdc/_outlined-card.scss +7 -10
- package/core/tokens/m2/mdc/_outlined-text-field.scss +14 -20
- package/core/tokens/m2/mdc/_radio.scss +11 -11
- package/core/tokens/m2/mdc/_slider.scss +16 -23
- package/core/tokens/m2/mdc/_switch.scss +16 -19
- package/core/typography/_definition.scss +258 -0
- package/core/typography/_property-getters.scss +63 -0
- package/core/typography/_typography-utils.scss +9 -69
- package/core/typography/_typography.scss +10 -343
- package/core/typography/_versioning.scss +86 -0
- package/datepicker/index.d.ts +3 -3
- package/dialog/_dialog-theme.scss +10 -0
- package/esm2022/autocomplete/autocomplete.mjs +1 -1
- package/esm2022/button/button-base.mjs +32 -27
- package/esm2022/button/button.mjs +6 -6
- package/esm2022/button/fab.mjs +23 -31
- package/esm2022/button/icon-button.mjs +6 -6
- package/esm2022/button/testing/button-harness.mjs +3 -3
- package/esm2022/core/version.mjs +1 -1
- package/esm2022/datepicker/calendar.mjs +1 -1
- package/esm2022/datepicker/datepicker-base.mjs +2 -2
- package/esm2022/datepicker/datepicker-toggle.mjs +1 -1
- package/esm2022/datepicker/month-view.mjs +2 -2
- package/esm2022/datepicker/multi-year-view.mjs +2 -2
- package/esm2022/datepicker/year-view.mjs +2 -2
- package/esm2022/dialog/dialog-container.mjs +2 -2
- package/esm2022/form-field/form-field.mjs +3 -3
- package/esm2022/paginator/paginator.mjs +1 -1
- package/esm2022/select/select.mjs +3 -3
- package/esm2022/slider/slider-input.mjs +19 -9
- package/esm2022/slider/slider.mjs +2 -2
- package/esm2022/snack-bar/simple-snack-bar.mjs +1 -1
- package/fesm2022/autocomplete.mjs.map +1 -1
- package/fesm2022/button/testing.mjs +2 -2
- package/fesm2022/button/testing.mjs.map +1 -1
- package/fesm2022/button.mjs +59 -61
- package/fesm2022/button.mjs.map +1 -1
- package/fesm2022/core.mjs +1 -1
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/datepicker.mjs +6 -6
- package/fesm2022/datepicker.mjs.map +1 -1
- package/fesm2022/dialog.mjs +2 -2
- package/fesm2022/dialog.mjs.map +1 -1
- package/fesm2022/form-field.mjs +2 -2
- package/fesm2022/form-field.mjs.map +1 -1
- package/fesm2022/paginator.mjs +1 -1
- package/fesm2022/paginator.mjs.map +1 -1
- package/fesm2022/select.mjs +2 -2
- package/fesm2022/select.mjs.map +1 -1
- package/fesm2022/slider.mjs +20 -10
- package/fesm2022/slider.mjs.map +1 -1
- package/fesm2022/snack-bar.mjs +1 -1
- package/fesm2022/snack-bar.mjs.map +1 -1
- package/form-field/_form-field-density.scss +3 -4
- package/form-field/_form-field-focus-overlay.scss +1 -1
- package/form-field/_form-field-theme.scss +24 -34
- package/input/_input-theme.scss +11 -23
- package/list/_list-theme.scss +26 -41
- package/package.json +2 -2
- package/paginator/_paginator-theme.scss +15 -24
- package/prebuilt-themes/deeppurple-amber.css +1 -1
- package/prebuilt-themes/indigo-pink.css +1 -1
- package/prebuilt-themes/pink-bluegrey.css +1 -1
- package/prebuilt-themes/purple-green.css +1 -1
- package/progress-bar/_progress-bar-theme.scss +17 -24
- package/progress-spinner/_progress-spinner-theme.scss +3 -3
- package/radio/_radio-theme.scss +23 -38
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-add/index.mjs +1 -1
- package/slide-toggle/_slide-toggle-theme.scss +23 -40
- package/slider/_slider-theme.scss +25 -42
- package/snack-bar/_snack-bar-theme.scss +2 -2
- package/button-toggle/_button-toggle-variables.scss +0 -16
- package/paginator/_paginator-variables.scss +0 -15
package/_index.scss
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
@forward './core/theming/theming' show define-light-theme, define-dark-theme,
|
|
3
3
|
define-palette, get-contrast-color-from-palette, get-color-from-palette,
|
|
4
4
|
get-color-config, get-typography-config, get-density-config,
|
|
5
|
-
$theme-ignore-duplication-warnings;
|
|
5
|
+
$theme-ignore-duplication-warnings, $theme-legacy-inspection-api-compatibility;
|
|
6
6
|
@forward './core/theming/theming' as private-* show private-clamp-density;
|
|
7
7
|
@forward './core/theming/palette' show $red-palette, $pink-palette, $indigo-palette,
|
|
8
8
|
$purple-palette, $deep-purple-palette, $blue-palette, $light-blue-palette, $cyan-palette,
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
@forward './datepicker/datepicker-theme' as datepicker-* show datepicker-theme, datepicker-color,
|
|
89
89
|
datepicker-typography, datepicker-date-range-colors, datepicker-density;
|
|
90
90
|
@forward './dialog/dialog-theme' as dialog-* show dialog-theme, dialog-color, dialog-typography,
|
|
91
|
-
dialog-density;
|
|
91
|
+
dialog-density, dialog-base;
|
|
92
92
|
@forward './dialog/dialog-legacy-padding' as dialog-* show dialog-legacy-padding;
|
|
93
93
|
@forward './divider/divider-theme' as divider-* show divider-theme, divider-color,
|
|
94
94
|
divider-typography, divider-density;
|
package/button/_button-base.scss
CHANGED
|
@@ -90,9 +90,9 @@
|
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
-
// Changes a button
|
|
94
|
-
@function mat-private-button-remove-ripple($
|
|
95
|
-
@return map.merge($
|
|
93
|
+
// Changes a button token set to exclude the ripple styles.
|
|
94
|
+
@function mat-private-button-remove-ripple($tokens) {
|
|
95
|
+
@return map.merge($tokens, (
|
|
96
96
|
focus-state-layer-color: null,
|
|
97
97
|
focus-state-layer-opacity: null,
|
|
98
98
|
hover-state-layer-color: null,
|
|
@@ -3,14 +3,15 @@
|
|
|
3
3
|
@use '@material/theme/theme-color' as mdc-theme-color;
|
|
4
4
|
|
|
5
5
|
@use '../core/mdc-helpers/mdc-helpers';
|
|
6
|
+
@use '../core/theming/inspection';
|
|
6
7
|
|
|
7
8
|
@mixin _ripple-color($color) {
|
|
8
9
|
--mat-mdc-button-persistent-ripple-color: #{$color};
|
|
9
10
|
--mat-mdc-button-ripple-color: #{rgba($color, 0.1)};
|
|
10
11
|
}
|
|
11
12
|
|
|
12
|
-
@mixin ripple-theme-styles($
|
|
13
|
-
$opacities: if(
|
|
13
|
+
@mixin ripple-theme-styles($theme, $is-filled) {
|
|
14
|
+
$opacities: if(inspection.get-theme-type($theme) == dark,
|
|
14
15
|
mdc-ripple-theme.$light-ink-opacities, mdc-ripple-theme.$dark-ink-opacities);
|
|
15
16
|
|
|
16
17
|
// Ideally these styles would be structural, but MDC bases some of the opacities on the theme.
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
@use 'sass:map';
|
|
2
1
|
@use '@material/button/button' as mdc-button;
|
|
3
2
|
@use '@material/button/button-theme' as mdc-button-theme;
|
|
4
3
|
@use '@material/button/button-text-theme' as mdc-button-text-theme;
|
|
@@ -10,6 +9,7 @@
|
|
|
10
9
|
@use './button-theme-private';
|
|
11
10
|
@use '../core/mdc-helpers/mdc-helpers';
|
|
12
11
|
@use '../core/theming/theming';
|
|
12
|
+
@use '../core/theming/inspection';
|
|
13
13
|
@use '../core/typography/typography';
|
|
14
14
|
|
|
15
15
|
@mixin _button-variant($color) {
|
|
@@ -38,10 +38,9 @@
|
|
|
38
38
|
));
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
@mixin color($
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
$is-dark: map.get($config, is-dark);
|
|
41
|
+
@mixin color($theme) {
|
|
42
|
+
@include mdc-helpers.using-mdc-theme($theme) {
|
|
43
|
+
$is-dark: inspection.get-theme-type($theme) == dark;
|
|
45
44
|
$on-surface: mdc-theme-color.prop-value(on-surface);
|
|
46
45
|
$surface: mdc-theme-color.prop-value(surface);
|
|
47
46
|
$disabled-ink-color: rgba($on-surface, if($is-dark, 0.5, 0.38));
|
|
@@ -174,25 +173,24 @@
|
|
|
174
173
|
|
|
175
174
|
// Ripple colors
|
|
176
175
|
.mat-mdc-button, .mat-mdc-outlined-button {
|
|
177
|
-
@include button-theme-private.ripple-theme-styles($
|
|
176
|
+
@include button-theme-private.ripple-theme-styles($theme, false);
|
|
178
177
|
}
|
|
179
178
|
|
|
180
179
|
.mat-mdc-raised-button, .mat-mdc-unelevated-button {
|
|
181
|
-
@include button-theme-private.ripple-theme-styles($
|
|
180
|
+
@include button-theme-private.ripple-theme-styles($theme, true);
|
|
182
181
|
}
|
|
183
182
|
}
|
|
184
183
|
}
|
|
185
184
|
|
|
186
|
-
@mixin typography($
|
|
187
|
-
|
|
188
|
-
theming.get-typography-config($config-or-theme));
|
|
189
|
-
@include mdc-helpers.using-mdc-typography($config) {
|
|
185
|
+
@mixin typography($theme) {
|
|
186
|
+
@include mdc-helpers.using-mdc-typography($theme) {
|
|
190
187
|
@include mdc-button.without-ripple($query: mdc-helpers.$mdc-typography-styles-query);
|
|
191
188
|
}
|
|
192
189
|
}
|
|
193
190
|
|
|
194
|
-
@mixin density($
|
|
195
|
-
$density-scale: theming.get-density
|
|
191
|
+
@mixin density($theme) {
|
|
192
|
+
$density-scale: theming.clamp-density(inspection.get-theme-density($theme), -3);
|
|
193
|
+
|
|
196
194
|
.mat-mdc-button,
|
|
197
195
|
.mat-mdc-raised-button,
|
|
198
196
|
.mat-mdc-unelevated-button,
|
|
@@ -205,21 +203,16 @@
|
|
|
205
203
|
}
|
|
206
204
|
}
|
|
207
205
|
|
|
208
|
-
@mixin theme($theme
|
|
209
|
-
$theme: theming.private-legacy-get-theme($theme-or-color-config);
|
|
206
|
+
@mixin theme($theme) {
|
|
210
207
|
@include theming.private-check-duplicate-theme-styles($theme, 'mat-button') {
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
$typography: theming.get-typography-config($theme);
|
|
214
|
-
|
|
215
|
-
@if $color != null {
|
|
216
|
-
@include color($color);
|
|
208
|
+
@if inspection.theme-has($theme, color) {
|
|
209
|
+
@include color($theme);
|
|
217
210
|
}
|
|
218
|
-
@if $density
|
|
219
|
-
@include density($
|
|
211
|
+
@if inspection.theme-has($theme, density) {
|
|
212
|
+
@include density($theme);
|
|
220
213
|
}
|
|
221
|
-
@if $typography
|
|
222
|
-
@include typography($
|
|
214
|
+
@if inspection.theme-has($theme, typography) {
|
|
215
|
+
@include typography($theme);
|
|
223
216
|
}
|
|
224
217
|
}
|
|
225
218
|
}
|
package/button/_fab-theme.scss
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
@use 'sass:map';
|
|
2
1
|
@use '@material/fab/fab' as mdc-fab;
|
|
3
2
|
@use '@material/fab/fab-theme' as mdc-fab-theme;
|
|
4
3
|
@use '@material/fab/extended-fab-theme' as mdc-extended-fab-theme;
|
|
@@ -7,11 +6,12 @@
|
|
|
7
6
|
@use '../core/mdc-helpers/mdc-helpers';
|
|
8
7
|
@use '../core/style/sass-utils';
|
|
9
8
|
@use '../core/theming/theming';
|
|
9
|
+
@use '../core/theming/inspection';
|
|
10
10
|
@use '../core/tokens/m2/mdc/fab' as tokens-mdc-fab;
|
|
11
11
|
@use '../core/tokens/m2/mdc/extended-fab' as tokens-mdc-extended-fab;
|
|
12
12
|
@use '../core/typography/typography';
|
|
13
13
|
|
|
14
|
-
@mixin base($
|
|
14
|
+
@mixin base($theme) {
|
|
15
15
|
// Add default values for tokens not related to color, typography, or density.
|
|
16
16
|
@include sass-utils.current-selector-or-root() {
|
|
17
17
|
@include mdc-fab-theme.theme(tokens-mdc-fab.get-unthemable-tokens());
|
|
@@ -21,17 +21,11 @@
|
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
@mixin _fab-variant($
|
|
25
|
-
$color-
|
|
26
|
-
$
|
|
27
|
-
|
|
28
|
-
primary: (
|
|
29
|
-
default: $background,
|
|
30
|
-
default-contrast: $foreground,
|
|
31
|
-
),
|
|
32
|
-
)
|
|
24
|
+
@mixin _fab-variant($foreground, $background) {
|
|
25
|
+
$color-tokens: (
|
|
26
|
+
container-color: $background,
|
|
27
|
+
icon-color: $foreground
|
|
33
28
|
);
|
|
34
|
-
$color-tokens: tokens-mdc-fab.get-color-tokens($color-config);
|
|
35
29
|
@include mdc-fab-theme.theme($color-tokens);
|
|
36
30
|
|
|
37
31
|
--mat-mdc-fab-color: #{$foreground};
|
|
@@ -41,16 +35,13 @@
|
|
|
41
35
|
@return if(mdc-helpers.variable-safe-contrast-tone($color, $is-dark) == 'dark', #000, #fff);
|
|
42
36
|
}
|
|
43
37
|
|
|
44
|
-
@mixin color($
|
|
45
|
-
$
|
|
38
|
+
@mixin color($theme) {
|
|
39
|
+
$is-dark: inspection.get-theme-type($theme) == dark;
|
|
46
40
|
|
|
47
|
-
$
|
|
48
|
-
$
|
|
49
|
-
|
|
50
|
-
$
|
|
51
|
-
$primary: theming.get-color-from-palette(map.get($config, primary));
|
|
52
|
-
$accent: theming.get-color-from-palette(map.get($config, accent));
|
|
53
|
-
$warn: theming.get-color-from-palette(map.get($config, warn));
|
|
41
|
+
$surface: inspection.get-theme-color($theme, background, card);
|
|
42
|
+
$primary: inspection.get-theme-color($theme, primary);
|
|
43
|
+
$accent: inspection.get-theme-color($theme, accent);
|
|
44
|
+
$warn: inspection.get-theme-color($theme, warn);
|
|
54
45
|
|
|
55
46
|
$on-surface: white-or-black($surface, $is-dark);
|
|
56
47
|
$on-primary: white-or-black($primary, $is-dark);
|
|
@@ -58,73 +49,64 @@
|
|
|
58
49
|
$on-warn: white-or-black($warn, $is-dark);
|
|
59
50
|
|
|
60
51
|
$disabled: rgba($on-surface, 0.12);
|
|
61
|
-
$on-disabled: rgba($on-surface, if(
|
|
52
|
+
$on-disabled: rgba($on-surface, if($is-dark, 0.5, 0.38));
|
|
62
53
|
|
|
63
54
|
.mat-mdc-fab,
|
|
64
55
|
.mat-mdc-mini-fab {
|
|
65
56
|
// TODO(wagnermaciel): The ripple-theme-styles mixin depends heavily on
|
|
66
57
|
// being wrapped by using-mdc-theme. This workaround needs to be
|
|
67
58
|
// revisited w/ a more holistic solution.
|
|
68
|
-
@include mdc-helpers.using-mdc-theme($
|
|
69
|
-
@include button-theme-private.ripple-theme-styles($
|
|
59
|
+
@include mdc-helpers.using-mdc-theme($theme) {
|
|
60
|
+
@include button-theme-private.ripple-theme-styles($theme, true);
|
|
70
61
|
}
|
|
71
62
|
|
|
72
63
|
@include button-theme-private.apply-disabled-style() {
|
|
73
|
-
@include _fab-variant($
|
|
64
|
+
@include _fab-variant($on-disabled, $disabled);
|
|
74
65
|
}
|
|
75
66
|
|
|
76
67
|
&.mat-unthemed {
|
|
77
|
-
@include _fab-variant($
|
|
68
|
+
@include _fab-variant($on-surface, $surface);
|
|
78
69
|
}
|
|
79
70
|
|
|
80
71
|
&.mat-primary {
|
|
81
|
-
@include _fab-variant($
|
|
72
|
+
@include _fab-variant($on-primary, $primary);
|
|
82
73
|
}
|
|
83
74
|
|
|
84
75
|
&.mat-accent {
|
|
85
|
-
@include _fab-variant($
|
|
76
|
+
@include _fab-variant($on-accent, $accent);
|
|
86
77
|
}
|
|
87
78
|
|
|
88
79
|
&.mat-warn {
|
|
89
|
-
@include _fab-variant($
|
|
80
|
+
@include _fab-variant($on-warn, $warn);
|
|
90
81
|
}
|
|
91
82
|
}
|
|
92
83
|
}
|
|
93
84
|
|
|
94
|
-
@mixin typography($
|
|
95
|
-
|
|
96
|
-
theming.get-typography-config($config-or-theme)
|
|
97
|
-
);
|
|
98
|
-
|
|
99
|
-
@include mdc-helpers.using-mdc-typography($config) {
|
|
85
|
+
@mixin typography($theme) {
|
|
86
|
+
@include mdc-helpers.using-mdc-typography($theme) {
|
|
100
87
|
@include mdc-fab.without-ripple($query: mdc-helpers.$mdc-typography-styles-query);
|
|
101
88
|
}
|
|
102
89
|
|
|
103
|
-
$typography-tokens: tokens-mdc-extended-fab.get-typography-tokens($
|
|
90
|
+
$typography-tokens: tokens-mdc-extended-fab.get-typography-tokens($theme);
|
|
104
91
|
.mat-mdc-extended-fab {
|
|
105
92
|
@include mdc-extended-fab-theme.theme($typography-tokens);
|
|
106
93
|
}
|
|
107
94
|
}
|
|
108
95
|
|
|
109
|
-
@mixin density($
|
|
96
|
+
@mixin density($theme) {
|
|
110
97
|
}
|
|
111
98
|
|
|
112
|
-
@mixin theme($theme
|
|
113
|
-
$theme: theming.private-legacy-get-theme($theme-or-color-config);
|
|
99
|
+
@mixin theme($theme) {
|
|
114
100
|
@include theming.private-check-duplicate-theme-styles($theme, 'mat-fab') {
|
|
115
|
-
$color: theming.get-color-config($theme);
|
|
116
|
-
$density: theming.get-density-config($theme);
|
|
117
|
-
$typography: theming.get-typography-config($theme);
|
|
118
|
-
|
|
119
101
|
@include base($theme);
|
|
120
|
-
@if $color
|
|
121
|
-
@include color($
|
|
102
|
+
@if inspection.theme-has($theme, color) {
|
|
103
|
+
@include color($theme);
|
|
122
104
|
}
|
|
123
|
-
@if $density
|
|
124
|
-
@include density($
|
|
105
|
+
@if inspection.theme-has($theme, density) {
|
|
106
|
+
@include density($theme);
|
|
125
107
|
}
|
|
126
|
-
@if $typography
|
|
127
|
-
@include typography($
|
|
108
|
+
@if inspection.theme-has($theme, typography) {
|
|
109
|
+
@include typography($theme);
|
|
128
110
|
}
|
|
129
111
|
}
|
|
130
112
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
@use 'sass:map';
|
|
2
1
|
@use 'sass:math';
|
|
3
2
|
@use '@material/density/functions' as mdc-density-functions;
|
|
4
3
|
@use '@material/icon-button/icon-button-theme' as mdc-icon-button-theme;
|
|
@@ -7,6 +6,7 @@
|
|
|
7
6
|
|
|
8
7
|
@use './button-theme-private';
|
|
9
8
|
@use '../core/theming/theming';
|
|
9
|
+
@use '../core/theming/inspection';
|
|
10
10
|
|
|
11
11
|
$_icon-size: 24px;
|
|
12
12
|
|
|
@@ -23,33 +23,31 @@ $_icon-size: 24px;
|
|
|
23
23
|
@return if($is-dark, 'light', 'dark');
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
@mixin color($
|
|
27
|
-
$
|
|
28
|
-
$
|
|
29
|
-
$
|
|
30
|
-
$surface: theming.get-color-from-palette($background-palette, card);
|
|
31
|
-
$is-dark: map.get($config, is-dark);
|
|
26
|
+
@mixin color($theme) {
|
|
27
|
+
$color-tokens: tokens-mdc-icon-button.get-color-tokens($theme);
|
|
28
|
+
$surface: inspection.get-theme-color($theme, background, card);
|
|
29
|
+
$is-dark: inspection.get-theme-type($theme) == dark;
|
|
32
30
|
$on-surface: if(_variable-safe-contrast-tone($surface, $is-dark) == 'dark', #000, #fff);
|
|
33
31
|
|
|
34
32
|
.mat-mdc-icon-button {
|
|
35
|
-
@include button-theme-private.ripple-theme-styles($
|
|
33
|
+
@include button-theme-private.ripple-theme-styles($theme, false);
|
|
36
34
|
@include mdc-icon-button-theme.theme($color-tokens);
|
|
37
35
|
@include _ripple-color($on-surface);
|
|
38
36
|
|
|
39
37
|
&.mat-primary {
|
|
40
|
-
$color:
|
|
38
|
+
$color: inspection.get-theme-color($theme, primary);
|
|
41
39
|
@include mdc-icon-button-theme.theme((icon-color: $color));
|
|
42
40
|
@include _ripple-color($color);
|
|
43
41
|
}
|
|
44
42
|
|
|
45
43
|
&.mat-accent {
|
|
46
|
-
$color:
|
|
44
|
+
$color: inspection.get-theme-color($theme, accent);
|
|
47
45
|
@include mdc-icon-button-theme.theme((icon-color: $color));
|
|
48
46
|
@include _ripple-color($color);
|
|
49
47
|
}
|
|
50
48
|
|
|
51
49
|
&.mat-warn {
|
|
52
|
-
$color:
|
|
50
|
+
$color: inspection.get-theme-color($theme, warn);
|
|
53
51
|
@include mdc-icon-button-theme.theme((icon-color: $color));
|
|
54
52
|
@include _ripple-color($color);
|
|
55
53
|
}
|
|
@@ -64,11 +62,11 @@ $_icon-size: 24px;
|
|
|
64
62
|
}
|
|
65
63
|
}
|
|
66
64
|
|
|
67
|
-
@mixin typography($
|
|
65
|
+
@mixin typography($theme) {
|
|
68
66
|
}
|
|
69
67
|
|
|
70
|
-
@mixin density($
|
|
71
|
-
$density-scale:
|
|
68
|
+
@mixin density($theme) {
|
|
69
|
+
$density-scale: inspection.get-theme-density($theme);
|
|
72
70
|
// Manually apply the expected density theming, and include the padding
|
|
73
71
|
// as it was applied before
|
|
74
72
|
$calculated-size: mdc-density-functions.prop-value(
|
|
@@ -104,21 +102,16 @@ $_icon-size: 24px;
|
|
|
104
102
|
}
|
|
105
103
|
}
|
|
106
104
|
|
|
107
|
-
@mixin theme($theme
|
|
108
|
-
$theme: theming.private-legacy-get-theme($theme-or-color-config);
|
|
105
|
+
@mixin theme($theme) {
|
|
109
106
|
@include theming.private-check-duplicate-theme-styles($theme, 'mat-icon-button') {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
$typography: theming.get-typography-config($theme);
|
|
113
|
-
|
|
114
|
-
@if $color != null {
|
|
115
|
-
@include color($color);
|
|
107
|
+
@if inspection.theme-has($theme, color) {
|
|
108
|
+
@include color($theme);
|
|
116
109
|
}
|
|
117
|
-
@if $density
|
|
118
|
-
@include density($
|
|
110
|
+
@if inspection.theme-has($theme, density) {
|
|
111
|
+
@include density($theme);
|
|
119
112
|
}
|
|
120
|
-
@if $typography
|
|
121
|
-
@include typography($
|
|
113
|
+
@if inspection.theme-has($theme, typography) {
|
|
114
|
+
@include typography($theme);
|
|
122
115
|
}
|
|
123
116
|
}
|
|
124
117
|
}
|
package/button/index.d.ts
CHANGED
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
import { _AbstractConstructor } from '@angular/material/core';
|
|
2
1
|
import { AfterViewInit } from '@angular/core';
|
|
3
|
-
import { BooleanInput } from '@angular/cdk/coercion';
|
|
4
|
-
import { CanColor } from '@angular/material/core';
|
|
5
|
-
import { CanDisable } from '@angular/material/core';
|
|
6
|
-
import { CanDisableRipple } from '@angular/material/core';
|
|
7
|
-
import { _Constructor } from '@angular/material/core';
|
|
8
2
|
import { ElementRef } from '@angular/core';
|
|
9
3
|
import { FocusOrigin } from '@angular/cdk/a11y';
|
|
10
4
|
import * as i0 from '@angular/core';
|
|
@@ -63,7 +57,7 @@ export declare function MAT_FAB_DEFAULT_OPTIONS_FACTORY(): MatFabDefaultOptions;
|
|
|
63
57
|
export declare class MatAnchor extends MatAnchorBase {
|
|
64
58
|
constructor(elementRef: ElementRef, platform: Platform, ngZone: NgZone, animationMode?: string);
|
|
65
59
|
static ɵfac: i0.ɵɵFactoryDeclaration<MatAnchor, [null, null, null, { optional: true; }]>;
|
|
66
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MatAnchor, "a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button]", ["matButton", "matAnchor"], {
|
|
60
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MatAnchor, "a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button]", ["matButton", "matAnchor"], {}, {}, never, [".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])", "*", ".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]"], false, never>;
|
|
67
61
|
}
|
|
68
62
|
|
|
69
63
|
/**
|
|
@@ -76,7 +70,8 @@ declare class MatAnchorBase extends MatButtonBase implements OnInit, OnDestroy {
|
|
|
76
70
|
ngOnDestroy(): void;
|
|
77
71
|
_haltDisabledEvents: (event: Event) => void;
|
|
78
72
|
static ɵfac: i0.ɵɵFactoryDeclaration<MatAnchorBase, never>;
|
|
79
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<MatAnchorBase, never, never, {}, {}, never, never, false, never>;
|
|
73
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<MatAnchorBase, never, never, { "tabIndex": { "alias": "tabIndex"; "required": false; }; }, {}, never, never, false, never>;
|
|
74
|
+
static ngAcceptInputType_tabIndex: unknown;
|
|
80
75
|
}
|
|
81
76
|
|
|
82
77
|
/**
|
|
@@ -91,11 +86,12 @@ declare class MatAnchorBase extends MatButtonBase implements OnInit, OnDestroy {
|
|
|
91
86
|
export declare class MatButton extends MatButtonBase {
|
|
92
87
|
constructor(elementRef: ElementRef, platform: Platform, ngZone: NgZone, animationMode?: string);
|
|
93
88
|
static ɵfac: i0.ɵɵFactoryDeclaration<MatButton, [null, null, null, { optional: true; }]>;
|
|
94
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MatButton, " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", ["matButton"], {
|
|
89
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MatButton, " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", ["matButton"], {}, {}, never, [".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])", "*", ".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]"], false, never>;
|
|
95
90
|
}
|
|
96
91
|
|
|
97
92
|
/** Base class for all buttons. */
|
|
98
|
-
declare class MatButtonBase
|
|
93
|
+
declare class MatButtonBase implements AfterViewInit, OnDestroy {
|
|
94
|
+
_elementRef: ElementRef;
|
|
99
95
|
_platform: Platform;
|
|
100
96
|
_ngZone: NgZone;
|
|
101
97
|
_animationMode?: string | undefined;
|
|
@@ -114,6 +110,8 @@ declare class MatButtonBase extends _MatButtonMixin implements CanDisable, CanCo
|
|
|
114
110
|
*/
|
|
115
111
|
get ripple(): MatRipple;
|
|
116
112
|
set ripple(v: MatRipple);
|
|
113
|
+
/** Theme color palette of the button */
|
|
114
|
+
color?: string | null;
|
|
117
115
|
/** Whether the ripple effect is disabled or not. */
|
|
118
116
|
get disableRipple(): boolean;
|
|
119
117
|
set disableRipple(value: any);
|
|
@@ -121,7 +119,7 @@ declare class MatButtonBase extends _MatButtonMixin implements CanDisable, CanCo
|
|
|
121
119
|
get disabled(): boolean;
|
|
122
120
|
set disabled(value: any);
|
|
123
121
|
private _disabled;
|
|
124
|
-
constructor(
|
|
122
|
+
constructor(_elementRef: ElementRef, _platform: Platform, _ngZone: NgZone, _animationMode?: string | undefined);
|
|
125
123
|
ngAfterViewInit(): void;
|
|
126
124
|
ngOnDestroy(): void;
|
|
127
125
|
/** Focuses the button. */
|
|
@@ -130,16 +128,11 @@ declare class MatButtonBase extends _MatButtonMixin implements CanDisable, CanCo
|
|
|
130
128
|
private _hasHostAttributes;
|
|
131
129
|
private _updateRippleDisabled;
|
|
132
130
|
static ɵfac: i0.ɵɵFactoryDeclaration<MatButtonBase, never>;
|
|
133
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<MatButtonBase, never, never, {}, {}, never, never, false, never>;
|
|
131
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<MatButtonBase, never, never, { "color": { "alias": "color"; "required": false; }; "disableRipple": { "alias": "disableRipple"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, {}, never, never, false, never>;
|
|
132
|
+
static ngAcceptInputType_disableRipple: unknown;
|
|
133
|
+
static ngAcceptInputType_disabled: unknown;
|
|
134
134
|
}
|
|
135
135
|
|
|
136
|
-
/** @docs-private */
|
|
137
|
-
declare const _MatButtonMixin: _Constructor<CanColor> & _AbstractConstructor<CanColor> & _Constructor<CanDisable> & _AbstractConstructor<CanDisable> & _Constructor<CanDisableRipple> & _AbstractConstructor<CanDisableRipple> & {
|
|
138
|
-
new (_elementRef: ElementRef): {
|
|
139
|
-
_elementRef: ElementRef;
|
|
140
|
-
};
|
|
141
|
-
};
|
|
142
|
-
|
|
143
136
|
export declare class MatButtonModule {
|
|
144
137
|
static ɵfac: i0.ɵɵFactoryDeclaration<MatButtonModule, never>;
|
|
145
138
|
static ɵmod: i0.ɵɵNgModuleDeclaration<MatButtonModule, [typeof i1.MatAnchor, typeof i1.MatButton, typeof i2.MatIconAnchor, typeof i3.MatMiniFabAnchor, typeof i3.MatMiniFabButton, typeof i2.MatIconButton, typeof i3.MatFabAnchor, typeof i3.MatFabButton], [typeof i4.MatCommonModule, typeof i4.MatRippleModule], [typeof i1.MatAnchor, typeof i1.MatButton, typeof i2.MatIconAnchor, typeof i2.MatIconButton, typeof i3.MatMiniFabAnchor, typeof i3.MatMiniFabButton, typeof i3.MatFabAnchor, typeof i3.MatFabButton, typeof i4.MatCommonModule]>;
|
|
@@ -156,12 +149,11 @@ export declare class MatButtonModule {
|
|
|
156
149
|
export declare class MatFabAnchor extends MatAnchor {
|
|
157
150
|
private _options?;
|
|
158
151
|
_isFab: boolean;
|
|
159
|
-
|
|
160
|
-
set extended(value: BooleanInput);
|
|
161
|
-
private _extended;
|
|
152
|
+
extended: boolean;
|
|
162
153
|
constructor(elementRef: ElementRef, platform: Platform, ngZone: NgZone, animationMode?: string, _options?: MatFabDefaultOptions | undefined);
|
|
163
154
|
static ɵfac: i0.ɵɵFactoryDeclaration<MatFabAnchor, [null, null, null, { optional: true; }, { optional: true; }]>;
|
|
164
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MatFabAnchor, "a[mat-fab]", ["matButton", "matAnchor"], { "
|
|
155
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MatFabAnchor, "a[mat-fab]", ["matButton", "matAnchor"], { "extended": { "alias": "extended"; "required": false; }; }, {}, never, [".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])", "*", ".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]"], false, never>;
|
|
156
|
+
static ngAcceptInputType_extended: unknown;
|
|
165
157
|
}
|
|
166
158
|
|
|
167
159
|
/**
|
|
@@ -174,12 +166,11 @@ export declare class MatFabAnchor extends MatAnchor {
|
|
|
174
166
|
export declare class MatFabButton extends MatButtonBase {
|
|
175
167
|
private _options?;
|
|
176
168
|
_isFab: boolean;
|
|
177
|
-
|
|
178
|
-
set extended(value: BooleanInput);
|
|
179
|
-
private _extended;
|
|
169
|
+
extended: boolean;
|
|
180
170
|
constructor(elementRef: ElementRef, platform: Platform, ngZone: NgZone, animationMode?: string, _options?: MatFabDefaultOptions | undefined);
|
|
181
171
|
static ɵfac: i0.ɵɵFactoryDeclaration<MatFabButton, [null, null, null, { optional: true; }, { optional: true; }]>;
|
|
182
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MatFabButton, "button[mat-fab]", ["matButton"], { "
|
|
172
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MatFabButton, "button[mat-fab]", ["matButton"], { "extended": { "alias": "extended"; "required": false; }; }, {}, never, [".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])", "*", ".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]"], false, never>;
|
|
173
|
+
static ngAcceptInputType_extended: unknown;
|
|
183
174
|
}
|
|
184
175
|
|
|
185
176
|
/** Default FAB options that can be overridden. */
|
|
@@ -195,7 +186,7 @@ export declare interface MatFabDefaultOptions {
|
|
|
195
186
|
export declare class MatIconAnchor extends MatAnchorBase {
|
|
196
187
|
constructor(elementRef: ElementRef, platform: Platform, ngZone: NgZone, animationMode?: string);
|
|
197
188
|
static ɵfac: i0.ɵɵFactoryDeclaration<MatIconAnchor, [null, null, null, { optional: true; }]>;
|
|
198
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MatIconAnchor, "a[mat-icon-button]", ["matButton", "matAnchor"], {
|
|
189
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MatIconAnchor, "a[mat-icon-button]", ["matButton", "matAnchor"], {}, {}, never, [".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])", "*", ".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]"], false, never>;
|
|
199
190
|
}
|
|
200
191
|
|
|
201
192
|
/**
|
|
@@ -206,7 +197,7 @@ export declare class MatIconAnchor extends MatAnchorBase {
|
|
|
206
197
|
export declare class MatIconButton extends MatButtonBase {
|
|
207
198
|
constructor(elementRef: ElementRef, platform: Platform, ngZone: NgZone, animationMode?: string);
|
|
208
199
|
static ɵfac: i0.ɵɵFactoryDeclaration<MatIconButton, [null, null, null, { optional: true; }]>;
|
|
209
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MatIconButton, "button[mat-icon-button]", ["matButton"], {
|
|
200
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MatIconButton, "button[mat-icon-button]", ["matButton"], {}, {}, never, ["*"], false, never>;
|
|
210
201
|
}
|
|
211
202
|
|
|
212
203
|
/**
|
|
@@ -219,7 +210,7 @@ export declare class MatMiniFabAnchor extends MatAnchor {
|
|
|
219
210
|
_isFab: boolean;
|
|
220
211
|
constructor(elementRef: ElementRef, platform: Platform, ngZone: NgZone, animationMode?: string, _options?: MatFabDefaultOptions | undefined);
|
|
221
212
|
static ɵfac: i0.ɵɵFactoryDeclaration<MatMiniFabAnchor, [null, null, null, { optional: true; }, { optional: true; }]>;
|
|
222
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MatMiniFabAnchor, "a[mat-mini-fab]", ["matButton", "matAnchor"], {
|
|
213
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MatMiniFabAnchor, "a[mat-mini-fab]", ["matButton", "matAnchor"], {}, {}, never, [".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])", "*", ".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]"], false, never>;
|
|
223
214
|
}
|
|
224
215
|
|
|
225
216
|
/**
|
|
@@ -232,7 +223,7 @@ export declare class MatMiniFabButton extends MatButtonBase {
|
|
|
232
223
|
_isFab: boolean;
|
|
233
224
|
constructor(elementRef: ElementRef, platform: Platform, ngZone: NgZone, animationMode?: string, _options?: MatFabDefaultOptions | undefined);
|
|
234
225
|
static ɵfac: i0.ɵɵFactoryDeclaration<MatMiniFabButton, [null, null, null, { optional: true; }, { optional: true; }]>;
|
|
235
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MatMiniFabButton, "button[mat-mini-fab]", ["matButton"], {
|
|
226
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MatMiniFabButton, "button[mat-mini-fab]", ["matButton"], {}, {}, never, [".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])", "*", ".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]"], false, never>;
|
|
236
227
|
}
|
|
237
228
|
|
|
238
229
|
export { }
|