@angular/material 20.1.0-next.0 → 20.1.0-next.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_index.scss +1 -2
- package/autocomplete/_autocomplete-theme.scss +28 -37
- package/autocomplete/_m2-autocomplete.scss +5 -2
- package/badge/_badge-theme.scss +35 -44
- package/badge/_m2-badge.scss +3 -2
- package/bottom-sheet/_bottom-sheet-theme.scss +28 -40
- package/bottom-sheet/_m2-bottom-sheet.scss +12 -11
- package/button/_button-theme.scss +37 -55
- package/button/_fab-theme.scss +42 -56
- package/button/_icon-button-theme.scss +30 -48
- package/button/_m2-button.scss +60 -59
- package/button/_m2-fab.scss +19 -15
- package/button/_m2-icon-button.scss +7 -5
- package/button/testing/index.d.ts +1 -0
- package/button-toggle/_button-toggle-theme.scss +29 -44
- package/button-toggle/_m2-button-toggle.scss +11 -17
- package/card/_card-theme.scss +28 -36
- package/card/_m2-card.scss +12 -14
- package/checkbox/_checkbox-theme.scss +35 -50
- package/checkbox/_m2-checkbox.scss +8 -8
- package/chips/_chips-theme.scss +24 -30
- package/chips/_m2-chip.scss +12 -28
- package/core/_core-theme.scss +48 -67
- package/core/focus-indicators/_private.scss +2 -5
- package/core/m2/_theming.scss +68 -113
- package/core/option/_m2-optgroup.scss +10 -7
- package/core/option/_m2-option.scss +13 -11
- package/core/option/_optgroup-theme.scss +28 -30
- package/core/option/_option-theme.scss +35 -34
- package/core/ripple/_m2-ripple.scss +6 -10
- package/core/ripple/_ripple-theme.scss +28 -33
- package/core/selection/pseudo-checkbox/_m2-pseudo-checkbox.scss +2 -3
- package/core/selection/pseudo-checkbox/_pseudo-checkbox-theme.scss +55 -45
- package/core/theming/_all-theme.scss +38 -42
- package/core/theming/_definition.scss +20 -13
- package/core/theming/_inspection.scss +0 -12
- package/core/theming/_m2-inspection.scss +0 -33
- package/core/theming/_theming.scss +4 -172
- package/core/tokens/_m2-utils.scss +5 -75
- package/core/tokens/_m3-system.scss +11 -9
- package/core/tokens/_m3-utils.scss +2 -14
- package/core/tokens/_token-utils.scss +7 -27
- package/core/tokens/m2/_index.scss +6 -0
- package/core/tokens/m2/_md-sys-color.scss +123 -0
- package/core/tokens/m2/_md-sys-elevation.scss +16 -0
- package/core/tokens/m2/_md-sys-motion.scss +36 -0
- package/core/tokens/m2/_md-sys-shape.scss +22 -0
- package/core/tokens/m2/_md-sys-state.scss +15 -0
- package/core/tokens/m2/_md-sys-typescale.scss +68 -0
- package/core/tokens/m3/_md-sys-color.scss +2 -2
- package/core/tokens/m3/_md-sys-typescale.scss +1 -1
- package/core/tokens/m3/_theme.scss +14 -26
- package/datepicker/_datepicker-theme.scss +47 -87
- package/datepicker/_m2-datepicker.scss +33 -123
- package/datepicker/index.d.ts +1 -1
- package/dialog/_dialog-theme.scss +28 -34
- package/dialog/_m2-dialog.scss +17 -17
- package/divider/_divider-theme.scss +28 -30
- package/divider/_m2-divider.scss +4 -2
- package/expansion/_expansion-theme.scss +28 -39
- package/expansion/_m2-expansion.scss +11 -10
- package/expansion/_m3-expansion.scss +2 -0
- package/fesm2022/animation-DfMFjxHu.mjs.map +1 -1
- package/fesm2022/autocomplete/testing.mjs.map +1 -1
- package/fesm2022/autocomplete.mjs +1 -1
- package/fesm2022/autocomplete.mjs.map +1 -1
- package/fesm2022/badge/testing.mjs.map +1 -1
- package/fesm2022/badge.mjs.map +1 -1
- package/fesm2022/bottom-sheet/testing.mjs.map +1 -1
- package/fesm2022/bottom-sheet.mjs.map +1 -1
- package/fesm2022/button/testing.mjs +7 -4
- package/fesm2022/button/testing.mjs.map +1 -1
- package/fesm2022/button-toggle/testing.mjs.map +1 -1
- package/fesm2022/button-toggle.mjs.map +1 -1
- package/fesm2022/button.mjs +2 -2
- package/fesm2022/button.mjs.map +1 -1
- package/fesm2022/card/testing.mjs.map +1 -1
- package/fesm2022/card.mjs.map +1 -1
- package/fesm2022/checkbox/testing.mjs.map +1 -1
- package/fesm2022/checkbox.mjs.map +1 -1
- package/fesm2022/chips/testing.mjs.map +1 -1
- package/fesm2022/chips.mjs +1 -1
- package/fesm2022/chips.mjs.map +1 -1
- package/fesm2022/common-module-cKSwHniA.mjs.map +1 -1
- package/fesm2022/core/testing.mjs.map +1 -1
- package/fesm2022/core.mjs +1 -1
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/date-formats-K6TQue-Y.mjs.map +1 -1
- package/fesm2022/date-range-input-harness-DEyfkeOs.mjs.map +1 -1
- package/fesm2022/datepicker/testing.mjs.map +1 -1
- package/fesm2022/datepicker.mjs +1 -1
- package/fesm2022/datepicker.mjs.map +1 -1
- package/fesm2022/dialog/testing.mjs.map +1 -1
- package/fesm2022/dialog.mjs.map +1 -1
- package/fesm2022/divider/testing.mjs.map +1 -1
- package/fesm2022/divider.mjs.map +1 -1
- package/fesm2022/error-options-DCNQlTOA.mjs.map +1 -1
- package/fesm2022/error-state-Dtb1IHM-.mjs.map +1 -1
- package/fesm2022/expansion/testing.mjs.map +1 -1
- package/fesm2022/expansion.mjs +2 -2
- package/fesm2022/expansion.mjs.map +1 -1
- package/fesm2022/form-field/testing/control.mjs.map +1 -1
- package/fesm2022/form-field/testing.mjs.map +1 -1
- package/fesm2022/{form-field-C9DZXojn.mjs → form-field-CFbrnFED.mjs} +3 -3
- package/fesm2022/form-field-CFbrnFED.mjs.map +1 -0
- package/fesm2022/form-field.mjs +2 -2
- package/fesm2022/form-field.mjs.map +1 -1
- package/fesm2022/grid-list/testing.mjs.map +1 -1
- package/fesm2022/grid-list.mjs.map +1 -1
- package/fesm2022/icon/testing.mjs.map +1 -1
- package/fesm2022/icon-button-DxiIc1ex.mjs.map +1 -1
- package/fesm2022/icon-registry-CwOTJ7YM.mjs.map +1 -1
- package/fesm2022/icon.mjs.map +1 -1
- package/fesm2022/index-BFRo2fUq.mjs.map +1 -1
- package/fesm2022/index-DwiL-HGk.mjs.map +1 -1
- package/fesm2022/input/testing.mjs.map +1 -1
- package/fesm2022/input-harness-C5Msdc4-.mjs.map +1 -1
- package/fesm2022/input-value-accessor-D1GvPuqO.mjs.map +1 -1
- package/fesm2022/input.mjs +3 -27
- package/fesm2022/input.mjs.map +1 -1
- package/fesm2022/internal-form-field-D5iFxU6d.mjs.map +1 -1
- package/fesm2022/line-Bz5f9Cyx.mjs.map +1 -1
- package/fesm2022/list/testing.mjs.map +1 -1
- package/fesm2022/list.mjs.map +1 -1
- package/fesm2022/material.mjs.map +1 -1
- package/fesm2022/menu/testing.mjs +97 -13
- package/fesm2022/menu/testing.mjs.map +1 -1
- package/fesm2022/menu.mjs +343 -122
- package/fesm2022/menu.mjs.map +1 -1
- package/fesm2022/{module-BDiw_nWS.mjs → module-B0CLRw5e.mjs} +3 -3
- package/fesm2022/module-B0CLRw5e.mjs.map +1 -0
- package/fesm2022/{module-DzZHEh7B.mjs → module-B62K-792.mjs} +2 -2
- package/fesm2022/module-B62K-792.mjs.map +1 -0
- package/fesm2022/module-CWxMD37a.mjs.map +1 -1
- package/fesm2022/module-Ce6F7TNm.mjs.map +1 -1
- package/fesm2022/option-BzhYL_xC.mjs.map +1 -1
- package/fesm2022/option-harness-BFcc-M_4.mjs.map +1 -1
- package/fesm2022/paginator/testing.mjs.map +1 -1
- package/fesm2022/paginator.mjs +3 -3
- package/fesm2022/paginator.mjs.map +1 -1
- package/fesm2022/progress-bar/testing.mjs.map +1 -1
- package/fesm2022/progress-bar.mjs.map +1 -1
- package/fesm2022/progress-spinner/testing.mjs.map +1 -1
- package/fesm2022/progress-spinner.mjs.map +1 -1
- package/fesm2022/pseudo-checkbox-DDmgx3P4.mjs.map +1 -1
- package/fesm2022/pseudo-checkbox-module-4F8Up4PL.mjs.map +1 -1
- package/fesm2022/public-api-BoO5eSq-.mjs.map +1 -1
- package/fesm2022/radio/testing.mjs.map +1 -1
- package/fesm2022/radio.mjs.map +1 -1
- package/fesm2022/ripple-BYgV4oZC.mjs.map +1 -1
- package/fesm2022/ripple-loader-BnMiRtmT.mjs.map +1 -1
- package/fesm2022/select/testing.mjs.map +1 -1
- package/fesm2022/select.mjs +3 -3
- package/fesm2022/select.mjs.map +1 -1
- package/fesm2022/sidenav/testing.mjs.map +1 -1
- package/fesm2022/sidenav.mjs.map +1 -1
- package/fesm2022/slide-toggle/testing.mjs.map +1 -1
- package/fesm2022/slide-toggle.mjs +2 -2
- package/fesm2022/slide-toggle.mjs.map +1 -1
- package/fesm2022/slider/testing.mjs.map +1 -1
- package/fesm2022/slider.mjs +2 -2
- package/fesm2022/slider.mjs.map +1 -1
- package/fesm2022/snack-bar/testing.mjs.map +1 -1
- package/fesm2022/snack-bar.mjs +2 -2
- package/fesm2022/snack-bar.mjs.map +1 -1
- package/fesm2022/sort/testing.mjs.map +1 -1
- package/fesm2022/sort.mjs.map +1 -1
- package/fesm2022/stepper/testing.mjs.map +1 -1
- package/fesm2022/stepper.mjs.map +1 -1
- package/fesm2022/structural-styles-CObeNzjn.mjs.map +1 -1
- package/fesm2022/table/testing.mjs.map +1 -1
- package/fesm2022/table.mjs.map +1 -1
- package/fesm2022/tabs/testing.mjs.map +1 -1
- package/fesm2022/tabs.mjs.map +1 -1
- package/fesm2022/timepicker/testing.mjs.map +1 -1
- package/fesm2022/timepicker.mjs +1 -1
- package/fesm2022/timepicker.mjs.map +1 -1
- package/fesm2022/toolbar/testing.mjs.map +1 -1
- package/fesm2022/toolbar.mjs.map +1 -1
- package/fesm2022/tooltip/testing.mjs.map +1 -1
- package/fesm2022/tooltip.mjs.map +1 -1
- package/fesm2022/tree/testing.mjs.map +1 -1
- package/fesm2022/tree.mjs.map +1 -1
- package/form-field/_form-field-theme.scss +35 -51
- package/form-field/_m2-form-field.scss +23 -31
- package/grid-list/_grid-list-theme.scss +28 -28
- package/grid-list/_m2-grid-list.scss +7 -9
- package/icon/_icon-theme.scss +40 -41
- package/input/_input-theme.scss +1 -4
- package/input/index.d.ts +0 -11
- package/list/_list-theme.scss +55 -53
- package/list/_m2-list.scss +21 -35
- package/menu/_m2-menu.scss +18 -15
- package/menu/_menu-theme.scss +28 -33
- package/menu/index.d.ts +145 -61
- package/menu/testing/index.d.ts +50 -2
- package/package.json +2 -2
- package/paginator/_m2-paginator.scss +9 -9
- package/paginator/_paginator-theme.scss +28 -33
- package/prebuilt-themes/azure-blue.css +1 -1
- package/prebuilt-themes/cyan-orange.css +1 -1
- package/prebuilt-themes/deeppurple-amber.css +1 -1
- package/prebuilt-themes/indigo-pink.css +1 -1
- package/prebuilt-themes/magenta-violet.css +1 -1
- package/prebuilt-themes/pink-bluegrey.css +1 -1
- package/prebuilt-themes/purple-green.css +1 -1
- package/prebuilt-themes/rose-red.css +1 -1
- package/progress-bar/_progress-bar-theme.scss +35 -43
- package/progress-spinner/_progress-spinner-theme.scss +42 -43
- package/radio/_m2-radio.scss +6 -5
- package/radio/_m3-radio.scss +1 -1
- package/radio/_radio-theme.scss +33 -46
- package/schematics/ng-add/index.js +1 -1
- package/select/_m2-select.scss +10 -8
- package/select/_select-theme.scss +38 -48
- package/sidenav/_sidenav-theme.scss +28 -30
- package/slide-toggle/_m2-slide-toggle.scss +45 -58
- package/slide-toggle/_m3-slide-toggle.scss +1 -0
- package/slide-toggle/_slide-toggle-theme.scss +41 -79
- package/slider/_m2-slider.scss +33 -35
- package/slider/_slider-theme.scss +38 -45
- package/snack-bar/_m2-snack-bar.scss +5 -6
- package/snack-bar/_snack-bar-theme.scss +28 -31
- package/sort/_m2-sort.scss +5 -2
- package/sort/_sort-theme.scss +28 -33
- package/stepper/_m2-stepper.scss +10 -13
- package/stepper/_stepper-theme.scss +41 -49
- package/table/_m2-table.scss +23 -28
- package/table/_table-theme.scss +28 -36
- package/tabs/_m2-tabs.scss +11 -16
- package/tabs/_tabs-theme.scss +35 -43
- package/timepicker/_m2-timepicker.scss +5 -2
- package/timepicker/_timepicker-theme.scss +28 -46
- package/toolbar/_m2-toolbar.scss +10 -9
- package/toolbar/_toolbar-theme.scss +55 -46
- package/tooltip/_m2-tooltip.scss +5 -6
- package/tooltip/_tooltip-theme.scss +28 -37
- package/tree/_m2-tree.scss +9 -5
- package/tree/_tree-theme.scss +28 -38
- package/core/tokens/_format-tokens.scss +0 -5
- package/fesm2022/form-field-C9DZXojn.mjs.map +0 -1
- package/fesm2022/module-BDiw_nWS.mjs.map +0 -1
- package/fesm2022/module-DzZHEh7B.mjs.map +0 -1
|
@@ -1,62 +1,56 @@
|
|
|
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 './m2-progress-bar';
|
|
6
4
|
@use './m3-progress-bar';
|
|
7
5
|
@use 'sass:map';
|
|
8
6
|
|
|
9
|
-
/// Outputs base theme styles (styles not dependent on the color, typography, or density settings)
|
|
10
|
-
/// for the mat-progress-bar.
|
|
11
|
-
/// @param {Map} $theme The theme to generate base styles for.
|
|
12
7
|
@mixin base($theme) {
|
|
8
|
+
$tokens: m2-progress-bar.get-unthemable-tokens();
|
|
13
9
|
@if inspection.get-theme-version($theme) == 1 {
|
|
14
|
-
|
|
15
|
-
} @else {
|
|
16
|
-
// Add default values for tokens not related to color, typography, or density.
|
|
17
|
-
@include sass-utils.current-selector-or-root() {
|
|
18
|
-
@include token-utils.create-token-values-mixed(m2-progress-bar.get-unthemable-tokens());
|
|
19
|
-
}
|
|
10
|
+
$tokens: map.get(m3-progress-bar.get-tokens($theme), base);
|
|
20
11
|
}
|
|
21
|
-
}
|
|
22
12
|
|
|
23
|
-
@
|
|
24
|
-
@include token-utils.create-token-values-mixed(
|
|
25
|
-
m2-progress-bar.get-color-tokens($theme, $palette-name));
|
|
13
|
+
@include token-utils.values($tokens);
|
|
26
14
|
}
|
|
27
15
|
|
|
28
|
-
/// Outputs color theme styles for the mat-progress-bar.
|
|
29
|
-
/// @param {Map} $theme The theme to generate color styles for.
|
|
30
|
-
/// @param {ArgList} Additional optional arguments (only supported for M3 themes):
|
|
31
|
-
/// $color-variant: The color variant to use for the progress bar: primary, secondary, tertiary,
|
|
32
|
-
/// or error (If not specified, default primary color will be used).
|
|
33
16
|
@mixin color($theme, $color-variant: null) {
|
|
34
17
|
@if inspection.get-theme-version($theme) == 1 {
|
|
35
|
-
@include token-utils.
|
|
18
|
+
@include token-utils.values(
|
|
36
19
|
map.get(m3-progress-bar.get-tokens($theme, $color-variant), color));
|
|
37
20
|
} @else {
|
|
38
21
|
.mat-mdc-progress-bar {
|
|
39
|
-
|
|
22
|
+
$tokens: m2-progress-bar.get-color-tokens($theme, primary);
|
|
23
|
+
@include token-utils.values($tokens);
|
|
40
24
|
|
|
41
25
|
&.mat-accent {
|
|
42
|
-
|
|
26
|
+
$tokens: m2-progress-bar.get-color-tokens($theme, secondary);
|
|
27
|
+
@include token-utils.values($tokens);
|
|
43
28
|
}
|
|
44
29
|
|
|
45
30
|
&.mat-warn {
|
|
46
|
-
|
|
31
|
+
$tokens: m2-progress-bar.get-color-tokens($theme, error);
|
|
32
|
+
@include token-utils.values($tokens);
|
|
47
33
|
}
|
|
48
34
|
}
|
|
49
35
|
}
|
|
50
36
|
}
|
|
51
37
|
|
|
52
|
-
/// Outputs typography theme styles for the mat-progress-bar.
|
|
53
|
-
/// @param {Map} $theme The theme to generate typography styles for.
|
|
54
38
|
@mixin typography($theme) {
|
|
39
|
+
$tokens: m2-progress-bar.get-typography-tokens($theme);
|
|
40
|
+
@if inspection.get-theme-version($theme) == 1 {
|
|
41
|
+
$tokens: map.get(m3-progress-bar.get-tokens($theme), typography);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
@include token-utils.values($tokens);
|
|
55
45
|
}
|
|
56
46
|
|
|
57
|
-
/// Outputs density theme styles for the mat-progress-bar.
|
|
58
|
-
/// @param {Map} $theme The theme to generate density styles for.
|
|
59
47
|
@mixin density($theme) {
|
|
48
|
+
$tokens: m2-progress-bar.get-density-tokens($theme);
|
|
49
|
+
@if inspection.get-theme-version($theme) == 1 {
|
|
50
|
+
$tokens: map.get(m3-progress-bar.get-tokens($theme), density);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
@include token-utils.values($tokens);
|
|
60
54
|
}
|
|
61
55
|
|
|
62
56
|
/// Defines the tokens that will be available in the `overrides` mixin and for docs extraction.
|
|
@@ -79,23 +73,21 @@
|
|
|
79
73
|
/// @param {Map} $theme The theme to generate styles for.
|
|
80
74
|
/// @param {String} $color-variant The color variant to use for the component (M3 only)
|
|
81
75
|
@mixin theme($theme, $color-variant: null) {
|
|
82
|
-
@
|
|
83
|
-
@
|
|
84
|
-
|
|
85
|
-
|
|
76
|
+
@if inspection.get-theme-version($theme) == 1 {
|
|
77
|
+
@include base($theme);
|
|
78
|
+
@include color($theme, $color-variant);
|
|
79
|
+
@include density($theme);
|
|
80
|
+
@include typography($theme);
|
|
81
|
+
} @else {
|
|
82
|
+
@include base($theme);
|
|
83
|
+
@if inspection.theme-has($theme, color) {
|
|
84
|
+
@include color($theme);
|
|
85
|
+
}
|
|
86
|
+
@if inspection.theme-has($theme, density) {
|
|
86
87
|
@include density($theme);
|
|
88
|
+
}
|
|
89
|
+
@if inspection.theme-has($theme, typography) {
|
|
87
90
|
@include typography($theme);
|
|
88
|
-
} @else {
|
|
89
|
-
@include base($theme);
|
|
90
|
-
@if inspection.theme-has($theme, color) {
|
|
91
|
-
@include color($theme);
|
|
92
|
-
}
|
|
93
|
-
@if inspection.theme-has($theme, density) {
|
|
94
|
-
@include density($theme);
|
|
95
|
-
}
|
|
96
|
-
@if inspection.theme-has($theme, typography) {
|
|
97
|
-
@include typography($theme);
|
|
98
|
-
}
|
|
99
91
|
}
|
|
100
92
|
}
|
|
101
93
|
}
|
|
@@ -1,57 +1,58 @@
|
|
|
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 './m2-progress-spinner';
|
|
6
4
|
@use './m3-progress-spinner';
|
|
7
5
|
@use 'sass:map';
|
|
8
6
|
|
|
9
|
-
/// Outputs base theme styles (styles not dependent on the color, typography, or density settings)
|
|
10
|
-
/// for the mat-progress-spinner.
|
|
11
|
-
/// @param {Map} $theme The theme to generate base styles for.
|
|
12
7
|
@mixin base($theme) {
|
|
8
|
+
$tokens: m2-progress-spinner.get-unthemable-tokens();
|
|
13
9
|
@if inspection.get-theme-version($theme) == 1 {
|
|
14
|
-
|
|
15
|
-
} @else {
|
|
16
|
-
@include sass-utils.current-selector-or-root() {
|
|
17
|
-
@include token-utils.create-token-values-mixed(m2-progress-spinner.get-unthemable-tokens());
|
|
18
|
-
}
|
|
10
|
+
$tokens: map.get(m3-progress-spinner.get-tokens($theme), base);
|
|
19
11
|
}
|
|
12
|
+
|
|
13
|
+
@include token-utils.values($tokens);
|
|
20
14
|
}
|
|
21
15
|
|
|
22
16
|
/// Outputs color theme styles for the mat-progress-spinner.
|
|
23
17
|
/// @param {Map} $theme The theme to generate color styles for.
|
|
24
18
|
/// @param {String} $color-variant The color variant to use for the component (M3 only)
|
|
25
19
|
@mixin color($theme, $color-variant: null) {
|
|
20
|
+
$tokens: m2-progress-spinner.get-color-tokens($theme, primary);
|
|
26
21
|
@if inspection.get-theme-version($theme) == 1 {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
} @else {
|
|
30
|
-
@include sass-utils.current-selector-or-root() {
|
|
31
|
-
@include token-utils.create-token-values-mixed(
|
|
32
|
-
m2-progress-spinner.get-color-tokens($theme, primary));
|
|
22
|
+
$tokens: map.get(m3-progress-spinner.get-tokens($theme, $color-variant), color);
|
|
23
|
+
}
|
|
33
24
|
|
|
34
|
-
|
|
35
|
-
@include token-utils.create-token-values-mixed(
|
|
36
|
-
m2-progress-spinner.get-color-tokens($theme, secondary));
|
|
37
|
-
}
|
|
25
|
+
@include token-utils.values($tokens);
|
|
38
26
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
27
|
+
@if inspection.get-theme-version($theme) != 1 {
|
|
28
|
+
.mat-accent {
|
|
29
|
+
$tokens: m2-progress-spinner.get-color-tokens($theme, secondary);
|
|
30
|
+
@include token-utils.values($tokens);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.mat-warn {
|
|
34
|
+
$tokens: m2-progress-spinner.get-color-tokens($theme, error);
|
|
35
|
+
@include token-utils.values($tokens);
|
|
43
36
|
}
|
|
44
37
|
}
|
|
45
38
|
}
|
|
46
39
|
|
|
47
|
-
/// Outputs typography theme styles for the mat-progress-spinner.
|
|
48
|
-
/// @param {Map} $theme The theme to generate typography styles for.
|
|
49
40
|
@mixin typography($theme) {
|
|
41
|
+
$tokens: m2-progress-spinner.get-typography-tokens($theme);
|
|
42
|
+
@if inspection.get-theme-version($theme) == 1 {
|
|
43
|
+
$tokens: map.get(m3-progress-spinner.get-tokens($theme), typography);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
@include token-utils.values($tokens);
|
|
50
47
|
}
|
|
51
48
|
|
|
52
|
-
/// Outputs density theme styles for the mat-progress-spinner.
|
|
53
|
-
/// @param {Map} $theme The theme to generate density styles for.
|
|
54
49
|
@mixin density($theme) {
|
|
50
|
+
$tokens: m2-progress-spinner.get-density-tokens($theme);
|
|
51
|
+
@if inspection.get-theme-version($theme) == 1 {
|
|
52
|
+
$tokens: map.get(m3-progress-spinner.get-tokens($theme), density);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
@include token-utils.values($tokens);
|
|
55
56
|
}
|
|
56
57
|
|
|
57
58
|
/// Defines the tokens that will be available in the `overrides` mixin and for docs extraction.
|
|
@@ -74,23 +75,21 @@
|
|
|
74
75
|
/// @param {Map} $theme The theme to generate styles for.
|
|
75
76
|
/// @param {String} $color-variant The color variant to use for the component (M3 only)
|
|
76
77
|
@mixin theme($theme, $color-variant: null) {
|
|
77
|
-
@
|
|
78
|
-
@
|
|
79
|
-
|
|
80
|
-
|
|
78
|
+
@if inspection.get-theme-version($theme) == 1 {
|
|
79
|
+
@include base($theme);
|
|
80
|
+
@include color($theme, $color-variant);
|
|
81
|
+
@include density($theme);
|
|
82
|
+
@include typography($theme);
|
|
83
|
+
} @else {
|
|
84
|
+
@include base($theme);
|
|
85
|
+
@if inspection.theme-has($theme, color) {
|
|
86
|
+
@include color($theme);
|
|
87
|
+
}
|
|
88
|
+
@if inspection.theme-has($theme, density) {
|
|
81
89
|
@include density($theme);
|
|
90
|
+
}
|
|
91
|
+
@if inspection.theme-has($theme, typography) {
|
|
82
92
|
@include typography($theme);
|
|
83
|
-
} @else {
|
|
84
|
-
@include base($theme);
|
|
85
|
-
@if inspection.theme-has($theme, color) {
|
|
86
|
-
@include color($theme);
|
|
87
|
-
}
|
|
88
|
-
@if inspection.theme-has($theme, density) {
|
|
89
|
-
@include density($theme);
|
|
90
|
-
}
|
|
91
|
-
@if inspection.theme-has($theme, typography) {
|
|
92
|
-
@include typography($theme);
|
|
93
|
-
}
|
|
94
93
|
}
|
|
95
94
|
}
|
|
96
95
|
}
|
package/radio/_m2-radio.scss
CHANGED
|
@@ -45,12 +45,13 @@
|
|
|
45
45
|
|
|
46
46
|
// Tokens that can be configured through Angular Material's typography theming API.
|
|
47
47
|
@function get-typography-tokens($theme) {
|
|
48
|
+
$system: m2-utils.get-system($theme);
|
|
48
49
|
@return (
|
|
49
|
-
radio-label-text-font:
|
|
50
|
-
radio-label-text-line-height:
|
|
51
|
-
radio-label-text-size:
|
|
52
|
-
radio-label-text-tracking:
|
|
53
|
-
radio-label-text-weight:
|
|
50
|
+
radio-label-text-font: map.get($system, body-medium-font),
|
|
51
|
+
radio-label-text-line-height: map.get($system, body-medium-line-height),
|
|
52
|
+
radio-label-text-size: map.get($system, body-medium-size),
|
|
53
|
+
radio-label-text-tracking: map.get($system, body-medium-tracking),
|
|
54
|
+
radio-label-text-weight: map.get($system, body-medium-weight)
|
|
54
55
|
);
|
|
55
56
|
}
|
|
56
57
|
|
package/radio/_m3-radio.scss
CHANGED
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
// Temporary removal where color variants previously did not include the
|
|
48
48
|
// unselected icon color. Remove this and approve internal screenshot changes.
|
|
49
49
|
@if $color-variant {
|
|
50
|
-
$tokens: map.remove($tokens, color, radio-unselected-icon-color);
|
|
50
|
+
$tokens: map.deep-remove($tokens, color, radio-unselected-icon-color);
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
@return $tokens;
|
package/radio/_radio-theme.scss
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
@use '../core/style/sass-utils';
|
|
2
|
-
@use '../core/theming/theming';
|
|
3
1
|
@use '../core/theming/inspection';
|
|
4
2
|
@use '../core/tokens/token-utils';
|
|
5
3
|
@use '../core/typography/typography';
|
|
@@ -11,13 +9,12 @@
|
|
|
11
9
|
/// for the mat-radio.
|
|
12
10
|
/// @param {Map} $theme The theme to generate base styles for.
|
|
13
11
|
@mixin base($theme) {
|
|
12
|
+
$tokens: m2-radio.get-unthemable-tokens();
|
|
14
13
|
@if inspection.get-theme-version($theme) == 1 {
|
|
15
|
-
|
|
16
|
-
} @else {
|
|
17
|
-
@include sass-utils.current-selector-or-root() {
|
|
18
|
-
@include token-utils.create-token-values-mixed(m2-radio.get-unthemable-tokens());
|
|
19
|
-
}
|
|
14
|
+
$tokens: map.get(m3-radio.get-tokens($theme), base);
|
|
20
15
|
}
|
|
16
|
+
|
|
17
|
+
@include token-utils.values($tokens);
|
|
21
18
|
}
|
|
22
19
|
|
|
23
20
|
/// Outputs color theme styles for the mat-radio.
|
|
@@ -25,52 +22,44 @@
|
|
|
25
22
|
/// @param {String} $color-variant The color variant to use for the component (M3 only)
|
|
26
23
|
@mixin color($theme, $color-variant: null) {
|
|
27
24
|
@if inspection.get-theme-version($theme) == 1 {
|
|
28
|
-
|
|
29
|
-
|
|
25
|
+
$tokens: map.get(m3-radio.get-tokens($theme, $color-variant), color);
|
|
26
|
+
@include token-utils.values($tokens);
|
|
30
27
|
} @else {
|
|
31
28
|
.mat-mdc-radio-button {
|
|
32
29
|
&.mat-primary {
|
|
33
|
-
|
|
34
|
-
|
|
30
|
+
$tokens: m2-radio.get-color-tokens($theme, primary);
|
|
31
|
+
@include token-utils.values($tokens);
|
|
35
32
|
}
|
|
36
33
|
|
|
37
34
|
&.mat-accent {
|
|
38
|
-
|
|
39
|
-
|
|
35
|
+
$tokens: m2-radio.get-color-tokens($theme, secondary);
|
|
36
|
+
@include token-utils.values($tokens);
|
|
40
37
|
}
|
|
41
38
|
|
|
42
39
|
&.mat-warn {
|
|
43
|
-
|
|
44
|
-
|
|
40
|
+
$tokens: m2-radio.get-color-tokens($theme, error);
|
|
41
|
+
@include token-utils.values($tokens);
|
|
45
42
|
}
|
|
46
43
|
}
|
|
47
44
|
}
|
|
48
45
|
}
|
|
49
46
|
|
|
50
|
-
/// Outputs typography theme styles for the mat-radio.
|
|
51
|
-
/// @param {Map} $theme The theme to generate typography styles for.
|
|
52
47
|
@mixin typography($theme) {
|
|
48
|
+
$tokens: m2-radio.get-typography-tokens($theme);
|
|
53
49
|
@if inspection.get-theme-version($theme) == 1 {
|
|
54
|
-
|
|
55
|
-
} @else {
|
|
56
|
-
@include sass-utils.current-selector-or-root() {
|
|
57
|
-
@include token-utils.create-token-values-mixed(m2-radio.get-typography-tokens($theme));
|
|
58
|
-
}
|
|
50
|
+
$tokens: map.get(m3-radio.get-tokens($theme), typography);
|
|
59
51
|
}
|
|
52
|
+
|
|
53
|
+
@include token-utils.values($tokens);
|
|
60
54
|
}
|
|
61
55
|
|
|
62
|
-
/// Outputs typography theme styles for the mat-radio.
|
|
63
|
-
/// @param {Map} $theme The theme to generate density styles for.
|
|
64
56
|
@mixin density($theme) {
|
|
57
|
+
$tokens: m2-radio.get-density-tokens($theme);
|
|
65
58
|
@if inspection.get-theme-version($theme) == 1 {
|
|
66
|
-
|
|
67
|
-
} @else {
|
|
68
|
-
$density-scale: inspection.get-theme-density($theme);
|
|
69
|
-
|
|
70
|
-
@include sass-utils.current-selector-or-root() {
|
|
71
|
-
@include token-utils.create-token-values-mixed(m2-radio.get-density-tokens($theme));
|
|
72
|
-
}
|
|
59
|
+
$tokens: map.get(m3-radio.get-tokens($theme), density);
|
|
73
60
|
}
|
|
61
|
+
|
|
62
|
+
@include token-utils.values($tokens);
|
|
74
63
|
}
|
|
75
64
|
|
|
76
65
|
/// Defines the tokens that will be available in the `overrides` mixin and for docs extraction.
|
|
@@ -93,23 +82,21 @@
|
|
|
93
82
|
/// @param {Map} $theme The theme to generate styles for.
|
|
94
83
|
/// @param {String} $color-variant The color variant to use for the component (M3 only)
|
|
95
84
|
@mixin theme($theme, $color-variant: null) {
|
|
96
|
-
@
|
|
97
|
-
@
|
|
98
|
-
|
|
99
|
-
|
|
85
|
+
@if inspection.get-theme-version($theme) == 1 {
|
|
86
|
+
@include base($theme);
|
|
87
|
+
@include color($theme, $color-variant);
|
|
88
|
+
@include density($theme);
|
|
89
|
+
@include typography($theme);
|
|
90
|
+
} @else {
|
|
91
|
+
@include base($theme);
|
|
92
|
+
@if inspection.theme-has($theme, color) {
|
|
93
|
+
@include color($theme);
|
|
94
|
+
}
|
|
95
|
+
@if inspection.theme-has($theme, density) {
|
|
100
96
|
@include density($theme);
|
|
97
|
+
}
|
|
98
|
+
@if inspection.theme-has($theme, typography) {
|
|
101
99
|
@include typography($theme);
|
|
102
|
-
} @else {
|
|
103
|
-
@include base($theme);
|
|
104
|
-
@if inspection.theme-has($theme, color) {
|
|
105
|
-
@include color($theme);
|
|
106
|
-
}
|
|
107
|
-
@if inspection.theme-has($theme, density) {
|
|
108
|
-
@include density($theme);
|
|
109
|
-
}
|
|
110
|
-
@if inspection.theme-has($theme, typography) {
|
|
111
|
-
@include typography($theme);
|
|
112
|
-
}
|
|
113
100
|
}
|
|
114
101
|
}
|
|
115
102
|
}
|
|
@@ -19,7 +19,7 @@ const package_config_1 = require("./package-config");
|
|
|
19
19
|
* Note that the fallback version range does not use caret, but tilde because that is
|
|
20
20
|
* the default for Angular framework dependencies in CLI projects.
|
|
21
21
|
*/
|
|
22
|
-
const fallbackMaterialVersionRange = `~20.1.0-next.
|
|
22
|
+
const fallbackMaterialVersionRange = `~20.1.0-next.2`;
|
|
23
23
|
/**
|
|
24
24
|
* Schematic factory entry-point for the `ng-add` schematic. The ng-add schematic will be
|
|
25
25
|
* automatically executed if developers run `ng add @angular/material`.
|
package/select/_m2-select.scss
CHANGED
|
@@ -14,8 +14,9 @@
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
// Tokens that can be configured through Angular Material's color theming API.
|
|
17
|
-
@function get-color-tokens($theme, $
|
|
17
|
+
@function get-color-tokens($theme, $color-variant) {
|
|
18
18
|
$system: m2-utils.get-system($theme);
|
|
19
|
+
$system: m3-utils.replace-colors-with-variant($system, primary, $color-variant);
|
|
19
20
|
$disabled: m3-utils.color-with-opacity(map.get($system, on-surface), 38%);
|
|
20
21
|
|
|
21
22
|
@return (
|
|
@@ -25,19 +26,20 @@
|
|
|
25
26
|
select-placeholder-text-color: map.get($system, on-surface-variant),
|
|
26
27
|
select-enabled-arrow-color: map.get($system, on-surface-variant),
|
|
27
28
|
select-disabled-arrow-color: $disabled,
|
|
28
|
-
select-focused-arrow-color:
|
|
29
|
-
select-invalid-arrow-color:
|
|
29
|
+
select-focused-arrow-color: map.get($system, primary),
|
|
30
|
+
select-invalid-arrow-color: map.get($system, error),
|
|
30
31
|
);
|
|
31
32
|
}
|
|
32
33
|
|
|
33
34
|
// Tokens that can be configured through Angular Material's typography theming API.
|
|
34
35
|
@function get-typography-tokens($theme) {
|
|
36
|
+
$system: m2-utils.get-system($theme);
|
|
35
37
|
@return (
|
|
36
|
-
select-trigger-text-font:
|
|
37
|
-
select-trigger-text-line-height:
|
|
38
|
-
select-trigger-text-size:
|
|
39
|
-
select-trigger-text-tracking:
|
|
40
|
-
select-trigger-text-weight:
|
|
38
|
+
select-trigger-text-font: map.get($system, body-large-font),
|
|
39
|
+
select-trigger-text-line-height: map.get($system, body-large-line-height),
|
|
40
|
+
select-trigger-text-size: map.get($system, body-large-size),
|
|
41
|
+
select-trigger-text-tracking: map.get($system, body-large-tracking),
|
|
42
|
+
select-trigger-text-weight: map.get($system, body-large-weight)
|
|
41
43
|
);
|
|
42
44
|
}
|
|
43
45
|
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
@use '../core/style/sass-utils';
|
|
2
1
|
@use '../core/theming/inspection';
|
|
3
|
-
@use '../core/theming/theming';
|
|
4
2
|
@use '../core/tokens/token-utils';
|
|
5
3
|
@use '../core/typography/typography';
|
|
6
4
|
@use './m2-select';
|
|
@@ -11,60 +9,54 @@
|
|
|
11
9
|
/// for the mat-select.
|
|
12
10
|
/// @param {Map} $theme The theme to generate base styles for.
|
|
13
11
|
@mixin base($theme) {
|
|
12
|
+
$tokens: m2-select.get-unthemable-tokens();
|
|
14
13
|
@if inspection.get-theme-version($theme) == 1 {
|
|
15
|
-
|
|
16
|
-
} @else {
|
|
17
|
-
@include sass-utils.current-selector-or-root() {
|
|
18
|
-
$mat-tokens: m2-select.get-unthemable-tokens();
|
|
19
|
-
@include token-utils.create-token-values-mixed($mat-tokens);
|
|
20
|
-
}
|
|
14
|
+
$tokens: map.get(m3-select.get-tokens($theme), base);
|
|
21
15
|
}
|
|
16
|
+
|
|
17
|
+
@include token-utils.values($tokens);
|
|
22
18
|
}
|
|
23
19
|
|
|
24
20
|
/// Outputs color theme styles for the mat-select.
|
|
25
21
|
/// @param {Map} $theme The theme to generate color styles for.
|
|
26
22
|
/// @param {String} $color-variant The color variant to use for the component (M3 only)
|
|
27
23
|
@mixin color($theme, $color-variant: null) {
|
|
24
|
+
$tokens: m2-select.get-color-tokens($theme, primary);
|
|
28
25
|
@if inspection.get-theme-version($theme) == 1 {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
} @else {
|
|
32
|
-
@include sass-utils.current-selector-or-root() {
|
|
33
|
-
@include token-utils.create-token-values-mixed(m2-select.get-color-tokens($theme));
|
|
26
|
+
$tokens: map.get(m3-select.get-tokens($theme, $color-variant), color);
|
|
27
|
+
}
|
|
34
28
|
|
|
35
|
-
|
|
36
|
-
@include token-utils.create-token-values-mixed(m2-select.get-color-tokens($theme, accent));
|
|
37
|
-
}
|
|
29
|
+
@include token-utils.values($tokens);
|
|
38
30
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
31
|
+
@if inspection.get-theme-version($theme) != 1 {
|
|
32
|
+
.mat-mdc-form-field.mat-accent {
|
|
33
|
+
$tokens: m2-select.get-color-tokens($theme, secondary);
|
|
34
|
+
@include token-utils.values($tokens);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.mat-mdc-form-field.mat-warn {
|
|
38
|
+
$tokens: m2-select.get-color-tokens($theme, error);
|
|
39
|
+
@include token-utils.values($tokens);
|
|
42
40
|
}
|
|
43
41
|
}
|
|
44
42
|
}
|
|
45
43
|
|
|
46
|
-
/// Outputs typography theme styles for the mat-select.
|
|
47
|
-
/// @param {Map} $theme The theme to generate typography styles for.
|
|
48
44
|
@mixin typography($theme) {
|
|
45
|
+
$tokens: m2-select.get-typography-tokens($theme);
|
|
49
46
|
@if inspection.get-theme-version($theme) == 1 {
|
|
50
|
-
|
|
51
|
-
} @else {
|
|
52
|
-
@include sass-utils.current-selector-or-root() {
|
|
53
|
-
@include token-utils.create-token-values-mixed(m2-select.get-typography-tokens($theme));
|
|
54
|
-
}
|
|
47
|
+
$tokens: map.get(m3-select.get-tokens($theme), typography);
|
|
55
48
|
}
|
|
49
|
+
|
|
50
|
+
@include token-utils.values($tokens);
|
|
56
51
|
}
|
|
57
52
|
|
|
58
|
-
/// Outputs typography theme styles for the mat-select.
|
|
59
|
-
/// @param {Map} $theme The theme to generate density styles for.
|
|
60
53
|
@mixin density($theme) {
|
|
54
|
+
$tokens: m2-select.get-density-tokens($theme);
|
|
61
55
|
@if inspection.get-theme-version($theme) == 1 {
|
|
62
|
-
|
|
63
|
-
} @else {
|
|
64
|
-
@include sass-utils.current-selector-or-root() {
|
|
65
|
-
@include token-utils.create-token-values-mixed(m2-select.get-density-tokens($theme));
|
|
66
|
-
}
|
|
56
|
+
$tokens: map.get(m3-select.get-tokens($theme), density);
|
|
67
57
|
}
|
|
58
|
+
|
|
59
|
+
@include token-utils.values($tokens);
|
|
68
60
|
}
|
|
69
61
|
|
|
70
62
|
/// Defines the tokens that will be available in the `overrides` mixin and for docs extraction.
|
|
@@ -87,23 +79,21 @@
|
|
|
87
79
|
/// @param {Map} $theme The theme to generate styles for.
|
|
88
80
|
/// @param {String} $color-variant The color variant to use for the component (M3 only)
|
|
89
81
|
@mixin theme($theme, $color-variant: null) {
|
|
90
|
-
@
|
|
91
|
-
@
|
|
92
|
-
|
|
93
|
-
|
|
82
|
+
@if inspection.get-theme-version($theme) == 1 {
|
|
83
|
+
@include base($theme);
|
|
84
|
+
@include color($theme, $color-variant);
|
|
85
|
+
@include density($theme);
|
|
86
|
+
@include typography($theme);
|
|
87
|
+
} @else {
|
|
88
|
+
@include base($theme);
|
|
89
|
+
@if inspection.theme-has($theme, color) {
|
|
90
|
+
@include color($theme);
|
|
91
|
+
}
|
|
92
|
+
@if inspection.theme-has($theme, density) {
|
|
94
93
|
@include density($theme);
|
|
94
|
+
}
|
|
95
|
+
@if inspection.theme-has($theme, typography) {
|
|
95
96
|
@include typography($theme);
|
|
96
|
-
} @else {
|
|
97
|
-
@include base($theme);
|
|
98
|
-
@if inspection.theme-has($theme, color) {
|
|
99
|
-
@include color($theme);
|
|
100
|
-
}
|
|
101
|
-
@if inspection.theme-has($theme, density) {
|
|
102
|
-
@include density($theme);
|
|
103
|
-
}
|
|
104
|
-
@if inspection.theme-has($theme, typography) {
|
|
105
|
-
@include typography($theme);
|
|
106
|
-
}
|
|
107
97
|
}
|
|
108
98
|
}
|
|
109
99
|
}
|