@angular/material-experimental 17.1.2 → 17.2.0-next.1

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.
Files changed (40) hide show
  1. package/_index.scss +3 -2
  2. package/esm2022/column-resize/column-resize-directives/column-resize-flex.mjs +4 -4
  3. package/esm2022/column-resize/column-resize-directives/column-resize.mjs +4 -4
  4. package/esm2022/column-resize/column-resize-directives/default-enabled-column-resize-flex.mjs +4 -4
  5. package/esm2022/column-resize/column-resize-directives/default-enabled-column-resize.mjs +4 -4
  6. package/esm2022/column-resize/column-resize-module.mjs +13 -13
  7. package/esm2022/column-resize/overlay-handle.mjs +4 -4
  8. package/esm2022/column-resize/resizable-directives/default-enabled-resizable.mjs +4 -4
  9. package/esm2022/column-resize/resizable-directives/resizable.mjs +4 -4
  10. package/esm2022/column-resize/resize-strategy.mjs +4 -4
  11. package/esm2022/menubar/menubar-item.mjs +4 -4
  12. package/esm2022/menubar/menubar-module.mjs +5 -5
  13. package/esm2022/menubar/menubar.mjs +4 -4
  14. package/esm2022/popover-edit/lens-directives.mjs +10 -10
  15. package/esm2022/popover-edit/popover-edit-module.mjs +5 -5
  16. package/esm2022/popover-edit/table-directives.mjs +13 -13
  17. package/esm2022/selection/row-selection.mjs +4 -4
  18. package/esm2022/selection/select-all.mjs +4 -4
  19. package/esm2022/selection/selection-column.mjs +4 -4
  20. package/esm2022/selection/selection-module.mjs +5 -5
  21. package/esm2022/selection/selection-toggle.mjs +4 -4
  22. package/esm2022/selection/selection.mjs +4 -4
  23. package/esm2022/version.mjs +1 -1
  24. package/fesm2022/column-resize.mjs +36 -36
  25. package/fesm2022/column-resize.mjs.map +1 -1
  26. package/fesm2022/material-experimental.mjs +1 -1
  27. package/fesm2022/material-experimental.mjs.map +1 -1
  28. package/fesm2022/menubar.mjs +10 -10
  29. package/fesm2022/menubar.mjs.map +1 -1
  30. package/fesm2022/popover-edit.mjs +25 -25
  31. package/fesm2022/popover-edit.mjs.map +1 -1
  32. package/fesm2022/selection.mjs +19 -19
  33. package/fesm2022/selection.mjs.map +1 -1
  34. package/package.json +8 -8
  35. package/theming/_config-validation.scss +2 -2
  36. package/theming/_custom-tokens.scss +1080 -69
  37. package/theming/_definition.scss +7 -8
  38. package/theming/_m3-density.scss +30 -4
  39. package/theming/_m3-palettes.scss +615 -155
  40. package/theming/_m3-tokens.scss +323 -146
@@ -31,12 +31,23 @@
31
31
  );
32
32
  }
33
33
 
34
+ /// Generates custom tokens for the app.
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 app
38
+ @function app($systems, $exclude-hardcoded) {
39
+ @return (
40
+ background-color: map.get($systems, md-sys-color, background),
41
+ text-color: map.get($systems, md-sys-color, on-background),
42
+ );
43
+ }
44
+
34
45
  /// Generates custom tokens for the mat-badge.
35
46
  /// @param {Map} $systems The MDC system tokens
36
47
  /// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
37
48
  /// @return {Map} A set of custom tokens for the mat-badge
38
49
  @function badge($systems, $exclude-hardcoded) {
39
- @return (
50
+ @return ((
40
51
  background-color: map.get($systems, md-sys-color, error),
41
52
  text-color: map.get($systems, md-sys-color, on-error),
42
53
  disabled-state-background-color: mat.private-safe-color-change(
@@ -48,8 +59,55 @@
48
59
  text-size: map.get($systems, md-sys-typescale, label-small-size),
49
60
  text-weight: map.get($systems, md-sys-typescale, label-small-weight),
50
61
  small-size-text-size: _hardcode(0, $exclude-hardcoded),
62
+ container-shape: map.get($systems, md-sys-shape, corner-full),
63
+ container-size: _hardcode(16px, $exclude-hardcoded),
64
+ legacy-container-size: _hardcode(unset, $exclude-hardcoded),
65
+ legacy-small-size-container-size: _hardcode(unset, $exclude-hardcoded),
66
+ small-size-container-size: _hardcode(6px, $exclude-hardcoded),
67
+ container-padding: _hardcode(0 4px, $exclude-hardcoded),
68
+ small-size-container-padding: _hardcode(0, $exclude-hardcoded),
69
+ container-offset: -12px 0,
70
+ small-size-container-offset: -6px 0,
71
+ container-overlap-offset: -12px,
72
+ small-size-container-overlap-offset: -6px,
73
+
74
+ // This size isn't in the M3 spec so we emit the same values as for `medium`.
75
+ large-size-container-size: _hardcode(16px, $exclude-hardcoded),
76
+ large-size-container-offset: -12px 0,
77
+ large-size-container-overlap-offset: -12px,
51
78
  large-size-text-size: map.get($systems, md-sys-typescale, label-small-size),
52
- );
79
+ large-size-container-padding: _hardcode(0 4px, $exclude-hardcoded),
80
+ legacy-large-size-container-size: _hardcode(unset, $exclude-hardcoded),
81
+ ), (
82
+ primary: (
83
+ background-color: map.get($systems, md-sys-color, primary),
84
+ text-color: map.get($systems, md-sys-color, on-primary),
85
+ disabled-state-background-color: mat.private-safe-color-change(
86
+ map.get($systems, md-sys-color, primary),
87
+ $alpha: 0.38,
88
+ ),
89
+ disabled-state-text-color: map.get($systems, md-sys-color, on-primary),
90
+ ),
91
+ secondary: (
92
+ background-color: map.get($systems, md-sys-color, secondary),
93
+ text-color: map.get($systems, md-sys-color, on-secondary),
94
+ disabled-state-background-color: mat.private-safe-color-change(
95
+ map.get($systems, md-sys-color, secondary),
96
+ $alpha: 0.38,
97
+ ),
98
+ disabled-state-text-color: map.get($systems, md-sys-color, on-secondary),
99
+ ),
100
+ tertiary: (
101
+ background-color: map.get($systems, md-sys-color, tertiary),
102
+ text-color: map.get($systems, md-sys-color, on-tertiary),
103
+ disabled-state-background-color: mat.private-safe-color-change(
104
+ map.get($systems, md-sys-color, tertiary),
105
+ $alpha: 0.38,
106
+ ),
107
+ disabled-state-text-color: map.get($systems, md-sys-color, on-tertiary),
108
+ ),
109
+ error: () // Default, no overrides needed
110
+ ));
53
111
  }
54
112
 
55
113
  /// Generates custom tokens for the mat-bottom-sheet.
@@ -72,7 +130,7 @@
72
130
  /// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
73
131
  /// @return {Map} A set of custom tokens for the mat-button-toggle
74
132
  @function button-toggle($systems, $exclude-hardcoded) {
75
- @return (
133
+ @return ((
76
134
  shape: _hardcode(9999px, $exclude-hardcoded),
77
135
  hover-state-layer-opacity: map.get($systems, md-sys-state, hover-state-layer-opacity),
78
136
  focus-state-layer-opacity: map.get($systems, md-sys-state, focus-state-layer-opacity),
@@ -96,7 +154,22 @@
96
154
  ),
97
155
  divider-color: map.get($systems, md-sys-color, outline),
98
156
  text-font: map.get($systems, md-sys-typescale, label-large-font),
99
- );
157
+ ), (
158
+ // Color variants:
159
+ primary: (
160
+ selected-state-background-color: map.get($systems, md-sys-color, primary-container),
161
+ selected-state-text-color: map.get($systems, md-sys-color, on-primary-container),
162
+ ),
163
+ secondary: (), // Default, no overrides needed
164
+ tertiary: (
165
+ selected-state-background-color: map.get($systems, md-sys-color, tertiary-container),
166
+ selected-state-text-color: map.get($systems, md-sys-color, on-tertiary-container),
167
+ ),
168
+ error: (
169
+ selected-state-background-color: map.get($systems, md-sys-color, error-container),
170
+ selected-state-text-color: map.get($systems, md-sys-color, on-error-container),
171
+ )
172
+ ));
100
173
  }
101
174
 
102
175
  /// Generates custom tokens for the mat-card.
@@ -120,7 +193,7 @@
120
193
  /// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
121
194
  /// @return {Map} A set of custom tokens for the mdc-chip
122
195
  @function chip($systems, $exclude-hardcoded) {
123
- @return mat.private-merge-all(
196
+ @return (mat.private-merge-all(
124
197
  _generate-typography-tokens($systems, label-text, label-large),
125
198
  (
126
199
  container-shape: _hardcode((
@@ -128,11 +201,6 @@
128
201
  radius: 8px,
129
202
  ), $exclude-hardcoded),
130
203
  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
204
  label-text-color: map.get($systems, md-sys-color, on-surface-variant),
137
205
  disabled-label-text-color: mat.private-safe-color-change(
138
206
  map.get($systems, md-sys-color, on-surface),
@@ -152,8 +220,27 @@
152
220
  ),
153
221
  focus-state-layer-opacity: map.get($systems, md-sys-state, focus-state-layer-opacity),
154
222
  focus-state-layer-color: map.get($systems, md-sys-color, on-surface-variant),
223
+ outline-width: _hardcode(1px, $exclude-hardcoded),
224
+ outline-color: map.get($systems, md-sys-color, outline),
225
+ disabled-outline-color: mat.private-safe-color-change(
226
+ map.get($systems, md-sys-color, on-surface),
227
+ $alpha: 0.12,
228
+ ),
229
+ focus-outline-color: map.get($systems, md-sys-color, on-surface-variant),
155
230
  ),
156
- );
231
+ ), (
232
+ // Color variants:
233
+ primary: (
234
+ with-icon-selected-icon-color: map.get($systems, md-sys-color, on-primary-container),
235
+ ),
236
+ secondary: (), // Default, no overrides needed.
237
+ tertiary: (
238
+ with-icon-selected-icon-color: map.get($systems, md-sys-color, on-tertiary-container),
239
+ ),
240
+ error: (
241
+ with-icon-selected-icon-color: map.get($systems, md-sys-color, on-error-container),
242
+ )
243
+ ));
157
244
  }
158
245
 
159
246
  /// Generates custom tokens for the mat-datepicker.
