@angular/material 16.2.0-next.2 → 16.2.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/core/tokens/_token-utils.scss +13 -0
- package/core/tokens/m2/mat/_menu.scss +62 -0
- package/core/tokens/m2/mat/_stepper.scss +118 -0
- package/core/typography/_typography-utils.scss +13 -0
- package/esm2022/button-toggle/button-toggle.mjs +2 -1
- package/esm2022/chips/chip-set.mjs +2 -2
- package/esm2022/core/version.mjs +1 -1
- package/esm2022/menu/menu-item.mjs +4 -4
- package/esm2022/menu/menu.mjs +3 -3
- package/esm2022/sidenav/drawer.mjs +15 -13
- package/esm2022/stepper/step-header.mjs +2 -2
- package/esm2022/stepper/stepper.mjs +3 -3
- package/fesm2022/button-toggle.mjs +1 -0
- package/fesm2022/button-toggle.mjs.map +1 -1
- package/fesm2022/chips.mjs +1 -1
- package/fesm2022/chips.mjs.map +1 -1
- package/fesm2022/core.mjs +1 -1
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/menu.mjs +5 -5
- package/fesm2022/menu.mjs.map +1 -1
- package/fesm2022/sidenav.mjs +14 -12
- package/fesm2022/sidenav.mjs.map +1 -1
- package/fesm2022/stepper.mjs +4 -4
- package/fesm2022/stepper.mjs.map +1 -1
- package/legacy-prebuilt-themes/legacy-deeppurple-amber.css +1 -1
- package/legacy-prebuilt-themes/legacy-indigo-pink.css +1 -1
- package/legacy-prebuilt-themes/legacy-pink-bluegrey.css +1 -1
- package/legacy-prebuilt-themes/legacy-purple-green.css +1 -1
- package/menu/_menu-theme.scss +9 -52
- package/menu/index.d.ts +1 -1
- 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/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/schematics/ng-generate/table/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html.template +1 -1
- package/schematics/ng-generate/table/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.ts.template +1 -5
- package/sidenav/index.d.ts +1 -1
- package/stepper/_stepper-theme.scss +18 -147
|
@@ -23,15 +23,11 @@ export class <%= classify(name) %>Component implements AfterViewInit {
|
|
|
23
23
|
@ViewChild(MatPaginator) paginator!: MatPaginator;
|
|
24
24
|
@ViewChild(MatSort) sort!: MatSort;
|
|
25
25
|
@ViewChild(MatTable) table!: MatTable<<%= classify(name) %>Item>;
|
|
26
|
-
dataSource
|
|
26
|
+
dataSource = new <%= classify(name) %>DataSource();
|
|
27
27
|
|
|
28
28
|
/** Columns displayed in the table. Columns IDs can be added, removed, or reordered. */
|
|
29
29
|
displayedColumns = ['id', 'name'];
|
|
30
30
|
|
|
31
|
-
constructor() {
|
|
32
|
-
this.dataSource = new <%= classify(name) %>DataSource();
|
|
33
|
-
}
|
|
34
|
-
|
|
35
31
|
ngAfterViewInit(): void {
|
|
36
32
|
this.dataSource.sort = this.sort;
|
|
37
33
|
this.dataSource.paginator = this.paginator;
|
package/sidenav/index.d.ts
CHANGED
|
@@ -326,8 +326,8 @@ export declare class MatDrawerContainer implements AfterContentInit, DoCheck, On
|
|
|
326
326
|
_onBackdropClicked(): void;
|
|
327
327
|
_closeModalDrawersViaBackdrop(): void;
|
|
328
328
|
_isShowingBackdrop(): boolean;
|
|
329
|
-
private _canHaveBackdrop;
|
|
330
329
|
private _isDrawerOpen;
|
|
330
|
+
private _drawerHasBackdrop;
|
|
331
331
|
static ɵfac: i0.ɵɵFactoryDeclaration<MatDrawerContainer, [{ optional: true; }, null, null, null, null, null, { optional: true; }]>;
|
|
332
332
|
static ɵcmp: i0.ɵɵComponentDeclaration<MatDrawerContainer, "mat-drawer-container", ["matDrawerContainer"], { "autosize": { "alias": "autosize"; "required": false; }; "hasBackdrop": { "alias": "hasBackdrop"; "required": false; }; }, { "backdropClick": "backdropClick"; }, ["_content", "_allDrawers"], ["mat-drawer", "mat-drawer-content", "*"], false, never>;
|
|
333
333
|
}
|
|
@@ -2,142 +2,38 @@
|
|
|
2
2
|
@use 'sass:math';
|
|
3
3
|
@use '../core/theming/theming';
|
|
4
4
|
@use '../core/typography/typography';
|
|
5
|
-
@use '../core/typography/typography-utils';
|
|
6
5
|
@use '../core/density/private/compatibility';
|
|
6
|
+
@use '../core/style/sass-utils';
|
|
7
|
+
@use '../core/tokens/token-utils';
|
|
8
|
+
@use '../core/tokens/m2/mat/stepper' as tokens-mat-stepper;
|
|
7
9
|
@use './stepper-variables';
|
|
8
10
|
|
|
9
11
|
@mixin color($config-or-theme) {
|
|
10
12
|
$config: theming.get-color-config($config-or-theme);
|
|
11
|
-
$foreground: map.get($config, foreground);
|
|
12
|
-
$background: map.get($config, background);
|
|
13
|
-
$primary: map.get($config, primary);
|
|
14
|
-
$accent: map.get($config, accent);
|
|
15
|
-
$warn: map.get($config, warn);
|
|
16
13
|
|
|
17
|
-
.
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
&:hover:not([aria-disabled]),
|
|
21
|
-
&:hover[aria-disabled='false'] {
|
|
22
|
-
background-color: theming.get-color-from-palette($background, hover);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
&:hover[aria-disabled='true'] {
|
|
26
|
-
cursor: default;
|
|
27
|
-
}
|
|
14
|
+
@include sass-utils.current-selector-or-root() {
|
|
15
|
+
@include token-utils.create-token-values(tokens-mat-stepper.$prefix,
|
|
16
|
+
tokens-mat-stepper.get-color-tokens($config));
|
|
28
17
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
@media (hover: none) {
|
|
33
|
-
&:hover {
|
|
34
|
-
background: none;
|
|
35
|
-
}
|
|
18
|
+
.mat-step-header.mat-accent {
|
|
19
|
+
@include token-utils.create-token-values(tokens-mat-stepper.$prefix,
|
|
20
|
+
tokens-mat-stepper.private-get-color-palette-color-tokens(map.get($config, accent)));
|
|
36
21
|
}
|
|
37
22
|
|
|
38
|
-
.mat-step-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
// instead of secondary-text.
|
|
42
|
-
color: theming.get-color-from-palette($foreground, secondary-text);
|
|
23
|
+
.mat-step-header.mat-warn {
|
|
24
|
+
@include token-utils.create-token-values(tokens-mat-stepper.$prefix,
|
|
25
|
+
tokens-mat-stepper.private-get-color-palette-color-tokens(map.get($config, warn)));
|
|
43
26
|
}
|
|
44
|
-
|
|
45
|
-
.mat-step-icon {
|
|
46
|
-
// TODO(josephperrott): Update to using a corrected disabled-text contrast
|
|
47
|
-
// instead of secondary-text.
|
|
48
|
-
background-color: theming.get-color-from-palette($foreground, secondary-text);
|
|
49
|
-
color: theming.get-color-from-palette($primary, default-contrast);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.mat-step-icon-selected,
|
|
53
|
-
.mat-step-icon-state-done,
|
|
54
|
-
.mat-step-icon-state-edit {
|
|
55
|
-
background-color: theming.get-color-from-palette($primary);
|
|
56
|
-
color: theming.get-color-from-palette($primary, default-contrast);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
&.mat-accent {
|
|
60
|
-
.mat-step-icon {
|
|
61
|
-
color: theming.get-color-from-palette($accent, default-contrast);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.mat-step-icon-selected,
|
|
65
|
-
.mat-step-icon-state-done,
|
|
66
|
-
.mat-step-icon-state-edit {
|
|
67
|
-
background-color: theming.get-color-from-palette($accent);
|
|
68
|
-
color: theming.get-color-from-palette($accent, default-contrast);
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
&.mat-warn {
|
|
73
|
-
.mat-step-icon {
|
|
74
|
-
color: theming.get-color-from-palette($warn, default-contrast);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
.mat-step-icon-selected,
|
|
78
|
-
.mat-step-icon-state-done,
|
|
79
|
-
.mat-step-icon-state-edit {
|
|
80
|
-
background-color: theming.get-color-from-palette($warn);
|
|
81
|
-
color: theming.get-color-from-palette($warn, default-contrast);
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
.mat-step-icon-state-error {
|
|
86
|
-
background-color: transparent;
|
|
87
|
-
color: theming.get-color-from-palette($warn, text);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.mat-step-label.mat-step-label-active {
|
|
91
|
-
color: theming.get-color-from-palette($foreground, text);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
.mat-step-label.mat-step-label-error {
|
|
95
|
-
color: theming.get-color-from-palette($warn, text);
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
.mat-stepper-horizontal, .mat-stepper-vertical {
|
|
100
|
-
background-color: theming.get-color-from-palette($background, card);
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
.mat-stepper-vertical-line::before {
|
|
104
|
-
border-left-color: theming.get-color-from-palette($foreground, divider);
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
.mat-horizontal-stepper-header::before,
|
|
108
|
-
.mat-horizontal-stepper-header::after,
|
|
109
|
-
.mat-stepper-horizontal-line {
|
|
110
|
-
border-top-color: theming.get-color-from-palette($foreground, divider);
|
|
111
27
|
}
|
|
112
28
|
}
|
|
113
29
|
|
|
114
30
|
@mixin typography($config-or-theme) {
|
|
115
31
|
$config: typography.private-typography-to-2014-config(
|
|
116
32
|
theming.get-typography-config($config-or-theme));
|
|
117
|
-
.mat-stepper-vertical, .mat-stepper-horizontal {
|
|
118
|
-
font-family: typography-utils.font-family($config);
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
.mat-step-label {
|
|
122
|
-
font: {
|
|
123
|
-
size: typography-utils.font-size($config, body-1);
|
|
124
|
-
weight: typography-utils.font-weight($config, body-1);
|
|
125
|
-
};
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
.mat-step-sub-label-error {
|
|
129
|
-
font-weight: normal;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
.mat-step-label-error {
|
|
133
|
-
font-size: typography-utils.font-size($config, body-2);
|
|
134
|
-
}
|
|
135
33
|
|
|
136
|
-
.
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
weight: typography-utils.font-weight($config, body-2);
|
|
140
|
-
};
|
|
34
|
+
@include sass-utils.current-selector-or-root() {
|
|
35
|
+
@include token-utils.create-token-values(tokens-mat-stepper.$prefix,
|
|
36
|
+
tokens-mat-stepper.get-typography-tokens($config));
|
|
141
37
|
}
|
|
142
38
|
}
|
|
143
39
|
|
|
@@ -147,34 +43,9 @@
|
|
|
147
43
|
$density-scale, height);
|
|
148
44
|
$vertical-padding: math.div($height - stepper-variables.$label-header-height, 2);
|
|
149
45
|
|
|
150
|
-
@include
|
|
151
|
-
.mat-
|
|
152
|
-
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
.mat-stepper-label-position-bottom .mat-horizontal-stepper-header,
|
|
156
|
-
.mat-vertical-stepper-header {
|
|
157
|
-
padding: $vertical-padding stepper-variables.$side-gap;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
// Ensures that the vertical lines for the step content exceed into the step
|
|
161
|
-
// headers with a given distance (`$mat-stepper-line-gap`) to the step icon.
|
|
162
|
-
.mat-stepper-vertical-line::before {
|
|
163
|
-
top: stepper-variables.$line-gap - $vertical-padding;
|
|
164
|
-
bottom: stepper-variables.$line-gap - $vertical-padding;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
// Ensures that the horizontal lines for the step header are centered vertically.
|
|
168
|
-
.mat-stepper-label-position-bottom .mat-horizontal-stepper-header {
|
|
169
|
-
&::after, &::before {
|
|
170
|
-
top: $vertical-padding + math.div(stepper-variables.$label-header-height, 2);
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
// Ensures that the horizontal line for the step content is aligned centered vertically.
|
|
175
|
-
.mat-stepper-label-position-bottom .mat-stepper-horizontal-line {
|
|
176
|
-
top: $vertical-padding + math.div(stepper-variables.$label-header-height, 2);
|
|
177
|
-
}
|
|
46
|
+
@include sass-utils.current-selector-or-root() {
|
|
47
|
+
@include token-utils.create-token-values(tokens-mat-stepper.$prefix,
|
|
48
|
+
tokens-mat-stepper.get-density-tokens($density-scale));
|
|
178
49
|
}
|
|
179
50
|
}
|
|
180
51
|
|