@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,8 +1,6 @@
|
|
|
1
1
|
@use './m2-option';
|
|
2
2
|
@use './m3-option';
|
|
3
3
|
@use '../tokens/token-utils';
|
|
4
|
-
@use '../style/sass-utils';
|
|
5
|
-
@use '../theming/theming';
|
|
6
4
|
@use '../theming/inspection';
|
|
7
5
|
@use '../typography/typography';
|
|
8
6
|
@use 'sass:map';
|
|
@@ -11,30 +9,34 @@
|
|
|
11
9
|
/// for the mat-option.
|
|
12
10
|
/// @param {Map} $theme The theme to generate base styles for.
|
|
13
11
|
@mixin base($theme) {
|
|
12
|
+
$tokens: m2-option.get-unthemable-tokens();
|
|
14
13
|
@if inspection.get-theme-version($theme) == 1 {
|
|
15
|
-
|
|
16
|
-
} @else {
|
|
14
|
+
$tokens: map.get(m3-option.get-tokens($theme), base);
|
|
17
15
|
}
|
|
16
|
+
|
|
17
|
+
@include token-utils.values($tokens);
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
/// Outputs color theme styles for the mat-option.
|
|
21
21
|
/// @param {Map} $theme The theme to generate color styles for.
|
|
22
22
|
/// @param {String} $color-variant The color variant to use for the component (M3 only)
|
|
23
23
|
@mixin color($theme, $color-variant: null) {
|
|
24
|
+
$tokens: m2-option.get-color-tokens($theme, primary);
|
|
24
25
|
@if inspection.get-theme-version($theme) == 1 {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
@include token-utils.create-token-values-mixed(m2-option.get-color-tokens($theme, primary));
|
|
30
|
-
}
|
|
26
|
+
$tokens: map.get(m3-option.get-tokens($theme, $color-variant), color);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
@include token-utils.values($tokens);
|
|
31
30
|
|
|
31
|
+
@if inspection.get-theme-version($theme) != 1 {
|
|
32
32
|
.mat-accent {
|
|
33
|
-
|
|
33
|
+
$tokens: m2-option.get-color-tokens($theme, secondary);
|
|
34
|
+
@include token-utils.values($tokens);
|
|
34
35
|
}
|
|
35
36
|
|
|
36
37
|
.mat-warn {
|
|
37
|
-
|
|
38
|
+
$tokens: m2-option.get-color-tokens($theme, error);
|
|
39
|
+
@include token-utils.values($tokens);
|
|
38
40
|
}
|
|
39
41
|
}
|
|
40
42
|
}
|
|
@@ -42,22 +44,23 @@
|
|
|
42
44
|
/// Outputs typography theme styles for the mat-option.
|
|
43
45
|
/// @param {Map} $theme The theme to generate typography styles for.
|
|
44
46
|
@mixin typography($theme) {
|
|
47
|
+
$tokens: m2-option.get-typography-tokens($theme);
|
|
45
48
|
@if inspection.get-theme-version($theme) == 1 {
|
|
46
|
-
|
|
47
|
-
} @else {
|
|
48
|
-
@include sass-utils.current-selector-or-root() {
|
|
49
|
-
@include token-utils.create-token-values-mixed(m2-option.get-typography-tokens($theme));
|
|
50
|
-
}
|
|
49
|
+
$tokens: map.get(m3-option.get-tokens($theme), typography);
|
|
51
50
|
}
|
|
51
|
+
|
|
52
|
+
@include token-utils.values($tokens);
|
|
52
53
|
}
|
|
53
54
|
|
|
54
55
|
/// Outputs density theme styles for the mat-option.
|
|
55
56
|
/// @param {Map} $theme The theme to generate density styles for.
|
|
56
57
|
@mixin density($theme) {
|
|
58
|
+
$tokens: m2-option.get-density-tokens($theme);
|
|
57
59
|
@if inspection.get-theme-version($theme) == 1 {
|
|
58
|
-
|
|
59
|
-
} @else {
|
|
60
|
+
$tokens: map.get(m3-option.get-tokens($theme), density);
|
|
60
61
|
}
|
|
62
|
+
|
|
63
|
+
@include token-utils.values($tokens);
|
|
61
64
|
}
|
|
62
65
|
|
|
63
66
|
/// Defines the tokens that will be available in the `overrides` mixin and for docs extraction.
|
|
@@ -80,23 +83,21 @@
|
|
|
80
83
|
/// @param {Map} $theme The theme to generate styles for.
|
|
81
84
|
/// @param {String} $color-variant The color variant to use for the component (M3 only)
|
|
82
85
|
@mixin theme($theme, $color-variant: null) {
|
|
83
|
-
@
|
|
84
|
-
@
|
|
85
|
-
|
|
86
|
-
|
|
86
|
+
@if inspection.get-theme-version($theme) == 1 {
|
|
87
|
+
@include base($theme);
|
|
88
|
+
@include color($theme, $color-variant);
|
|
89
|
+
@include density($theme);
|
|
90
|
+
@include typography($theme);
|
|
91
|
+
} @else {
|
|
92
|
+
@include base($theme);
|
|
93
|
+
@if inspection.theme-has($theme, color) {
|
|
94
|
+
@include color($theme);
|
|
95
|
+
}
|
|
96
|
+
@if inspection.theme-has($theme, density) {
|
|
87
97
|
@include density($theme);
|
|
98
|
+
}
|
|
99
|
+
@if inspection.theme-has($theme, typography) {
|
|
88
100
|
@include typography($theme);
|
|
89
|
-
} @else {
|
|
90
|
-
@include base($theme);
|
|
91
|
-
@if inspection.theme-has($theme, color) {
|
|
92
|
-
@include color($theme);
|
|
93
|
-
}
|
|
94
|
-
@if inspection.theme-has($theme, density) {
|
|
95
|
-
@include density($theme);
|
|
96
|
-
}
|
|
97
|
-
@if inspection.theme-has($theme, typography) {
|
|
98
|
-
@include typography($theme);
|
|
99
|
-
}
|
|
100
101
|
}
|
|
101
102
|
}
|
|
102
103
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
@use 'sass:
|
|
2
|
-
@use '../
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use '../tokens/m2-utils';
|
|
3
|
+
@use '../tokens/m3-utils';
|
|
3
4
|
|
|
4
5
|
// Tokens that can't be configured through Angular Material's current theming API,
|
|
5
6
|
// but may be in a future version of the theming API.
|
|
@@ -9,16 +10,11 @@
|
|
|
9
10
|
|
|
10
11
|
// Tokens that can be configured through Angular Material's color theming API.
|
|
11
12
|
@function get-color-tokens($theme) {
|
|
12
|
-
$
|
|
13
|
-
$base: inspection.get-theme-color($theme, foreground, base);
|
|
14
|
-
|
|
15
|
-
// If the base is a color *type* we can use it directly in the `rgba` call below.
|
|
16
|
-
// If it's anything else (e.g. a CSS variable) we fall back to using static colors
|
|
17
|
-
// since we don't have a way of adjusting the opacity.
|
|
18
|
-
$color: if(meta.type-of($base) == color, $base, if($is-dark, #fff, #000));
|
|
13
|
+
$system: m2-utils.get-system($theme);
|
|
19
14
|
|
|
20
15
|
@return (
|
|
21
|
-
ripple-color:
|
|
16
|
+
ripple-color: m3-utils.color-with-opacity(
|
|
17
|
+
map.get($system, on-surface), map.get($system, pressed-state-layer-opacity)),
|
|
22
18
|
);
|
|
23
19
|
}
|
|
24
20
|
|
|
@@ -2,45 +2,42 @@
|
|
|
2
2
|
@use './m2-ripple';
|
|
3
3
|
@use './m3-ripple';
|
|
4
4
|
@use '../tokens/token-utils';
|
|
5
|
-
@use '../style/sass-utils';
|
|
6
|
-
@use '../theming/theming';
|
|
7
5
|
@use '../theming/inspection';
|
|
8
6
|
|
|
9
7
|
@mixin base($theme) {
|
|
8
|
+
$tokens: m2-ripple.get-unthemable-tokens();
|
|
10
9
|
@if inspection.get-theme-version($theme) == 1 {
|
|
11
|
-
|
|
12
|
-
} @else {
|
|
10
|
+
$tokens: map.get(m3-ripple.get-tokens($theme), base);
|
|
13
11
|
}
|
|
12
|
+
|
|
13
|
+
@include token-utils.values($tokens);
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
@mixin color($theme) {
|
|
17
|
+
$tokens: m2-ripple.get-color-tokens($theme);
|
|
17
18
|
@if inspection.get-theme-version($theme) == 1 {
|
|
18
|
-
|
|
19
|
-
} @else {
|
|
20
|
-
@include sass-utils.current-selector-or-root() {
|
|
21
|
-
@include token-utils.create-token-values-mixed(m2-ripple.get-color-tokens($theme));
|
|
22
|
-
}
|
|
19
|
+
$tokens: map.get(m3-ripple.get-tokens($theme), color);
|
|
23
20
|
}
|
|
21
|
+
|
|
22
|
+
@include token-utils.values($tokens);
|
|
24
23
|
}
|
|
25
24
|
|
|
26
25
|
@mixin typography($theme) {
|
|
26
|
+
$tokens: m2-ripple.get-typography-tokens($theme);
|
|
27
27
|
@if inspection.get-theme-version($theme) == 1 {
|
|
28
|
-
|
|
29
|
-
} @else {
|
|
30
|
-
@include sass-utils.current-selector-or-root() {
|
|
31
|
-
@include token-utils.create-token-values-mixed(m2-ripple.get-typography-tokens($theme));
|
|
32
|
-
}
|
|
28
|
+
$tokens: map.get(m3-ripple.get-tokens($theme), typography);
|
|
33
29
|
}
|
|
30
|
+
|
|
31
|
+
@include token-utils.values($tokens);
|
|
34
32
|
}
|
|
35
33
|
|
|
36
34
|
@mixin density($theme) {
|
|
35
|
+
$tokens: m2-ripple.get-density-tokens($theme);
|
|
37
36
|
@if inspection.get-theme-version($theme) == 1 {
|
|
38
|
-
|
|
39
|
-
} @else {
|
|
40
|
-
@include sass-utils.current-selector-or-root() {
|
|
41
|
-
@include token-utils.create-token-values-mixed(m2-ripple.get-density-tokens($theme));
|
|
42
|
-
}
|
|
37
|
+
$tokens: map.get(m3-ripple.get-tokens($theme), density);
|
|
43
38
|
}
|
|
39
|
+
|
|
40
|
+
@include token-utils.values($tokens);
|
|
44
41
|
}
|
|
45
42
|
|
|
46
43
|
/// Defines the tokens that will be available in the `overrides` mixin and for docs extraction.
|
|
@@ -58,23 +55,21 @@
|
|
|
58
55
|
}
|
|
59
56
|
|
|
60
57
|
@mixin theme($theme) {
|
|
61
|
-
@
|
|
62
|
-
@
|
|
63
|
-
|
|
58
|
+
@if inspection.get-theme-version($theme) == 1 {
|
|
59
|
+
@include base($theme);
|
|
60
|
+
@include color($theme);
|
|
61
|
+
@include density($theme);
|
|
62
|
+
@include typography($theme);
|
|
63
|
+
} @else {
|
|
64
|
+
@include base($theme);
|
|
65
|
+
@if inspection.theme-has($theme, color) {
|
|
64
66
|
@include color($theme);
|
|
67
|
+
}
|
|
68
|
+
@if inspection.theme-has($theme, density) {
|
|
65
69
|
@include density($theme);
|
|
70
|
+
}
|
|
71
|
+
@if inspection.theme-has($theme, typography) {
|
|
66
72
|
@include typography($theme);
|
|
67
|
-
} @else {
|
|
68
|
-
@include base($theme);
|
|
69
|
-
@if inspection.theme-has($theme, color) {
|
|
70
|
-
@include color($theme);
|
|
71
|
-
}
|
|
72
|
-
@if inspection.theme-has($theme, density) {
|
|
73
|
-
@include density($theme);
|
|
74
|
-
}
|
|
75
|
-
@if inspection.theme-has($theme, typography) {
|
|
76
|
-
@include typography($theme);
|
|
77
|
-
}
|
|
78
73
|
}
|
|
79
74
|
}
|
|
80
75
|
}
|
|
@@ -13,15 +13,14 @@
|
|
|
13
13
|
@function get-color-tokens($theme, $color-variant) {
|
|
14
14
|
$is-dark: inspection.get-theme-type($theme) == dark;
|
|
15
15
|
$disabled-color: if($is-dark, #686868, #b0b0b0);
|
|
16
|
-
$checkmark-color: inspection.get-theme-color($theme, system, background);
|
|
17
16
|
$system: m2-utils.get-system($theme);
|
|
18
17
|
$system: m3-utils.replace-colors-with-variant($system, secondary, $color-variant);
|
|
19
18
|
|
|
20
19
|
@return (
|
|
21
20
|
pseudo-checkbox-full-selected-icon-color: map.get($system, secondary),
|
|
22
|
-
pseudo-checkbox-full-selected-checkmark-color: $
|
|
21
|
+
pseudo-checkbox-full-selected-checkmark-color: map.get($system, background),
|
|
23
22
|
pseudo-checkbox-full-unselected-icon-color: map.get($system, on-surface-variant),
|
|
24
|
-
pseudo-checkbox-full-disabled-selected-checkmark-color: $
|
|
23
|
+
pseudo-checkbox-full-disabled-selected-checkmark-color: map.get($system, background),
|
|
25
24
|
pseudo-checkbox-full-disabled-unselected-icon-color: $disabled-color,
|
|
26
25
|
pseudo-checkbox-full-disabled-selected-icon-color: $disabled-color,
|
|
27
26
|
pseudo-checkbox-minimal-selected-checkmark-color: map.get($system, secondary),
|
|
@@ -1,32 +1,21 @@
|
|
|
1
|
-
@use '../../theming/theming';
|
|
2
1
|
@use '../../theming/inspection';
|
|
3
|
-
@use '../../style/sass-utils';
|
|
4
2
|
@use '../../tokens/token-utils';
|
|
5
3
|
@use './m2-pseudo-checkbox';
|
|
6
4
|
@use './m3-pseudo-checkbox';
|
|
7
5
|
@use 'sass:map';
|
|
8
6
|
|
|
9
7
|
@mixin _palette-styles($theme, $palette-name) {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
m2-pseudo-checkbox.get-color-tokens($theme, $palette-name));
|
|
13
|
-
}
|
|
8
|
+
$tokens: m2-pseudo-checkbox.get-color-tokens($theme, $palette-name);
|
|
9
|
+
@include token-utils.values($tokens);
|
|
14
10
|
}
|
|
15
11
|
|
|
16
|
-
/// Outputs base theme styles (styles not dependent on the color, typography, or density settings)
|
|
17
|
-
/// for the mat-pseudo-checkbox.
|
|
18
|
-
/// @param {Map} $theme The theme to generate base styles for.
|
|
19
12
|
@mixin base($theme) {
|
|
20
|
-
|
|
13
|
+
$tokens: m2-pseudo-checkbox.get-unthemable-tokens();
|
|
14
|
+
@if inspection.get-theme-version($theme) == 1 {
|
|
15
|
+
$tokens: map.get(m3-pseudo-checkbox.get-tokens($theme), base);
|
|
16
|
+
}
|
|
21
17
|
|
|
22
|
-
|
|
23
|
-
@function _define-overrides() {
|
|
24
|
-
@return (
|
|
25
|
-
(
|
|
26
|
-
namespace: pseudo-checkbox,
|
|
27
|
-
tokens: token-utils.get-overrides(m3-pseudo-checkbox.get-tokens(), pseudo-checkbox)
|
|
28
|
-
),
|
|
29
|
-
);
|
|
18
|
+
@include token-utils.values($tokens);
|
|
30
19
|
}
|
|
31
20
|
|
|
32
21
|
/// Outputs the CSS variable values for the given tokens.
|
|
@@ -39,62 +28,83 @@
|
|
|
39
28
|
/// @param {Map} $theme The theme to generate color styles for.
|
|
40
29
|
/// @param {String} $color-variant The color variant to use for the component (M3 only)
|
|
41
30
|
@mixin color($theme, $color-variant: null) {
|
|
31
|
+
$tokens: m2-pseudo-checkbox.get-color-tokens($theme, secondary);
|
|
42
32
|
@if inspection.get-theme-version($theme) == 1 {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
33
|
+
$tokens: map.get(m3-pseudo-checkbox.get-tokens($theme, $color-variant), color);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
@include token-utils.values($tokens);
|
|
37
|
+
|
|
38
|
+
@if inspection.get-theme-version($theme) != 1 {
|
|
46
39
|
// Default to the accent color. Note that the pseudo checkboxes are meant to inherit the
|
|
47
40
|
// theme from their parent, rather than implementing their own theming, which is why we
|
|
48
41
|
// don't attach to the `mat-*` classes. Also note that this needs to be below `.mat-primary`
|
|
49
42
|
// in order to allow for the color to be overwritten if the checkbox is inside a parent that
|
|
50
43
|
// has `mat-accent` and is placed inside another parent that has `mat-primary`.
|
|
51
|
-
@include _palette-styles($theme, secondary);
|
|
52
|
-
|
|
53
44
|
.mat-primary {
|
|
54
|
-
|
|
45
|
+
$tokens: m2-pseudo-checkbox.get-color-tokens($theme, primary);
|
|
46
|
+
@include token-utils.values($tokens);
|
|
55
47
|
}
|
|
56
48
|
|
|
57
49
|
.mat-accent {
|
|
58
|
-
|
|
50
|
+
$tokens: m2-pseudo-checkbox.get-color-tokens($theme, secondary);
|
|
51
|
+
@include token-utils.values($tokens);
|
|
59
52
|
}
|
|
60
53
|
|
|
61
54
|
.mat-warn {
|
|
62
|
-
|
|
55
|
+
$tokens: m2-pseudo-checkbox.get-color-tokens($theme, error);
|
|
56
|
+
@include token-utils.values($tokens);
|
|
63
57
|
}
|
|
64
58
|
}
|
|
65
59
|
}
|
|
66
60
|
|
|
67
|
-
/// Outputs typography theme styles for the mat-pseudo-checkbox.
|
|
68
|
-
/// @param {Map} $theme The theme to generate typography styles for.
|
|
69
61
|
@mixin typography($theme) {
|
|
62
|
+
$tokens: m2-pseudo-checkbox.get-typography-tokens($theme);
|
|
63
|
+
@if inspection.get-theme-version($theme) == 1 {
|
|
64
|
+
$tokens: map.get(m3-pseudo-checkbox.get-tokens($theme), typography);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
@include token-utils.values($tokens);
|
|
70
68
|
}
|
|
71
69
|
|
|
72
|
-
/// Outputs density theme styles for the mat-pseudo-checkbox.
|
|
73
|
-
/// @param {Map} $theme The theme to generate density styles for.
|
|
74
70
|
@mixin density($theme) {
|
|
71
|
+
$tokens: m2-pseudo-checkbox.get-density-tokens($theme);
|
|
72
|
+
@if inspection.get-theme-version($theme) == 1 {
|
|
73
|
+
$tokens: map.get(m3-pseudo-checkbox.get-tokens($theme), density);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
@include token-utils.values($tokens);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/// Defines the tokens that will be available in the `overrides` mixin and for docs extraction.
|
|
80
|
+
@function _define-overrides() {
|
|
81
|
+
@return (
|
|
82
|
+
(
|
|
83
|
+
namespace: pseudo-checkbox,
|
|
84
|
+
tokens: token-utils.get-overrides(m3-pseudo-checkbox.get-tokens(), pseudo-checkbox)
|
|
85
|
+
),
|
|
86
|
+
);
|
|
75
87
|
}
|
|
76
88
|
|
|
77
89
|
/// Outputs all (base, color, typography, and density) theme styles for the mat-pseudo-checkbox.
|
|
78
90
|
/// @param {Map} $theme The theme to generate styles for.
|
|
79
91
|
/// @param {String} $color-variant The color variant to use for the component (M3 only)
|
|
80
92
|
@mixin theme($theme, $color-variant: null) {
|
|
81
|
-
@
|
|
82
|
-
@
|
|
83
|
-
|
|
84
|
-
|
|
93
|
+
@if inspection.get-theme-version($theme) == 1 {
|
|
94
|
+
@include base($theme);
|
|
95
|
+
@include color($theme, $color-variant);
|
|
96
|
+
@include density($theme);
|
|
97
|
+
@include typography($theme);
|
|
98
|
+
} @else {
|
|
99
|
+
@include base($theme);
|
|
100
|
+
@if inspection.theme-has($theme, color) {
|
|
101
|
+
@include color($theme);
|
|
102
|
+
}
|
|
103
|
+
@if inspection.theme-has($theme, density) {
|
|
85
104
|
@include density($theme);
|
|
105
|
+
}
|
|
106
|
+
@if inspection.theme-has($theme, typography) {
|
|
86
107
|
@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) {
|
|
93
|
-
@include density($theme);
|
|
94
|
-
}
|
|
95
|
-
@if inspection.theme-has($theme, typography) {
|
|
96
|
-
@include typography($theme);
|
|
97
|
-
}
|
|
98
108
|
}
|
|
99
109
|
}
|
|
100
110
|
}
|
|
@@ -37,51 +37,47 @@
|
|
|
37
37
|
@use '../../snack-bar/snack-bar-theme';
|
|
38
38
|
@use '../../form-field/form-field-theme';
|
|
39
39
|
@use '../../timepicker/timepicker-theme';
|
|
40
|
-
@use './theming';
|
|
41
40
|
|
|
42
41
|
// Create a theme.
|
|
43
42
|
@mixin all-component-themes($theme) {
|
|
44
|
-
|
|
45
|
-
@include
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
@include tree-theme.theme($theme);
|
|
83
|
-
@include timepicker-theme.theme($theme);
|
|
84
|
-
}
|
|
43
|
+
@include core-theme.theme($theme);
|
|
44
|
+
@include card-theme.theme($theme);
|
|
45
|
+
@include progress-bar-theme.theme($theme);
|
|
46
|
+
@include tooltip-theme.theme($theme);
|
|
47
|
+
@include form-field-theme.theme($theme);
|
|
48
|
+
@include input-theme.theme($theme);
|
|
49
|
+
@include select-theme.theme($theme);
|
|
50
|
+
@include autocomplete-theme.theme($theme);
|
|
51
|
+
@include dialog-theme.theme($theme);
|
|
52
|
+
@include chips-theme.theme($theme);
|
|
53
|
+
@include slide-toggle-theme.theme($theme);
|
|
54
|
+
@include radio-theme.theme($theme);
|
|
55
|
+
@include slider-theme.theme($theme);
|
|
56
|
+
@include menu-theme.theme($theme);
|
|
57
|
+
@include list-theme.theme($theme);
|
|
58
|
+
@include paginator-theme.theme($theme);
|
|
59
|
+
@include tabs-theme.theme($theme);
|
|
60
|
+
@include checkbox-theme.theme($theme);
|
|
61
|
+
@include button-theme.theme($theme);
|
|
62
|
+
@include icon-button-theme.theme($theme);
|
|
63
|
+
@include fab-theme.theme($theme);
|
|
64
|
+
@include snack-bar-theme.theme($theme);
|
|
65
|
+
@include table-theme.theme($theme);
|
|
66
|
+
@include progress-spinner-theme.theme($theme);
|
|
67
|
+
@include badge-theme.theme($theme);
|
|
68
|
+
@include bottom-sheet-theme.theme($theme);
|
|
69
|
+
@include button-toggle-theme.theme($theme);
|
|
70
|
+
@include datepicker-theme.theme($theme);
|
|
71
|
+
@include divider-theme.theme($theme);
|
|
72
|
+
@include expansion-theme.theme($theme);
|
|
73
|
+
@include grid-list-theme.theme($theme);
|
|
74
|
+
@include icon-theme.theme($theme);
|
|
75
|
+
@include sidenav-theme.theme($theme);
|
|
76
|
+
@include stepper-theme.theme($theme);
|
|
77
|
+
@include sort-theme.theme($theme);
|
|
78
|
+
@include toolbar-theme.theme($theme);
|
|
79
|
+
@include tree-theme.theme($theme);
|
|
80
|
+
@include timepicker-theme.theme($theme);
|
|
85
81
|
}
|
|
86
82
|
|
|
87
83
|
@mixin all-component-bases($theme) {
|
|
@@ -76,7 +76,27 @@ $theme-version: 1;
|
|
|
76
76
|
// density
|
|
77
77
|
$density-scale: map.get($density-config, scale) or 0;
|
|
78
78
|
|
|
79
|
+
$system-maps: (
|
|
80
|
+
m3-tokens.get-sys-color($type, $palettes, $color-system-variables-prefix),
|
|
81
|
+
m3.md-sys-elevation-values(),
|
|
82
|
+
m3.md-sys-motion-values(),
|
|
83
|
+
m3.md-sys-shape-values(),
|
|
84
|
+
m3.md-sys-state-values(),
|
|
85
|
+
(
|
|
86
|
+
// Form field native select option text color
|
|
87
|
+
neutral10: map.get($palettes, neutral, 10),
|
|
88
|
+
// Sidenav scrim (container background shadow when opened),
|
|
89
|
+
neutral-variant20: map.get($palettes, neutral-variant, 20),
|
|
90
|
+
),
|
|
91
|
+
m3-tokens.get-sys-typeface($typography, $typography-system-variables-prefix),
|
|
92
|
+
);
|
|
93
|
+
$system: ();
|
|
94
|
+
@each $sys-map in $system-maps {
|
|
95
|
+
$system: map.merge($system, $sys-map);
|
|
96
|
+
}
|
|
97
|
+
|
|
79
98
|
@return (
|
|
99
|
+
_mat-system: $system,
|
|
80
100
|
$internals: (
|
|
81
101
|
base-tokens: m3-tokens.generate-base-tokens(),
|
|
82
102
|
color-system-variables-prefix: $color-system-variables-prefix,
|
|
@@ -84,19 +104,6 @@ $theme-version: 1;
|
|
|
84
104
|
m3-tokens.generate-color-tokens($type, $palettes, $color-system-variables-prefix),
|
|
85
105
|
density-scale: $density-scale,
|
|
86
106
|
font-definition: $typography,
|
|
87
|
-
md-sys-color: m3-tokens.get-sys-color($type, $palettes, $color-system-variables-prefix),
|
|
88
|
-
md-sys-elevation: m3.md-sys-elevation-values(),
|
|
89
|
-
md-sys-motion: m3.md-sys-motion-values(),
|
|
90
|
-
md-sys-shape: m3.md-sys-shape-values(),
|
|
91
|
-
md-sys-state: m3.md-sys-state-values(),
|
|
92
|
-
md-ref-palette: (
|
|
93
|
-
// Form field native select option text color
|
|
94
|
-
neutral10: map.get($palettes, neutral, 10),
|
|
95
|
-
// Sidenav scrim (container background shadow when opened),
|
|
96
|
-
neutral-variant20: map.get($palettes, neutral-variant, 20),
|
|
97
|
-
),
|
|
98
|
-
md-sys-typescale:
|
|
99
|
-
m3-tokens.get-sys-typeface($typography, $typography-system-variables-prefix),
|
|
100
107
|
palettes: $palettes,
|
|
101
108
|
theme-type: $type,
|
|
102
109
|
theme-version: $theme-version,
|
|
@@ -279,15 +279,3 @@ $_typography-properties: (font, font-family, line-height, font-size, letter-spac
|
|
|
279
279
|
@return $theme;
|
|
280
280
|
}
|
|
281
281
|
}
|
|
282
|
-
|
|
283
|
-
/// Gets a version of the theme with a modified typography config that preserves old behavior in
|
|
284
|
-
/// some components that previously used `private-typography-to-2014-config`.
|
|
285
|
-
/// Do not introduce new usages of this, it should be cleaned up and removed.
|
|
286
|
-
/// @deprecated
|
|
287
|
-
@function private-get-typography-back-compat-theme($theme) {
|
|
288
|
-
@return if(
|
|
289
|
-
get-theme-version($theme) == 0,
|
|
290
|
-
m2-inspection.private-get-typography-back-compat-theme($theme),
|
|
291
|
-
$theme
|
|
292
|
-
);
|
|
293
|
-
}
|
|
@@ -235,36 +235,3 @@ $_typography-properties: (font, font-family, line-height, font-size, letter-spac
|
|
|
235
235
|
}
|
|
236
236
|
@return $theme;
|
|
237
237
|
}
|
|
238
|
-
|
|
239
|
-
/// Gets a version of the theme with a modified typography config that preserves old behavior in
|
|
240
|
-
/// some components that previously used `private-typography-to-2014-config`.
|
|
241
|
-
/// Do not introduce new usages of this, it should be cleaned up and removed.
|
|
242
|
-
/// @deprecated
|
|
243
|
-
@function private-get-typography-back-compat-theme($theme) {
|
|
244
|
-
// It is possible for a user to pass a "density theme" that is just a number.
|
|
245
|
-
@if meta.type-of($theme) != 'map' {
|
|
246
|
-
@return $theme;
|
|
247
|
-
}
|
|
248
|
-
$internal: map.get($theme, $_internals, m2-config);
|
|
249
|
-
$theme: map.remove($theme, $_internals);
|
|
250
|
-
@if theme-has($theme, typography) {
|
|
251
|
-
$typography-config: m2-theming.get-typography-config($theme);
|
|
252
|
-
// gmat configs have both 2018 and 2014 keys.
|
|
253
|
-
@if (not typography-versioning.private-typography-is-2014-config($typography-config)) or
|
|
254
|
-
(not typography-versioning.private-typography-is-2018-config($typography-config)) {
|
|
255
|
-
@return $theme;
|
|
256
|
-
}
|
|
257
|
-
$new-typography-config: typography-versioning.private-typography-to-2018-config(
|
|
258
|
-
$typography-config, true);
|
|
259
|
-
// subtitle-2 is mapped differently by `private-typography-to-2014-config`.
|
|
260
|
-
$new-typography-config: map.set(
|
|
261
|
-
$new-typography-config, subtitle-2, map.get($new-typography-config, body-1));
|
|
262
|
-
$theme: if($theme == $typography-config, $new-typography-config,
|
|
263
|
-
map.set($theme, typography, $new-typography-config));
|
|
264
|
-
}
|
|
265
|
-
@if $internal {
|
|
266
|
-
$internal: private-get-typography-back-compat-theme($internal);
|
|
267
|
-
$theme: map.set($theme, $_internals, m2-config, $internal);
|
|
268
|
-
}
|
|
269
|
-
@return $theme;
|
|
270
|
-
}
|