@angular/material 20.1.0-next.2 → 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/autocomplete/_autocomplete-theme.scss +4 -4
- package/autocomplete/_m2-autocomplete.scss +10 -22
- package/badge/_badge-theme.scss +4 -4
- package/badge/_m2-badge.scss +49 -63
- package/bottom-sheet/_bottom-sheet-theme.scss +4 -4
- package/bottom-sheet/_m2-bottom-sheet.scss +16 -30
- package/button/_button-theme.scss +4 -4
- package/button/_fab-theme.scss +4 -4
- package/button/_icon-button-theme.scss +10 -8
- package/button/_m2-button.scss +135 -154
- 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-toggle/_button-toggle-theme.scss +4 -4
- package/button-toggle/_m2-button-toggle.scss +58 -75
- package/button-toggle/_m3-button-toggle.scss +1 -2
- package/card/_card-theme.scss +4 -4
- package/card/_m2-card.scss +30 -43
- package/checkbox/_checkbox-theme.scss +10 -8
- package/checkbox/_m2-checkbox.scss +30 -41
- package/checkbox/_m3-checkbox.scss +1 -2
- package/chips/_chips-theme.scss +10 -7
- package/chips/_m2-chip.scss +40 -54
- package/chips/_m3-chip.scss +1 -2
- package/core/_core-theme.scss +4 -4
- package/core/_m2-app.scss +11 -23
- package/core/m2/_theming.scss +8 -4
- package/core/option/_m2-optgroup.scss +13 -25
- package/core/option/_m2-option.scss +16 -23
- package/core/option/_optgroup-theme.scss +4 -4
- package/core/option/_option-theme.scss +6 -6
- package/core/ripple/_m2-ripple.scss +8 -20
- package/core/ripple/_ripple-theme.scss +4 -4
- package/core/selection/pseudo-checkbox/_m2-pseudo-checkbox.scss +14 -21
- package/core/selection/pseudo-checkbox/_pseudo-checkbox-theme.scss +8 -8
- package/core/theming/_definition.scss +3 -1
- package/core/tokens/_m2-utils.scss +14 -6
- package/core/tokens/m3/_theme.scss +1 -1
- package/datepicker/_datepicker-theme.scss +6 -6
- package/datepicker/_m2-datepicker.scss +26 -33
- package/dialog/_dialog-theme.scss +4 -4
- package/dialog/_m2-dialog.scss +34 -46
- package/divider/_divider-theme.scss +4 -4
- package/divider/_m2-divider.scss +10 -21
- package/expansion/_expansion-theme.scss +4 -4
- package/expansion/_m2-expansion.scss +51 -67
- package/expansion/_m3-expansion.scss +1 -2
- package/fesm2022/animation-DfMFjxHu.mjs.map +1 -1
- package/fesm2022/autocomplete/testing.mjs.map +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.map +1 -1
- package/fesm2022/button-toggle/testing.mjs.map +1 -1
- package/fesm2022/button-toggle.mjs.map +1 -1
- 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.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.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.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-CFbrnFED.mjs.map +1 -1
- 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.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.map +1 -1
- package/fesm2022/menu.mjs.map +1 -1
- package/fesm2022/module-B0CLRw5e.mjs.map +1 -1
- package/fesm2022/module-B62K-792.mjs.map +1 -1
- 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.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.map +1 -1
- package/fesm2022/sidenav/testing.mjs.map +1 -1
- package/fesm2022/sidenav.mjs +2 -4
- package/fesm2022/sidenav.mjs.map +1 -1
- package/fesm2022/slide-toggle/testing.mjs.map +1 -1
- package/fesm2022/slide-toggle.mjs.map +1 -1
- package/fesm2022/slider/testing.mjs.map +1 -1
- package/fesm2022/slider.mjs.map +1 -1
- package/fesm2022/snack-bar/testing.mjs.map +1 -1
- 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.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 +4 -4
- package/form-field/_m2-form-field.scss +125 -138
- package/form-field/_m3-form-field.scss +1 -2
- package/grid-list/_grid-list-theme.scss +4 -4
- package/grid-list/_m2-grid-list.scss +14 -25
- package/icon/_icon-theme.scss +4 -4
- package/icon/_m2-icon.scss +7 -21
- package/list/_list-theme.scss +14 -12
- package/list/_m2-list.scss +84 -98
- package/list/_m3-list.scss +1 -2
- package/menu/_m2-menu.scss +33 -46
- package/menu/_menu-theme.scss +4 -4
- package/package.json +2 -2
- package/paginator/_m2-paginator.scss +38 -57
- package/paginator/_m3-paginator.scss +1 -2
- package/paginator/_paginator-theme.scss +4 -4
- 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 +6 -6
- package/progress-spinner/_m2-progress-spinner.scss +9 -20
- package/progress-spinner/_progress-spinner-theme.scss +6 -6
- package/radio/_m2-radio.scss +30 -41
- package/radio/_m3-radio.scss +1 -2
- package/radio/_radio-theme.scss +6 -6
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-generate/theme-color/schema.json +1 -1
- package/select/_m2-select.scss +23 -31
- package/select/_m3-select.scss +1 -2
- package/select/_select-theme.scss +6 -6
- package/sidenav/_m2-sidenav.scss +26 -36
- package/sidenav/_sidenav-theme.scss +4 -4
- package/slide-toggle/_m2-slide-toggle.scss +94 -113
- package/slide-toggle/_slide-toggle-theme.scss +6 -6
- package/slider/_m2-slider.scss +34 -52
- package/slider/_slider-theme.scss +4 -4
- package/snack-bar/_m2-snack-bar.scss +16 -36
- package/snack-bar/_snack-bar-theme.scss +4 -4
- package/sort/_m2-sort.scss +7 -18
- package/sort/_sort-theme.scss +4 -4
- package/stepper/_m2-stepper.scss +39 -54
- package/stepper/_m3-stepper.scss +1 -2
- package/stepper/_stepper-theme.scss +4 -4
- package/table/_m2-table.scss +54 -65
- package/table/_m3-table.scss +1 -2
- package/table/_table-theme.scss +4 -4
- package/tabs/_m2-tabs.scss +31 -47
- package/tabs/_m3-tabs.scss +1 -2
- package/tabs/_tabs-theme.scss +9 -9
- package/timepicker/_m2-timepicker.scss +10 -22
- package/timepicker/_timepicker-theme.scss +4 -4
- package/toolbar/_m2-toolbar.scss +26 -45
- package/toolbar/_m3-toolbar.scss +1 -2
- package/toolbar/_toolbar-theme.scss +4 -4
- package/tooltip/_m2-tooltip.scss +16 -33
- package/tooltip/_tooltip-theme.scss +4 -4
- package/tree/_m2-tree.scss +21 -39
- package/tree/_m3-tree.scss +1 -2
- package/tree/_tree-theme.scss +4 -4
package/core/_core-theme.scss
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
@use 'sass:map';
|
|
15
15
|
|
|
16
16
|
@mixin base($theme) {
|
|
17
|
-
$tokens: m2-app.get-
|
|
17
|
+
$tokens: map.get(m2-app.get-tokens($theme), base);
|
|
18
18
|
@if inspection.get-theme-version($theme) == 1 {
|
|
19
19
|
$tokens: map.get(m3-app.get-tokens($theme), base);
|
|
20
20
|
}
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
@mixin color($theme) {
|
|
31
|
-
$tokens: m2-app.get-
|
|
31
|
+
$tokens: map.get(m2-app.get-tokens($theme), color);
|
|
32
32
|
@if inspection.get-theme-version($theme) == 1 {
|
|
33
33
|
$tokens: map.get(m3-app.get-tokens($theme), color);
|
|
34
34
|
}
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
@mixin typography($theme) {
|
|
45
|
-
$tokens: m2-app.get-
|
|
45
|
+
$tokens: map.get(m2-app.get-tokens($theme), typography);
|
|
46
46
|
@if inspection.get-theme-version($theme) == 1 {
|
|
47
47
|
$tokens: map.get(m3-app.get-tokens($theme), typography);
|
|
48
48
|
}
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
@mixin density($theme) {
|
|
59
|
-
$tokens: m2-app.get-
|
|
59
|
+
$tokens: map.get(m2-app.get-tokens($theme), density);
|
|
60
60
|
@if inspection.get-theme-version($theme) == 1 {
|
|
61
61
|
$tokens: map.get(m3-app.get-tokens($theme), density);
|
|
62
62
|
}
|
package/core/_m2-app.scss
CHANGED
|
@@ -2,35 +2,23 @@
|
|
|
2
2
|
@use './style/elevation';
|
|
3
3
|
@use '../core/tokens/m2-utils';
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
// but may be in a future version of the theming API.
|
|
7
|
-
@function get-unthemable-tokens() {
|
|
8
|
-
@return ();
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
// Tokens that can be configured through Angular Material's color theming API.
|
|
12
|
-
@function get-color-tokens($theme) {
|
|
5
|
+
@function get-tokens($theme) {
|
|
13
6
|
$system: m2-utils.get-system($theme);
|
|
14
7
|
|
|
15
|
-
$tokens: (
|
|
8
|
+
$color-tokens: (
|
|
16
9
|
app-background-color: map.get($system, background),
|
|
17
|
-
app-text-color: map.get($system, on-surface)
|
|
10
|
+
app-text-color: map.get($system, on-surface)
|
|
18
11
|
);
|
|
19
|
-
|
|
20
12
|
@for $zValue from 0 through 24 {
|
|
21
|
-
$
|
|
22
|
-
|
|
13
|
+
$color-tokens: map.set($color-tokens, 'app-elevation-shadow-level-#{$zValue}',
|
|
14
|
+
elevation.get-box-shadow($zValue, map.get($system, shadow)));
|
|
23
15
|
}
|
|
24
16
|
|
|
25
|
-
@return
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
17
|
+
@return (
|
|
18
|
+
base: (),
|
|
19
|
+
color: $color-tokens,
|
|
20
|
+
typography: (),
|
|
21
|
+
density: (),
|
|
22
|
+
);
|
|
31
23
|
}
|
|
32
24
|
|
|
33
|
-
// Tokens that can be configured through Angular Material's density theming API.
|
|
34
|
-
@function get-density-tokens($theme) {
|
|
35
|
-
@return ();
|
|
36
|
-
}
|
package/core/m2/_theming.scss
CHANGED
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
@return $theme;
|
|
115
115
|
}
|
|
116
116
|
|
|
117
|
-
@function _define-system($primary, $accent, $warn, $is-dark, $typography) {
|
|
117
|
+
@function _define-system($primary, $accent, $warn, $is-dark, $typography, $density-scale) {
|
|
118
118
|
$palettes: (
|
|
119
119
|
primary: $primary,
|
|
120
120
|
accent: $accent,
|
|
@@ -128,7 +128,7 @@
|
|
|
128
128
|
$sys-state: m2.md-sys-state-values();
|
|
129
129
|
$sys-typography: m2.md-sys-typescale-values($typography);
|
|
130
130
|
|
|
131
|
-
$system: ();
|
|
131
|
+
$system: (density-scale: $density-scale);
|
|
132
132
|
@each $map in ($sys-color, $sys-state, $sys-typography) {
|
|
133
133
|
$system: map.merge($system, $map);
|
|
134
134
|
}
|
|
@@ -188,7 +188,9 @@
|
|
|
188
188
|
$accent: $accent,
|
|
189
189
|
$warn: $warn,
|
|
190
190
|
$is-dark: $is-dark,
|
|
191
|
-
$typography: ()
|
|
191
|
+
$typography: (),
|
|
192
|
+
$density-scale: 0
|
|
193
|
+
);
|
|
192
194
|
$theme: map.set($theme, _mat-system, $system);
|
|
193
195
|
@return $theme;
|
|
194
196
|
}
|
|
@@ -216,7 +218,9 @@
|
|
|
216
218
|
$accent: map.get($result, accent) or map.get($result, color, accent) or (),
|
|
217
219
|
$warn: map.get($result, warn) or map.get($result, color, warn) or (),
|
|
218
220
|
$is-dark: $is-dark,
|
|
219
|
-
$typography: map.get($result, typography) or ()
|
|
221
|
+
$typography: map.get($result, typography) or (),
|
|
222
|
+
$density-scale: map.get($result, density),
|
|
223
|
+
);
|
|
220
224
|
$theme: map.set($theme, _mat-system, $system);
|
|
221
225
|
@return $theme;
|
|
222
226
|
}
|
|
@@ -1,33 +1,21 @@
|
|
|
1
1
|
@use '../tokens/m2-utils';
|
|
2
2
|
@use 'sass:map';
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
// but may be in a future version of the theming API.
|
|
6
|
-
@function get-unthemable-tokens() {
|
|
7
|
-
@return ();
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
// Tokens that can be configured through Angular Material's color theming API.
|
|
11
|
-
@function get-color-tokens($theme) {
|
|
4
|
+
@function get-tokens($theme) {
|
|
12
5
|
$system: m2-utils.get-system($theme);
|
|
13
|
-
@return (
|
|
14
|
-
optgroup-label-text-color: map.get($system, on-surface),
|
|
15
|
-
);
|
|
16
|
-
}
|
|
17
6
|
|
|
18
|
-
// Tokens that can be configured through Angular Material's typography theming API.
|
|
19
|
-
@function get-typography-tokens($theme) {
|
|
20
|
-
$system: m2-utils.get-system($theme);
|
|
21
7
|
@return (
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
8
|
+
base: (),
|
|
9
|
+
color: (
|
|
10
|
+
optgroup-label-text-color: map.get($system, on-surface),
|
|
11
|
+
),
|
|
12
|
+
typography: (
|
|
13
|
+
optgroup-label-text-font: map.get($system, body-large-font),
|
|
14
|
+
optgroup-label-text-line-height: map.get($system, body-large-line-height),
|
|
15
|
+
optgroup-label-text-size: map.get($system, body-large-size),
|
|
16
|
+
optgroup-label-text-tracking: map.get($system, body-large-tracking),
|
|
17
|
+
optgroup-label-text-weight: map.get($system, body-large-weight)
|
|
18
|
+
),
|
|
19
|
+
density: (),
|
|
27
20
|
);
|
|
28
21
|
}
|
|
29
|
-
|
|
30
|
-
// Tokens that can be configured through Angular Material's density theming API.
|
|
31
|
-
@function get-density-tokens($theme) {
|
|
32
|
-
@return ();
|
|
33
|
-
}
|
|
@@ -1,17 +1,26 @@
|
|
|
1
|
-
@use '../theming/inspection';
|
|
2
1
|
@use 'sass:map';
|
|
3
2
|
@use '../tokens/m2-utils';
|
|
4
3
|
@use '../tokens/m3-utils';
|
|
5
4
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
@return (
|
|
5
|
+
@function get-tokens($theme) {
|
|
6
|
+
$system: m2-utils.get-system($theme);
|
|
7
|
+
|
|
8
|
+
@return (
|
|
9
|
+
base: (),
|
|
10
|
+
color: private-get-color-palette-color-tokens($theme, primary),
|
|
11
|
+
typography: (
|
|
12
|
+
option-label-text-font: map.get($system, body-large-font),
|
|
13
|
+
option-label-text-line-height: map.get($system, body-large-line-height),
|
|
14
|
+
option-label-text-size: map.get($system, body-large-size),
|
|
15
|
+
option-label-text-tracking: map.get($system, body-large-tracking),
|
|
16
|
+
option-label-text-weight: map.get($system, body-large-weight)
|
|
17
|
+
),
|
|
18
|
+
density: (),
|
|
19
|
+
);
|
|
10
20
|
}
|
|
11
21
|
|
|
12
22
|
// Tokens that can be configured through Angular Material's color theming API.
|
|
13
|
-
@function get-color-tokens($theme, $color-variant) {
|
|
14
|
-
$is-dark: inspection.get-theme-type($theme) == dark;
|
|
23
|
+
@function private-get-color-palette-color-tokens($theme, $color-variant) {
|
|
15
24
|
$system: m2-utils.get-system($theme);
|
|
16
25
|
$system: m3-utils.replace-colors-with-variant($system, primary, $color-variant);
|
|
17
26
|
|
|
@@ -27,19 +36,3 @@
|
|
|
27
36
|
);
|
|
28
37
|
}
|
|
29
38
|
|
|
30
|
-
// Tokens that can be configured through Angular Material's typography theming API.
|
|
31
|
-
@function get-typography-tokens($theme) {
|
|
32
|
-
$system: m2-utils.get-system($theme);
|
|
33
|
-
@return (
|
|
34
|
-
option-label-text-font: map.get($system, body-large-font),
|
|
35
|
-
option-label-text-line-height: map.get($system, body-large-line-height),
|
|
36
|
-
option-label-text-size: map.get($system, body-large-size),
|
|
37
|
-
option-label-text-tracking: map.get($system, body-large-tracking),
|
|
38
|
-
option-label-text-weight: map.get($system, body-large-weight)
|
|
39
|
-
);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
// Tokens that can be configured through Angular Material's density theming API.
|
|
43
|
-
@function get-density-tokens($theme) {
|
|
44
|
-
@return ();
|
|
45
|
-
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
@use '../typography/typography';
|
|
7
7
|
|
|
8
8
|
@mixin base($theme) {
|
|
9
|
-
$tokens: m2-optgroup.get-
|
|
9
|
+
$tokens: map.get(m2-optgroup.get-tokens($theme), base);
|
|
10
10
|
@if inspection.get-theme-version($theme) == 1 {
|
|
11
11
|
$tokens: map.get(m3-optgroup.get-tokens($theme), base);
|
|
12
12
|
}
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
@mixin color($theme) {
|
|
18
|
-
$tokens: m2-optgroup.get-
|
|
18
|
+
$tokens: map.get(m2-optgroup.get-tokens($theme), color);
|
|
19
19
|
@if inspection.get-theme-version($theme) == 1 {
|
|
20
20
|
$tokens: map.get(m3-optgroup.get-tokens($theme), color);
|
|
21
21
|
}
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
@mixin typography($theme) {
|
|
27
|
-
$tokens: m2-optgroup.get-
|
|
27
|
+
$tokens: map.get(m2-optgroup.get-tokens($theme), typography);
|
|
28
28
|
@if inspection.get-theme-version($theme) == 1 {
|
|
29
29
|
$tokens: map.get(m3-optgroup.get-tokens($theme), typography);
|
|
30
30
|
}
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
@mixin density($theme) {
|
|
36
|
-
$tokens: m2-optgroup.get-
|
|
36
|
+
$tokens: map.get(m2-optgroup.get-tokens($theme), density);
|
|
37
37
|
@if inspection.get-theme-version($theme) == 1 {
|
|
38
38
|
$tokens: map.get(m3-optgroup.get-tokens($theme), density);
|
|
39
39
|
}
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
/// for the mat-option.
|
|
10
10
|
/// @param {Map} $theme The theme to generate base styles for.
|
|
11
11
|
@mixin base($theme) {
|
|
12
|
-
$tokens: m2-option.get-
|
|
12
|
+
$tokens: map.get(m2-option.get-tokens($theme), base);
|
|
13
13
|
@if inspection.get-theme-version($theme) == 1 {
|
|
14
14
|
$tokens: map.get(m3-option.get-tokens($theme), base);
|
|
15
15
|
}
|
|
@@ -21,7 +21,7 @@
|
|
|
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-
|
|
24
|
+
$tokens: map.get(m2-option.get-tokens($theme), color);
|
|
25
25
|
@if inspection.get-theme-version($theme) == 1 {
|
|
26
26
|
$tokens: map.get(m3-option.get-tokens($theme, $color-variant), color);
|
|
27
27
|
}
|
|
@@ -30,12 +30,12 @@
|
|
|
30
30
|
|
|
31
31
|
@if inspection.get-theme-version($theme) != 1 {
|
|
32
32
|
.mat-accent {
|
|
33
|
-
$tokens: m2-option.get-color-tokens($theme, secondary);
|
|
33
|
+
$tokens: m2-option.private-get-color-palette-color-tokens($theme, secondary);
|
|
34
34
|
@include token-utils.values($tokens);
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
.mat-warn {
|
|
38
|
-
$tokens: m2-option.get-color-tokens($theme, error);
|
|
38
|
+
$tokens: m2-option.private-get-color-palette-color-tokens($theme, error);
|
|
39
39
|
@include token-utils.values($tokens);
|
|
40
40
|
}
|
|
41
41
|
}
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
/// Outputs typography theme styles for the mat-option.
|
|
45
45
|
/// @param {Map} $theme The theme to generate typography styles for.
|
|
46
46
|
@mixin typography($theme) {
|
|
47
|
-
$tokens: m2-option.get-
|
|
47
|
+
$tokens: map.get(m2-option.get-tokens($theme), typography);
|
|
48
48
|
@if inspection.get-theme-version($theme) == 1 {
|
|
49
49
|
$tokens: map.get(m3-option.get-tokens($theme), typography);
|
|
50
50
|
}
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
/// Outputs density theme styles for the mat-option.
|
|
56
56
|
/// @param {Map} $theme The theme to generate density styles for.
|
|
57
57
|
@mixin density($theme) {
|
|
58
|
-
$tokens: m2-option.get-
|
|
58
|
+
$tokens: map.get(m2-option.get-tokens($theme), density);
|
|
59
59
|
@if inspection.get-theme-version($theme) == 1 {
|
|
60
60
|
$tokens: map.get(m3-option.get-tokens($theme), density);
|
|
61
61
|
}
|
|
@@ -2,28 +2,16 @@
|
|
|
2
2
|
@use '../tokens/m2-utils';
|
|
3
3
|
@use '../tokens/m3-utils';
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
// but may be in a future version of the theming API.
|
|
7
|
-
@function get-unthemable-tokens() {
|
|
8
|
-
@return ();
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
// Tokens that can be configured through Angular Material's color theming API.
|
|
12
|
-
@function get-color-tokens($theme) {
|
|
5
|
+
@function get-tokens($theme) {
|
|
13
6
|
$system: m2-utils.get-system($theme);
|
|
14
7
|
|
|
15
8
|
@return (
|
|
16
|
-
|
|
17
|
-
|
|
9
|
+
base: (),
|
|
10
|
+
color: (
|
|
11
|
+
ripple-color: m3-utils.color-with-opacity(
|
|
12
|
+
map.get($system, on-surface), map.get($system, pressed-state-layer-opacity)),
|
|
13
|
+
),
|
|
14
|
+
typography: (),
|
|
15
|
+
density: (),
|
|
18
16
|
);
|
|
19
17
|
}
|
|
20
|
-
|
|
21
|
-
// Tokens that can be configured through Angular Material's typography theming API.
|
|
22
|
-
@function get-typography-tokens($theme) {
|
|
23
|
-
@return ();
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
// Tokens that can be configured through Angular Material's density theming API.
|
|
27
|
-
@function get-density-tokens($theme) {
|
|
28
|
-
@return ();
|
|
29
|
-
}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
@use '../theming/inspection';
|
|
6
6
|
|
|
7
7
|
@mixin base($theme) {
|
|
8
|
-
$tokens: m2-ripple.get-
|
|
8
|
+
$tokens: map.get(m2-ripple.get-tokens($theme), base);
|
|
9
9
|
@if inspection.get-theme-version($theme) == 1 {
|
|
10
10
|
$tokens: map.get(m3-ripple.get-tokens($theme), base);
|
|
11
11
|
}
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
@mixin color($theme) {
|
|
17
|
-
$tokens: m2-ripple.get-
|
|
17
|
+
$tokens: map.get(m2-ripple.get-tokens($theme), color);
|
|
18
18
|
@if inspection.get-theme-version($theme) == 1 {
|
|
19
19
|
$tokens: map.get(m3-ripple.get-tokens($theme), color);
|
|
20
20
|
}
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
@mixin typography($theme) {
|
|
26
|
-
$tokens: m2-ripple.get-
|
|
26
|
+
$tokens: map.get(m2-ripple.get-tokens($theme), typography);
|
|
27
27
|
@if inspection.get-theme-version($theme) == 1 {
|
|
28
28
|
$tokens: map.get(m3-ripple.get-tokens($theme), typography);
|
|
29
29
|
}
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
@mixin density($theme) {
|
|
35
|
-
$tokens: m2-ripple.get-
|
|
35
|
+
$tokens: map.get(m2-ripple.get-tokens($theme), density);
|
|
36
36
|
@if inspection.get-theme-version($theme) == 1 {
|
|
37
37
|
$tokens: map.get(m3-ripple.get-tokens($theme), density);
|
|
38
38
|
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
@use '../../theming/inspection';
|
|
2
1
|
@use 'sass:map';
|
|
3
2
|
@use '../../tokens/m2-utils';
|
|
4
3
|
@use '../../tokens/m3-utils';
|
|
5
4
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
@function get-tokens($theme) {
|
|
6
|
+
@return (
|
|
7
|
+
base: (),
|
|
8
|
+
color: private-get-color-palette-color-tokens($theme, secondary),
|
|
9
|
+
typography: (),
|
|
10
|
+
density: (),
|
|
11
|
+
);
|
|
10
12
|
}
|
|
11
13
|
|
|
12
14
|
// Tokens that can be configured through Angular Material's color theming API.
|
|
13
|
-
@function get-color-tokens($theme, $color-variant) {
|
|
14
|
-
$is-dark: inspection.get-theme-type($theme) == dark;
|
|
15
|
-
$disabled-color: if($is-dark, #686868, #b0b0b0);
|
|
15
|
+
@function private-get-color-palette-color-tokens($theme, $color-variant) {
|
|
16
16
|
$system: m2-utils.get-system($theme);
|
|
17
17
|
$system: m3-utils.replace-colors-with-variant($system, secondary, $color-variant);
|
|
18
18
|
|
|
@@ -21,19 +21,12 @@
|
|
|
21
21
|
pseudo-checkbox-full-selected-checkmark-color: map.get($system, background),
|
|
22
22
|
pseudo-checkbox-full-unselected-icon-color: map.get($system, on-surface-variant),
|
|
23
23
|
pseudo-checkbox-full-disabled-selected-checkmark-color: map.get($system, background),
|
|
24
|
-
pseudo-checkbox-full-disabled-unselected-icon-color:
|
|
25
|
-
|
|
24
|
+
pseudo-checkbox-full-disabled-unselected-icon-color:
|
|
25
|
+
m3-utils.color-with-opacity(map.get($system, on-surface), 38%),
|
|
26
|
+
pseudo-checkbox-full-disabled-selected-icon-color:
|
|
27
|
+
m3-utils.color-with-opacity(map.get($system, on-surface), 38%),
|
|
26
28
|
pseudo-checkbox-minimal-selected-checkmark-color: map.get($system, secondary),
|
|
27
|
-
pseudo-checkbox-minimal-disabled-selected-checkmark-color:
|
|
29
|
+
pseudo-checkbox-minimal-disabled-selected-checkmark-color:
|
|
30
|
+
m3-utils.color-with-opacity(map.get($system, on-surface), 38%),
|
|
28
31
|
);
|
|
29
32
|
}
|
|
30
|
-
|
|
31
|
-
// Tokens that can be configured through Angular Material's typography theming API.
|
|
32
|
-
@function get-typography-tokens($theme) {
|
|
33
|
-
@return ();
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
// Tokens that can be configured through Angular Material's density theming API.
|
|
37
|
-
@function get-density-tokens($theme) {
|
|
38
|
-
@return ();
|
|
39
|
-
}
|
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
@use 'sass:map';
|
|
6
6
|
|
|
7
7
|
@mixin _palette-styles($theme, $palette-name) {
|
|
8
|
-
$tokens: m2-pseudo-checkbox.get-
|
|
8
|
+
$tokens: map.get(m2-pseudo-checkbox.get-tokens($theme), color);
|
|
9
9
|
@include token-utils.values($tokens);
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
@mixin base($theme) {
|
|
13
|
-
$tokens: m2-pseudo-checkbox.get-
|
|
13
|
+
$tokens: map.get(m2-pseudo-checkbox.get-tokens($theme), base);
|
|
14
14
|
@if inspection.get-theme-version($theme) == 1 {
|
|
15
15
|
$tokens: map.get(m3-pseudo-checkbox.get-tokens($theme), base);
|
|
16
16
|
}
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
/// @param {Map} $theme The theme to generate color styles for.
|
|
29
29
|
/// @param {String} $color-variant The color variant to use for the component (M3 only)
|
|
30
30
|
@mixin color($theme, $color-variant: null) {
|
|
31
|
-
$tokens: m2-pseudo-checkbox.get-
|
|
31
|
+
$tokens: map.get(m2-pseudo-checkbox.get-tokens($theme), color);
|
|
32
32
|
@if inspection.get-theme-version($theme) == 1 {
|
|
33
33
|
$tokens: map.get(m3-pseudo-checkbox.get-tokens($theme, $color-variant), color);
|
|
34
34
|
}
|
|
@@ -42,24 +42,24 @@
|
|
|
42
42
|
// in order to allow for the color to be overwritten if the checkbox is inside a parent that
|
|
43
43
|
// has `mat-accent` and is placed inside another parent that has `mat-primary`.
|
|
44
44
|
.mat-primary {
|
|
45
|
-
$tokens: m2-pseudo-checkbox.get-color-tokens($theme, primary);
|
|
45
|
+
$tokens: m2-pseudo-checkbox.private-get-color-palette-color-tokens($theme, primary);
|
|
46
46
|
@include token-utils.values($tokens);
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
.mat-accent {
|
|
50
|
-
$tokens: m2-pseudo-checkbox.get-color-tokens($theme, secondary);
|
|
50
|
+
$tokens: m2-pseudo-checkbox.private-get-color-palette-color-tokens($theme, secondary);
|
|
51
51
|
@include token-utils.values($tokens);
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
.mat-warn {
|
|
55
|
-
$tokens: m2-pseudo-checkbox.get-color-tokens($theme, error);
|
|
55
|
+
$tokens: m2-pseudo-checkbox.private-get-color-palette-color-tokens($theme, error);
|
|
56
56
|
@include token-utils.values($tokens);
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
@mixin typography($theme) {
|
|
62
|
-
$tokens: m2-pseudo-checkbox.get-
|
|
62
|
+
$tokens: map.get(m2-pseudo-checkbox.get-tokens($theme), typography);
|
|
63
63
|
@if inspection.get-theme-version($theme) == 1 {
|
|
64
64
|
$tokens: map.get(m3-pseudo-checkbox.get-tokens($theme), typography);
|
|
65
65
|
}
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
@mixin density($theme) {
|
|
71
|
-
$tokens: m2-pseudo-checkbox.get-
|
|
71
|
+
$tokens: map.get(m2-pseudo-checkbox.get-tokens($theme), density);
|
|
72
72
|
@if inspection.get-theme-version($theme) == 1 {
|
|
73
73
|
$tokens: map.get(m3-pseudo-checkbox.get-tokens($theme), density);
|
|
74
74
|
}
|
|
@@ -90,7 +90,9 @@ $theme-version: 1;
|
|
|
90
90
|
),
|
|
91
91
|
m3-tokens.get-sys-typeface($typography, $typography-system-variables-prefix),
|
|
92
92
|
);
|
|
93
|
-
$system: (
|
|
93
|
+
$system: (
|
|
94
|
+
density-scale: $density-scale,
|
|
95
|
+
);
|
|
94
96
|
@each $sys-map in $system-maps {
|
|
95
97
|
$system: map.merge($system, $sys-map);
|
|
96
98
|
}
|
|
@@ -1,16 +1,24 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
|
+
@use 'sass:meta';
|
|
2
3
|
@use './m2';
|
|
3
4
|
|
|
4
5
|
// Gets the theme's system values as a flat map.
|
|
5
6
|
@function get-system($theme) {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
@
|
|
7
|
+
@if meta.type-of($theme) == map {
|
|
8
|
+
$system: map.get($theme, _mat-system);
|
|
9
|
+
@if $system {
|
|
10
|
+
@return $system;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
// If the $theme is a typography-config, convert it to a system map.
|
|
14
|
+
@if map.has-key($theme, body-1) {
|
|
15
|
+
@return m2.md-sys-typescale-values($theme);
|
|
16
|
+
}
|
|
9
17
|
}
|
|
10
18
|
|
|
11
|
-
// If the $theme is a
|
|
12
|
-
@if
|
|
13
|
-
@return
|
|
19
|
+
// If the $theme is a density scale, convert it to a system map.
|
|
20
|
+
@if meta.type-of($theme) == 'number' or $theme == minimum or $theme == maximum {
|
|
21
|
+
@return (density-scale: $theme);
|
|
14
22
|
}
|
|
15
23
|
|
|
16
24
|
@return ();
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
/// for the mat-datepicker.
|
|
12
12
|
/// @param {Map} $theme The theme to generate base styles for.
|
|
13
13
|
@mixin base($theme) {
|
|
14
|
-
$tokens: m2-datepicker.get-
|
|
14
|
+
$tokens: map.get(m2-datepicker.get-tokens($theme), base);
|
|
15
15
|
@if inspection.get-theme-version($theme) == 1 {
|
|
16
16
|
$tokens: map.get(m3-datepicker.get-tokens($theme), base);
|
|
17
17
|
}
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
/// @param {Map} $theme The theme to generate color styles for.
|
|
24
24
|
/// @param {String} $color-variant The color variant to use for the component (M3 only)
|
|
25
25
|
@mixin color($theme, $color-variant: null) {
|
|
26
|
-
$tokens: m2-datepicker.get-
|
|
26
|
+
$tokens: map.get(m2-datepicker.get-tokens($theme), color);
|
|
27
27
|
@if inspection.get-theme-version($theme) == 1 {
|
|
28
28
|
$tokens: map.get(m3-datepicker.get-tokens($theme, $color-variant), color);
|
|
29
29
|
}
|
|
@@ -33,12 +33,12 @@
|
|
|
33
33
|
@if inspection.get-theme-version($theme) != 1 {
|
|
34
34
|
.mat-datepicker-content, .mat-datepicker-toggle-active {
|
|
35
35
|
&.mat-accent {
|
|
36
|
-
$tokens: m2-datepicker.get-color-tokens($theme, secondary);
|
|
36
|
+
$tokens: m2-datepicker.private-get-color-palette-color-tokens($theme, secondary);
|
|
37
37
|
@include token-utils.values($tokens);
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
&.mat-warn {
|
|
41
|
-
$tokens: m2-datepicker.get-color-tokens($theme, error);
|
|
41
|
+
$tokens: m2-datepicker.private-get-color-palette-color-tokens($theme, error);
|
|
42
42
|
@include token-utils.values($tokens);
|
|
43
43
|
}
|
|
44
44
|
}
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
/// Outputs typography theme styles for the mat-datepicker.
|
|
49
49
|
/// @param {Map} $theme The theme to generate typography styles for.
|
|
50
50
|
@mixin typography($theme) {
|
|
51
|
-
$tokens: m2-datepicker.get-
|
|
51
|
+
$tokens: map.get(m2-datepicker.get-tokens($theme), typography);
|
|
52
52
|
@if inspection.get-theme-version($theme) == 1 {
|
|
53
53
|
$tokens: map.get(m3-datepicker.get-tokens($theme), typography);
|
|
54
54
|
}
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
/// Outputs density theme styles for the mat-datepicker.
|
|
74
74
|
/// @param {Map} $theme The theme to generate density styles for.
|
|
75
75
|
@mixin density($theme) {
|
|
76
|
-
$tokens: m2-datepicker.get-
|
|
76
|
+
$tokens: map.get(m2-datepicker.get-tokens($theme), density);
|
|
77
77
|
@if inspection.get-theme-version($theme) == 1 {
|
|
78
78
|
$tokens: map.get(m3-datepicker.get-tokens($theme), density);
|
|
79
79
|
}
|