@@ -161,15 +248,15 @@
161
248
  /// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
162
249
  /// @return {Map} A set of custom tokens for the mat-datepicker
163
250
  @function datepicker($systems, $exclude-hardcoded) {
164
- @return (
251
+ @return ((
165
252
  calendar-date-in-range-state-background-color:
166
253
  map.get($systems, md-sys-color, primary-container),
167
254
  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
255
  map.get($systems, md-sys-color, tertiary-container),
256
+ calendar-date-in-overlap-range-state-background-color:
257
+ map.get($systems, md-sys-color, secondary-container),
171
258
  calendar-date-in-overlap-range-selected-state-background-color:
172
- map.get($systems, md-sys-color, tertiary),
259
+ map.get($systems, md-sys-color, secondary),
173
260
  calendar-date-selected-state-text-color: map.get($systems, md-sys-color, on-primary),
174
261
  calendar-date-selected-state-background-color: map.get($systems, md-sys-color, primary),
175
262
  calendar-date-selected-disabled-state-background-color: mat.private-safe-color-change(
@@ -223,6 +310,65 @@
223
310
  calendar-period-button-text-weight: map.get($systems, md-sys-typescale, title-small-weight),
224
311
  calendar-header-text-size: map.get($systems, md-sys-typescale, title-small-size),
225
312
  calendar-header-text-weight: map.get($systems, md-sys-typescale, title-small-weight),
313
+ ), (
314
+ // Color variants:
315
+ primary: (), // Default, no overrides needed.
316
+ secondary: (
317
+ calendar-date-in-range-state-background-color:
318
+ map.get($systems, md-sys-color, secondary-container),
319
+ calendar-date-selected-state-text-color: map.get($systems, md-sys-color, on-secondary),
320
+ calendar-date-selected-state-background-color: map.get($systems, md-sys-color, secondary),
321
+ calendar-date-today-selected-state-outline-color: map.get($systems, md-sys-color, secondary),
322
+ calendar-date-today-outline-color: map.get($systems, md-sys-color, secondary),
323
+ calendar-date-preview-state-outline-color: map.get($systems, md-sys-color, secondary),
324
+ calendar-date-in-overlap-range-state-background-color:
325
+ map.get($systems, md-sys-color, primary-container),
326
+ calendar-date-in-overlap-range-selected-state-background-color:
327
+ map.get($systems, md-sys-color, primary),
328
+ ),
329
+ tertiary: (
330
+ calendar-date-in-range-state-background-color:
331
+ map.get($systems, md-sys-color, tertiary-container),
332
+ calendar-date-selected-state-text-color: map.get($systems, md-sys-color, on-tertiary),
333
+ calendar-date-selected-state-background-color: map.get($systems, md-sys-color, tertiary),
334
+ calendar-date-today-selected-state-outline-color: map.get($systems, md-sys-color, tertiary),
335
+ calendar-date-today-outline-color: map.get($systems, md-sys-color, tertiary),
336
+ calendar-date-preview-state-outline-color: map.get($systems, md-sys-color, tertiary),
337
+ calendar-date-in-comparison-range-state-background-color:
338
+ map.get($systems, md-sys-color, primary-container),
339
+ ),
340
+ error: (
341
+ calendar-date-in-range-state-background-color:
342
+ map.get($systems, md-sys-color, error-container),
343
+ calendar-date-selected-state-text-color: map.get($systems, md-sys-color, on-error),
344
+ calendar-date-selected-state-background-color: map.get($systems, md-sys-color, error),
345
+ calendar-date-today-selected-state-outline-color: map.get($systems, md-sys-color, error),
346
+ calendar-date-today-outline-color: map.get($systems, md-sys-color, error),
347
+ calendar-date-preview-state-outline-color: map.get($systems, md-sys-color, error),
348
+ )
349
+ ));
350
+ }
351
+
352
+ /// Generates custom tokens for the dialog.
353
+ /// @param {Map} $systems The MDC system tokens
354
+ /// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
355
+ /// @return {Map} A set of custom tokens for the dialog
356
+ @function dialog($systems, $exclude-hardcoded) {
357
+ @return (
358
+ container-max-width: _hardcode(560px, $exclude-hardcoded),
359
+ container-small-max-width: _hardcode(calc(100vw - 32px), $exclude-hardcoded),
360
+ container-min-width: _harcode(280px, $exclude-hardcoded),
361
+ actions-alignment: _hardcode(flex-end, $exclude-hardcoded),
362
+ content-padding: _hardcode(20px 24px, $exclude-hardcoded),
363
+ with-actions-content-padding: _hardcode(20px 24px 0, $exclude-hardcoded),
364
+ actions-padding: _hardcode(16px 24px, $exclude-hardcoded),
365
+
366
+ // The vertical padding values are a bit weird, because MDC uses a `::before` pseudo
367
+ // element to size the title which in turn means that we can't set a specific padding
368
+ // and get the exact same space out of it. These values were determined through
369
+ // trial and error so that the first line of text is 24px from the top and the bottom
370
+ // of the text is 16px from the content under it.
371
+ headline-padding: _hardcode(6px 24px 13px, $exclude-hardcoded),
226
372
  );
227
373
  }
228
374
 
@@ -272,9 +418,9 @@
272
418
  /// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
273
419
  /// @return {Map} A set of custom tokens for the mat-fab
274
420
  @function fab($systems, $exclude-hardcoded) {
275
- @return (
421
+ @return ((
276
422
  foreground-color: map.get($systems, md-sys-color, on-primary-container),
277
- state-layer-color: map.get($systems, md-sys-color, primary-container),
423
+ state-layer-color: map.get($systems, md-sys-color, on-primary-container),
278
424
  ripple-color: mat.private-safe-color-change(
279
425
  map.get($systems, md-sys-color, on-primary-container),
280
426
  $alpha: map.get($systems, md-sys-state, pressed-state-layer-opacity)
@@ -286,7 +432,67 @@
286
432
  map.get($systems, md-sys-color, on-surface), $alpha: 0.12),
287
433
  disabled-state-foreground-color: mat.private-safe-color-change(
288
434
  map.get($systems, md-sys-color, on-surface), $alpha: 0.38),
289
- );
435
+ ), (
436
+ // Color variants
437
+ primary: (), // Default, no overrides needed.
438
+ secondary: (
439
+ foreground-color: map.get($systems, md-sys-color, on-secondary-container),
440
+ state-layer-color: map.get($systems, md-sys-color, on-secondary-container),
441
+ ripple-color: mat.private-safe-color-change(
442
+ map.get($systems, md-sys-color, on-secondary-container),
443
+ $alpha: map.get($systems, md-sys-state, pressed-state-layer-opacity)
444
+ ),
445
+ ),
446
+ tertiary: (
447
+ foreground-color: map.get($systems, md-sys-color, on-tertiary-container),
448
+ state-layer-color: map.get($systems, md-sys-color, on-tertiary-container),
449
+ ripple-color: mat.private-safe-color-change(
450
+ map.get($systems, md-sys-color, on-tertiary-container),
451
+ $alpha: map.get($systems, md-sys-state, pressed-state-layer-opacity)
452
+ ),
453
+ )
454
+ ));
455
+ }
456
+
457
+ /// Generates custom tokens for the mat-mini-fab.
458
+ /// @param {Map} $systems The MDC system tokens
459
+ /// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
460
+ /// @return {Map} A set of custom tokens for the mat-mini-fab
461
+ @function fab-small($systems, $exclude-hardcoded) {
462
+ @return ((
463
+ foreground-color: map.get($systems, md-sys-color, on-primary-container),
464
+ state-layer-color: map.get($systems, md-sys-color, on-primary-container),
465
+ ripple-color: mat.private-safe-color-change(
466
+ map.get($systems, md-sys-color, on-primary-container),
467
+ $alpha: map.get($systems, md-sys-state, pressed-state-layer-opacity)
468
+ ),
469
+ hover-state-layer-opacity: map.get($systems, md-sys-state, hover-state-layer-opacity),
470
+ focus-state-layer-opacity: map.get($systems, md-sys-state, focus-state-layer-opacity),
471
+ pressed-state-layer-opacity: map.get($systems, md-sys-state, pressed-state-layer-opacity),
472
+ disabled-state-container-color: mat.private-safe-color-change(
473
+ map.get($systems, md-sys-color, on-surface), $alpha: 0.12),
474
+ disabled-state-foreground-color: mat.private-safe-color-change(
475
+ map.get($systems, md-sys-color, on-surface), $alpha: 0.38),
476
+ ), (
477
+ // Color variants
478
+ primary: (), // Default, no overrides needed.
479
+ secondary: (
480
+ foreground-color: map.get($systems, md-sys-color, on-secondary-container),
481
+ state-layer-color: map.get($systems, md-sys-color, on-secondary-container),
482
+ ripple-color: mat.private-safe-color-change(
483
+ map.get($systems, md-sys-color, on-secondary-container),
484
+ $alpha: map.get($systems, md-sys-state, pressed-state-layer-opacity)
485
+ ),
486
+ ),
487
+ tertiary: (
488
+ foreground-color: map.get($systems, md-sys-color, on-tertiary-container),
489
+ state-layer-color: map.get($systems, md-sys-color, on-tertiary-container),
490
+ ripple-color: mat.private-safe-color-change(
491
+ map.get($systems, md-sys-color, on-tertiary-container),
492
+ $alpha: map.get($systems, md-sys-state, pressed-state-layer-opacity)
493
+ ),
494
+ )
495
+ ));
290
496
  }
291
497
 
292
498
  /// Generates custom tokens for the mat-form-field.
@@ -294,7 +500,7 @@
294
500
  /// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
295
501
  /// @return {Map} A set of custom tokens for the mat-form-field
296
502
  @function form-field($systems, $exclude-hardcoded) {
297
- @return mat.private-merge-all(
503
+ @return (mat.private-merge-all(
298
504
  _generate-typography-tokens($systems, container-text, body-large),
299
505
  _generate-typography-tokens($systems, subscript-text, body-small),
300
506
  (
@@ -324,7 +530,19 @@
324
530
  error-hover-trailing-icon-color: map.get($systems, md-sys-color, on-error-container),
325
531
  error-trailing-icon-color: map.get($systems, md-sys-color, error),
326
532
  )
327
- );
533
+ ), (
534
+ // Color variants:
535
+ primary: (), // Default, no overrides needed.
536
+ secondary: (
537
+ focus-select-arrow-color: map.get($systems, md-sys-color, secondary),
538
+ ),
539
+ tertiary: (
540
+ focus-select-arrow-color: map.get($systems, md-sys-color, tertiary),
541
+ ),
542
+ error: (
543
+ focus-select-arrow-color: map.get($systems, md-sys-color, error),
544
+ )
545
+ ));
328
546
  }
329
547
 
330
548
  /// Generates custom tokens for the mat-grid-list.
@@ -349,6 +567,7 @@
349
567
  color: _hardcode(inherit, $exclude-hardcoded),
350
568
  ), (
351
569
  // Color variants:
570
+ surface: (), // Default, no overrides needed.
352
571
  primary: (
353
572
  color: map.get($systems, md-sys-color, primary),
354
573
  ),
@@ -369,7 +588,11 @@
369
588
  /// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
370
589
  /// @return {Map} A set of custom tokens for the mat-button
371
590
  @function text-button($systems, $exclude-hardcoded) {
372
- @return (
591
+ @return ((
592
+ horizontal-padding: _hardcode(12px, $exclude-hardcoded),
593
+ with-icon-horizontal-padding: _hardcode(16px, $exclude-hardcoded),
594
+ icon-spacing: _hardcode(8px, $exclude-hardcoded),
595
+ icon-offset: _hardcode(-4px, $exclude-hardcoded),
373
596
  state-layer-color: map.get($systems, md-sys-color, primary),
374
597
  disabled-state-layer-color: map.get($systems, md-sys-color, on-surface-variant),
375
598
  ripple-color: mat.private-safe-color-change(
@@ -379,7 +602,31 @@
379
602
  hover-state-layer-opacity: map.get($systems, md-sys-state, hover-state-layer-opacity),
380
603
  focus-state-layer-opacity: map.get($systems, md-sys-state, focus-state-layer-opacity),
381
604
  pressed-state-layer-opacity: map.get($systems, md-sys-state, pressed-state-layer-opacity),
382
- );
605
+ ), (
606
+ // Color variants:
607
+ primary: (), // Default, no overrides needed.
608
+ secondary: (
609
+ state-layer-color: map.get($systems, md-sys-color, secondary),
610
+ ripple-color: mat.private-safe-color-change(
611
+ map.get($systems, md-sys-color, secondary),
612
+ $alpha: map.get($systems, md-sys-state, pressed-state-layer-opacity)
613
+ )
614
+ ),
615
+ tertiary: (
616
+ state-layer-color: map.get($systems, md-sys-color, tertiary),
617
+ ripple-color: mat.private-safe-color-change(
618
+ map.get($systems, md-sys-color, tertiary),
619
+ $alpha: map.get($systems, md-sys-state, pressed-state-layer-opacity)
620
+ )
621
+ ),
622
+ error: (
623
+ state-layer-color: map.get($systems, md-sys-color, error),
624
+ ripple-color: mat.private-safe-color-change(
625
+ map.get($systems, md-sys-color, error),
626
+ $alpha: map.get($systems, md-sys-state, pressed-state-layer-opacity)
627
+ )
628
+ )
629
+ ));
383
630
  }
384
631
 
385
632
  /// Generates custom tokens for the mat-flat-button.
@@ -387,7 +634,10 @@
387
634
  /// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
388
635
  /// @return {Map} A set of custom tokens for the mat-flat-button
389
636
  @function filled-button($systems, $exclude-hardcoded) {
390
- @return (
637
+ @return ((
638
+ horizontal-padding: _hardcode(24px, $exclude-hardcoded),
639
+ icon-spacing: _hardcode(8px, $exclude-hardcoded),
640
+ icon-offset: _hardcode(-8px, $exclude-hardcoded),
391
641
  state-layer-color: map.get($systems, md-sys-color, on-primary),
392
642
  disabled-state-layer-color: map.get($systems, md-sys-color, on-surface-variant),
393
643
  ripple-color: mat.private-safe-color-change(
@@ -397,7 +647,31 @@
397
647
  hover-state-layer-opacity: map.get($systems, md-sys-state, hover-state-layer-opacity),
398
648
  focus-state-layer-opacity: map.get($systems, md-sys-state, focus-state-layer-opacity),
399
649
  pressed-state-layer-opacity: map.get($systems, md-sys-state, pressed-state-layer-opacity),
400
- );
650
+ ), (
651
+ // Color variants:
652
+ primary: (), // Default, no overrides needed.
653
+ secondary: (
654
+ state-layer-color: map.get($systems, md-sys-color, on-secondary),
655
+ ripple-color: mat.private-safe-color-change(
656
+ map.get($systems, md-sys-color, on-secondary),
657
+ $alpha: map.get($systems, md-sys-state, pressed-state-layer-opacity)
658
+ ),
659
+ ),
660
+ tertiary: (
661
+ state-layer-color: map.get($systems, md-sys-color, on-tertiary),
662
+ ripple-color: mat.private-safe-color-change(
663
+ map.get($systems, md-sys-color, on-tertiary),
664
+ $alpha: map.get($systems, md-sys-state, pressed-state-layer-opacity)
665
+ ),
666
+ ),
667
+ error: (
668
+ state-layer-color: map.get($systems, md-sys-color, on-error),
669
+ ripple-color: mat.private-safe-color-change(
670
+ map.get($systems, md-sys-color, on-error),
671
+ $alpha: map.get($systems, md-sys-state, pressed-state-layer-opacity)
672
+ ),
673
+ )
674
+ ));
401
675
  }
402
676
 
403
677
  /// Generates custom tokens for the mat-raised-button.
@@ -405,7 +679,10 @@
405
679
  /// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
406
680
  /// @return {Map} A set of custom tokens for the mat-raised-button
407
681
  @function elevated-button($systems, $exclude-hardcoded) {
408
- @return (
682
+ @return ((
683
+ horizontal-padding: _hardcode(24px, $exclude-hardcoded),
684
+ icon-spacing: _hardcode(8px, $exclude-hardcoded),
685
+ icon-offset: _hardcode(-8px, $exclude-hardcoded),
409
686
  state-layer-color: map.get($systems, md-sys-color, primary),
410
687
  disabled-state-layer-color: map.get($systems, md-sys-color, on-surface-variant),
411
688
  ripple-color: mat.private-safe-color-change(
@@ -415,7 +692,31 @@
415
692
  hover-state-layer-opacity: map.get($systems, md-sys-state, hover-state-layer-opacity),
416
693
  focus-state-layer-opacity: map.get($systems, md-sys-state, focus-state-layer-opacity),
417
694
  pressed-state-layer-opacity: map.get($systems, md-sys-state, pressed-state-layer-opacity),
418
- );
695
+ ), (
696
+ // Color variants:
697
+ primary: (), // Default, no overrides needed.
698
+ secondary: (
699
+ state-layer-color: map.get($systems, md-sys-color, secondary),
700
+ ripple-color: mat.private-safe-color-change(
701
+ map.get($systems, md-sys-color, secondary),
702
+ $alpha: map.get($systems, md-sys-state, pressed-state-layer-opacity)
703
+ ),
704
+ ),
705
+ tertiary: (
706
+ state-layer-color: map.get($systems, md-sys-color, tertiary),
707
+ ripple-color: mat.private-safe-color-change(
708
+ map.get($systems, md-sys-color, tertiary),
709
+ $alpha: map.get($systems, md-sys-state, pressed-state-layer-opacity)
710
+ ),
711
+ ),
712
+ error: (
713
+ state-layer-color: map.get($systems, md-sys-color, error),
714
+ ripple-color: mat.private-safe-color-change(
715
+ map.get($systems, md-sys-color, error),
716
+ $alpha: map.get($systems, md-sys-state, pressed-state-layer-opacity)
717
+ ),
718
+ )
719
+ ));
419
720
  }
420
721
 
421
722
  /// Generates custom tokens for the mat-outlined-button.
@@ -423,7 +724,10 @@
423
724
  /// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
424
725
  /// @return {Map} A set of custom tokens for the mat-outlined-button
425
726
  @function outlined-button($systems, $exclude-hardcoded) {
426
- @return (
727
+ @return ((
728
+ horizontal-padding: _hardcode(24px, $exclude-hardcoded),
729
+ icon-spacing: _hardcode(8px, $exclude-hardcoded),
730
+ icon-offset: _hardcode(-8px, $exclude-hardcoded),
427
731
  state-layer-color: map.get($systems, md-sys-color, primary),
428
732
  disabled-state-layer-color: map.get($systems, md-sys-color, on-surface-variant),
429
733
  ripple-color: mat.private-safe-color-change(
@@ -433,7 +737,31 @@
433
737
  hover-state-layer-opacity: map.get($systems, md-sys-state, hover-state-layer-opacity),
434
738
  focus-state-layer-opacity: map.get($systems, md-sys-state, focus-state-layer-opacity),
435
739
  pressed-state-layer-opacity: map.get($systems, md-sys-state, pressed-state-layer-opacity),
436
- );
740
+ ), (
741
+ // Color variants:
742
+ primary: (), // Default, no overrides needed.
743
+ secondary: (
744
+ state-layer-color: map.get($systems, md-sys-color, secondary),
745
+ ripple-color: mat.private-safe-color-change(
746
+ map.get($systems, md-sys-color, secondary),
747
+ $alpha: map.get($systems, md-sys-state, pressed-state-layer-opacity)
748
+ ),
749
+ ),
750
+ tertiary: (
751
+ state-layer-color: map.get($systems, md-sys-color, tertiary),
752
+ ripple-color: mat.private-safe-color-change(
753
+ map.get($systems, md-sys-color, tertiary),
754
+ $alpha: map.get($systems, md-sys-state, pressed-state-layer-opacity)
755
+ ),
756
+ ),
757
+ error: (
758
+ state-layer-color: map.get($systems, md-sys-color, error),
759
+ ripple-color: mat.private-safe-color-change(
760
+ map.get($systems, md-sys-color, error),
761
+ $alpha: map.get($systems, md-sys-state, pressed-state-layer-opacity)
762
+ ),
763
+ )
764
+ ));
437
765
  }
438
766
 
439
767
  /// Generates custom tokens for the mat-icon-button.
@@ -496,9 +824,7 @@
496
824
  /// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
497
825
  /// @return {Map} A set of custom tokens for the mat-option
498
826
  @function option($systems, $exclude-hardcoded) {
499
- @return mat.private-merge-all(
500
- _generate-typography-tokens($systems, label-text, label-large),
501
- (
827
+ @return ((
502
828
  selected-state-label-text-color: map.get($systems, md-sys-color, on-secondary-container),
503
829
  label-text-color: map.get($systems, md-sys-color, on-surface),
504
830
  hover-state-layer-color: mat.private-safe-color-change(
@@ -510,8 +836,33 @@
510
836
  $alpha: map.get($systems, md-sys-state, focus-state-layer-opacity)
511
837
  ),
512
838
  selected-state-layer-color: map.get($systems, md-sys-color, secondary-container),
839
+
840
+ // According to the spec the options have to be `label-large` in all typography
841
+ // dimensions, however this is inconsistent with the designs and with MDC's
842
+ // own implementation. This appears to be a bug in the spec, because MDC overrides
843
+ // the font size and weight to be `body-large` (see b/261838263). We make the same
844
+ // override here so the label looks correct.
845
+ label-text-size: map.get($systems, md-sys-typescale, body-large-size),
846
+ label-text-weight: map.get($systems, md-sys-typescale, body-large-weight),
847
+ label-text-font: map.get($systems, md-sys-typescale, label-large-font),
848
+ label-text-line-height: map.get($systems, md-sys-typescale, label-large-line-height),
849
+ label-text-tracking: map.get($systems, md-sys-typescale, label-large-tracking),
850
+ ), (
851
+ // Color variants:
852
+ primary: (
853
+ selected-state-label-text-color: map.get($systems, md-sys-color, on-primary-container),
854
+ selected-state-layer-color: map.get($systems, md-sys-color, primary-container),
513
855
  ),
514
- );
856
+ secondary: (), // Default, no overrides needed
857
+ tertiary: (
858
+ selected-state-label-text-color: map.get($systems, md-sys-color, on-tertiary-container),
859
+ selected-state-layer-color: map.get($systems, md-sys-color, tertiary-container),
860
+ ),
861
+ error: (
862
+ selected-state-label-text-color: map.get($systems, md-sys-color, on-error-container),
863
+ selected-state-layer-color: map.get($systems, md-sys-color, error-container),
864
+ )
865
+ ));
515
866
  }
516
867
 
517
868
  /// Generates custom tokens for the mat-paginator.
@@ -532,16 +883,98 @@
532
883
  );
533
884
  }
534
885
 
886
+ /// Generates custom tokens for the full variant of mat-pseudo-checkbox.
887
+ /// @param {Map} $systems The MDC system tokens
888
+ /// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
889
+ /// @return {Map} A set of custom tokens for the full variant of mat-pseudo-checkbox
890
+ @function full-pseudo-checkbox($systems, $exclude-hardcoded) {
891
+ $disabled-color: mat.private-safe-color-change(
892
+ map.get($systems, md-sys-color, on-surface), $alpha: 0.38);
893
+
894
+ @return ((
895
+ selected-icon-color: map.get($systems, md-sys-color, primary),
896
+ selected-checkmark-color: map.get($systems, md-sys-color, on-primary),
897
+ unselected-icon-color: map.get($systems, md-sys-color, on-surface-variant),
898
+ disabled-selected-checkmark-color: map.get($systems, md-sys-color, surface),
899
+ disabled-unselected-icon-color: $disabled-color,
900
+ disabled-selected-icon-color: $disabled-color,
901
+ ), (
902
+ // Color variants:
903
+ primary: (), // Default, no overrides needed.
904
+ secondary: (
905
+ selected-icon-color: map.get($systems, md-sys-color, secondary),
906
+ selected-checkmark-color: map.get($systems, md-sys-color, on-secondary),
907
+ ),
908
+ tertiary: (
909
+ selected-icon-color: map.get($systems, md-sys-color, tertiary),
910
+ selected-checkmark-color: map.get($systems, md-sys-color, on-tertiary),
911
+ ),
912
+ error: (
913
+ selected-icon-color: map.get($systems, md-sys-color, error),
914
+ selected-checkmark-color: map.get($systems, md-sys-color, on-error),
915
+ )
916
+ ));
917
+ }
918
+
919
+ /// Generates custom tokens for the minimal variant of mat-pseudo-checkbox.
920
+ /// @param {Map} $systems The MDC system tokens
921
+ /// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
922
+ /// @return {Map} A set of custom tokens for the minimal variant of mat-pseudo-checkbox
923
+ @function minimal-pseudo-checkbox($systems, $exclude-hardcoded) {
924
+ @return ((
925
+ selected-checkmark-color: map.get($systems, md-sys-color, primary),
926
+ disabled-selected-checkmark-color: mat.private-safe-color-change(
927
+ map.get($systems, md-sys-color, on-surface), $alpha: 0.38),
928
+ ), (
929
+ // Color variants:
930
+ primary: (), // Default, no overrides needed.
931
+ secondary: (
932
+ selected-checkmark-color: map.get($systems, md-sys-color, secondary),
933
+ ),
934
+ tertiary: (
935
+ selected-checkmark-color: map.get($systems, md-sys-color, tertiary),
936
+ ),
937
+ error: (
938
+ selected-checkmark-color: map.get($systems, md-sys-color, error),
939
+ )
940
+ ));
941
+ }
942
+
943
+ /// Generates custom tokens for mat-checkbox.
944
+ /// @param {Map} $systems The MDC system tokens
945
+ /// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
946
+ /// @return {Map} A set of custom tokens for mat-checkbox
947
+ @function checkbox($systems, $exclude-hardcoded) {
948
+ @return (
949
+ disabled-label-color: mat.private-safe-color-change(
950
+ map.get($systems, md-sys-color, on-surface), $alpha: 0.38),
951
+ );
952
+ }
953
+
954
+
535
955
  /// Generates custom tokens for the mat-radio.
536
956
  /// @param {Map} $systems The MDC system tokens
537
957
  /// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
538
958
  /// @return {Map} A set of custom tokens for the mat-radio
539
959
  @function radio($systems, $exclude-hardcoded) {
540
- @return (
960
+ @return ((
541
961
  ripple-color: map.get($systems, md-sys-color, on-surface),
542
962
  checked-ripple-color: map.get($systems, md-sys-color, primary),
543
- disabled-label-color: map.get($systems, md-sys-color, on-surface),
544
- );
963
+ disabled-label-color: mat.private-safe-color-change(
964
+ map.get($systems, md-sys-color, on-surface), $alpha: 0.38),
965
+ ), (
966
+ // Color variants:
967
+ primary: (), // Default, no overrides needed
968
+ secondary: (
969
+ checked-ripple-color: map.get($systems, md-sys-color, secondary),
970
+ ),
971
+ tertiary: (
972
+ checked-ripple-color: map.get($systems, md-sys-color, tertiary),
973
+ ),
974
+ error: (
975
+ checked-ripple-color: map.get($systems, md-sys-color, error),
976
+ ),
977
+ ));
545
978
  }
546
979
 
547
980
  /// Generates custom tokens for the mat-ripple.
@@ -559,7 +992,7 @@
559
992
  /// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
560
993
  /// @return {Map} A set of custom tokens for the mat-select
561
994
  @function select($systems, $exclude-hardcoded) {
562
- @return mat.private-merge-all(
995
+ @return (mat.private-merge-all(
563
996
  _generate-typography-tokens($systems, trigger-text, body-large),
564
997
  (
565
998
  panel-background-color: map.get($systems, md-sys-color, surface-container),
@@ -573,7 +1006,19 @@
573
1006
  focused-arrow-color: map.get($systems, md-sys-color, primary),
574
1007
  invalid-arrow-color: map.get($systems, md-sys-color, error),
575
1008
  )
576
- );
1009
+ ), (
1010
+ // Color variants:
1011
+ primary: (), // Default, no overrides needed
1012
+ secondary: (
1013
+ focused-arrow-color: map.get($systems, md-sys-color, secondary),
1014
+ ),
1015
+ tertiary: (
1016
+ focused-arrow-color: map.get($systems, md-sys-color, tertiary),
1017
+ ),
1018
+ error: (
1019
+ focused-arrow-color: map.get($systems, md-sys-color, error),
1020
+ )
1021
+ ));
577
1022
  }
578
1023
 
579
1024
  /// Generates custom tokens for the mat-sidenav.
@@ -593,27 +1038,17 @@
593
1038
  );
594
1039
  }
595
1040
 
596
- /// Generates custom tokens for the mat-slide-toggle.
597
- /// @param {Map} $systems The MDC system tokens
598
- /// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
599
- /// @return {Map} A set of custom tokens for the mat-slide-toggle
600
- @function slide-toggle($systems, $exclude-hardcoded) {
601
- @return _generate-typography-tokens($systems, label-text, label-large);
602
- }
603
-
604
1041
  /// Generates custom tokens for the mat-slider.
605
1042
  /// @param {Map} $systems The MDC system tokens
606
1043
  /// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
607
1044
  /// @return {Map} A set of custom tokens for the mat-slider
608
1045
  @function slider($systems, $exclude-hardcoded) {
609
- $ripple-color: map.get($systems, md-sys-color, primary);
610
- $hover-ripple-color: if($ripple-color == null, null, #{rgba($ripple-color, 0.05)});
611
- $focus-ripple-color: if($ripple-color == null, null, #{rgba($ripple-color, 0.2)});
612
-
613
- @return (
614
- ripple-color: $ripple-color,
615
- hover-state-layer-color: $hover-ripple-color,
616
- focus-state-layer-color: $focus-ripple-color,
1046
+ @return ((
1047
+ ripple-color: map.get($systems, md-sys-color, primary),
1048
+ hover-state-layer-color: mat.private-safe-color-change(
1049
+ map.get($systems, md-sys-color, primary), $alpha: 0.05),
1050
+ focus-state-layer-color: mat.private-safe-color-change(
1051
+ map.get($systems, md-sys-color, primary), $alpha: 0.2),
617
1052
  value-indicator-opacity: _hardcode(1, $exclude-hardcoded),
618
1053
  value-indicator-padding: _hardcode(0, $exclude-hardcoded),
619
1054
  value-indicator-width: _hardcode(28px, $exclude-hardcoded),
@@ -623,7 +1058,31 @@
623
1058
  value-indicator-text-transform: _hardcode(rotate(45deg), $exclude-hardcoded),
624
1059
  value-indicator-container-transform:
625
1060
  _hardcode(translateX(-50%) rotate(-45deg), $exclude-hardcoded)
626
- );
1061
+ ), (
1062
+ // Color variants
1063
+ primary: (), // Default, no overrides needed
1064
+ secondary: (
1065
+ ripple-color: map.get($systems, md-sys-color, secondary),
1066
+ hover-state-layer-color: mat.private-safe-color-change(
1067
+ map.get($systems, md-sys-color, secondary), $alpha: 0.05),
1068
+ focus-state-layer-color: mat.private-safe-color-change(
1069
+ map.get($systems, md-sys-color, secondary), $alpha: 0.2),
1070
+ ),
1071
+ tertiary: (
1072
+ ripple-color: map.get($systems, md-sys-color, tertiary),
1073
+ hover-state-layer-color: mat.private-safe-color-change(
1074
+ map.get($systems, md-sys-color, tertiary), $alpha: 0.05),
1075
+ focus-state-layer-color: mat.private-safe-color-change(
1076
+ map.get($systems, md-sys-color, tertiary), $alpha: 0.2),
1077
+ ),
1078
+ error: (
1079
+ ripple-color: map.get($systems, md-sys-color, error),
1080
+ hover-state-layer-color: mat.private-safe-color-change(
1081
+ map.get($systems, md-sys-color, error), $alpha: 0.05),
1082
+ focus-state-layer-color: mat.private-safe-color-change(
1083
+ map.get($systems, md-sys-color, error), $alpha: 0.2),
1084
+ ),
1085
+ ));
627
1086
  }
628
1087
 
629
1088
  /// Generates custom tokens for the mat-snack-bar.
@@ -651,7 +1110,7 @@
651
1110
  /// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
652
1111
  /// @return {Map} A set of custom tokens for the mat-stepper
653
1112
  @function stepper($systems, $exclude-hardcoded) {
654
- @return mat.private-merge-all(
1113
+ @return (
655
1114
  (
656
1115
  container-color: map.get($systems, md-sys-color, surface),
657
1116
  line-color: map.get($systems, md-sys-color, outline-variant),
@@ -665,9 +1124,11 @@
665
1124
  ),
666
1125
  header-label-text-color: map.get($systems, md-sys-color, on-surface-variant),
667
1126
  header-optional-label-text-color: map.get($systems, md-sys-color, on-surface-variant),
668
- header-selected-state-label-text-color: map.get($systems, md-sys-color, on-surface),
669
- header-icon-background-color: map.get($systems, md-sys-color, inverse-surface),
670
- header-icon-foreground-color: map.get($systems, md-sys-color, inverse-on-surface),
1127
+ header-selected-state-label-text-color: map.get($systems, md-sys-color, on-surface-variant),
1128
+ header-icon-background-color: map.get($systems, md-sys-color, on-surface-variant),
1129
+ header-icon-foreground-color: map.get($systems, md-sys-color, surface),
1130
+ header-edit-state-icon-background-color: map.get($systems, md-sys-color, primary),
1131
+ header-edit-state-icon-foreground-color: map.get($systems, md-sys-color, on-primary),
671
1132
  header-error-state-label-text-color: map.get($systems, md-sys-color, error),
672
1133
  header-error-state-icon-foreground-color: map.get($systems, md-sys-color, error),
673
1134
  header-error-state-icon-background-color: _hardcode(transparent, $exclude-hardcoded),
@@ -676,10 +1137,40 @@
676
1137
  header-label-text-size: map.get($systems, md-sys-typescale, title-small-size),
677
1138
  header-label-text-weight: map.get($systems, md-sys-typescale, title-small-weight),
678
1139
  header-error-state-label-text-size: map.get($systems, md-sys-typescale, title-small-size),
679
- header-selected-state-label-text-size: map.get($systems, md-sys-typescale, title-small-szie),
1140
+ header-focus-state-layer-shape: map.get($systems, md-sys-shape, corner-medium),
1141
+ header-hover-state-layer-shape: map.get($systems, md-sys-shape, corner-medium),
1142
+ header-selected-state-label-text-size: map.get($systems, md-sys-typescale, title-small-size),
680
1143
  header-selected-state-label-text-weight: map.get(
681
1144
  $systems, md-sys-typescale, title-small-weight),
682
- ),
1145
+ header-selected-state-icon-background-color: map.get($systems, md-sys-color, primary),
1146
+ header-selected-state-icon-foreground-color: map.get($systems, md-sys-color, on-primary),
1147
+ ), (
1148
+ // Color variants
1149
+ primary: (
1150
+ header-edit-state-icon-background-color: map.get($systems, md-sys-color, primary),
1151
+ header-edit-state-icon-foreground-color: map.get($systems, md-sys-color, on-primary),
1152
+ header-selected-state-icon-background-color: map.get($systems, md-sys-color, primary),
1153
+ header-selected-state-icon-foreground-color: map.get($systems, md-sys-color, on-primary),
1154
+ ),
1155
+ secondary: (
1156
+ header-edit-state-icon-background-color: map.get($systems, md-sys-color, secondary),
1157
+ header-edit-state-icon-foreground-color: map.get($systems, md-sys-color, on-secondary),
1158
+ header-selected-state-icon-background-color: map.get($systems, md-sys-color, secondary),
1159
+ header-selected-state-icon-foreground-color: map.get($systems, md-sys-color, on-secondary),
1160
+ ),
1161
+ tertiary: (
1162
+ header-edit-state-icon-background-color: map.get($systems, md-sys-color, tertiary),
1163
+ header-edit-state-icon-foreground-color: map.get($systems, md-sys-color, on-tertiary),
1164
+ header-selected-state-icon-background-color: map.get($systems, md-sys-color, tertiary),
1165
+ header-selected-state-icon-foreground-color: map.get($systems, md-sys-color, on-tertiary),
1166
+ ),
1167
+ error: (
1168
+ header-edit-state-icon-background-color: map.get($systems, md-sys-color, error),
1169
+ header-edit-state-icon-foreground-color: map.get($systems, md-sys-color, on-error),
1170
+ header-selected-state-icon-background-color: map.get($systems, md-sys-color, error),
1171
+ header-selected-state-icon-foreground-color: map.get($systems, md-sys-color, on-error),
1172
+ )
1173
+ )
683
1174
  );
684
1175
  }
685
1176
 
@@ -688,7 +1179,7 @@
688
1179
  /// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
689
1180
  /// @return {Map} A set of custom tokens for the mat-tab-header
690
1181
  @function tab-header($systems, $exclude-hardcoded) {
691
- @return mat.private-merge-all(
1182
+ @return (mat.private-merge-all(
692
1183
  _generate-typography-tokens($systems, label-text, title-small),
693
1184
  (
694
1185
  divider-color: map.get($systems, md-sys-color, surface-variant),
@@ -706,7 +1197,22 @@
706
1197
  active-focus-indicator-color: map.get($systems, md-sys-color, primary),
707
1198
  active-hover-indicator-color: map.get($systems, md-sys-color, primary),
708
1199
  ),
709
- );
1200
+ ), (
1201
+ // Color variants
1202
+ primary: (), // Default, no overrides needed
1203
+ secondary: (
1204
+ active-focus-indicator-color: map.get($systems, md-sys-color, secondary),
1205
+ active-hover-indicator-color: map.get($systems, md-sys-color, secondary),
1206
+ ),
1207
+ tertiary: (
1208
+ active-focus-indicator-color: map.get($systems, md-sys-color, tertiary),
1209
+ active-hover-indicator-color: map.get($systems, md-sys-color, tertiary),
1210
+ ),
1211
+ error: (
1212
+ active-focus-indicator-color: map.get($systems, md-sys-color, error),
1213
+ active-hover-indicator-color: map.get($systems, md-sys-color, error),
1214
+ )
1215
+ ));
710
1216
  }
711
1217
 
712
1218
  /// Generates custom tokens for the mdc-tab-indicator. (MDC has a tab-indicator component, but they
@@ -716,11 +1222,23 @@
716
1222
  /// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
717
1223
  /// @return {Map} A set of custom tokens for the mdc-tab-indicator
718
1224
  @function tab-indicator($systems, $exclude-hardcoded) {
719
- @return (
1225
+ @return ((
720
1226
  active-indicator-height: _hardcode(2px, $exclude-hardcoded),
721
1227
  active-indicator-shape: _hardcode(0, $exclude-hardcoded),
722
1228
  active-indicator-color: map.get($systems, md-sys-color, primary),
723
- );
1229
+ ), (
1230
+ // Color variants
1231
+ primary: (), // Default, no overrides needed
1232
+ secondary: (
1233
+ active-indicator-color: map.get($systems, md-sys-color, secondary),
1234
+ ),
1235
+ tertiary: (
1236
+ active-indicator-color: map.get($systems, md-sys-color, tertiary),
1237
+ ),
1238
+ error: (
1239
+ active-indicator-color: map.get($systems, md-sys-color, error),
1240
+ )
1241
+ ));
724
1242
  }
725
1243
 
726
1244
  /// Generates custom tokens for the mat-table.
@@ -748,11 +1266,11 @@
748
1266
  /// @return {Map} A set of custom tokens for the mat-toolbar
749
1267
  @function toolbar($systems, $exclude-hardcoded) {
750
1268
  @return mat.private-merge-all(
751
- _generate-typography-tokens($systems, title-text, title-large),
752
- (
753
- container-background-color: map.get($systems, md-sys-color, surface),
754
- container-text-color: map.get($systems, md-sys-color, on-surface),
755
- )
1269
+ _generate-typography-tokens($systems, title-text, title-large),
1270
+ (
1271
+ container-background-color: map.get($systems, md-sys-color, surface),
1272
+ container-text-color: map.get($systems, md-sys-color, on-surface),
1273
+ )
756
1274
  );
757
1275
  }
758
1276
 
@@ -769,3 +1287,496 @@
769
1287
  node-text-weight: map.get($systems, md-sys-typescale, body-large-weight),
770
1288
  );
771
1289
  }
1290
+
1291
+ /// Generates custom token overrides for the mdc-checkbox color variants.
1292
+ /// @param {Map} $systems The MDC system tokens
1293
+ /// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
1294
+ /// @return {Map} A set of color variant token overrides for the mdc-checkbox
1295
+ @function mdc-checkbox-color-variants($systems, $exclude-hardcoded) {
1296
+ @return (
1297
+ primary: (), // Default, no overrides needed
1298
+ secondary: (
1299
+ selected-container-color: map.get($systems, md-sys-color, secondary),
1300
+ selected-focus-container-color: map.get($systems, md-sys-color, secondary),
1301
+ selected-focus-icon-color: map.get($systems, md-sys-color, on-secondary),
1302
+ selected-focus-state-layer-color: map.get($systems, md-sys-color, secondary),
1303
+ selected-hover-container-color: map.get($systems, md-sys-color, secondary),
1304
+ selected-hover-icon-color: map.get($systems, md-sys-color, on-secondary),
1305
+ selected-hover-state-layer-color: map.get($systems, md-sys-color, secondary),
1306
+ selected-icon-color: map.get($systems, md-sys-color, on-secondary),
1307
+ selected-pressed-container-color: map.get($systems, md-sys-color, secondary),
1308
+ selected-pressed-icon-color: map.get($systems, md-sys-color, on-secondary),
1309
+ unselected-pressed-state-layer-color: map.get($systems, md-sys-color, secondary),
1310
+ ),
1311
+ tertiary: (
1312
+ selected-container-color: map.get($systems, md-sys-color, tertiary),
1313
+ selected-focus-container-color: map.get($systems, md-sys-color, tertiary),
1314
+ selected-focus-icon-color: map.get($systems, md-sys-color, on-tertiary),
1315
+ selected-focus-state-layer-color: map.get($systems, md-sys-color, tertiary),
1316
+ selected-hover-container-color: map.get($systems, md-sys-color, tertiary),
1317
+ selected-hover-icon-color: map.get($systems, md-sys-color, on-tertiary),
1318
+ selected-hover-state-layer-color: map.get($systems, md-sys-color, tertiary),
1319
+ selected-icon-color: map.get($systems, md-sys-color, on-tertiary),
1320
+ selected-pressed-container-color: map.get($systems, md-sys-color, tertiary),
1321
+ selected-pressed-icon-color: map.get($systems, md-sys-color, on-tertiary),
1322
+ unselected-pressed-state-layer-color: map.get($systems, md-sys-color, tertiary),
1323
+ ),
1324
+ error: (
1325
+ selected-container-color: map.get($systems, md-sys-color, error),
1326
+ selected-focus-container-color: map.get($systems, md-sys-color, error),
1327
+ selected-focus-icon-color: map.get($systems, md-sys-color, on-error),
1328
+ selected-focus-state-layer-color: map.get($systems, md-sys-color, error),
1329
+ selected-hover-container-color: map.get($systems, md-sys-color, error),
1330
+ selected-hover-icon-color: map.get($systems, md-sys-color, on-error),
1331
+ selected-hover-state-layer-color: map.get($systems, md-sys-color, error),
1332
+ selected-icon-color: map.get($systems, md-sys-color, on-error),
1333
+ selected-pressed-container-color: map.get($systems, md-sys-color, error),
1334
+ selected-pressed-icon-color: map.get($systems, md-sys-color, on-error),
1335
+ unselected-pressed-state-layer-color: map.get($systems, md-sys-color, error),
1336
+ )
1337
+ );
1338
+ }
1339
+
1340
+ /// Generates custom token overrides for the mdc-slider color variants.
1341
+ /// @param {Map} $systems The MDC system tokens
1342
+ /// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
1343
+ /// @return {Map} A set of color variant token overrides for the mdc-slider
1344
+ @function mdc-slider-color-variants($systems, $exclude-hardcoded) {
1345
+ @return (
1346
+ primary: (), // Default, no overrides needed
1347
+ secondary: (
1348
+ active-track-color: map.get($systems, md-sys-color, secondary),
1349
+ focus-handle-color: map.get($systems, md-sys-color, secondary),
1350
+ focus-state-layer-color: map.get($systems, md-sys-color, secondary),
1351
+ handle-color: map.get($systems, md-sys-color, secondary),
1352
+ hover-handle-color: map.get($systems, md-sys-color, secondary),
1353
+ hover-state-layer-color: map.get($systems, md-sys-color, secondary),
1354
+ label-container-color: map.get($systems, md-sys-color, secondary),
1355
+ label-label-text-color: map.get($systems, md-sys-color, on-secondary),
1356
+ pressed-handle-color: map.get($systems, md-sys-color, secondary),
1357
+ pressed-state-layer-color: map.get($systems, md-sys-color, secondary),
1358
+ with-overlap-handle-outline-color: map.get($systems, md-sys-color, on-secondary),
1359
+ with-tick-marks-active-container-color: map.get($systems, md-sys-color, on-secondary),
1360
+ ),
1361
+ tertiary: (
1362
+ active-track-color: map.get($systems, md-sys-color, tertiary),
1363
+ focus-handle-color: map.get($systems, md-sys-color, tertiary),
1364
+ focus-state-layer-color: map.get($systems, md-sys-color, tertiary),
1365
+ handle-color: map.get($systems, md-sys-color, tertiary),
1366
+ hover-handle-color: map.get($systems, md-sys-color, tertiary),
1367
+ hover-state-layer-color: map.get($systems, md-sys-color, tertiary),
1368
+ label-container-color: map.get($systems, md-sys-color, tertiary),
1369
+ label-label-text-color: map.get($systems, md-sys-color, on-tertiary),
1370
+ pressed-handle-color: map.get($systems, md-sys-color, tertiary),
1371
+ pressed-state-layer-color: map.get($systems, md-sys-color, tertiary),
1372
+ with-overlap-handle-outline-color: map.get($systems, md-sys-color, on-tertiary),
1373
+ with-tick-marks-active-container-color: map.get($systems, md-sys-color, on-tertiary),
1374
+ ),
1375
+ error: (
1376
+ active-track-color: map.get($systems, md-sys-color, error),
1377
+ focus-handle-color: map.get($systems, md-sys-color, error),
1378
+ focus-state-layer-color: map.get($systems, md-sys-color, error),
1379
+ handle-color: map.get($systems, md-sys-color, error),
1380
+ hover-handle-color: map.get($systems, md-sys-color, error),
1381
+ hover-state-layer-color: map.get($systems, md-sys-color, error),
1382
+ label-container-color: map.get($systems, md-sys-color, error),
1383
+ label-label-text-color: map.get($systems, md-sys-color, on-error),
1384
+ pressed-handle-color: map.get($systems, md-sys-color, error),
1385
+ pressed-state-layer-color: map.get($systems, md-sys-color, error),
1386
+ with-overlap-handle-outline-color: map.get($systems, md-sys-color, on-error),
1387
+ with-tick-marks-active-container-color: map.get($systems, md-sys-color, on-error),
1388
+ ),
1389
+ );
1390
+ }
1391
+
1392
+ /// Generates custom token overrides for the mdc-switch color variants.
1393
+ /// @param {Map} $systems The MDC system tokens
1394
+ /// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
1395
+ /// @return {Map} A set of color variant token overrides for the mdc-switch
1396
+ @function mdc-switch-color-variants($systems, $exclude-hardcoded) {
1397
+ @return (
1398
+ primary: (), // Default, no overrides needed
1399
+ secondary: (
1400
+ selected-focus-handle-color: map.get($systems, md-sys-color, secondary-container),
1401
+ selected-focus-icon-color: map.get($systems, md-sys-color, on-secondary-container),
1402
+ selected-focus-state-layer-color: map.get($systems, md-sys-color, secondary),
1403
+ selected-focus-track-color: map.get($systems, md-sys-color, secondary),
1404
+ selected-handle-color: map.get($systems, md-sys-color, on-secondary),
1405
+ selected-hover-handle-color: map.get($systems, md-sys-color, secondary-container),
1406
+ selected-hover-icon-color: map.get($systems, md-sys-color, on-secondary-container),
1407
+ selected-hover-state-layer-color: map.get($systems, md-sys-color, secondary),
1408
+ selected-hover-track-color: map.get($systems, md-sys-color, secondary),
1409
+ selected-icon-color: map.get($systems, md-sys-color, on-secondary-container),
1410
+ selected-pressed-handle-color: map.get($systems, md-sys-color, secondary-container),
1411
+ selected-pressed-icon-color: map.get($systems, md-sys-color, on-secondary-container),
1412
+ selected-pressed-state-layer-color: map.get($systems, md-sys-color, secondary),
1413
+ selected-pressed-track-color: map.get($systems, md-sys-color, secondary),
1414
+ selected-track-color: map.get($systems, md-sys-color, secondary),
1415
+ ),
1416
+ tertiary: (
1417
+ selected-focus-handle-color: map.get($systems, md-sys-color, tertiary-container),
1418
+ selected-focus-icon-color: map.get($systems, md-sys-color, on-tertiary-container),
1419
+ selected-focus-state-layer-color: map.get($systems, md-sys-color, tertiary),
1420
+ selected-focus-track-color: map.get($systems, md-sys-color, tertiary),
1421
+ selected-handle-color: map.get($systems, md-sys-color, on-tertiary),
1422
+ selected-hover-handle-color: map.get($systems, md-sys-color, tertiary-container),
1423
+ selected-hover-icon-color: map.get($systems, md-sys-color, on-tertiary-container),
1424
+ selected-hover-state-layer-color: map.get($systems, md-sys-color, tertiary),
1425
+ selected-hover-track-color: map.get($systems, md-sys-color, tertiary),
1426
+ selected-icon-color: map.get($systems, md-sys-color, on-tertiary-container),
1427
+ selected-pressed-handle-color: map.get($systems, md-sys-color, tertiary-container),
1428
+ selected-pressed-icon-color: map.get($systems, md-sys-color, on-tertiary-container),
1429
+ selected-pressed-state-layer-color: map.get($systems, md-sys-color, tertiary),
1430
+ selected-pressed-track-color: map.get($systems, md-sys-color, tertiary),
1431
+ selected-track-color: map.get($systems, md-sys-color, tertiary),
1432
+ ),
1433
+ error: (
1434
+ selected-focus-handle-color: map.get($systems, md-sys-color, error-container),
1435
+ selected-focus-icon-color: map.get($systems, md-sys-color, on-error-container),
1436
+ selected-focus-state-layer-color: map.get($systems, md-sys-color, error),
1437
+ selected-focus-track-color: map.get($systems, md-sys-color, error),
1438
+ selected-handle-color: map.get($systems, md-sys-color, on-error),
1439
+ selected-hover-handle-color: map.get($systems, md-sys-color, error-container),
1440
+ selected-hover-icon-color: map.get($systems, md-sys-color, on-error-container),
1441
+ selected-hover-state-layer-color: map.get($systems, md-sys-color, error),
1442
+ selected-hover-track-color: map.get($systems, md-sys-color, error),
1443
+ selected-icon-color: map.get($systems, md-sys-color, on-error-container),
1444
+ selected-pressed-handle-color: map.get($systems, md-sys-color, error-container),
1445
+ selected-pressed-icon-color: map.get($systems, md-sys-color, on-error-container),
1446
+ selected-pressed-state-layer-color: map.get($systems, md-sys-color, error),
1447
+ selected-pressed-track-color: map.get($systems, md-sys-color, error),
1448
+ selected-track-color: map.get($systems, md-sys-color, error),
1449
+ ),
1450
+ );
1451
+ }
1452
+
1453
+ /// Generates custom token overrides for the mdc-radio color variants.
1454
+ /// @param {Map} $systems The MDC system tokens
1455
+ /// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
1456
+ /// @return {Map} A set of color variant token overrides for the mdc-radio
1457
+ @function mdc-radio-color-variants($systems, $exclude-hardcoded) {
1458
+ @return (
1459
+ primary: (), // Default, no overrides needed
1460
+ secondary: (
1461
+ selected-focus-icon-color: map.get($systems, md-sys-color, secondary),
1462
+ selected-focus-state-layer-color: map.get($systems, md-sys-color, secondary),
1463
+ selected-hover-icon-color: map.get($systems, md-sys-color, secondary),
1464
+ selected-hover-state-layer-color: map.get($systems, md-sys-color, secondary),
1465
+ selected-icon-color: map.get($systems, md-sys-color, secondary),
1466
+ selected-pressed-icon-color: map.get($systems, md-sys-color, secondary),
1467
+ unselected-pressed-state-layer-color: map.get($systems, md-sys-color, secondary),
1468
+ ),
1469
+ tertiary: (
1470
+ selected-focus-icon-color: map.get($systems, md-sys-color, tertiary),
1471
+ selected-focus-state-layer-color: map.get($systems, md-sys-color, tertiary),
1472
+ selected-hover-icon-color: map.get($systems, md-sys-color, tertiary),
1473
+ selected-hover-state-layer-color: map.get($systems, md-sys-color, tertiary),
1474
+ selected-icon-color: map.get($systems, md-sys-color, tertiary),
1475
+ selected-pressed-icon-color: map.get($systems, md-sys-color, tertiary),
1476
+ unselected-pressed-state-layer-color: map.get($systems, md-sys-color, tertiary),
1477
+ ),
1478
+ error: (
1479
+ selected-focus-icon-color: map.get($systems, md-sys-color, error),
1480
+ selected-focus-state-layer-color: map.get($systems, md-sys-color, error),
1481
+ selected-hover-icon-color: map.get($systems, md-sys-color, error),
1482
+ selected-hover-state-layer-color: map.get($systems, md-sys-color, error),
1483
+ selected-icon-color: map.get($systems, md-sys-color, error),
1484
+ selected-pressed-icon-color: map.get($systems, md-sys-color, error),
1485
+ unselected-pressed-state-layer-color: map.get($systems, md-sys-color, error),
1486
+ ),
1487
+ );
1488
+ }
1489
+
1490
+ /// Generates custom token overrides for the mdc-circular-progress color variants.
1491
+ /// @param {Map} $systems The MDC system tokens
1492
+ /// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
1493
+ /// @return {Map} A set of color variant token overrides for the mdc-circular-progress
1494
+ @function mdc-circular-progress-color-variants($systems, $exclude-hardcoded) {
1495
+ @return (
1496
+ primary: (), // Default, no overrides needed
1497
+ secondary: (
1498
+ active-indicator-color: map.get($systems, md-sys-color, secondary),
1499
+ ),
1500
+ tertiary: (
1501
+ active-indicator-color: map.get($systems, md-sys-color, tertiary),
1502
+ ),
1503
+ error: (
1504
+ active-indicator-color: map.get($systems, md-sys-color, error),
1505
+ )
1506
+ );
1507
+ }
1508
+
1509
+ /// Generates custom token overrides for the mdc-linear-progress color variants.
1510
+ /// @param {Map} $systems The MDC system tokens
1511
+ /// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
1512
+ /// @return {Map} A set of color variant token overrides for the mdc-linear-progress
1513
+ @function mdc-linear-progress-color-variants($systems, $exclude-hardcoded) {
1514
+ @return (
1515
+ primary: (), // Default, no overrides needed
1516
+ secondary: (
1517
+ active-indicator-color: map.get($systems, md-sys-color, secondary),
1518
+ track-color: map.get($systems, md-sys-color, secondary-container),
1519
+ ),
1520
+ tertiary: (
1521
+ active-indicator-color: map.get($systems, md-sys-color, tertiary),
1522
+ track-color: map.get($systems, md-sys-color, tertiary-container),
1523
+ ),
1524
+ error: (
1525
+ active-indicator-color: map.get($systems, md-sys-color, error),
1526
+ track-color: map.get($systems, md-sys-color, error-container),
1527
+ ),
1528
+ );
1529
+ }
1530
+
1531
+ /// Generates custom token overrides for the mdc-filled-form-field color variants.
1532
+ /// @param {Map} $systems The MDC system tokens
1533
+ /// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
1534
+ /// @return {Map} A set of color variant token overrides for the mdc-filled-form-field
1535
+ @function mdc-filled-text-field-color-variants($systems, $exclude-hardcoded) {
1536
+ @return (
1537
+ primary: (), // Default, no overrides needed
1538
+ secondary: (
1539
+ caret-color: map.get($systems, md-sys-color, secondary),
1540
+ focus-active-indicator-color: map.get($systems, md-sys-color, secondary),
1541
+ focus-label-text-color: map.get($systems, md-sys-color, secondary),
1542
+ ),
1543
+ tertiary: (
1544
+ caret-color: map.get($systems, md-sys-color, tertiary),
1545
+ focus-active-indicator-color: map.get($systems, md-sys-color, tertiary),
1546
+ focus-label-text-color: map.get($systems, md-sys-color, tertiary),
1547
+ ),
1548
+ error: (
1549
+ caret-color: map.get($systems, md-sys-color, error),
1550
+ focus-active-indicator-color: map.get($systems, md-sys-color, error),
1551
+ focus-label-text-color: map.get($systems, md-sys-color, error),
1552
+ ),
1553
+ );
1554
+ }
1555
+
1556
+ /// Generates custom token overrides for the mdc-outlined-form-field color variants.
1557
+ /// @param {Map} $systems The MDC system tokens
1558
+ /// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
1559
+ /// @return {Map} A set of color variant token overrides for the mdc-outlined-form-field
1560
+ @function mdc-outlined-text-field-color-variants($systems, $exclude-hardcoded) {
1561
+ @return (
1562
+ primary: (), // Default, no overrides needed
1563
+ secondary: (
1564
+ caret-color: map.get($systems, md-sys-color, secondary),
1565
+ focus-label-text-color: map.get($systems, md-sys-color, secondary),
1566
+ focus-outline-color: map.get($systems, md-sys-color, secondary),
1567
+ ),
1568
+ tertiary: (
1569
+ caret-color: map.get($systems, md-sys-color, tertiary),
1570
+ focus-label-text-color: map.get($systems, md-sys-color, tertiary),
1571
+ focus-outline-color: map.get($systems, md-sys-color, tertiary),
1572
+ ),
1573
+ error: (
1574
+ caret-color: map.get($systems, md-sys-color, error),
1575
+ focus-label-text-color: map.get($systems, md-sys-color, error),
1576
+ focus-outline-color: map.get($systems, md-sys-color, error),
1577
+ ),
1578
+ );
1579
+ }
1580
+
1581
+ /// Generates custom token overrides for the mdc-text-button color variants.
1582
+ /// @param {Map} $systems The MDC system tokens
1583
+ /// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
1584
+ /// @return {Map} A set of color variant token overrides for the mdc-text-button
1585
+ @function mdc-text-button-color-variants($systems, $exclude-hardcoded) {
1586
+ @return (
1587
+ primary: (), // Default, no overrides needed.
1588
+ secondary: (
1589
+ focus-label-text-color: map.get($systems, md-sys-color, secondary),
1590
+ focus-state-layer-color: map.get($systems, md-sys-color, secondary),
1591
+ hover-label-text-color: map.get($systems, md-sys-color, secondary),
1592
+ hover-state-layer-color: map.get($systems, md-sys-color, secondary),
1593
+ label-text-color: map.get($systems, md-sys-color, secondary),
1594
+ pressed-label-text-color: map.get($systems, md-sys-color, secondary),
1595
+ pressed-state-layer-color: map.get($systems, md-sys-color, secondary),
1596
+ with-icon-focus-icon-color: map.get($systems, md-sys-color, secondary),
1597
+ with-icon-hover-icon-color: map.get($systems, md-sys-color, secondary),
1598
+ with-icon-icon-color: map.get($systems, md-sys-color, secondary),
1599
+ with-icon-pressed-icon-color: map.get($systems, md-sys-color, secondary)
1600
+ ),
1601
+ tertiary: (
1602
+ focus-label-text-color: map.get($systems, md-sys-color, tertiary),
1603
+ focus-state-layer-color: map.get($systems, md-sys-color, tertiary),
1604
+ hover-label-text-color: map.get($systems, md-sys-color, tertiary),
1605
+ hover-state-layer-color: map.get($systems, md-sys-color, tertiary),
1606
+ label-text-color: map.get($systems, md-sys-color, tertiary),
1607
+ pressed-label-text-color: map.get($systems, md-sys-color, tertiary),
1608
+ pressed-state-layer-color: map.get($systems, md-sys-color, tertiary),
1609
+ with-icon-focus-icon-color: map.get($systems, md-sys-color, tertiary),
1610
+ with-icon-hover-icon-color: map.get($systems, md-sys-color, tertiary),
1611
+ with-icon-icon-color: map.get($systems, md-sys-color, tertiary),
1612
+ with-icon-pressed-icon-color: map.get($systems, md-sys-color, tertiary)
1613
+ ),
1614
+ error: (
1615
+ focus-label-text-color: map.get($systems, md-sys-color, error),
1616
+ focus-state-layer-color: map.get($systems, md-sys-color, error),
1617
+ hover-label-text-color: map.get($systems, md-sys-color, error),
1618
+ hover-state-layer-color: map.get($systems, md-sys-color, error),
1619
+ label-text-color: map.get($systems, md-sys-color, error),
1620
+ pressed-label-text-color: map.get($systems, md-sys-color, error),
1621
+ pressed-state-layer-color: map.get($systems, md-sys-color, error),
1622
+ with-icon-focus-icon-color: map.get($systems, md-sys-color, error),
1623
+ with-icon-hover-icon-color: map.get($systems, md-sys-color, error),
1624
+ with-icon-icon-color: map.get($systems, md-sys-color, error),
1625
+ with-icon-pressed-icon-color: map.get($systems, md-sys-color, error)
1626
+ )
1627
+ );
1628
+ }
1629
+
1630
+ /// Generates custom token overrides for the mdc-elevated-button color variants.
1631
+ /// @param {Map} $systems The MDC system tokens
1632
+ /// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
1633
+ /// @return {Map} A set of color variant token overrides for the mdc-elevated-button
1634
+ @function mdc-elevated-button-color-variants($systems, $exclude-hardcoded) {
1635
+ @return (
1636
+ primary: (), // Default, no overrides needed.
1637
+ secondary: (
1638
+ focus-label-text-color: map.get($systems, md-sys-color, secondary),
1639
+ focus-state-layer-color: map.get($systems, md-sys-color, secondary),
1640
+ hover-label-text-color: map.get($systems, md-sys-color, secondary),
1641
+ hover-state-layer-color: map.get($systems, md-sys-color, secondary),
1642
+ label-text-color: map.get($systems, md-sys-color, secondary),
1643
+ pressed-label-text-color: map.get($systems, md-sys-color, secondary),
1644
+ pressed-state-layer-color: map.get($systems, md-sys-color, secondary),
1645
+ with-icon-focus-icon-color: map.get($systems, md-sys-color, secondary),
1646
+ with-icon-hover-icon-color: map.get($systems, md-sys-color, secondary),
1647
+ with-icon-icon-color: map.get($systems, md-sys-color, secondary),
1648
+ with-icon-pressed-icon-color: map.get($systems, md-sys-color, secondary)
1649
+ ),
1650
+ tertiary: (
1651
+ focus-label-text-color: map.get($systems, md-sys-color, tertiary),
1652
+ focus-state-layer-color: map.get($systems, md-sys-color, tertiary),
1653
+ hover-label-text-color: map.get($systems, md-sys-color, tertiary),
1654
+ hover-state-layer-color: map.get($systems, md-sys-color, tertiary),
1655
+ label-text-color: map.get($systems, md-sys-color, tertiary),
1656
+ pressed-label-text-color: map.get($systems, md-sys-color, tertiary),
1657
+ pressed-state-layer-color: map.get($systems, md-sys-color, tertiary),
1658
+ with-icon-focus-icon-color: map.get($systems, md-sys-color, tertiary),
1659
+ with-icon-hover-icon-color: map.get($systems, md-sys-color, tertiary),
1660
+ with-icon-icon-color: map.get($systems, md-sys-color, tertiary),
1661
+ with-icon-pressed-icon-color: map.get($systems, md-sys-color, tertiary)
1662
+ ),
1663
+ error: (
1664
+ focus-label-text-color: map.get($systems, md-sys-color, error),
1665
+ focus-state-layer-color: map.get($systems, md-sys-color, error),
1666
+ hover-label-text-color: map.get($systems, md-sys-color, error),
1667
+ hover-state-layer-color: map.get($systems, md-sys-color, error),
1668
+ label-text-color: map.get($systems, md-sys-color, error),
1669
+ pressed-label-text-color: map.get($systems, md-sys-color, error),
1670
+ pressed-state-layer-color: map.get($systems, md-sys-color, error),
1671
+ with-icon-focus-icon-color: map.get($systems, md-sys-color, error),
1672
+ with-icon-hover-icon-color: map.get($systems, md-sys-color, error),
1673
+ with-icon-icon-color: map.get($systems, md-sys-color, error),
1674
+ with-icon-pressed-icon-color: map.get($systems, md-sys-color, error)
1675
+ )
1676
+ );
1677
+ }
1678
+
1679
+ /// Generates custom token overrides for the mdc-filled-button color variants.
1680
+ /// @param {Map} $systems The MDC system tokens
1681
+ /// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
1682
+ /// @return {Map} A set of color variant token overrides for the mdc-filled-button
1683
+ @function mdc-filled-button-color-variants($systems, $exclude-hardcoded) {
1684
+ @return (
1685
+ primary: (), // Default, no overrides needed.
1686
+ secondary: (
1687
+ container-color: map.get($systems, md-sys-color, secondary),
1688
+ focus-label-text-color: map.get($systems, md-sys-color, on-secondary),
1689
+ focus-state-layer-color: map.get($systems, md-sys-color, on-secondary),
1690
+ hover-label-text-color: map.get($systems, md-sys-color, on-secondary),
1691
+ hover-state-layer-color: map.get($systems, md-sys-color, on-secondary),
1692
+ label-text-color: map.get($systems, md-sys-color, on-secondary),
1693
+ pressed-label-text-color: map.get($systems, md-sys-color, on-secondary),
1694
+ pressed-state-layer-color: map.get($systems, md-sys-color, on-secondary),
1695
+ with-icon-focus-icon-color: map.get($systems, md-sys-color, on-secondary),
1696
+ with-icon-hover-icon-color: map.get($systems, md-sys-color, on-secondary),
1697
+ with-icon-icon-color: map.get($systems, md-sys-color, on-secondary),
1698
+ with-icon-pressed-icon-color: map.get($systems, md-sys-color, on-secondary)
1699
+ ),
1700
+ tertiary: (
1701
+ container-color: map.get($systems, md-sys-color, tertiary),
1702
+ focus-label-text-color: map.get($systems, md-sys-color, on-tertiary),
1703
+ focus-state-layer-color: map.get($systems, md-sys-color, on-tertiary),
1704
+ hover-label-text-color: map.get($systems, md-sys-color, on-tertiary),
1705
+ hover-state-layer-color: map.get($systems, md-sys-color, on-tertiary),
1706
+ label-text-color: map.get($systems, md-sys-color, on-tertiary),
1707
+ pressed-label-text-color: map.get($systems, md-sys-color, on-tertiary),
1708
+ pressed-state-layer-color: map.get($systems, md-sys-color, on-tertiary),
1709
+ with-icon-focus-icon-color: map.get($systems, md-sys-color, on-tertiary),
1710
+ with-icon-hover-icon-color: map.get($systems, md-sys-color, on-tertiary),
1711
+ with-icon-icon-color: map.get($systems, md-sys-color, on-tertiary),
1712
+ with-icon-pressed-icon-color: map.get($systems, md-sys-color, on-tertiary)
1713
+ ),
1714
+ error: (
1715
+ container-color: map.get($systems, md-sys-color, error),
1716
+ focus-label-text-color: map.get($systems, md-sys-color, on-error),
1717
+ focus-state-layer-color: map.get($systems, md-sys-color, on-error),
1718
+ hover-label-text-color: map.get($systems, md-sys-color, on-error),
1719
+ hover-state-layer-color: map.get($systems, md-sys-color, on-error),
1720
+ label-text-color: map.get($systems, md-sys-color, on-error),
1721
+ pressed-label-text-color: map.get($systems, md-sys-color, on-error),
1722
+ pressed-state-layer-color: map.get($systems, md-sys-color, on-error),
1723
+ with-icon-focus-icon-color: map.get($systems, md-sys-color, on-error),
1724
+ with-icon-hover-icon-color: map.get($systems, md-sys-color, on-error),
1725
+ with-icon-icon-color: map.get($systems, md-sys-color, on-error),
1726
+ with-icon-pressed-icon-color: map.get($systems, md-sys-color, on-error)
1727
+ )
1728
+ );
1729
+ }
1730
+
1731
+ /// Generates custom token overrides for the mdc-outlined-button color variants.
1732
+ /// @param {Map} $systems The MDC system tokens
1733
+ /// @param {Boolean} $exclude-hardcoded Whether to exclude hardcoded token values
1734
+ /// @return {Map} A set of color variant token overrides for the mdc-outlined-button
1735
+ @function mdc-outlined-button-color-variants($systems, $exclude-hardcoded) {
1736
+ @return (
1737
+ primary: (), // Default, no overrides needed.
1738
+ secondary: (
1739
+ focus-label-text-color: map.get($systems, md-sys-color, secondary),
1740
+ focus-outline-color: map.get($systems, md-sys-color, secondary),
1741
+ focus-state-layer-color: map.get($systems, md-sys-color, secondary),
1742
+ hover-label-text-color: map.get($systems, md-sys-color, secondary),
1743
+ hover-state-layer-color: map.get($systems, md-sys-color, secondary),
1744
+ label-text-color: map.get($systems, md-sys-color, secondary),
1745
+ pressed-label-text-color: map.get($systems, md-sys-color, secondary),
1746
+ pressed-state-layer-color: map.get($systems, md-sys-color, secondary),
1747
+ with-icon-focus-icon-color: map.get($systems, md-sys-color, secondary),
1748
+ with-icon-hover-icon-color: map.get($systems, md-sys-color, secondary),
1749
+ with-icon-icon-color: map.get($systems, md-sys-color, secondary),
1750
+ with-icon-pressed-icon-color: map.get($systems, md-sys-color, secondary)
1751
+ ),
1752
+ tertiary: (
1753
+ focus-label-text-color: map.get($systems, md-sys-color, tertiary),
1754
+ focus-outline-color: map.get($systems, md-sys-color, tertiary),
1755
+ focus-state-layer-color: map.get($systems, md-sys-color, tertiary),
1756
+ hover-label-text-color: map.get($systems, md-sys-color, tertiary),
1757
+ hover-state-layer-color: map.get($systems, md-sys-color, tertiary),
1758
+ label-text-color: map.get($systems, md-sys-color, tertiary),
1759
+ pressed-label-text-color: map.get($systems, md-sys-color, tertiary),
1760
+ pressed-state-layer-color: map.get($systems, md-sys-color, tertiary),
1761
+ with-icon-focus-icon-color: map.get($systems, md-sys-color, tertiary),
1762
+ with-icon-hover-icon-color: map.get($systems, md-sys-color, tertiary),
1763
+ with-icon-icon-color: map.get($systems, md-sys-color, tertiary),
1764
+ with-icon-pressed-icon-color: map.get($systems, md-sys-color, tertiary)
1765
+ ),
1766
+ error: (
1767
+ focus-label-text-color: map.get($systems, md-sys-color, error),
1768
+ focus-outline-color: map.get($systems, md-sys-color, error),
1769
+ focus-state-layer-color: map.get($systems, md-sys-color, error),
1770
+ hover-label-text-color: map.get($systems, md-sys-color, error),
1771
+ hover-state-layer-color: map.get($systems, md-sys-color, error),
1772
+ label-text-color: map.get($systems, md-sys-color, error),
1773
+ pressed-label-text-color: map.get($systems, md-sys-color, error),
1774
+ pressed-state-layer-color: map.get($systems, md-sys-color, error),
1775
+ with-icon-focus-icon-color: map.get($systems, md-sys-color, error),
1776
+ with-icon-hover-icon-color: map.get($systems, md-sys-color, error),
1777
+ with-icon-icon-color: map.get($systems, md-sys-color, error),
1778
+ with-icon-pressed-icon-color: map.get($systems, md-sys-color, error)
1779
+ )
1780
+ );
1781
+ }
1782
+