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