@angular/material 17.0.0-next.0 → 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 +3 -4
- 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/_button-base.scss +3 -3
- package/button/_button-theme-private.scss +3 -2
- package/button/_button-theme.scss +18 -25
- package/button/_fab-theme.scss +31 -49
- package/button/_icon-button-theme.scss +19 -26
- package/button/index.d.ts +22 -31
- package/button-toggle/_button-toggle-theme.scss +17 -28
- package/button-toggle/index.d.ts +15 -18
- package/card/_card-theme.scss +27 -38
- package/checkbox/_checkbox-theme.scss +28 -45
- package/checkbox/index.d.ts +21 -27
- package/chips/_chips-theme.scss +18 -56
- package/core/_core-theme.scss +24 -39
- 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/mdc-helpers/_mdc-helpers.scss +19 -22
- package/core/option/_optgroup-theme.scss +13 -23
- package/core/option/_option-theme.scss +23 -37
- package/core/ripple/_ripple-theme.scss +6 -10
- package/core/selection/pseudo-checkbox/_pseudo-checkbox-theme.scss +17 -24
- package/core/style/_form-common.scss +7 -7
- package/core/style/_private.scss +5 -7
- package/core/style/_sass-utils.scss +7 -0
- package/core/testing/index.d.ts +2 -1
- package/core/theming/_all-theme.scss +41 -41
- package/core/theming/_inspection.scss +133 -59
- package/core/theming/_m2-inspection.scss +268 -0
- package/core/theming/_theming.scss +59 -20
- 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/_card.scss +15 -21
- 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/_form-field.scss +21 -25
- 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/_optgroup.scss +12 -17
- package/core/tokens/m2/mat/_option.scss +16 -28
- package/core/tokens/m2/mat/_paginator.scss +16 -18
- package/core/tokens/m2/mat/_radio.scss +7 -10
- package/core/tokens/m2/mat/_select.scss +15 -29
- package/core/tokens/m2/mat/_sidenav.scss +12 -14
- package/core/tokens/m2/mat/_slide-toggle.scss +9 -17
- package/core/tokens/m2/mat/_slider.scss +5 -5
- 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/_checkbox.scss +21 -20
- 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/_elevated-card.scss +6 -9
- package/core/tokens/m2/mdc/_extended-fab.scss +8 -17
- package/core/tokens/m2/mdc/_fab.scss +6 -7
- package/core/tokens/m2/mdc/_filled-text-field.scss +16 -22
- package/core/tokens/m2/mdc/_icon-button.scss +3 -3
- package/core/tokens/m2/mdc/_linear-progress.scss +9 -10
- package/core/tokens/m2/mdc/_list.scss +44 -42
- package/core/tokens/m2/mdc/_outlined-card.scss +7 -10
- package/core/tokens/m2/mdc/_outlined-text-field.scss +14 -20
- package/core/tokens/m2/mdc/_plain-tooltip.scss +9 -22
- package/core/tokens/m2/mdc/_radio.scss +11 -11
- package/core/tokens/m2/mdc/_slider.scss +16 -23
- package/core/tokens/m2/mdc/_snack-bar.scss +10 -23
- package/core/tokens/m2/mdc/_switch.scss +16 -19
- 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/_definition.scss +258 -0
- package/core/typography/_property-getters.scss +63 -0
- package/core/typography/_typography-utils.scss +9 -69
- package/core/typography/_typography.scss +38 -494
- package/core/typography/_versioning.scss +91 -0
- package/datepicker/_datepicker-theme.scss +20 -34
- package/datepicker/index.d.ts +3 -3
- package/dialog/_dialog-theme.scss +22 -23
- 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/button-base.mjs +32 -27
- package/esm2022/button/button.mjs +6 -6
- package/esm2022/button/fab.mjs +23 -31
- package/esm2022/button/icon-button.mjs +6 -6
- package/esm2022/button/testing/button-harness.mjs +3 -3
- 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/datepicker/calendar.mjs +1 -1
- package/esm2022/datepicker/datepicker-base.mjs +2 -2
- package/esm2022/datepicker/datepicker-toggle.mjs +1 -1
- package/esm2022/datepicker/month-view.mjs +2 -2
- package/esm2022/datepicker/multi-year-view.mjs +2 -2
- package/esm2022/datepicker/year-view.mjs +2 -2
- package/esm2022/dialog/dialog-container.mjs +16 -3
- package/esm2022/form-field/form-field.mjs +3 -3
- package/esm2022/menu/menu-item.mjs +15 -11
- package/esm2022/menu/menu.mjs +9 -22
- package/esm2022/paginator/paginator.mjs +1 -1
- package/esm2022/select/select.mjs +3 -3
- package/esm2022/slide-toggle/slide-toggle.mjs +33 -37
- package/esm2022/slider/slider-input.mjs +19 -9
- package/esm2022/slider/slider.mjs +2 -2
- package/esm2022/snack-bar/simple-snack-bar.mjs +1 -1
- 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/testing.mjs +2 -2
- package/fesm2022/button/testing.mjs.map +1 -1
- package/fesm2022/button-toggle.mjs +25 -32
- package/fesm2022/button-toggle.mjs.map +1 -1
- package/fesm2022/button.mjs +59 -61
- package/fesm2022/button.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/datepicker.mjs +6 -6
- package/fesm2022/datepicker.mjs.map +1 -1
- package/fesm2022/dialog.mjs +15 -2
- package/fesm2022/dialog.mjs.map +1 -1
- package/fesm2022/form-field.mjs +2 -2
- package/fesm2022/form-field.mjs.map +1 -1
- package/fesm2022/menu.mjs +23 -31
- package/fesm2022/menu.mjs.map +1 -1
- package/fesm2022/paginator.mjs +1 -1
- package/fesm2022/paginator.mjs.map +1 -1
- package/fesm2022/select.mjs +2 -2
- package/fesm2022/select.mjs.map +1 -1
- package/fesm2022/slide-toggle.mjs +33 -36
- package/fesm2022/slide-toggle.mjs.map +1 -1
- package/fesm2022/slider.mjs +20 -10
- package/fesm2022/slider.mjs.map +1 -1
- package/fesm2022/snack-bar.mjs +1 -1
- package/fesm2022/snack-bar.mjs.map +1 -1
- package/fesm2022/tabs.mjs +2 -2
- package/fesm2022/tabs.mjs.map +1 -1
- package/form-field/_form-field-density.scss +3 -4
- package/form-field/_form-field-focus-overlay.scss +1 -1
- package/form-field/_form-field-sizing.scss +1 -1
- package/form-field/_form-field-theme.scss +24 -34
- package/grid-list/_grid-list-theme.scss +12 -19
- package/icon/_icon-theme.scss +17 -25
- package/input/_input-theme.scss +11 -23
- package/list/_list-theme.scss +27 -42
- package/menu/_menu-theme.scss +13 -22
- package/menu/index.d.ts +12 -18
- package/package.json +2 -2
- package/paginator/_paginator-theme.scss +15 -24
- 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 +17 -24
- package/progress-spinner/_progress-spinner-theme.scss +18 -24
- package/radio/_radio-theme.scss +23 -38
- 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/_slide-toggle-theme.scss +23 -40
- package/slide-toggle/index.d.ts +20 -23
- package/slider/_slider-theme.scss +25 -42
- package/snack-bar/_snack-bar-theme.scss +17 -26
- 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/button-toggle/_button-toggle-variables.scss +0 -16
- package/core/typography/_typography-deprecated.scss +0 -39
- package/paginator/_paginator-variables.scss +0 -15
package/card/_card-theme.scss
CHANGED
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
@use '@material/card/elevated-card-theme' as mdc-elevated-card-theme;
|
|
11
11
|
@use '@material/card/outlined-card-theme' as mdc-outlined-card-theme;
|
|
12
12
|
|
|
13
|
-
@mixin base($
|
|
14
|
-
@if inspection.get-theme-version($
|
|
15
|
-
@include _theme-from-tokens(inspection.get-theme-tokens($
|
|
13
|
+
@mixin base($theme) {
|
|
14
|
+
@if inspection.get-theme-version($theme) == 1 {
|
|
15
|
+
@include _theme-from-tokens(inspection.get-theme-tokens($theme, base));
|
|
16
16
|
}
|
|
17
17
|
@else {
|
|
18
18
|
@include sass-utils.current-selector-or-root() {
|
|
@@ -24,24 +24,22 @@
|
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
@mixin color($
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
@if inspection.get-theme-version($config-or-theme) == 1 {
|
|
31
|
-
@include _theme-from-tokens(inspection.get-theme-tokens($config-or-theme, color));
|
|
27
|
+
@mixin color($theme) {
|
|
28
|
+
@if inspection.get-theme-version($theme) == 1 {
|
|
29
|
+
@include _theme-from-tokens(inspection.get-theme-tokens($theme, color));
|
|
32
30
|
}
|
|
33
31
|
@else {
|
|
34
32
|
$mdc-elevated-card-color-tokens: token-utils.resolve-elevation(
|
|
35
|
-
tokens-mdc-elevated-card.get-color-tokens($
|
|
33
|
+
tokens-mdc-elevated-card.get-color-tokens($theme),
|
|
36
34
|
container-elevation,
|
|
37
35
|
container-shadow-color
|
|
38
36
|
);
|
|
39
37
|
$mdc-outlined-card-color-tokens: token-utils.resolve-elevation(
|
|
40
|
-
tokens-mdc-outlined-card.get-color-tokens($
|
|
38
|
+
tokens-mdc-outlined-card.get-color-tokens($theme),
|
|
41
39
|
container-elevation,
|
|
42
40
|
container-shadow-color,
|
|
43
41
|
);
|
|
44
|
-
$mat-card-color-tokens: tokens-mat-card.get-color-tokens($
|
|
42
|
+
$mat-card-color-tokens: tokens-mat-card.get-color-tokens($theme);
|
|
45
43
|
|
|
46
44
|
// Add values for card tokens.
|
|
47
45
|
@include sass-utils.current-selector-or-root() {
|
|
@@ -52,17 +50,14 @@
|
|
|
52
50
|
}
|
|
53
51
|
}
|
|
54
52
|
|
|
55
|
-
@mixin typography($
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
@if inspection.get-theme-version($config-or-theme) == 1 {
|
|
60
|
-
@include _theme-from-tokens(inspection.get-theme-tokens($config-or-theme, typography));
|
|
53
|
+
@mixin typography($theme) {
|
|
54
|
+
@if inspection.get-theme-version($theme) == 1 {
|
|
55
|
+
@include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
|
|
61
56
|
}
|
|
62
57
|
@else {
|
|
63
|
-
$mdc-elevated-card-typography-tokens: tokens-mdc-elevated-card.get-typography-tokens($
|
|
64
|
-
$mdc-outlined-card-typography-tokens: tokens-mdc-outlined-card.get-typography-tokens($
|
|
65
|
-
$mat-card-typography-tokens: tokens-mat-card.get-typography-tokens($
|
|
58
|
+
$mdc-elevated-card-typography-tokens: tokens-mdc-elevated-card.get-typography-tokens($theme);
|
|
59
|
+
$mdc-outlined-card-typography-tokens: tokens-mdc-outlined-card.get-typography-tokens($theme);
|
|
60
|
+
$mat-card-typography-tokens: tokens-mat-card.get-typography-tokens($theme);
|
|
66
61
|
|
|
67
62
|
// Add values for card tokens.
|
|
68
63
|
@include sass-utils.current-selector-or-root() {
|
|
@@ -74,16 +69,14 @@
|
|
|
74
69
|
}
|
|
75
70
|
}
|
|
76
71
|
|
|
77
|
-
@mixin density($
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
@if inspection.get-theme-version($config-or-theme) == 1 {
|
|
81
|
-
@include _theme-from-tokens(inspection.get-theme-tokens($config-or-theme, density));
|
|
72
|
+
@mixin density($theme) {
|
|
73
|
+
@if inspection.get-theme-version($theme) == 1 {
|
|
74
|
+
@include _theme-from-tokens(inspection.get-theme-tokens($theme, density));
|
|
82
75
|
}
|
|
83
76
|
@else {
|
|
84
|
-
$mdc-elevated-card-density-tokens: tokens-mdc-elevated-card.get-density-tokens($
|
|
85
|
-
$mdc-outlined-card-density-tokens: tokens-mdc-outlined-card.get-density-tokens($
|
|
86
|
-
$mat-card-density-tokens: tokens-mat-card.get-density-tokens($
|
|
77
|
+
$mdc-elevated-card-density-tokens: tokens-mdc-elevated-card.get-density-tokens($theme);
|
|
78
|
+
$mdc-outlined-card-density-tokens: tokens-mdc-outlined-card.get-density-tokens($theme);
|
|
79
|
+
$mat-card-density-tokens: tokens-mat-card.get-density-tokens($theme);
|
|
87
80
|
|
|
88
81
|
// Add values for card tokens.
|
|
89
82
|
@include sass-utils.current-selector-or-root() {
|
|
@@ -102,19 +95,15 @@
|
|
|
102
95
|
@include _theme-from-tokens(inspection.get-theme-tokens($theme));
|
|
103
96
|
}
|
|
104
97
|
@else {
|
|
105
|
-
$color: theming.get-color-config($theme);
|
|
106
|
-
$density: theming.get-density-config($theme);
|
|
107
|
-
$typography: theming.get-typography-config($theme);
|
|
108
|
-
|
|
109
98
|
@include base($theme);
|
|
110
|
-
@if $color
|
|
111
|
-
@include color($
|
|
99
|
+
@if inspection.theme-has($theme, color) {
|
|
100
|
+
@include color($theme);
|
|
112
101
|
}
|
|
113
|
-
@if $density
|
|
114
|
-
@include density($
|
|
102
|
+
@if inspection.theme-has($theme, density) {
|
|
103
|
+
@include density($theme);
|
|
115
104
|
}
|
|
116
|
-
@if $typography
|
|
117
|
-
@include typography($
|
|
105
|
+
@if inspection.theme-has($theme, typography) {
|
|
106
|
+
@include typography($theme);
|
|
118
107
|
}
|
|
119
108
|
}
|
|
120
109
|
}
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
@use '../core/mdc-helpers/mdc-helpers';
|
|
9
9
|
@use '../core/tokens/m2/mdc/checkbox' as tokens-mdc-checkbox;
|
|
10
10
|
|
|
11
|
-
@mixin base($
|
|
12
|
-
@if inspection.get-theme-version($
|
|
13
|
-
@include _theme-from-tokens(inspection.get-theme-tokens($
|
|
11
|
+
@mixin base($theme) {
|
|
12
|
+
@if inspection.get-theme-version($theme) == 1 {
|
|
13
|
+
@include _theme-from-tokens(inspection.get-theme-tokens($theme, base));
|
|
14
14
|
}
|
|
15
15
|
@else {
|
|
16
16
|
@include sass-utils.current-selector-or-root() {
|
|
@@ -19,59 +19,48 @@
|
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
@mixin color($
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
@if inspection.get-theme-version($config-or-theme) == 1 {
|
|
26
|
-
@include _theme-from-tokens(inspection.get-theme-tokens($config-or-theme, color));
|
|
22
|
+
@mixin color($theme) {
|
|
23
|
+
@if inspection.get-theme-version($theme) == 1 {
|
|
24
|
+
@include _theme-from-tokens(inspection.get-theme-tokens($theme, color));
|
|
27
25
|
}
|
|
28
26
|
@else {
|
|
29
|
-
$primary: map.get($config, primary);
|
|
30
|
-
$warn: map.get($config, warn);
|
|
31
|
-
$foreground: map.get($config, foreground);
|
|
32
|
-
|
|
33
27
|
@include sass-utils.current-selector-or-root() {
|
|
34
|
-
@include mdc-checkbox-theme.theme(tokens-mdc-checkbox.get-color-tokens($
|
|
28
|
+
@include mdc-checkbox-theme.theme(tokens-mdc-checkbox.get-color-tokens($theme));
|
|
35
29
|
}
|
|
36
30
|
|
|
37
31
|
.mat-mdc-checkbox {
|
|
38
32
|
&.mat-primary {
|
|
39
|
-
|
|
40
|
-
@include mdc-checkbox-theme.theme(tokens-mdc-checkbox.get-color-tokens($primary-config));
|
|
33
|
+
@include mdc-checkbox-theme.theme(tokens-mdc-checkbox.get-color-tokens($theme, primary));
|
|
41
34
|
}
|
|
42
35
|
|
|
43
36
|
&.mat-warn {
|
|
44
|
-
|
|
45
|
-
@include mdc-checkbox-theme.theme(tokens-mdc-checkbox.get-color-tokens($warn-config));
|
|
37
|
+
@include mdc-checkbox-theme.theme(tokens-mdc-checkbox.get-color-tokens($theme, warn));
|
|
46
38
|
}
|
|
47
39
|
|
|
48
|
-
@include mdc-helpers.using-mdc-theme($
|
|
40
|
+
@include mdc-helpers.using-mdc-theme($theme) {
|
|
49
41
|
// TODO(mmalerba): Switch to static-styles, theme-styles, and theme once they're available.
|
|
50
42
|
@include mdc-form-field.core-styles($query: mdc-helpers.$mdc-theme-styles-query);
|
|
51
43
|
}
|
|
52
44
|
|
|
53
45
|
&.mat-mdc-checkbox-disabled label {
|
|
54
46
|
// MDC should set the disabled color on the label, but doesn't, so we do it here instead.
|
|
55
|
-
color:
|
|
47
|
+
color: inspection.get-theme-color($theme, foreground, disabled-text);
|
|
56
48
|
}
|
|
57
49
|
}
|
|
58
50
|
}
|
|
59
51
|
}
|
|
60
52
|
|
|
61
|
-
@mixin typography($
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
@if inspection.get-theme-version($config-or-theme) == 1 {
|
|
66
|
-
@include _theme-from-tokens(inspection.get-theme-tokens($config-or-theme, typography));
|
|
53
|
+
@mixin typography($theme) {
|
|
54
|
+
@if inspection.get-theme-version($theme) == 1 {
|
|
55
|
+
@include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
|
|
67
56
|
}
|
|
68
57
|
@else {
|
|
69
58
|
@include sass-utils.current-selector-or-root() {
|
|
70
|
-
@include mdc-checkbox-theme.theme(tokens-mdc-checkbox.get-typography-tokens($
|
|
59
|
+
@include mdc-checkbox-theme.theme(tokens-mdc-checkbox.get-typography-tokens($theme));
|
|
71
60
|
}
|
|
72
61
|
|
|
73
62
|
.mat-mdc-checkbox {
|
|
74
|
-
@include mdc-helpers.using-mdc-typography($
|
|
63
|
+
@include mdc-helpers.using-mdc-typography($theme) {
|
|
75
64
|
// TODO(mmalerba): Switch to static-styles, theme-styles, and theme once they're available.
|
|
76
65
|
@include mdc-form-field.core-styles($query: mdc-helpers.$mdc-typography-styles-query);
|
|
77
66
|
}
|
|
@@ -79,15 +68,15 @@
|
|
|
79
68
|
}
|
|
80
69
|
}
|
|
81
70
|
|
|
82
|
-
@mixin density($
|
|
83
|
-
$density-scale:
|
|
71
|
+
@mixin density($theme) {
|
|
72
|
+
$density-scale: inspection.get-theme-density($theme);
|
|
84
73
|
|
|
85
|
-
@if inspection.get-theme-version($
|
|
86
|
-
@include _theme-from-tokens(inspection.get-theme-tokens($
|
|
74
|
+
@if inspection.get-theme-version($theme) == 1 {
|
|
75
|
+
@include _theme-from-tokens(inspection.get-theme-tokens($theme, density));
|
|
87
76
|
}
|
|
88
77
|
@else {
|
|
89
78
|
@include sass-utils.current-selector-or-root() {
|
|
90
|
-
@include mdc-checkbox-theme.theme(tokens-mdc-checkbox.get-density-tokens($
|
|
79
|
+
@include mdc-checkbox-theme.theme(tokens-mdc-checkbox.get-density-tokens($theme));
|
|
91
80
|
}
|
|
92
81
|
|
|
93
82
|
@include mdc-helpers.if-touch-targets-unsupported($density-scale) {
|
|
@@ -98,27 +87,21 @@
|
|
|
98
87
|
}
|
|
99
88
|
}
|
|
100
89
|
|
|
101
|
-
@mixin theme($theme
|
|
102
|
-
$theme: theming.private-legacy-get-theme($theme-or-color-config);
|
|
103
|
-
|
|
90
|
+
@mixin theme($theme) {
|
|
104
91
|
@include theming.private-check-duplicate-theme-styles($theme, 'mat-checkbox') {
|
|
105
92
|
@if inspection.get-theme-version($theme) == 1 {
|
|
106
93
|
@include _theme-from-tokens(inspection.get-theme-tokens($theme));
|
|
107
94
|
}
|
|
108
95
|
@else {
|
|
109
|
-
$color: theming.get-color-config($theme);
|
|
110
|
-
$density: theming.get-density-config($theme);
|
|
111
|
-
$typography: theming.get-typography-config($theme);
|
|
112
|
-
|
|
113
96
|
@include base($theme);
|
|
114
|
-
@if $color
|
|
115
|
-
@include color($
|
|
97
|
+
@if inspection.theme-has($theme, color) {
|
|
98
|
+
@include color($theme);
|
|
116
99
|
}
|
|
117
|
-
@if $density
|
|
118
|
-
@include density($
|
|
100
|
+
@if inspection.theme-has($theme, density) {
|
|
101
|
+
@include density($theme);
|
|
119
102
|
}
|
|
120
|
-
@if $typography
|
|
121
|
-
@include typography($
|
|
103
|
+
@if inspection.theme-has($theme, typography) {
|
|
104
|
+
@include typography($theme);
|
|
122
105
|
}
|
|
123
106
|
}
|
|
124
107
|
}
|
package/checkbox/index.d.ts
CHANGED
|
@@ -1,17 +1,10 @@
|
|
|
1
|
-
import { _AbstractConstructor } from '@angular/material/core';
|
|
2
1
|
import { AfterViewInit } from '@angular/core';
|
|
3
|
-
import { BooleanInput } from '@angular/cdk/coercion';
|
|
4
|
-
import { CanColor } from '@angular/material/core';
|
|
5
|
-
import { CanDisable } from '@angular/material/core';
|
|
6
|
-
import { CanDisableRipple } from '@angular/material/core';
|
|
7
2
|
import { ChangeDetectorRef } from '@angular/core';
|
|
8
3
|
import { CheckboxRequiredValidator } from '@angular/forms';
|
|
9
|
-
import { _Constructor } from '@angular/material/core';
|
|
10
4
|
import { ControlValueAccessor } from '@angular/forms';
|
|
11
5
|
import { ElementRef } from '@angular/core';
|
|
12
6
|
import { EventEmitter } from '@angular/core';
|
|
13
7
|
import { FocusableOption } from '@angular/cdk/a11y';
|
|
14
|
-
import { HasTabIndex } from '@angular/material/core';
|
|
15
8
|
import * as i0 from '@angular/core';
|
|
16
9
|
import * as i3 from '@angular/material/core';
|
|
17
10
|
import { InjectionToken } from '@angular/core';
|
|
@@ -46,7 +39,8 @@ export declare function MAT_CHECKBOX_DEFAULT_OPTIONS_FACTORY(): MatCheckboxDefau
|
|
|
46
39
|
|
|
47
40
|
export declare const MAT_CHECKBOX_REQUIRED_VALIDATOR: Provider;
|
|
48
41
|
|
|
49
|
-
export declare class MatCheckbox
|
|
42
|
+
export declare class MatCheckbox implements AfterViewInit, ControlValueAccessor, FocusableOption {
|
|
43
|
+
_elementRef: ElementRef<HTMLElement>;
|
|
50
44
|
private _changeDetectorRef;
|
|
51
45
|
private _ngZone;
|
|
52
46
|
_animationMode?: string | undefined;
|
|
@@ -83,9 +77,7 @@ export declare class MatCheckbox extends _MatCheckboxMixinBase implements AfterV
|
|
|
83
77
|
/** Returns the unique id for the visual hidden input. */
|
|
84
78
|
get inputId(): string;
|
|
85
79
|
/** Whether the checkbox is required. */
|
|
86
|
-
|
|
87
|
-
set required(value: BooleanInput);
|
|
88
|
-
private _required;
|
|
80
|
+
required: boolean;
|
|
89
81
|
/** Whether the label should appear after or before the checkbox. Defaults to 'after' */
|
|
90
82
|
labelPosition: 'before' | 'after';
|
|
91
83
|
/** Name value will be applied to the input element if present */
|
|
@@ -96,10 +88,16 @@ export declare class MatCheckbox extends _MatCheckboxMixinBase implements AfterV
|
|
|
96
88
|
readonly indeterminateChange: EventEmitter<boolean>;
|
|
97
89
|
/** The value attribute of the native input element */
|
|
98
90
|
value: string;
|
|
91
|
+
/** Whether the checkbox has a ripple. */
|
|
92
|
+
disableRipple: boolean;
|
|
99
93
|
/** The native `<input type="checkbox">` element */
|
|
100
94
|
_inputElement: ElementRef<HTMLInputElement>;
|
|
101
95
|
/** The native `<label>` element */
|
|
102
96
|
_labelElement: ElementRef<HTMLInputElement>;
|
|
97
|
+
/** Tabindex for the checkbox. */
|
|
98
|
+
tabIndex: number;
|
|
99
|
+
/** Palette color of the checkbox. */
|
|
100
|
+
color: string | undefined;
|
|
103
101
|
/**
|
|
104
102
|
* Reference to the MatRipple instance of the checkbox.
|
|
105
103
|
* @deprecated Considered an implementation detail. To be removed.
|
|
@@ -114,18 +112,15 @@ export declare class MatCheckbox extends _MatCheckboxMixinBase implements AfterV
|
|
|
114
112
|
private _currentAnimationClass;
|
|
115
113
|
private _currentCheckState;
|
|
116
114
|
private _controlValueAccessorChangeFn;
|
|
117
|
-
constructor(
|
|
115
|
+
constructor(_elementRef: ElementRef<HTMLElement>, _changeDetectorRef: ChangeDetectorRef, _ngZone: NgZone, tabIndex: string, _animationMode?: string | undefined, _options?: MatCheckboxDefaultOptions | undefined);
|
|
118
116
|
ngAfterViewInit(): void;
|
|
119
117
|
/** Whether the checkbox is checked. */
|
|
120
118
|
get checked(): boolean;
|
|
121
|
-
set checked(value:
|
|
119
|
+
set checked(value: boolean);
|
|
122
120
|
private _checked;
|
|
123
|
-
/**
|
|
124
|
-
* Whether the checkbox is disabled. This fully overrides the implementation provided by
|
|
125
|
-
* mixinDisabled, but the mixin is still required because mixinTabIndex requires it.
|
|
126
|
-
*/
|
|
121
|
+
/** Whether the checkbox is disabled. */
|
|
127
122
|
get disabled(): boolean;
|
|
128
|
-
set disabled(value:
|
|
123
|
+
set disabled(value: boolean);
|
|
129
124
|
private _disabled;
|
|
130
125
|
/**
|
|
131
126
|
* Whether the checkbox is indeterminate. This is also known as "mixed" mode and can be used to
|
|
@@ -134,7 +129,7 @@ export declare class MatCheckbox extends _MatCheckboxMixinBase implements AfterV
|
|
|
134
129
|
* set to false.
|
|
135
130
|
*/
|
|
136
131
|
get indeterminate(): boolean;
|
|
137
|
-
set indeterminate(value:
|
|
132
|
+
set indeterminate(value: boolean);
|
|
138
133
|
private _indeterminate;
|
|
139
134
|
_isRippleDisabled(): boolean;
|
|
140
135
|
/** Method being called whenever the label text changes. */
|
|
@@ -171,7 +166,13 @@ export declare class MatCheckbox extends _MatCheckboxMixinBase implements AfterV
|
|
|
171
166
|
*/
|
|
172
167
|
_preventBubblingFromLabel(event: MouseEvent): void;
|
|
173
168
|
static ɵfac: i0.ɵɵFactoryDeclaration<MatCheckbox, [null, null, null, { attribute: "tabindex"; }, { optional: true; }, { optional: true; }]>;
|
|
174
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MatCheckbox, "mat-checkbox", ["matCheckbox"], { "
|
|
169
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MatCheckbox, "mat-checkbox", ["matCheckbox"], { "ariaLabel": { "alias": "aria-label"; "required": false; }; "ariaLabelledby": { "alias": "aria-labelledby"; "required": false; }; "ariaDescribedby": { "alias": "aria-describedby"; "required": false; }; "id": { "alias": "id"; "required": false; }; "required": { "alias": "required"; "required": false; }; "labelPosition": { "alias": "labelPosition"; "required": false; }; "name": { "alias": "name"; "required": false; }; "value": { "alias": "value"; "required": false; }; "disableRipple": { "alias": "disableRipple"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "color": { "alias": "color"; "required": false; }; "checked": { "alias": "checked"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "indeterminate": { "alias": "indeterminate"; "required": false; }; }, { "change": "change"; "indeterminateChange": "indeterminateChange"; }, never, ["*"], false, never>;
|
|
170
|
+
static ngAcceptInputType_required: unknown;
|
|
171
|
+
static ngAcceptInputType_disableRipple: unknown;
|
|
172
|
+
static ngAcceptInputType_tabIndex: unknown;
|
|
173
|
+
static ngAcceptInputType_checked: unknown;
|
|
174
|
+
static ngAcceptInputType_disabled: unknown;
|
|
175
|
+
static ngAcceptInputType_indeterminate: unknown;
|
|
175
176
|
}
|
|
176
177
|
|
|
177
178
|
/** Change event object emitted by checkbox. */
|
|
@@ -199,13 +200,6 @@ export declare interface MatCheckboxDefaultOptions {
|
|
|
199
200
|
clickAction?: MatCheckboxClickAction;
|
|
200
201
|
}
|
|
201
202
|
|
|
202
|
-
/** @docs-private */
|
|
203
|
-
declare const _MatCheckboxMixinBase: _Constructor<HasTabIndex> & _AbstractConstructor<HasTabIndex> & _Constructor<CanColor> & _AbstractConstructor<CanColor> & _Constructor<CanDisableRipple> & _AbstractConstructor<CanDisableRipple> & _Constructor<CanDisable> & _AbstractConstructor<CanDisable> & {
|
|
204
|
-
new (_elementRef: ElementRef): {
|
|
205
|
-
_elementRef: ElementRef;
|
|
206
|
-
};
|
|
207
|
-
};
|
|
208
|
-
|
|
209
203
|
export declare class MatCheckboxModule {
|
|
210
204
|
static ɵfac: i0.ɵɵFactoryDeclaration<MatCheckboxModule, never>;
|
|
211
205
|
static ɵmod: i0.ɵɵNgModuleDeclaration<MatCheckboxModule, [typeof i2.MatCheckbox], [typeof i3.MatCommonModule, typeof i3.MatRippleModule, typeof _MatCheckboxRequiredValidatorModule], [typeof i2.MatCheckbox, typeof i3.MatCommonModule, typeof _MatCheckboxRequiredValidatorModule]>;
|
package/chips/_chips-theme.scss
CHANGED
|
@@ -1,99 +1,61 @@
|
|
|
1
1
|
@use 'sass:color';
|
|
2
|
-
@use 'sass:map';
|
|
3
|
-
@use 'sass:meta';
|
|
4
2
|
@use '@material/chips/chip-theme' as mdc-chip-theme;
|
|
5
3
|
@use '../core/tokens/m2/mdc/chip' as tokens-mdc-chip;
|
|
6
|
-
@use '../core/theming/palette';
|
|
7
4
|
@use '../core/theming/theming';
|
|
5
|
+
@use '../core/theming/inspection';
|
|
8
6
|
@use '../core/typography/typography';
|
|
9
|
-
@use '../core/mdc-helpers/mdc-helpers';
|
|
10
|
-
|
|
11
|
-
@function _get-default-palette($config) {
|
|
12
|
-
$is-dark: map.get($config, is-dark);
|
|
13
|
-
$grey-50: map.get(palette.$grey-palette, 50);
|
|
14
|
-
$grey-900: map.get(palette.$grey-palette, 900);
|
|
15
|
-
$default-foreground: if($is-dark, $grey-50, $grey-900);
|
|
16
|
-
|
|
17
|
-
$surface: map.get(map.get($config, background), card);
|
|
18
|
-
$on-surface: if(
|
|
19
|
-
mdc-helpers.variable-safe-contrast-tone($surface, $is-dark) == 'dark',
|
|
20
|
-
#000,
|
|
21
|
-
#fff
|
|
22
|
-
);
|
|
23
|
-
$default-background: if(
|
|
24
|
-
meta.type-of($on-surface) == color and meta.type-of($surface) == color,
|
|
25
|
-
color.mix($on-surface, $surface, 12%),
|
|
26
|
-
$on-surface
|
|
27
|
-
);
|
|
28
|
-
|
|
29
|
-
@return (default: $default-background, default-contrast: $default-foreground);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
@mixin color($config-or-theme) {
|
|
33
|
-
$config: theming.get-color-config($config-or-theme);
|
|
34
7
|
|
|
8
|
+
@mixin color($theme) {
|
|
35
9
|
.mat-mdc-standard-chip {
|
|
36
|
-
$default-
|
|
37
|
-
$default-config: map.merge($config, (primary: $default-palette));
|
|
38
|
-
$default-color-tokens: tokens-mdc-chip.get-color-tokens($default-config);
|
|
10
|
+
$default-color-tokens: tokens-mdc-chip.get-color-tokens($theme);
|
|
39
11
|
@include mdc-chip-theme.theme($default-color-tokens);
|
|
40
12
|
|
|
41
13
|
&.mat-mdc-chip-selected,
|
|
42
14
|
&.mat-mdc-chip-highlighted {
|
|
43
15
|
&.mat-primary {
|
|
44
|
-
$primary-color-tokens: tokens-mdc-chip.get-color-tokens($
|
|
16
|
+
$primary-color-tokens: tokens-mdc-chip.get-color-tokens($theme, primary);
|
|
45
17
|
@include mdc-chip-theme.theme($primary-color-tokens);
|
|
46
18
|
}
|
|
47
19
|
|
|
48
20
|
&.mat-accent {
|
|
49
|
-
$accent-
|
|
50
|
-
$accent-color-tokens: tokens-mdc-chip.get-color-tokens($accent-config);
|
|
21
|
+
$accent-color-tokens: tokens-mdc-chip.get-color-tokens($theme, accent);
|
|
51
22
|
@include mdc-chip-theme.theme($accent-color-tokens);
|
|
52
23
|
}
|
|
53
24
|
|
|
54
25
|
&.mat-warn {
|
|
55
|
-
$warn-
|
|
56
|
-
$warn-color-tokens: tokens-mdc-chip.get-color-tokens($warn-config);
|
|
26
|
+
$warn-color-tokens: tokens-mdc-chip.get-color-tokens($theme, warn);
|
|
57
27
|
@include mdc-chip-theme.theme($warn-color-tokens);
|
|
58
28
|
}
|
|
59
29
|
}
|
|
60
30
|
}
|
|
61
31
|
}
|
|
62
32
|
|
|
63
|
-
@mixin typography($
|
|
64
|
-
$
|
|
65
|
-
theming.get-typography-config($config-or-theme)
|
|
66
|
-
);
|
|
67
|
-
$typography-tokens: tokens-mdc-chip.get-typography-tokens($config);
|
|
33
|
+
@mixin typography($theme) {
|
|
34
|
+
$typography-tokens: tokens-mdc-chip.get-typography-tokens($theme);
|
|
68
35
|
|
|
69
36
|
.mat-mdc-standard-chip {
|
|
70
37
|
@include mdc-chip-theme.theme($typography-tokens);
|
|
71
38
|
}
|
|
72
39
|
}
|
|
73
40
|
|
|
74
|
-
@mixin density($
|
|
75
|
-
$density-
|
|
76
|
-
|
|
41
|
+
@mixin density($theme) {
|
|
42
|
+
$density-tokens: tokens-mdc-chip.get-density-tokens($theme);
|
|
43
|
+
|
|
77
44
|
.mat-mdc-chip.mat-mdc-standard-chip {
|
|
78
45
|
@include mdc-chip-theme.theme($density-tokens);
|
|
79
46
|
}
|
|
80
47
|
}
|
|
81
48
|
|
|
82
|
-
@mixin theme($theme
|
|
83
|
-
$theme: theming.private-legacy-get-theme($theme-or-color-config);
|
|
49
|
+
@mixin theme($theme) {
|
|
84
50
|
@include theming.private-check-duplicate-theme-styles($theme, 'mat-chips') {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
$typography: theming.get-typography-config($theme);
|
|
88
|
-
|
|
89
|
-
@if $color != null {
|
|
90
|
-
@include color($color);
|
|
51
|
+
@if inspection.theme-has($theme, color) {
|
|
52
|
+
@include color($theme);
|
|
91
53
|
}
|
|
92
|
-
@if $density
|
|
93
|
-
@include density($
|
|
54
|
+
@if inspection.theme-has($theme, density) {
|
|
55
|
+
@include density($theme);
|
|
94
56
|
}
|
|
95
|
-
@if $typography
|
|
96
|
-
@include typography($
|
|
57
|
+
@if inspection.theme-has($theme, typography) {
|
|
58
|
+
@include typography($theme);
|
|
97
59
|
}
|
|
98
60
|
}
|
|
99
61
|
}
|
package/core/_core-theme.scss
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
@use '
|
|
2
|
-
@use 'theming/
|
|
1
|
+
@use './theming/theming';
|
|
2
|
+
@use './theming/inspection';
|
|
3
3
|
@use './style/private';
|
|
4
4
|
@use './ripple/ripple-theme';
|
|
5
5
|
@use './option/option-theme';
|
|
@@ -8,23 +8,18 @@
|
|
|
8
8
|
@use './style/elevation';
|
|
9
9
|
@use './typography/typography';
|
|
10
10
|
|
|
11
|
-
@mixin color($
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
@include
|
|
15
|
-
@include
|
|
16
|
-
@include optgroup-theme.color($config);
|
|
17
|
-
@include pseudo-checkbox-theme.color($config);
|
|
11
|
+
@mixin color($theme) {
|
|
12
|
+
@include ripple-theme.color($theme);
|
|
13
|
+
@include option-theme.color($theme);
|
|
14
|
+
@include optgroup-theme.color($theme);
|
|
15
|
+
@include pseudo-checkbox-theme.color($theme);
|
|
18
16
|
|
|
19
17
|
// Wrapper element that provides the theme background when the user's content isn't
|
|
20
18
|
// inside of a `mat-sidenav-container`. Note that we need to exclude the ampersand
|
|
21
19
|
// selector in case the mixin is included at the top level.
|
|
22
20
|
.mat-app-background#{if(&, ', &.mat-app-background', '')} {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
background-color: theming.get-color-from-palette($background, background);
|
|
27
|
-
color: theming.get-color-from-palette($foreground, text);
|
|
21
|
+
background-color: inspection.get-theme-color($theme, background, background);
|
|
22
|
+
color: inspection.get-theme-color($theme, foreground, text);
|
|
28
23
|
}
|
|
29
24
|
|
|
30
25
|
// Provides external CSS classes for each elevation value. Each CSS class is formatted as
|
|
@@ -35,7 +30,7 @@
|
|
|
35
30
|
// We need the `mat-mdc-elevation-specific`, because some MDC mixins
|
|
36
31
|
// come with elevation baked in and we don't have a way of removing it.
|
|
37
32
|
.#{$selector}, .mat-mdc-elevation-specific.#{$selector} {
|
|
38
|
-
@include private.private-theme-elevation($zValue, $
|
|
33
|
+
@include private.private-theme-elevation($zValue, $theme);
|
|
39
34
|
}
|
|
40
35
|
}
|
|
41
36
|
|
|
@@ -47,46 +42,36 @@
|
|
|
47
42
|
}
|
|
48
43
|
}
|
|
49
44
|
|
|
50
|
-
@mixin typography($
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
@include option-theme.typography($config);
|
|
55
|
-
@include optgroup-theme.typography($config);
|
|
56
|
-
@include pseudo-checkbox-theme.typography($config);
|
|
45
|
+
@mixin typography($theme) {
|
|
46
|
+
@include option-theme.typography($theme);
|
|
47
|
+
@include optgroup-theme.typography($theme);
|
|
48
|
+
@include pseudo-checkbox-theme.typography($theme);
|
|
57
49
|
// TODO(mmalerba): add typography mixin for this.
|
|
58
50
|
// @include ripple-theme.typography($config);
|
|
59
51
|
}
|
|
60
52
|
|
|
61
|
-
@mixin density($
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
@include option-theme.density($density-scale);
|
|
65
|
-
@include optgroup-theme.density($density-scale);
|
|
53
|
+
@mixin density($theme) {
|
|
54
|
+
@include option-theme.density($theme);
|
|
55
|
+
@include optgroup-theme.density($theme);
|
|
66
56
|
// TODO(mmalerba): add density mixins for these.
|
|
67
57
|
// @include ripple-theme.density($density-scale);
|
|
68
58
|
// @include pseudo-checkbox-theme.density($density-scale);
|
|
69
59
|
}
|
|
70
60
|
|
|
71
61
|
// Mixin that renders all of the core styles that depend on the theme.
|
|
72
|
-
@mixin theme($theme
|
|
73
|
-
$theme: theming.private-legacy-get-theme($theme-or-color-config);
|
|
62
|
+
@mixin theme($theme) {
|
|
74
63
|
// Wrap the sub-theme includes in the duplicate theme styles mixin. This ensures that
|
|
75
64
|
// there won't be multiple warnings. e.g. if `mat-core-theme` reports a warning, then
|
|
76
65
|
// the imported themes (such as `mat-ripple-theme`) should not report again.
|
|
77
66
|
@include theming.private-check-duplicate-theme-styles($theme, 'mat-core') {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
$typography: theming.get-typography-config($theme);
|
|
81
|
-
|
|
82
|
-
@if $color != null {
|
|
83
|
-
@include color($color);
|
|
67
|
+
@if inspection.theme-has($theme, color) {
|
|
68
|
+
@include color($theme);
|
|
84
69
|
}
|
|
85
|
-
@if $density
|
|
86
|
-
@include density($
|
|
70
|
+
@if inspection.theme-has($theme, density) {
|
|
71
|
+
@include density($theme);
|
|
87
72
|
}
|
|
88
|
-
@if $typography
|
|
89
|
-
@include typography($
|
|
73
|
+
@if inspection.theme-has($theme, typography) {
|
|
74
|
+
@include typography($theme);
|
|
90
75
|
}
|
|
91
76
|
}
|
|
92
77
|
}
|
|
@@ -1,25 +1,17 @@
|
|
|
1
1
|
@use '../theming/all-theme';
|
|
2
|
-
@use '../theming/
|
|
2
|
+
@use '../theming/inspection';
|
|
3
3
|
|
|
4
4
|
// Includes all of the color styles.
|
|
5
|
-
@mixin all-component-colors($
|
|
6
|
-
|
|
7
|
-
// the color system, extract the color config from the theme object.
|
|
8
|
-
$config: if(theming.private-is-theme-object($config-or-theme),
|
|
9
|
-
theming.get-color-config($config-or-theme), $config-or-theme);
|
|
10
|
-
|
|
11
|
-
@if $config == null {
|
|
5
|
+
@mixin all-component-colors($theme) {
|
|
6
|
+
@if not inspection.theme-has($theme, color) {
|
|
12
7
|
@error 'No color configuration specified.';
|
|
13
8
|
}
|
|
14
9
|
|
|
15
|
-
@include all-theme.all-component-themes(
|
|
16
|
-
|
|
17
|
-
typography: null,
|
|
18
|
-
density: null,
|
|
19
|
-
));
|
|
10
|
+
@include all-theme.all-component-themes(
|
|
11
|
+
inspection.theme-remove($theme, base, typography, density));
|
|
20
12
|
}
|
|
21
13
|
|
|
22
14
|
// @deprecated Use `all-component-colors`.
|
|
23
|
-
@mixin angular-material-color($
|
|
24
|
-
@include all-component-colors($
|
|
15
|
+
@mixin angular-material-color($theme) {
|
|
16
|
+
@include all-component-colors($theme);
|
|
25
17
|
}
|