@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
|
@@ -1,60 +1,44 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
|
-
@use '../core/theming/theming';
|
|
3
2
|
@use '../core/theming/inspection';
|
|
4
3
|
@use '../core/typography/typography';
|
|
5
|
-
@use '../core/style/sass-utils';
|
|
6
4
|
@use './m2-timepicker';
|
|
7
5
|
@use './m3-timepicker';
|
|
8
6
|
@use '../core/tokens/token-utils';
|
|
9
7
|
|
|
10
|
-
/// Outputs base theme styles (styles not dependent on the color, typography, or density settings)
|
|
11
|
-
/// for the mat-timepicker.
|
|
12
|
-
/// @param {Map} $theme The theme to generate base styles for.
|
|
13
8
|
@mixin base($theme) {
|
|
9
|
+
$tokens: m2-timepicker.get-unthemable-tokens();
|
|
14
10
|
@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-timepicker.get-unthemable-tokens());
|
|
19
|
-
}
|
|
11
|
+
$tokens: map.get(m3-timepicker.get-tokens($theme), base);
|
|
20
12
|
}
|
|
13
|
+
|
|
14
|
+
@include token-utils.values($tokens);
|
|
21
15
|
}
|
|
22
16
|
|
|
23
|
-
/// Outputs color theme styles for the mat-timepicker.
|
|
24
|
-
/// @param {Map} $theme The theme to generate color styles for.
|
|
25
17
|
@mixin color($theme) {
|
|
18
|
+
$tokens: m2-timepicker.get-color-tokens($theme);
|
|
26
19
|
@if inspection.get-theme-version($theme) == 1 {
|
|
27
|
-
|
|
28
|
-
map.get(m3-timepicker.get-tokens($theme), color));
|
|
29
|
-
} @else {
|
|
30
|
-
@include sass-utils.current-selector-or-root() {
|
|
31
|
-
@include token-utils.create-token-values-mixed(m2-timepicker.get-color-tokens($theme));
|
|
32
|
-
}
|
|
20
|
+
$tokens: map.get(m3-timepicker.get-tokens($theme), color);
|
|
33
21
|
}
|
|
22
|
+
|
|
23
|
+
@include token-utils.values($tokens);
|
|
34
24
|
}
|
|
35
25
|
|
|
36
|
-
/// Outputs typography theme styles for the mat-timepicker.
|
|
37
|
-
/// @param {Map} $theme The theme to generate typography styles for.
|
|
38
26
|
@mixin typography($theme) {
|
|
27
|
+
$tokens: m2-timepicker.get-typography-tokens($theme);
|
|
39
28
|
@if inspection.get-theme-version($theme) == 1 {
|
|
40
|
-
|
|
41
|
-
} @else {
|
|
42
|
-
@include sass-utils.current-selector-or-root() {
|
|
43
|
-
@include token-utils.create-token-values-mixed(m2-timepicker.get-typography-tokens($theme));
|
|
44
|
-
}
|
|
29
|
+
$tokens: map.get(m3-timepicker.get-tokens($theme), typography);
|
|
45
30
|
}
|
|
31
|
+
|
|
32
|
+
@include token-utils.values($tokens);
|
|
46
33
|
}
|
|
47
34
|
|
|
48
|
-
/// Outputs density theme styles for the mat-timepicker.
|
|
49
|
-
/// @param {Map} $theme The theme to generate density styles for.
|
|
50
35
|
@mixin density($theme) {
|
|
36
|
+
$tokens: m2-timepicker.get-density-tokens($theme);
|
|
51
37
|
@if inspection.get-theme-version($theme) == 1 {
|
|
52
|
-
|
|
53
|
-
} @else {
|
|
54
|
-
@include sass-utils.current-selector-or-root() {
|
|
55
|
-
@include token-utils.create-token-values-mixed(m2-timepicker.get-density-tokens($theme));
|
|
56
|
-
}
|
|
38
|
+
$tokens: map.get(m3-timepicker.get-tokens($theme), density);
|
|
57
39
|
}
|
|
40
|
+
|
|
41
|
+
@include token-utils.values($tokens);
|
|
58
42
|
}
|
|
59
43
|
|
|
60
44
|
/// Defines the tokens that will be available in the `overrides` mixin and for docs extraction.
|
|
@@ -77,23 +61,21 @@
|
|
|
77
61
|
/// @param {Map} $theme The theme to generate styles for.
|
|
78
62
|
/// @param {String} $color-variant The color variant to use for the component
|
|
79
63
|
@mixin theme($theme, $color-variant: null) {
|
|
80
|
-
@
|
|
81
|
-
@
|
|
82
|
-
|
|
64
|
+
@if inspection.get-theme-version($theme) == 1 {
|
|
65
|
+
@include base($theme);
|
|
66
|
+
@include color($theme);
|
|
67
|
+
@include density($theme);
|
|
68
|
+
@include typography($theme);
|
|
69
|
+
} @else {
|
|
70
|
+
@include base($theme);
|
|
71
|
+
@if inspection.theme-has($theme, color) {
|
|
83
72
|
@include color($theme);
|
|
73
|
+
}
|
|
74
|
+
@if inspection.theme-has($theme, density) {
|
|
84
75
|
@include density($theme);
|
|
76
|
+
}
|
|
77
|
+
@if inspection.theme-has($theme, typography) {
|
|
85
78
|
@include typography($theme);
|
|
86
|
-
} @else {
|
|
87
|
-
@include base($theme);
|
|
88
|
-
@if inspection.theme-has($theme, color) {
|
|
89
|
-
@include color($theme);
|
|
90
|
-
}
|
|
91
|
-
@if inspection.theme-has($theme, density) {
|
|
92
|
-
@include density($theme);
|
|
93
|
-
}
|
|
94
|
-
@if inspection.theme-has($theme, typography) {
|
|
95
|
-
@include typography($theme);
|
|
96
|
-
}
|
|
97
79
|
}
|
|
98
80
|
}
|
|
99
81
|
}
|
package/toolbar/_m2-toolbar.scss
CHANGED
|
@@ -20,14 +20,13 @@
|
|
|
20
20
|
|
|
21
21
|
// Tokens that can be configured through Angular Material's typography theming API.
|
|
22
22
|
@function get-typography-tokens($theme) {
|
|
23
|
+
$system: m2-utils.get-system($theme);
|
|
23
24
|
@return (
|
|
24
|
-
toolbar-title-text-font:
|
|
25
|
-
toolbar-title-text-line-height:
|
|
26
|
-
|
|
27
|
-
toolbar-title-text-
|
|
28
|
-
toolbar-title-text-
|
|
29
|
-
inspection.get-theme-typography($theme, headline-6, letter-spacing),
|
|
30
|
-
toolbar-title-text-weight: inspection.get-theme-typography($theme, headline-6, font-weight),
|
|
25
|
+
toolbar-title-text-font: map.get($system, title-small-font),
|
|
26
|
+
toolbar-title-text-line-height: map.get($system, title-small-line-height),
|
|
27
|
+
toolbar-title-text-size: map.get($system, title-small-size),
|
|
28
|
+
toolbar-title-text-tracking: map.get($system, title-small-tracking),
|
|
29
|
+
toolbar-title-text-weight: map.get($system, title-small-weight),
|
|
31
30
|
);
|
|
32
31
|
}
|
|
33
32
|
|
|
@@ -1,70 +1,81 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
|
-
@use '../core/style/sass-utils';
|
|
3
2
|
@use '../core/theming/inspection';
|
|
4
|
-
@use '../core/theming/theming';
|
|
5
3
|
@use '../core/tokens/token-utils';
|
|
6
4
|
@use '../core/typography/typography';
|
|
7
5
|
@use './m2-toolbar';
|
|
8
6
|
@use './m3-toolbar';
|
|
9
7
|
|
|
10
8
|
@mixin _palette-styles($theme, $palette-name) {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
$text-color: inspection.get-theme-color($theme, $palette-name, default-contrast)
|
|
15
|
-
)
|
|
9
|
+
$tokens: m2-toolbar.private-get-color-palette-color-tokens(
|
|
10
|
+
$background-color: inspection.get-theme-color($theme, $palette-name),
|
|
11
|
+
$text-color: inspection.get-theme-color($theme, $palette-name, default-contrast)
|
|
16
12
|
);
|
|
13
|
+
@include token-utils.values($tokens);
|
|
17
14
|
}
|
|
18
15
|
|
|
19
16
|
@mixin base($theme) {
|
|
17
|
+
$tokens: m2-toolbar.get-unthemable-tokens();
|
|
18
|
+
@if inspection.get-theme-version($theme) == 1 {
|
|
19
|
+
$tokens: map.get(m3-toolbar.get-tokens($theme), base);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
@include token-utils.values($tokens);
|
|
20
23
|
}
|
|
21
24
|
|
|
22
25
|
@mixin color($theme) {
|
|
26
|
+
$tokens: m2-toolbar.get-color-tokens($theme);
|
|
23
27
|
@if inspection.get-theme-version($theme) == 1 {
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
28
|
+
$tokens: map.get(m3-toolbar.get-tokens($theme), color);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@include token-utils.values($tokens);
|
|
29
32
|
|
|
33
|
+
@if inspection.get-theme-version($theme) != 1 {
|
|
30
34
|
.mat-toolbar {
|
|
31
35
|
&.mat-primary {
|
|
32
|
-
|
|
36
|
+
$tokens: m2-toolbar.private-get-color-palette-color-tokens(
|
|
37
|
+
$background-color: inspection.get-theme-color($theme, primary),
|
|
38
|
+
$text-color: inspection.get-theme-color($theme, primary, default-contrast)
|
|
39
|
+
);
|
|
40
|
+
@include token-utils.values($tokens);
|
|
33
41
|
}
|
|
34
42
|
|
|
35
43
|
&.mat-accent {
|
|
36
|
-
|
|
44
|
+
$tokens: m2-toolbar.private-get-color-palette-color-tokens(
|
|
45
|
+
$background-color: inspection.get-theme-color($theme, accent),
|
|
46
|
+
$text-color: inspection.get-theme-color($theme, accent, default-contrast)
|
|
47
|
+
);
|
|
48
|
+
@include token-utils.values($tokens);
|
|
37
49
|
}
|
|
38
50
|
|
|
39
51
|
&.mat-warn {
|
|
40
|
-
|
|
52
|
+
$tokens: m2-toolbar.private-get-color-palette-color-tokens(
|
|
53
|
+
$background-color: inspection.get-theme-color($theme, warn),
|
|
54
|
+
$text-color: inspection.get-theme-color($theme, warn, default-contrast)
|
|
55
|
+
);
|
|
56
|
+
@include token-utils.values($tokens);
|
|
41
57
|
}
|
|
42
58
|
}
|
|
43
59
|
}
|
|
44
60
|
}
|
|
45
61
|
|
|
46
|
-
@mixin typography($theme) {
|
|
47
|
-
|
|
48
|
-
@
|
|
49
|
-
|
|
50
|
-
// TODO(mmalerba): Stop calling this and resolve resulting screen diffs.
|
|
51
|
-
$theme: inspection.private-get-typography-back-compat-theme($theme);
|
|
52
|
-
|
|
53
|
-
@include sass-utils.current-selector-or-root() {
|
|
54
|
-
@include token-utils.create-token-values-mixed(m2-toolbar.get-typography-tokens($theme));
|
|
62
|
+
@mixin typography($theme) {
|
|
63
|
+
$tokens: m2-toolbar.get-typography-tokens($theme);
|
|
64
|
+
@if inspection.get-theme-version($theme) == 1 {
|
|
65
|
+
$tokens: map.get(m3-toolbar.get-tokens($theme), typography);
|
|
55
66
|
}
|
|
67
|
+
|
|
68
|
+
@include token-utils.values($tokens);
|
|
56
69
|
}
|
|
57
|
-
}
|
|
58
70
|
|
|
59
|
-
@mixin density($theme) {
|
|
60
|
-
|
|
61
|
-
@
|
|
62
|
-
|
|
63
|
-
@include sass-utils.current-selector-or-root() {
|
|
64
|
-
@include token-utils.create-token-values-mixed(m2-toolbar.get-density-tokens($theme));
|
|
71
|
+
@mixin density($theme) {
|
|
72
|
+
$tokens: m2-toolbar.get-density-tokens($theme);
|
|
73
|
+
@if inspection.get-theme-version($theme) == 1 {
|
|
74
|
+
$tokens: map.get(m3-toolbar.get-tokens($theme), density);
|
|
65
75
|
}
|
|
76
|
+
|
|
77
|
+
@include token-utils.values($tokens);
|
|
66
78
|
}
|
|
67
|
-
}
|
|
68
79
|
|
|
69
80
|
/// Defines the tokens that will be available in the `overrides` mixin and for docs extraction.
|
|
70
81
|
@function _define-overrides() {
|
|
@@ -83,23 +94,21 @@
|
|
|
83
94
|
}
|
|
84
95
|
|
|
85
96
|
@mixin theme($theme) {
|
|
86
|
-
@
|
|
87
|
-
@
|
|
88
|
-
|
|
97
|
+
@if inspection.get-theme-version($theme) == 1 {
|
|
98
|
+
@include base($theme);
|
|
99
|
+
@include color($theme);
|
|
100
|
+
@include density($theme);
|
|
101
|
+
@include typography($theme);
|
|
102
|
+
} @else {
|
|
103
|
+
@include base($theme);
|
|
104
|
+
@if inspection.theme-has($theme, color) {
|
|
89
105
|
@include color($theme);
|
|
106
|
+
}
|
|
107
|
+
@if inspection.theme-has($theme, density) {
|
|
90
108
|
@include density($theme);
|
|
109
|
+
}
|
|
110
|
+
@if inspection.theme-has($theme, typography) {
|
|
91
111
|
@include typography($theme);
|
|
92
|
-
} @else {
|
|
93
|
-
@include base($theme);
|
|
94
|
-
@if inspection.theme-has($theme, color) {
|
|
95
|
-
@include color($theme);
|
|
96
|
-
}
|
|
97
|
-
@if inspection.theme-has($theme, density) {
|
|
98
|
-
@include density($theme);
|
|
99
|
-
}
|
|
100
|
-
@if inspection.theme-has($theme, typography) {
|
|
101
|
-
@include typography($theme);
|
|
102
|
-
}
|
|
103
112
|
}
|
|
104
113
|
}
|
|
105
114
|
}
|
package/tooltip/_m2-tooltip.scss
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
@use '../core/theming/inspection';
|
|
2
1
|
@use '../core/tokens/m2-utils';
|
|
3
2
|
@use 'sass:map';
|
|
4
3
|
|
|
@@ -27,12 +26,12 @@
|
|
|
27
26
|
|
|
28
27
|
// Tokens that can be configured through Angular Material's typography theming API.
|
|
29
28
|
@function get-typography-tokens($theme) {
|
|
29
|
+
$system: m2-utils.get-system($theme);
|
|
30
30
|
@return (
|
|
31
|
-
tooltip-supporting-text-font:
|
|
32
|
-
tooltip-supporting-text-size:
|
|
33
|
-
tooltip-supporting-text-weight:
|
|
34
|
-
tooltip-supporting-text-tracking:
|
|
35
|
-
inspection.get-theme-typography($theme, caption, letter-spacing),
|
|
31
|
+
tooltip-supporting-text-font: map.get($system, body-small-font),
|
|
32
|
+
tooltip-supporting-text-size: map.get($system, body-small-size),
|
|
33
|
+
tooltip-supporting-text-weight: map.get($system, body-small-weight),
|
|
34
|
+
tooltip-supporting-text-tracking: map.get($system, body-small-tracking),
|
|
36
35
|
);
|
|
37
36
|
}
|
|
38
37
|
|
|
@@ -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';
|
|
@@ -8,44 +6,39 @@
|
|
|
8
6
|
@use 'sass:map';
|
|
9
7
|
|
|
10
8
|
@mixin base($theme) {
|
|
9
|
+
$tokens: m2-tooltip.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-tooltip.get-unthemable-tokens());
|
|
17
|
-
}
|
|
11
|
+
$tokens: map.get(m3-tooltip.get-tokens($theme), base);
|
|
18
12
|
}
|
|
13
|
+
|
|
14
|
+
@include token-utils.values($tokens);
|
|
19
15
|
}
|
|
20
16
|
|
|
21
17
|
@mixin color($theme) {
|
|
18
|
+
$tokens: m2-tooltip.get-color-tokens($theme);
|
|
22
19
|
@if inspection.get-theme-version($theme) == 1 {
|
|
23
|
-
|
|
24
|
-
} @else {
|
|
25
|
-
@include sass-utils.current-selector-or-root() {
|
|
26
|
-
@include token-utils.create-token-values-mixed(m2-tooltip.get-color-tokens($theme));
|
|
27
|
-
}
|
|
20
|
+
$tokens: map.get(m3-tooltip.get-tokens($theme), color);
|
|
28
21
|
}
|
|
22
|
+
|
|
23
|
+
@include token-utils.values($tokens);
|
|
29
24
|
}
|
|
30
25
|
|
|
31
26
|
@mixin typography($theme) {
|
|
27
|
+
$tokens: m2-tooltip.get-typography-tokens($theme);
|
|
32
28
|
@if inspection.get-theme-version($theme) == 1 {
|
|
33
|
-
|
|
34
|
-
} @else {
|
|
35
|
-
@include sass-utils.current-selector-or-root() {
|
|
36
|
-
@include token-utils.create-token-values-mixed(m2-tooltip.get-typography-tokens($theme));
|
|
37
|
-
}
|
|
29
|
+
$tokens: map.get(m3-tooltip.get-tokens($theme), typography);
|
|
38
30
|
}
|
|
31
|
+
|
|
32
|
+
@include token-utils.values($tokens);
|
|
39
33
|
}
|
|
40
34
|
|
|
41
35
|
@mixin density($theme) {
|
|
36
|
+
$tokens: m2-tooltip.get-density-tokens($theme);
|
|
42
37
|
@if inspection.get-theme-version($theme) == 1 {
|
|
43
|
-
|
|
44
|
-
} @else {
|
|
45
|
-
@include sass-utils.current-selector-or-root() {
|
|
46
|
-
@include token-utils.create-token-values-mixed(m2-tooltip.get-density-tokens($theme));
|
|
47
|
-
}
|
|
38
|
+
$tokens: map.get(m3-tooltip.get-tokens($theme), density);
|
|
48
39
|
}
|
|
40
|
+
|
|
41
|
+
@include token-utils.values($tokens);
|
|
49
42
|
}
|
|
50
43
|
|
|
51
44
|
/// Defines the tokens that will be available in the `overrides` mixin and for docs extraction.
|
|
@@ -63,23 +56,21 @@
|
|
|
63
56
|
}
|
|
64
57
|
|
|
65
58
|
@mixin theme($theme) {
|
|
66
|
-
@
|
|
67
|
-
@
|
|
68
|
-
|
|
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) {
|
|
69
67
|
@include color($theme);
|
|
68
|
+
}
|
|
69
|
+
@if inspection.theme-has($theme, density) {
|
|
70
70
|
@include density($theme);
|
|
71
|
+
}
|
|
72
|
+
@if inspection.theme-has($theme, typography) {
|
|
71
73
|
@include typography($theme);
|
|
72
|
-
} @else {
|
|
73
|
-
@include base($theme);
|
|
74
|
-
@if inspection.theme-has($theme, color) {
|
|
75
|
-
@include color($theme);
|
|
76
|
-
}
|
|
77
|
-
@if inspection.theme-has($theme, density) {
|
|
78
|
-
@include density($theme);
|
|
79
|
-
}
|
|
80
|
-
@if inspection.theme-has($theme, typography) {
|
|
81
|
-
@include typography($theme);
|
|
82
|
-
}
|
|
83
74
|
}
|
|
84
75
|
}
|
|
85
76
|
}
|
package/tree/_m2-tree.scss
CHANGED
|
@@ -21,10 +21,11 @@
|
|
|
21
21
|
|
|
22
22
|
// Tokens that can be configured through Angular Material's typography theming API.
|
|
23
23
|
@function get-typography-tokens($theme) {
|
|
24
|
+
$system: m2-utils.get-system($theme);
|
|
24
25
|
@return (
|
|
25
|
-
tree-node-text-font:
|
|
26
|
-
tree-node-text-size:
|
|
27
|
-
tree-node-text-weight:
|
|
26
|
+
tree-node-text-font: map.get($system, body-medium-font),
|
|
27
|
+
tree-node-text-size: map.get($system, body-medium-size),
|
|
28
|
+
tree-node-text-weight: map.get($system, body-medium-weight),
|
|
28
29
|
|
|
29
30
|
// TODO(crisbeto): provide tokens for line height and letter spacing to match other components.
|
|
30
31
|
);
|
package/tree/_tree-theme.scss
CHANGED
|
@@ -1,52 +1,44 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
|
-
@use '../core/theming/theming';
|
|
3
2
|
@use '../core/theming/inspection';
|
|
4
3
|
@use '../core/typography/typography';
|
|
5
|
-
@use '../core/style/sass-utils';
|
|
6
4
|
@use '../core/tokens/token-utils';
|
|
7
5
|
@use './m2-tree';
|
|
8
6
|
@use './m3-tree';
|
|
9
7
|
|
|
10
8
|
@mixin base($theme) {
|
|
9
|
+
$tokens: m2-tree.get-unthemable-tokens();
|
|
11
10
|
@if inspection.get-theme-version($theme) == 1 {
|
|
12
|
-
|
|
13
|
-
} @else {
|
|
11
|
+
$tokens: map.get(m3-tree.get-tokens($theme), base);
|
|
14
12
|
}
|
|
13
|
+
|
|
14
|
+
@include token-utils.values($tokens);
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
@mixin color($theme) {
|
|
18
|
+
$tokens: m2-tree.get-color-tokens($theme);
|
|
18
19
|
@if inspection.get-theme-version($theme) == 1 {
|
|
19
|
-
|
|
20
|
-
} @else {
|
|
21
|
-
@include sass-utils.current-selector-or-root() {
|
|
22
|
-
@include token-utils.create-token-values-mixed(m2-tree.get-color-tokens($theme));
|
|
23
|
-
}
|
|
20
|
+
$tokens: map.get(m3-tree.get-tokens($theme), color);
|
|
24
21
|
}
|
|
22
|
+
|
|
23
|
+
@include token-utils.values($tokens);
|
|
25
24
|
}
|
|
26
25
|
|
|
27
26
|
@mixin typography($theme) {
|
|
27
|
+
$tokens: m2-tree.get-typography-tokens($theme);
|
|
28
28
|
@if inspection.get-theme-version($theme) == 1 {
|
|
29
|
-
|
|
30
|
-
} @else {
|
|
31
|
-
// TODO(mmalerba): Stop calling this and resolve resulting screen diffs.
|
|
32
|
-
$theme: inspection.private-get-typography-back-compat-theme($theme);
|
|
33
|
-
|
|
34
|
-
@include sass-utils.current-selector-or-root() {
|
|
35
|
-
@include token-utils.create-token-values-mixed(m2-tree.get-typography-tokens($theme));
|
|
36
|
-
}
|
|
29
|
+
$tokens: map.get(m3-tree.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-tree.get-density-tokens($theme);
|
|
41
37
|
@if inspection.get-theme-version($theme) == 1 {
|
|
42
|
-
|
|
43
|
-
} @else {
|
|
44
|
-
$density-scale: inspection.get-theme-density($theme);
|
|
45
|
-
|
|
46
|
-
@include sass-utils.current-selector-or-root() {
|
|
47
|
-
@include token-utils.create-token-values-mixed(m2-tree.get-density-tokens($theme));
|
|
48
|
-
}
|
|
38
|
+
$tokens: map.get(m3-tree.get-tokens($theme), density);
|
|
49
39
|
}
|
|
40
|
+
|
|
41
|
+
@include token-utils.values($tokens);
|
|
50
42
|
}
|
|
51
43
|
|
|
52
44
|
/// Defines the tokens that will be available in the `overrides` mixin and for docs extraction.
|
|
@@ -64,23 +56,21 @@
|
|
|
64
56
|
}
|
|
65
57
|
|
|
66
58
|
@mixin theme($theme) {
|
|
67
|
-
@
|
|
68
|
-
@
|
|
69
|
-
|
|
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) {
|
|
70
67
|
@include color($theme);
|
|
68
|
+
}
|
|
69
|
+
@if inspection.theme-has($theme, density) {
|
|
71
70
|
@include density($theme);
|
|
71
|
+
}
|
|
72
|
+
@if inspection.theme-has($theme, typography) {
|
|
72
73
|
@include typography($theme);
|
|
73
|
-
} @else {
|
|
74
|
-
@include base($theme);
|
|
75
|
-
@if inspection.theme-has($theme, color) {
|
|
76
|
-
@include color($theme);
|
|
77
|
-
}
|
|
78
|
-
@if inspection.theme-has($theme, density) {
|
|
79
|
-
@include density($theme);
|
|
80
|
-
}
|
|
81
|
-
@if inspection.theme-has($theme, typography) {
|
|
82
|
-
@include typography($theme);
|
|
83
|
-
}
|
|
84
74
|
}
|
|
85
75
|
}
|
|
86
76
|
}
|