@angular/material 20.1.0-next.1 → 20.1.0-rc.0
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 +10 -22
- package/badge/_badge-theme.scss +35 -44
- package/badge/_m2-badge.scss +46 -59
- package/bottom-sheet/_bottom-sheet-theme.scss +28 -40
- package/bottom-sheet/_m2-bottom-sheet.scss +16 -33
- package/button/_button-theme.scss +37 -55
- package/button/_fab-theme.scss +42 -56
- package/button/_icon-button-theme.scss +33 -49
- package/button/_m2-button.scss +135 -158
- package/button/_m2-fab.scss +60 -69
- package/button/_m2-icon-button.scss +30 -50
- package/button/_m3-button.scss +1 -2
- package/button/_m3-fab.scss +1 -2
- package/button/_m3-icon-button.scss +1 -2
- package/button/testing/index.d.ts +1 -0
- package/button-toggle/_button-toggle-theme.scss +29 -44
- package/button-toggle/_m2-button-toggle.scss +58 -81
- package/button-toggle/_m3-button-toggle.scss +1 -2
- package/card/_card-theme.scss +28 -36
- package/card/_m2-card.scss +30 -45
- package/checkbox/_checkbox-theme.scss +37 -50
- package/checkbox/_m2-checkbox.scss +30 -40
- package/checkbox/_m3-checkbox.scss +1 -2
- package/chips/_chips-theme.scss +27 -30
- package/chips/_m2-chip.scss +40 -53
- package/chips/_m3-chip.scss +1 -2
- package/core/_core-theme.scss +48 -67
- package/core/_m2-app.scss +11 -23
- package/core/focus-indicators/_private.scss +2 -5
- package/core/m2/_theming.scss +36 -41
- package/core/option/_m2-optgroup.scss +13 -25
- package/core/option/_m2-option.scss +16 -22
- package/core/option/_optgroup-theme.scss +28 -30
- package/core/option/_option-theme.scss +35 -34
- package/core/ripple/_m2-ripple.scss +8 -20
- package/core/ripple/_ripple-theme.scss +28 -33
- package/core/selection/pseudo-checkbox/_m2-pseudo-checkbox.scss +14 -21
- package/core/selection/pseudo-checkbox/_pseudo-checkbox-theme.scss +55 -45
- package/core/theming/_all-theme.scss +38 -42
- package/core/theming/_definition.scss +22 -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 +16 -68
- 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 +26 -40
- package/dialog/_dialog-theme.scss +28 -34
- package/dialog/_m2-dialog.scss +34 -48
- package/divider/_divider-theme.scss +28 -30
- package/divider/_m2-divider.scss +10 -21
- package/expansion/_expansion-theme.scss +28 -39
- package/expansion/_m2-expansion.scss +52 -67
- package/expansion/_m3-expansion.scss +3 -2
- package/fesm2022/autocomplete.mjs +1 -1
- package/fesm2022/button/testing.mjs +7 -4
- package/fesm2022/button/testing.mjs.map +1 -1
- package/fesm2022/chips.mjs +1 -1
- package/fesm2022/core.mjs +1 -1
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/datepicker.mjs +1 -1
- package/fesm2022/expansion.mjs +2 -2
- package/fesm2022/expansion.mjs.map +1 -1
- package/fesm2022/{form-field-C9DZXojn.mjs → form-field-CFbrnFED.mjs} +3 -3
- package/fesm2022/{form-field-C9DZXojn.mjs.map → form-field-CFbrnFED.mjs.map} +1 -1
- package/fesm2022/form-field.mjs +2 -2
- package/fesm2022/input.mjs +3 -27
- package/fesm2022/input.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-BDiw_nWS.mjs.map → module-B0CLRw5e.mjs.map} +1 -1
- package/fesm2022/{module-DzZHEh7B.mjs → module-B62K-792.mjs} +2 -2
- package/fesm2022/{module-DzZHEh7B.mjs.map → module-B62K-792.mjs.map} +1 -1
- package/fesm2022/paginator.mjs +3 -3
- package/fesm2022/select.mjs +3 -3
- package/fesm2022/sidenav.mjs +2 -4
- package/fesm2022/sidenav.mjs.map +1 -1
- package/fesm2022/slide-toggle.mjs +2 -2
- package/fesm2022/slide-toggle.mjs.map +1 -1
- package/fesm2022/snack-bar.mjs +2 -2
- package/fesm2022/timepicker.mjs +1 -1
- package/form-field/_form-field-theme.scss +35 -51
- package/form-field/_m2-form-field.scss +125 -146
- package/form-field/_m3-form-field.scss +1 -2
- package/grid-list/_grid-list-theme.scss +28 -28
- package/grid-list/_m2-grid-list.scss +16 -29
- package/icon/_icon-theme.scss +40 -41
- package/icon/_m2-icon.scss +7 -21
- package/input/_input-theme.scss +1 -4
- package/input/index.d.ts +0 -11
- package/list/_list-theme.scss +57 -53
- package/list/_m2-list.scss +84 -108
- package/list/_m3-list.scss +1 -2
- package/menu/_m2-menu.scss +33 -46
- 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 +38 -58
- package/paginator/_m3-paginator.scss +1 -2
- 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/_m2-progress-bar.scss +11 -24
- package/progress-bar/_progress-bar-theme.scss +35 -43
- package/progress-spinner/_m2-progress-spinner.scss +9 -20
- package/progress-spinner/_progress-spinner-theme.scss +42 -43
- package/radio/_m2-radio.scss +30 -40
- package/radio/_m3-radio.scss +1 -2
- package/radio/_radio-theme.scss +33 -46
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-generate/theme-color/schema.json +1 -1
- package/select/_m2-select.scss +23 -30
- package/select/_m3-select.scss +1 -2
- package/select/_select-theme.scss +38 -51
- package/sidenav/_m2-sidenav.scss +26 -36
- package/sidenav/_sidenav-theme.scss +28 -30
- package/slide-toggle/_m2-slide-toggle.scss +111 -143
- package/slide-toggle/_m3-slide-toggle.scss +1 -0
- package/slide-toggle/_slide-toggle-theme.scss +42 -80
- package/slider/_m2-slider.scss +34 -55
- package/slider/_slider-theme.scss +38 -45
- package/snack-bar/_m2-snack-bar.scss +16 -36
- package/snack-bar/_snack-bar-theme.scss +28 -31
- package/sort/_m2-sort.scss +7 -18
- package/sort/_sort-theme.scss +28 -33
- package/stepper/_m2-stepper.scss +39 -57
- package/stepper/_m3-stepper.scss +1 -2
- package/stepper/_stepper-theme.scss +41 -49
- package/table/_m2-table.scss +54 -72
- package/table/_m3-table.scss +1 -2
- package/table/_table-theme.scss +28 -36
- package/tabs/_m2-tabs.scss +31 -46
- package/tabs/_m3-tabs.scss +1 -2
- package/tabs/_tabs-theme.scss +41 -49
- package/timepicker/_m2-timepicker.scss +10 -22
- package/timepicker/_timepicker-theme.scss +28 -46
- package/toolbar/_m2-toolbar.scss +26 -46
- package/toolbar/_m3-toolbar.scss +1 -2
- package/toolbar/_toolbar-theme.scss +55 -46
- package/tooltip/_m2-tooltip.scss +16 -34
- package/tooltip/_tooltip-theme.scss +28 -37
- package/tree/_m2-tree.scss +21 -38
- package/tree/_m3-tree.scss +1 -2
- package/tree/_tree-theme.scss +28 -38
- package/core/tokens/_format-tokens.scss +0 -5
package/tooltip/_m2-tooltip.scss
CHANGED
|
@@ -1,42 +1,24 @@
|
|
|
1
|
-
@use '../core/theming/inspection';
|
|
2
1
|
@use '../core/tokens/m2-utils';
|
|
3
2
|
@use 'sass:map';
|
|
4
3
|
|
|
5
|
-
|
|
6
|
-
// but may be in a future version of the theming API.
|
|
7
|
-
//
|
|
8
|
-
// Tokens that are available in MDC, but not used in Angular Material should be mapped to `null`.
|
|
9
|
-
// `null` indicates that we are intentionally choosing not to emit a slot or value for the token in
|
|
10
|
-
// our CSS.
|
|
11
|
-
@function get-unthemable-tokens() {
|
|
12
|
-
@return (
|
|
13
|
-
tooltip-container-shape: 4px,
|
|
14
|
-
tooltip-supporting-text-line-height: 16px,
|
|
15
|
-
);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
// Tokens that can be configured through Angular Material's color theming API.
|
|
19
|
-
@function get-color-tokens($theme) {
|
|
4
|
+
@function get-tokens($theme) {
|
|
20
5
|
$system: m2-utils.get-system($theme);
|
|
21
6
|
|
|
22
7
|
@return (
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
8
|
+
base: (
|
|
9
|
+
tooltip-container-shape: 4px,
|
|
10
|
+
tooltip-supporting-text-line-height: 16px,
|
|
11
|
+
),
|
|
12
|
+
color: (
|
|
13
|
+
tooltip-container-color: map.get($system, inverse-surface),
|
|
14
|
+
tooltip-supporting-text-color: map.get($system, inverse-on-surface),
|
|
15
|
+
),
|
|
16
|
+
typography: (
|
|
17
|
+
tooltip-supporting-text-font: map.get($system, body-small-font),
|
|
18
|
+
tooltip-supporting-text-size: map.get($system, body-small-size),
|
|
19
|
+
tooltip-supporting-text-weight: map.get($system, body-small-weight),
|
|
20
|
+
tooltip-supporting-text-tracking: map.get($system, body-small-tracking),
|
|
21
|
+
),
|
|
22
|
+
density: (),
|
|
36
23
|
);
|
|
37
24
|
}
|
|
38
|
-
|
|
39
|
-
// Tokens that can be configured through Angular Material's density theming API.
|
|
40
|
-
@function get-density-tokens($theme) {
|
|
41
|
-
@return ();
|
|
42
|
-
}
|
|
@@ -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: map.get(m2-tooltip.get-tokens($theme), base);
|
|
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: map.get(m2-tooltip.get-tokens($theme), color);
|
|
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: map.get(m2-tooltip.get-tokens($theme), typography);
|
|
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: map.get(m2-tooltip.get-tokens($theme), density);
|
|
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
|
@@ -1,47 +1,30 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
2
|
@use '../core/theming/theming';
|
|
3
|
-
@use '../core/theming/inspection';
|
|
4
3
|
@use '../core/tokens/m2-utils';
|
|
5
4
|
|
|
6
|
-
|
|
7
|
-
// but may be in a future version of the theming API.
|
|
8
|
-
@function get-unthemable-tokens() {
|
|
9
|
-
@return ();
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
// Tokens that can be configured through Angular Material's color theming API.
|
|
13
|
-
@function get-color-tokens($theme) {
|
|
5
|
+
@function get-tokens($theme) {
|
|
14
6
|
$system: m2-utils.get-system($theme);
|
|
7
|
+
$density-scale: theming.clamp-density(map.get($system, density-scale), -4);
|
|
15
8
|
|
|
16
9
|
@return (
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
$min-height-scale: (
|
|
37
|
-
0: 48px,
|
|
38
|
-
-1: 44px,
|
|
39
|
-
-2: 40px,
|
|
40
|
-
-3: 36px,
|
|
41
|
-
-4: 28px,
|
|
42
|
-
);
|
|
43
|
-
|
|
44
|
-
@return (
|
|
45
|
-
tree-node-min-height: map.get($min-height-scale, $density-scale)
|
|
10
|
+
base: (),
|
|
11
|
+
color: (
|
|
12
|
+
tree-container-background-color: map.get($system, surface),
|
|
13
|
+
tree-node-text-color: map.get($system, on-surface),
|
|
14
|
+
),
|
|
15
|
+
typography: (
|
|
16
|
+
// TODO(crisbeto): provide tokens for line height and letter spacing
|
|
17
|
+
tree-node-text-font: map.get($system, body-medium-font),
|
|
18
|
+
tree-node-text-size: map.get($system, body-medium-size),
|
|
19
|
+
tree-node-text-weight: map.get($system, body-medium-weight),),
|
|
20
|
+
density: (
|
|
21
|
+
tree-node-min-height: map.get((
|
|
22
|
+
0: 48px,
|
|
23
|
+
-1: 44px,
|
|
24
|
+
-2: 40px,
|
|
25
|
+
-3: 36px,
|
|
26
|
+
-4: 28px,
|
|
27
|
+
), $density-scale)
|
|
28
|
+
),
|
|
46
29
|
);
|
|
47
30
|
}
|
package/tree/_m3-tree.scss
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
@use 'sass:list';
|
|
3
3
|
@use '../core/tokens/m3-utils';
|
|
4
4
|
@use '../core/theming/theming';
|
|
5
|
-
@use '../core/theming/inspection';
|
|
6
5
|
@use '../core/tokens/m3';
|
|
7
6
|
|
|
8
7
|
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
@@ -23,7 +22,7 @@ $prefix: (mat, tree);
|
|
|
23
22
|
tree-node-text-size: map.get($system, body-large-size),
|
|
24
23
|
tree-node-text-weight: map.get($system, body-large-weight),
|
|
25
24
|
),
|
|
26
|
-
density: get-density-tokens(map.get($
|
|
25
|
+
density: get-density-tokens(map.get($system, density-scale)),
|
|
27
26
|
);
|
|
28
27
|
}
|
|
29
28
|
|
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: map.get(m2-tree.get-tokens($theme), base);
|
|
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: map.get(m2-tree.get-tokens($theme), color);
|
|
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: map.get(m2-tree.get-tokens($theme), typography);
|
|
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: map.get(m2-tree.get-tokens($theme), density);
|
|
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
|
}
|