@angular/material 20.1.0-next.1 → 20.1.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_index.scss +1 -2
- package/autocomplete/_autocomplete-theme.scss +28 -37
- package/autocomplete/_m2-autocomplete.scss +10 -22
- package/badge/_badge-theme.scss +35 -44
- package/badge/_m2-badge.scss +46 -59
- package/bottom-sheet/_bottom-sheet-theme.scss +28 -40
- package/bottom-sheet/_m2-bottom-sheet.scss +16 -33
- package/button/_button-theme.scss +37 -55
- package/button/_fab-theme.scss +42 -56
- package/button/_icon-button-theme.scss +33 -49
- package/button/_m2-button.scss +135 -158
- package/button/_m2-fab.scss +60 -69
- package/button/_m2-icon-button.scss +30 -50
- package/button/_m3-button.scss +1 -2
- package/button/_m3-fab.scss +1 -2
- package/button/_m3-icon-button.scss +1 -2
- package/button/testing/index.d.ts +1 -0
- package/button-toggle/_button-toggle-theme.scss +29 -44
- package/button-toggle/_m2-button-toggle.scss +58 -81
- package/button-toggle/_m3-button-toggle.scss +1 -2
- package/card/_card-theme.scss +28 -36
- package/card/_m2-card.scss +30 -45
- package/checkbox/_checkbox-theme.scss +37 -50
- package/checkbox/_m2-checkbox.scss +30 -40
- package/checkbox/_m3-checkbox.scss +1 -2
- package/chips/_chips-theme.scss +27 -30
- package/chips/_m2-chip.scss +40 -53
- package/chips/_m3-chip.scss +1 -2
- package/core/_core-theme.scss +48 -67
- package/core/_m2-app.scss +11 -23
- package/core/focus-indicators/_private.scss +2 -5
- package/core/m2/_theming.scss +36 -41
- package/core/option/_m2-optgroup.scss +13 -25
- package/core/option/_m2-option.scss +16 -22
- package/core/option/_optgroup-theme.scss +28 -30
- package/core/option/_option-theme.scss +35 -34
- package/core/ripple/_m2-ripple.scss +8 -20
- package/core/ripple/_ripple-theme.scss +28 -33
- package/core/selection/pseudo-checkbox/_m2-pseudo-checkbox.scss +14 -21
- package/core/selection/pseudo-checkbox/_pseudo-checkbox-theme.scss +55 -45
- package/core/theming/_all-theme.scss +38 -42
- package/core/theming/_definition.scss +22 -13
- package/core/theming/_inspection.scss +0 -12
- package/core/theming/_m2-inspection.scss +0 -33
- package/core/theming/_theming.scss +4 -172
- package/core/tokens/_m2-utils.scss +16 -68
- package/core/tokens/_m3-utils.scss +2 -14
- package/core/tokens/_token-utils.scss +7 -27
- package/core/tokens/m2/_index.scss +6 -0
- package/core/tokens/m2/_md-sys-color.scss +123 -0
- package/core/tokens/m2/_md-sys-elevation.scss +16 -0
- package/core/tokens/m2/_md-sys-motion.scss +36 -0
- package/core/tokens/m2/_md-sys-shape.scss +22 -0
- package/core/tokens/m2/_md-sys-state.scss +15 -0
- package/core/tokens/m2/_md-sys-typescale.scss +68 -0
- package/core/tokens/m3/_md-sys-color.scss +2 -2
- package/core/tokens/m3/_md-sys-typescale.scss +1 -1
- package/core/tokens/m3/_theme.scss +14 -26
- package/datepicker/_datepicker-theme.scss +38 -40
- package/datepicker/_m2-datepicker.scss +26 -40
- package/dialog/_dialog-theme.scss +28 -34
- package/dialog/_m2-dialog.scss +34 -48
- package/divider/_divider-theme.scss +28 -30
- package/divider/_m2-divider.scss +10 -21
- package/expansion/_expansion-theme.scss +28 -39
- package/expansion/_m2-expansion.scss +52 -67
- package/expansion/_m3-expansion.scss +3 -2
- package/fesm2022/autocomplete.mjs +1 -1
- package/fesm2022/button/testing.mjs +7 -4
- package/fesm2022/button/testing.mjs.map +1 -1
- package/fesm2022/chips.mjs +1 -1
- package/fesm2022/core.mjs +1 -1
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/datepicker.mjs +1 -1
- package/fesm2022/expansion.mjs +2 -2
- package/fesm2022/expansion.mjs.map +1 -1
- package/fesm2022/{form-field-C9DZXojn.mjs → form-field-CFbrnFED.mjs} +3 -3
- package/fesm2022/{form-field-C9DZXojn.mjs.map → form-field-CFbrnFED.mjs.map} +1 -1
- package/fesm2022/form-field.mjs +2 -2
- package/fesm2022/input.mjs +3 -27
- package/fesm2022/input.mjs.map +1 -1
- package/fesm2022/menu/testing.mjs +97 -13
- package/fesm2022/menu/testing.mjs.map +1 -1
- package/fesm2022/menu.mjs +343 -122
- package/fesm2022/menu.mjs.map +1 -1
- package/fesm2022/{module-BDiw_nWS.mjs → module-B0CLRw5e.mjs} +3 -3
- package/fesm2022/{module-BDiw_nWS.mjs.map → module-B0CLRw5e.mjs.map} +1 -1
- package/fesm2022/{module-DzZHEh7B.mjs → module-B62K-792.mjs} +2 -2
- package/fesm2022/{module-DzZHEh7B.mjs.map → module-B62K-792.mjs.map} +1 -1
- package/fesm2022/paginator.mjs +3 -3
- package/fesm2022/select.mjs +3 -3
- package/fesm2022/sidenav.mjs +2 -4
- package/fesm2022/sidenav.mjs.map +1 -1
- package/fesm2022/slide-toggle.mjs +2 -2
- package/fesm2022/slide-toggle.mjs.map +1 -1
- package/fesm2022/snack-bar.mjs +2 -2
- package/fesm2022/timepicker.mjs +1 -1
- package/form-field/_form-field-theme.scss +35 -51
- package/form-field/_m2-form-field.scss +125 -146
- package/form-field/_m3-form-field.scss +1 -2
- package/grid-list/_grid-list-theme.scss +28 -28
- package/grid-list/_m2-grid-list.scss +16 -29
- package/icon/_icon-theme.scss +40 -41
- package/icon/_m2-icon.scss +7 -21
- package/input/_input-theme.scss +1 -4
- package/input/index.d.ts +0 -11
- package/list/_list-theme.scss +57 -53
- package/list/_m2-list.scss +84 -108
- package/list/_m3-list.scss +1 -2
- package/menu/_m2-menu.scss +33 -46
- package/menu/_menu-theme.scss +28 -33
- package/menu/index.d.ts +145 -61
- package/menu/testing/index.d.ts +50 -2
- package/package.json +2 -2
- package/paginator/_m2-paginator.scss +38 -58
- package/paginator/_m3-paginator.scss +1 -2
- package/paginator/_paginator-theme.scss +28 -33
- package/prebuilt-themes/deeppurple-amber.css +1 -1
- package/prebuilt-themes/indigo-pink.css +1 -1
- package/prebuilt-themes/pink-bluegrey.css +1 -1
- package/prebuilt-themes/purple-green.css +1 -1
- package/progress-bar/_m2-progress-bar.scss +11 -24
- package/progress-bar/_progress-bar-theme.scss +35 -43
- package/progress-spinner/_m2-progress-spinner.scss +9 -20
- package/progress-spinner/_progress-spinner-theme.scss +42 -43
- package/radio/_m2-radio.scss +30 -40
- package/radio/_m3-radio.scss +1 -2
- package/radio/_radio-theme.scss +33 -46
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-generate/theme-color/schema.json +1 -1
- package/select/_m2-select.scss +23 -30
- package/select/_m3-select.scss +1 -2
- package/select/_select-theme.scss +38 -51
- package/sidenav/_m2-sidenav.scss +26 -36
- package/sidenav/_sidenav-theme.scss +28 -30
- package/slide-toggle/_m2-slide-toggle.scss +111 -143
- package/slide-toggle/_m3-slide-toggle.scss +1 -0
- package/slide-toggle/_slide-toggle-theme.scss +42 -80
- package/slider/_m2-slider.scss +34 -55
- package/slider/_slider-theme.scss +38 -45
- package/snack-bar/_m2-snack-bar.scss +16 -36
- package/snack-bar/_snack-bar-theme.scss +28 -31
- package/sort/_m2-sort.scss +7 -18
- package/sort/_sort-theme.scss +28 -33
- package/stepper/_m2-stepper.scss +39 -57
- package/stepper/_m3-stepper.scss +1 -2
- package/stepper/_stepper-theme.scss +41 -49
- package/table/_m2-table.scss +54 -72
- package/table/_m3-table.scss +1 -2
- package/table/_table-theme.scss +28 -36
- package/tabs/_m2-tabs.scss +31 -46
- package/tabs/_m3-tabs.scss +1 -2
- package/tabs/_tabs-theme.scss +41 -49
- package/timepicker/_m2-timepicker.scss +10 -22
- package/timepicker/_timepicker-theme.scss +28 -46
- package/toolbar/_m2-toolbar.scss +26 -46
- package/toolbar/_m3-toolbar.scss +1 -2
- package/toolbar/_toolbar-theme.scss +55 -46
- package/tooltip/_m2-tooltip.scss +16 -34
- package/tooltip/_tooltip-theme.scss +28 -37
- package/tree/_m2-tree.scss +21 -38
- package/tree/_m3-tree.scss +1 -2
- package/tree/_tree-theme.scss +28 -38
- package/core/tokens/_format-tokens.scss +0 -5
|
@@ -1,42 +1,44 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
|
-
@use '../core/theming/theming';
|
|
3
2
|
@use '../core/theming/inspection';
|
|
4
3
|
@use '../core/typography/typography';
|
|
5
4
|
@use './m2-grid-list';
|
|
6
5
|
@use './m3-grid-list';
|
|
7
|
-
@use '../core/style/sass-utils';
|
|
8
6
|
@use '../core/tokens/token-utils';
|
|
9
7
|
|
|
10
8
|
@mixin base($theme) {
|
|
9
|
+
$tokens: map.get(m2-grid-list.get-tokens($theme), base);
|
|
11
10
|
@if inspection.get-theme-version($theme) == 1 {
|
|
12
|
-
|
|
13
|
-
} @else {
|
|
11
|
+
$tokens: map.get(m3-grid-list.get-tokens($theme), base);
|
|
14
12
|
}
|
|
13
|
+
|
|
14
|
+
@include token-utils.values($tokens);
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
// Include this empty mixin for consistency with the other components.
|
|
18
17
|
@mixin color($theme) {
|
|
18
|
+
$tokens: map.get(m2-grid-list.get-tokens($theme), color);
|
|
19
19
|
@if inspection.get-theme-version($theme) == 1 {
|
|
20
|
-
|
|
21
|
-
} @else {
|
|
20
|
+
$tokens: map.get(m3-grid-list.get-tokens($theme), color);
|
|
22
21
|
}
|
|
22
|
+
|
|
23
|
+
@include token-utils.values($tokens);
|
|
23
24
|
}
|
|
24
25
|
|
|
25
26
|
@mixin typography($theme) {
|
|
27
|
+
$tokens: map.get(m2-grid-list.get-tokens($theme), typography);
|
|
26
28
|
@if inspection.get-theme-version($theme) == 1 {
|
|
27
|
-
|
|
28
|
-
} @else {
|
|
29
|
-
@include sass-utils.current-selector-or-root() {
|
|
30
|
-
@include token-utils.create-token-values-mixed(m2-grid-list.get-typography-tokens($theme));
|
|
31
|
-
}
|
|
29
|
+
$tokens: map.get(m3-grid-list.get-tokens($theme), typography);
|
|
32
30
|
}
|
|
31
|
+
|
|
32
|
+
@include token-utils.values($tokens);
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
@mixin density($theme) {
|
|
36
|
+
$tokens: map.get(m2-grid-list.get-tokens($theme), density);
|
|
36
37
|
@if inspection.get-theme-version($theme) == 1 {
|
|
37
|
-
|
|
38
|
-
} @else {
|
|
38
|
+
$tokens: map.get(m3-grid-list.get-tokens($theme), density);
|
|
39
39
|
}
|
|
40
|
+
|
|
41
|
+
@include token-utils.values($tokens);
|
|
40
42
|
}
|
|
41
43
|
|
|
42
44
|
/// Defines the tokens that will be available in the `overrides` mixin and for docs extraction.
|
|
@@ -54,23 +56,21 @@
|
|
|
54
56
|
}
|
|
55
57
|
|
|
56
58
|
@mixin theme($theme) {
|
|
57
|
-
@
|
|
58
|
-
@
|
|
59
|
-
|
|
59
|
+
@if inspection.get-theme-version($theme) == 1 {
|
|
60
|
+
@include base($theme);
|
|
61
|
+
@include color($theme);
|
|
62
|
+
@include density($theme);
|
|
63
|
+
@include typography($theme);
|
|
64
|
+
} @else {
|
|
65
|
+
@include base($theme);
|
|
66
|
+
@if inspection.theme-has($theme, color) {
|
|
60
67
|
@include color($theme);
|
|
68
|
+
}
|
|
69
|
+
@if inspection.theme-has($theme, density) {
|
|
61
70
|
@include density($theme);
|
|
71
|
+
}
|
|
72
|
+
@if inspection.theme-has($theme, typography) {
|
|
62
73
|
@include typography($theme);
|
|
63
|
-
} @else {
|
|
64
|
-
@include base($theme);
|
|
65
|
-
@if inspection.theme-has($theme, color) {
|
|
66
|
-
@include color($theme);
|
|
67
|
-
}
|
|
68
|
-
@if inspection.theme-has($theme, density) {
|
|
69
|
-
@include density($theme);
|
|
70
|
-
}
|
|
71
|
-
@if inspection.theme-has($theme, typography) {
|
|
72
|
-
@include typography($theme);
|
|
73
|
-
}
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
}
|
|
@@ -1,34 +1,21 @@
|
|
|
1
|
-
@use '../core/
|
|
1
|
+
@use '../core/tokens/m2-utils';
|
|
2
|
+
@use 'sass:map';
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
@function get-unthemable-tokens() {
|
|
6
|
-
@return ();
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
// Tokens that can be configured through Angular Material's color theming API.
|
|
10
|
-
@function get-color-tokens($theme) {
|
|
11
|
-
@return ();
|
|
12
|
-
}
|
|
4
|
+
@function get-tokens($theme) {
|
|
5
|
+
$system: m2-utils.get-system($theme);
|
|
13
6
|
|
|
14
|
-
// Tokens that can be configured through Angular Material's typography theming API.
|
|
15
|
-
@function get-typography-tokens($theme) {
|
|
16
7
|
@return (
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
8
|
+
base: (),
|
|
9
|
+
color: (),
|
|
10
|
+
typography: (
|
|
11
|
+
// TODO(crisbeto): other components have tokens for all typography dimensions.
|
|
12
|
+
// Here we only set the font size to maintain the same appearance as the pre-tokens
|
|
13
|
+
// theming API. Consider adding more tokens for letter spacing, font weight etc.
|
|
14
|
+
grid-list-tile-header-primary-text-size: map.get($system, body-medium-size),
|
|
15
|
+
grid-list-tile-header-secondary-text-size: map.get($system, body-small-size),
|
|
16
|
+
grid-list-tile-footer-primary-text-size: map.get($system, body-medium-size),
|
|
17
|
+
grid-list-tile-footer-secondary-text-size: map.get($system, body-small-size),
|
|
18
|
+
),
|
|
19
|
+
density: (),
|
|
28
20
|
);
|
|
29
21
|
}
|
|
30
|
-
|
|
31
|
-
// Tokens that can be configured through Angular Material's density theming API.
|
|
32
|
-
@function get-density-tokens($theme) {
|
|
33
|
-
@return ();
|
|
34
|
-
}
|
package/icon/_icon-theme.scss
CHANGED
|
@@ -1,50 +1,47 @@
|
|
|
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 './m2-icon';
|
|
6
4
|
@use './m3-icon';
|
|
7
5
|
@use 'sass:map';
|
|
8
6
|
|
|
9
|
-
@mixin _palette-colors($theme, $palette-name) {
|
|
10
|
-
$color: inspection.get-theme-color($theme, $palette-name, text);
|
|
11
|
-
$tokens: m2-icon.private-get-icon-color-tokens($color);
|
|
12
|
-
@include token-utils.create-token-values-mixed($tokens);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
/// Outputs base theme styles (styles not dependent on the color, typography, or density settings)
|
|
16
|
-
/// for the mat-icon.
|
|
17
|
-
/// @param {Map} $theme The theme to generate base styles for.
|
|
18
7
|
@mixin base($theme) {
|
|
8
|
+
$tokens: map.get(m2-icon.get-tokens($theme), base);
|
|
19
9
|
@if inspection.get-theme-version($theme) == 1 {
|
|
20
|
-
|
|
21
|
-
} @else {
|
|
10
|
+
$tokens: map.get(m3-icon.get-tokens($theme), base);
|
|
22
11
|
}
|
|
12
|
+
|
|
13
|
+
@include token-utils.values($tokens);
|
|
23
14
|
}
|
|
24
15
|
|
|
25
16
|
/// Outputs color theme styles for the mat-icon.
|
|
26
17
|
/// @param {Map} $theme The theme to generate color styles for.
|
|
27
18
|
/// @param {String} $color-variant The color variant to use for the component (M3 only)
|
|
28
19
|
@mixin color($theme, $color-variant: null) {
|
|
20
|
+
$tokens: map.get(m2-icon.get-tokens($theme), color);
|
|
29
21
|
@if inspection.get-theme-version($theme) == 1 {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
@include token-utils.create-token-values-mixed(m2-icon.get-color-tokens($theme));
|
|
35
|
-
}
|
|
22
|
+
$tokens: map.get(m3-icon.get-tokens($theme, $color-variant), color);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@include token-utils.values($tokens);
|
|
36
26
|
|
|
27
|
+
@if inspection.get-theme-version($theme) != 1 {
|
|
37
28
|
.mat-icon {
|
|
38
29
|
&.mat-primary {
|
|
39
|
-
|
|
30
|
+
$color: inspection.get-theme-color($theme, primary, text);
|
|
31
|
+
$tokens: m2-icon.private-get-icon-color-tokens($color);
|
|
32
|
+
@include token-utils.values($tokens);
|
|
40
33
|
}
|
|
41
34
|
|
|
42
35
|
&.mat-accent {
|
|
43
|
-
|
|
36
|
+
$color: inspection.get-theme-color($theme, accent, text);
|
|
37
|
+
$tokens: m2-icon.private-get-icon-color-tokens($color);
|
|
38
|
+
@include token-utils.values($tokens);
|
|
44
39
|
}
|
|
45
40
|
|
|
46
41
|
&.mat-warn {
|
|
47
|
-
|
|
42
|
+
$color: inspection.get-theme-color($theme, warn, text);
|
|
43
|
+
$tokens: m2-icon.private-get-icon-color-tokens($color);
|
|
44
|
+
@include token-utils.values($tokens);
|
|
48
45
|
}
|
|
49
46
|
}
|
|
50
47
|
}
|
|
@@ -53,19 +50,23 @@
|
|
|
53
50
|
/// Outputs typography theme styles for the mat-icon.
|
|
54
51
|
/// @param {Map} $theme The theme to generate typography styles for.
|
|
55
52
|
@mixin typography($theme) {
|
|
53
|
+
$tokens: map.get(m2-icon.get-tokens($theme), typography);
|
|
56
54
|
@if inspection.get-theme-version($theme) == 1 {
|
|
57
|
-
|
|
58
|
-
} @else {
|
|
55
|
+
$tokens: map.get(m3-icon.get-tokens($theme), typography);
|
|
59
56
|
}
|
|
57
|
+
|
|
58
|
+
@include token-utils.values($tokens);
|
|
60
59
|
}
|
|
61
60
|
|
|
62
61
|
/// Outputs density theme styles for the mat-icon.
|
|
63
62
|
/// @param {Map} $theme The theme to generate density styles for.
|
|
64
63
|
@mixin density($theme) {
|
|
64
|
+
$tokens: map.get(m2-icon.get-tokens($theme), density);
|
|
65
65
|
@if inspection.get-theme-version($theme) == 1 {
|
|
66
|
-
|
|
67
|
-
} @else {
|
|
66
|
+
$tokens: map.get(m3-icon.get-tokens($theme), density);
|
|
68
67
|
}
|
|
68
|
+
|
|
69
|
+
@include token-utils.values($tokens);
|
|
69
70
|
}
|
|
70
71
|
|
|
71
72
|
/// Defines the tokens that will be available in the `overrides` mixin and for docs extraction.
|
|
@@ -88,23 +89,21 @@
|
|
|
88
89
|
/// @param {Map} $theme The theme to generate styles for.
|
|
89
90
|
/// @param {String} $color-variant The color variant to use for the component (M3 only)
|
|
90
91
|
@mixin theme($theme, $color-variant: null) {
|
|
91
|
-
@
|
|
92
|
-
@
|
|
93
|
-
|
|
94
|
-
|
|
92
|
+
@if inspection.get-theme-version($theme) == 1 {
|
|
93
|
+
@include base($theme);
|
|
94
|
+
@include color($theme, $color-variant);
|
|
95
|
+
@include density($theme);
|
|
96
|
+
@include typography($theme);
|
|
97
|
+
} @else {
|
|
98
|
+
@include base($theme);
|
|
99
|
+
@if inspection.theme-has($theme, color) {
|
|
100
|
+
@include color($theme);
|
|
101
|
+
}
|
|
102
|
+
@if inspection.theme-has($theme, density) {
|
|
95
103
|
@include density($theme);
|
|
104
|
+
}
|
|
105
|
+
@if inspection.theme-has($theme, typography) {
|
|
96
106
|
@include typography($theme);
|
|
97
|
-
} @else {
|
|
98
|
-
@include base($theme);
|
|
99
|
-
@if inspection.theme-has($theme, color) {
|
|
100
|
-
@include color($theme);
|
|
101
|
-
}
|
|
102
|
-
@if inspection.theme-has($theme, density) {
|
|
103
|
-
@include density($theme);
|
|
104
|
-
}
|
|
105
|
-
@if inspection.theme-has($theme, typography) {
|
|
106
|
-
@include typography($theme);
|
|
107
|
-
}
|
|
108
107
|
}
|
|
109
108
|
}
|
|
110
109
|
}
|
package/icon/_m2-icon.scss
CHANGED
|
@@ -1,24 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
// Tokens that can be configured through Angular Material's color theming API.
|
|
9
|
-
@function get-color-tokens($theme) {
|
|
10
|
-
// Default the icon to `inherit` so it matches the text around it.
|
|
11
|
-
@return private-get-icon-color-tokens(inherit);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
// Tokens that can be configured through Angular Material's typography theming API.
|
|
15
|
-
@function get-typography-tokens($theme) {
|
|
16
|
-
@return ();
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
// Tokens that can be configured through Angular Material's density theming API.
|
|
20
|
-
@function get-density-tokens($theme) {
|
|
21
|
-
@return ();
|
|
1
|
+
@function get-tokens($theme) {
|
|
2
|
+
@return (
|
|
3
|
+
base: (),
|
|
4
|
+
color: private-get-icon-color-tokens(inherit),
|
|
5
|
+
typography: (),
|
|
6
|
+
density: (),
|
|
7
|
+
);
|
|
22
8
|
}
|
|
23
9
|
|
|
24
10
|
// Mixin used to set a specific color on an icon.
|
package/input/_input-theme.scss
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
@use '../core/theming/theming';
|
|
2
1
|
@use '../core/typography/typography';
|
|
3
2
|
@use '../core/tokens/token-utils';
|
|
4
3
|
|
|
@@ -33,7 +32,5 @@
|
|
|
33
32
|
}
|
|
34
33
|
|
|
35
34
|
@mixin theme($theme) {
|
|
36
|
-
|
|
37
|
-
// No-op
|
|
38
|
-
}
|
|
35
|
+
// No-op
|
|
39
36
|
}
|
package/input/index.d.ts
CHANGED
|
@@ -179,17 +179,6 @@ declare class MatInput implements MatFormFieldControl<any>, OnChanges, OnDestroy
|
|
|
179
179
|
/** Whether the form control is a native select that is displayed inline. */
|
|
180
180
|
_isInlineSelect(): boolean;
|
|
181
181
|
private _iOSKeyupListener;
|
|
182
|
-
private _webkitBlinkWheelListener;
|
|
183
|
-
/**
|
|
184
|
-
* In blink and webkit browsers a focused number input does not increment or decrement its value
|
|
185
|
-
* on mouse wheel interaction unless a wheel event listener is attached to it or one of its
|
|
186
|
-
* ancestors or a passive wheel listener is attached somewhere in the DOM. For example: Hitting
|
|
187
|
-
* a tooltip once enables the mouse wheel input for all number inputs as long as it exists. In
|
|
188
|
-
* order to get reliable and intuitive behavior we apply a wheel event on our own thus making
|
|
189
|
-
* sure increment and decrement by mouse wheel works every time.
|
|
190
|
-
* @docs-private
|
|
191
|
-
*/
|
|
192
|
-
private _ensureWheelDefaultBehavior;
|
|
193
182
|
/** Gets the value to set on the `readonly` attribute. */
|
|
194
183
|
protected _getReadonlyAttribute(): string | null;
|
|
195
184
|
static ɵfac: i0.ɵɵFactoryDeclaration<MatInput, never>;
|
package/list/_list-theme.scss
CHANGED
|
@@ -1,66 +1,68 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
2
|
|
|
3
3
|
@use '../checkbox/m2-checkbox';
|
|
4
|
-
@use '../core/style/sass-utils';
|
|
5
4
|
@use '../core/theming/inspection';
|
|
6
|
-
@use '../core/theming/theming';
|
|
7
5
|
@use '../core/tokens/token-utils';
|
|
8
6
|
@use '../core/typography/typography';
|
|
9
7
|
@use '../radio/m2-radio';
|
|
10
8
|
@use './m2-list';
|
|
11
9
|
@use './m3-list';
|
|
10
|
+
@use '../core/tokens/m2-utils';
|
|
11
|
+
@use '../core/theming/theming';
|
|
12
12
|
|
|
13
13
|
@mixin base($theme) {
|
|
14
|
-
|
|
14
|
+
$tokens: map.get(m2-list.get-tokens($theme), base);
|
|
15
15
|
@if inspection.get-theme-version($theme) == 1 {
|
|
16
|
-
|
|
17
|
-
} @else {
|
|
18
|
-
@include sass-utils.current-selector-or-root() {
|
|
19
|
-
@include token-utils.create-token-values-mixed(m2-list.get-unthemable-tokens());
|
|
20
|
-
}
|
|
16
|
+
$tokens: map.get(m3-list.get-tokens($theme), base);
|
|
21
17
|
}
|
|
18
|
+
|
|
19
|
+
@include token-utils.values($tokens);
|
|
22
20
|
}
|
|
23
21
|
|
|
24
22
|
@mixin color($theme) {
|
|
23
|
+
$tokens: map.get(m2-list.get-tokens($theme), color);
|
|
25
24
|
@if inspection.get-theme-version($theme) == 1 {
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
25
|
+
$tokens: map.get(m3-list.get-tokens($theme), color);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@include token-utils.values($tokens);
|
|
31
29
|
|
|
30
|
+
@if inspection.get-theme-version($theme) != 1 {
|
|
32
31
|
.mdc-list-item__start,
|
|
33
32
|
.mdc-list-item__end {
|
|
34
|
-
|
|
33
|
+
$tokens: m2-radio.private-get-color-palette-color-tokens($theme, primary);
|
|
34
|
+
@include token-utils.values($tokens);
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
.mat-accent {
|
|
38
38
|
.mdc-list-item__start,
|
|
39
39
|
.mdc-list-item__end {
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
$tokens: m2-radio.private-get-color-palette-color-tokens($theme, secondary);
|
|
41
|
+
@include token-utils.values($tokens);
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
.mat-warn {
|
|
46
46
|
.mdc-list-item__start,
|
|
47
47
|
.mdc-list-item__end {
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
$tokens: m2-radio.private-get-color-palette-color-tokens($theme, error);
|
|
49
|
+
@include token-utils.values($tokens);
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
.mat-mdc-list-option {
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
$tokens: m2-checkbox.private-get-color-palette-color-tokens($theme, primary);
|
|
55
|
+
@include token-utils.values($tokens);
|
|
56
56
|
}
|
|
57
|
+
|
|
57
58
|
.mat-mdc-list-option.mat-accent {
|
|
58
|
-
|
|
59
|
-
|
|
59
|
+
$tokens: m2-checkbox.private-get-color-palette-color-tokens($theme, secondary);
|
|
60
|
+
@include token-utils.values($tokens);
|
|
60
61
|
}
|
|
62
|
+
|
|
61
63
|
.mat-mdc-list-option.mat-warn {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
+
$tokens: m2-checkbox.private-get-color-palette-color-tokens($theme, error);
|
|
65
|
+
@include token-utils.values($tokens);
|
|
64
66
|
}
|
|
65
67
|
|
|
66
68
|
// There is no token for activated color on nav list.
|
|
@@ -89,19 +91,21 @@
|
|
|
89
91
|
}
|
|
90
92
|
|
|
91
93
|
@mixin density($theme) {
|
|
94
|
+
$tokens: map.get(m2-list.get-tokens($theme), density);
|
|
92
95
|
@if inspection.get-theme-version($theme) == 1 {
|
|
93
|
-
|
|
94
|
-
}
|
|
95
|
-
$density-scale: inspection.get-theme-density($theme);
|
|
96
|
+
$tokens: map.get(m3-list.get-tokens($theme), density);
|
|
97
|
+
}
|
|
96
98
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
99
|
+
@include token-utils.values($tokens);
|
|
100
|
+
|
|
101
|
+
@if inspection.get-theme-version($theme) != 1 {
|
|
102
|
+
$system: m2-utils.get-system($theme);
|
|
103
|
+
$density-scale: theming.clamp-density(map.get($system, density-scale), -5);
|
|
101
104
|
|
|
102
105
|
.mdc-list-item__start,
|
|
103
106
|
.mdc-list-item__end {
|
|
104
|
-
|
|
107
|
+
$tokens: map.get(m2-radio.get-tokens($theme), density);
|
|
108
|
+
@include token-utils.values($tokens);
|
|
105
109
|
}
|
|
106
110
|
|
|
107
111
|
// TODO(mmalerba): This is added to maintain the same style MDC used prior to the token-based
|
|
@@ -144,18 +148,20 @@
|
|
|
144
148
|
}
|
|
145
149
|
|
|
146
150
|
@mixin typography($theme) {
|
|
151
|
+
$tokens: map.get(m2-list.get-tokens($theme), typography);
|
|
147
152
|
@if inspection.get-theme-version($theme) == 1 {
|
|
148
|
-
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
}
|
|
153
|
+
$tokens: map.get(m3-list.get-tokens($theme), typography);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
@include token-utils.values($tokens);
|
|
153
157
|
|
|
158
|
+
@if inspection.get-theme-version($theme) != 1 {
|
|
154
159
|
// MDC does not have tokens for the subheader.
|
|
155
160
|
// TODO(mmalerba): Discuss with MDC about adding them, or create custom tokens.
|
|
156
161
|
.mdc-list-group__subheader {
|
|
157
|
-
|
|
158
|
-
|
|
162
|
+
$system: m2-utils.get-system($theme);
|
|
163
|
+
font: map.get($system, label-large);
|
|
164
|
+
letter-spacing: map.get($system, label-large-tracking);
|
|
159
165
|
}
|
|
160
166
|
}
|
|
161
167
|
}
|
|
@@ -175,23 +181,21 @@
|
|
|
175
181
|
}
|
|
176
182
|
|
|
177
183
|
@mixin theme($theme) {
|
|
178
|
-
@
|
|
179
|
-
@
|
|
180
|
-
|
|
184
|
+
@if inspection.get-theme-version($theme) == 1 {
|
|
185
|
+
@include base($theme);
|
|
186
|
+
@include color($theme);
|
|
187
|
+
@include density($theme);
|
|
188
|
+
@include typography($theme);
|
|
189
|
+
} @else {
|
|
190
|
+
@include base($theme);
|
|
191
|
+
@if inspection.theme-has($theme, color) {
|
|
181
192
|
@include color($theme);
|
|
193
|
+
}
|
|
194
|
+
@if inspection.theme-has($theme, density) {
|
|
182
195
|
@include density($theme);
|
|
196
|
+
}
|
|
197
|
+
@if inspection.theme-has($theme, typography) {
|
|
183
198
|
@include typography($theme);
|
|
184
|
-
} @else {
|
|
185
|
-
@include base($theme);
|
|
186
|
-
@if inspection.theme-has($theme, color) {
|
|
187
|
-
@include color($theme);
|
|
188
|
-
}
|
|
189
|
-
@if inspection.theme-has($theme, density) {
|
|
190
|
-
@include density($theme);
|
|
191
|
-
}
|
|
192
|
-
@if inspection.theme-has($theme, typography) {
|
|
193
|
-
@include typography($theme);
|
|
194
|
-
}
|
|
195
199
|
}
|
|
196
200
|
}
|
|
197
201
|
}
|