@angular/material 20.1.0-next.0 → 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/autocomplete/_m2-autocomplete.scss +5 -2
- 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 +12 -11
- 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 +60 -59
- package/button/_m2-fab.scss +19 -15
- package/button/_m2-icon-button.scss +7 -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 +12 -14
- package/checkbox/_checkbox-theme.scss +35 -50
- package/checkbox/_m2-checkbox.scss +8 -8
- package/chips/_chips-theme.scss +24 -30
- package/chips/_m2-chip.scss +12 -28
- package/core/_core-theme.scss +48 -67
- package/core/focus-indicators/_private.scss +2 -5
- package/core/m2/_theming.scss +68 -113
- package/core/option/_m2-optgroup.scss +10 -7
- package/core/option/_m2-option.scss +13 -11
- package/core/option/_optgroup-theme.scss +28 -30
- package/core/option/_option-theme.scss +35 -34
- package/core/ripple/_m2-ripple.scss +6 -10
- package/core/ripple/_ripple-theme.scss +28 -33
- package/core/selection/pseudo-checkbox/_m2-pseudo-checkbox.scss +2 -3
- 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 -75
- package/core/tokens/_m3-system.scss +11 -9
- 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 +47 -87
- package/datepicker/_m2-datepicker.scss +33 -123
- package/datepicker/index.d.ts +1 -1
- package/dialog/_dialog-theme.scss +28 -34
- package/dialog/_m2-dialog.scss +17 -17
- package/divider/_divider-theme.scss +28 -30
- package/divider/_m2-divider.scss +4 -2
- 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 +2 -2
- 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 +2 -2
- 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 +23 -31
- 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 +21 -35
- package/menu/_m2-menu.scss +18 -15
- 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 +9 -9
- package/paginator/_paginator-theme.scss +28 -33
- package/prebuilt-themes/azure-blue.css +1 -1
- package/prebuilt-themes/cyan-orange.css +1 -1
- package/prebuilt-themes/deeppurple-amber.css +1 -1
- package/prebuilt-themes/indigo-pink.css +1 -1
- package/prebuilt-themes/magenta-violet.css +1 -1
- package/prebuilt-themes/pink-bluegrey.css +1 -1
- package/prebuilt-themes/purple-green.css +1 -1
- package/prebuilt-themes/rose-red.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/_m3-radio.scss +1 -1
- package/radio/_radio-theme.scss +33 -46
- package/schematics/ng-add/index.js +1 -1
- package/select/_m2-select.scss +10 -8
- package/select/_select-theme.scss +38 -48
- 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 +33 -35
- package/slider/_slider-theme.scss +38 -45
- package/snack-bar/_m2-snack-bar.scss +5 -6
- package/snack-bar/_snack-bar-theme.scss +28 -31
- package/sort/_m2-sort.scss +5 -2
- 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 +23 -28
- package/table/_table-theme.scss +28 -36
- package/tabs/_m2-tabs.scss +11 -16
- package/tabs/_tabs-theme.scss +35 -43
- package/timepicker/_m2-timepicker.scss +5 -2
- package/timepicker/_timepicker-theme.scss +28 -46
- package/toolbar/_m2-toolbar.scss +10 -9
- 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 +9 -5
- 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
|
@@ -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
|
}
|
package/card/_m2-card.scss
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
@use '../core/theming/inspection';
|
|
2
1
|
@use '../core/style/elevation';
|
|
3
2
|
@use '../core/tokens/m2-utils';
|
|
4
3
|
@use 'sass:map';
|
|
@@ -23,7 +22,7 @@
|
|
|
23
22
|
card-elevated-container-elevation: elevation.get-box-shadow(1),
|
|
24
23
|
card-outlined-container-color: map.get($system, surface),
|
|
25
24
|
card-outlined-container-elevation: elevation.get-box-shadow(0),
|
|
26
|
-
card-outlined-outline-color:
|
|
25
|
+
card-outlined-outline-color: map.get($system, outline),
|
|
27
26
|
card-subtitle-text-color: map.get($system, on-surface-variant),
|
|
28
27
|
card-filled-container-color: map.get($system, surface),
|
|
29
28
|
card-filled-container-elevation: elevation.get-box-shadow(0)
|
|
@@ -32,19 +31,18 @@
|
|
|
32
31
|
|
|
33
32
|
// Tokens that can be configured through Angular Material's typography theming API.
|
|
34
33
|
@function get-typography-tokens($theme) {
|
|
34
|
+
$system: m2-utils.get-system($theme);
|
|
35
35
|
@return (
|
|
36
|
-
card-title-text-font:
|
|
37
|
-
card-title-text-line-height:
|
|
38
|
-
card-title-text-size:
|
|
39
|
-
card-title-text-tracking:
|
|
40
|
-
card-title-text-weight:
|
|
41
|
-
card-subtitle-text-font:
|
|
42
|
-
card-subtitle-text-line-height:
|
|
43
|
-
|
|
44
|
-
card-subtitle-text-
|
|
45
|
-
card-subtitle-text-
|
|
46
|
-
inspection.get-theme-typography($theme, subtitle-2, letter-spacing),
|
|
47
|
-
card-subtitle-text-weight: inspection.get-theme-typography($theme, subtitle-2, font-weight),
|
|
36
|
+
card-title-text-font: map.get($system, title-small-font),
|
|
37
|
+
card-title-text-line-height: map.get($system, title-small-line-height),
|
|
38
|
+
card-title-text-size: map.get($system, title-small-size),
|
|
39
|
+
card-title-text-tracking: map.get($system, title-small-tracking),
|
|
40
|
+
card-title-text-weight: map.get($system, title-small-weight),
|
|
41
|
+
card-subtitle-text-font: map.get($system, label-medium-font),
|
|
42
|
+
card-subtitle-text-line-height: map.get($system, label-medium-line-height),
|
|
43
|
+
card-subtitle-text-size: map.get($system, label-medium-size),
|
|
44
|
+
card-subtitle-text-tracking: map.get($system, label-medium-tracking),
|
|
45
|
+
card-subtitle-text-weight: map.get($system, label-medium-weight),
|
|
48
46
|
);
|
|
49
47
|
}
|
|
50
48
|
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
@use '../core/style/sass-utils';
|
|
2
|
-
@use '../core/theming/theming';
|
|
3
1
|
@use '../core/theming/inspection';
|
|
4
2
|
@use '../core/tokens/token-utils';
|
|
5
3
|
@use '../core/typography/typography';
|
|
@@ -11,69 +9,58 @@
|
|
|
11
9
|
/// for the mat-checkbox.
|
|
12
10
|
/// @param {Map} $theme The theme to generate base styles for.
|
|
13
11
|
@mixin base($theme) {
|
|
12
|
+
$tokens: m2-checkbox.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(m2-checkbox.get-unthemable-tokens($theme));
|
|
19
|
-
}
|
|
14
|
+
$tokens: map.get(m3-checkbox.get-tokens($theme), base);
|
|
20
15
|
}
|
|
16
|
+
|
|
17
|
+
@include token-utils.values($tokens);
|
|
21
18
|
}
|
|
22
19
|
|
|
23
20
|
/// Outputs color theme styles for the mat-checkbox.
|
|
24
21
|
/// @param {Map} $theme The theme to generate color styles for.
|
|
25
22
|
/// @param {String} $color-variant The color variant to use for the component
|
|
26
23
|
@mixin color($theme, $color-variant: null) {
|
|
24
|
+
$tokens: m2-checkbox.get-color-tokens($theme, secondary);
|
|
27
25
|
@if inspection.get-theme-version($theme) == 1 {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
@include token-utils.create-token-values-mixed(
|
|
33
|
-
m2-checkbox.get-color-tokens($theme, secondary));
|
|
34
|
-
}
|
|
26
|
+
$tokens: map.get(m3-checkbox.get-tokens($theme, $color-variant), color);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
@include token-utils.values($tokens);
|
|
35
30
|
|
|
31
|
+
@if inspection.get-theme-version($theme) != 1 {
|
|
36
32
|
.mat-mdc-checkbox {
|
|
37
33
|
&.mat-primary {
|
|
38
|
-
@include token-utils.
|
|
39
|
-
|
|
40
|
-
$exclude: (checkbox-disabled-label-color, checkbox-label-text-color))
|
|
34
|
+
@include token-utils.values(m2-checkbox.get-color-tokens($theme, primary,
|
|
35
|
+
$exclude: (checkbox-disabled-label-color, checkbox-label-text-color))
|
|
41
36
|
);
|
|
42
37
|
}
|
|
43
38
|
|
|
44
39
|
&.mat-warn {
|
|
45
|
-
@include token-utils.
|
|
46
|
-
|
|
47
|
-
$exclude: (checkbox-disabled-label-color, checkbox-label-text-color))
|
|
40
|
+
@include token-utils.values(m2-checkbox.get-color-tokens($theme, error,
|
|
41
|
+
$exclude: (checkbox-disabled-label-color, checkbox-label-text-color))
|
|
48
42
|
);
|
|
49
43
|
}
|
|
50
44
|
}
|
|
51
45
|
}
|
|
52
46
|
}
|
|
53
47
|
|
|
54
|
-
/// Outputs typography theme styles for the mat-checkbox.
|
|
55
|
-
/// @param {Map} $theme The theme to generate typography styles for.
|
|
56
48
|
@mixin typography($theme) {
|
|
49
|
+
$tokens: m2-checkbox.get-typography-tokens($theme);
|
|
57
50
|
@if inspection.get-theme-version($theme) == 1 {
|
|
58
|
-
|
|
59
|
-
map.get(m3-checkbox.get-tokens($theme), typography));
|
|
60
|
-
} @else {
|
|
61
|
-
@include sass-utils.current-selector-or-root() {
|
|
62
|
-
@include token-utils.create-token-values-mixed(m2-checkbox.get-typography-tokens($theme));
|
|
63
|
-
}
|
|
51
|
+
$tokens: map.get(m3-checkbox.get-tokens($theme), typography);
|
|
64
52
|
}
|
|
53
|
+
|
|
54
|
+
@include token-utils.values($tokens);
|
|
65
55
|
}
|
|
66
56
|
|
|
67
|
-
/// Outputs density theme styles for the mat-checkbox.
|
|
68
|
-
/// @param {Map} $theme The theme to generate density styles for.
|
|
69
57
|
@mixin density($theme) {
|
|
58
|
+
$tokens: m2-checkbox.get-density-tokens($theme);
|
|
70
59
|
@if inspection.get-theme-version($theme) == 1 {
|
|
71
|
-
|
|
72
|
-
} @else {
|
|
73
|
-
@include sass-utils.current-selector-or-root() {
|
|
74
|
-
@include token-utils.create-token-values-mixed(m2-checkbox.get-density-tokens($theme));
|
|
75
|
-
}
|
|
60
|
+
$tokens: map.get(m3-checkbox.get-tokens($theme), density);
|
|
76
61
|
}
|
|
62
|
+
|
|
63
|
+
@include token-utils.values($tokens);
|
|
77
64
|
}
|
|
78
65
|
|
|
79
66
|
/// Defines the tokens that will be available in the `overrides` mixin and for docs extraction.
|
|
@@ -96,23 +83,21 @@
|
|
|
96
83
|
/// @param {Map} $theme The theme to generate styles for.
|
|
97
84
|
/// @param {String} $color-variant The color variant to use for the component (M3 only)
|
|
98
85
|
@mixin theme($theme, $color-variant: null) {
|
|
99
|
-
@
|
|
100
|
-
@
|
|
101
|
-
|
|
102
|
-
|
|
86
|
+
@if inspection.get-theme-version($theme) == 1 {
|
|
87
|
+
@include base($theme);
|
|
88
|
+
@include color($theme, $color-variant);
|
|
89
|
+
@include density($theme);
|
|
90
|
+
@include typography($theme);
|
|
91
|
+
} @else {
|
|
92
|
+
@include base($theme);
|
|
93
|
+
@if inspection.theme-has($theme, color) {
|
|
94
|
+
@include color($theme);
|
|
95
|
+
}
|
|
96
|
+
@if inspection.theme-has($theme, density) {
|
|
103
97
|
@include density($theme);
|
|
98
|
+
}
|
|
99
|
+
@if inspection.theme-has($theme, typography) {
|
|
104
100
|
@include typography($theme);
|
|
105
|
-
} @else {
|
|
106
|
-
@include base($theme);
|
|
107
|
-
@if inspection.theme-has($theme, color) {
|
|
108
|
-
@include color($theme);
|
|
109
|
-
}
|
|
110
|
-
@if inspection.theme-has($theme, density) {
|
|
111
|
-
@include density($theme);
|
|
112
|
-
}
|
|
113
|
-
@if inspection.theme-has($theme, typography) {
|
|
114
|
-
@include typography($theme);
|
|
115
|
-
}
|
|
116
101
|
}
|
|
117
102
|
}
|
|
118
103
|
}
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
$system: m2-utils.get-system($theme);
|
|
11
11
|
|
|
12
12
|
@return (
|
|
13
|
-
checkbox-disabled-selected-checkmark-color:
|
|
13
|
+
checkbox-disabled-selected-checkmark-color: map.get($system, surface),
|
|
14
14
|
checkbox-selected-focus-state-layer-opacity: map.get($system, focus-state-layer-opacity),
|
|
15
15
|
checkbox-selected-hover-state-layer-opacity: map.get($system, hover-state-layer-opacity),
|
|
16
16
|
checkbox-selected-pressed-state-layer-opacity: map.get($system, pressed-state-layer-opacity),
|
|
@@ -25,7 +25,6 @@
|
|
|
25
25
|
$system: m2-utils.get-system($theme);
|
|
26
26
|
$system: m3-utils.replace-colors-with-variant($system, secondary, $color-variant);
|
|
27
27
|
$is-dark: inspection.get-theme-type($theme) == dark;
|
|
28
|
-
$foreground-base: inspection.get-theme-color($theme, foreground, base);
|
|
29
28
|
$disabled: m3-utils.color-with-opacity(map.get($system, on-surface), 38%);
|
|
30
29
|
|
|
31
30
|
$tokens: (
|
|
@@ -46,7 +45,7 @@
|
|
|
46
45
|
checkbox-selected-pressed-state-layer-color: map.get($system, secondary),
|
|
47
46
|
checkbox-unselected-focus-state-layer-color: map.get($system, on-surface),
|
|
48
47
|
checkbox-unselected-hover-state-layer-color: map.get($system, on-surface),
|
|
49
|
-
checkbox-unselected-pressed-state-layer-color: $
|
|
48
|
+
checkbox-unselected-pressed-state-layer-color: map.get($system, on-surface),
|
|
50
49
|
);
|
|
51
50
|
|
|
52
51
|
@each $token in $exclude {
|
|
@@ -58,12 +57,13 @@
|
|
|
58
57
|
|
|
59
58
|
// Tokens that can be configured through Angular Material's typography theming API.
|
|
60
59
|
@function get-typography-tokens($theme) {
|
|
60
|
+
$system: m2-utils.get-system($theme);
|
|
61
61
|
@return (
|
|
62
|
-
checkbox-label-text-font:
|
|
63
|
-
checkbox-label-text-line-height:
|
|
64
|
-
checkbox-label-text-size:
|
|
65
|
-
checkbox-label-text-tracking:
|
|
66
|
-
checkbox-label-text-weight:
|
|
62
|
+
checkbox-label-text-font: map.get($system, body-medium-font),
|
|
63
|
+
checkbox-label-text-line-height: map.get($system, body-medium-line-height),
|
|
64
|
+
checkbox-label-text-size: map.get($system, body-medium-size),
|
|
65
|
+
checkbox-label-text-tracking: map.get($system, body-medium-tracking),
|
|
66
|
+
checkbox-label-text-weight: map.get($system, body-medium-weight)
|
|
67
67
|
);
|
|
68
68
|
}
|
|
69
69
|
|
package/chips/_chips-theme.scss
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
@use './m2-chip';
|
|
3
3
|
@use './m3-chip';
|
|
4
4
|
@use '../core/tokens/token-utils';
|
|
5
|
-
@use '../core/theming/theming';
|
|
6
5
|
@use '../core/theming/inspection';
|
|
7
6
|
@use '../core/typography/typography';
|
|
8
7
|
@use 'sass:map';
|
|
@@ -12,10 +11,10 @@
|
|
|
12
11
|
/// @param {Map} $theme The theme to generate base styles for.
|
|
13
12
|
@mixin base($theme) {
|
|
14
13
|
@if inspection.get-theme-version($theme) == 1 {
|
|
15
|
-
@include token-utils.
|
|
14
|
+
@include token-utils.values(map.get(m3-chip.get-tokens($theme), base));
|
|
16
15
|
} @else {
|
|
17
16
|
.mat-mdc-standard-chip {
|
|
18
|
-
@include token-utils.
|
|
17
|
+
@include token-utils.values(m2-chip.get-unthemable-tokens($theme));
|
|
19
18
|
}
|
|
20
19
|
}
|
|
21
20
|
}
|
|
@@ -25,27 +24,24 @@
|
|
|
25
24
|
/// @param {String} $color-variant The color variant to use for the component (M3 only)
|
|
26
25
|
@mixin color($theme, $color-variant: null) {
|
|
27
26
|
@if inspection.get-theme-version($theme) == 1 {
|
|
28
|
-
@include token-utils.
|
|
27
|
+
@include token-utils.values(
|
|
29
28
|
map.get(m3-chip.get-tokens($theme, $color-variant), color));
|
|
30
29
|
} @else {
|
|
31
30
|
.mat-mdc-standard-chip {
|
|
32
|
-
@include token-utils.
|
|
31
|
+
@include token-utils.values(m2-chip.get-color-tokens($theme));
|
|
33
32
|
|
|
34
33
|
&.mat-mdc-chip-selected,
|
|
35
34
|
&.mat-mdc-chip-highlighted {
|
|
36
35
|
&.mat-primary {
|
|
37
|
-
@include token-utils.
|
|
38
|
-
m2-chip.get-color-tokens($theme, primary));
|
|
36
|
+
@include token-utils.values(m2-chip.get-color-tokens($theme, primary));
|
|
39
37
|
}
|
|
40
38
|
|
|
41
39
|
&.mat-accent {
|
|
42
|
-
@include token-utils.
|
|
43
|
-
m2-chip.get-color-tokens($theme, secondary));
|
|
40
|
+
@include token-utils.values(m2-chip.get-color-tokens($theme, secondary));
|
|
44
41
|
}
|
|
45
42
|
|
|
46
43
|
&.mat-warn {
|
|
47
|
-
@include token-utils.
|
|
48
|
-
m2-chip.get-color-tokens($theme, error));
|
|
44
|
+
@include token-utils.values(m2-chip.get-color-tokens($theme, error));
|
|
49
45
|
}
|
|
50
46
|
}
|
|
51
47
|
}
|
|
@@ -56,10 +52,10 @@
|
|
|
56
52
|
/// @param {Map} $theme The theme to generate typography styles for.
|
|
57
53
|
@mixin typography($theme) {
|
|
58
54
|
@if inspection.get-theme-version($theme) == 1 {
|
|
59
|
-
@include token-utils.
|
|
55
|
+
@include token-utils.values(map.get(m3-chip.get-tokens($theme), typography));
|
|
60
56
|
} @else {
|
|
61
57
|
.mat-mdc-standard-chip {
|
|
62
|
-
@include token-utils.
|
|
58
|
+
@include token-utils.values(m2-chip.get-typography-tokens($theme));
|
|
63
59
|
}
|
|
64
60
|
}
|
|
65
61
|
}
|
|
@@ -68,10 +64,10 @@
|
|
|
68
64
|
/// @param {Map} $theme The theme to generate density styles for.
|
|
69
65
|
@mixin density($theme) {
|
|
70
66
|
@if inspection.get-theme-version($theme) == 1 {
|
|
71
|
-
@include token-utils.
|
|
67
|
+
@include token-utils.values(map.get(m3-chip.get-tokens($theme), density));
|
|
72
68
|
} @else {
|
|
73
69
|
.mat-mdc-chip.mat-mdc-standard-chip {
|
|
74
|
-
@include token-utils.
|
|
70
|
+
@include token-utils.values(m2-chip.get-density-tokens($theme));
|
|
75
71
|
}
|
|
76
72
|
}
|
|
77
73
|
}
|
|
@@ -96,23 +92,21 @@
|
|
|
96
92
|
/// @param {Map} $theme The theme to generate styles for.
|
|
97
93
|
/// @param {String} $color-variant The color variant to use for the component (M3 only)
|
|
98
94
|
@mixin theme($theme, $color-variant: null) {
|
|
99
|
-
@
|
|
100
|
-
@
|
|
101
|
-
|
|
102
|
-
|
|
95
|
+
@if inspection.get-theme-version($theme) == 1 {
|
|
96
|
+
@include base($theme);
|
|
97
|
+
@include color($theme, $color-variant);
|
|
98
|
+
@include density($theme);
|
|
99
|
+
@include typography($theme);
|
|
100
|
+
} @else {
|
|
101
|
+
@include base($theme);
|
|
102
|
+
@if inspection.theme-has($theme, color) {
|
|
103
|
+
@include color($theme);
|
|
104
|
+
}
|
|
105
|
+
@if inspection.theme-has($theme, density) {
|
|
103
106
|
@include density($theme);
|
|
107
|
+
}
|
|
108
|
+
@if inspection.theme-has($theme, typography) {
|
|
104
109
|
@include typography($theme);
|
|
105
|
-
} @else {
|
|
106
|
-
@include base($theme);
|
|
107
|
-
@if inspection.theme-has($theme, color) {
|
|
108
|
-
@include color($theme);
|
|
109
|
-
}
|
|
110
|
-
@if inspection.theme-has($theme, density) {
|
|
111
|
-
@include density($theme);
|
|
112
|
-
}
|
|
113
|
-
@if inspection.theme-has($theme, typography) {
|
|
114
|
-
@include typography($theme);
|
|
115
|
-
}
|
|
116
110
|
}
|
|
117
111
|
}
|
|
118
112
|
}
|