@angular/material 20.1.0-next.1 → 20.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.
- package/_index.scss +1 -2
- package/autocomplete/_autocomplete-theme.scss +28 -37
- package/badge/_badge-theme.scss +35 -44
- package/badge/_m2-badge.scss +3 -2
- package/bottom-sheet/_bottom-sheet-theme.scss +28 -40
- package/bottom-sheet/_m2-bottom-sheet.scss +6 -9
- package/button/_button-theme.scss +37 -55
- package/button/_fab-theme.scss +42 -56
- package/button/_icon-button-theme.scss +30 -48
- package/button/_m2-button.scss +21 -25
- package/button/_m2-fab.scss +5 -5
- package/button/testing/index.d.ts +1 -0
- package/button-toggle/_button-toggle-theme.scss +29 -44
- package/button-toggle/_m2-button-toggle.scss +11 -17
- package/card/_card-theme.scss +28 -36
- package/card/_m2-card.scss +11 -13
- package/checkbox/_checkbox-theme.scss +35 -50
- package/checkbox/_m2-checkbox.scss +6 -5
- package/chips/_chips-theme.scss +24 -30
- package/chips/_m2-chip.scss +6 -5
- package/core/_core-theme.scss +48 -67
- package/core/focus-indicators/_private.scss +2 -5
- package/core/m2/_theming.scss +32 -41
- package/core/option/_m2-optgroup.scss +6 -6
- package/core/option/_m2-option.scss +6 -5
- package/core/option/_optgroup-theme.scss +28 -30
- package/core/option/_option-theme.scss +35 -34
- package/core/ripple/_ripple-theme.scss +28 -33
- package/core/selection/pseudo-checkbox/_pseudo-checkbox-theme.scss +55 -45
- package/core/theming/_all-theme.scss +38 -42
- package/core/theming/_definition.scss +20 -13
- package/core/theming/_inspection.scss +0 -12
- package/core/theming/_m2-inspection.scss +0 -33
- package/core/theming/_theming.scss +4 -172
- package/core/tokens/_m2-utils.scss +5 -65
- package/core/tokens/_m3-utils.scss +2 -14
- package/core/tokens/_token-utils.scss +7 -27
- package/core/tokens/m2/_index.scss +6 -0
- package/core/tokens/m2/_md-sys-color.scss +123 -0
- package/core/tokens/m2/_md-sys-elevation.scss +16 -0
- package/core/tokens/m2/_md-sys-motion.scss +36 -0
- package/core/tokens/m2/_md-sys-shape.scss +22 -0
- package/core/tokens/m2/_md-sys-state.scss +15 -0
- package/core/tokens/m2/_md-sys-typescale.scss +68 -0
- package/core/tokens/m3/_md-sys-color.scss +2 -2
- package/core/tokens/m3/_md-sys-typescale.scss +1 -1
- package/core/tokens/m3/_theme.scss +14 -26
- package/datepicker/_datepicker-theme.scss +38 -40
- package/datepicker/_m2-datepicker.scss +7 -14
- package/dialog/_dialog-theme.scss +28 -34
- package/dialog/_m2-dialog.scss +11 -13
- package/divider/_divider-theme.scss +28 -30
- package/expansion/_expansion-theme.scss +28 -39
- package/expansion/_m2-expansion.scss +11 -10
- package/expansion/_m3-expansion.scss +2 -0
- package/fesm2022/animation-DfMFjxHu.mjs.map +1 -1
- package/fesm2022/autocomplete/testing.mjs.map +1 -1
- package/fesm2022/autocomplete.mjs +1 -1
- package/fesm2022/autocomplete.mjs.map +1 -1
- package/fesm2022/badge/testing.mjs.map +1 -1
- package/fesm2022/badge.mjs.map +1 -1
- package/fesm2022/bottom-sheet/testing.mjs.map +1 -1
- package/fesm2022/bottom-sheet.mjs.map +1 -1
- package/fesm2022/button/testing.mjs +7 -4
- package/fesm2022/button/testing.mjs.map +1 -1
- package/fesm2022/button-toggle/testing.mjs.map +1 -1
- package/fesm2022/button-toggle.mjs.map +1 -1
- package/fesm2022/button.mjs.map +1 -1
- package/fesm2022/card/testing.mjs.map +1 -1
- package/fesm2022/card.mjs.map +1 -1
- package/fesm2022/checkbox/testing.mjs.map +1 -1
- package/fesm2022/checkbox.mjs.map +1 -1
- package/fesm2022/chips/testing.mjs.map +1 -1
- package/fesm2022/chips.mjs +1 -1
- package/fesm2022/chips.mjs.map +1 -1
- package/fesm2022/common-module-cKSwHniA.mjs.map +1 -1
- package/fesm2022/core/testing.mjs.map +1 -1
- package/fesm2022/core.mjs +1 -1
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/date-formats-K6TQue-Y.mjs.map +1 -1
- package/fesm2022/date-range-input-harness-DEyfkeOs.mjs.map +1 -1
- package/fesm2022/datepicker/testing.mjs.map +1 -1
- package/fesm2022/datepicker.mjs +1 -1
- package/fesm2022/datepicker.mjs.map +1 -1
- package/fesm2022/dialog/testing.mjs.map +1 -1
- package/fesm2022/dialog.mjs.map +1 -1
- package/fesm2022/divider/testing.mjs.map +1 -1
- package/fesm2022/divider.mjs.map +1 -1
- package/fesm2022/error-options-DCNQlTOA.mjs.map +1 -1
- package/fesm2022/error-state-Dtb1IHM-.mjs.map +1 -1
- package/fesm2022/expansion/testing.mjs.map +1 -1
- package/fesm2022/expansion.mjs +2 -2
- package/fesm2022/expansion.mjs.map +1 -1
- package/fesm2022/form-field/testing/control.mjs.map +1 -1
- package/fesm2022/form-field/testing.mjs.map +1 -1
- package/fesm2022/{form-field-C9DZXojn.mjs → form-field-CFbrnFED.mjs} +3 -3
- package/fesm2022/form-field-CFbrnFED.mjs.map +1 -0
- package/fesm2022/form-field.mjs +2 -2
- package/fesm2022/form-field.mjs.map +1 -1
- package/fesm2022/grid-list/testing.mjs.map +1 -1
- package/fesm2022/grid-list.mjs.map +1 -1
- package/fesm2022/icon/testing.mjs.map +1 -1
- package/fesm2022/icon-button-DxiIc1ex.mjs.map +1 -1
- package/fesm2022/icon-registry-CwOTJ7YM.mjs.map +1 -1
- package/fesm2022/icon.mjs.map +1 -1
- package/fesm2022/index-BFRo2fUq.mjs.map +1 -1
- package/fesm2022/index-DwiL-HGk.mjs.map +1 -1
- package/fesm2022/input/testing.mjs.map +1 -1
- package/fesm2022/input-harness-C5Msdc4-.mjs.map +1 -1
- package/fesm2022/input-value-accessor-D1GvPuqO.mjs.map +1 -1
- package/fesm2022/input.mjs +3 -27
- package/fesm2022/input.mjs.map +1 -1
- package/fesm2022/internal-form-field-D5iFxU6d.mjs.map +1 -1
- package/fesm2022/line-Bz5f9Cyx.mjs.map +1 -1
- package/fesm2022/list/testing.mjs.map +1 -1
- package/fesm2022/list.mjs.map +1 -1
- package/fesm2022/material.mjs.map +1 -1
- package/fesm2022/menu/testing.mjs +97 -13
- package/fesm2022/menu/testing.mjs.map +1 -1
- package/fesm2022/menu.mjs +343 -122
- package/fesm2022/menu.mjs.map +1 -1
- package/fesm2022/{module-BDiw_nWS.mjs → module-B0CLRw5e.mjs} +3 -3
- package/fesm2022/module-B0CLRw5e.mjs.map +1 -0
- package/fesm2022/{module-DzZHEh7B.mjs → module-B62K-792.mjs} +2 -2
- package/fesm2022/module-B62K-792.mjs.map +1 -0
- package/fesm2022/module-CWxMD37a.mjs.map +1 -1
- package/fesm2022/module-Ce6F7TNm.mjs.map +1 -1
- package/fesm2022/option-BzhYL_xC.mjs.map +1 -1
- package/fesm2022/option-harness-BFcc-M_4.mjs.map +1 -1
- package/fesm2022/paginator/testing.mjs.map +1 -1
- package/fesm2022/paginator.mjs +3 -3
- package/fesm2022/paginator.mjs.map +1 -1
- package/fesm2022/progress-bar/testing.mjs.map +1 -1
- package/fesm2022/progress-bar.mjs.map +1 -1
- package/fesm2022/progress-spinner/testing.mjs.map +1 -1
- package/fesm2022/progress-spinner.mjs.map +1 -1
- package/fesm2022/pseudo-checkbox-DDmgx3P4.mjs.map +1 -1
- package/fesm2022/pseudo-checkbox-module-4F8Up4PL.mjs.map +1 -1
- package/fesm2022/public-api-BoO5eSq-.mjs.map +1 -1
- package/fesm2022/radio/testing.mjs.map +1 -1
- package/fesm2022/radio.mjs.map +1 -1
- package/fesm2022/ripple-BYgV4oZC.mjs.map +1 -1
- package/fesm2022/ripple-loader-BnMiRtmT.mjs.map +1 -1
- package/fesm2022/select/testing.mjs.map +1 -1
- package/fesm2022/select.mjs +3 -3
- package/fesm2022/select.mjs.map +1 -1
- package/fesm2022/sidenav/testing.mjs.map +1 -1
- package/fesm2022/sidenav.mjs.map +1 -1
- package/fesm2022/slide-toggle/testing.mjs.map +1 -1
- package/fesm2022/slide-toggle.mjs +2 -2
- package/fesm2022/slide-toggle.mjs.map +1 -1
- package/fesm2022/slider/testing.mjs.map +1 -1
- package/fesm2022/slider.mjs.map +1 -1
- package/fesm2022/snack-bar/testing.mjs.map +1 -1
- package/fesm2022/snack-bar.mjs +2 -2
- package/fesm2022/snack-bar.mjs.map +1 -1
- package/fesm2022/sort/testing.mjs.map +1 -1
- package/fesm2022/sort.mjs.map +1 -1
- package/fesm2022/stepper/testing.mjs.map +1 -1
- package/fesm2022/stepper.mjs.map +1 -1
- package/fesm2022/structural-styles-CObeNzjn.mjs.map +1 -1
- package/fesm2022/table/testing.mjs.map +1 -1
- package/fesm2022/table.mjs.map +1 -1
- package/fesm2022/tabs/testing.mjs.map +1 -1
- package/fesm2022/tabs.mjs.map +1 -1
- package/fesm2022/timepicker/testing.mjs.map +1 -1
- package/fesm2022/timepicker.mjs +1 -1
- package/fesm2022/timepicker.mjs.map +1 -1
- package/fesm2022/toolbar/testing.mjs.map +1 -1
- package/fesm2022/toolbar.mjs.map +1 -1
- package/fesm2022/tooltip/testing.mjs.map +1 -1
- package/fesm2022/tooltip.mjs.map +1 -1
- package/fesm2022/tree/testing.mjs.map +1 -1
- package/fesm2022/tree.mjs.map +1 -1
- package/form-field/_form-field-theme.scss +35 -51
- package/form-field/_m2-form-field.scss +21 -29
- package/grid-list/_grid-list-theme.scss +28 -28
- package/grid-list/_m2-grid-list.scss +7 -9
- package/icon/_icon-theme.scss +40 -41
- package/input/_input-theme.scss +1 -4
- package/input/index.d.ts +0 -11
- package/list/_list-theme.scss +55 -53
- package/list/_m2-list.scss +16 -26
- package/menu/_m2-menu.scss +6 -6
- package/menu/_menu-theme.scss +28 -33
- package/menu/index.d.ts +145 -61
- package/menu/testing/index.d.ts +50 -2
- package/package.json +2 -2
- package/paginator/_m2-paginator.scss +7 -8
- package/paginator/_paginator-theme.scss +28 -33
- 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 +35 -43
- package/progress-spinner/_progress-spinner-theme.scss +42 -43
- package/radio/_m2-radio.scss +6 -5
- package/radio/_radio-theme.scss +33 -46
- package/schematics/ng-add/index.js +1 -1
- package/select/_m2-select.scss +6 -5
- package/select/_select-theme.scss +38 -51
- package/sidenav/_sidenav-theme.scss +28 -30
- package/slide-toggle/_m2-slide-toggle.scss +45 -58
- package/slide-toggle/_m3-slide-toggle.scss +1 -0
- package/slide-toggle/_slide-toggle-theme.scss +41 -79
- package/slider/_m2-slider.scss +6 -9
- package/slider/_slider-theme.scss +38 -45
- package/snack-bar/_m2-snack-bar.scss +5 -5
- package/snack-bar/_snack-bar-theme.scss +28 -31
- package/sort/_sort-theme.scss +28 -33
- package/stepper/_m2-stepper.scss +10 -13
- package/stepper/_stepper-theme.scss +41 -49
- package/table/_m2-table.scss +16 -23
- package/table/_table-theme.scss +28 -36
- package/tabs/_m2-tabs.scss +6 -5
- package/tabs/_tabs-theme.scss +35 -43
- package/timepicker/_timepicker-theme.scss +28 -46
- package/toolbar/_m2-toolbar.scss +6 -7
- package/toolbar/_toolbar-theme.scss +55 -46
- package/tooltip/_m2-tooltip.scss +5 -6
- package/tooltip/_tooltip-theme.scss +28 -37
- package/tree/_m2-tree.scss +4 -3
- package/tree/_tree-theme.scss +28 -38
- package/core/tokens/_format-tokens.scss +0 -5
- package/fesm2022/form-field-C9DZXojn.mjs.map +0 -1
- package/fesm2022/module-BDiw_nWS.mjs.map +0 -1
- package/fesm2022/module-DzZHEh7B.mjs.map +0 -1
package/button/_fab-theme.scss
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
@use '../core/style/sass-utils';
|
|
2
|
-
@use '../core/theming/theming';
|
|
3
1
|
@use '../core/theming/inspection';
|
|
4
2
|
@use './m2-fab';
|
|
5
3
|
@use './m3-fab';
|
|
@@ -11,23 +9,12 @@
|
|
|
11
9
|
/// for the mat-fab.
|
|
12
10
|
/// @param {Map} $theme The theme to generate base styles for.
|
|
13
11
|
@mixin base($theme) {
|
|
12
|
+
$tokens: m2-fab.get-unthemable-tokens();
|
|
14
13
|
@if inspection.get-theme-version($theme) == 1 {
|
|
15
|
-
|
|
16
|
-
} @else {
|
|
17
|
-
@include sass-utils.current-selector-or-root() {
|
|
18
|
-
@include token-utils.create-token-values-mixed(m2-fab.get-unthemable-tokens());
|
|
19
|
-
}
|
|
14
|
+
$tokens: map.get(m3-fab.get-tokens($theme), base);
|
|
20
15
|
}
|
|
21
|
-
}
|
|
22
16
|
|
|
23
|
-
@
|
|
24
|
-
$mat-tokens: if(
|
|
25
|
-
$palette,
|
|
26
|
-
m2-fab.private-get-color-palette-color-tokens($theme, $palette),
|
|
27
|
-
m2-fab.get-color-tokens($theme)
|
|
28
|
-
);
|
|
29
|
-
|
|
30
|
-
@include token-utils.create-token-values-mixed($mat-tokens);
|
|
17
|
+
@include token-utils.values($tokens);
|
|
31
18
|
}
|
|
32
19
|
|
|
33
20
|
/// Outputs color theme styles for the mat-fab.
|
|
@@ -35,25 +22,28 @@
|
|
|
35
22
|
/// @param {ArgList} $color-variant: The color variant to use for the fab: primary, secondary,
|
|
36
23
|
// or tertiary. (If not specified, default primary color will be used).
|
|
37
24
|
@mixin color($theme, $color-variant: null) {
|
|
25
|
+
$tokens: m2-fab.get-color-tokens($theme);
|
|
38
26
|
@if inspection.get-theme-version($theme) == 1 {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
@include _fab-variant($theme, null);
|
|
27
|
+
$tokens: map.get(m3-fab.get-tokens($theme, $color-variant), color);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@include token-utils.values($tokens);
|
|
44
31
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
32
|
+
@if inspection.get-theme-version($theme) != 1 {
|
|
33
|
+
.mat-mdc-fab, .mat-mdc-mini-fab {
|
|
34
|
+
&.mat-primary {
|
|
35
|
+
$tokens: m2-fab.private-get-color-palette-color-tokens($theme, primary);
|
|
36
|
+
@include token-utils.values($tokens);
|
|
37
|
+
}
|
|
49
38
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
39
|
+
&.mat-accent {
|
|
40
|
+
$tokens: m2-fab.private-get-color-palette-color-tokens($theme, secondary);
|
|
41
|
+
@include token-utils.values($tokens);
|
|
42
|
+
}
|
|
53
43
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
44
|
+
&.mat-warn {
|
|
45
|
+
$tokens: m2-fab.private-get-color-palette-color-tokens($theme, error);
|
|
46
|
+
@include token-utils.values($tokens);
|
|
57
47
|
}
|
|
58
48
|
}
|
|
59
49
|
}
|
|
@@ -62,25 +52,23 @@
|
|
|
62
52
|
/// Outputs typography theme styles for the mat-fab.
|
|
63
53
|
/// @param {Map} $theme The theme to generate typography styles for.
|
|
64
54
|
@mixin typography($theme) {
|
|
55
|
+
$tokens: m2-fab.get-typography-tokens($theme);
|
|
65
56
|
@if inspection.get-theme-version($theme) == 1 {
|
|
66
|
-
|
|
67
|
-
} @else {
|
|
68
|
-
@include sass-utils.current-selector-or-root() {
|
|
69
|
-
@include token-utils.create-token-values-mixed(m2-fab.get-typography-tokens($theme));
|
|
70
|
-
}
|
|
57
|
+
$tokens: map.get(m3-fab.get-tokens($theme), typography);
|
|
71
58
|
}
|
|
59
|
+
|
|
60
|
+
@include token-utils.values($tokens);
|
|
72
61
|
}
|
|
73
62
|
|
|
74
63
|
/// Outputs density theme styles for the mat-fab.
|
|
75
64
|
/// @param {Map} $theme The theme to generate density styles for.
|
|
76
65
|
@mixin density($theme) {
|
|
66
|
+
$tokens: m2-fab.get-density-tokens($theme);
|
|
77
67
|
@if inspection.get-theme-version($theme) == 1 {
|
|
78
|
-
|
|
79
|
-
} @else {
|
|
80
|
-
@include sass-utils.current-selector-or-root() {
|
|
81
|
-
@include token-utils.create-token-values-mixed(m2-fab.get-density-tokens($theme));
|
|
82
|
-
}
|
|
68
|
+
$tokens: map.get(m3-fab.get-tokens($theme), density);
|
|
83
69
|
}
|
|
70
|
+
|
|
71
|
+
@include token-utils.values($tokens);
|
|
84
72
|
}
|
|
85
73
|
|
|
86
74
|
/// Defines the tokens that will be available in the `overrides` mixin and for docs extraction.
|
|
@@ -103,23 +91,21 @@
|
|
|
103
91
|
/// @param {Map} $theme The theme to generate styles for.
|
|
104
92
|
/// @param {String} $color-variant: The color variant to use for the fab
|
|
105
93
|
@mixin theme($theme, $color-variant: null) {
|
|
106
|
-
@
|
|
107
|
-
@
|
|
108
|
-
|
|
109
|
-
|
|
94
|
+
@if inspection.get-theme-version($theme) == 1 {
|
|
95
|
+
@include base($theme);
|
|
96
|
+
@include color($theme, $color-variant);
|
|
97
|
+
@include density($theme);
|
|
98
|
+
@include typography($theme);
|
|
99
|
+
} @else {
|
|
100
|
+
@include base($theme);
|
|
101
|
+
@if inspection.theme-has($theme, color) {
|
|
102
|
+
@include color($theme);
|
|
103
|
+
}
|
|
104
|
+
@if inspection.theme-has($theme, density) {
|
|
110
105
|
@include density($theme);
|
|
106
|
+
}
|
|
107
|
+
@if inspection.theme-has($theme, typography) {
|
|
111
108
|
@include typography($theme);
|
|
112
|
-
} @else {
|
|
113
|
-
@include base($theme);
|
|
114
|
-
@if inspection.theme-has($theme, color) {
|
|
115
|
-
@include color($theme);
|
|
116
|
-
}
|
|
117
|
-
@if inspection.theme-has($theme, density) {
|
|
118
|
-
@include density($theme);
|
|
119
|
-
}
|
|
120
|
-
@if inspection.theme-has($theme, typography) {
|
|
121
|
-
@include typography($theme);
|
|
122
|
-
}
|
|
123
109
|
}
|
|
124
110
|
}
|
|
125
111
|
}
|
|
@@ -2,30 +2,16 @@
|
|
|
2
2
|
@use 'sass:math';
|
|
3
3
|
@use './m2-icon-button';
|
|
4
4
|
@use './m3-icon-button';
|
|
5
|
-
@use '../core/style/sass-utils';
|
|
6
5
|
@use '../core/tokens/token-utils';
|
|
7
|
-
@use '../core/theming/theming';
|
|
8
6
|
@use '../core/theming/inspection';
|
|
9
7
|
|
|
10
8
|
@mixin base($theme) {
|
|
9
|
+
$tokens: m2-icon-button.get-unthemable-tokens();
|
|
11
10
|
@if inspection.get-theme-version($theme) == 1 {
|
|
12
|
-
|
|
13
|
-
} @else {
|
|
14
|
-
// Add default values for tokens not related to color, typography, or density.
|
|
15
|
-
@include sass-utils.current-selector-or-root() {
|
|
16
|
-
@include token-utils.create-token-values-mixed(m2-icon-button.get-unthemable-tokens());
|
|
17
|
-
}
|
|
11
|
+
$tokens: map.get(m3-icon-button.get-tokens($theme), base);
|
|
18
12
|
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
@mixin _m2-icon-button-variant($theme, $palette) {
|
|
22
|
-
$mat-tokens: if(
|
|
23
|
-
$palette,
|
|
24
|
-
m2-icon-button.private-get-color-palette-color-tokens($theme, $palette),
|
|
25
|
-
m2-icon-button.get-color-tokens($theme)
|
|
26
|
-
);
|
|
27
13
|
|
|
28
|
-
@include token-utils.
|
|
14
|
+
@include token-utils.values($tokens);
|
|
29
15
|
}
|
|
30
16
|
|
|
31
17
|
/// Outputs color theme styles for the mat-icon-button.
|
|
@@ -33,45 +19,45 @@
|
|
|
33
19
|
/// @param {String} $color-variant: The color variant to use for the
|
|
34
20
|
// button: primary, secondary, tertiary, or error.
|
|
35
21
|
@mixin color($theme, $color-variant: null) {
|
|
22
|
+
$tokens: m2-icon-button.get-color-tokens($theme);
|
|
36
23
|
@if inspection.get-theme-version($theme) == 1 {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
@include _m2-icon-button-variant($theme, null);
|
|
24
|
+
$tokens: map.get(m3-icon-button.get-tokens($theme, $color-variant), color);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
@include token-utils.values($tokens);
|
|
42
28
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
29
|
+
@if inspection.get-theme-version($theme) != 1 {
|
|
30
|
+
.mat-mdc-icon-button {
|
|
31
|
+
&.mat-primary {
|
|
32
|
+
$tokens: m2-icon-button.private-get-color-palette-color-tokens($theme, primary);
|
|
33
|
+
@include token-utils.values($tokens);
|
|
34
|
+
}
|
|
47
35
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
36
|
+
&.mat-accent {
|
|
37
|
+
$tokens: m2-icon-button.private-get-color-palette-color-tokens($theme, secondary);
|
|
38
|
+
@include token-utils.values($tokens);
|
|
39
|
+
}
|
|
51
40
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
41
|
+
&.mat-warn {
|
|
42
|
+
$tokens: m2-icon-button.private-get-color-palette-color-tokens($theme, error);
|
|
43
|
+
@include token-utils.values($tokens);
|
|
55
44
|
}
|
|
56
45
|
}
|
|
57
46
|
}
|
|
58
47
|
}
|
|
59
48
|
|
|
60
49
|
@mixin typography($theme) {
|
|
50
|
+
$tokens: m2-icon-button.get-typography-tokens($theme);
|
|
61
51
|
@if inspection.get-theme-version($theme) == 1 {
|
|
62
|
-
|
|
63
|
-
map.get(m3-icon-button.get-tokens($theme), typography));
|
|
64
|
-
} @else {
|
|
65
|
-
@include sass-utils.current-selector-or-root() {
|
|
66
|
-
@include token-utils.create-token-values-mixed(m2-icon-button.get-typography-tokens($theme)
|
|
67
|
-
);
|
|
68
|
-
}
|
|
52
|
+
$tokens: map.get(m3-icon-button.get-tokens($theme), typography);
|
|
69
53
|
}
|
|
54
|
+
|
|
55
|
+
@include token-utils.values($tokens);
|
|
70
56
|
}
|
|
71
57
|
|
|
72
58
|
@mixin density($theme) {
|
|
73
59
|
@if inspection.get-theme-version($theme) == 1 {
|
|
74
|
-
@include token-utils.
|
|
60
|
+
@include token-utils.values(map.get(m3-icon-button.get-tokens($theme), density));
|
|
75
61
|
} @else {
|
|
76
62
|
$icon-size: 24px;
|
|
77
63
|
$density-scale: inspection.get-theme-density($theme);
|
|
@@ -85,12 +71,10 @@
|
|
|
85
71
|
);
|
|
86
72
|
$calculated-size: map.get($size-map, $density-scale);
|
|
87
73
|
|
|
88
|
-
@include
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
);
|
|
93
|
-
}
|
|
74
|
+
@include token-utils.values(
|
|
75
|
+
m2-icon-button.get-density-tokens(
|
|
76
|
+
$theme, $exclude: (icon-button-state-layer-size))
|
|
77
|
+
);
|
|
94
78
|
|
|
95
79
|
// Use `mat-mdc-button-base` to increase the specificity over the button's structural styles.
|
|
96
80
|
.mat-mdc-icon-button.mat-mdc-button-base {
|
|
@@ -130,7 +114,6 @@
|
|
|
130
114
|
/// @param {String} $color-variant: The color variant to use for the button: primary,
|
|
131
115
|
// secondary, tertiary, or error.
|
|
132
116
|
@mixin theme($theme, $color-variant: null) {
|
|
133
|
-
@include theming.private-check-duplicate-theme-styles($theme, 'mat-icon-button') {
|
|
134
117
|
@if inspection.get-theme-version($theme) == 1 {
|
|
135
118
|
@include base($theme);
|
|
136
119
|
@include color($theme, $color-variant);
|
|
@@ -146,7 +129,6 @@
|
|
|
146
129
|
}
|
|
147
130
|
@if inspection.theme-has($theme, typography) {
|
|
148
131
|
@include typography($theme);
|
|
149
|
-
}
|
|
150
132
|
}
|
|
151
133
|
}
|
|
152
134
|
}
|
package/button/_m2-button.scss
CHANGED
|
@@ -143,38 +143,34 @@
|
|
|
143
143
|
|
|
144
144
|
// Tokens that can be configured through Angular Material's typography theming API.
|
|
145
145
|
@function get-typography-tokens($theme) {
|
|
146
|
-
$
|
|
147
|
-
$font-size: inspection.get-theme-typography($theme, button, font-size);
|
|
148
|
-
$font-weight: inspection.get-theme-typography($theme, button, font-weight);
|
|
149
|
-
$letter-spacing: inspection.get-theme-typography($theme, button, letter-spacing);
|
|
150
|
-
$text-transform: none;
|
|
146
|
+
$system: m2-utils.get-system($theme);
|
|
151
147
|
|
|
152
148
|
@return (
|
|
153
|
-
button-filled-label-text-font: $font
|
|
154
|
-
button-filled-label-text-size: $
|
|
155
|
-
button-filled-label-text-tracking: $
|
|
149
|
+
button-filled-label-text-font: map.get($system, label-small-font),
|
|
150
|
+
button-filled-label-text-size: map.get($system, label-small-size),
|
|
151
|
+
button-filled-label-text-tracking: map.get($system, label-small-tracking),
|
|
156
152
|
button-filled-label-text-transform: none,
|
|
157
|
-
button-filled-label-text-weight: $
|
|
158
|
-
button-outlined-label-text-font: $font
|
|
159
|
-
button-outlined-label-text-size: $
|
|
160
|
-
button-outlined-label-text-tracking: $
|
|
153
|
+
button-filled-label-text-weight: map.get($system, label-small-weight),
|
|
154
|
+
button-outlined-label-text-font: map.get($system, label-small-font),
|
|
155
|
+
button-outlined-label-text-size: map.get($system, label-small-size),
|
|
156
|
+
button-outlined-label-text-tracking: map.get($system, label-small-tracking),
|
|
161
157
|
button-outlined-label-text-transform: none,
|
|
162
|
-
button-outlined-label-text-weight: $
|
|
163
|
-
button-protected-label-text-font: $font
|
|
164
|
-
button-protected-label-text-size: $
|
|
165
|
-
button-protected-label-text-tracking: $
|
|
158
|
+
button-outlined-label-text-weight: map.get($system, label-small-weight),
|
|
159
|
+
button-protected-label-text-font: map.get($system, label-small-font),
|
|
160
|
+
button-protected-label-text-size: map.get($system, label-small-size),
|
|
161
|
+
button-protected-label-text-tracking: map.get($system, label-small-tracking),
|
|
166
162
|
button-protected-label-text-transform: none,
|
|
167
|
-
button-protected-label-text-weight: $
|
|
168
|
-
button-text-label-text-font: $font
|
|
169
|
-
button-text-label-text-size: $
|
|
170
|
-
button-text-label-text-tracking: $
|
|
163
|
+
button-protected-label-text-weight: map.get($system, label-small-weight),
|
|
164
|
+
button-text-label-text-font: map.get($system, label-small-font),
|
|
165
|
+
button-text-label-text-size: map.get($system, label-small-size),
|
|
166
|
+
button-text-label-text-tracking: map.get($system, label-small-tracking),
|
|
171
167
|
button-text-label-text-transform: none,
|
|
172
|
-
button-text-label-text-weight: $
|
|
173
|
-
button-tonal-label-text-font: $font
|
|
174
|
-
button-tonal-label-text-size: $
|
|
175
|
-
button-tonal-label-text-tracking: $
|
|
168
|
+
button-text-label-text-weight: map.get($system, label-small-weight),
|
|
169
|
+
button-tonal-label-text-font: map.get($system, label-small-font),
|
|
170
|
+
button-tonal-label-text-size: map.get($system, label-small-size),
|
|
171
|
+
button-tonal-label-text-tracking: map.get($system, label-small-tracking),
|
|
176
172
|
button-tonal-label-text-transform: none,
|
|
177
|
-
button-tonal-label-text-weight: $
|
|
173
|
+
button-tonal-label-text-weight: map.get($system, label-small-weight),
|
|
178
174
|
);
|
|
179
175
|
}
|
|
180
176
|
|
package/button/_m2-fab.scss
CHANGED
|
@@ -82,12 +82,12 @@
|
|
|
82
82
|
|
|
83
83
|
// Tokens that can be configured through Angular Material's typography theming API.
|
|
84
84
|
@function get-typography-tokens($theme) {
|
|
85
|
+
$system: m2-utils.get-system($theme);
|
|
85
86
|
@return (
|
|
86
|
-
fab-extended-label-text-font:
|
|
87
|
-
fab-extended-label-text-size:
|
|
88
|
-
fab-extended-label-text-tracking:
|
|
89
|
-
|
|
90
|
-
fab-extended-label-text-weight: inspection.get-theme-typography($theme, button, font-weight)
|
|
87
|
+
fab-extended-label-text-font: map.get($system, label-small-font),
|
|
88
|
+
fab-extended-label-text-size: map.get($system, label-small-size),
|
|
89
|
+
fab-extended-label-text-tracking: map.get($system, label-small-tracking),
|
|
90
|
+
fab-extended-label-text-weight: map.get($system, label-small-weight)
|
|
91
91
|
);
|
|
92
92
|
}
|
|
93
93
|
|
|
@@ -18,6 +18,7 @@ interface ButtonHarnessFilters extends BaseHarnessFilters {
|
|
|
18
18
|
|
|
19
19
|
/** Harness for interacting with a mat-button in tests. */
|
|
20
20
|
declare class MatButtonHarness extends ContentContainerComponentHarness {
|
|
21
|
+
/** Selector for the harness. */
|
|
21
22
|
static hostSelector: string;
|
|
22
23
|
/**
|
|
23
24
|
* Gets a `HarnessPredicate` that can be used to search for a button with specific attributes.
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
@use '../core/style/sass-utils';
|
|
2
1
|
@use '../core/theming/inspection';
|
|
3
|
-
@use '../core/theming/theming';
|
|
4
2
|
@use '../core/tokens/token-utils';
|
|
5
3
|
@use '../core/typography/typography';
|
|
6
4
|
@use './m2-button-toggle';
|
|
@@ -11,14 +9,12 @@
|
|
|
11
9
|
/// for the mat-button-toggle.
|
|
12
10
|
/// @param {Map} $theme The theme to generate base styles for.
|
|
13
11
|
@mixin base($theme) {
|
|
12
|
+
$tokens: m2-button-toggle.get-unthemable-tokens($theme);
|
|
14
13
|
@if inspection.get-theme-version($theme) == 1 {
|
|
15
|
-
|
|
16
|
-
} @else {
|
|
17
|
-
@include sass-utils.current-selector-or-root() {
|
|
18
|
-
@include token-utils.create-token-values-mixed(
|
|
19
|
-
m2-button-toggle.get-unthemable-tokens($theme));
|
|
20
|
-
}
|
|
14
|
+
$tokens: map.get(m3-button-toggle.get-tokens($theme), base);
|
|
21
15
|
}
|
|
16
|
+
|
|
17
|
+
@include token-utils.values($tokens);
|
|
22
18
|
}
|
|
23
19
|
|
|
24
20
|
/// Outputs color theme styles for the mat-button-toggle.
|
|
@@ -26,43 +22,34 @@
|
|
|
26
22
|
/// @param {String} $color-variant: The color variant to use for the button toggle: primary,
|
|
27
23
|
/// secondary, tertiary, or error (If not specified, default secondary color will be used).
|
|
28
24
|
@mixin color($theme, $color-variant: null) {
|
|
25
|
+
$tokens: m2-button-toggle.get-color-tokens($theme);
|
|
29
26
|
@if inspection.get-theme-version($theme) == 1 {
|
|
30
|
-
|
|
31
|
-
map.get(m3-button-toggle.get-tokens($theme, $color-variant), color));
|
|
32
|
-
} @else {
|
|
33
|
-
@include sass-utils.current-selector-or-root() {
|
|
34
|
-
@include token-utils.create-token-values-mixed(
|
|
35
|
-
m2-button-toggle.get-color-tokens($theme)
|
|
36
|
-
);
|
|
37
|
-
}
|
|
27
|
+
$tokens: map.get(m3-button-toggle.get-tokens($theme, $color-variant), color);
|
|
38
28
|
}
|
|
29
|
+
|
|
30
|
+
@include token-utils.values($tokens);
|
|
39
31
|
}
|
|
40
32
|
|
|
41
33
|
/// Outputs typography theme styles for the mat-button-toggle.
|
|
42
34
|
/// @param {Map} $theme The theme to generate typography styles for.
|
|
43
35
|
@mixin typography($theme) {
|
|
36
|
+
$tokens: m2-button-toggle.get-typography-tokens($theme);
|
|
44
37
|
@if inspection.get-theme-version($theme) == 1 {
|
|
45
|
-
|
|
46
|
-
map.get(m3-button-toggle.get-tokens($theme), typography));
|
|
47
|
-
} @else {
|
|
48
|
-
@include sass-utils.current-selector-or-root() {
|
|
49
|
-
@include token-utils.create-token-values-mixed(
|
|
50
|
-
m2-button-toggle.get-typography-tokens($theme));
|
|
51
|
-
}
|
|
38
|
+
$tokens: map.get(m3-button-toggle.get-tokens($theme), typography);
|
|
52
39
|
}
|
|
40
|
+
|
|
41
|
+
@include token-utils.values($tokens);
|
|
53
42
|
}
|
|
54
43
|
|
|
55
44
|
/// Outputs density theme styles for the mat-button-toggle.
|
|
56
45
|
/// @param {Map} $theme The theme to generate density styles for.
|
|
57
46
|
@mixin density($theme) {
|
|
47
|
+
$tokens: m2-button-toggle.get-density-tokens($theme);
|
|
58
48
|
@if inspection.get-theme-version($theme) == 1 {
|
|
59
|
-
|
|
60
|
-
map.get(m3-button-toggle.get-tokens($theme), density));
|
|
61
|
-
} @else {
|
|
62
|
-
@include sass-utils.current-selector-or-root() {
|
|
63
|
-
@include token-utils.create-token-values-mixed(m2-button-toggle.get-density-tokens($theme));
|
|
64
|
-
}
|
|
49
|
+
$tokens: map.get(m3-button-toggle.get-tokens($theme), density);
|
|
65
50
|
}
|
|
51
|
+
|
|
52
|
+
@include token-utils.values($tokens);
|
|
66
53
|
}
|
|
67
54
|
|
|
68
55
|
/// Defines the tokens that will be available in the `overrides` mixin and for docs extraction.
|
|
@@ -86,23 +73,21 @@
|
|
|
86
73
|
/// @param {String} $color-variant: The color variant to use for the button toggle: primary,
|
|
87
74
|
/// secondary, tertiary, or error (If not specified, default secondary color will be used).
|
|
88
75
|
@mixin theme($theme, $color-variant: null) {
|
|
89
|
-
@
|
|
90
|
-
@
|
|
91
|
-
|
|
92
|
-
|
|
76
|
+
@if inspection.get-theme-version($theme) == 1 {
|
|
77
|
+
@include base($theme);
|
|
78
|
+
@include color($theme, $color-variant);
|
|
79
|
+
@include density($theme);
|
|
80
|
+
@include typography($theme);
|
|
81
|
+
} @else {
|
|
82
|
+
@include base($theme);
|
|
83
|
+
@if inspection.theme-has($theme, color) {
|
|
84
|
+
@include color($theme);
|
|
85
|
+
}
|
|
86
|
+
@if inspection.theme-has($theme, density) {
|
|
93
87
|
@include density($theme);
|
|
88
|
+
}
|
|
89
|
+
@if inspection.theme-has($theme, typography) {
|
|
94
90
|
@include typography($theme);
|
|
95
|
-
} @else {
|
|
96
|
-
@include base($theme);
|
|
97
|
-
@if inspection.theme-has($theme, color) {
|
|
98
|
-
@include color($theme);
|
|
99
|
-
}
|
|
100
|
-
@if inspection.theme-has($theme, density) {
|
|
101
|
-
@include density($theme);
|
|
102
|
-
}
|
|
103
|
-
@if inspection.theme-has($theme, typography) {
|
|
104
|
-
@include typography($theme);
|
|
105
|
-
}
|
|
106
91
|
}
|
|
107
92
|
}
|
|
108
93
|
}
|
|
@@ -53,24 +53,18 @@
|
|
|
53
53
|
|
|
54
54
|
// Tokens that can be configured through Angular Material's typography theming API.
|
|
55
55
|
@function get-typography-tokens($theme) {
|
|
56
|
+
$system: m2-utils.get-system($theme);
|
|
56
57
|
@return (
|
|
57
|
-
button-toggle-label-text-font:
|
|
58
|
-
button-toggle-label-text-line-height:
|
|
59
|
-
|
|
60
|
-
button-toggle-label-text-
|
|
61
|
-
button-toggle-label-text-
|
|
62
|
-
|
|
63
|
-
button-toggle-label-text-
|
|
64
|
-
button-toggle-legacy-label-text-
|
|
65
|
-
|
|
66
|
-
button-toggle-legacy-label-text-
|
|
67
|
-
inspection.get-theme-typography($theme, body-1, line-height),
|
|
68
|
-
button-toggle-legacy-label-text-size:
|
|
69
|
-
inspection.get-theme-typography($theme, body-1, font-size),
|
|
70
|
-
button-toggle-legacy-label-text-tracking:
|
|
71
|
-
inspection.get-theme-typography($theme, body-1, letter-spacing),
|
|
72
|
-
button-toggle-legacy-label-text-weight:
|
|
73
|
-
inspection.get-theme-typography($theme, body-1, font-weight),
|
|
58
|
+
button-toggle-label-text-font: map.get($system, body-large-font),
|
|
59
|
+
button-toggle-label-text-line-height: map.get($system, body-large-line-height),
|
|
60
|
+
button-toggle-label-text-size: map.get($system, body-large-size),
|
|
61
|
+
button-toggle-label-text-tracking: map.get($system, body-large-tracking),
|
|
62
|
+
button-toggle-label-text-weight: map.get($system, body-large-weight),
|
|
63
|
+
button-toggle-legacy-label-text-font: map.get($system, body-large-font),
|
|
64
|
+
button-toggle-legacy-label-text-line-height: map.get($system, body-large-line-height),
|
|
65
|
+
button-toggle-legacy-label-text-size: map.get($system, body-large-size),
|
|
66
|
+
button-toggle-legacy-label-text-tracking: map.get($system, body-large-tracking),
|
|
67
|
+
button-toggle-legacy-label-text-weight: map.get($system, body-large-weight),
|
|
74
68
|
);
|
|
75
69
|
}
|
|
76
70
|
|
package/card/_card-theme.scss
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
|
-
@use '../core/style/sass-utils';
|
|
3
|
-
@use '../core/theming/theming';
|
|
4
2
|
@use '../core/theming/inspection';
|
|
5
3
|
@use '../core/typography/typography';
|
|
6
4
|
@use '../core/tokens/token-utils';
|
|
@@ -8,43 +6,39 @@
|
|
|
8
6
|
@use './m3-card';
|
|
9
7
|
|
|
10
8
|
@mixin base($theme) {
|
|
9
|
+
$tokens: m2-card.get-unthemable-tokens();
|
|
11
10
|
@if inspection.get-theme-version($theme) == 1 {
|
|
12
|
-
|
|
13
|
-
} @else {
|
|
14
|
-
@include sass-utils.current-selector-or-root() {
|
|
15
|
-
@include token-utils.create-token-values-mixed(m2-card.get-unthemable-tokens());
|
|
16
|
-
}
|
|
11
|
+
$tokens: map.get(m3-card.get-tokens($theme), base);
|
|
17
12
|
}
|
|
13
|
+
|
|
14
|
+
@include token-utils.values($tokens);
|
|
18
15
|
}
|
|
19
16
|
|
|
20
17
|
@mixin color($theme) {
|
|
18
|
+
$tokens: m2-card.get-color-tokens($theme);
|
|
21
19
|
@if inspection.get-theme-version($theme) == 1 {
|
|
22
|
-
|
|
23
|
-
} @else {
|
|
24
|
-
@include sass-utils.current-selector-or-root() {
|
|
25
|
-
@include token-utils.create-token-values-mixed(m2-card.get-color-tokens($theme));
|
|
26
|
-
}
|
|
20
|
+
$tokens: map.get(m3-card.get-tokens($theme), color);
|
|
27
21
|
}
|
|
22
|
+
|
|
23
|
+
@include token-utils.values($tokens);
|
|
28
24
|
}
|
|
29
25
|
|
|
30
26
|
@mixin typography($theme) {
|
|
27
|
+
$tokens: m2-card.get-typography-tokens($theme);
|
|
31
28
|
@if inspection.get-theme-version($theme) == 1 {
|
|
32
|
-
|
|
33
|
-
} @else {
|
|
34
|
-
@include sass-utils.current-selector-or-root() {
|
|
35
|
-
@include token-utils.create-token-values-mixed(m2-card.get-typography-tokens($theme));
|
|
36
|
-
}
|
|
29
|
+
$tokens: map.get(m3-card.get-tokens($theme), typography);
|
|
37
30
|
}
|
|
31
|
+
|
|
32
|
+
@include token-utils.values($tokens);
|
|
38
33
|
}
|
|
39
34
|
|
|
40
35
|
@mixin density($theme) {
|
|
36
|
+
$tokens: m2-card.get-density-tokens($theme);
|
|
41
37
|
@if inspection.get-theme-version($theme) == 1 {
|
|
42
|
-
|
|
43
|
-
} @else {
|
|
44
|
-
@include sass-utils.current-selector-or-root() {
|
|
45
|
-
@include token-utils.create-token-values-mixed(m2-card.get-density-tokens($theme));
|
|
46
|
-
}
|
|
38
|
+
$tokens: map.get(m3-card.get-tokens($theme), density);
|
|
47
39
|
}
|
|
40
|
+
|
|
41
|
+
@include token-utils.values($tokens);
|
|
48
42
|
}
|
|
49
43
|
|
|
50
44
|
/// Defines the tokens that will be available in the `overrides` mixin and for docs extraction.
|
|
@@ -62,23 +56,21 @@
|
|
|
62
56
|
}
|
|
63
57
|
|
|
64
58
|
@mixin theme($theme) {
|
|
65
|
-
@
|
|
66
|
-
@
|
|
67
|
-
|
|
59
|
+
@if inspection.get-theme-version($theme) == 1 {
|
|
60
|
+
@include base($theme);
|
|
61
|
+
@include color($theme);
|
|
62
|
+
@include density($theme);
|
|
63
|
+
@include typography($theme);
|
|
64
|
+
} @else {
|
|
65
|
+
@include base($theme);
|
|
66
|
+
@if inspection.theme-has($theme, color) {
|
|
68
67
|
@include color($theme);
|
|
68
|
+
}
|
|
69
|
+
@if inspection.theme-has($theme, density) {
|
|
69
70
|
@include density($theme);
|
|
71
|
+
}
|
|
72
|
+
@if inspection.theme-has($theme, typography) {
|
|
70
73
|
@include typography($theme);
|
|
71
|
-
} @else {
|
|
72
|
-
@include base($theme);
|
|
73
|
-
@if inspection.theme-has($theme, color) {
|
|
74
|
-
@include color($theme);
|
|
75
|
-
}
|
|
76
|
-
@if inspection.theme-has($theme, density) {
|
|
77
|
-
@include density($theme);
|
|
78
|
-
}
|
|
79
|
-
@if inspection.theme-has($theme, typography) {
|
|
80
|
-
@include typography($theme);
|
|
81
|
-
}
|
|
82
74
|
}
|
|
83
75
|
}
|
|
84
76
|
}
|