@angular/material-experimental 17.1.0 → 17.2.0-next.0

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 +1071 -62
  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
@@ -8,6 +8,18 @@
8
8
 
9
9
  // TODO(mmalerba): Split up this file into smaller pieces.
10
10
 
11
+ /// Maps the values in a map to new values using the given mapping function
12
+ /// @param {Map} $map The maps whose values will be mapped to new values.
13
+ /// @param {Function} $fn The value mapping function.
14
+ /// @param {Map} A new map with its values updated using the mapping function.
15
+ @function _map-values($map, $fn) {
16
+ $result: ();
17
+ @each $key, $value in $map {
18
+ $result: map.set($result, $key, meta.call($fn, $value));
19
+ }
20
+ @return $result;
21
+ }
22
+
11
23
  /// Picks a submap containing only the given keys out the given map.
12
24
  /// @param {Map} $map The map to pick from.
13
25
  /// @param {List} $keys The map keys to pick.
@@ -102,11 +114,11 @@
102
114
  /// @param {Map} $tertiary The tertiary palette
103
115
  /// @param {Map} $error The error palette
104
116
  /// @return {Map} A set of `md-ref-palette` tokens
105
- @function _generate-ref-palette-tokens($primary, $secondary, $tertiary, $error) {
117
+ @function _generate-ref-palette-tokens($primary, $tertiary, $error) {
106
118
  @return mat.private-merge-all(
107
119
  (black: #000, white: #fff),
108
120
  _generate-palette-tokens($primary, primary),
109
- _generate-palette-tokens($secondary, secondary),
121
+ _generate-palette-tokens(map.get($primary, secondary), secondary),
110
122
  _generate-palette-tokens($tertiary, tertiary),
111
123
  _generate-palette-tokens(map.get($primary, neutral), neutral),
112
124
  _generate-palette-tokens(map.get($primary, neutral-variant), neutral-variant),
@@ -166,8 +178,14 @@
166
178
  /// different). This is a temporary workaround until MDC updates to use the correct names for the
167
179
  /// tokens.
168
180
  /// @param {Map} $tokens The map of checkbox tokens with the official tokens names
181
+ /// @param {Map} $all-tokens Map of all checkbox tokens, including hardcoded values.
182
+ /// This is necessary in order to do opacity lookups.
169
183
  /// @return {Map} The given tokens, renamed to be compatible with MDC's token implementation.
170
184
  @function _fix-checkbox-tokens($tokens) {
185
+ // Need to get the hardcoded values, because they include opacities that are used for the disabled
186
+ // state.
187
+ $hardcoded-tokens: mdc-tokens.md-comp-checkbox-values((), false);
188
+
171
189
  $rename-keys: (
172
190
  selected-icon-color: selected-checkmark-color,
173
191
  selected-disabled-icon-color: disabled-selected-checkmark-color,
@@ -184,83 +202,59 @@
184
202
  unselected-outline-color: unselected-icon-color,
185
203
  unselected-pressed-outline-color: unselected-pressed-icon-color
186
204
  );
187
- @return _rename-map-keys($tokens, $rename-keys);
188
- }
189
205
 
190
- /// Fixes inconsistent values in the text field color tokens. Applies to both filled and outlined
191
- /// variants.
192
- /// @param {Map} $initial-tokens Map of text field tokens currently being generated.
193
- /// @param {Map} $all-tokens Map of all text field tokens, including hardcoded values.
194
- /// This is necessary in order to do opacity lookups.
195
- /// @return {Map} The given tokens, with the invalid values replaced with valid ones.
196
- @function _fix-text-field-color-tokens($initial-tokens, $all-tokens) {
197
- @return _combine-color-tokens($initial-tokens, $all-tokens, (
198
- (
199
- color: 'disabled-active-indicator-color',
200
- opacity: 'disabled-active-indicator-opacity'
201
- ),
202
- (
203
- color: 'disabled-container-color',
204
- opacity: 'disabled-container-opacity'
205
- ),
206
- (
207
- color: 'disabled-input-text-color',
208
- opacity: 'disabled-input-text-opacity'
209
- ),
210
- (
211
- color: 'disabled-label-text-color',
212
- opacity: 'disabled-label-text-opacity'
213
- ),
206
+ $remapped-tokens: _rename-map-keys($tokens, $rename-keys);
207
+ $remapped-hardcoded-tokens: _rename-map-keys($hardcoded-tokens, $rename-keys);
208
+
209
+ @return _combine-color-tokens($remapped-tokens, $remapped-hardcoded-tokens, (
214
210
  (
215
- color: 'disabled-leading-icon-color',
216
- opacity: 'disabled-leading-icon-opacity'
211
+ color: disabled-selected-icon-color,
212
+ opacity: disabled-selected-icon-opacity,
217
213
  ),
218
214
  (
219
- color: 'disabled-supporting-text-color',
220
- opacity: 'disabled-supporting-text-opacity'
215
+ color: disabled-unselected-icon-color,
216
+ opacity: disabled-unselected-icon-opacity,
221
217
  ),
222
- (
223
- color: 'disabled-trailing-icon-color',
224
- opacity: 'disabled-trailing-icon-opacity'
225
- )
226
218
  ));
227
219
  }
228
220
 
229
-
230
221
  /// Fixes inconsistent values in the filled text field tokens so that they can produce valid
231
222
  /// styles.
232
223
  /// @param {Map} $initial-tokens Map of filled text field tokens currently being generated.
233
- /// @param {Map} $all-tokens Map of all filled text field tokens, including hardcoded values.
234
224
  /// @return {Map} The given tokens, with the invalid values replaced with valid ones.
235
- @function _fix-filled-text-field-tokens($initial-tokens, $all-tokens) {
236
- $tokens: _combine-color-tokens($initial-tokens, $all-tokens, (
225
+ @function _fix-filled-text-field-tokens($initial-tokens) {
226
+ // Need to get the hardcoded values, because they include opacities that are used for the disabled
227
+ // state.
228
+ $hardcoded-tokens: mdc-tokens.md-comp-filled-text-field-values((), false);
229
+
230
+ $tokens: _combine-color-tokens($initial-tokens, $hardcoded-tokens, (
237
231
  (
238
- color: 'disabled-active-indicator-color',
239
- opacity: 'disabled-active-indicator-opacity'
232
+ color: disabled-active-indicator-color,
233
+ opacity: disabled-active-indicator-opacity
240
234
  ),
241
235
  (
242
- color: 'disabled-container-color',
243
- opacity: 'disabled-container-opacity'
236
+ color: disabled-container-color,
237
+ opacity: disabled-container-opacity
244
238
  ),
245
239
  (
246
- color: 'disabled-input-text-color',
247
- opacity: 'disabled-input-text-opacity'
240
+ color: disabled-input-text-color,
241
+ opacity: disabled-input-text-opacity
248
242
  ),
249
243
  (
250
- color: 'disabled-label-text-color',
251
- opacity: 'disabled-label-text-opacity'
244
+ color: disabled-label-text-color,
245
+ opacity: disabled-label-text-opacity
252
246
  ),
253
247
  (
254
- color: 'disabled-leading-icon-color',
255
- opacity: 'disabled-leading-icon-opacity'
248
+ color: disabled-leading-icon-color,
249
+ opacity: disabled-leading-icon-opacity
256
250
  ),
257
251
  (
258
- color: 'disabled-supporting-text-color',
259
- opacity: 'disabled-supporting-text-opacity'
252
+ color: disabled-supporting-text-color,
253
+ opacity: disabled-supporting-text-opacity
260
254
  ),
261
255
  (
262
- color: 'disabled-trailing-icon-color',
263
- opacity: 'disabled-trailing-icon-opacity'
256
+ color: disabled-trailing-icon-color,
257
+ opacity: disabled-trailing-icon-opacity
264
258
  )
265
259
  ));
266
260
 
@@ -279,64 +273,74 @@
279
273
 
280
274
  /// Fixes inconsistent values in the text button tokens so that they can produce valid styles.
281
275
  /// @param {Map} $initial-tokens Map of text button tokens currently being generated.
282
- /// @param {Map} $all-tokens Map of all text button tokens, including hardcoded values.
283
276
  /// @return {Map} The given tokens, with the invalid values replaced with valid ones.
284
- @function _fix-text-button-tokens($initial-tokens, $all-tokens) {
285
- @return _combine-color-tokens($initial-tokens, $all-tokens, (
277
+ @function _fix-text-button-tokens($initial-tokens) {
278
+ // Need to get the hardcoded values, because they include opacities that are used for the disabled
279
+ // state.
280
+ $hardcoded-tokens: mdc-tokens.md-comp-text-button-values((), false);
281
+
282
+ @return _combine-color-tokens($initial-tokens, $hardcoded-tokens, (
286
283
  (
287
- color: 'disabled-label-text-color',
288
- opacity: 'disabled-label-text-opacity',
284
+ color: disabled-label-text-color,
285
+ opacity: disabled-label-text-opacity,
289
286
  ),
290
287
  ));
291
288
  }
292
289
 
293
290
  /// Fixes inconsistent values in the filled button tokens so that they can produce valid styles.
294
291
  /// @param {Map} $initial-tokens Map of filled button tokens currently being generated.
295
- /// @param {Map} $all-tokens Map of all filled button tokens, including hardcoded values.
296
292
  /// @return {Map} The given tokens, with the invalid values replaced with valid ones.
297
- @function _fix-filled-button-tokens($initial-tokens, $all-tokens) {
298
- @return _combine-color-tokens($initial-tokens, $all-tokens, (
293
+ @function _fix-filled-button-tokens($initial-tokens) {
294
+ // Need to get the hardcoded values, because they include opacities that are used for the disabled
295
+ // state.
296
+ $hardcoded-tokens: mdc-tokens.md-comp-filled-button-values((), false);
297
+
298
+ @return _combine-color-tokens($initial-tokens, $hardcoded-tokens, (
299
299
  (
300
- color: 'disabled-label-text-color',
301
- opacity: 'disabled-label-text-opacity',
300
+ color: disabled-label-text-color,
301
+ opacity: disabled-label-text-opacity,
302
302
  ),
303
303
  (
304
- color: 'disabled-container-color',
305
- opacity: 'disabled-container-opacity',
304
+ color: disabled-container-color,
305
+ opacity: disabled-container-opacity,
306
306
  )
307
307
  ));
308
308
  }
309
309
 
310
310
  /// Fixes inconsistent values in the protected button tokens so that they can produce valid styles.
311
311
  /// @param {Map} $initial-tokens Map of protected button tokens currently being generated.
312
- /// @param {Map} $all-tokens Map of all protected button tokens, including hardcoded values.
313
312
  /// @return {Map} The given tokens, with the invalid values replaced with valid ones.
314
- @function _fix-protected-button-tokens($initial-tokens, $all-tokens) {
315
- @return _combine-color-tokens($initial-tokens, $all-tokens, (
313
+ @function _fix-protected-button-tokens($initial-tokens) {
314
+ // Need to get the hardcoded values, because they include opacities that are used for the disabled
315
+ // state.
316
+ $hardcoded-tokens: mdc-tokens.md-comp-elevated-button-values((), false);
317
+
318
+ @return _combine-color-tokens($initial-tokens, $hardcoded-tokens, (
316
319
  (
317
- color: 'disabled-label-text-color',
318
- opacity: 'disabled-label-text-opacity',
320
+ color: disabled-label-text-color,
321
+ opacity: disabled-label-text-opacity,
319
322
  ),
320
323
  (
321
- color: 'disabled-container-color',
322
- opacity: 'disabled-container-opacity',
324
+ color: disabled-container-color,
325
+ opacity: disabled-container-opacity,
323
326
  )
324
327
  ));
325
328
  }
326
329
 
327
330
  /// Fixes inconsistent values in the outlined button tokens so that they can produce valid styles.
328
331
  /// @param {Map} $initial-tokens Map of outlined button tokens currently being generated.
329
- /// @param {Map} $all-tokens Map of all outlined button tokens, including hardcoded values.
330
332
  /// @return {Map} The given tokens, with the invalid values replaced with valid ones.
331
- @function _fix-outlined-button-tokens($initial-tokens, $all-tokens) {
332
- @return _combine-color-tokens($initial-tokens, $all-tokens, (
333
+ @function _fix-outlined-button-tokens($initial-tokens) {
334
+ $hardcoded-tokens: mdc-tokens.md-comp-outlined-button-values((), false);
335
+
336
+ @return _combine-color-tokens($initial-tokens, $hardcoded-tokens, (
333
337
  (
334
- color: 'disabled-label-text-color',
335
- opacity: 'disabled-label-text-opacity',
338
+ color: disabled-label-text-color,
339
+ opacity: disabled-label-text-opacity,
336
340
  ),
337
341
  (
338
- color: 'disabled-outline-color',
339
- opacity: 'disabled-outline-opacity',
342
+ color: disabled-outline-color,
343
+ opacity: disabled-outline-opacity,
340
344
  )
341
345
  ));
342
346
  }
@@ -347,43 +351,119 @@
347
351
  /// @param {Map} $all-tokens Map of all outlined text field tokens, including hardcoded values.
348
352
  /// This is necessary in order to do opacity lookups.
349
353
  /// @return {Map} The given tokens, with the invalid values replaced with valid ones.
350
- @function _fix-outlined-text-field-tokens($initial-tokens, $all-tokens) {
351
- @return _combine-color-tokens($initial-tokens, $all-tokens, (
354
+ @function _fix-outlined-text-field-tokens($initial-tokens) {
355
+ // Need to get the hardcoded values, because they include opacities that are used for the disabled
356
+ // state.
357
+ $hardcoded-tokens: mdc-tokens.md-comp-outlined-text-field-values((), false);
358
+
359
+ @return _combine-color-tokens($initial-tokens, $hardcoded-tokens, (
352
360
  (
353
- color: 'disabled-outline-color',
354
- opacity: 'disabled-outline-opacity'
361
+ color: disabled-outline-color,
362
+ opacity: disabled-outline-opacity
355
363
  ),
356
364
  (
357
- color: 'disabled-active-indicator-color',
358
- opacity: 'disabled-active-indicator-opacity'
365
+ color: disabled-active-indicator-color,
366
+ opacity: disabled-active-indicator-opacity
359
367
  ),
360
368
  (
361
- color: 'disabled-container-color',
362
- opacity: 'disabled-container-opacity'
369
+ color: disabled-container-color,
370
+ opacity: disabled-container-opacity
363
371
  ),
364
372
  (
365
- color: 'disabled-input-text-color',
366
- opacity: 'disabled-input-text-opacity'
373
+ color: disabled-input-text-color,
374
+ opacity: disabled-input-text-opacity
367
375
  ),
368
376
  (
369
- color: 'disabled-label-text-color',
370
- opacity: 'disabled-label-text-opacity'
377
+ color: disabled-label-text-color,
378
+ opacity: disabled-label-text-opacity
371
379
  ),
372
380
  (
373
- color: 'disabled-leading-icon-color',
374
- opacity: 'disabled-leading-icon-opacity'
381
+ color: disabled-leading-icon-color,
382
+ opacity: disabled-leading-icon-opacity
375
383
  ),
376
384
  (
377
- color: 'disabled-supporting-text-color',
378
- opacity: 'disabled-supporting-text-opacity'
385
+ color: disabled-supporting-text-color,
386
+ opacity: disabled-supporting-text-opacity
379
387
  ),
380
388
  (
381
- color: 'disabled-trailing-icon-color',
382
- opacity: 'disabled-trailing-icon-opacity'
389
+ color: disabled-trailing-icon-color,
390
+ opacity: disabled-trailing-icon-opacity
383
391
  )
384
392
  ));
385
393
  }
386
394
 
395
+ /// Gets the token values for the MDC form field.
396
+ /// @param {Map} $systems The MDC system tokens.
397
+ /// @return {Map} The form field tokens.
398
+ @function _get-form-field-tokens($systems) {
399
+ @return (
400
+ // TODO: MDC currently doesn't provide tokens for the form field so we need to
401
+ // define them ourselves. Clean this up once b/246297033 is resolved.
402
+ label-text-color: map.get($systems, 'md-sys-color', 'on-surface'),
403
+ label-text-font: map.get($systems, 'md-sys-typescale', 'body-medium-font'),
404
+ label-text-line-height: map.get($systems, 'md-sys-typescale', 'body-medium-line-height'),
405
+ label-text-size: map.get($systems, 'md-sys-typescale', 'body-medium-size'),
406
+ label-text-tracking: map.get($systems, 'md-sys-typescale', 'body-medium-tracking'),
407
+ label-text-weight: map.get($systems, 'md-sys-typescale', 'body-medium-weight'),
408
+ );
409
+ }
410
+
411
+ /// Fixes inconsistent values in the icon button tokens so that they can produce valid styles.
412
+ /// @param {Map} $initial-tokens Map of icon button tokens currently being generated.
413
+ /// @param {Map} $all-tokens Map of all icon button tokens, including hardcoded values.
414
+ /// @return {Map} The given tokens, with the invalid values replaced with valid ones.
415
+ @function _fix-icon-button-tokens($tokens) {
416
+ // Need to get the hardcoded values, because they include opacities that are used for the disabled
417
+ // state.
418
+ $hardcoded-tokens: mdc-tokens.md-comp-icon-button-values((), false);
419
+
420
+ $rename-keys: (
421
+ unselected-icon-color: icon-color,
422
+ );
423
+
424
+ $remapped-tokens: _rename-map-keys($tokens, $rename-keys);
425
+ $remapped-hardcoded-tokens: _rename-map-keys($hardcoded-tokens, $rename-keys);
426
+
427
+ @return _combine-color-tokens($remapped-tokens, $remapped-hardcoded-tokens, (
428
+ (
429
+ color: disabled-icon-color,
430
+ opacity: disabled-icon-opacity,
431
+ ),
432
+ ));
433
+ }
434
+
435
+ /// Fixes inconsistent values in the dialog tokens so that they can produce valid styles.
436
+ /// @param {Map} $initial-tokens Map of dialog tokens currently being generated.
437
+ /// @param {Map} $all-tokens Map of all dialog tokens, including hardcoded values.
438
+ /// @return {Map} The given tokens, with the invalid values replaced with valid ones.
439
+ @function _fix-dialog-tokens($systems, $tokens) {
440
+ $tokens: _rename-map-keys($tokens, (
441
+ headline-color: subhead-color,
442
+ headline-font: subhead-font,
443
+ headline-line-height: subhead-line-height,
444
+ headline-size: subhead-size,
445
+ headline-tracking: subhead-tracking,
446
+ headline-weight: subhead-weight,
447
+ ));
448
+
449
+ @if (map.has-key($tokens, container-elevation)) {
450
+ $tokens: map.merge($tokens, (
451
+ // The spec has the dialog at an elevation of 3 which is consistent with the current
452
+ // version of the tokens (0_161), however both the designs and MDC's implementation
453
+ // have the elevation set to 0. Set it manually to 0 here since the value in the
454
+ // exported tokens is likely outdated.
455
+ container-elevation: 0,
456
+
457
+ // This color needs to be supplied for MDC to produce the shadow. Technically we don't
458
+ // have to provide it since the elevation is set to 0 above, but we do it in case
459
+ // the value changes in the future.
460
+ container-shadow-color: #000,
461
+ ));
462
+ }
463
+
464
+ @return $tokens;
465
+ }
466
+
387
467
  /// Generates a set of namespaced tokens for all components.
388
468
  /// @param {Map} $systems The MDC system tokens
389
469
  /// @param {Boolean} $include-non-systemized Whether to include non-systemized tokens
@@ -423,7 +503,13 @@
423
503
  // Get the official MDC component tokens
424
504
  _namespace-tokens(
425
505
  (mdc, checkbox),
426
- _fix-checkbox-tokens(mdc-tokens.md-comp-checkbox-values($systems, $exclude-hardcoded)),
506
+ (
507
+ _fix-checkbox-tokens(mdc-tokens.md-comp-checkbox-values($systems, $exclude-hardcoded)),
508
+ _map-values(
509
+ custom-tokens.mdc-checkbox-color-variants($systems, $exclude-hardcoded),
510
+ meta.get-function(_fix-checkbox-tokens)
511
+ )
512
+ ),
427
513
  $token-slots
428
514
  ),
429
515
  _namespace-tokens(
@@ -433,12 +519,15 @@
433
519
  ),
434
520
  _namespace-tokens(
435
521
  (mdc, circular-progress),
436
- mdc-tokens.md-comp-circular-progress-indicator-values($systems, $exclude-hardcoded),
522
+ (
523
+ mdc-tokens.md-comp-circular-progress-indicator-values($systems, $exclude-hardcoded),
524
+ custom-tokens.mdc-circular-progress-color-variants($systems, $exclude-hardcoded),
525
+ ),
437
526
  $token-slots
438
527
  ),
439
528
  _namespace-tokens(
440
529
  (mdc, dialog),
441
- mdc-tokens.md-comp-dialog-values($systems, $exclude-hardcoded),
530
+ _fix-dialog-tokens($systems, mdc-tokens.md-comp-dialog-values($systems, $exclude-hardcoded)),
442
531
  $token-slots
443
532
  ),
444
533
  _namespace-tokens(
@@ -448,73 +537,125 @@
448
537
  ),
449
538
  _namespace-tokens(
450
539
  (mdc, fab),
451
- mdc-tokens.md-comp-fab-primary-values($systems, $exclude-hardcoded),
540
+ (
541
+ mdc-tokens.md-comp-fab-primary-values($systems, $exclude-hardcoded),
542
+ (
543
+ // Color variants
544
+ primary: (), // Default, no overrides needed.
545
+ secondary: mdc-tokens.md-comp-fab-secondary-values($systems, $exclude-hardcoded),
546
+ tertiary: mdc-tokens.md-comp-fab-tertiary-values($systems, $exclude-hardcoded)
547
+ )
548
+ ),
549
+ $token-slots
550
+ ),
551
+ _namespace-tokens(
552
+ (mdc, fab-small),
553
+ (
554
+ mdc-tokens.md-comp-fab-primary-small-values($systems, $exclude-hardcoded),
555
+ (
556
+ // Color variants
557
+ primary: (), // Default, no overrides needed.
558
+ secondary: mdc-tokens.md-comp-fab-secondary-small-values($systems, $exclude-hardcoded),
559
+ tertiary: mdc-tokens.md-comp-fab-tertiary-small-values($systems, $exclude-hardcoded)
560
+ )
561
+ ),
452
562
  $token-slots
453
563
  ),
454
564
  _namespace-tokens(
455
565
  (mdc, extended-fab),
456
- mdc-tokens.md-comp-extended-fab-primary-values($systems, $exclude-hardcoded),
566
+ (
567
+ mdc-tokens.md-comp-extended-fab-primary-values($systems, $exclude-hardcoded),
568
+ (
569
+ // Color variants
570
+ primary: (), // Default, no overrides needed.
571
+ secondary: mdc-tokens.md-comp-extended-fab-secondary-values($systems, $exclude-hardcoded),
572
+ tertiary: mdc-tokens.md-comp-extended-fab-tertiary-values($systems, $exclude-hardcoded)
573
+ ),
574
+ ),
457
575
  $token-slots
458
576
  ),
459
577
  _namespace-tokens(
460
578
  (mdc, filled-text-field),
461
- _fix-filled-text-field-tokens(
462
- mdc-tokens.md-comp-filled-text-field-values($systems, $exclude-hardcoded),
463
- // Need to pass in the hardcoded values, because they
464
- // include opacities that are used for the disabled state.
465
- mdc-tokens.md-comp-filled-text-field-values($systems, false)
579
+ (
580
+ _fix-filled-text-field-tokens(
581
+ mdc-tokens.md-comp-filled-text-field-values($systems, $exclude-hardcoded)
582
+ ),
583
+ _map-values(
584
+ custom-tokens.mdc-filled-text-field-color-variants($systems, $exclude-hardcoded),
585
+ meta.get-function(_fix-filled-text-field-tokens)
586
+ )
466
587
  ),
467
588
  $token-slots
468
589
  ),
590
+ _namespace-tokens(
591
+ (mdc, form-field),
592
+ _get-form-field-tokens($systems),
593
+ $token-slots
594
+ ),
469
595
  _namespace-tokens(
470
596
  (mdc, icon-button),
471
- mdc-tokens.md-comp-icon-button-values($systems, $exclude-hardcoded),
597
+ _fix-icon-button-tokens(mdc-tokens.md-comp-icon-button-values($systems, $exclude-hardcoded)),
472
598
  $token-slots
473
599
  ),
474
600
  _namespace-tokens(
475
601
  (mdc, text-button),
476
- _fix-text-button-tokens(
477
- mdc-tokens.md-comp-text-button-values($systems, $exclude-hardcoded),
478
- // Need to pass in the hardcoded values, because they
479
- // include opacities that are used for the disabled state.
480
- mdc-tokens.md-comp-text-button-values($systems, false),
602
+ (
603
+ _fix-text-button-tokens(
604
+ mdc-tokens.md-comp-text-button-values($systems, $exclude-hardcoded)
605
+ ),
606
+ _map-values(
607
+ custom-tokens.mdc-text-button-color-variants($systems, $exclude-hardcoded),
608
+ meta.get-function(_fix-text-button-tokens)
609
+ )
481
610
  ),
482
611
  $token-slots
483
612
  ),
484
613
  _namespace-tokens(
485
614
  // Note: in M3 the "protected" button is called "elevated".
486
615
  (mdc, protected-button),
487
- _fix-protected-button-tokens(
488
- mdc-tokens.md-comp-elevated-button-values($systems, $exclude-hardcoded),
489
- // Need to pass in the hardcoded values, because they
490
- // include opacities that are used for the disabled state.
491
- mdc-tokens.md-comp-elevated-button-values($systems, false),
616
+ (
617
+ _fix-protected-button-tokens(
618
+ mdc-tokens.md-comp-elevated-button-values($systems, $exclude-hardcoded)
619
+ ),
620
+ _map-values(
621
+ custom-tokens.mdc-elevated-button-color-variants($systems, $exclude-hardcoded),
622
+ meta.get-function(_fix-protected-button-tokens)
623
+ )
492
624
  ),
493
625
  $token-slots
494
626
  ),
495
627
  _namespace-tokens(
496
628
  (mdc, filled-button),
497
- _fix-filled-button-tokens(
498
- mdc-tokens.md-comp-filled-button-values($systems, $exclude-hardcoded),
499
- // Need to pass in the hardcoded values, because they
500
- // include opacities that are used for the disabled state.
501
- mdc-tokens.md-comp-filled-button-values($systems, false),
629
+ (
630
+ _fix-filled-button-tokens(
631
+ mdc-tokens.md-comp-filled-button-values($systems, $exclude-hardcoded),
632
+ ),
633
+ _map-values(
634
+ custom-tokens.mdc-filled-button-color-variants($systems, $exclude-hardcoded),
635
+ meta.get-function(_fix-filled-button-tokens)
636
+ )
502
637
  ),
503
638
  $token-slots
504
639
  ),
505
640
  _namespace-tokens(
506
641
  (mdc, outlined-button),
507
- _fix-outlined-button-tokens(
508
- mdc-tokens.md-comp-outlined-button-values($systems, $exclude-hardcoded),
509
- // Need to pass in the hardcoded values, because they
510
- // include opacities that are used for the disabled state.
511
- mdc-tokens.md-comp-outlined-button-values($systems, false),
642
+ (
643
+ _fix-outlined-button-tokens(
644
+ mdc-tokens.md-comp-outlined-button-values($systems, $exclude-hardcoded),
645
+ ),
646
+ _map-values(
647
+ custom-tokens.mdc-outlined-button-color-variants($systems, $exclude-hardcoded),
648
+ meta.get-function(_fix-outlined-button-tokens)
649
+ )
512
650
  ),
513
651
  $token-slots
514
652
  ),
515
653
  _namespace-tokens(
516
654
  (mdc, linear-progress),
517
- mdc-tokens.md-comp-linear-progress-indicator-values($systems, $exclude-hardcoded),
655
+ (
656
+ mdc-tokens.md-comp-linear-progress-indicator-values($systems, $exclude-hardcoded),
657
+ custom-tokens.mdc-linear-progress-color-variants($systems, $exclude-hardcoded),
658
+ ),
518
659
  $token-slots
519
660
  ),
520
661
  _namespace-tokens(
@@ -529,11 +670,14 @@
529
670
  ),
530
671
  _namespace-tokens(
531
672
  (mdc, outlined-text-field),
532
- _fix-outlined-text-field-tokens(
533
- mdc-tokens.md-comp-outlined-text-field-values($systems, $exclude-hardcoded),
534
- // Need to pass in the hardcoded values, because they
535
- // include opacities that are used for the disabled state.
536
- mdc-tokens.md-comp-outlined-text-field-values($systems, false),
673
+ (
674
+ _fix-outlined-text-field-tokens(
675
+ mdc-tokens.md-comp-outlined-text-field-values($systems, $exclude-hardcoded)
676
+ ),
677
+ _map-values(
678
+ custom-tokens.mdc-outlined-text-field-color-variants($systems, $exclude-hardcoded),
679
+ meta.get-function(_fix-outlined-text-field-tokens)
680
+ )
537
681
  ),
538
682
  $token-slots
539
683
  ),
@@ -544,12 +688,18 @@
544
688
  ),
545
689
  _namespace-tokens(
546
690
  (mdc, radio),
547
- mdc-tokens.md-comp-radio-button-values($systems, $exclude-hardcoded),
691
+ (
692
+ mdc-tokens.md-comp-radio-button-values($systems, $exclude-hardcoded),
693
+ custom-tokens.mdc-radio-color-variants($systems, $exclude-hardcoded)
694
+ ),
548
695
  $token-slots
549
696
  ),
550
697
  _namespace-tokens(
551
698
  (mdc, slider),
552
- mdc-tokens.md-comp-slider-values($systems, $exclude-hardcoded),
699
+ (
700
+ mdc-tokens.md-comp-slider-values($systems, $exclude-hardcoded),
701
+ custom-tokens.mdc-slider-color-variants($systems, $exclude-hardcoded)
702
+ ),
553
703
  $token-slots
554
704
  ),
555
705
  _namespace-tokens(
@@ -559,7 +709,10 @@
559
709
  ),
560
710
  _namespace-tokens(
561
711
  (mdc, switch),
562
- mdc-tokens.md-comp-switch-values($systems, $exclude-hardcoded),
712
+ (
713
+ mdc-tokens.md-comp-switch-values($systems, $exclude-hardcoded),
714
+ custom-tokens.mdc-switch-color-variants($systems, $exclude-hardcoded)
715
+ ),
563
716
  $token-slots
564
717
  ),
565
718
  _namespace-tokens(
@@ -570,6 +723,11 @@
570
723
 
571
724
  // Choose values for our made up tokens based on MDC system tokens or sensible hardcoded
572
725
  // values.
726
+ _namespace-tokens(
727
+ (mat, app),
728
+ custom-tokens.app($systems, $exclude-hardcoded),
729
+ $token-slots
730
+ ),
573
731
  _namespace-tokens(
574
732
  (mdc, tab-indicator),
575
733
  custom-tokens.tab-indicator($systems, $exclude-hardcoded),
@@ -600,6 +758,11 @@
600
758
  custom-tokens.datepicker($systems, $exclude-hardcoded),
601
759
  $token-slots
602
760
  ),
761
+ _namespace-tokens(
762
+ (mat, dialog),
763
+ custom-tokens.dialog($systems, $exclude-hardcoded),
764
+ $token-slots
765
+ ),
603
766
  _namespace-tokens(
604
767
  (mat, divider),
605
768
  custom-tokens.divider($systems, $exclude-hardcoded),
@@ -610,6 +773,11 @@
610
773
  custom-tokens.fab($systems, $exclude-hardcoded),
611
774
  $token-slots
612
775
  ),
776
+ _namespace-tokens(
777
+ (mat, fab-small),
778
+ custom-tokens.fab-small($systems, $exclude-hardcoded),
779
+ $token-slots
780
+ ),
613
781
  _namespace-tokens(
614
782
  (mat, form-field),
615
783
  custom-tokens.form-field($systems, $exclude-hardcoded),
@@ -676,6 +844,21 @@
676
844
  custom-tokens.paginator($systems, $exclude-hardcoded),
677
845
  $token-slots
678
846
  ),
847
+ _namespace-tokens(
848
+ (mat, full-pseudo-checkbox),
849
+ custom-tokens.full-pseudo-checkbox($systems, $exclude-hardcoded),
850
+ $token-slots
851
+ ),
852
+ _namespace-tokens(
853
+ (mat, minimal-pseudo-checkbox),
854
+ custom-tokens.minimal-pseudo-checkbox($systems, $exclude-hardcoded),
855
+ $token-slots
856
+ ),
857
+ _namespace-tokens(
858
+ (mat, checkbox),
859
+ custom-tokens.checkbox($systems, $exclude-hardcoded),
860
+ $token-slots
861
+ ),
679
862
  _namespace-tokens(
680
863
  (mat, radio),
681
864
  custom-tokens.radio($systems, $exclude-hardcoded),
@@ -696,11 +879,6 @@
696
879
  custom-tokens.sidenav($systems, $exclude-hardcoded),
697
880
  $token-slots
698
881
  ),
699
- _namespace-tokens(
700
- (mat, slide-toggle),
701
- custom-tokens.slide-toggle($systems, $exclude-hardcoded),
702
- $token-slots
703
- ),
704
882
  _namespace-tokens(
705
883
  (mat, slider),
706
884
  custom-tokens.slider($systems, $exclude-hardcoded),
@@ -763,13 +941,12 @@
763
941
  /// Generates a set of namespaced color tokens for all components.
764
942
  /// @param {String} $type The type of theme system (light or dark)
765
943
  /// @param {Map} $primary The primary palette
766
- /// @param {Map} $secondary The secondary palette
767
944
  /// @param {Map} $tertiary The tertiary palette
768
945
  /// @param {Map} $error The error palette
769
946
  /// @return {Map} A map of namespaced color tokens
770
- @function generate-color-tokens($type, $primary, $secondary, $tertiary, $error) {
947
+ @function generate-color-tokens($type, $primary, $tertiary, $error) {
771
948
  $ref: (
772
- md-ref-palette: _generate-ref-palette-tokens($primary, $secondary, $tertiary, $error)
949
+ md-ref-palette: _generate-ref-palette-tokens($primary, $tertiary, $error)
773
950
  );
774
951
  $sys-color: if($type == dark,
775
952
  mdc-tokens.md-sys-color-values-dark($ref),