@angular/material 17.0.0-next.1 → 17.0.0-next.3
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 +12 -18
- package/autocomplete/index.d.ts +19 -26
- package/badge/_badge-theme.scss +15 -27
- package/badge/index.d.ts +9 -17
- package/bottom-sheet/_bottom-sheet-theme.scss +13 -22
- package/button-toggle/_button-toggle-theme.scss +17 -28
- package/button-toggle/index.d.ts +15 -18
- package/checkbox/index.d.ts +21 -27
- package/chips/_chips-theme.scss +18 -56
- package/core/color/_all-color.scss +7 -15
- package/core/density/private/_all-density.scss +34 -39
- package/core/focus-indicators/_focus-indicators-theme.scss +6 -8
- package/core/focus-indicators/_private.scss +22 -26
- package/core/index.d.ts +7 -11
- package/core/style/_form-common.scss +7 -7
- package/core/style/_private.scss +2 -4
- package/core/testing/index.d.ts +2 -1
- package/core/theming/_all-theme.scss +41 -41
- package/core/theming/_inspection.scss +47 -0
- package/core/theming/_m2-inspection.scss +57 -0
- package/core/theming/_theming.scss +0 -14
- package/core/tokens/m2/mat/_autocomplete.scss +5 -8
- package/core/tokens/m2/mat/_badge.scss +12 -15
- package/core/tokens/m2/mat/_bottom-sheet.scss +11 -17
- package/core/tokens/m2/mat/_datepicker.scss +28 -38
- package/core/tokens/m2/mat/_divider.scss +5 -8
- package/core/tokens/m2/mat/_expansion.scss +24 -28
- package/core/tokens/m2/mat/_grid-list.scss +8 -8
- package/core/tokens/m2/mat/_icon.scss +3 -3
- package/core/tokens/m2/mat/_legacy-button-toggle.scss +15 -19
- package/core/tokens/m2/mat/_menu.scss +12 -17
- package/core/tokens/m2/mat/_select.scss +15 -29
- package/core/tokens/m2/mat/_sidenav.scss +12 -14
- package/core/tokens/m2/mat/_snack-bar.scss +7 -8
- package/core/tokens/m2/mat/_standard-button-toggle.scss +23 -22
- package/core/tokens/m2/mat/_stepper.scss +30 -33
- package/core/tokens/m2/mat/_tab-header-with-background.scss +6 -8
- package/core/tokens/m2/mat/_tab-header.scss +13 -18
- package/core/tokens/m2/mat/_table.scss +19 -23
- package/core/tokens/m2/mat/_toolbar.scss +12 -16
- package/core/tokens/m2/mdc/_chip.scss +38 -24
- package/core/tokens/m2/mdc/_circular-progress.scss +5 -6
- package/core/tokens/m2/mdc/_dialog.scss +16 -30
- package/core/tokens/m2/mdc/_icon-button.scss +2 -2
- package/core/tokens/m2/mdc/_plain-tooltip.scss +9 -22
- package/core/tokens/m2/mdc/_snack-bar.scss +10 -23
- package/core/tokens/m2/mdc/_tab-indicator.scss +5 -8
- package/core/tokens/m2/mdc/_tab.scss +5 -4
- package/core/typography/_all-typography.scss +44 -47
- package/core/typography/_typography.scss +32 -155
- package/core/typography/_versioning.scss +7 -2
- package/datepicker/_datepicker-theme.scss +20 -34
- package/dialog/_dialog-theme.scss +14 -25
- package/dialog/_mdc-dialog-structure-overrides.scss +12 -10
- package/dialog/index.d.ts +2 -0
- package/divider/_divider-theme.scss +12 -18
- package/esm2022/autocomplete/autocomplete-trigger.mjs +13 -19
- package/esm2022/autocomplete/autocomplete.mjs +23 -50
- package/esm2022/badge/badge.mjs +11 -29
- package/esm2022/button-toggle/button-toggle.mjs +25 -33
- package/esm2022/checkbox/checkbox.mjs +32 -39
- package/esm2022/core/option/optgroup.mjs +10 -11
- package/esm2022/core/option/option.mjs +6 -6
- package/esm2022/core/testing/option-harness.mjs +3 -3
- package/esm2022/core/version.mjs +1 -1
- package/esm2022/dialog/dialog-container.mjs +16 -3
- package/esm2022/menu/menu-item.mjs +15 -11
- package/esm2022/menu/menu.mjs +9 -22
- package/esm2022/slide-toggle/slide-toggle.mjs +33 -37
- package/esm2022/tabs/tab-group.mjs +3 -3
- package/expansion/_expansion-theme.scss +16 -24
- package/fesm2022/autocomplete.mjs +33 -65
- package/fesm2022/autocomplete.mjs.map +1 -1
- package/fesm2022/badge.mjs +11 -28
- package/fesm2022/badge.mjs.map +1 -1
- package/fesm2022/button-toggle.mjs +25 -32
- package/fesm2022/button-toggle.mjs.map +1 -1
- package/fesm2022/checkbox.mjs +31 -38
- package/fesm2022/checkbox.mjs.map +1 -1
- package/fesm2022/core/testing.mjs +2 -2
- package/fesm2022/core/testing.mjs.map +1 -1
- package/fesm2022/core.mjs +14 -13
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/dialog.mjs +15 -2
- package/fesm2022/dialog.mjs.map +1 -1
- package/fesm2022/menu.mjs +23 -31
- package/fesm2022/menu.mjs.map +1 -1
- package/fesm2022/slide-toggle.mjs +33 -36
- package/fesm2022/slide-toggle.mjs.map +1 -1
- package/fesm2022/tabs.mjs +2 -2
- package/fesm2022/tabs.mjs.map +1 -1
- package/form-field/_form-field-sizing.scss +1 -1
- package/grid-list/_grid-list-theme.scss +12 -19
- package/icon/_icon-theme.scss +17 -25
- package/list/_list-theme.scss +1 -1
- package/menu/_menu-theme.scss +13 -22
- package/menu/index.d.ts +12 -18
- package/package.json +2 -2
- 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-spinner/_progress-spinner-theme.scss +16 -22
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-add/index.mjs +1 -1
- package/schematics/ng-generate/mdc-migration/index_bundled.js.map +1 -1
- package/select/_select-theme.scss +17 -31
- package/sidenav/_sidenav-theme.scss +12 -18
- package/slide-toggle/index.d.ts +20 -23
- package/snack-bar/_snack-bar-theme.scss +15 -24
- package/sort/_sort-theme.scss +13 -22
- package/stepper/_stepper-theme.scss +16 -34
- package/table/_table-theme.scss +14 -25
- package/tabs/_tabs-theme.scss +31 -45
- package/toolbar/_toolbar-theme.scss +22 -31
- package/tooltip/_tooltip-theme.scss +15 -23
- package/tree/_tree-theme.scss +20 -29
- package/core/typography/_typography-deprecated.scss +0 -39
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
@use 'sass:map';
|
|
2
1
|
@use '@material/density' as mdc-density;
|
|
3
2
|
@use '@material/textfield' as mdc-textfield;
|
|
4
3
|
@use '../core/tokens/m2/mat/select' as tokens-mat-select;
|
|
@@ -6,43 +5,35 @@
|
|
|
6
5
|
@use '../core/style/sass-utils';
|
|
7
6
|
|
|
8
7
|
@use '../core/theming/theming';
|
|
8
|
+
@use '../core/theming/inspection';
|
|
9
9
|
@use '../core/typography/typography';
|
|
10
10
|
|
|
11
|
-
@mixin color($
|
|
12
|
-
$config: theming.get-color-config($config-or-theme);
|
|
13
|
-
|
|
11
|
+
@mixin color($theme) {
|
|
14
12
|
@include sass-utils.current-selector-or-root() {
|
|
15
13
|
@include token-utils.create-token-values(tokens-mat-select.$prefix,
|
|
16
|
-
tokens-mat-select.get-color-tokens($
|
|
14
|
+
tokens-mat-select.get-color-tokens($theme));
|
|
17
15
|
|
|
18
16
|
.mat-mdc-form-field.mat-accent {
|
|
19
|
-
$accent: map.get($config, accent);
|
|
20
|
-
$accent-config: map.merge($config, (primary: $accent));
|
|
21
17
|
@include token-utils.create-token-values(tokens-mat-select.$prefix,
|
|
22
|
-
tokens-mat-select.get-color-tokens($accent
|
|
18
|
+
tokens-mat-select.get-color-tokens($theme, accent));
|
|
23
19
|
}
|
|
24
20
|
|
|
25
21
|
.mat-mdc-form-field.mat-warn {
|
|
26
|
-
$warn: map.get($config, warn);
|
|
27
|
-
$warn-config: map.merge($config, (primary: $warn));
|
|
28
22
|
@include token-utils.create-token-values(tokens-mat-select.$prefix,
|
|
29
|
-
tokens-mat-select.get-color-tokens($warn
|
|
23
|
+
tokens-mat-select.get-color-tokens($theme, warn));
|
|
30
24
|
}
|
|
31
25
|
}
|
|
32
26
|
}
|
|
33
27
|
|
|
34
|
-
@mixin typography($
|
|
35
|
-
$config: typography.private-typography-to-2018-config(
|
|
36
|
-
theming.get-typography-config($config-or-theme));
|
|
37
|
-
|
|
28
|
+
@mixin typography($theme) {
|
|
38
29
|
@include sass-utils.current-selector-or-root() {
|
|
39
30
|
@include token-utils.create-token-values(tokens-mat-select.$prefix,
|
|
40
|
-
tokens-mat-select.get-typography-tokens($
|
|
31
|
+
tokens-mat-select.get-typography-tokens($theme));
|
|
41
32
|
}
|
|
42
33
|
}
|
|
43
34
|
|
|
44
|
-
@mixin density($
|
|
45
|
-
$density-scale:
|
|
35
|
+
@mixin density($theme) {
|
|
36
|
+
$density-scale: inspection.get-theme-density($theme);
|
|
46
37
|
|
|
47
38
|
// Density is clamped at -5 here, because MDC's form field throws an error for anything lower.
|
|
48
39
|
$form-field-height: mdc-density.prop-value(
|
|
@@ -61,25 +52,20 @@
|
|
|
61
52
|
|
|
62
53
|
@include sass-utils.current-selector-or-root() {
|
|
63
54
|
@include token-utils.create-token-values(tokens-mat-select.$prefix,
|
|
64
|
-
tokens-mat-select.get-density-tokens($
|
|
55
|
+
tokens-mat-select.get-density-tokens($theme));
|
|
65
56
|
}
|
|
66
57
|
}
|
|
67
58
|
|
|
68
|
-
@mixin theme($theme
|
|
69
|
-
$theme: theming.private-legacy-get-theme($theme-or-color-config);
|
|
59
|
+
@mixin theme($theme) {
|
|
70
60
|
@include theming.private-check-duplicate-theme-styles($theme, 'mat-select') {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
$typography: theming.get-typography-config($theme);
|
|
74
|
-
|
|
75
|
-
@if $color != null {
|
|
76
|
-
@include color($color);
|
|
61
|
+
@if inspection.theme-has($theme, color) {
|
|
62
|
+
@include color($theme);
|
|
77
63
|
}
|
|
78
|
-
@if $density
|
|
79
|
-
@include density($
|
|
64
|
+
@if inspection.theme-has($theme, density) {
|
|
65
|
+
@include density($theme);
|
|
80
66
|
}
|
|
81
|
-
@if $typography
|
|
82
|
-
@include typography($
|
|
67
|
+
@if inspection.theme-has($theme, typography) {
|
|
68
|
+
@include typography($theme);
|
|
83
69
|
}
|
|
84
70
|
}
|
|
85
71
|
}
|
|
@@ -1,36 +1,30 @@
|
|
|
1
1
|
@use '../core/theming/theming';
|
|
2
|
+
@use '../core/theming/inspection';
|
|
2
3
|
@use '../core/tokens/m2/mat/sidenav' as tokens-mat-sidenav;
|
|
3
4
|
@use '../core/tokens/token-utils';
|
|
4
5
|
@use '../core/style/sass-utils';
|
|
5
6
|
|
|
6
|
-
@mixin color($
|
|
7
|
-
$config: theming.get-color-config($config-or-theme);
|
|
8
|
-
|
|
7
|
+
@mixin color($theme) {
|
|
9
8
|
@include sass-utils.current-selector-or-root() {
|
|
10
9
|
@include token-utils.create-token-values(tokens-mat-sidenav.$prefix,
|
|
11
|
-
tokens-mat-sidenav.get-color-tokens($
|
|
10
|
+
tokens-mat-sidenav.get-color-tokens($theme));
|
|
12
11
|
}
|
|
13
12
|
}
|
|
14
13
|
|
|
15
|
-
@mixin typography($
|
|
14
|
+
@mixin typography($theme) {}
|
|
16
15
|
|
|
17
|
-
@mixin density($
|
|
16
|
+
@mixin density($theme) {}
|
|
18
17
|
|
|
19
|
-
@mixin theme($theme
|
|
20
|
-
$theme: theming.private-legacy-get-theme($theme-or-color-config);
|
|
18
|
+
@mixin theme($theme) {
|
|
21
19
|
@include theming.private-check-duplicate-theme-styles($theme, 'mat-sidenav') {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
$typography: theming.get-typography-config($theme);
|
|
25
|
-
|
|
26
|
-
@if $color != null {
|
|
27
|
-
@include color($color);
|
|
20
|
+
@if inspection.theme-has($theme, color) {
|
|
21
|
+
@include color($theme);
|
|
28
22
|
}
|
|
29
|
-
@if $density
|
|
30
|
-
@include density($
|
|
23
|
+
@if inspection.theme-has($theme, density) {
|
|
24
|
+
@include density($theme);
|
|
31
25
|
}
|
|
32
|
-
@if $typography
|
|
33
|
-
@include typography($
|
|
26
|
+
@if inspection.theme-has($theme, typography) {
|
|
27
|
+
@include typography($theme);
|
|
34
28
|
}
|
|
35
29
|
}
|
|
36
30
|
}
|
package/slide-toggle/index.d.ts
CHANGED
|
@@ -1,17 +1,10 @@
|
|
|
1
|
-
import { _AbstractConstructor } from '@angular/material/core';
|
|
2
1
|
import { AfterContentInit } from '@angular/core';
|
|
3
|
-
import { BooleanInput } from '@angular/cdk/coercion';
|
|
4
|
-
import { CanColor } from '@angular/material/core';
|
|
5
|
-
import { CanDisable } from '@angular/material/core';
|
|
6
|
-
import { CanDisableRipple } from '@angular/material/core';
|
|
7
2
|
import { ChangeDetectorRef } from '@angular/core';
|
|
8
3
|
import { CheckboxRequiredValidator } from '@angular/forms';
|
|
9
|
-
import { _Constructor } from '@angular/material/core';
|
|
10
4
|
import { ControlValueAccessor } from '@angular/forms';
|
|
11
5
|
import { ElementRef } from '@angular/core';
|
|
12
6
|
import { EventEmitter } from '@angular/core';
|
|
13
7
|
import { FocusMonitor } from '@angular/cdk/a11y';
|
|
14
|
-
import { HasTabIndex } from '@angular/material/core';
|
|
15
8
|
import * as i0 from '@angular/core';
|
|
16
9
|
import * as i3 from '@angular/material/core';
|
|
17
10
|
import * as i4 from '@angular/common';
|
|
@@ -48,14 +41,14 @@ export declare const MAT_SLIDE_TOGGLE_VALUE_ACCESSOR: {
|
|
|
48
41
|
multi: boolean;
|
|
49
42
|
};
|
|
50
43
|
|
|
51
|
-
export declare class MatSlideToggle
|
|
44
|
+
export declare class MatSlideToggle implements OnDestroy, AfterContentInit, ControlValueAccessor {
|
|
45
|
+
private _elementRef;
|
|
52
46
|
protected _focusMonitor: FocusMonitor;
|
|
53
47
|
protected _changeDetectorRef: ChangeDetectorRef;
|
|
54
48
|
defaults: MatSlideToggleDefaultOptions;
|
|
55
49
|
private _onChange;
|
|
56
50
|
private _onTouched;
|
|
57
51
|
private _uniqueId;
|
|
58
|
-
private _required;
|
|
59
52
|
private _checked;
|
|
60
53
|
private _createChangeEvent;
|
|
61
54
|
/** Unique ID for the label element. */
|
|
@@ -83,15 +76,20 @@ export declare class MatSlideToggle extends _MatSlideToggleMixinBase implements
|
|
|
83
76
|
/** Used to set the aria-describedby attribute on the underlying input element. */
|
|
84
77
|
ariaDescribedby: string;
|
|
85
78
|
/** Whether the slide-toggle is required. */
|
|
86
|
-
|
|
87
|
-
|
|
79
|
+
required: boolean;
|
|
80
|
+
/** Palette color of slide toggle. */
|
|
81
|
+
color: string | undefined;
|
|
82
|
+
/** Whether the slide toggle is disabled. */
|
|
83
|
+
disabled: boolean;
|
|
84
|
+
/** Whether the slide toggle has a ripple. */
|
|
85
|
+
disableRipple: boolean;
|
|
86
|
+
/** Tabindex of slide toggle. */
|
|
87
|
+
tabIndex: number;
|
|
88
88
|
/** Whether the slide-toggle element is checked or not. */
|
|
89
89
|
get checked(): boolean;
|
|
90
|
-
set checked(value:
|
|
90
|
+
set checked(value: boolean);
|
|
91
91
|
/** Whether to hide the icon inside of the slide toggle. */
|
|
92
|
-
|
|
93
|
-
set hideIcon(value: BooleanInput);
|
|
94
|
-
private _hideIcon;
|
|
92
|
+
hideIcon: boolean;
|
|
95
93
|
/** An event will be dispatched each time the slide-toggle changes its value. */
|
|
96
94
|
readonly change: EventEmitter<MatSlideToggleChange>;
|
|
97
95
|
/**
|
|
@@ -102,7 +100,7 @@ export declare class MatSlideToggle extends _MatSlideToggleMixinBase implements
|
|
|
102
100
|
readonly toggleChange: EventEmitter<void>;
|
|
103
101
|
/** Returns the unique id for the visual hidden input. */
|
|
104
102
|
get inputId(): string;
|
|
105
|
-
constructor(
|
|
103
|
+
constructor(_elementRef: ElementRef, _focusMonitor: FocusMonitor, _changeDetectorRef: ChangeDetectorRef, tabIndex: string, defaults: MatSlideToggleDefaultOptions, animationMode?: string);
|
|
106
104
|
ngAfterContentInit(): void;
|
|
107
105
|
ngOnDestroy(): void;
|
|
108
106
|
/** Implemented as part of ControlValueAccessor. */
|
|
@@ -124,6 +122,12 @@ export declare class MatSlideToggle extends _MatSlideToggleMixinBase implements
|
|
|
124
122
|
_getAriaLabelledBy(): string | null;
|
|
125
123
|
static ɵfac: i0.ɵɵFactoryDeclaration<MatSlideToggle, [null, null, null, { attribute: "tabindex"; }, null, { optional: true; }]>;
|
|
126
124
|
static ɵcmp: i0.ɵɵComponentDeclaration<MatSlideToggle, "mat-slide-toggle", ["matSlideToggle"], { "disabled": { "alias": "disabled"; "required": false; }; "disableRipple": { "alias": "disableRipple"; "required": false; }; "color": { "alias": "color"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "name": { "alias": "name"; "required": false; }; "id": { "alias": "id"; "required": false; }; "labelPosition": { "alias": "labelPosition"; "required": false; }; "ariaLabel": { "alias": "aria-label"; "required": false; }; "ariaLabelledby": { "alias": "aria-labelledby"; "required": false; }; "ariaDescribedby": { "alias": "aria-describedby"; "required": false; }; "required": { "alias": "required"; "required": false; }; "checked": { "alias": "checked"; "required": false; }; "hideIcon": { "alias": "hideIcon"; "required": false; }; }, { "change": "change"; "toggleChange": "toggleChange"; }, never, ["*"], false, never>;
|
|
125
|
+
static ngAcceptInputType_disabled: unknown;
|
|
126
|
+
static ngAcceptInputType_disableRipple: unknown;
|
|
127
|
+
static ngAcceptInputType_tabIndex: unknown;
|
|
128
|
+
static ngAcceptInputType_required: unknown;
|
|
129
|
+
static ngAcceptInputType_checked: unknown;
|
|
130
|
+
static ngAcceptInputType_hideIcon: unknown;
|
|
127
131
|
}
|
|
128
132
|
|
|
129
133
|
/** Change event object emitted by a slide toggle. */
|
|
@@ -149,13 +153,6 @@ export declare interface MatSlideToggleDefaultOptions {
|
|
|
149
153
|
hideIcon?: boolean;
|
|
150
154
|
}
|
|
151
155
|
|
|
152
|
-
/** @docs-private */
|
|
153
|
-
declare const _MatSlideToggleMixinBase: _Constructor<HasTabIndex> & _AbstractConstructor<HasTabIndex> & _Constructor<CanColor> & _AbstractConstructor<CanColor> & _Constructor<CanDisableRipple> & _AbstractConstructor<CanDisableRipple> & _Constructor<CanDisable> & _AbstractConstructor<CanDisable> & {
|
|
154
|
-
new (_elementRef: ElementRef): {
|
|
155
|
-
_elementRef: ElementRef;
|
|
156
|
-
};
|
|
157
|
-
};
|
|
158
|
-
|
|
159
156
|
export declare class MatSlideToggleModule {
|
|
160
157
|
static ɵfac: i0.ɵɵFactoryDeclaration<MatSlideToggleModule, never>;
|
|
161
158
|
static ɵmod: i0.ɵɵNgModuleDeclaration<MatSlideToggleModule, [typeof i2.MatSlideToggle], [typeof _MatSlideToggleRequiredValidatorModule, typeof i3.MatCommonModule, typeof i3.MatRippleModule, typeof i4.CommonModule], [typeof _MatSlideToggleRequiredValidatorModule, typeof i2.MatSlideToggle, typeof i3.MatCommonModule]>;
|
|
@@ -1,57 +1,48 @@
|
|
|
1
1
|
@use '@material/snackbar/snackbar-theme' as mdc-snackbar-theme;
|
|
2
2
|
@use '../core/theming/theming';
|
|
3
|
+
@use '../core/theming/inspection';
|
|
3
4
|
@use '../core/style/sass-utils';
|
|
4
5
|
@use '../core/typography/typography';
|
|
5
6
|
@use '../core/tokens/token-utils';
|
|
6
7
|
@use '../core/tokens/m2/mdc/snack-bar' as tokens-mdc-snack-bar;
|
|
7
8
|
@use '../core/tokens/m2/mat/snack-bar' as tokens-mat-snack-bar;
|
|
8
9
|
|
|
9
|
-
@mixin base($
|
|
10
|
+
@mixin base($theme) {
|
|
10
11
|
// Add default values for tokens not related to color, typography, or density.
|
|
11
12
|
@include sass-utils.current-selector-or-root() {
|
|
12
13
|
@include mdc-snackbar-theme.theme(tokens-mdc-snack-bar.get-unthemable-tokens());
|
|
13
14
|
}
|
|
14
15
|
}
|
|
15
16
|
|
|
16
|
-
@mixin color($
|
|
17
|
-
$config: theming.get-color-config($config-or-theme);
|
|
18
|
-
|
|
17
|
+
@mixin color($theme) {
|
|
19
18
|
@include sass-utils.current-selector-or-root() {
|
|
20
|
-
@include mdc-snackbar-theme.theme(tokens-mdc-snack-bar.get-color-tokens($
|
|
19
|
+
@include mdc-snackbar-theme.theme(tokens-mdc-snack-bar.get-color-tokens($theme));
|
|
21
20
|
@include token-utils.create-token-values(
|
|
22
21
|
tokens-mat-snack-bar.$prefix,
|
|
23
|
-
tokens-mat-snack-bar.get-color-tokens($
|
|
22
|
+
tokens-mat-snack-bar.get-color-tokens($theme)
|
|
24
23
|
);
|
|
25
24
|
}
|
|
26
25
|
}
|
|
27
26
|
|
|
28
|
-
@mixin typography($
|
|
29
|
-
$config: typography.private-typography-to-2018-config(
|
|
30
|
-
theming.get-typography-config($config-or-theme));
|
|
31
|
-
|
|
27
|
+
@mixin typography($theme) {
|
|
32
28
|
@include sass-utils.current-selector-or-root() {
|
|
33
|
-
@include mdc-snackbar-theme.theme(tokens-mdc-snack-bar.get-typography-tokens($
|
|
29
|
+
@include mdc-snackbar-theme.theme(tokens-mdc-snack-bar.get-typography-tokens($theme));
|
|
34
30
|
}
|
|
35
31
|
}
|
|
36
32
|
|
|
37
|
-
@mixin density($
|
|
33
|
+
@mixin density($theme) {}
|
|
38
34
|
|
|
39
|
-
@mixin theme($theme
|
|
40
|
-
$theme: theming.private-legacy-get-theme($theme-or-color-config);
|
|
35
|
+
@mixin theme($theme) {
|
|
41
36
|
@include theming.private-check-duplicate-theme-styles($theme, 'mat-snack-bar') {
|
|
42
|
-
$color: theming.get-color-config($theme);
|
|
43
|
-
$density: theming.get-density-config($theme);
|
|
44
|
-
$typography: theming.get-typography-config($theme);
|
|
45
|
-
|
|
46
37
|
@include base($theme);
|
|
47
|
-
@if $color
|
|
48
|
-
@include color($
|
|
38
|
+
@if inspection.theme-has($theme, color) {
|
|
39
|
+
@include color($theme);
|
|
49
40
|
}
|
|
50
|
-
@if $density
|
|
51
|
-
@include density($
|
|
41
|
+
@if inspection.theme-has($theme, density) {
|
|
42
|
+
@include density($theme);
|
|
52
43
|
}
|
|
53
|
-
@if $typography
|
|
54
|
-
@include typography($
|
|
44
|
+
@if inspection.theme-has($theme, typography) {
|
|
45
|
+
@include typography($theme);
|
|
55
46
|
}
|
|
56
47
|
}
|
|
57
48
|
}
|
package/sort/_sort-theme.scss
CHANGED
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
@use 'sass:color';
|
|
2
|
-
@use 'sass:map';
|
|
3
2
|
@use 'sass:meta';
|
|
4
3
|
@use '../core/theming/theming';
|
|
4
|
+
@use '../core/theming/inspection';
|
|
5
5
|
|
|
6
|
-
@mixin color($
|
|
7
|
-
$config: theming.get-color-config($config-or-theme);
|
|
8
|
-
$background: map.get($config, background);
|
|
9
|
-
$foreground: map.get($config, foreground);
|
|
10
|
-
|
|
6
|
+
@mixin color($theme) {
|
|
11
7
|
.mat-sort-header-arrow {
|
|
12
|
-
$table-background:
|
|
13
|
-
$text-color:
|
|
8
|
+
$table-background: inspection.get-theme-color($theme, background, card);
|
|
9
|
+
$text-color: inspection.get-theme-color($theme, foreground, secondary-text);
|
|
14
10
|
|
|
15
11
|
// Because the arrow is made up of multiple elements that are stacked on top of each other,
|
|
16
12
|
// we can't use the semi-transparent color from the theme directly. If the value is a color
|
|
@@ -28,25 +24,20 @@
|
|
|
28
24
|
}
|
|
29
25
|
}
|
|
30
26
|
|
|
31
|
-
@mixin typography($
|
|
27
|
+
@mixin typography($theme) {}
|
|
32
28
|
|
|
33
|
-
@mixin density($
|
|
29
|
+
@mixin density($theme) {}
|
|
34
30
|
|
|
35
|
-
@mixin theme($theme
|
|
36
|
-
$theme: theming.private-legacy-get-theme($theme-or-color-config);
|
|
31
|
+
@mixin theme($theme) {
|
|
37
32
|
@include theming.private-check-duplicate-theme-styles($theme, 'mat-sort') {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
$typography: theming.get-typography-config($theme);
|
|
41
|
-
|
|
42
|
-
@if $color != null {
|
|
43
|
-
@include color($color);
|
|
33
|
+
@if inspection.theme-has($theme, color) {
|
|
34
|
+
@include color($theme);
|
|
44
35
|
}
|
|
45
|
-
@if $density
|
|
46
|
-
@include density($
|
|
36
|
+
@if inspection.theme-has($theme, density) {
|
|
37
|
+
@include density($theme);
|
|
47
38
|
}
|
|
48
|
-
@if $typography
|
|
49
|
-
@include typography($
|
|
39
|
+
@if inspection.theme-has($theme, typography) {
|
|
40
|
+
@include typography($theme);
|
|
50
41
|
}
|
|
51
42
|
}
|
|
52
43
|
}
|
|
@@ -1,69 +1,51 @@
|
|
|
1
|
-
@use 'sass:map';
|
|
2
|
-
@use 'sass:math';
|
|
3
1
|
@use '../core/theming/theming';
|
|
2
|
+
@use '../core/theming/inspection';
|
|
4
3
|
@use '../core/typography/typography';
|
|
5
|
-
@use '../core/density/private/compatibility';
|
|
6
4
|
@use '../core/style/sass-utils';
|
|
7
5
|
@use '../core/tokens/token-utils';
|
|
8
6
|
@use '../core/tokens/m2/mat/stepper' as tokens-mat-stepper;
|
|
9
|
-
@use './stepper-variables';
|
|
10
|
-
|
|
11
|
-
@mixin color($config-or-theme) {
|
|
12
|
-
$config: theming.get-color-config($config-or-theme);
|
|
13
7
|
|
|
8
|
+
@mixin color($theme) {
|
|
14
9
|
@include sass-utils.current-selector-or-root() {
|
|
15
10
|
@include token-utils.create-token-values(tokens-mat-stepper.$prefix,
|
|
16
|
-
tokens-mat-stepper.get-color-tokens($
|
|
11
|
+
tokens-mat-stepper.get-color-tokens($theme));
|
|
17
12
|
|
|
18
13
|
.mat-step-header.mat-accent {
|
|
19
14
|
@include token-utils.create-token-values(tokens-mat-stepper.$prefix,
|
|
20
|
-
tokens-mat-stepper.private-get-color-palette-color-tokens(
|
|
15
|
+
tokens-mat-stepper.private-get-color-palette-color-tokens($theme, accent));
|
|
21
16
|
}
|
|
22
17
|
|
|
23
18
|
.mat-step-header.mat-warn {
|
|
24
19
|
@include token-utils.create-token-values(tokens-mat-stepper.$prefix,
|
|
25
|
-
tokens-mat-stepper.private-get-color-palette-color-tokens(
|
|
20
|
+
tokens-mat-stepper.private-get-color-palette-color-tokens($theme, warn));
|
|
26
21
|
}
|
|
27
22
|
}
|
|
28
23
|
}
|
|
29
24
|
|
|
30
|
-
@mixin typography($
|
|
31
|
-
$config: typography.private-typography-to-2014-config(
|
|
32
|
-
theming.get-typography-config($config-or-theme));
|
|
33
|
-
|
|
25
|
+
@mixin typography($theme) {
|
|
34
26
|
@include sass-utils.current-selector-or-root() {
|
|
35
27
|
@include token-utils.create-token-values(tokens-mat-stepper.$prefix,
|
|
36
|
-
tokens-mat-stepper.get-typography-tokens($
|
|
28
|
+
tokens-mat-stepper.get-typography-tokens($theme));
|
|
37
29
|
}
|
|
38
30
|
}
|
|
39
31
|
|
|
40
|
-
@mixin density($
|
|
41
|
-
$density-scale: theming.get-density-config($config-or-theme);
|
|
42
|
-
$height: compatibility.private-density-prop-value(stepper-variables.$density-config,
|
|
43
|
-
$density-scale, height);
|
|
44
|
-
$vertical-padding: math.div($height - stepper-variables.$label-header-height, 2);
|
|
45
|
-
|
|
32
|
+
@mixin density($theme) {
|
|
46
33
|
@include sass-utils.current-selector-or-root() {
|
|
47
34
|
@include token-utils.create-token-values(tokens-mat-stepper.$prefix,
|
|
48
|
-
tokens-mat-stepper.get-density-tokens($
|
|
35
|
+
tokens-mat-stepper.get-density-tokens($theme));
|
|
49
36
|
}
|
|
50
37
|
}
|
|
51
38
|
|
|
52
|
-
@mixin theme($theme
|
|
53
|
-
$theme: theming.private-legacy-get-theme($theme-or-color-config);
|
|
39
|
+
@mixin theme($theme) {
|
|
54
40
|
@include theming.private-check-duplicate-theme-styles($theme, 'mat-stepper') {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
$typography: theming.get-typography-config($theme);
|
|
58
|
-
|
|
59
|
-
@if $color != null {
|
|
60
|
-
@include color($color);
|
|
41
|
+
@if inspection.theme-has($theme, color) {
|
|
42
|
+
@include color($theme);
|
|
61
43
|
}
|
|
62
|
-
@if $density
|
|
63
|
-
@include density($
|
|
44
|
+
@if inspection.theme-has($theme, density) {
|
|
45
|
+
@include density($theme);
|
|
64
46
|
}
|
|
65
|
-
@if $typography
|
|
66
|
-
@include typography($
|
|
47
|
+
@if inspection.theme-has($theme, typography) {
|
|
48
|
+
@include typography($theme);
|
|
67
49
|
}
|
|
68
50
|
}
|
|
69
51
|
}
|
package/table/_table-theme.scss
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
@use '../core/tokens/m2/mat/table' as tokens-mat-table;
|
|
2
2
|
@use '../core/theming/theming';
|
|
3
|
+
@use '../core/theming/inspection';
|
|
3
4
|
@use '../core/typography/typography';
|
|
4
5
|
@use '../core/tokens/token-utils';
|
|
5
6
|
|
|
@@ -14,49 +15,37 @@
|
|
|
14
15
|
}
|
|
15
16
|
}
|
|
16
17
|
|
|
17
|
-
@mixin color($
|
|
18
|
-
$config: theming.get-color-config($config-or-theme);
|
|
19
|
-
|
|
18
|
+
@mixin color($theme) {
|
|
20
19
|
@include _output-tokens {
|
|
21
20
|
@include token-utils.create-token-values(tokens-mat-table.$prefix,
|
|
22
|
-
tokens-mat-table.get-color-tokens($
|
|
21
|
+
tokens-mat-table.get-color-tokens($theme));
|
|
23
22
|
}
|
|
24
23
|
}
|
|
25
24
|
|
|
26
|
-
@mixin typography($
|
|
27
|
-
$config: typography.private-typography-to-2018-config(
|
|
28
|
-
theming.get-typography-config($config-or-theme));
|
|
29
|
-
|
|
25
|
+
@mixin typography($theme) {
|
|
30
26
|
@include _output-tokens {
|
|
31
27
|
@include token-utils.create-token-values(tokens-mat-table.$prefix,
|
|
32
|
-
tokens-mat-table.get-typography-tokens($
|
|
28
|
+
tokens-mat-table.get-typography-tokens($theme));
|
|
33
29
|
}
|
|
34
30
|
}
|
|
35
31
|
|
|
36
|
-
@mixin density($
|
|
37
|
-
$density-scale: theming.get-density-config($config-or-theme);
|
|
38
|
-
|
|
32
|
+
@mixin density($theme) {
|
|
39
33
|
@include _output-tokens {
|
|
40
34
|
@include token-utils.create-token-values(tokens-mat-table.$prefix,
|
|
41
|
-
tokens-mat-table.get-density-tokens($
|
|
35
|
+
tokens-mat-table.get-density-tokens($theme));
|
|
42
36
|
}
|
|
43
37
|
}
|
|
44
38
|
|
|
45
|
-
@mixin theme($theme
|
|
46
|
-
$theme: theming.private-legacy-get-theme($theme-or-color-config);
|
|
39
|
+
@mixin theme($theme) {
|
|
47
40
|
@include theming.private-check-duplicate-theme-styles($theme, 'mat-table') {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
$typography: theming.get-typography-config($theme);
|
|
51
|
-
|
|
52
|
-
@if $color != null {
|
|
53
|
-
@include color($color);
|
|
41
|
+
@if inspection.theme-has($theme, color) {
|
|
42
|
+
@include color($theme);
|
|
54
43
|
}
|
|
55
|
-
@if $density
|
|
56
|
-
@include density($
|
|
44
|
+
@if inspection.theme-has($theme, density) {
|
|
45
|
+
@include density($theme);
|
|
57
46
|
}
|
|
58
|
-
@if $typography
|
|
59
|
-
@include typography($
|
|
47
|
+
@if inspection.theme-has($theme, typography) {
|
|
48
|
+
@include typography($theme);
|
|
60
49
|
}
|
|
61
50
|
}
|
|
62
51
|
}
|
package/tabs/_tabs-theme.scss
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
@use 'sass:map';
|
|
2
1
|
@use '@material/tab-indicator/tab-indicator-theme' as mdc-tab-indicator-theme;
|
|
3
2
|
@use '@material/tab/tab-theme' as mdc-tab-theme;
|
|
4
3
|
@use '../core/tokens/m2/mdc/tab' as tokens-mdc-tab;
|
|
@@ -6,99 +5,86 @@
|
|
|
6
5
|
@use '../core/tokens/m2/mat/tab-header' as tokens-mat-tab-header;
|
|
7
6
|
@use '../core/tokens/m2/mat/tab-header-with-background' as tokens-mat-tab-header-with-background;
|
|
8
7
|
@use '../core/theming/theming';
|
|
8
|
+
@use '../core/theming/inspection';
|
|
9
9
|
@use '../core/typography/typography';
|
|
10
10
|
@use '../core/tokens/token-utils';
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
@mixin color($config-or-theme) {
|
|
14
|
-
$config: theming.get-color-config($config-or-theme);
|
|
15
|
-
|
|
12
|
+
@mixin color($theme) {
|
|
16
13
|
.mat-mdc-tab-group, .mat-mdc-tab-nav-bar {
|
|
17
|
-
@include _palette-styles($
|
|
14
|
+
@include _palette-styles($theme, primary);
|
|
18
15
|
|
|
19
16
|
&.mat-accent {
|
|
20
|
-
@include _palette-styles($
|
|
17
|
+
@include _palette-styles($theme, accent);
|
|
21
18
|
}
|
|
22
19
|
|
|
23
20
|
&.mat-warn {
|
|
24
|
-
@include _palette-styles($
|
|
21
|
+
@include _palette-styles($theme, warn);
|
|
25
22
|
}
|
|
26
23
|
|
|
27
24
|
&.mat-background-primary {
|
|
28
|
-
@include _background-styles($
|
|
25
|
+
@include _background-styles($theme, primary);
|
|
29
26
|
}
|
|
30
27
|
|
|
31
28
|
&.mat-background-accent {
|
|
32
|
-
@include _background-styles($
|
|
29
|
+
@include _background-styles($theme, accent);
|
|
33
30
|
}
|
|
34
31
|
|
|
35
32
|
&.mat-background-warn {
|
|
36
|
-
@include _background-styles($
|
|
33
|
+
@include _background-styles($theme, warn);
|
|
37
34
|
}
|
|
38
35
|
}
|
|
39
36
|
}
|
|
40
37
|
|
|
41
|
-
@mixin _background-styles($
|
|
42
|
-
$config: map.merge($initial-config, (primary: map.get($initial-config, $palette)));
|
|
38
|
+
@mixin _background-styles($theme, $palette-name) {
|
|
43
39
|
@include token-utils.create-token-values(tokens-mat-tab-header-with-background.$prefix,
|
|
44
|
-
tokens-mat-tab-header-with-background.get-color-tokens($
|
|
40
|
+
tokens-mat-tab-header-with-background.get-color-tokens($theme, $palette-name));
|
|
45
41
|
}
|
|
46
42
|
|
|
47
|
-
@mixin _palette-styles($
|
|
48
|
-
$config: map.merge($initial-config, (primary: map.get($initial-config, $palette)));
|
|
43
|
+
@mixin _palette-styles($theme, $palette-name) {
|
|
49
44
|
@include mdc-tab-theme.secondary-navigation-tab-theme(
|
|
50
|
-
tokens-mdc-tab.get-color-tokens($
|
|
45
|
+
tokens-mdc-tab.get-color-tokens($theme, $palette-name));
|
|
51
46
|
@include mdc-tab-indicator-theme.theme(
|
|
52
|
-
tokens-mdc-tab-indicator.get-color-tokens($
|
|
47
|
+
tokens-mdc-tab-indicator.get-color-tokens($theme, $palette-name));
|
|
53
48
|
@include token-utils.create-token-values(tokens-mat-tab-header.$prefix,
|
|
54
|
-
tokens-mat-tab-header.get-color-tokens($
|
|
49
|
+
tokens-mat-tab-header.get-color-tokens($theme, $palette-name));
|
|
55
50
|
}
|
|
56
51
|
|
|
57
|
-
@mixin typography($
|
|
58
|
-
$config: typography.private-typography-to-2018-config(
|
|
59
|
-
theming.get-typography-config($config-or-theme));
|
|
60
|
-
|
|
52
|
+
@mixin typography($theme) {
|
|
61
53
|
.mat-mdc-tab-header {
|
|
62
54
|
@include mdc-tab-theme.secondary-navigation-tab-theme(
|
|
63
|
-
tokens-mdc-tab.get-typography-tokens($
|
|
55
|
+
tokens-mdc-tab.get-typography-tokens($theme));
|
|
64
56
|
@include mdc-tab-indicator-theme.theme(
|
|
65
|
-
tokens-mdc-tab-indicator.get-typography-tokens($
|
|
57
|
+
tokens-mdc-tab-indicator.get-typography-tokens($theme));
|
|
66
58
|
@include token-utils.create-token-values(tokens-mat-tab-header.$prefix,
|
|
67
|
-
tokens-mat-tab-header.get-typography-tokens($
|
|
59
|
+
tokens-mat-tab-header.get-typography-tokens($theme));
|
|
68
60
|
@include token-utils.create-token-values(tokens-mat-tab-header-with-background.$prefix,
|
|
69
|
-
tokens-mat-tab-header-with-background.get-typography-tokens($
|
|
61
|
+
tokens-mat-tab-header-with-background.get-typography-tokens($theme));
|
|
70
62
|
}
|
|
71
63
|
}
|
|
72
64
|
|
|
73
|
-
@mixin density($
|
|
74
|
-
$density-scale: theming.get-density-config($config-or-theme);
|
|
65
|
+
@mixin density($theme) {
|
|
75
66
|
.mat-mdc-tab-header {
|
|
76
67
|
@include mdc-tab-theme.secondary-navigation-tab-theme(
|
|
77
|
-
tokens-mdc-tab.get-density-tokens($
|
|
68
|
+
tokens-mdc-tab.get-density-tokens($theme));
|
|
78
69
|
@include mdc-tab-indicator-theme.theme(
|
|
79
|
-
tokens-mdc-tab-indicator.get-density-tokens($
|
|
70
|
+
tokens-mdc-tab-indicator.get-density-tokens($theme));
|
|
80
71
|
@include token-utils.create-token-values(tokens-mat-tab-header.$prefix,
|
|
81
|
-
tokens-mat-tab-header.get-density-tokens($
|
|
72
|
+
tokens-mat-tab-header.get-density-tokens($theme));
|
|
82
73
|
@include token-utils.create-token-values(tokens-mat-tab-header-with-background.$prefix,
|
|
83
|
-
tokens-mat-tab-header-with-background.get-density-tokens($
|
|
74
|
+
tokens-mat-tab-header-with-background.get-density-tokens($theme));
|
|
84
75
|
}
|
|
85
76
|
}
|
|
86
77
|
|
|
87
|
-
@mixin theme($theme
|
|
88
|
-
$theme: theming.private-legacy-get-theme($theme-or-color-config);
|
|
78
|
+
@mixin theme($theme) {
|
|
89
79
|
@include theming.private-check-duplicate-theme-styles($theme, 'mat-tabs') {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
$typography: theming.get-typography-config($theme);
|
|
93
|
-
|
|
94
|
-
@if $color != null {
|
|
95
|
-
@include color($color);
|
|
80
|
+
@if inspection.theme-has($theme, color) {
|
|
81
|
+
@include color($theme);
|
|
96
82
|
}
|
|
97
|
-
@if $density
|
|
98
|
-
@include density($
|
|
83
|
+
@if inspection.theme-has($theme, density) {
|
|
84
|
+
@include density($theme);
|
|
99
85
|
}
|
|
100
|
-
@if $typography
|
|
101
|
-
@include typography($
|
|
86
|
+
@if inspection.theme-has($theme, typography) {
|
|
87
|
+
@include typography($theme);
|
|
102
88
|
}
|
|
103
89
|
}
|
|
104
90
|
}
|