@angular/material-experimental 17.0.1 → 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/esm2022/column-resize/column-resize-directives/column-resize-flex.mjs +3 -3
- package/esm2022/column-resize/column-resize-directives/column-resize.mjs +3 -3
- package/esm2022/column-resize/column-resize-directives/default-enabled-column-resize-flex.mjs +3 -3
- package/esm2022/column-resize/column-resize-directives/default-enabled-column-resize.mjs +3 -3
- package/esm2022/column-resize/column-resize-module.mjs +12 -12
- package/esm2022/column-resize/overlay-handle.mjs +3 -3
- package/esm2022/column-resize/resizable-directives/default-enabled-resizable.mjs +3 -3
- package/esm2022/column-resize/resizable-directives/resizable.mjs +3 -3
- package/esm2022/column-resize/resize-strategy.mjs +3 -3
- package/esm2022/menubar/menubar-item.mjs +3 -3
- package/esm2022/menubar/menubar-module.mjs +4 -4
- package/esm2022/menubar/menubar.mjs +3 -3
- package/esm2022/popover-edit/lens-directives.mjs +9 -9
- package/esm2022/popover-edit/popover-edit-module.mjs +4 -4
- package/esm2022/popover-edit/table-directives.mjs +12 -12
- package/esm2022/selection/row-selection.mjs +3 -3
- package/esm2022/selection/select-all.mjs +3 -3
- package/esm2022/selection/selection-column.mjs +3 -3
- package/esm2022/selection/selection-module.mjs +4 -4
- package/esm2022/selection/selection-toggle.mjs +3 -3
- package/esm2022/selection/selection.mjs +3 -3
- package/esm2022/version.mjs +1 -1
- package/fesm2022/column-resize.mjs +36 -36
- package/fesm2022/material-experimental.mjs +1 -1
- package/fesm2022/material-experimental.mjs.map +1 -1
- package/fesm2022/menubar.mjs +10 -10
- package/fesm2022/popover-edit.mjs +25 -25
- package/fesm2022/selection.mjs +19 -19
- package/package.json +3 -3
- package/theming/_custom-tokens.scss +363 -21
- package/theming/_m3-density.scss +36 -14
- package/theming/_m3-palettes.scss +45 -16
- package/theming/_m3-tokens.scss +108 -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,130 @@
|
|
|
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
|
+
|
|
38
240
|
/// Generates custom tokens for the mat-form-field.
|
|
39
241
|
/// @param {Map} $systems The MDC system tokens
|
|
40
242
|
/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
|
|
@@ -62,45 +264,104 @@
|
|
|
62
264
|
);
|
|
63
265
|
}
|
|
64
266
|
|
|
65
|
-
/// Generates custom tokens for the mat-
|
|
267
|
+
/// Generates custom tokens for the mat-grid-list.
|
|
66
268
|
/// @param {Map} $systems The MDC system tokens
|
|
67
269
|
/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
|
|
68
|
-
/// @return {Map} A set of custom tokens for the mat-
|
|
69
|
-
@function
|
|
270
|
+
/// @return {Map} A set of custom tokens for the mat-grid-list
|
|
271
|
+
@function grid-list($systems, $exclude-hardcoded) {
|
|
272
|
+
@return (
|
|
273
|
+
tile-header-primary-text-size: map.get($systems, md-sys-typescale, body-large),
|
|
274
|
+
tile-header-secondary-text-size: map.get($systems, md-sys-typescale, body-medium),
|
|
275
|
+
tile-footer-primary-text-size: map.get($systems, md-sys-typescale, body-large),
|
|
276
|
+
tile-footer-secondary-text-size: map.get($systems, md-sys-typescale, body-medium),
|
|
277
|
+
);
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
/// Generates custom tokens for the mat-icon.
|
|
281
|
+
/// @param {Map} $systems The MDC system tokens
|
|
282
|
+
/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
|
|
283
|
+
/// @return {Map} A set of custom tokens for the mat-icon
|
|
284
|
+
@function icon($systems, $exclude-hardcoded) {
|
|
285
|
+
@return (
|
|
286
|
+
color: _hardcode(inherit, $exclude-hardcoded),
|
|
287
|
+
);
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
/// Generates custom tokens for the mat-menu.
|
|
291
|
+
/// @param {Map} $systems The MDC system tokens
|
|
292
|
+
/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
|
|
293
|
+
/// @return {Map} A set of custom tokens for the mat-menu
|
|
294
|
+
@function menu($systems, $exclude-hardcoded) {
|
|
70
295
|
@return mat.private-merge-all(
|
|
71
|
-
_generate-typography-tokens($systems,
|
|
296
|
+
_generate-typography-tokens($systems, item-label-text, label-large),
|
|
72
297
|
(
|
|
73
|
-
container-
|
|
74
|
-
|
|
298
|
+
container-shape: _hardcode(4px, $exclude-hardcoded),
|
|
299
|
+
item-label-text-color: map.get($systems, md-sys-color, on-surface),
|
|
300
|
+
item-icon-color: map.get($systems, md-sys-color, on-surface-variant),
|
|
301
|
+
item-hover-state-layer-color: mat.private-safe-color-change(
|
|
302
|
+
map.get($systems, md-sys-color, on-surface),
|
|
303
|
+
$alpha: map.get($systems, md-sys-state, hover-state-layer-opacity)
|
|
304
|
+
),
|
|
305
|
+
item-focus-state-layer-color: mat.private-safe-color-change(
|
|
306
|
+
map.get($systems, md-sys-color, on-surface),
|
|
307
|
+
$alpha: map.get($systems, md-sys-state, focus-state-layer-opacity)
|
|
308
|
+
),
|
|
309
|
+
container-color: map.get($systems, md-sys-color, surface-container),
|
|
75
310
|
)
|
|
76
311
|
);
|
|
77
312
|
}
|
|
78
313
|
|
|
79
|
-
/// Generates custom tokens for the mat-
|
|
314
|
+
/// Generates custom tokens for the mat-optgroup.
|
|
80
315
|
/// @param {Map} $systems The MDC system tokens
|
|
81
316
|
/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
|
|
82
|
-
/// @return {Map} A set of custom tokens for the mat-
|
|
83
|
-
@function
|
|
84
|
-
@return
|
|
317
|
+
/// @return {Map} A set of custom tokens for the mat-optgroup
|
|
318
|
+
@function optgroup($systems, $exclude-hardcoded) {
|
|
319
|
+
@return mat.private-merge-all(
|
|
320
|
+
_generate-typography-tokens($systems, label-text, title-small),
|
|
321
|
+
(
|
|
322
|
+
label-text-color: map.get($systems, md-sys-color, on-surface-variant),
|
|
323
|
+
)
|
|
324
|
+
);
|
|
85
325
|
}
|
|
86
326
|
|
|
87
|
-
/// Generates custom tokens for the mat-
|
|
327
|
+
/// Generates custom tokens for the mat-option.
|
|
88
328
|
/// @param {Map} $systems The MDC system tokens
|
|
89
329
|
/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
|
|
90
|
-
/// @return {Map} A set of custom tokens for the mat-
|
|
91
|
-
@function
|
|
92
|
-
@return (
|
|
93
|
-
|
|
330
|
+
/// @return {Map} A set of custom tokens for the mat-option
|
|
331
|
+
@function option($systems, $exclude-hardcoded) {
|
|
332
|
+
@return mat.private-merge-all(
|
|
333
|
+
_generate-typography-tokens($systems, label-text, label-large),
|
|
334
|
+
(
|
|
335
|
+
selected-state-label-text-color: map.get($systems, md-sys-color, on-secondary-container),
|
|
336
|
+
label-text-color: map.get($systems, md-sys-color, on-surface),
|
|
337
|
+
hover-state-layer-color: mat.private-safe-color-change(
|
|
338
|
+
map.get($systems, md-sys-color, on-surface),
|
|
339
|
+
$alpha: map.get($systems, md-sys-state, hover-state-layer-opacity)
|
|
340
|
+
),
|
|
341
|
+
focus-state-layer-color: mat.private-safe-color-change(
|
|
342
|
+
map.get($systems, md-sys-color, on-surface),
|
|
343
|
+
$alpha: map.get($systems, md-sys-state, focus-state-layer-opacity)
|
|
344
|
+
),
|
|
345
|
+
selected-state-layer-color: map.get($systems, md-sys-color, secondary-container),
|
|
346
|
+
),
|
|
94
347
|
);
|
|
95
348
|
}
|
|
96
349
|
|
|
97
|
-
/// Generates custom tokens for the mat-
|
|
350
|
+
/// Generates custom tokens for the mat-paginator.
|
|
98
351
|
/// @param {Map} $systems The MDC system tokens
|
|
99
352
|
/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
|
|
100
|
-
/// @return {Map} A set of custom tokens for the mat-
|
|
101
|
-
@function
|
|
102
|
-
@return (
|
|
103
|
-
|
|
353
|
+
/// @return {Map} A set of custom tokens for the mat-paginator
|
|
354
|
+
@function paginator($systems, $exclude-hardcoded) {
|
|
355
|
+
@return mat.private-merge-all(
|
|
356
|
+
_generate-typography-tokens($systems, container-text, body-small),
|
|
357
|
+
(
|
|
358
|
+
container-text-color: map.get($systems, md-sys-color, on-surface),
|
|
359
|
+
container-background-color: map.get($systems, md-sys-color, surface),
|
|
360
|
+
enabled-icon-color: map.get($systems, md-sys-color, on-surface-variant),
|
|
361
|
+
disabled-icon-color: mat.private-safe-color-change(
|
|
362
|
+
map.get($systems, md-sys-color, on-surface), $alpha: 0.38),
|
|
363
|
+
select-trigger-text-size: map.get($systems, md-sys-typescale, body-small-size),
|
|
364
|
+
)
|
|
104
365
|
);
|
|
105
366
|
}
|
|
106
367
|
|
|
@@ -126,6 +387,73 @@
|
|
|
126
387
|
);
|
|
127
388
|
}
|
|
128
389
|
|
|
390
|
+
/// Generates custom tokens for the mat-select.
|
|
391
|
+
/// @param {Map} $systems The MDC system tokens
|
|
392
|
+
/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
|
|
393
|
+
/// @return {Map} A set of custom tokens for the mat-select
|
|
394
|
+
@function select($systems, $exclude-hardcoded) {
|
|
395
|
+
@return mat.private-merge-all(
|
|
396
|
+
_generate-typography-tokens($systems, trigger-text, body-large),
|
|
397
|
+
(
|
|
398
|
+
panel-background-color: map.get($systems, md-sys-color, surface-container),
|
|
399
|
+
enabled-trigger-text-color: map.get($systems, md-sys-color, on-surface),
|
|
400
|
+
disabled-trigger-text-color: mat.private-safe-color-change(
|
|
401
|
+
map.get($systems, md-sys-color, on-surface), $alpha: 0.38),
|
|
402
|
+
placeholder-text-color: map.get($systems, md-sys-color, on-surface-variant),
|
|
403
|
+
enabled-arrow-color: map.get($systems, md-sys-color, on-surface-variant),
|
|
404
|
+
disabled-arrow-color: mat.private-safe-color-change(
|
|
405
|
+
map.get($systems, md-sys-color, on-surface), $alpha: 0.38),
|
|
406
|
+
focused-arrow-color: map.get($systems, md-sys-color, primary),
|
|
407
|
+
invalid-arrow-color: map.get($systems, md-sys-color, error),
|
|
408
|
+
)
|
|
409
|
+
);
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
/// Generates custom tokens for the mat-sidenav.
|
|
413
|
+
/// @param {Map} $systems The MDC system tokens
|
|
414
|
+
/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
|
|
415
|
+
/// @return {Map} A set of custom tokens for the mat-sidenav
|
|
416
|
+
@function sidenav($systems, $exclude-hardcoded) {
|
|
417
|
+
@return (
|
|
418
|
+
container-shape: 16px,
|
|
419
|
+
container-divider-color: map.get($systems, md-sys-color, outline),
|
|
420
|
+
container-background-color: map.get($systems, md-sys-color, surface),
|
|
421
|
+
container-text-color: map.get($systems, md-sys-color, on-surface-variant),
|
|
422
|
+
content-background-color: _hardcode(inherit, $exclude-hardcoded),
|
|
423
|
+
content-text-color: _hardcode(inherit, $exclude-hardcoded),
|
|
424
|
+
scrim-color: mat.private-safe-color-change(
|
|
425
|
+
map.get($systems, md-ref-palette, neutral-variant20), $alpha: 0.4),
|
|
426
|
+
);
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
/// Generates custom tokens for the mat-slide-toggle.
|
|
430
|
+
/// @param {Map} $systems The MDC system tokens
|
|
431
|
+
/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
|
|
432
|
+
/// @return {Map} A set of custom tokens for the mat-slide-toggle
|
|
433
|
+
@function slide-toggle($systems, $exclude-hardcoded) {
|
|
434
|
+
@return _generate-typography-tokens($systems, label-text, label-large);
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
/// Generates custom tokens for the mat-slider.
|
|
438
|
+
/// @param {Map} $systems The MDC system tokens
|
|
439
|
+
/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
|
|
440
|
+
/// @return {Map} A set of custom tokens for the mat-slider
|
|
441
|
+
@function slider($systems, $exclude-hardcoded) {
|
|
442
|
+
@return (
|
|
443
|
+
value-indicator-opacity: _hardcode(1, $exclude-hardcoded),
|
|
444
|
+
);
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
/// Generates custom tokens for the mat-snack-bar.
|
|
448
|
+
/// @param {Map} $systems The MDC system tokens
|
|
449
|
+
/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
|
|
450
|
+
/// @return {Map} A set of custom tokens for the mat-snack-bar
|
|
451
|
+
@function snack-bar($systems, $exclude-hardcoded) {
|
|
452
|
+
@return (
|
|
453
|
+
button-color: map.get($systems, md-sys-color, inverse-primary),
|
|
454
|
+
);
|
|
455
|
+
}
|
|
456
|
+
|
|
129
457
|
/// Generates custom tokens for the mat-sort.
|
|
130
458
|
/// @param {Map} $systems The MDC system tokens
|
|
131
459
|
/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
|
|
@@ -181,7 +509,7 @@
|
|
|
181
509
|
@return mat.private-merge-all(
|
|
182
510
|
_generate-typography-tokens($systems, label-text, title-small),
|
|
183
511
|
(
|
|
184
|
-
disabled-ripple-color:
|
|
512
|
+
disabled-ripple-color: null, // TODO(mmalerba): Figure out correct value.
|
|
185
513
|
pagination-icon-color: map.get($systems, md-sys-color, on-surface),
|
|
186
514
|
inactive-label-text-color: map.get($systems, md-sys-color, on-surface),
|
|
187
515
|
active-label-text-color: map.get($systems, md-sys-color, on-surface),
|
|
@@ -230,6 +558,20 @@
|
|
|
230
558
|
);
|
|
231
559
|
}
|
|
232
560
|
|
|
561
|
+
/// Generates custom tokens for the mat-toolbar.
|
|
562
|
+
/// @param {Map} $systems The MDC system tokens
|
|
563
|
+
/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
|
|
564
|
+
/// @return {Map} A set of custom tokens for the mat-toolbar
|
|
565
|
+
@function toolbar($systems, $exclude-hardcoded) {
|
|
566
|
+
@return mat.private-merge-all(
|
|
567
|
+
_generate-typography-tokens($systems, title-text, title-large),
|
|
568
|
+
(
|
|
569
|
+
container-background-color: map.get($systems, md-sys-color, surface),
|
|
570
|
+
container-text-color: map.get($systems, md-sys-color, on-surface),
|
|
571
|
+
)
|
|
572
|
+
);
|
|
573
|
+
}
|
|
574
|
+
|
|
233
575
|
/// Generates custom tokens for the mat-tree.
|
|
234
576
|
/// @param {Map} $systems The MDC system tokens
|
|
235
577
|
/// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
|
package/theming/_m3-density.scss
CHANGED
|
@@ -19,23 +19,27 @@ $_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): (),
|
|
23
28
|
(mdc, filled-text-field): (),
|
|
24
|
-
(mdc, outlined-card): (),
|
|
25
|
-
(mdc, outlined-text-field): (),
|
|
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),
|
|
32
|
-
),
|
|
33
29
|
(mdc, linear-progress): (),
|
|
34
30
|
(mdc, list): (
|
|
35
31
|
list-item-one-line-container-height: (48px, 44px, 40px, 36px, 32px, 24px),
|
|
36
32
|
list-item-two-line-container-height: (64px, 60px, 56px, 52px, 48px, 48px),
|
|
37
33
|
list-item-three-line-container-height: (88px, 84px, 80px, 76px, 72px, 56px),
|
|
38
34
|
),
|
|
35
|
+
(mdc, outlined-card): (),
|
|
36
|
+
(mdc, outlined-text-field): (),
|
|
37
|
+
(mdc, plain-tooltip): (),
|
|
38
|
+
(mdc, radio): (
|
|
39
|
+
state-layer-size: (40px, 36px, 32px, 28px),
|
|
40
|
+
),
|
|
41
|
+
(mdc, slider): (),
|
|
42
|
+
(mdc, snackbar): (),
|
|
39
43
|
(mdc, switch): (),
|
|
40
44
|
(mdc, tab): (
|
|
41
45
|
container-height: (48px, 44px, 40px, 36px, 32px)
|
|
@@ -43,18 +47,32 @@ $_density-tokens: (
|
|
|
43
47
|
(mdc, tab-indicator): (),
|
|
44
48
|
|
|
45
49
|
// Custom Angular Material tokens
|
|
50
|
+
(mat, autocomplete): (),
|
|
51
|
+
(mat, badge): (),
|
|
52
|
+
(mat, bottom-sheet): (),
|
|
46
53
|
(mat, card): (),
|
|
54
|
+
(mat, datepicker): (),
|
|
55
|
+
(mat, divider): (),
|
|
47
56
|
(mat, form-fild): (),
|
|
48
|
-
(mat,
|
|
49
|
-
|
|
50
|
-
|
|
57
|
+
(mat, grid-list): (),
|
|
58
|
+
(mat, icon): (),
|
|
59
|
+
(mat, menu): (),
|
|
60
|
+
(mat, optgroup): (),
|
|
61
|
+
(mat, option): (),
|
|
62
|
+
(mat, paginator): (
|
|
63
|
+
container-size: (56px, 52px, 48px, 40px),
|
|
51
64
|
),
|
|
52
|
-
(mat, slider): (),
|
|
53
|
-
(mat, snack-bar): (),
|
|
54
65
|
(mat, radio): (),
|
|
55
66
|
(mat, ripple): (),
|
|
67
|
+
(mat, select): (),
|
|
68
|
+
(mat, sidenav): (),
|
|
56
69
|
(mat, slide-toggle): (),
|
|
70
|
+
(mat, slider): (),
|
|
71
|
+
(mat, snack-bar): (),
|
|
57
72
|
(mat, sort): (),
|
|
73
|
+
(mat, standard-button-toggle): (
|
|
74
|
+
height: (40px, 40px, 40px, 36px, 24px),
|
|
75
|
+
),
|
|
58
76
|
(mat, stepper): (
|
|
59
77
|
header-height: (72px, 68px, 64px, 60px, 42px),
|
|
60
78
|
),
|
|
@@ -64,6 +82,10 @@ $_density-tokens: (
|
|
|
64
82
|
footer-container-height: (52px, 48px, 44px, 40px, 36px),
|
|
65
83
|
row-item-container-height: (52px, 48px, 44px, 40px, 36px),
|
|
66
84
|
),
|
|
85
|
+
(mat, toolbar): (
|
|
86
|
+
standard-height: (64px, 60px, 56px, 52px),
|
|
87
|
+
mobile-height: (56px, 52px, 48px, 44px),
|
|
88
|
+
),
|
|
67
89
|
(mat, tree): (
|
|
68
90
|
node-min-height: (48px, 44px, 40px, 36px, 28px),
|
|
69
91
|
),
|
|
@@ -1,5 +1,34 @@
|
|
|
1
|
+
@use 'sass:color';
|
|
2
|
+
@use 'sass:map';
|
|
3
|
+
@use 'sass:math';
|
|
4
|
+
|
|
5
|
+
/// Estimate a hue using the given previous and next hues.
|
|
6
|
+
@function _estimate-hue($hues, $hue, $prev-hue, $next-hue) {
|
|
7
|
+
$weight: math.div($next-hue - $hue, $next-hue - $prev-hue) * 100%;
|
|
8
|
+
@return color.mix(map.get($hues, $prev-hue), map.get($hues, $next-hue), $weight);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
// TODO(mmalerba): Remove this and add correct values for these hues.
|
|
12
|
+
/// The Material Design spec references some neutral hues that are not generated by
|
|
13
|
+
/// https://m3.material.io/theme-builder. For now we use this function to estimate the missing hues
|
|
14
|
+
/// by blending the nearest hues that are generated.
|
|
15
|
+
@function _patch-missing-hues($palette) {
|
|
16
|
+
$neutral: map.get($palette, neutral);
|
|
17
|
+
$palette: map.set($palette, neutral, 4, _estimate-hue($neutral, 4, 0, 10));
|
|
18
|
+
$palette: map.set($palette, neutral, 6, _estimate-hue($neutral, 6, 0, 10));
|
|
19
|
+
$palette: map.set($palette, neutral, 12, _estimate-hue($neutral, 12, 10, 20));
|
|
20
|
+
$palette: map.set($palette, neutral, 17, _estimate-hue($neutral, 17, 10, 20));
|
|
21
|
+
$palette: map.set($palette, neutral, 22, _estimate-hue($neutral, 22, 20, 25));
|
|
22
|
+
$palette: map.set($palette, neutral, 24, _estimate-hue($neutral, 24, 20, 25));
|
|
23
|
+
$palette: map.set($palette, neutral, 87, _estimate-hue($neutral, 87, 80, 90));
|
|
24
|
+
$palette: map.set($palette, neutral, 92, _estimate-hue($neutral, 92, 90, 95));
|
|
25
|
+
$palette: map.set($palette, neutral, 94, _estimate-hue($neutral, 94, 90, 95));
|
|
26
|
+
$palette: map.set($palette, neutral, 96, _estimate-hue($neutral, 96, 95, 98));
|
|
27
|
+
@return $palette;
|
|
28
|
+
}
|
|
29
|
+
|
|
1
30
|
/// Blue color palette to be used as primary, secondary, or tertiary palette.
|
|
2
|
-
$blue-palette: (
|
|
31
|
+
$blue-palette: _patch-missing-hues((
|
|
3
32
|
0: #000000,
|
|
4
33
|
10: #00006e,
|
|
5
34
|
20: #0001ac,
|
|
@@ -52,10 +81,10 @@ $blue-palette: (
|
|
|
52
81
|
99: #fffbff,
|
|
53
82
|
100: #ffffff,
|
|
54
83
|
),
|
|
55
|
-
);
|
|
84
|
+
));
|
|
56
85
|
|
|
57
86
|
/// Cyan color palette to be used as primary, secondary, or tertiary palette.
|
|
58
|
-
$cyan-palette: (
|
|
87
|
+
$cyan-palette: _patch-missing-hues((
|
|
59
88
|
0: #000000,
|
|
60
89
|
10: #002020,
|
|
61
90
|
20: #003737,
|
|
@@ -108,10 +137,10 @@ $cyan-palette: (
|
|
|
108
137
|
99: #f4fefd,
|
|
109
138
|
100: #ffffff,
|
|
110
139
|
),
|
|
111
|
-
);
|
|
140
|
+
));
|
|
112
141
|
|
|
113
142
|
/// Green color palette to be used as primary, secondary, or tertiary palette.
|
|
114
|
-
$green-palette: (
|
|
143
|
+
$green-palette: _patch-missing-hues((
|
|
115
144
|
0: #000000,
|
|
116
145
|
10: #002200,
|
|
117
146
|
20: #013a00,
|
|
@@ -164,10 +193,10 @@ $green-palette: (
|
|
|
164
193
|
99: #f9fef1,
|
|
165
194
|
100: #ffffff,
|
|
166
195
|
),
|
|
167
|
-
);
|
|
196
|
+
));
|
|
168
197
|
|
|
169
198
|
/// Magenta color palette to be used as primary, secondary, or tertiary palette.
|
|
170
|
-
$magenta-palette: (
|
|
199
|
+
$magenta-palette: _patch-missing-hues((
|
|
171
200
|
0: #000000,
|
|
172
201
|
10: #380038,
|
|
173
202
|
20: #5b005b,
|
|
@@ -220,10 +249,10 @@ $magenta-palette: (
|
|
|
220
249
|
99: #fffbff,
|
|
221
250
|
100: #ffffff,
|
|
222
251
|
),
|
|
223
|
-
);
|
|
252
|
+
));
|
|
224
253
|
|
|
225
254
|
/// Orange color palette to be used as primary, secondary, or tertiary palette.
|
|
226
|
-
$orange-palette: (
|
|
255
|
+
$orange-palette: _patch-missing-hues((
|
|
227
256
|
0: #000000,
|
|
228
257
|
10: #311300,
|
|
229
258
|
20: #502400,
|
|
@@ -276,10 +305,10 @@ $orange-palette: (
|
|
|
276
305
|
99: #fffbff,
|
|
277
306
|
100: #ffffff,
|
|
278
307
|
),
|
|
279
|
-
);
|
|
308
|
+
));
|
|
280
309
|
|
|
281
310
|
/// Purple color palette to be used as primary, secondary, or tertiary palette.
|
|
282
|
-
$purple-palette: (
|
|
311
|
+
$purple-palette: _patch-missing-hues((
|
|
283
312
|
0: #000000,
|
|
284
313
|
10: #270057,
|
|
285
314
|
20: #42008a,
|
|
@@ -332,10 +361,10 @@ $purple-palette: (
|
|
|
332
361
|
99: #fffbff,
|
|
333
362
|
100: #ffffff,
|
|
334
363
|
),
|
|
335
|
-
);
|
|
364
|
+
));
|
|
336
365
|
|
|
337
366
|
/// Red color palette to be used as primary, secondary, or tertiary palette.
|
|
338
|
-
$red-palette: (
|
|
367
|
+
$red-palette: _patch-missing-hues((
|
|
339
368
|
0: #000000,
|
|
340
369
|
10: #410000,
|
|
341
370
|
20: #690100,
|
|
@@ -388,10 +417,10 @@ $red-palette: (
|
|
|
388
417
|
99: #fffbff,
|
|
389
418
|
100: #ffffff,
|
|
390
419
|
),
|
|
391
|
-
);
|
|
420
|
+
));
|
|
392
421
|
|
|
393
422
|
/// Yellow color palette to be used as primary, secondary, or tertiary palette.
|
|
394
|
-
$yellow-palette: (
|
|
423
|
+
$yellow-palette: _patch-missing-hues((
|
|
395
424
|
0: #000000,
|
|
396
425
|
10: #1d1d00,
|
|
397
426
|
20: #323200,
|
|
@@ -444,4 +473,4 @@ $yellow-palette: (
|
|
|
444
473
|
99: #fffbff,
|
|
445
474
|
100: #ffffff,
|
|
446
475
|
),
|
|
447
|
-
);
|
|
476
|
+
));
|