@angular/material 17.0.0-next.1 → 17.0.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 +12 -18
- package/autocomplete/index.d.ts +15 -24
- package/badge/_badge-theme.scss +15 -27
- package/badge/index.d.ts +9 -17
- package/bottom-sheet/_bottom-sheet-theme.scss +13 -22
- package/button-toggle/_button-toggle-theme.scss +17 -28
- package/button-toggle/index.d.ts +15 -18
- package/checkbox/index.d.ts +21 -27
- package/chips/_chips-theme.scss +18 -56
- package/core/color/_all-color.scss +7 -15
- package/core/density/private/_all-density.scss +34 -39
- package/core/focus-indicators/_focus-indicators-theme.scss +6 -8
- package/core/focus-indicators/_private.scss +22 -26
- package/core/index.d.ts +7 -11
- package/core/style/_form-common.scss +7 -7
- package/core/style/_private.scss +2 -4
- package/core/testing/index.d.ts +2 -1
- package/core/theming/_all-theme.scss +41 -41
- package/core/theming/_inspection.scss +47 -0
- package/core/theming/_m2-inspection.scss +57 -0
- package/core/theming/_theming.scss +0 -14
- package/core/tokens/m2/mat/_autocomplete.scss +5 -8
- package/core/tokens/m2/mat/_badge.scss +12 -15
- package/core/tokens/m2/mat/_bottom-sheet.scss +11 -17
- package/core/tokens/m2/mat/_datepicker.scss +28 -38
- package/core/tokens/m2/mat/_divider.scss +5 -8
- package/core/tokens/m2/mat/_expansion.scss +24 -28
- package/core/tokens/m2/mat/_grid-list.scss +8 -8
- package/core/tokens/m2/mat/_icon.scss +3 -3
- package/core/tokens/m2/mat/_legacy-button-toggle.scss +15 -19
- package/core/tokens/m2/mat/_menu.scss +12 -17
- package/core/tokens/m2/mat/_select.scss +15 -29
- package/core/tokens/m2/mat/_sidenav.scss +12 -14
- package/core/tokens/m2/mat/_snack-bar.scss +7 -8
- package/core/tokens/m2/mat/_standard-button-toggle.scss +23 -22
- package/core/tokens/m2/mat/_stepper.scss +30 -33
- package/core/tokens/m2/mat/_tab-header-with-background.scss +6 -8
- package/core/tokens/m2/mat/_tab-header.scss +13 -18
- package/core/tokens/m2/mat/_table.scss +19 -23
- package/core/tokens/m2/mat/_toolbar.scss +12 -16
- package/core/tokens/m2/mdc/_chip.scss +38 -24
- package/core/tokens/m2/mdc/_circular-progress.scss +5 -6
- package/core/tokens/m2/mdc/_dialog.scss +16 -30
- package/core/tokens/m2/mdc/_icon-button.scss +2 -2
- package/core/tokens/m2/mdc/_plain-tooltip.scss +9 -22
- package/core/tokens/m2/mdc/_snack-bar.scss +10 -23
- package/core/tokens/m2/mdc/_tab-indicator.scss +5 -8
- package/core/tokens/m2/mdc/_tab.scss +5 -4
- package/core/typography/_all-typography.scss +44 -47
- package/core/typography/_typography.scss +32 -155
- package/core/typography/_versioning.scss +7 -2
- package/datepicker/_datepicker-theme.scss +20 -34
- package/dialog/_dialog-theme.scss +14 -25
- package/dialog/_mdc-dialog-structure-overrides.scss +12 -10
- package/dialog/index.d.ts +2 -0
- package/divider/_divider-theme.scss +12 -18
- package/esm2022/autocomplete/autocomplete-trigger.mjs +5 -17
- package/esm2022/autocomplete/autocomplete.mjs +23 -50
- package/esm2022/badge/badge.mjs +11 -29
- package/esm2022/button-toggle/button-toggle.mjs +25 -33
- package/esm2022/checkbox/checkbox.mjs +32 -39
- package/esm2022/core/option/optgroup.mjs +10 -11
- package/esm2022/core/option/option.mjs +6 -6
- package/esm2022/core/testing/option-harness.mjs +3 -3
- package/esm2022/core/version.mjs +1 -1
- package/esm2022/dialog/dialog-container.mjs +16 -3
- package/esm2022/menu/menu-item.mjs +15 -11
- package/esm2022/menu/menu.mjs +9 -22
- package/esm2022/slide-toggle/slide-toggle.mjs +33 -37
- package/esm2022/tabs/tab-group.mjs +3 -3
- package/expansion/_expansion-theme.scss +16 -24
- package/fesm2022/autocomplete.mjs +25 -63
- package/fesm2022/autocomplete.mjs.map +1 -1
- package/fesm2022/badge.mjs +11 -28
- package/fesm2022/badge.mjs.map +1 -1
- package/fesm2022/button-toggle.mjs +25 -32
- package/fesm2022/button-toggle.mjs.map +1 -1
- package/fesm2022/checkbox.mjs +31 -38
- package/fesm2022/checkbox.mjs.map +1 -1
- package/fesm2022/core/testing.mjs +2 -2
- package/fesm2022/core/testing.mjs.map +1 -1
- package/fesm2022/core.mjs +14 -13
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/dialog.mjs +15 -2
- package/fesm2022/dialog.mjs.map +1 -1
- package/fesm2022/menu.mjs +23 -31
- package/fesm2022/menu.mjs.map +1 -1
- package/fesm2022/slide-toggle.mjs +33 -36
- package/fesm2022/slide-toggle.mjs.map +1 -1
- package/fesm2022/tabs.mjs +2 -2
- package/fesm2022/tabs.mjs.map +1 -1
- package/form-field/_form-field-sizing.scss +1 -1
- package/grid-list/_grid-list-theme.scss +12 -19
- package/icon/_icon-theme.scss +17 -25
- package/list/_list-theme.scss +1 -1
- package/menu/_menu-theme.scss +13 -22
- package/menu/index.d.ts +12 -18
- package/package.json +2 -2
- 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-spinner/_progress-spinner-theme.scss +16 -22
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-add/index.mjs +1 -1
- package/schematics/ng-generate/mdc-migration/index_bundled.js +44 -44
- package/schematics/ng-generate/mdc-migration/index_bundled.js.map +1 -1
- package/schematics/ng-update/index_bundled.js +25 -25
- package/select/_select-theme.scss +17 -31
- package/sidenav/_sidenav-theme.scss +12 -18
- package/slide-toggle/index.d.ts +20 -23
- package/snack-bar/_snack-bar-theme.scss +15 -24
- package/sort/_sort-theme.scss +13 -22
- package/stepper/_stepper-theme.scss +16 -34
- package/table/_table-theme.scss +14 -25
- package/tabs/_tabs-theme.scss +31 -45
- package/toolbar/_toolbar-theme.scss +22 -31
- package/tooltip/_tooltip-theme.scss +15 -23
- package/tree/_tree-theme.scss +20 -29
- package/core/typography/_typography-deprecated.scss +0 -39
package/table/_table-theme.scss
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
@use '../core/tokens/m2/mat/table' as tokens-mat-table;
|
|
2
2
|
@use '../core/theming/theming';
|
|
3
|
+
@use '../core/theming/inspection';
|
|
3
4
|
@use '../core/typography/typography';
|
|
4
5
|
@use '../core/tokens/token-utils';
|
|
5
6
|
|
|
@@ -14,49 +15,37 @@
|
|
|
14
15
|
}
|
|
15
16
|
}
|
|
16
17
|
|
|
17
|
-
@mixin color($
|
|
18
|
-
$config: theming.get-color-config($config-or-theme);
|
|
19
|
-
|
|
18
|
+
@mixin color($theme) {
|
|
20
19
|
@include _output-tokens {
|
|
21
20
|
@include token-utils.create-token-values(tokens-mat-table.$prefix,
|
|
22
|
-
tokens-mat-table.get-color-tokens($
|
|
21
|
+
tokens-mat-table.get-color-tokens($theme));
|
|
23
22
|
}
|
|
24
23
|
}
|
|
25
24
|
|
|
26
|
-
@mixin typography($
|
|
27
|
-
$config: typography.private-typography-to-2018-config(
|
|
28
|
-
theming.get-typography-config($config-or-theme));
|
|
29
|
-
|
|
25
|
+
@mixin typography($theme) {
|
|
30
26
|
@include _output-tokens {
|
|
31
27
|
@include token-utils.create-token-values(tokens-mat-table.$prefix,
|
|
32
|
-
tokens-mat-table.get-typography-tokens($
|
|
28
|
+
tokens-mat-table.get-typography-tokens($theme));
|
|
33
29
|
}
|
|
34
30
|
}
|
|
35
31
|
|
|
36
|
-
@mixin density($
|
|
37
|
-
$density-scale: theming.get-density-config($config-or-theme);
|
|
38
|
-
|
|
32
|
+
@mixin density($theme) {
|
|
39
33
|
@include _output-tokens {
|
|
40
34
|
@include token-utils.create-token-values(tokens-mat-table.$prefix,
|
|
41
|
-
tokens-mat-table.get-density-tokens($
|
|
35
|
+
tokens-mat-table.get-density-tokens($theme));
|
|
42
36
|
}
|
|
43
37
|
}
|
|
44
38
|
|
|
45
|
-
@mixin theme($theme
|
|
46
|
-
$theme: theming.private-legacy-get-theme($theme-or-color-config);
|
|
39
|
+
@mixin theme($theme) {
|
|
47
40
|
@include theming.private-check-duplicate-theme-styles($theme, 'mat-table') {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
$typography: theming.get-typography-config($theme);
|
|
51
|
-
|
|
52
|
-
@if $color != null {
|
|
53
|
-
@include color($color);
|
|
41
|
+
@if inspection.theme-has($theme, color) {
|
|
42
|
+
@include color($theme);
|
|
54
43
|
}
|
|
55
|
-
@if $density
|
|
56
|
-
@include density($
|
|
44
|
+
@if inspection.theme-has($theme, density) {
|
|
45
|
+
@include density($theme);
|
|
57
46
|
}
|
|
58
|
-
@if $typography
|
|
59
|
-
@include typography($
|
|
47
|
+
@if inspection.theme-has($theme, typography) {
|
|
48
|
+
@include typography($theme);
|
|
60
49
|
}
|
|
61
50
|
}
|
|
62
51
|
}
|
package/tabs/_tabs-theme.scss
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
@use 'sass:map';
|
|
2
1
|
@use '@material/tab-indicator/tab-indicator-theme' as mdc-tab-indicator-theme;
|
|
3
2
|
@use '@material/tab/tab-theme' as mdc-tab-theme;
|
|
4
3
|
@use '../core/tokens/m2/mdc/tab' as tokens-mdc-tab;
|
|
@@ -6,99 +5,86 @@
|
|
|
6
5
|
@use '../core/tokens/m2/mat/tab-header' as tokens-mat-tab-header;
|
|
7
6
|
@use '../core/tokens/m2/mat/tab-header-with-background' as tokens-mat-tab-header-with-background;
|
|
8
7
|
@use '../core/theming/theming';
|
|
8
|
+
@use '../core/theming/inspection';
|
|
9
9
|
@use '../core/typography/typography';
|
|
10
10
|
@use '../core/tokens/token-utils';
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
@mixin color($config-or-theme) {
|
|
14
|
-
$config: theming.get-color-config($config-or-theme);
|
|
15
|
-
|
|
12
|
+
@mixin color($theme) {
|
|
16
13
|
.mat-mdc-tab-group, .mat-mdc-tab-nav-bar {
|
|
17
|
-
@include _palette-styles($
|
|
14
|
+
@include _palette-styles($theme, primary);
|
|
18
15
|
|
|
19
16
|
&.mat-accent {
|
|
20
|
-
@include _palette-styles($
|
|
17
|
+
@include _palette-styles($theme, accent);
|
|
21
18
|
}
|
|
22
19
|
|
|
23
20
|
&.mat-warn {
|
|
24
|
-
@include _palette-styles($
|
|
21
|
+
@include _palette-styles($theme, warn);
|
|
25
22
|
}
|
|
26
23
|
|
|
27
24
|
&.mat-background-primary {
|
|
28
|
-
@include _background-styles($
|
|
25
|
+
@include _background-styles($theme, primary);
|
|
29
26
|
}
|
|
30
27
|
|
|
31
28
|
&.mat-background-accent {
|
|
32
|
-
@include _background-styles($
|
|
29
|
+
@include _background-styles($theme, accent);
|
|
33
30
|
}
|
|
34
31
|
|
|
35
32
|
&.mat-background-warn {
|
|
36
|
-
@include _background-styles($
|
|
33
|
+
@include _background-styles($theme, warn);
|
|
37
34
|
}
|
|
38
35
|
}
|
|
39
36
|
}
|
|
40
37
|
|
|
41
|
-
@mixin _background-styles($
|
|
42
|
-
$config: map.merge($initial-config, (primary: map.get($initial-config, $palette)));
|
|
38
|
+
@mixin _background-styles($theme, $palette-name) {
|
|
43
39
|
@include token-utils.create-token-values(tokens-mat-tab-header-with-background.$prefix,
|
|
44
|
-
tokens-mat-tab-header-with-background.get-color-tokens($
|
|
40
|
+
tokens-mat-tab-header-with-background.get-color-tokens($theme, $palette-name));
|
|
45
41
|
}
|
|
46
42
|
|
|
47
|
-
@mixin _palette-styles($
|
|
48
|
-
$config: map.merge($initial-config, (primary: map.get($initial-config, $palette)));
|
|
43
|
+
@mixin _palette-styles($theme, $palette-name) {
|
|
49
44
|
@include mdc-tab-theme.secondary-navigation-tab-theme(
|
|
50
|
-
tokens-mdc-tab.get-color-tokens($
|
|
45
|
+
tokens-mdc-tab.get-color-tokens($theme, $palette-name));
|
|
51
46
|
@include mdc-tab-indicator-theme.theme(
|
|
52
|
-
tokens-mdc-tab-indicator.get-color-tokens($
|
|
47
|
+
tokens-mdc-tab-indicator.get-color-tokens($theme, $palette-name));
|
|
53
48
|
@include token-utils.create-token-values(tokens-mat-tab-header.$prefix,
|
|
54
|
-
tokens-mat-tab-header.get-color-tokens($
|
|
49
|
+
tokens-mat-tab-header.get-color-tokens($theme, $palette-name));
|
|
55
50
|
}
|
|
56
51
|
|
|
57
|
-
@mixin typography($
|
|
58
|
-
$config: typography.private-typography-to-2018-config(
|
|
59
|
-
theming.get-typography-config($config-or-theme));
|
|
60
|
-
|
|
52
|
+
@mixin typography($theme) {
|
|
61
53
|
.mat-mdc-tab-header {
|
|
62
54
|
@include mdc-tab-theme.secondary-navigation-tab-theme(
|
|
63
|
-
tokens-mdc-tab.get-typography-tokens($
|
|
55
|
+
tokens-mdc-tab.get-typography-tokens($theme));
|
|
64
56
|
@include mdc-tab-indicator-theme.theme(
|
|
65
|
-
tokens-mdc-tab-indicator.get-typography-tokens($
|
|
57
|
+
tokens-mdc-tab-indicator.get-typography-tokens($theme));
|
|
66
58
|
@include token-utils.create-token-values(tokens-mat-tab-header.$prefix,
|
|
67
|
-
tokens-mat-tab-header.get-typography-tokens($
|
|
59
|
+
tokens-mat-tab-header.get-typography-tokens($theme));
|
|
68
60
|
@include token-utils.create-token-values(tokens-mat-tab-header-with-background.$prefix,
|
|
69
|
-
tokens-mat-tab-header-with-background.get-typography-tokens($
|
|
61
|
+
tokens-mat-tab-header-with-background.get-typography-tokens($theme));
|
|
70
62
|
}
|
|
71
63
|
}
|
|
72
64
|
|
|
73
|
-
@mixin density($
|
|
74
|
-
$density-scale: theming.get-density-config($config-or-theme);
|
|
65
|
+
@mixin density($theme) {
|
|
75
66
|
.mat-mdc-tab-header {
|
|
76
67
|
@include mdc-tab-theme.secondary-navigation-tab-theme(
|
|
77
|
-
tokens-mdc-tab.get-density-tokens($
|
|
68
|
+
tokens-mdc-tab.get-density-tokens($theme));
|
|
78
69
|
@include mdc-tab-indicator-theme.theme(
|
|
79
|
-
tokens-mdc-tab-indicator.get-density-tokens($
|
|
70
|
+
tokens-mdc-tab-indicator.get-density-tokens($theme));
|
|
80
71
|
@include token-utils.create-token-values(tokens-mat-tab-header.$prefix,
|
|
81
|
-
tokens-mat-tab-header.get-density-tokens($
|
|
72
|
+
tokens-mat-tab-header.get-density-tokens($theme));
|
|
82
73
|
@include token-utils.create-token-values(tokens-mat-tab-header-with-background.$prefix,
|
|
83
|
-
tokens-mat-tab-header-with-background.get-density-tokens($
|
|
74
|
+
tokens-mat-tab-header-with-background.get-density-tokens($theme));
|
|
84
75
|
}
|
|
85
76
|
}
|
|
86
77
|
|
|
87
|
-
@mixin theme($theme
|
|
88
|
-
$theme: theming.private-legacy-get-theme($theme-or-color-config);
|
|
78
|
+
@mixin theme($theme) {
|
|
89
79
|
@include theming.private-check-duplicate-theme-styles($theme, 'mat-tabs') {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
$typography: theming.get-typography-config($theme);
|
|
93
|
-
|
|
94
|
-
@if $color != null {
|
|
95
|
-
@include color($color);
|
|
80
|
+
@if inspection.theme-has($theme, color) {
|
|
81
|
+
@include color($theme);
|
|
96
82
|
}
|
|
97
|
-
@if $density
|
|
98
|
-
@include density($
|
|
83
|
+
@if inspection.theme-has($theme, density) {
|
|
84
|
+
@include density($theme);
|
|
99
85
|
}
|
|
100
|
-
@if $typography
|
|
101
|
-
@include typography($
|
|
86
|
+
@if inspection.theme-has($theme, typography) {
|
|
87
|
+
@include typography($theme);
|
|
102
88
|
}
|
|
103
89
|
}
|
|
104
90
|
}
|
|
@@ -1,77 +1,68 @@
|
|
|
1
|
-
@use 'sass:map';
|
|
2
1
|
@use '../core/theming/theming';
|
|
2
|
+
@use '../core/theming/inspection';
|
|
3
3
|
@use '../core/typography/typography';
|
|
4
4
|
@use '../core/tokens/m2/mat/toolbar' as tokens-mat-toolbar;
|
|
5
5
|
@use '../core/tokens/token-utils';
|
|
6
6
|
@use '../core/style/sass-utils';
|
|
7
7
|
|
|
8
|
-
@mixin _palette-styles($palette) {
|
|
8
|
+
@mixin _palette-styles($theme, $palette-name) {
|
|
9
9
|
@include token-utils.create-token-values(
|
|
10
10
|
tokens-mat-toolbar.$prefix,
|
|
11
11
|
tokens-mat-toolbar.private-get-color-palette-color-tokens(
|
|
12
|
-
$background-color:
|
|
13
|
-
$text-color:
|
|
12
|
+
$background-color: inspection.get-theme-color($theme, $palette-name),
|
|
13
|
+
$text-color: inspection.get-theme-color($theme, $palette-name, default-contrast)
|
|
14
14
|
)
|
|
15
15
|
);
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
@mixin color($
|
|
19
|
-
$config: theming.get-color-config($config-or-theme);
|
|
20
|
-
|
|
18
|
+
@mixin color($theme) {
|
|
21
19
|
@include sass-utils.current-selector-or-root() {
|
|
22
20
|
@include token-utils.create-token-values(tokens-mat-toolbar.$prefix,
|
|
23
|
-
tokens-mat-toolbar.get-color-tokens($
|
|
21
|
+
tokens-mat-toolbar.get-color-tokens($theme));
|
|
24
22
|
}
|
|
25
23
|
|
|
26
24
|
.mat-toolbar {
|
|
27
25
|
&.mat-primary {
|
|
28
|
-
@include _palette-styles(
|
|
26
|
+
@include _palette-styles($theme, primary);
|
|
29
27
|
}
|
|
30
28
|
|
|
31
29
|
&.mat-accent {
|
|
32
|
-
@include _palette-styles(
|
|
30
|
+
@include _palette-styles($theme, accent);
|
|
33
31
|
}
|
|
34
32
|
|
|
35
33
|
&.mat-warn {
|
|
36
|
-
@include _palette-styles(
|
|
34
|
+
@include _palette-styles($theme, warn);
|
|
37
35
|
}
|
|
38
36
|
}
|
|
39
37
|
}
|
|
40
38
|
|
|
41
|
-
@mixin typography($
|
|
42
|
-
|
|
43
|
-
|
|
39
|
+
@mixin typography($theme) {
|
|
40
|
+
// TODO(mmalerba): Stop calling this and resolve resulting screen diffs.
|
|
41
|
+
$theme: inspection.private-get-typography-back-compat-theme($theme);
|
|
44
42
|
|
|
45
43
|
@include sass-utils.current-selector-or-root() {
|
|
46
44
|
@include token-utils.create-token-values(tokens-mat-toolbar.$prefix,
|
|
47
|
-
tokens-mat-toolbar.get-typography-tokens($
|
|
45
|
+
tokens-mat-toolbar.get-typography-tokens($theme));
|
|
48
46
|
}
|
|
49
47
|
}
|
|
50
48
|
|
|
51
|
-
@mixin density($
|
|
52
|
-
$density-scale: theming.get-density-config($config-or-theme);
|
|
53
|
-
|
|
49
|
+
@mixin density($theme) {
|
|
54
50
|
@include sass-utils.current-selector-or-root() {
|
|
55
51
|
@include token-utils.create-token-values(tokens-mat-toolbar.$prefix,
|
|
56
|
-
tokens-mat-toolbar.get-density-tokens($
|
|
52
|
+
tokens-mat-toolbar.get-density-tokens($theme));
|
|
57
53
|
}
|
|
58
54
|
}
|
|
59
55
|
|
|
60
|
-
@mixin theme($theme
|
|
61
|
-
$theme: theming.private-legacy-get-theme($theme-or-color-config);
|
|
56
|
+
@mixin theme($theme) {
|
|
62
57
|
@include theming.private-check-duplicate-theme-styles($theme, 'mat-toolbar') {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
$typography: theming.get-typography-config($theme);
|
|
66
|
-
|
|
67
|
-
@if $color != null {
|
|
68
|
-
@include color($color);
|
|
58
|
+
@if inspection.theme-has($theme, color) {
|
|
59
|
+
@include color($theme);
|
|
69
60
|
}
|
|
70
|
-
@if $density
|
|
71
|
-
@include density($
|
|
61
|
+
@if inspection.theme-has($theme, density) {
|
|
62
|
+
@include density($theme);
|
|
72
63
|
}
|
|
73
|
-
@if $typography
|
|
74
|
-
@include typography($
|
|
64
|
+
@if inspection.theme-has($theme, typography) {
|
|
65
|
+
@include typography($theme);
|
|
75
66
|
}
|
|
76
67
|
}
|
|
77
68
|
}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
@use '@material/tooltip/plain-tooltip-theme' as mdc-plain-tooltip-theme;
|
|
2
2
|
@use '../core/style/sass-utils';
|
|
3
3
|
@use '../core/theming/theming';
|
|
4
|
+
@use '../core/theming/inspection';
|
|
4
5
|
@use '../core/typography/typography';
|
|
5
6
|
@use '../core/tokens/m2/mdc/plain-tooltip' as m2-mdc-plain-tooltip;
|
|
6
7
|
|
|
7
|
-
@mixin base($
|
|
8
|
+
@mixin base($theme) {
|
|
8
9
|
// Add default values for tokens not related to color, typography, or density.
|
|
9
10
|
@include sass-utils.current-selector-or-root() {
|
|
10
11
|
@include mdc-plain-tooltip-theme.theme(m2-mdc-plain-tooltip.get-unthemable-tokens());
|
|
11
12
|
}
|
|
12
13
|
}
|
|
13
14
|
|
|
14
|
-
@mixin color($
|
|
15
|
-
$
|
|
16
|
-
$mdc-tooltip-color-tokens: m2-mdc-plain-tooltip.get-color-tokens($config);
|
|
15
|
+
@mixin color($theme) {
|
|
16
|
+
$mdc-tooltip-color-tokens: m2-mdc-plain-tooltip.get-color-tokens($theme);
|
|
17
17
|
|
|
18
18
|
// Add values for MDC tooltip tokens.
|
|
19
19
|
@include sass-utils.current-selector-or-root() {
|
|
@@ -21,10 +21,8 @@
|
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
@mixin typography($
|
|
25
|
-
$
|
|
26
|
-
theming.get-typography-config($config-or-theme));
|
|
27
|
-
$mdc-tooltip-typography-tokens: m2-mdc-plain-tooltip.get-typography-tokens($config);
|
|
24
|
+
@mixin typography($theme) {
|
|
25
|
+
$mdc-tooltip-typography-tokens: m2-mdc-plain-tooltip.get-typography-tokens($theme);
|
|
28
26
|
|
|
29
27
|
// Add values for MDC tooltip tokens.
|
|
30
28
|
@include sass-utils.current-selector-or-root() {
|
|
@@ -32,9 +30,8 @@
|
|
|
32
30
|
}
|
|
33
31
|
}
|
|
34
32
|
|
|
35
|
-
@mixin density($
|
|
36
|
-
$density-
|
|
37
|
-
$mdc-tooltip-density-tokens: m2-mdc-plain-tooltip.get-density-tokens($density-scale);
|
|
33
|
+
@mixin density($theme) {
|
|
34
|
+
$mdc-tooltip-density-tokens: m2-mdc-plain-tooltip.get-density-tokens($theme);
|
|
38
35
|
|
|
39
36
|
// Add values for MDC tooltip tokens.
|
|
40
37
|
@include sass-utils.current-selector-or-root() {
|
|
@@ -42,22 +39,17 @@
|
|
|
42
39
|
}
|
|
43
40
|
}
|
|
44
41
|
|
|
45
|
-
@mixin theme($theme
|
|
46
|
-
$theme: theming.private-legacy-get-theme($theme-or-color-config);
|
|
42
|
+
@mixin theme($theme) {
|
|
47
43
|
@include theming.private-check-duplicate-theme-styles($theme, 'mat-tooltip') {
|
|
48
|
-
$color: theming.get-color-config($theme);
|
|
49
|
-
$density: theming.get-density-config($theme);
|
|
50
|
-
$typography: theming.get-typography-config($theme);
|
|
51
|
-
|
|
52
44
|
@include base($theme);
|
|
53
|
-
@if $color
|
|
54
|
-
@include color($
|
|
45
|
+
@if inspection.theme-has($theme, color) {
|
|
46
|
+
@include color($theme);
|
|
55
47
|
}
|
|
56
|
-
@if $density
|
|
57
|
-
@include density($
|
|
48
|
+
@if inspection.theme-has($theme, density) {
|
|
49
|
+
@include density($theme);
|
|
58
50
|
}
|
|
59
|
-
@if $typography
|
|
60
|
-
@include typography($
|
|
51
|
+
@if inspection.theme-has($theme, typography) {
|
|
52
|
+
@include typography($theme);
|
|
61
53
|
}
|
|
62
54
|
}
|
|
63
55
|
}
|
package/tree/_tree-theme.scss
CHANGED
|
@@ -1,41 +1,37 @@
|
|
|
1
|
-
@use 'sass:map';
|
|
2
1
|
@use '../core/density/private/compatibility';
|
|
3
2
|
@use '../core/theming/theming';
|
|
3
|
+
@use '../core/theming/inspection';
|
|
4
4
|
@use '../core/typography/typography';
|
|
5
|
-
@use '../core/typography/typography-utils';
|
|
6
5
|
@use './tree-variables';
|
|
7
6
|
|
|
8
|
-
@mixin color($
|
|
9
|
-
$config: theming.get-color-config($config-or-theme);
|
|
10
|
-
$background: map.get($config, background);
|
|
11
|
-
$foreground: map.get($config, foreground);
|
|
12
|
-
|
|
7
|
+
@mixin color($theme) {
|
|
13
8
|
.mat-tree {
|
|
14
|
-
background:
|
|
9
|
+
background: inspection.get-theme-color($theme, background, card);
|
|
15
10
|
}
|
|
16
11
|
|
|
17
12
|
.mat-tree-node,
|
|
18
13
|
.mat-nested-tree-node {
|
|
19
|
-
color:
|
|
14
|
+
color: inspection.get-theme-color($theme, foreground, text);
|
|
20
15
|
}
|
|
21
16
|
}
|
|
22
17
|
|
|
23
|
-
@mixin typography($
|
|
24
|
-
|
|
25
|
-
|
|
18
|
+
@mixin typography($theme) {
|
|
19
|
+
// TODO(mmalerba): Stop calling this and resolve resulting screen diffs.
|
|
20
|
+
$theme: inspection.private-get-typography-back-compat-theme($theme);
|
|
21
|
+
|
|
26
22
|
.mat-tree {
|
|
27
|
-
font-family: typography-
|
|
23
|
+
font-family: inspection.get-theme-typography($theme, body-2, font-family);
|
|
28
24
|
}
|
|
29
25
|
|
|
30
26
|
.mat-tree-node,
|
|
31
27
|
.mat-nested-tree-node {
|
|
32
|
-
font-weight:
|
|
33
|
-
font-size:
|
|
28
|
+
font-weight: inspection.get-theme-typography($theme, body-2, font-weight);
|
|
29
|
+
font-size: inspection.get-theme-typography($theme, body-2, font-size);
|
|
34
30
|
}
|
|
35
31
|
}
|
|
36
32
|
|
|
37
|
-
@mixin density($
|
|
38
|
-
$density-scale:
|
|
33
|
+
@mixin density($theme) {
|
|
34
|
+
$density-scale: inspection.get-theme-density($theme);
|
|
39
35
|
$height: compatibility.private-density-prop-value(tree-variables.$density-config,
|
|
40
36
|
$density-scale, height);
|
|
41
37
|
|
|
@@ -46,21 +42,16 @@
|
|
|
46
42
|
}
|
|
47
43
|
}
|
|
48
44
|
|
|
49
|
-
@mixin theme($theme
|
|
50
|
-
$theme: theming.private-legacy-get-theme($theme-or-color-config);
|
|
45
|
+
@mixin theme($theme) {
|
|
51
46
|
@include theming.private-check-duplicate-theme-styles($theme, 'mat-tree') {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
$typography: theming.get-typography-config($theme);
|
|
55
|
-
|
|
56
|
-
@if $color != null {
|
|
57
|
-
@include color($color);
|
|
47
|
+
@if inspection.theme-has($theme, color) {
|
|
48
|
+
@include color($theme);
|
|
58
49
|
}
|
|
59
|
-
@if $density
|
|
60
|
-
@include density($
|
|
50
|
+
@if inspection.theme-has($theme, density) {
|
|
51
|
+
@include density($theme);
|
|
61
52
|
}
|
|
62
|
-
@if $typography
|
|
63
|
-
@include typography($
|
|
53
|
+
@if inspection.theme-has($theme, typography) {
|
|
54
|
+
@include typography($theme);
|
|
64
55
|
}
|
|
65
56
|
}
|
|
66
57
|
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
@use 'typography';
|
|
2
|
-
|
|
3
|
-
// @deprecated Use `define-typography-level`.
|
|
4
|
-
@function level(
|
|
5
|
-
$font-size,
|
|
6
|
-
$line-height: $font-size,
|
|
7
|
-
$font-weight: 400,
|
|
8
|
-
$font-family: null,
|
|
9
|
-
$letter-spacing: normal) {
|
|
10
|
-
@return typography.define-typography-level($font-size, $line-height, $font-weight, $font-family,
|
|
11
|
-
$letter-spacing);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
// @deprecated Use `typography-hierarchy`.
|
|
15
|
-
@mixin base-typography($config-or-theme, $selector: '.mat-typography') {
|
|
16
|
-
@include typography.legacy-typography-hierarchy($config-or-theme, $selector);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
// @deprecated Use `define-typography-config`.
|
|
20
|
-
@function config(
|
|
21
|
-
$font-family: 'Roboto, "Helvetica Neue", sans-serif',
|
|
22
|
-
$display-4: typography.define-typography-level(112px, 112px, 300, $letter-spacing: -0.05em),
|
|
23
|
-
$display-3: typography.define-typography-level(56px, 56px, 400, $letter-spacing: -0.02em),
|
|
24
|
-
$display-2: typography.define-typography-level(45px, 48px, 400, $letter-spacing: -0.005em),
|
|
25
|
-
$display-1: typography.define-typography-level(34px, 40px, 400),
|
|
26
|
-
$headline: typography.define-typography-level(24px, 32px, 400),
|
|
27
|
-
$title: typography.define-typography-level(20px, 32px, 500),
|
|
28
|
-
$subheading-2: typography.define-typography-level(16px, 28px, 400),
|
|
29
|
-
$subheading-1: typography.define-typography-level(15px, 24px, 400),
|
|
30
|
-
$body-2: typography.define-typography-level(14px, 24px, 500),
|
|
31
|
-
$body-1: typography.define-typography-level(14px, 20px, 400),
|
|
32
|
-
$caption: typography.define-typography-level(12px, 20px, 400),
|
|
33
|
-
$button: typography.define-typography-level(14px, 14px, 500),
|
|
34
|
-
$input: typography.define-typography-level(inherit, 1.125, 400)
|
|
35
|
-
) {
|
|
36
|
-
@return typography.define-legacy-typography-config($font-family, $display-4, $display-3,
|
|
37
|
-
$display-2, $display-1, $headline, $title, $subheading-2, $subheading-1, $body-2,
|
|
38
|
-
$body-1, $caption, $button, $input);
|
|
39
|
-
}
|