@angular/material 17.0.0 → 17.0.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/autocomplete/_autocomplete-theme.scss +47 -14
- package/autocomplete/index.d.ts +0 -2
- package/badge/_badge-theme.scss +67 -35
- package/bottom-sheet/_bottom-sheet-theme.scss +51 -18
- package/button/_button-theme.scss +7 -0
- package/button-toggle/_button-toggle-theme.scss +66 -32
- package/chips/_chips-theme.scss +64 -32
- package/core/_core-theme.scss +1 -3
- package/core/option/_optgroup-theme.scss +47 -16
- package/core/option/_option-theme.scss +54 -23
- package/core/ripple/_ripple-theme.scss +51 -19
- package/core/selection/pseudo-checkbox/_pseudo-checkbox-theme.scss +18 -58
- package/core/tokens/m2/_index.scss +57 -8
- package/core/tokens/m2/mat/_full-pseudo-checkbox.scss +49 -0
- package/core/tokens/m2/mat/_minimal-pseudo-checkbox.scss +43 -0
- package/datepicker/_datepicker-theme.scss +70 -38
- package/dialog/_dialog-theme.scss +48 -17
- package/divider/_divider-theme.scss +49 -16
- package/esm2022/autocomplete/autocomplete-origin.mjs +3 -3
- package/esm2022/autocomplete/autocomplete-trigger.mjs +19 -10
- package/esm2022/autocomplete/autocomplete.mjs +3 -3
- package/esm2022/autocomplete/module.mjs +4 -4
- package/esm2022/badge/badge-module.mjs +4 -4
- package/esm2022/badge/badge.mjs +3 -3
- package/esm2022/bottom-sheet/bottom-sheet-container.mjs +3 -3
- package/esm2022/bottom-sheet/bottom-sheet-module.mjs +4 -4
- package/esm2022/bottom-sheet/bottom-sheet.mjs +3 -3
- package/esm2022/button/button-base.mjs +6 -6
- package/esm2022/button/button.mjs +6 -6
- package/esm2022/button/fab.mjs +12 -12
- package/esm2022/button/icon-button.mjs +6 -6
- package/esm2022/button/module.mjs +4 -4
- package/esm2022/button-toggle/button-toggle-module.mjs +4 -4
- package/esm2022/button-toggle/button-toggle.mjs +6 -6
- package/esm2022/card/card.mjs +42 -42
- package/esm2022/card/module.mjs +4 -4
- package/esm2022/checkbox/checkbox-required-validator.mjs +3 -3
- package/esm2022/checkbox/checkbox.mjs +3 -3
- package/esm2022/checkbox/module.mjs +8 -8
- package/esm2022/chips/chip-action.mjs +3 -3
- package/esm2022/chips/chip-edit-input.mjs +3 -3
- package/esm2022/chips/chip-grid.mjs +3 -3
- package/esm2022/chips/chip-icons.mjs +9 -9
- package/esm2022/chips/chip-input.mjs +3 -3
- package/esm2022/chips/chip-listbox.mjs +3 -3
- package/esm2022/chips/chip-option.mjs +3 -3
- package/esm2022/chips/chip-row.mjs +3 -3
- package/esm2022/chips/chip-set.mjs +3 -3
- package/esm2022/chips/chip.mjs +3 -3
- package/esm2022/chips/module.mjs +4 -4
- package/esm2022/core/common-behaviors/common-module.mjs +4 -4
- package/esm2022/core/datetime/index.mjs +8 -8
- package/esm2022/core/datetime/native-date-adapter.mjs +3 -3
- package/esm2022/core/error/error-options.mjs +6 -6
- package/esm2022/core/line/line.mjs +7 -7
- package/esm2022/core/option/index.mjs +4 -4
- package/esm2022/core/option/optgroup.mjs +3 -3
- package/esm2022/core/option/option.mjs +3 -3
- package/esm2022/core/private/ripple-loader.mjs +3 -3
- package/esm2022/core/ripple/index.mjs +4 -4
- package/esm2022/core/ripple/ripple.mjs +3 -3
- package/esm2022/core/selection/pseudo-checkbox/pseudo-checkbox-module.mjs +4 -4
- package/esm2022/core/selection/pseudo-checkbox/pseudo-checkbox.mjs +4 -4
- package/esm2022/core/version.mjs +1 -1
- package/esm2022/datepicker/calendar-body.mjs +5 -5
- package/esm2022/datepicker/calendar.mjs +6 -6
- package/esm2022/datepicker/date-range-input-parts.mjs +9 -9
- package/esm2022/datepicker/date-range-input.mjs +3 -3
- package/esm2022/datepicker/date-range-picker.mjs +3 -3
- package/esm2022/datepicker/date-range-selection-strategy.mjs +3 -3
- package/esm2022/datepicker/date-selection-model.mjs +9 -9
- package/esm2022/datepicker/datepicker-actions.mjs +9 -9
- package/esm2022/datepicker/datepicker-base.mjs +6 -6
- package/esm2022/datepicker/datepicker-input-base.mjs +3 -3
- package/esm2022/datepicker/datepicker-input.mjs +3 -3
- package/esm2022/datepicker/datepicker-intl.mjs +3 -3
- package/esm2022/datepicker/datepicker-module.mjs +4 -4
- package/esm2022/datepicker/datepicker-toggle.mjs +6 -6
- package/esm2022/datepicker/datepicker.mjs +3 -3
- package/esm2022/datepicker/month-view.mjs +3 -3
- package/esm2022/datepicker/multi-year-view.mjs +3 -3
- package/esm2022/datepicker/year-view.mjs +3 -3
- package/esm2022/dialog/dialog-container.mjs +3 -3
- package/esm2022/dialog/dialog-content-directives.mjs +12 -12
- package/esm2022/dialog/dialog.mjs +3 -3
- package/esm2022/dialog/module.mjs +4 -4
- package/esm2022/divider/divider-module.mjs +4 -4
- package/esm2022/divider/divider.mjs +3 -3
- package/esm2022/expansion/accordion.mjs +3 -3
- package/esm2022/expansion/expansion-module.mjs +4 -4
- package/esm2022/expansion/expansion-panel-content.mjs +3 -3
- package/esm2022/expansion/expansion-panel-header.mjs +9 -9
- package/esm2022/expansion/expansion-panel.mjs +6 -6
- package/esm2022/form-field/directives/error.mjs +3 -3
- package/esm2022/form-field/directives/floating-label.mjs +3 -3
- package/esm2022/form-field/directives/hint.mjs +3 -3
- package/esm2022/form-field/directives/label.mjs +3 -3
- package/esm2022/form-field/directives/line-ripple.mjs +3 -3
- package/esm2022/form-field/directives/notched-outline.mjs +3 -3
- package/esm2022/form-field/directives/prefix.mjs +3 -3
- package/esm2022/form-field/directives/suffix.mjs +3 -3
- package/esm2022/form-field/form-field-control.mjs +3 -3
- package/esm2022/form-field/form-field.mjs +3 -3
- package/esm2022/form-field/module.mjs +4 -4
- package/esm2022/grid-list/grid-list-module.mjs +4 -4
- package/esm2022/grid-list/grid-list.mjs +3 -3
- package/esm2022/grid-list/grid-tile.mjs +15 -15
- package/esm2022/icon/icon-module.mjs +4 -4
- package/esm2022/icon/icon-registry.mjs +3 -3
- package/esm2022/icon/icon.mjs +3 -3
- package/esm2022/icon/testing/fake-icon-registry.mjs +7 -7
- package/esm2022/input/input.mjs +3 -3
- package/esm2022/input/module.mjs +4 -4
- package/esm2022/list/action-list.mjs +3 -3
- package/esm2022/list/list-base.mjs +12 -12
- package/esm2022/list/list-item-sections.mjs +18 -18
- package/esm2022/list/list-module.mjs +4 -4
- package/esm2022/list/list-option.mjs +3 -3
- package/esm2022/list/list.mjs +6 -6
- package/esm2022/list/nav-list.mjs +3 -3
- package/esm2022/list/selection-list.mjs +3 -3
- package/esm2022/list/subheader.mjs +3 -3
- package/esm2022/menu/menu-content.mjs +3 -3
- package/esm2022/menu/menu-item.mjs +3 -3
- package/esm2022/menu/menu-trigger.mjs +3 -3
- package/esm2022/menu/menu.mjs +3 -3
- package/esm2022/menu/module.mjs +4 -4
- package/esm2022/paginator/module.mjs +4 -4
- package/esm2022/paginator/paginator-intl.mjs +3 -3
- package/esm2022/paginator/paginator.mjs +3 -3
- package/esm2022/progress-bar/module.mjs +4 -4
- package/esm2022/progress-bar/progress-bar.mjs +3 -3
- package/esm2022/progress-spinner/module.mjs +4 -4
- package/esm2022/progress-spinner/progress-spinner.mjs +3 -3
- package/esm2022/radio/module.mjs +4 -4
- package/esm2022/radio/radio.mjs +6 -6
- package/esm2022/select/module.mjs +4 -4
- package/esm2022/select/select.mjs +8 -8
- package/esm2022/sidenav/drawer.mjs +9 -9
- package/esm2022/sidenav/sidenav-module.mjs +4 -4
- package/esm2022/sidenav/sidenav.mjs +9 -9
- package/esm2022/slide-toggle/module.mjs +8 -8
- package/esm2022/slide-toggle/slide-toggle-required-validator.mjs +3 -3
- package/esm2022/slide-toggle/slide-toggle.mjs +3 -3
- package/esm2022/slider/module.mjs +4 -4
- package/esm2022/slider/slider-input.mjs +6 -6
- package/esm2022/slider/slider-thumb.mjs +3 -3
- package/esm2022/slider/slider.mjs +3 -3
- package/esm2022/snack-bar/module.mjs +4 -4
- package/esm2022/snack-bar/simple-snack-bar.mjs +3 -3
- package/esm2022/snack-bar/snack-bar-container.mjs +3 -3
- package/esm2022/snack-bar/snack-bar-content.mjs +9 -9
- package/esm2022/snack-bar/snack-bar.mjs +3 -3
- package/esm2022/sort/sort-header-intl.mjs +3 -3
- package/esm2022/sort/sort-header.mjs +3 -3
- package/esm2022/sort/sort-module.mjs +4 -4
- package/esm2022/sort/sort.mjs +3 -3
- package/esm2022/stepper/step-content.mjs +3 -3
- package/esm2022/stepper/step-header.mjs +3 -3
- package/esm2022/stepper/step-label.mjs +3 -3
- package/esm2022/stepper/stepper-button.mjs +6 -6
- package/esm2022/stepper/stepper-icon.mjs +3 -3
- package/esm2022/stepper/stepper-intl.mjs +3 -3
- package/esm2022/stepper/stepper-module.mjs +4 -4
- package/esm2022/stepper/stepper.mjs +6 -6
- package/esm2022/table/cell.mjs +21 -21
- package/esm2022/table/module.mjs +4 -4
- package/esm2022/table/row.mjs +21 -21
- package/esm2022/table/table.mjs +6 -6
- package/esm2022/table/text-column.mjs +3 -3
- package/esm2022/tabs/module.mjs +4 -4
- package/esm2022/tabs/paginated-tab-header.mjs +3 -3
- package/esm2022/tabs/tab-body.mjs +6 -6
- package/esm2022/tabs/tab-content.mjs +3 -3
- package/esm2022/tabs/tab-group.mjs +3 -3
- package/esm2022/tabs/tab-header.mjs +3 -3
- package/esm2022/tabs/tab-label-wrapper.mjs +3 -3
- package/esm2022/tabs/tab-label.mjs +3 -3
- package/esm2022/tabs/tab-nav-bar/tab-nav-bar.mjs +9 -9
- package/esm2022/tabs/tab.mjs +3 -3
- package/esm2022/toolbar/toolbar-module.mjs +4 -4
- package/esm2022/toolbar/toolbar.mjs +6 -6
- package/esm2022/tooltip/module.mjs +4 -4
- package/esm2022/tooltip/tooltip.mjs +7 -7
- package/esm2022/tree/node.mjs +9 -9
- package/esm2022/tree/outlet.mjs +3 -3
- package/esm2022/tree/padding.mjs +3 -3
- package/esm2022/tree/toggle.mjs +3 -3
- package/esm2022/tree/tree-module.mjs +4 -4
- package/esm2022/tree/tree.mjs +3 -3
- package/fesm2022/autocomplete.mjs +28 -19
- package/fesm2022/autocomplete.mjs.map +1 -1
- package/fesm2022/badge.mjs +7 -7
- package/fesm2022/bottom-sheet.mjs +10 -10
- package/fesm2022/button-toggle.mjs +10 -10
- package/fesm2022/button.mjs +34 -34
- package/fesm2022/card.mjs +46 -46
- package/fesm2022/checkbox.mjs +14 -14
- package/fesm2022/chips.mjs +40 -40
- package/fesm2022/core.mjs +57 -57
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/datepicker.mjs +83 -83
- package/fesm2022/datepicker.mjs.map +1 -1
- package/fesm2022/dialog.mjs +22 -22
- package/fesm2022/divider.mjs +7 -7
- package/fesm2022/expansion.mjs +25 -25
- package/fesm2022/form-field.mjs +34 -34
- package/fesm2022/grid-list.mjs +22 -22
- package/fesm2022/icon/testing.mjs +7 -7
- package/fesm2022/icon.mjs +10 -10
- package/fesm2022/input.mjs +7 -7
- package/fesm2022/list.mjs +54 -54
- package/fesm2022/list.mjs.map +1 -1
- package/fesm2022/menu.mjs +16 -16
- package/fesm2022/paginator.mjs +10 -10
- package/fesm2022/progress-bar.mjs +7 -7
- package/fesm2022/progress-spinner.mjs +7 -7
- package/fesm2022/radio.mjs +10 -10
- package/fesm2022/select.mjs +11 -11
- package/fesm2022/select.mjs.map +1 -1
- package/fesm2022/sidenav.mjs +22 -22
- package/fesm2022/slide-toggle.mjs +14 -14
- package/fesm2022/slider.mjs +16 -16
- package/fesm2022/snack-bar.mjs +22 -22
- package/fesm2022/sort.mjs +13 -13
- package/fesm2022/stepper.mjs +31 -31
- package/fesm2022/table.mjs +55 -55
- package/fesm2022/tabs.mjs +40 -40
- package/fesm2022/toolbar.mjs +10 -10
- package/fesm2022/tooltip.mjs +11 -11
- package/fesm2022/tooltip.mjs.map +1 -1
- package/fesm2022/tree.mjs +25 -25
- package/form-field/_form-field-theme.scss +85 -49
- package/grid-list/_grid-list-theme.scss +47 -14
- package/icon/_icon-theme.scss +55 -23
- package/input/_input-theme.scss +39 -12
- package/list/_list-theme.scss +115 -83
- package/menu/_menu-theme.scss +50 -18
- package/package.json +2 -2
- package/paginator/_paginator-theme.scss +62 -29
- 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/schematics/ng-add/index.js +1 -1
- package/schematics/ng-add/index.mjs +1 -1
- package/schematics/ng-generate/address-form/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html.template +28 -29
- package/schematics/ng-generate/dashboard/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html.template +21 -19
- package/schematics/ng-generate/mdc-migration/index_bundled.js +427 -201
- package/schematics/ng-generate/mdc-migration/index_bundled.js.map +4 -4
- package/schematics/ng-generate/navigation/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html.template +9 -8
- package/schematics/ng-generate/navigation/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts.template +1 -2
- package/schematics/ng-update/index_bundled.js +41 -37
- package/schematics/ng-update/index_bundled.js.map +2 -2
- package/select/_select-theme.scss +71 -38
- package/sidenav/_sidenav-theme.scss +49 -16
- package/slide-toggle/_slide-toggle-theme.scss +78 -44
- package/sort/_sort-theme.scss +51 -20
- package/stepper/_stepper-theme.scss +58 -25
- package/table/_table-theme.scss +53 -20
- package/tabs/_tabs-theme.scss +87 -51
- package/tree/_tree-theme.scss +53 -21
|
@@ -1,41 +1,72 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
1
2
|
@use '../tokens/m2/mat/optgroup' as tokens-mat-optgroup;
|
|
2
3
|
@use '../tokens/token-utils';
|
|
3
4
|
@use '../style/sass-utils';
|
|
4
|
-
|
|
5
5
|
@use '../theming/theming';
|
|
6
6
|
@use '../theming/inspection';
|
|
7
7
|
@use '../typography/typography';
|
|
8
8
|
|
|
9
|
-
@mixin base($theme) {
|
|
9
|
+
@mixin base($theme) {
|
|
10
|
+
@if inspection.get-theme-version($theme) == 1 {
|
|
11
|
+
@include _theme-from-tokens(inspection.get-theme-tokens($theme, base));
|
|
12
|
+
}
|
|
13
|
+
@else {}
|
|
14
|
+
}
|
|
10
15
|
|
|
11
16
|
@mixin color($theme) {
|
|
12
|
-
@
|
|
13
|
-
@include
|
|
14
|
-
|
|
17
|
+
@if inspection.get-theme-version($theme) == 1 {
|
|
18
|
+
@include _theme-from-tokens(inspection.get-theme-tokens($theme, color));
|
|
19
|
+
}
|
|
20
|
+
@else {
|
|
21
|
+
@include sass-utils.current-selector-or-root() {
|
|
22
|
+
@include token-utils.create-token-values(tokens-mat-optgroup.$prefix,
|
|
23
|
+
tokens-mat-optgroup.get-color-tokens($theme));
|
|
24
|
+
}
|
|
15
25
|
}
|
|
16
26
|
}
|
|
17
27
|
|
|
18
28
|
@mixin typography($theme) {
|
|
19
|
-
@
|
|
20
|
-
@include
|
|
21
|
-
|
|
29
|
+
@if inspection.get-theme-version($theme) == 1 {
|
|
30
|
+
@include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
|
|
31
|
+
}
|
|
32
|
+
@else {
|
|
33
|
+
@include sass-utils.current-selector-or-root() {
|
|
34
|
+
@include token-utils.create-token-values(tokens-mat-optgroup.$prefix,
|
|
35
|
+
tokens-mat-optgroup.get-typography-tokens($theme));
|
|
36
|
+
}
|
|
22
37
|
}
|
|
23
38
|
}
|
|
24
39
|
|
|
25
40
|
@mixin density($theme) {
|
|
41
|
+
@if inspection.get-theme-version($theme) == 1 {
|
|
42
|
+
@include _theme-from-tokens(inspection.get-theme-tokens($theme, density));
|
|
43
|
+
}
|
|
44
|
+
@else {}
|
|
26
45
|
}
|
|
27
46
|
|
|
28
47
|
@mixin theme($theme) {
|
|
29
48
|
@include theming.private-check-duplicate-theme-styles($theme, 'mat-optgroup') {
|
|
30
|
-
@
|
|
31
|
-
|
|
32
|
-
@include color($theme);
|
|
33
|
-
}
|
|
34
|
-
@if inspection.theme-has($theme, density) {
|
|
35
|
-
@include density($theme);
|
|
49
|
+
@if inspection.get-theme-version($theme) == 1 {
|
|
50
|
+
@include _theme-from-tokens(inspection.get-theme-tokens($theme));
|
|
36
51
|
}
|
|
37
|
-
@
|
|
38
|
-
@include
|
|
52
|
+
@else {
|
|
53
|
+
@include base($theme);
|
|
54
|
+
@if inspection.theme-has($theme, color) {
|
|
55
|
+
@include color($theme);
|
|
56
|
+
}
|
|
57
|
+
@if inspection.theme-has($theme, density) {
|
|
58
|
+
@include density($theme);
|
|
59
|
+
}
|
|
60
|
+
@if inspection.theme-has($theme, typography) {
|
|
61
|
+
@include typography($theme);
|
|
62
|
+
}
|
|
39
63
|
}
|
|
40
64
|
}
|
|
41
65
|
}
|
|
66
|
+
|
|
67
|
+
@mixin _theme-from-tokens($tokens) {
|
|
68
|
+
@if ($tokens != ()) {
|
|
69
|
+
@include token-utils.create-token-values(
|
|
70
|
+
tokens-mat-optgroup.$prefix, map.get($tokens, tokens-mat-optgroup.$prefix));
|
|
71
|
+
}
|
|
72
|
+
}
|
|
@@ -1,51 +1,82 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
1
2
|
@use '../tokens/m2/mat/option' as tokens-mat-option;
|
|
2
3
|
@use '../tokens/token-utils';
|
|
3
4
|
@use '../style/sass-utils';
|
|
4
|
-
|
|
5
5
|
@use '../theming/theming';
|
|
6
6
|
@use '../theming/inspection';
|
|
7
7
|
@use '../typography/typography';
|
|
8
8
|
|
|
9
|
-
@mixin base($theme) {
|
|
9
|
+
@mixin base($theme) {
|
|
10
|
+
@if inspection.get-theme-version($theme) == 1 {
|
|
11
|
+
@include _theme-from-tokens(inspection.get-theme-tokens($theme, base));
|
|
12
|
+
}
|
|
13
|
+
@else {}
|
|
14
|
+
}
|
|
10
15
|
|
|
11
16
|
@mixin color($theme) {
|
|
12
|
-
@
|
|
13
|
-
@include
|
|
14
|
-
tokens-mat-option.get-color-tokens($theme));
|
|
17
|
+
@if inspection.get-theme-version($theme) == 1 {
|
|
18
|
+
@include _theme-from-tokens(inspection.get-theme-tokens($theme, color));
|
|
15
19
|
}
|
|
20
|
+
@else {
|
|
21
|
+
@include sass-utils.current-selector-or-root() {
|
|
22
|
+
@include token-utils.create-token-values(tokens-mat-option.$prefix,
|
|
23
|
+
tokens-mat-option.get-color-tokens($theme));
|
|
24
|
+
}
|
|
16
25
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
26
|
+
.mat-accent {
|
|
27
|
+
@include token-utils.create-token-values(tokens-mat-option.$prefix,
|
|
28
|
+
tokens-mat-option.get-color-tokens($theme, accent));
|
|
29
|
+
}
|
|
21
30
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
31
|
+
.mat-warn {
|
|
32
|
+
@include token-utils.create-token-values(tokens-mat-option.$prefix,
|
|
33
|
+
tokens-mat-option.get-color-tokens($theme, warn));
|
|
34
|
+
}
|
|
25
35
|
}
|
|
26
36
|
}
|
|
27
37
|
|
|
28
38
|
@mixin typography($theme) {
|
|
29
|
-
@
|
|
30
|
-
@include
|
|
31
|
-
|
|
39
|
+
@if inspection.get-theme-version($theme) == 1 {
|
|
40
|
+
@include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
|
|
41
|
+
}
|
|
42
|
+
@else {
|
|
43
|
+
@include sass-utils.current-selector-or-root() {
|
|
44
|
+
@include token-utils.create-token-values(tokens-mat-option.$prefix,
|
|
45
|
+
tokens-mat-option.get-typography-tokens($theme));
|
|
46
|
+
}
|
|
32
47
|
}
|
|
33
48
|
}
|
|
34
49
|
|
|
35
50
|
@mixin density($theme) {
|
|
51
|
+
@if inspection.get-theme-version($theme) == 1 {
|
|
52
|
+
@include _theme-from-tokens(inspection.get-theme-tokens($theme, density));
|
|
53
|
+
}
|
|
54
|
+
@else {}
|
|
36
55
|
}
|
|
37
56
|
|
|
38
57
|
@mixin theme($theme) {
|
|
39
58
|
@include theming.private-check-duplicate-theme-styles($theme, 'mat-option') {
|
|
40
|
-
@
|
|
41
|
-
|
|
42
|
-
@include color($theme);
|
|
43
|
-
}
|
|
44
|
-
@if inspection.theme-has($theme, density) {
|
|
45
|
-
@include density($theme);
|
|
59
|
+
@if inspection.get-theme-version($theme) == 1 {
|
|
60
|
+
@include _theme-from-tokens(inspection.get-theme-tokens($theme));
|
|
46
61
|
}
|
|
47
|
-
@
|
|
48
|
-
@include
|
|
62
|
+
@else {
|
|
63
|
+
@include base($theme);
|
|
64
|
+
@if inspection.theme-has($theme, color) {
|
|
65
|
+
@include color($theme);
|
|
66
|
+
}
|
|
67
|
+
@if inspection.theme-has($theme, density) {
|
|
68
|
+
@include density($theme);
|
|
69
|
+
}
|
|
70
|
+
@if inspection.theme-has($theme, typography) {
|
|
71
|
+
@include typography($theme);
|
|
72
|
+
}
|
|
49
73
|
}
|
|
50
74
|
}
|
|
51
75
|
}
|
|
76
|
+
|
|
77
|
+
@mixin _theme-from-tokens($tokens) {
|
|
78
|
+
@if ($tokens != ()) {
|
|
79
|
+
@include token-utils.create-token-values(
|
|
80
|
+
tokens-mat-option.$prefix, map.get($tokens, tokens-mat-option.$prefix));
|
|
81
|
+
}
|
|
82
|
+
}
|
|
@@ -1,44 +1,76 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
1
2
|
@use '../tokens/m2/mat/ripple' as tokens-mat-ripple;
|
|
2
3
|
@use '../tokens/token-utils';
|
|
3
4
|
@use '../style/sass-utils';
|
|
4
|
-
|
|
5
5
|
@use '../theming/theming';
|
|
6
6
|
@use '../theming/inspection';
|
|
7
7
|
|
|
8
|
-
@mixin base($theme) {
|
|
8
|
+
@mixin base($theme) {
|
|
9
|
+
@if inspection.get-theme-version($theme) == 1 {
|
|
10
|
+
@include _theme-from-tokens(inspection.get-theme-tokens($theme, base));
|
|
11
|
+
}
|
|
12
|
+
@else {}
|
|
13
|
+
}
|
|
9
14
|
|
|
10
15
|
@mixin color($theme) {
|
|
11
|
-
@
|
|
12
|
-
@include
|
|
13
|
-
|
|
16
|
+
@if inspection.get-theme-version($theme) == 1 {
|
|
17
|
+
@include _theme-from-tokens(inspection.get-theme-tokens($theme, color));
|
|
18
|
+
}
|
|
19
|
+
@else {
|
|
20
|
+
@include sass-utils.current-selector-or-root() {
|
|
21
|
+
@include token-utils.create-token-values(tokens-mat-ripple.$prefix,
|
|
22
|
+
tokens-mat-ripple.get-color-tokens($theme));
|
|
23
|
+
}
|
|
14
24
|
}
|
|
15
25
|
}
|
|
16
26
|
|
|
17
27
|
@mixin typography($theme) {
|
|
18
|
-
@
|
|
19
|
-
@include
|
|
20
|
-
|
|
28
|
+
@if inspection.get-theme-version($theme) == 1 {
|
|
29
|
+
@include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
|
|
30
|
+
}
|
|
31
|
+
@else {
|
|
32
|
+
@include sass-utils.current-selector-or-root() {
|
|
33
|
+
@include token-utils.create-token-values(tokens-mat-ripple.$prefix,
|
|
34
|
+
tokens-mat-ripple.get-typography-tokens($theme));
|
|
35
|
+
}
|
|
21
36
|
}
|
|
22
37
|
}
|
|
23
38
|
|
|
24
39
|
@mixin density($theme) {
|
|
25
|
-
@
|
|
26
|
-
@include
|
|
27
|
-
|
|
40
|
+
@if inspection.get-theme-version($theme) == 1 {
|
|
41
|
+
@include _theme-from-tokens(inspection.get-theme-tokens($theme, density));
|
|
42
|
+
}
|
|
43
|
+
@else {
|
|
44
|
+
@include sass-utils.current-selector-or-root() {
|
|
45
|
+
@include token-utils.create-token-values(tokens-mat-ripple.$prefix,
|
|
46
|
+
tokens-mat-ripple.get-density-tokens($theme));
|
|
47
|
+
}
|
|
28
48
|
}
|
|
29
49
|
}
|
|
30
50
|
|
|
31
51
|
@mixin theme($theme) {
|
|
32
52
|
@include theming.private-check-duplicate-theme-styles($theme, 'mat-ripple') {
|
|
33
|
-
@
|
|
34
|
-
|
|
35
|
-
@include color($theme);
|
|
36
|
-
}
|
|
37
|
-
@if inspection.theme-has($theme, density) {
|
|
38
|
-
@include density($theme);
|
|
53
|
+
@if inspection.get-theme-version($theme) == 1 {
|
|
54
|
+
@include _theme-from-tokens(inspection.get-theme-tokens($theme));
|
|
39
55
|
}
|
|
40
|
-
@
|
|
41
|
-
@include
|
|
56
|
+
@else {
|
|
57
|
+
@include base($theme);
|
|
58
|
+
@if inspection.theme-has($theme, color) {
|
|
59
|
+
@include color($theme);
|
|
60
|
+
}
|
|
61
|
+
@if inspection.theme-has($theme, density) {
|
|
62
|
+
@include density($theme);
|
|
63
|
+
}
|
|
64
|
+
@if inspection.theme-has($theme, typography) {
|
|
65
|
+
@include typography($theme);
|
|
66
|
+
}
|
|
42
67
|
}
|
|
43
68
|
}
|
|
44
69
|
}
|
|
70
|
+
|
|
71
|
+
@mixin _theme-from-tokens($tokens) {
|
|
72
|
+
@if ($tokens != ()) {
|
|
73
|
+
@include token-utils.create-token-values(
|
|
74
|
+
tokens-mat-ripple.$prefix, map.get($tokens, tokens-mat-ripple.$prefix));
|
|
75
|
+
}
|
|
76
|
+
}
|
|
@@ -1,53 +1,24 @@
|
|
|
1
1
|
@use '../../theming/theming';
|
|
2
2
|
@use '../../theming/inspection';
|
|
3
|
-
|
|
4
|
-
@
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
color: $background;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
background: $text-color;
|
|
18
|
-
}
|
|
3
|
+
@use '../../style/sass-utils';
|
|
4
|
+
@use '../../tokens/token-utils';
|
|
5
|
+
@use '../../tokens/m2/mat/full-pseudo-checkbox' as tokens-mat-full-pseudo-checkbox;
|
|
6
|
+
@use '../../tokens/m2/mat/minimal-pseudo-checkbox' as tokens-mat-minimal-pseudo-checkbox;
|
|
7
|
+
|
|
8
|
+
@mixin _palette-styles($theme, $palette-name) {
|
|
9
|
+
@include sass-utils.current-selector-or-root() {
|
|
10
|
+
@include token-utils.create-token-values(tokens-mat-full-pseudo-checkbox.$prefix,
|
|
11
|
+
tokens-mat-full-pseudo-checkbox.get-color-tokens($theme, $palette-name));
|
|
12
|
+
@include token-utils.create-token-values(tokens-mat-minimal-pseudo-checkbox.$prefix,
|
|
13
|
+
tokens-mat-minimal-pseudo-checkbox.get-color-tokens($theme, $palette-name));
|
|
19
14
|
}
|
|
20
15
|
}
|
|
21
16
|
|
|
22
|
-
@mixin base($theme) {
|
|
23
|
-
// TODO(mmalerba): Move pseudo checkbox base tokens here
|
|
24
|
-
}
|
|
17
|
+
@mixin base($theme) {}
|
|
25
18
|
|
|
26
19
|
@mixin color($theme) {
|
|
27
|
-
$is-dark-theme: inspection.get-theme-type($theme) == dark;
|
|
28
|
-
$primary: inspection.get-theme-color($theme, primary);
|
|
29
|
-
$accent: inspection.get-theme-color($theme, accent);
|
|
30
|
-
$warn: inspection.get-theme-color($theme, warn);
|
|
31
|
-
$background: inspection.get-theme-color($theme, background, background);
|
|
32
|
-
$secondary-text: inspection.get-theme-color($theme, foreground, secondary-text);
|
|
33
|
-
|
|
34
|
-
// NOTE(traviskaufman): While the spec calls for translucent blacks/whites for disabled colors,
|
|
35
|
-
// this does not work well with elements layered on top of one another. To get around this we
|
|
36
|
-
// blend the colors together based on the base color and the theme background.
|
|
37
|
-
$white-30pct-opacity-on-dark: #686868;
|
|
38
|
-
$black-26pct-opacity-on-light: #b0b0b0;
|
|
39
|
-
$disabled-color: if($is-dark-theme, $white-30pct-opacity-on-dark, $black-26pct-opacity-on-light);
|
|
40
|
-
$colored-box-selector: '.mat-pseudo-checkbox-checked, .mat-pseudo-checkbox-indeterminate';
|
|
41
|
-
|
|
42
|
-
.mat-pseudo-checkbox-full {
|
|
43
|
-
color: $secondary-text;
|
|
44
|
-
&.mat-pseudo-checkbox-disabled {
|
|
45
|
-
color: $disabled-color;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
20
|
.mat-primary {
|
|
50
|
-
@include
|
|
21
|
+
@include _palette-styles($theme, primary);
|
|
51
22
|
}
|
|
52
23
|
|
|
53
24
|
// Default to the accent color. Note that the pseudo checkboxes are meant to inherit the
|
|
@@ -55,30 +26,19 @@
|
|
|
55
26
|
// don't attach to the `mat-*` classes. Also note that this needs to be below `.mat-primary`
|
|
56
27
|
// in order to allow for the color to be overwritten if the checkbox is inside a parent that
|
|
57
28
|
// has `mat-accent` and is placed inside another parent that has `mat-primary`.
|
|
58
|
-
@include
|
|
29
|
+
@include _palette-styles($theme, accent);
|
|
59
30
|
.mat-accent {
|
|
60
|
-
@include
|
|
31
|
+
@include _palette-styles($theme, accent);
|
|
61
32
|
}
|
|
62
33
|
|
|
63
34
|
.mat-warn {
|
|
64
|
-
@include
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.mat-pseudo-checkbox-disabled.mat-pseudo-checkbox-checked,
|
|
68
|
-
.mat-pseudo-checkbox-disabled.mat-pseudo-checkbox-indeterminate {
|
|
69
|
-
&.mat-pseudo-checkbox-minimal::after {
|
|
70
|
-
color: $disabled-color;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
&.mat-pseudo-checkbox-full {
|
|
74
|
-
background: $disabled-color;
|
|
75
|
-
}
|
|
35
|
+
@include _palette-styles($theme, warn);
|
|
76
36
|
}
|
|
77
37
|
}
|
|
78
38
|
|
|
79
39
|
@mixin typography($theme) {}
|
|
80
40
|
|
|
81
|
-
@mixin
|
|
41
|
+
@mixin density($theme) {}
|
|
82
42
|
|
|
83
43
|
@mixin theme($theme) {
|
|
84
44
|
@include theming.private-check-duplicate-theme-styles($theme, 'mat-pseudo-checkbox') {
|
|
@@ -87,7 +47,7 @@
|
|
|
87
47
|
@include color($theme);
|
|
88
48
|
}
|
|
89
49
|
@if inspection.theme-has($theme, density) {
|
|
90
|
-
@include
|
|
50
|
+
@include density($theme);
|
|
91
51
|
}
|
|
92
52
|
@if inspection.theme-has($theme, typography) {
|
|
93
53
|
@include typography($theme);
|
|
@@ -1,28 +1,52 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
2
|
@use 'sass:meta';
|
|
3
3
|
@use '../../style/sass-utils';
|
|
4
|
-
|
|
4
|
+
@use './mat/autocomplete' as tokens-mat-autocomplete;
|
|
5
|
+
@use './mat/badge' as tokens-mat-badge;
|
|
6
|
+
@use './mat/bottom-sheet' as tokens-mat-bottom-sheet;
|
|
5
7
|
@use './mat/card' as tokens-mat-card;
|
|
6
|
-
@use './mat/
|
|
8
|
+
@use './mat/datepicker' as tokens-mat-datepicker;
|
|
9
|
+
@use './mat/divider' as tokens-mat-divider;
|
|
10
|
+
@use './mat/form-field' as tokens-mat-form-field;
|
|
11
|
+
@use './mat/grid-list' as tokens-mat-grid-list;
|
|
12
|
+
@use './mat/icon' as tokens-mat-icon;
|
|
13
|
+
@use './mat/menu' as tokens-mat-menu;
|
|
14
|
+
@use './mat/option' as tokens-mat-option;
|
|
15
|
+
@use './mat/optgroup' as tokens-mat-optgroup;
|
|
16
|
+
@use './mat/paginator' as tokens-mat-paginator;
|
|
7
17
|
@use './mat/radio' as tokens-mat-radio;
|
|
18
|
+
@use './mat/ripple' as tokens-mat-ripple;
|
|
19
|
+
@use './mat/select' as tokens-mat-select;
|
|
20
|
+
@use './mat/sidenav' as tokens-mat-sidenav;
|
|
21
|
+
@use './mat/slide-toggle' as tokens-mat-slide-toggle;
|
|
22
|
+
@use './mat/slider' as tokens-mat-slider;
|
|
8
23
|
@use './mat/snack-bar' as tokens-mat-snack-bar;
|
|
24
|
+
@use './mat/sort' as tokens-mat-sort;
|
|
25
|
+
@use './mat/standard-button-toggle' as tokens-mat-button-toggle;
|
|
26
|
+
@use './mat/stepper' as tokens-mat-stepper;
|
|
9
27
|
@use './mat/tab-header' as tokens-mat-tab-header;
|
|
10
28
|
@use './mat/tab-header-with-background' as tokens-mat-tab-header-with-background;
|
|
11
|
-
@use './mat/
|
|
29
|
+
@use './mat/table' as tokens-mat-table;
|
|
30
|
+
@use './mat/toolbar' as tokens-mat-toolbar;
|
|
31
|
+
@use './mat/tree' as tokens-mat-tree;
|
|
12
32
|
@use './mdc/checkbox' as tokens-mdc-checkbox;
|
|
33
|
+
@use './mdc/chip' as tokens-mdc-chip;
|
|
13
34
|
@use './mdc/circular-progress' as tokens-mdc-circular-progress;
|
|
14
35
|
@use './mdc/dialog' as tokens-mdc-dialog;
|
|
15
36
|
@use './mdc/elevated-card' as tokens-mdc-elevated-card;
|
|
37
|
+
@use './mdc/filled-text-field' as tokens-mdc-filled-text-field;
|
|
16
38
|
@use './mdc/icon-button' as tokens-mdc-icon-button;
|
|
17
39
|
@use './mdc/linear-progress' as tokens-mdc-linear-progress;
|
|
18
40
|
@use './mdc/list' as tokens-mdc-list;
|
|
19
41
|
@use './mdc/outlined-card' as tokens-mdc-outlined-card;
|
|
42
|
+
@use './mdc/outlined-text-field' as tokens-mdc-outlined-text-field;
|
|
43
|
+
@use './mdc/plain-tooltip' as tokens-mdc-plain-tooltip;
|
|
20
44
|
@use './mdc/radio' as tokens-mdc-radio;
|
|
45
|
+
@use './mdc/slider' as tokens-mdc-slider;
|
|
21
46
|
@use './mdc/snack-bar' as tokens-mdc-snack-bar;
|
|
47
|
+
@use './mdc/switch' as tokens-mdc-switch;
|
|
22
48
|
@use './mdc/tab' as tokens-mdc-tab;
|
|
23
49
|
@use './mdc/tab-indicator' as tokens-mdc-tab-indicator;
|
|
24
|
-
@use './mdc/slider' as tokens-mdc-slider;
|
|
25
|
-
@use './mdc/plain-tooltip' as tokens-mdc-plain-tooltip;
|
|
26
50
|
|
|
27
51
|
/// Gets the tokens for the given theme, m2 tokens module, and theming system.
|
|
28
52
|
/// @param {Map} $theme The Angular Material theme object to generate token values from.
|
|
@@ -67,26 +91,51 @@
|
|
|
67
91
|
/// )
|
|
68
92
|
@function m2-tokens-from-theme($theme) {
|
|
69
93
|
@return sass-utils.deep-merge-all(
|
|
94
|
+
_get-tokens-for-module($theme, tokens-mat-autocomplete),
|
|
95
|
+
_get-tokens-for-module($theme, tokens-mat-badge),
|
|
96
|
+
_get-tokens-for-module($theme, tokens-mat-bottom-sheet),
|
|
97
|
+
_get-tokens-for-module($theme, tokens-mat-button-toggle),
|
|
70
98
|
_get-tokens-for-module($theme, tokens-mat-card),
|
|
99
|
+
_get-tokens-for-module($theme, tokens-mat-datepicker),
|
|
100
|
+
_get-tokens-for-module($theme, tokens-mat-divider),
|
|
101
|
+
_get-tokens-for-module($theme, tokens-mat-form-field),
|
|
102
|
+
_get-tokens-for-module($theme, tokens-mat-grid-list),
|
|
103
|
+
_get-tokens-for-module($theme, tokens-mat-icon),
|
|
104
|
+
_get-tokens-for-module($theme, tokens-mat-menu),
|
|
105
|
+
_get-tokens-for-module($theme, tokens-mat-optgroup),
|
|
106
|
+
_get-tokens-for-module($theme, tokens-mat-option),
|
|
107
|
+
_get-tokens-for-module($theme, tokens-mat-paginator),
|
|
71
108
|
_get-tokens-for-module($theme, tokens-mat-radio),
|
|
109
|
+
_get-tokens-for-module($theme, tokens-mat-ripple),
|
|
110
|
+
_get-tokens-for-module($theme, tokens-mat-select),
|
|
111
|
+
_get-tokens-for-module($theme, tokens-mat-sidenav),
|
|
112
|
+
_get-tokens-for-module($theme, tokens-mat-slide-toggle),
|
|
113
|
+
_get-tokens-for-module($theme, tokens-mat-slider),
|
|
72
114
|
_get-tokens-for-module($theme, tokens-mat-snack-bar),
|
|
115
|
+
_get-tokens-for-module($theme, tokens-mat-sort),
|
|
116
|
+
_get-tokens-for-module($theme, tokens-mat-stepper),
|
|
73
117
|
_get-tokens-for-module($theme, tokens-mat-tab-header),
|
|
74
118
|
_get-tokens-for-module($theme, tokens-mat-tab-header-with-background),
|
|
119
|
+
_get-tokens-for-module($theme, tokens-mat-table),
|
|
75
120
|
_get-tokens-for-module($theme, tokens-mat-toolbar),
|
|
76
|
-
_get-tokens-for-module($theme, tokens-mat-
|
|
121
|
+
_get-tokens-for-module($theme, tokens-mat-tree),
|
|
77
122
|
_get-tokens-for-module($theme, tokens-mdc-checkbox),
|
|
123
|
+
_get-tokens-for-module($theme, tokens-mdc-chip),
|
|
78
124
|
_get-tokens-for-module($theme, tokens-mdc-circular-progress),
|
|
79
125
|
_get-tokens-for-module($theme, tokens-mdc-dialog),
|
|
80
126
|
_get-tokens-for-module($theme, tokens-mdc-elevated-card),
|
|
127
|
+
_get-tokens-for-module($theme, tokens-mdc-filled-text-field),
|
|
81
128
|
_get-tokens-for-module($theme, tokens-mdc-icon-button),
|
|
82
129
|
_get-tokens-for-module($theme, tokens-mdc-linear-progress),
|
|
83
130
|
_get-tokens-for-module($theme, tokens-mdc-list),
|
|
84
131
|
_get-tokens-for-module($theme, tokens-mdc-outlined-card),
|
|
132
|
+
_get-tokens-for-module($theme, tokens-mdc-outlined-text-field),
|
|
133
|
+
_get-tokens-for-module($theme, tokens-mdc-plain-tooltip),
|
|
85
134
|
_get-tokens-for-module($theme, tokens-mdc-radio),
|
|
135
|
+
_get-tokens-for-module($theme, tokens-mdc-slider),
|
|
86
136
|
_get-tokens-for-module($theme, tokens-mdc-snack-bar),
|
|
137
|
+
_get-tokens-for-module($theme, tokens-mdc-switch),
|
|
87
138
|
_get-tokens-for-module($theme, tokens-mdc-tab),
|
|
88
139
|
_get-tokens-for-module($theme, tokens-mdc-tab-indicator),
|
|
89
|
-
_get-tokens-for-module($theme, tokens-mdc-slider),
|
|
90
|
-
_get-tokens-for-module($theme, tokens-mdc-plain-tooltip),
|
|
91
140
|
);
|
|
92
141
|
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
@use '../../token-utils';
|
|
2
|
+
@use '../../../theming/inspection';
|
|
3
|
+
@use '../../../style/sass-utils';
|
|
4
|
+
|
|
5
|
+
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
6
|
+
$prefix: (mat, full-pseudo-checkbox);
|
|
7
|
+
|
|
8
|
+
// Tokens that can't be configured through Angular Material's current theming API,
|
|
9
|
+
// but may be in a future version of the theming API.
|
|
10
|
+
@function get-unthemable-tokens() {
|
|
11
|
+
@return ();
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
// Tokens that can be configured through Angular Material's color theming API.
|
|
15
|
+
@function get-color-tokens($theme, $palette-name: accent) {
|
|
16
|
+
$is-dark: inspection.get-theme-type($theme) == dark;
|
|
17
|
+
$disabled-color: if($is-dark, #686868, #b0b0b0);
|
|
18
|
+
$checkmark-color: inspection.get-theme-color($theme, background, background);
|
|
19
|
+
|
|
20
|
+
@return (
|
|
21
|
+
selected-icon-color: inspection.get-theme-color($theme, $palette-name),
|
|
22
|
+
selected-checkmark-color: $checkmark-color,
|
|
23
|
+
unselected-icon-color: inspection.get-theme-color($theme, foreground, secondary-text),
|
|
24
|
+
disabled-selected-checkmark-color: $checkmark-color,
|
|
25
|
+
disabled-unselected-icon-color: $disabled-color,
|
|
26
|
+
disabled-selected-icon-color: $disabled-color,
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// Tokens that can be configured through Angular Material's typography theming API.
|
|
31
|
+
@function get-typography-tokens($theme) {
|
|
32
|
+
@return ();
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// Tokens that can be configured through Angular Material's density theming API.
|
|
36
|
+
@function get-density-tokens($theme) {
|
|
37
|
+
@return ();
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// Combines the tokens generated by the above functions into a single map with placeholder values.
|
|
41
|
+
// This is used to create token slots.
|
|
42
|
+
@function get-token-slots() {
|
|
43
|
+
@return sass-utils.deep-merge-all(
|
|
44
|
+
get-unthemable-tokens(),
|
|
45
|
+
get-color-tokens(token-utils.$placeholder-color-config),
|
|
46
|
+
get-typography-tokens(token-utils.$placeholder-typography-config),
|
|
47
|
+
get-density-tokens(token-utils.$placeholder-density-config)
|
|
48
|
+
);
|
|
49
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
@use '../../token-utils';
|
|
2
|
+
@use '../../../theming/inspection';
|
|
3
|
+
@use '../../../style/sass-utils';
|
|
4
|
+
|
|
5
|
+
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
6
|
+
$prefix: (mat, minimal-pseudo-checkbox);
|
|
7
|
+
|
|
8
|
+
// Tokens that can't be configured through Angular Material's current theming API,
|
|
9
|
+
// but may be in a future version of the theming API.
|
|
10
|
+
@function get-unthemable-tokens() {
|
|
11
|
+
@return ();
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
// Tokens that can be configured through Angular Material's color theming API.
|
|
15
|
+
@function get-color-tokens($theme, $palette-name: accent) {
|
|
16
|
+
$is-dark: inspection.get-theme-type($theme) == dark;
|
|
17
|
+
|
|
18
|
+
@return (
|
|
19
|
+
selected-checkmark-color: inspection.get-theme-color($theme, $palette-name),
|
|
20
|
+
disabled-selected-checkmark-color: if($is-dark, #686868, #b0b0b0),
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// Tokens that can be configured through Angular Material's typography theming API.
|
|
25
|
+
@function get-typography-tokens($theme) {
|
|
26
|
+
@return ();
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// Tokens that can be configured through Angular Material's density theming API.
|
|
30
|
+
@function get-density-tokens($theme) {
|
|
31
|
+
@return ();
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// Combines the tokens generated by the above functions into a single map with placeholder values.
|
|
35
|
+
// This is used to create token slots.
|
|
36
|
+
@function get-token-slots() {
|
|
37
|
+
@return sass-utils.deep-merge-all(
|
|
38
|
+
get-unthemable-tokens(),
|
|
39
|
+
get-color-tokens(token-utils.$placeholder-color-config),
|
|
40
|
+
get-typography-tokens(token-utils.$placeholder-typography-config),
|
|
41
|
+
get-density-tokens(token-utils.$placeholder-density-config)
|
|
42
|
+
);
|
|
43
|
+
}
|