@angular/material-experimental 17.1.0-next.0 → 17.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/column-resize/index.d.ts +15 -15
- package/esm2022/column-resize/column-resize-directives/column-resize-flex.mjs +5 -4
- package/esm2022/column-resize/column-resize-directives/column-resize.mjs +5 -4
- package/esm2022/column-resize/column-resize-directives/default-enabled-column-resize-flex.mjs +5 -4
- package/esm2022/column-resize/column-resize-directives/default-enabled-column-resize.mjs +5 -4
- package/esm2022/column-resize/column-resize-module.mjs +18 -19
- package/esm2022/column-resize/overlay-handle.mjs +5 -4
- package/esm2022/column-resize/resizable-directives/default-enabled-resizable.mjs +5 -4
- package/esm2022/column-resize/resizable-directives/resizable.mjs +5 -4
- package/esm2022/column-resize/resize-strategy.mjs +4 -4
- package/esm2022/menubar/menubar-item.mjs +5 -5
- package/esm2022/menubar/menubar-module.mjs +6 -7
- package/esm2022/menubar/menubar.mjs +5 -5
- package/esm2022/popover-edit/lens-directives.mjs +16 -11
- package/esm2022/popover-edit/popover-edit-module.mjs +14 -10
- package/esm2022/popover-edit/table-directives.mjs +17 -13
- package/esm2022/selection/row-selection.mjs +5 -4
- package/esm2022/selection/select-all.mjs +5 -4
- package/esm2022/selection/selection-column.mjs +23 -13
- package/esm2022/selection/selection-module.mjs +17 -9
- package/esm2022/selection/selection-toggle.mjs +5 -4
- package/esm2022/selection/selection.mjs +5 -4
- package/esm2022/version.mjs +1 -1
- package/fesm2022/column-resize.mjs +48 -42
- package/fesm2022/column-resize.mjs.map +1 -1
- package/fesm2022/material-experimental.mjs +1 -1
- package/fesm2022/material-experimental.mjs.map +1 -1
- package/fesm2022/menubar.mjs +13 -14
- package/fesm2022/menubar.mjs.map +1 -1
- package/fesm2022/popover-edit.mjs +44 -31
- package/fesm2022/popover-edit.mjs.map +1 -1
- package/fesm2022/selection.mjs +50 -30
- package/fesm2022/selection.mjs.map +1 -1
- package/menubar/index.d.ts +6 -6
- package/package.json +3 -3
- package/popover-edit/index.d.ts +12 -12
- package/selection/index.d.ts +14 -14
- package/theming/_custom-tokens.scss +419 -21
- package/theming/_m3-density.scss +45 -13
- package/theming/_m3-palettes.scss +45 -16
- package/theming/_m3-tokens.scss +133 -27
|
@@ -21,6 +21,84 @@
|
|
|
21
21
|
@return $result;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
+
/// Generates custom tokens for the mat-autocomplete.
|
|
25
|
+
/// @param {Map} $systems The MDC system tokens
|
|
26
|
+
/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
|
|
27
|
+
/// @return {Map} A set of custom tokens for the mat-autocomplete
|
|
28
|
+
@function autocomplete($systems, $exclude-hardcoded) {
|
|
29
|
+
@return (
|
|
30
|
+
background-color: map.get($systems, md-sys-color, surface-container),
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/// Generates custom tokens for the mat-badge.
|
|
35
|
+
/// @param {Map} $systems The MDC system tokens
|
|
36
|
+
/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
|
|
37
|
+
/// @return {Map} A set of custom tokens for the mat-badge
|
|
38
|
+
@function badge($systems, $exclude-hardcoded) {
|
|
39
|
+
@return (
|
|
40
|
+
background-color: map.get($systems, md-sys-color, error),
|
|
41
|
+
text-color: map.get($systems, md-sys-color, on-error),
|
|
42
|
+
disabled-state-background-color: mat.private-safe-color-change(
|
|
43
|
+
map.get($systems, md-sys-color, error),
|
|
44
|
+
$alpha: 0.38,
|
|
45
|
+
),
|
|
46
|
+
disabled-state-text-color: map.get($systems, md-sys-color, on-error),
|
|
47
|
+
text-font: map.get($systems, md-sys-typescale, label-small-font),
|
|
48
|
+
text-size: map.get($systems, md-sys-typescale, label-small-size),
|
|
49
|
+
text-weight: map.get($systems, md-sys-typescale, label-small-weight),
|
|
50
|
+
small-size-text-size: _hardcode(0, $exclude-hardcoded),
|
|
51
|
+
large-size-text-size: map.get($systems, md-sys-typescale, label-small-size),
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/// Generates custom tokens for the mat-bottom-sheet.
|
|
56
|
+
/// @param {Map} $systems The MDC system tokens
|
|
57
|
+
/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
|
|
58
|
+
/// @return {Map} A set of custom tokens for the mat-bottom-sheet
|
|
59
|
+
@function bottom-sheet($systems, $exclude-hardcoded) {
|
|
60
|
+
@return mat.private-merge-all(
|
|
61
|
+
_generate-typography-tokens($systems, container-text, body-large),
|
|
62
|
+
(
|
|
63
|
+
container-shape: _hardcode(28px, $exclude-hardcoded),
|
|
64
|
+
container-text-color: map.get($systems, md-sys-color, on-surface),
|
|
65
|
+
container-background-color: map.get($systems, md-sys-color, surface-container-low),
|
|
66
|
+
),
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/// Generates custom tokens for the mat-button-toggle.
|
|
71
|
+
/// @param {Map} $systems The MDC system tokens
|
|
72
|
+
/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
|
|
73
|
+
/// @return {Map} A set of custom tokens for the mat-button-toggle
|
|
74
|
+
@function button-toggle($systems, $exclude-hardcoded) {
|
|
75
|
+
@return (
|
|
76
|
+
shape: _hardcode(9999px, $exclude-hardcoded),
|
|
77
|
+
hover-state-layer-opacity: map.get($systems, md-sys-state, hover-state-layer-opacity),
|
|
78
|
+
focus-state-layer-opacity: map.get($systems, md-sys-state, focus-state-layer-opacity),
|
|
79
|
+
text-color: map.get($systems, md-sys-color, on-surface),
|
|
80
|
+
background-color: _hardcode(transparent, $exclude-hardcoded),
|
|
81
|
+
state-layer-color: map.get($systems, md-sys-color, on-surface),
|
|
82
|
+
selected-state-background-color: map.get($systems, md-sys-color, secondary-container),
|
|
83
|
+
selected-state-text-color: map.get($systems, md-sys-color, on-secondary-container),
|
|
84
|
+
disabled-state-text-color: mat.private-safe-color-change(
|
|
85
|
+
map.get($systems, md-sys-color, on-surface),
|
|
86
|
+
$alpha: 0.38,
|
|
87
|
+
),
|
|
88
|
+
disabled-state-background-color: _hardcode(transparent, $exclude-hardcoded),
|
|
89
|
+
disabled-selected-state-text-color: mat.private-safe-color-change(
|
|
90
|
+
map.get($systems, md-sys-color, on-surface),
|
|
91
|
+
$alpha: 0.38,
|
|
92
|
+
),
|
|
93
|
+
disabled-selected-state-background-color: mat.private-safe-color-change(
|
|
94
|
+
map.get($systems, md-sys-color, on-surface),
|
|
95
|
+
$alpha: 0.12,
|
|
96
|
+
),
|
|
97
|
+
divider-color: map.get($systems, md-sys-color, outline),
|
|
98
|
+
text-font: map.get($systems, md-sys-typescale, label-large-font),
|
|
99
|
+
);
|
|
100
|
+
}
|
|
101
|
+
|
|
24
102
|
/// Generates custom tokens for the mat-card.
|
|
25
103
|
/// @param {Map} $systems The MDC system tokens
|
|
26
104
|
/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
|
|
@@ -35,6 +113,182 @@
|
|
|
35
113
|
);
|
|
36
114
|
}
|
|
37
115
|
|
|
116
|
+
/// Generates custom tokens for the mdc-chip. (MDC has a chip component, but they
|
|
117
|
+
/// seem to have made up the tokens rather than using ones generated from the token database,
|
|
118
|
+
/// therefore we need a custom token function for it).
|
|
119
|
+
/// @param {Map} $systems The MDC system tokens
|
|
120
|
+
/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
|
|
121
|
+
/// @return {Map} A set of custom tokens for the mdc-chip
|
|
122
|
+
@function chip($systems, $exclude-hardcoded) {
|
|
123
|
+
@return mat.private-merge-all(
|
|
124
|
+
_generate-typography-tokens($systems, label-text, label-large),
|
|
125
|
+
(
|
|
126
|
+
container-shape: _hardcode((
|
|
127
|
+
family: rounded,
|
|
128
|
+
radius: 8px,
|
|
129
|
+
), $exclude-hardcoded),
|
|
130
|
+
with-avatar-avatar-size: _hardcode(24px, $exclude-hardcoded),
|
|
131
|
+
elevated-container-color: map.get($systems, md-sys-color, surface-container-low),
|
|
132
|
+
elevated-disabled-container-color: mat.private-safe-color-change(
|
|
133
|
+
map.get($systems, md-sys-color, on-surface),
|
|
134
|
+
$alpha: 0.12,
|
|
135
|
+
),
|
|
136
|
+
label-text-color: map.get($systems, md-sys-color, on-surface-variant),
|
|
137
|
+
disabled-label-text-color: mat.private-safe-color-change(
|
|
138
|
+
map.get($systems, md-sys-color, on-surface),
|
|
139
|
+
$alpha: 0.38,
|
|
140
|
+
),
|
|
141
|
+
with-icon-icon-size: _hardcode(18px, $exclude-hardcoded),
|
|
142
|
+
with-icon-icon-color: map.get($systems, md-sys-color, on-surface-variant),
|
|
143
|
+
with-icon-disabled-icon-color: mat.private-safe-color-change(
|
|
144
|
+
map.get($systems, md-sys-color, on-surface),
|
|
145
|
+
$alpha: 0.38,
|
|
146
|
+
),
|
|
147
|
+
with-icon-selected-icon-color: map.get($systems, md-sys-color, on-secondary-container),
|
|
148
|
+
with-trailing-icon-trailing-icon-color: map.get($systems, md-sys-color, on-surface-variant),
|
|
149
|
+
with-trailing-icon-disabled-trailing-icon-color: mat.private-safe-color-change(
|
|
150
|
+
map.get($systems, md-sys-color, on-surface),
|
|
151
|
+
$alpha: 0.38,
|
|
152
|
+
),
|
|
153
|
+
focus-state-layer-opacity: map.get($systems, md-sys-state, focus-state-layer-opacity),
|
|
154
|
+
focus-state-layer-color: map.get($systems, md-sys-color, on-surface-variant),
|
|
155
|
+
),
|
|
156
|
+
);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/// Generates custom tokens for the mat-datepicker.
|
|
160
|
+
/// @param {Map} $systems The MDC system tokens
|
|
161
|
+
/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
|
|
162
|
+
/// @return {Map} A set of custom tokens for the mat-datepicker
|
|
163
|
+
@function datepicker($systems, $exclude-hardcoded) {
|
|
164
|
+
@return (
|
|
165
|
+
calendar-date-in-range-state-background-color:
|
|
166
|
+
map.get($systems, md-sys-color, primary-container),
|
|
167
|
+
calendar-date-in-comparison-range-state-background-color:
|
|
168
|
+
map.get($systems, md-sys-color, secondary-container),
|
|
169
|
+
calendar-date-in-overlap-range-state-background-color:
|
|
170
|
+
map.get($systems, md-sys-color, tertiary-container),
|
|
171
|
+
calendar-date-in-overlap-range-selected-state-background-color:
|
|
172
|
+
map.get($systems, md-sys-color, tertiary),
|
|
173
|
+
calendar-date-selected-state-text-color: map.get($systems, md-sys-color, on-primary),
|
|
174
|
+
calendar-date-selected-state-background-color: map.get($systems, md-sys-color, primary),
|
|
175
|
+
calendar-date-selected-disabled-state-background-color: mat.private-safe-color-change(
|
|
176
|
+
map.get($systems, md-sys-color, on-surface),
|
|
177
|
+
$alpha: 0.38
|
|
178
|
+
),
|
|
179
|
+
calendar-date-today-selected-state-outline-color: map.get($systems, md-sys-color, primary),
|
|
180
|
+
calendar-date-focus-state-background-color: mat.private-safe-color-change(
|
|
181
|
+
map.get($systems, md-sys-color, on-surface),
|
|
182
|
+
$alpha: map.get($systems, md-sys-state, focus-state-layer-opacity)
|
|
183
|
+
),
|
|
184
|
+
calendar-date-hover-state-background-color: mat.private-safe-color-change(
|
|
185
|
+
map.get($systems, md-sys-color, on-surface),
|
|
186
|
+
$alpha: map.get($systems, md-sys-state, hover-state-layer-opacity)
|
|
187
|
+
),
|
|
188
|
+
toggle-active-state-icon-color: map.get($systems, md-sys-color, on-surface-variant),
|
|
189
|
+
toggle-icon-color: map.get($systems, md-sys-color, on-surface-variant),
|
|
190
|
+
calendar-body-label-text-color: map.get($systems, md-sys-color, on-surface),
|
|
191
|
+
calendar-period-button-icon-color: map.get($systems, md-sys-color, on-surface-variant),
|
|
192
|
+
calendar-navigation-button-icon-color: map.get($systems, md-sys-color, on-surface-variant),
|
|
193
|
+
calendar-header-divider-color: map.get($systems, md-sys-color, outline-variant),
|
|
194
|
+
calendar-header-text-color: map.get($systems, md-sys-color, on-surface-variant),
|
|
195
|
+
calendar-date-today-outline-color: map.get($systems, md-sys-color, primary),
|
|
196
|
+
calendar-date-today-disabled-state-outline-color: mat.private-safe-color-change(
|
|
197
|
+
map.get($systems, md-sys-color, on-surface),
|
|
198
|
+
$alpha: 0.38
|
|
199
|
+
),
|
|
200
|
+
calendar-date-text-color: map.get($systems, md-sys-color, on-surface),
|
|
201
|
+
calendar-date-outline-color: _hardcode(transparent, $exclude-hardcoded),
|
|
202
|
+
calendar-date-disabled-state-text-color: mat.private-safe-color-change(
|
|
203
|
+
map.get($systems, md-sys-color, on-surface),
|
|
204
|
+
$alpha: 0.38
|
|
205
|
+
),
|
|
206
|
+
calendar-date-preview-state-outline-color: map.get($systems, md-sys-color, primary),
|
|
207
|
+
range-input-separator-color: map.get($systems, md-sys-color, on-surface),
|
|
208
|
+
range-input-disabled-state-separator-color: mat.private-safe-color-change(
|
|
209
|
+
map.get($systems, md-sys-color, on-surface),
|
|
210
|
+
$alpha: 0.38
|
|
211
|
+
),
|
|
212
|
+
range-input-disabled-state-text-color: mat.private-safe-color-change(
|
|
213
|
+
map.get($systems, md-sys-color, on-surface),
|
|
214
|
+
$alpha: 0.38
|
|
215
|
+
),
|
|
216
|
+
calendar-container-background-color: map.get($systems, md-sys-color, surface-container-high),
|
|
217
|
+
calendar-container-text-color: map.get($systems, md-sys-color, on-surface),
|
|
218
|
+
calendar-text-font: map.get($systems, md-sys-typescale, body-large-font),
|
|
219
|
+
calendar-text-size: map.get($systems, md-sys-typescale, body-large-size),
|
|
220
|
+
calendar-body-label-text-size: map.get($systems, md-sys-typescale, title-small-size),
|
|
221
|
+
calendar-body-label-text-weight: map.get($systems, md-sys-typescale, title-small-weight),
|
|
222
|
+
calendar-period-button-text-size: map.get($systems, md-sys-typescale, title-small-size),
|
|
223
|
+
calendar-period-button-text-weight: map.get($systems, md-sys-typescale, title-small-weight),
|
|
224
|
+
calendar-header-text-size: map.get($systems, md-sys-typescale, title-small-size),
|
|
225
|
+
calendar-header-text-weight: map.get($systems, md-sys-typescale, title-small-weight),
|
|
226
|
+
);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
/// Generates custom tokens for the mat-divider.
|
|
230
|
+
/// @param {Map} $systems The MDC system tokens
|
|
231
|
+
/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
|
|
232
|
+
/// @return {Map} A set of custom tokens for the mat-divider
|
|
233
|
+
@function divider($systems, $exclude-hardcoded) {
|
|
234
|
+
@return (
|
|
235
|
+
width: _hardcode(1px, $exclude-hardcoded),
|
|
236
|
+
color: map.get($systems, md-sys-color, outline-variant),
|
|
237
|
+
);
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
/// Generates custom tokens for the mat-expansion.
|
|
241
|
+
/// @param {Map} $systems The MDC system tokens
|
|
242
|
+
/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
|
|
243
|
+
/// @return {Map} A set of custom tokens for the mat-expansion
|
|
244
|
+
@function expansion($systems, $exclude-hardcoded) {
|
|
245
|
+
@return mat.private-merge-all(
|
|
246
|
+
_generate-typography-tokens($systems, header-text, title-medium),
|
|
247
|
+
_generate-typography-tokens($systems, container-text, body-large),
|
|
248
|
+
(
|
|
249
|
+
container-shape: _hardcode(12px, $exclude-hardcoded),
|
|
250
|
+
container-background-color: map.get($systems, md-sys-color, surface),
|
|
251
|
+
container-text-color: map.get($systems, md-sys-color, on-surface),
|
|
252
|
+
actions-divider-color: map.get($systems, md-sys-color, outline-variant),
|
|
253
|
+
header-hover-state-layer-color: mat.private-safe-color-change(
|
|
254
|
+
map.get($systems, md-sys-color, on-surface),
|
|
255
|
+
$alpha: map.get($systems, md-sys-state, hover-state-layer-opacity)
|
|
256
|
+
),
|
|
257
|
+
header-focus-state-layer-color: mat.private-safe-color-change(
|
|
258
|
+
map.get($systems, md-sys-color, on-surface),
|
|
259
|
+
$alpha: map.get($systems, md-sys-state, focus-state-layer-opacity)
|
|
260
|
+
),
|
|
261
|
+
header-disabled-state-text-color: mat.private-safe-color-change(
|
|
262
|
+
map.get($systems, md-sys-color, on-surface), $alpha: 0.38),
|
|
263
|
+
header-text-color: map.get($systems, md-sys-color, on-surface),
|
|
264
|
+
header-description-color: map.get($systems, md-sys-color, on-surface-variant),
|
|
265
|
+
header-indicator-color: map.get($systems, md-sys-color, on-surface-variant),
|
|
266
|
+
)
|
|
267
|
+
);
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
/// Generates custom tokens for the mat-fab.
|
|
271
|
+
/// @param {Map} $systems The MDC system tokens
|
|
272
|
+
/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
|
|
273
|
+
/// @return {Map} A set of custom tokens for the mat-fab
|
|
274
|
+
@function fab($systems, $exclude-hardcoded) {
|
|
275
|
+
@return (
|
|
276
|
+
foreground-color: map.get($systems, md-sys-color, on-primary-container),
|
|
277
|
+
state-layer-color: map.get($systems, md-sys-color, primary-container),
|
|
278
|
+
ripple-color: mat.private-safe-color-change(
|
|
279
|
+
map.get($systems, md-sys-color, on-primary-container),
|
|
280
|
+
$alpha: map.get($systems, md-sys-state, pressed-state-layer-opacity)
|
|
281
|
+
),
|
|
282
|
+
hover-state-layer-opacity: map.get($systems, md-sys-state, hover-state-layer-opacity),
|
|
283
|
+
focus-state-layer-opacity: map.get($systems, md-sys-state, focus-state-layer-opacity),
|
|
284
|
+
pressed-state-layer-opacity: map.get($systems, md-sys-state, pressed-state-layer-opacity),
|
|
285
|
+
disabled-state-container-color: mat.private-safe-color-change(
|
|
286
|
+
map.get($systems, md-sys-color, on-surface), $alpha: 0.12),
|
|
287
|
+
disabled-state-foreground-color: mat.private-safe-color-change(
|
|
288
|
+
map.get($systems, md-sys-color, on-surface), $alpha: 0.38),
|
|
289
|
+
);
|
|
290
|
+
}
|
|
291
|
+
|
|
38
292
|
/// Generates custom tokens for the mat-form-field.
|
|
39
293
|
/// @param {Map} $systems The MDC system tokens
|
|
40
294
|
/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
|
|
@@ -75,45 +329,108 @@
|
|
|
75
329
|
);
|
|
76
330
|
}
|
|
77
331
|
|
|
78
|
-
/// Generates custom tokens for the mat-
|
|
332
|
+
/// Generates custom tokens for the mat-icon.
|
|
79
333
|
/// @param {Map} $systems The MDC system tokens
|
|
80
334
|
/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
|
|
81
|
-
/// @return {Map} A set of custom tokens for the mat-
|
|
82
|
-
@function
|
|
335
|
+
/// @return {Map} A set of custom tokens for the mat-icon
|
|
336
|
+
@function icon($systems, $exclude-hardcoded) {
|
|
337
|
+
@return (
|
|
338
|
+
color: _hardcode(inherit, $exclude-hardcoded),
|
|
339
|
+
);
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
/// Generates custom tokens for the mat-icon-button.
|
|
343
|
+
/// @param {Map} $systems The MDC system tokens
|
|
344
|
+
/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
|
|
345
|
+
/// @return {Map} A set of custom tokens for the mat-icon-button
|
|
346
|
+
@function icon-button($systems, $exclude-hardcoded) {
|
|
347
|
+
@return (
|
|
348
|
+
state-layer-color: map.get($systems, md-sys-color, on-surface-variant),
|
|
349
|
+
ripple-color: mat.private-safe-color-change(
|
|
350
|
+
map.get($systems, md-sys-color, on-surface-variant),
|
|
351
|
+
$alpha: map.get($systems, md-sys-state, pressed-state-layer-opacity)
|
|
352
|
+
),
|
|
353
|
+
hover-state-layer-opacity: map.get($systems, md-sys-state, hover-state-layer-opacity),
|
|
354
|
+
focus-state-layer-opacity: map.get($systems, md-sys-state, focus-state-layer-opacity),
|
|
355
|
+
pressed-state-layer-opacity: map.get($systems, md-sys-state, pressed-state-layer-opacity),
|
|
356
|
+
);
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
/// Generates custom tokens for the mat-menu.
|
|
360
|
+
/// @param {Map} $systems The MDC system tokens
|
|
361
|
+
/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
|
|
362
|
+
/// @return {Map} A set of custom tokens for the mat-menu
|
|
363
|
+
@function menu($systems, $exclude-hardcoded) {
|
|
83
364
|
@return mat.private-merge-all(
|
|
84
|
-
_generate-typography-tokens($systems,
|
|
365
|
+
_generate-typography-tokens($systems, item-label-text, label-large),
|
|
85
366
|
(
|
|
86
|
-
container-
|
|
87
|
-
|
|
367
|
+
container-shape: _hardcode(4px, $exclude-hardcoded),
|
|
368
|
+
item-label-text-color: map.get($systems, md-sys-color, on-surface),
|
|
369
|
+
item-icon-color: map.get($systems, md-sys-color, on-surface-variant),
|
|
370
|
+
item-hover-state-layer-color: mat.private-safe-color-change(
|
|
371
|
+
map.get($systems, md-sys-color, on-surface),
|
|
372
|
+
$alpha: map.get($systems, md-sys-state, hover-state-layer-opacity)
|
|
373
|
+
),
|
|
374
|
+
item-focus-state-layer-color: mat.private-safe-color-change(
|
|
375
|
+
map.get($systems, md-sys-color, on-surface),
|
|
376
|
+
$alpha: map.get($systems, md-sys-state, focus-state-layer-opacity)
|
|
377
|
+
),
|
|
378
|
+
container-color: map.get($systems, md-sys-color, surface-container),
|
|
88
379
|
)
|
|
89
380
|
);
|
|
90
381
|
}
|
|
91
382
|
|
|
92
|
-
/// Generates custom tokens for the mat-
|
|
383
|
+
/// Generates custom tokens for the mat-optgroup.
|
|
93
384
|
/// @param {Map} $systems The MDC system tokens
|
|
94
385
|
/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
|
|
95
|
-
/// @return {Map} A set of custom tokens for the mat-
|
|
96
|
-
@function
|
|
97
|
-
@return
|
|
386
|
+
/// @return {Map} A set of custom tokens for the mat-optgroup
|
|
387
|
+
@function optgroup($systems, $exclude-hardcoded) {
|
|
388
|
+
@return mat.private-merge-all(
|
|
389
|
+
_generate-typography-tokens($systems, label-text, title-small),
|
|
390
|
+
(
|
|
391
|
+
label-text-color: map.get($systems, md-sys-color, on-surface-variant),
|
|
392
|
+
)
|
|
393
|
+
);
|
|
98
394
|
}
|
|
99
395
|
|
|
100
|
-
/// Generates custom tokens for the mat-
|
|
396
|
+
/// Generates custom tokens for the mat-option.
|
|
101
397
|
/// @param {Map} $systems The MDC system tokens
|
|
102
398
|
/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
|
|
103
|
-
/// @return {Map} A set of custom tokens for the mat-
|
|
104
|
-
@function
|
|
105
|
-
@return (
|
|
106
|
-
|
|
399
|
+
/// @return {Map} A set of custom tokens for the mat-option
|
|
400
|
+
@function option($systems, $exclude-hardcoded) {
|
|
401
|
+
@return mat.private-merge-all(
|
|
402
|
+
_generate-typography-tokens($systems, label-text, label-large),
|
|
403
|
+
(
|
|
404
|
+
selected-state-label-text-color: map.get($systems, md-sys-color, on-secondary-container),
|
|
405
|
+
label-text-color: map.get($systems, md-sys-color, on-surface),
|
|
406
|
+
hover-state-layer-color: mat.private-safe-color-change(
|
|
407
|
+
map.get($systems, md-sys-color, on-surface),
|
|
408
|
+
$alpha: map.get($systems, md-sys-state, hover-state-layer-opacity)
|
|
409
|
+
),
|
|
410
|
+
focus-state-layer-color: mat.private-safe-color-change(
|
|
411
|
+
map.get($systems, md-sys-color, on-surface),
|
|
412
|
+
$alpha: map.get($systems, md-sys-state, focus-state-layer-opacity)
|
|
413
|
+
),
|
|
414
|
+
selected-state-layer-color: map.get($systems, md-sys-color, secondary-container),
|
|
415
|
+
),
|
|
107
416
|
);
|
|
108
417
|
}
|
|
109
418
|
|
|
110
|
-
/// Generates custom tokens for the mat-
|
|
419
|
+
/// Generates custom tokens for the mat-paginator.
|
|
111
420
|
/// @param {Map} $systems The MDC system tokens
|
|
112
421
|
/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
|
|
113
|
-
/// @return {Map} A set of custom tokens for the mat-
|
|
114
|
-
@function
|
|
115
|
-
@return (
|
|
116
|
-
|
|
422
|
+
/// @return {Map} A set of custom tokens for the mat-paginator
|
|
423
|
+
@function paginator($systems, $exclude-hardcoded) {
|
|
424
|
+
@return mat.private-merge-all(
|
|
425
|
+
_generate-typography-tokens($systems, container-text, body-small),
|
|
426
|
+
(
|
|
427
|
+
container-text-color: map.get($systems, md-sys-color, on-surface),
|
|
428
|
+
container-background-color: map.get($systems, md-sys-color, surface),
|
|
429
|
+
enabled-icon-color: map.get($systems, md-sys-color, on-surface-variant),
|
|
430
|
+
disabled-icon-color: mat.private-safe-color-change(
|
|
431
|
+
map.get($systems, md-sys-color, on-surface), $alpha: 0.38),
|
|
432
|
+
select-trigger-text-size: map.get($systems, md-sys-typescale, body-small-size),
|
|
433
|
+
)
|
|
117
434
|
);
|
|
118
435
|
}
|
|
119
436
|
|
|
@@ -139,6 +456,73 @@
|
|
|
139
456
|
);
|
|
140
457
|
}
|
|
141
458
|
|
|
459
|
+
/// Generates custom tokens for the mat-select.
|
|
460
|
+
/// @param {Map} $systems The MDC system tokens
|
|
461
|
+
/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
|
|
462
|
+
/// @return {Map} A set of custom tokens for the mat-select
|
|
463
|
+
@function select($systems, $exclude-hardcoded) {
|
|
464
|
+
@return mat.private-merge-all(
|
|
465
|
+
_generate-typography-tokens($systems, trigger-text, body-large),
|
|
466
|
+
(
|
|
467
|
+
panel-background-color: map.get($systems, md-sys-color, surface-container),
|
|
468
|
+
enabled-trigger-text-color: map.get($systems, md-sys-color, on-surface),
|
|
469
|
+
disabled-trigger-text-color: mat.private-safe-color-change(
|
|
470
|
+
map.get($systems, md-sys-color, on-surface), $alpha: 0.38),
|
|
471
|
+
placeholder-text-color: map.get($systems, md-sys-color, on-surface-variant),
|
|
472
|
+
enabled-arrow-color: map.get($systems, md-sys-color, on-surface-variant),
|
|
473
|
+
disabled-arrow-color: mat.private-safe-color-change(
|
|
474
|
+
map.get($systems, md-sys-color, on-surface), $alpha: 0.38),
|
|
475
|
+
focused-arrow-color: map.get($systems, md-sys-color, primary),
|
|
476
|
+
invalid-arrow-color: map.get($systems, md-sys-color, error),
|
|
477
|
+
)
|
|
478
|
+
);
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
/// Generates custom tokens for the mat-sidenav.
|
|
482
|
+
/// @param {Map} $systems The MDC system tokens
|
|
483
|
+
/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
|
|
484
|
+
/// @return {Map} A set of custom tokens for the mat-sidenav
|
|
485
|
+
@function sidenav($systems, $exclude-hardcoded) {
|
|
486
|
+
@return (
|
|
487
|
+
container-shape: 16px,
|
|
488
|
+
container-divider-color: map.get($systems, md-sys-color, outline),
|
|
489
|
+
container-background-color: map.get($systems, md-sys-color, surface),
|
|
490
|
+
container-text-color: map.get($systems, md-sys-color, on-surface-variant),
|
|
491
|
+
content-background-color: _hardcode(inherit, $exclude-hardcoded),
|
|
492
|
+
content-text-color: _hardcode(inherit, $exclude-hardcoded),
|
|
493
|
+
scrim-color: mat.private-safe-color-change(
|
|
494
|
+
map.get($systems, md-ref-palette, neutral-variant20), $alpha: 0.4),
|
|
495
|
+
);
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
/// Generates custom tokens for the mat-slide-toggle.
|
|
499
|
+
/// @param {Map} $systems The MDC system tokens
|
|
500
|
+
/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
|
|
501
|
+
/// @return {Map} A set of custom tokens for the mat-slide-toggle
|
|
502
|
+
@function slide-toggle($systems, $exclude-hardcoded) {
|
|
503
|
+
@return _generate-typography-tokens($systems, label-text, label-large);
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
/// Generates custom tokens for the mat-slider.
|
|
507
|
+
/// @param {Map} $systems The MDC system tokens
|
|
508
|
+
/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
|
|
509
|
+
/// @return {Map} A set of custom tokens for the mat-slider
|
|
510
|
+
@function slider($systems, $exclude-hardcoded) {
|
|
511
|
+
@return (
|
|
512
|
+
value-indicator-opacity: _hardcode(1, $exclude-hardcoded),
|
|
513
|
+
);
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
/// Generates custom tokens for the mat-snack-bar.
|
|
517
|
+
/// @param {Map} $systems The MDC system tokens
|
|
518
|
+
/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
|
|
519
|
+
/// @return {Map} A set of custom tokens for the mat-snack-bar
|
|
520
|
+
@function snack-bar($systems, $exclude-hardcoded) {
|
|
521
|
+
@return (
|
|
522
|
+
button-color: map.get($systems, md-sys-color, inverse-primary),
|
|
523
|
+
);
|
|
524
|
+
}
|
|
525
|
+
|
|
142
526
|
/// Generates custom tokens for the mat-sort.
|
|
143
527
|
/// @param {Map} $systems The MDC system tokens
|
|
144
528
|
/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
|
|
@@ -194,7 +578,7 @@
|
|
|
194
578
|
@return mat.private-merge-all(
|
|
195
579
|
_generate-typography-tokens($systems, label-text, title-small),
|
|
196
580
|
(
|
|
197
|
-
disabled-ripple-color:
|
|
581
|
+
disabled-ripple-color: null, // TODO(mmalerba): Figure out correct value.
|
|
198
582
|
pagination-icon-color: map.get($systems, md-sys-color, on-surface),
|
|
199
583
|
inactive-label-text-color: map.get($systems, md-sys-color, on-surface),
|
|
200
584
|
active-label-text-color: map.get($systems, md-sys-color, on-surface),
|
|
@@ -243,6 +627,20 @@
|
|
|
243
627
|
);
|
|
244
628
|
}
|
|
245
629
|
|
|
630
|
+
/// Generates custom tokens for the mat-toolbar.
|
|
631
|
+
/// @param {Map} $systems The MDC system tokens
|
|
632
|
+
/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
|
|
633
|
+
/// @return {Map} A set of custom tokens for the mat-toolbar
|
|
634
|
+
@function toolbar($systems, $exclude-hardcoded) {
|
|
635
|
+
@return mat.private-merge-all(
|
|
636
|
+
_generate-typography-tokens($systems, title-text, title-large),
|
|
637
|
+
(
|
|
638
|
+
container-background-color: map.get($systems, md-sys-color, surface),
|
|
639
|
+
container-text-color: map.get($systems, md-sys-color, on-surface),
|
|
640
|
+
)
|
|
641
|
+
);
|
|
642
|
+
}
|
|
643
|
+
|
|
246
644
|
/// Generates custom tokens for the mat-tree.
|
|
247
645
|
/// @param {Map} $systems The MDC system tokens
|
|
248
646
|
/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
|
package/theming/_m3-density.scss
CHANGED
|
@@ -19,16 +19,17 @@ $_density-tokens: (
|
|
|
19
19
|
(mdc, checkbox): (
|
|
20
20
|
state-layer-size: (40px, 36px, 32px, 28px),
|
|
21
21
|
),
|
|
22
|
+
(mdc, chip): (
|
|
23
|
+
container-height: (32px, 28px, 24px),
|
|
24
|
+
),
|
|
25
|
+
(mdc, circular-progress): (),
|
|
26
|
+
(mdc, dialog): (),
|
|
22
27
|
(mdc, elevated-card): (),
|
|
28
|
+
(mdc, extended-fab): (),
|
|
29
|
+
(mdc, fab): (),
|
|
23
30
|
(mdc, filled-text-field): (),
|
|
24
|
-
(mdc,
|
|
25
|
-
|
|
26
|
-
(mdc, slider): (),
|
|
27
|
-
(mdc, snackbar): (),
|
|
28
|
-
(mdc, plain-tooltip): (),
|
|
29
|
-
(mdc, circular-progress): (),
|
|
30
|
-
(mdc, radio): (
|
|
31
|
-
state-layer-size: (40px, 36px, 32px, 28px),
|
|
31
|
+
(mdc, icon-button): (
|
|
32
|
+
state-layer-size: (48px, 44px, 40px, 36px, 32px, 28px),
|
|
32
33
|
),
|
|
33
34
|
(mdc, linear-progress): (),
|
|
34
35
|
(mdc, list): (
|
|
@@ -36,6 +37,14 @@ $_density-tokens: (
|
|
|
36
37
|
list-item-two-line-container-height: (64px, 60px, 56px, 52px, 48px, 48px),
|
|
37
38
|
list-item-three-line-container-height: (88px, 84px, 80px, 76px, 72px, 56px),
|
|
38
39
|
),
|
|
40
|
+
(mdc, outlined-card): (),
|
|
41
|
+
(mdc, outlined-text-field): (),
|
|
42
|
+
(mdc, plain-tooltip): (),
|
|
43
|
+
(mdc, radio): (
|
|
44
|
+
state-layer-size: (40px, 36px, 32px, 28px),
|
|
45
|
+
),
|
|
46
|
+
(mdc, slider): (),
|
|
47
|
+
(mdc, snackbar): (),
|
|
39
48
|
(mdc, switch): (),
|
|
40
49
|
(mdc, tab): (
|
|
41
50
|
container-height: (48px, 44px, 40px, 36px, 32px)
|
|
@@ -43,19 +52,38 @@ $_density-tokens: (
|
|
|
43
52
|
(mdc, tab-indicator): (),
|
|
44
53
|
|
|
45
54
|
// Custom Angular Material tokens
|
|
55
|
+
(mat, autocomplete): (),
|
|
56
|
+
(mat, badge): (),
|
|
57
|
+
(mat, bottom-sheet): (),
|
|
46
58
|
(mat, card): (),
|
|
59
|
+
(mat, datepicker): (),
|
|
60
|
+
(mat, divider): (),
|
|
61
|
+
(mat, expansion): (
|
|
62
|
+
header-collapsed-state-height: (48px, 44px, 40px, 36px),
|
|
63
|
+
header-expanded-state-height: (64px, 60px, 56px, 48px),
|
|
64
|
+
),
|
|
65
|
+
(mat, fab): (),
|
|
47
66
|
(mat, form-fild): (),
|
|
48
67
|
(mat, grid-list): (),
|
|
49
|
-
(mat,
|
|
50
|
-
|
|
51
|
-
|
|
68
|
+
(mat, icon): (),
|
|
69
|
+
(mat, icon-button): (),
|
|
70
|
+
(mat, menu): (),
|
|
71
|
+
(mat, optgroup): (),
|
|
72
|
+
(mat, option): (),
|
|
73
|
+
(mat, paginator): (
|
|
74
|
+
container-size: (56px, 52px, 48px, 40px),
|
|
52
75
|
),
|
|
53
|
-
(mat, slider): (),
|
|
54
|
-
(mat, snack-bar): (),
|
|
55
76
|
(mat, radio): (),
|
|
56
77
|
(mat, ripple): (),
|
|
78
|
+
(mat, select): (),
|
|
79
|
+
(mat, sidenav): (),
|
|
57
80
|
(mat, slide-toggle): (),
|
|
81
|
+
(mat, slider): (),
|
|
82
|
+
(mat, snack-bar): (),
|
|
58
83
|
(mat, sort): (),
|
|
84
|
+
(mat, standard-button-toggle): (
|
|
85
|
+
height: (40px, 40px, 40px, 36px, 24px),
|
|
86
|
+
),
|
|
59
87
|
(mat, stepper): (
|
|
60
88
|
header-height: (72px, 68px, 64px, 60px, 42px),
|
|
61
89
|
),
|
|
@@ -65,6 +93,10 @@ $_density-tokens: (
|
|
|
65
93
|
footer-container-height: (52px, 48px, 44px, 40px, 36px),
|
|
66
94
|
row-item-container-height: (52px, 48px, 44px, 40px, 36px),
|
|
67
95
|
),
|
|
96
|
+
(mat, toolbar): (
|
|
97
|
+
standard-height: (64px, 60px, 56px, 52px),
|
|
98
|
+
mobile-height: (56px, 52px, 48px, 44px),
|
|
99
|
+
),
|
|
68
100
|
(mat, tree): (
|
|
69
101
|
node-min-height: (48px, 44px, 40px, 36px, 28px),
|
|
70
102
|
),
|