@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
|
@@ -69,32 +69,12 @@
|
|
|
69
69
|
@return _create-var(--mat-#{$token}, $sys-fallback);
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
// Outputs a map of
|
|
73
|
-
@mixin
|
|
74
|
-
@include
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
// other declarations (e.g. M2 themes). Used to avoid https://sass-lang.com/documentation/breaking-changes/mixed-decls/
|
|
79
|
-
@mixin create-token-values-mixed($tokens) {
|
|
80
|
-
@include _create-token-values-internal($tokens, true);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
@mixin _create-token-values-internal($tokens, $in-place) {
|
|
84
|
-
@if ($tokens != null) {
|
|
85
|
-
@if ($in-place) {
|
|
86
|
-
& {
|
|
87
|
-
@each $key, $value in $tokens {
|
|
88
|
-
@if $value != null {
|
|
89
|
-
--mat-#{$key}: #{$value};
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
} @else {
|
|
94
|
-
@each $key, $value in $tokens {
|
|
95
|
-
@if $value != null {
|
|
96
|
-
--mat-#{$key}: #{$value};
|
|
97
|
-
}
|
|
72
|
+
// Outputs a map of token values as CSS variable definitions.
|
|
73
|
+
@mixin values($tokens) {
|
|
74
|
+
@include sass-utils.current-selector-or-root() {
|
|
75
|
+
@each $key, $value in $tokens {
|
|
76
|
+
@if $value != null {
|
|
77
|
+
--mat-#{$key}: #{$value};
|
|
98
78
|
}
|
|
99
79
|
}
|
|
100
80
|
}
|
|
@@ -125,7 +105,7 @@
|
|
|
125
105
|
$namespace: list.nth($data, 1);
|
|
126
106
|
$name: list.nth($data, 2);
|
|
127
107
|
$prefixed-name: $namespace + '-' + $name;
|
|
128
|
-
@include
|
|
108
|
+
@include values(($prefixed-name: $value));
|
|
129
109
|
} @else {
|
|
130
110
|
@error #{'Invalid token name `'}#{$name}#{'`. '}#{'Valid tokens are: '}#{$all-names};
|
|
131
111
|
}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Design system display name: Material 3
|
|
3
|
+
// Design system version: v0.161
|
|
4
|
+
//
|
|
5
|
+
|
|
6
|
+
@use 'sass:map';
|
|
7
|
+
@use '../../m2/palette';
|
|
8
|
+
|
|
9
|
+
@function md-sys-color-values-dark($palettes) {
|
|
10
|
+
@return (
|
|
11
|
+
primary: map.get($palettes, primary, default),
|
|
12
|
+
on-primary: map.get($palettes, primary, default-contrast),
|
|
13
|
+
inverse-primary: map.get($palettes, primary, 600),
|
|
14
|
+
secondary: map.get($palettes, accent, default),
|
|
15
|
+
on-secondary: map.get($palettes, accent, default-contrast),
|
|
16
|
+
inverse-secondary: map.get($palettes, accent, 600),
|
|
17
|
+
error: map.get($palettes, warn, default),
|
|
18
|
+
on-error: map.get($palettes, warn, default-contrast),
|
|
19
|
+
inverse-error: map.get($palettes, warn, 600),
|
|
20
|
+
shadow: black,
|
|
21
|
+
surface: map.get(palette.$grey-palette, 800),
|
|
22
|
+
on-surface: white,
|
|
23
|
+
surface-variant: #4a4a4a,
|
|
24
|
+
on-surface-variant: rgba(white, 0.7),
|
|
25
|
+
background: #303030,
|
|
26
|
+
inverse-surface: white,
|
|
27
|
+
inverse-on-surface: rgba(black, 0.87),
|
|
28
|
+
outline: rgba(white, 0.12),
|
|
29
|
+
outline-variant: rgba(white, 0.38),
|
|
30
|
+
|
|
31
|
+
// TBD
|
|
32
|
+
error-container: null,
|
|
33
|
+
on-background: null,
|
|
34
|
+
on-error-container: null,
|
|
35
|
+
on-primary-container: null,
|
|
36
|
+
on-primary-fixed: null,
|
|
37
|
+
on-primary-fixed-variant: null,
|
|
38
|
+
on-secondary-container: null,
|
|
39
|
+
on-secondary-fixed: null,
|
|
40
|
+
on-secondary-fixed-variant: null,
|
|
41
|
+
on-tertiary: null,
|
|
42
|
+
on-tertiary-container: null,
|
|
43
|
+
on-tertiary-fixed: null,
|
|
44
|
+
on-tertiary-fixed-variant: null,
|
|
45
|
+
primary-container: null,
|
|
46
|
+
primary-fixed: null,
|
|
47
|
+
primary-fixed-dim: null,
|
|
48
|
+
scrim: null,
|
|
49
|
+
secondary-container: null,
|
|
50
|
+
secondary-fixed: null,
|
|
51
|
+
secondary-fixed-dim: null,
|
|
52
|
+
surface-bright: null,
|
|
53
|
+
surface-container: null,
|
|
54
|
+
surface-container-high: null,
|
|
55
|
+
surface-container-highest: null,
|
|
56
|
+
surface-container-low: null,
|
|
57
|
+
surface-container-lowest: null,
|
|
58
|
+
surface-dim: null,
|
|
59
|
+
surface-tint: null,
|
|
60
|
+
tertiary: null,
|
|
61
|
+
tertiary-container: null,
|
|
62
|
+
tertiary-fixed: null,
|
|
63
|
+
tertiary-fixed-dim: null,
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
@function md-sys-color-values-light($palettes) {
|
|
68
|
+
@return (
|
|
69
|
+
primary: map.get($palettes, primary, default),
|
|
70
|
+
on-primary: map.get($palettes, primary, default-contrast),
|
|
71
|
+
inverse-primary: map.get($palettes, primary, 300),
|
|
72
|
+
secondary: map.get($palettes, accent, default),
|
|
73
|
+
on-secondary: map.get($palettes, accent, default-contrast),
|
|
74
|
+
inverse-secondary: map.get($palettes, accent, 300),
|
|
75
|
+
error: map.get($palettes, warn, default),
|
|
76
|
+
on-error: map.get($palettes, warn, default-contrast),
|
|
77
|
+
inverse-error: map.get($palettes, warn, 300),
|
|
78
|
+
shadow: black,
|
|
79
|
+
surface: white,
|
|
80
|
+
on-surface: rgba(black, 0.87),
|
|
81
|
+
surface-variant: #f6f6f6,
|
|
82
|
+
on-surface-variant: rgba(black, 0.54),
|
|
83
|
+
background: map.get(palette.$grey-palette, 50),
|
|
84
|
+
inverse-surface: map.get(palette.$grey-palette, 800),
|
|
85
|
+
inverse-on-surface: white,
|
|
86
|
+
outline: rgba(black, 0.12),
|
|
87
|
+
outline-variant: rgba(black, 0.38),
|
|
88
|
+
|
|
89
|
+
// TBD
|
|
90
|
+
error-container: null,
|
|
91
|
+
on-background: null,
|
|
92
|
+
on-error-container: null,
|
|
93
|
+
on-primary-container: null,
|
|
94
|
+
on-primary-fixed: null,
|
|
95
|
+
on-primary-fixed-variant: null,
|
|
96
|
+
on-secondary-container: null,
|
|
97
|
+
on-secondary-fixed: null,
|
|
98
|
+
on-secondary-fixed-variant: null,
|
|
99
|
+
on-tertiary: null,
|
|
100
|
+
on-tertiary-container: null,
|
|
101
|
+
on-tertiary-fixed: null,
|
|
102
|
+
on-tertiary-fixed-variant: null,
|
|
103
|
+
primary-container: null,
|
|
104
|
+
primary-fixed: null,
|
|
105
|
+
primary-fixed-dim: null,
|
|
106
|
+
scrim: null,
|
|
107
|
+
secondary-container: null,
|
|
108
|
+
secondary-fixed: null,
|
|
109
|
+
secondary-fixed-dim: null,
|
|
110
|
+
surface-bright: null,
|
|
111
|
+
surface-container: null,
|
|
112
|
+
surface-container-high: null,
|
|
113
|
+
surface-container-highest: null,
|
|
114
|
+
surface-container-low: null,
|
|
115
|
+
surface-container-lowest: null,
|
|
116
|
+
surface-dim: null,
|
|
117
|
+
surface-tint: null,
|
|
118
|
+
tertiary: null,
|
|
119
|
+
tertiary-container: null,
|
|
120
|
+
tertiary-fixed: null,
|
|
121
|
+
tertiary-fixed-dim: null,
|
|
122
|
+
);
|
|
123
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Design system display name: Material 3
|
|
3
|
+
// Design system version: v0.161
|
|
4
|
+
//
|
|
5
|
+
|
|
6
|
+
@function md-sys-elevation-values() {
|
|
7
|
+
@return (
|
|
8
|
+
// TBD
|
|
9
|
+
level0: null,
|
|
10
|
+
level1: null,
|
|
11
|
+
level2: null,
|
|
12
|
+
level3: null,
|
|
13
|
+
level4: null,
|
|
14
|
+
level5: null,
|
|
15
|
+
);
|
|
16
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Design system display name: Material 3
|
|
3
|
+
// Design system version: v0.161
|
|
4
|
+
//
|
|
5
|
+
|
|
6
|
+
@function md-sys-motion-values() {
|
|
7
|
+
@return (
|
|
8
|
+
// TBD
|
|
9
|
+
duration-extra-long1: null,
|
|
10
|
+
duration-extra-long2: null,
|
|
11
|
+
duration-extra-long3: null,
|
|
12
|
+
duration-extra-long4: null,
|
|
13
|
+
duration-long1: null,
|
|
14
|
+
duration-long2: null,
|
|
15
|
+
duration-long3: null,
|
|
16
|
+
duration-long4: null,
|
|
17
|
+
duration-medium1: null,
|
|
18
|
+
duration-medium2: null,
|
|
19
|
+
duration-medium3: null,
|
|
20
|
+
duration-medium4: null,
|
|
21
|
+
duration-short1: null,
|
|
22
|
+
duration-short2: null,
|
|
23
|
+
duration-short3: null,
|
|
24
|
+
duration-short4: null,
|
|
25
|
+
easing-emphasized: null,
|
|
26
|
+
easing-emphasized-accelerate: null,
|
|
27
|
+
easing-emphasized-decelerate: null,
|
|
28
|
+
easing-legacy: null,
|
|
29
|
+
easing-legacy-accelerate: null,
|
|
30
|
+
easing-legacy-decelerate: null,
|
|
31
|
+
easing-linear: null,
|
|
32
|
+
easing-standard: null,
|
|
33
|
+
easing-standard-accelerate: null,
|
|
34
|
+
easing-standard-decelerate: null,
|
|
35
|
+
);
|
|
36
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Design system display name: Material 3
|
|
3
|
+
// Design system version: v0.161
|
|
4
|
+
//
|
|
5
|
+
|
|
6
|
+
@function md-sys-shape-values() {
|
|
7
|
+
@return (
|
|
8
|
+
// TBD
|
|
9
|
+
corner-extra-large: null,
|
|
10
|
+
corner-extra-large-top: null,
|
|
11
|
+
corner-extra-small: null,
|
|
12
|
+
corner-extra-small-top: null,
|
|
13
|
+
corner-full: null,
|
|
14
|
+
corner-large: null,
|
|
15
|
+
corner-large-end: null,
|
|
16
|
+
corner-large-start: null,
|
|
17
|
+
corner-large-top: null,
|
|
18
|
+
corner-medium: null,
|
|
19
|
+
corner-none: null,
|
|
20
|
+
corner-small: null,
|
|
21
|
+
);
|
|
22
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Design system display name: Material 3
|
|
3
|
+
// Design system version: v0.161
|
|
4
|
+
//
|
|
5
|
+
|
|
6
|
+
@function md-sys-state-values($exclude-hardcoded-values: false) {
|
|
7
|
+
@return (
|
|
8
|
+
focus-state-layer-opacity: 0.12,
|
|
9
|
+
hover-state-layer-opacity: 0.04,
|
|
10
|
+
pressed-state-layer-opacity: 0.12,
|
|
11
|
+
|
|
12
|
+
// TBD
|
|
13
|
+
dragged-state-layer-opacity: 0.16,
|
|
14
|
+
);
|
|
15
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use 'sass:string';
|
|
3
|
+
@use 'sass:meta';
|
|
4
|
+
|
|
5
|
+
@function md-sys-typescale-values($config) {
|
|
6
|
+
// Mapping is according to the old 2014 version of the typography spec.
|
|
7
|
+
$sys-to-config: (
|
|
8
|
+
body-large: subheading-1,
|
|
9
|
+
body-medium: body-1,
|
|
10
|
+
body-small: caption,
|
|
11
|
+
display-large: display-4,
|
|
12
|
+
display-medium: display-4,
|
|
13
|
+
display-small: display-4,
|
|
14
|
+
headline-large: display-3,
|
|
15
|
+
headline-medium: display-2,
|
|
16
|
+
headline-small: display-1,
|
|
17
|
+
label-large: subheading-2,
|
|
18
|
+
label-medium: body-2,
|
|
19
|
+
label-small: button,
|
|
20
|
+
title-large: headline,
|
|
21
|
+
title-medium: headline,
|
|
22
|
+
title-small: title,
|
|
23
|
+
);
|
|
24
|
+
|
|
25
|
+
// If the config is based on the updated 2018 version of the typography spec, then
|
|
26
|
+
// use the correct config keys mapping.
|
|
27
|
+
@if (map.get($config, headline-1) != null) {
|
|
28
|
+
$sys-to-config: (
|
|
29
|
+
body-large: body-1,
|
|
30
|
+
body-medium: body-2,
|
|
31
|
+
body-small: caption,
|
|
32
|
+
label-large: subtitle-1,
|
|
33
|
+
label-medium: subtitle-2,
|
|
34
|
+
label-small: button,
|
|
35
|
+
display-large: headline-1,
|
|
36
|
+
display-medium: headline-1,
|
|
37
|
+
display-small: headline-1,
|
|
38
|
+
headline-large: headline-2,
|
|
39
|
+
headline-medium: headline-3,
|
|
40
|
+
headline-small: headline-4,
|
|
41
|
+
title-large: headline-5,
|
|
42
|
+
title-medium: headline-5,
|
|
43
|
+
title-small: headline-6,
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
$typography: ();
|
|
48
|
+
@each $sys-key, $config-key in $sys-to-config {
|
|
49
|
+
$font: map.get($config, $config-key, font-family);
|
|
50
|
+
@if (meta.type-of($font) == 'string') {
|
|
51
|
+
$font: string.unquote($font);
|
|
52
|
+
}
|
|
53
|
+
$line-height: map.get($config, $config-key, line-height);
|
|
54
|
+
$size: map.get($config, $config-key, font-size);
|
|
55
|
+
$tracking: map.get($config, $config-key, letter-spacing);
|
|
56
|
+
$weight: map.get($config, $config-key, font-weight);
|
|
57
|
+
$typography: map.merge($typography, (
|
|
58
|
+
#{$sys-key}: $weight $size #{'/'} $line-height $font,
|
|
59
|
+
#{$sys-key}-font: $font,
|
|
60
|
+
#{$sys-key}-line-height: $line-height,
|
|
61
|
+
#{$sys-key}-size: $size,
|
|
62
|
+
#{$sys-key}-tracking: $tracking,
|
|
63
|
+
#{$sys-key}-weight: $weight,
|
|
64
|
+
));
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
@return $typography;
|
|
68
|
+
}
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
// Indicates whether alternative tokens should be used
|
|
9
9
|
$_alternate-tokens: false;
|
|
10
10
|
|
|
11
|
-
@function md-sys-color-values-dark($palettes) {
|
|
11
|
+
@function md-sys-color-values-dark($palettes: ()) {
|
|
12
12
|
$values: (
|
|
13
13
|
background: map.get($palettes, neutral, 6),
|
|
14
14
|
error: map.get($palettes, error, 80),
|
|
@@ -80,7 +80,7 @@ $_alternate-tokens: false;
|
|
|
80
80
|
@return $values;
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
@function md-sys-color-values-light($palettes) {
|
|
83
|
+
@function md-sys-color-values-light($palettes: ()) {
|
|
84
84
|
$values: (
|
|
85
85
|
background: map.get($palettes, neutral, 98),
|
|
86
86
|
error: map.get($palettes, error, 40),
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
// Indicates whether alternative tokens should be used
|
|
9
9
|
$_alternate-tokens: false;
|
|
10
10
|
|
|
11
|
-
@function md-sys-typescale-values($typography) {
|
|
11
|
+
@function md-sys-typescale-values($typography: ()) {
|
|
12
12
|
$plain: map.get($typography, plain);
|
|
13
13
|
$brand: map.get($typography, brand);
|
|
14
14
|
$bold: map.get($typography, bold);
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
@use '../../theming/palettes';
|
|
2
1
|
@use './md-sys-color';
|
|
3
2
|
@use './md-sys-elevation';
|
|
4
3
|
@use './md-sys-shape';
|
|
@@ -17,31 +16,20 @@
|
|
|
17
16
|
@return $new-map;
|
|
18
17
|
}
|
|
19
18
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
brand: (Roboto),
|
|
30
|
-
plain: (Roboto),
|
|
31
|
-
bold: 700,
|
|
32
|
-
medium: 500,
|
|
33
|
-
regular: 400
|
|
34
|
-
))),
|
|
35
|
-
'md-sys-elevation': _create-system-app-vars-map(md-sys-elevation.md-sys-elevation-values()),
|
|
36
|
-
'md-sys-state': _create-system-app-vars-map(md-sys-state.md-sys-state-values()),
|
|
37
|
-
'md-sys-shape': _create-system-app-vars-map(md-sys-shape.md-sys-shape-values()),
|
|
38
|
-
// Add a subset of palette-specific colors used by components instead of system values
|
|
39
|
-
'md-ref-palette': _create-system-app-vars-map(
|
|
40
|
-
(
|
|
41
|
-
neutral10: '', // Form field native select option text color
|
|
42
|
-
neutral-variant20: '', // Sidenav scrim (container background shadow when opened),
|
|
43
|
-
)
|
|
19
|
+
$_sys-maps: (
|
|
20
|
+
md-sys-color.md-sys-color-values-light(),
|
|
21
|
+
md-sys-typescale.md-sys-typescale-values(),
|
|
22
|
+
md-sys-elevation.md-sys-elevation-values(),
|
|
23
|
+
md-sys-state.md-sys-state-values(),
|
|
24
|
+
md-sys-shape.md-sys-shape-values(),
|
|
25
|
+
(
|
|
26
|
+
neutral10: '', // Form field native select option text color
|
|
27
|
+
neutral-variant20: '', // Sidenav scrim (container background shadow when opened),
|
|
44
28
|
),
|
|
45
29
|
);
|
|
46
30
|
|
|
47
|
-
$
|
|
31
|
+
$_system: (density-scale: 0);
|
|
32
|
+
@each $sys-map in $_sys-maps {
|
|
33
|
+
$_system: map.merge($_system, _create-system-app-vars-map($sys-map));
|
|
34
|
+
}
|
|
35
|
+
$sys-theme: (_mat-system: $_system);
|
|
@@ -2,10 +2,8 @@
|
|
|
2
2
|
@use 'sass:map';
|
|
3
3
|
@use './m2-datepicker';
|
|
4
4
|
@use './m3-datepicker';
|
|
5
|
-
@use '../core/theming/theming';
|
|
6
5
|
@use '../core/theming/inspection';
|
|
7
6
|
@use '../core/tokens/token-utils';
|
|
8
|
-
@use '../core/style/sass-utils';
|
|
9
7
|
@use '../core/typography/typography';
|
|
10
8
|
@use '../button/icon-button-theme';
|
|
11
9
|
|
|
@@ -13,37 +11,35 @@
|
|
|
13
11
|
/// for the mat-datepicker.
|
|
14
12
|
/// @param {Map} $theme The theme to generate base styles for.
|
|
15
13
|
@mixin base($theme) {
|
|
14
|
+
$tokens: map.get(m2-datepicker.get-tokens($theme), base);
|
|
16
15
|
@if inspection.get-theme-version($theme) == 1 {
|
|
17
|
-
|
|
18
|
-
} @else {
|
|
19
|
-
@include sass-utils.current-selector-or-root() {
|
|
20
|
-
@include token-utils.create-token-values-mixed(m2-datepicker.get-unthemable-tokens());
|
|
21
|
-
}
|
|
16
|
+
$tokens: map.get(m3-datepicker.get-tokens($theme), base);
|
|
22
17
|
}
|
|
18
|
+
|
|
19
|
+
@include token-utils.values($tokens);
|
|
23
20
|
}
|
|
24
21
|
|
|
25
22
|
/// Outputs color theme styles for the mat-datepicker.
|
|
26
23
|
/// @param {Map} $theme The theme to generate color styles for.
|
|
27
24
|
/// @param {String} $color-variant The color variant to use for the component (M3 only)
|
|
28
25
|
@mixin color($theme, $color-variant: null) {
|
|
26
|
+
$tokens: map.get(m2-datepicker.get-tokens($theme), color);
|
|
29
27
|
@if inspection.get-theme-version($theme) == 1 {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
} @else {
|
|
33
|
-
@include sass-utils.current-selector-or-root() {
|
|
34
|
-
@include token-utils.create-token-values-mixed(
|
|
35
|
-
m2-datepicker.get-color-tokens($theme, primary));
|
|
36
|
-
}
|
|
28
|
+
$tokens: map.get(m3-datepicker.get-tokens($theme, $color-variant), color);
|
|
29
|
+
}
|
|
37
30
|
|
|
31
|
+
@include token-utils.values($tokens);
|
|
32
|
+
|
|
33
|
+
@if inspection.get-theme-version($theme) != 1 {
|
|
38
34
|
.mat-datepicker-content, .mat-datepicker-toggle-active {
|
|
39
35
|
&.mat-accent {
|
|
40
|
-
|
|
41
|
-
|
|
36
|
+
$tokens: m2-datepicker.private-get-color-palette-color-tokens($theme, secondary);
|
|
37
|
+
@include token-utils.values($tokens);
|
|
42
38
|
}
|
|
43
39
|
|
|
44
40
|
&.mat-warn {
|
|
45
|
-
|
|
46
|
-
|
|
41
|
+
$tokens: m2-datepicker.private-get-color-palette-color-tokens($theme, error);
|
|
42
|
+
@include token-utils.values($tokens);
|
|
47
43
|
}
|
|
48
44
|
}
|
|
49
45
|
}
|
|
@@ -52,13 +48,12 @@
|
|
|
52
48
|
/// Outputs typography theme styles for the mat-datepicker.
|
|
53
49
|
/// @param {Map} $theme The theme to generate typography styles for.
|
|
54
50
|
@mixin typography($theme) {
|
|
51
|
+
$tokens: map.get(m2-datepicker.get-tokens($theme), typography);
|
|
55
52
|
@if inspection.get-theme-version($theme) == 1 {
|
|
56
|
-
|
|
57
|
-
} @else {
|
|
58
|
-
@include sass-utils.current-selector-or-root() {
|
|
59
|
-
@include token-utils.create-token-values-mixed(m2-datepicker.get-typography-tokens($theme));
|
|
60
|
-
}
|
|
53
|
+
$tokens: map.get(m3-datepicker.get-tokens($theme), typography);
|
|
61
54
|
}
|
|
55
|
+
|
|
56
|
+
@include token-utils.values($tokens);
|
|
62
57
|
}
|
|
63
58
|
|
|
64
59
|
@mixin date-range-colors(
|
|
@@ -78,9 +73,14 @@
|
|
|
78
73
|
/// Outputs density theme styles for the mat-datepicker.
|
|
79
74
|
/// @param {Map} $theme The theme to generate density styles for.
|
|
80
75
|
@mixin density($theme) {
|
|
76
|
+
$tokens: map.get(m2-datepicker.get-tokens($theme), density);
|
|
81
77
|
@if inspection.get-theme-version($theme) == 1 {
|
|
82
|
-
|
|
83
|
-
}
|
|
78
|
+
$tokens: map.get(m3-datepicker.get-tokens($theme), density);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
@include token-utils.values($tokens);
|
|
82
|
+
|
|
83
|
+
@if inspection.get-theme-version($theme) != 1 {
|
|
84
84
|
// TODO(crisbeto): move this into the structural styles
|
|
85
85
|
// once the icon button density is switched to tokens.
|
|
86
86
|
|
|
@@ -112,23 +112,21 @@
|
|
|
112
112
|
/// @param {Map} $theme The theme to generate styles for.
|
|
113
113
|
/// @param {String} $color-variant The color variant to use for the component (M3 only)
|
|
114
114
|
@mixin theme($theme, $color-variant: null) {
|
|
115
|
-
@
|
|
116
|
-
@
|
|
117
|
-
|
|
118
|
-
|
|
115
|
+
@if inspection.get-theme-version($theme) == 1 {
|
|
116
|
+
@include base($theme);
|
|
117
|
+
@include color($theme, $color-variant);
|
|
118
|
+
@include density($theme);
|
|
119
|
+
@include typography($theme);
|
|
120
|
+
} @else {
|
|
121
|
+
@include base($theme);
|
|
122
|
+
@if inspection.theme-has($theme, color) {
|
|
123
|
+
@include color($theme);
|
|
124
|
+
}
|
|
125
|
+
@if inspection.theme-has($theme, density) {
|
|
119
126
|
@include density($theme);
|
|
127
|
+
}
|
|
128
|
+
@if inspection.theme-has($theme, typography) {
|
|
120
129
|
@include typography($theme);
|
|
121
|
-
} @else {
|
|
122
|
-
@include base($theme);
|
|
123
|
-
@if inspection.theme-has($theme, color) {
|
|
124
|
-
@include color($theme);
|
|
125
|
-
}
|
|
126
|
-
@if inspection.theme-has($theme, density) {
|
|
127
|
-
@include density($theme);
|
|
128
|
-
}
|
|
129
|
-
@if inspection.theme-has($theme, typography) {
|
|
130
|
-
@include typography($theme);
|
|
131
|
-
}
|
|
132
130
|
}
|
|
133
131
|
}
|
|
134
132
|
}
|
|
@@ -1,23 +1,40 @@
|
|
|
1
1
|
@use 'sass:color';
|
|
2
|
-
@use '../core/theming/inspection';
|
|
3
2
|
@use '../core/style/elevation';
|
|
4
3
|
@use '../core/tokens/m3-utils';
|
|
5
4
|
@use '../core/tokens/m2-utils';
|
|
6
5
|
@use 'sass:map';
|
|
7
6
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
@function get-tokens($theme) {
|
|
8
|
+
$system: m2-utils.get-system($theme);
|
|
9
|
+
|
|
11
10
|
@return (
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
base: (
|
|
12
|
+
datepicker-calendar-container-shape: 4px,
|
|
13
|
+
datepicker-calendar-container-touch-shape: 4px,
|
|
14
|
+
datepicker-calendar-container-elevation-shadow: elevation.get-box-shadow(4),
|
|
15
|
+
datepicker-calendar-container-touch-elevation-shadow: elevation.get-box-shadow(24),
|
|
16
|
+
),
|
|
17
|
+
color: private-get-color-palette-color-tokens($theme, primary),
|
|
18
|
+
typography: (
|
|
19
|
+
// TODO(crisbeto): the typography tokens for other components set every typography dimension
|
|
20
|
+
// of an element (e.g. size, weight, line height, letter spacing). These tokens only set the
|
|
21
|
+
// values that were set in the previous theming API to reduce the amount of subtle screenshot
|
|
22
|
+
// differences. We should look into introducing the other tokens in a follow-up.
|
|
23
|
+
datepicker-calendar-text-font: map.get($system, body-large-font),
|
|
24
|
+
datepicker-calendar-text-size: 13px,
|
|
25
|
+
datepicker-calendar-body-label-text-size: map.get($system, label-small-size),
|
|
26
|
+
datepicker-calendar-body-label-text-weight: map.get($system, label-small-weight),
|
|
27
|
+
datepicker-calendar-period-button-text-size: map.get($system, label-small-size),
|
|
28
|
+
datepicker-calendar-period-button-text-weight: map.get($system, label-small-weight),
|
|
29
|
+
datepicker-calendar-header-text-size: 11px,
|
|
30
|
+
datepicker-calendar-header-text-weight: map.get($system, body-large-weight),
|
|
31
|
+
),
|
|
32
|
+
density: (),
|
|
16
33
|
);
|
|
17
34
|
}
|
|
18
35
|
|
|
19
36
|
// Tokens that can be configured through Angular Material's color theming API.
|
|
20
|
-
@function get-color-tokens($theme, $color-variant) {
|
|
37
|
+
@function private-get-color-palette-color-tokens($theme, $color-variant) {
|
|
21
38
|
$system: m2-utils.get-system($theme);
|
|
22
39
|
$system: m3-utils.replace-colors-with-variant($system, primary, $color-variant);
|
|
23
40
|
$disabled: m3-utils.color-with-opacity(map.get($system, on-surface), 38%);
|
|
@@ -62,34 +79,3 @@
|
|
|
62
79
|
datepicker-calendar-container-text-color: map.get($system, on-surface),
|
|
63
80
|
);
|
|
64
81
|
}
|
|
65
|
-
|
|
66
|
-
// Tokens that can be configured through Angular Material's typography theming API.
|
|
67
|
-
@function get-typography-tokens($theme) {
|
|
68
|
-
@return (
|
|
69
|
-
// TODO(crisbeto): the typography tokens for other components set every typography dimension of
|
|
70
|
-
// an element (e.g. size, weight, line height, letter spacing). These tokens only set the values
|
|
71
|
-
// that were set in the previous theming API to reduce the amount of subtle screenshot
|
|
72
|
-
// differences. We should look into introducing the other tokens in a follow-up.
|
|
73
|
-
datepicker-calendar-text-font: inspection.get-theme-typography($theme, body-1, font-family),
|
|
74
|
-
datepicker-calendar-text-size: 13px,
|
|
75
|
-
|
|
76
|
-
datepicker-calendar-body-label-text-size:
|
|
77
|
-
inspection.get-theme-typography($theme, button, font-size),
|
|
78
|
-
datepicker-calendar-body-label-text-weight:
|
|
79
|
-
inspection.get-theme-typography($theme, button, font-weight),
|
|
80
|
-
|
|
81
|
-
datepicker-calendar-period-button-text-size:
|
|
82
|
-
inspection.get-theme-typography($theme, button, font-size),
|
|
83
|
-
datepicker-calendar-period-button-text-weight:
|
|
84
|
-
inspection.get-theme-typography($theme, button, font-weight),
|
|
85
|
-
|
|
86
|
-
datepicker-calendar-header-text-size: 11px,
|
|
87
|
-
datepicker-calendar-header-text-weight:
|
|
88
|
-
inspection.get-theme-typography($theme, body-1, font-weight),
|
|
89
|
-
);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
// Tokens that can be configured through Angular Material's density theming API.
|
|
93
|
-
@function get-density-tokens($theme) {
|
|
94
|
-
@return ();
|
|
95
|
-
}
|