@angular/material 18.0.4 → 18.0.5

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 (70) hide show
  1. package/button/_button-base.scss +3 -1
  2. package/button-toggle/index.d.ts +2 -2
  3. package/core/style/_vendor-prefixes.scss +5 -0
  4. package/core/tokens/_density.scss +1 -1
  5. package/core/tokens/m2/_index.scss +2 -2
  6. package/core/tokens/m2/mdc/{_tab.scss → _secondary-navigation-tab.scss} +1 -1
  7. package/core/tokens/m3/_index.scss +2 -2
  8. package/core/tokens/m3/mdc/{_tab.scss → _secondary-navigation-tab.scss} +1 -1
  9. package/esm2022/button/button.mjs +4 -4
  10. package/esm2022/button/fab.mjs +8 -8
  11. package/esm2022/button/icon-button.mjs +4 -4
  12. package/esm2022/button-toggle/button-toggle.mjs +30 -21
  13. package/esm2022/core/version.mjs +1 -1
  14. package/esm2022/datepicker/calendar.mjs +6 -3
  15. package/esm2022/list/list-option.mjs +8 -2
  16. package/esm2022/progress-bar/progress-bar.mjs +10 -4
  17. package/esm2022/progress-spinner/progress-spinner.mjs +8 -2
  18. package/esm2022/radio/radio.mjs +10 -4
  19. package/esm2022/sidenav/drawer.mjs +4 -1
  20. package/esm2022/slide-toggle/slide-toggle-config.mjs +1 -1
  21. package/esm2022/slider/slider.mjs +1 -1
  22. package/esm2022/tabs/tab-group.mjs +9 -4
  23. package/esm2022/tabs/tab-header.mjs +3 -3
  24. package/esm2022/tabs/tab-nav-bar/tab-nav-bar.mjs +12 -6
  25. package/esm2022/tooltip/tooltip.mjs +3 -3
  26. package/fesm2022/button-toggle.mjs +29 -20
  27. package/fesm2022/button-toggle.mjs.map +1 -1
  28. package/fesm2022/button.mjs +16 -16
  29. package/fesm2022/button.mjs.map +1 -1
  30. package/fesm2022/core.mjs +1 -1
  31. package/fesm2022/core.mjs.map +1 -1
  32. package/fesm2022/datepicker.mjs +5 -2
  33. package/fesm2022/datepicker.mjs.map +1 -1
  34. package/fesm2022/list.mjs +7 -1
  35. package/fesm2022/list.mjs.map +1 -1
  36. package/fesm2022/progress-bar.mjs +9 -3
  37. package/fesm2022/progress-bar.mjs.map +1 -1
  38. package/fesm2022/progress-spinner.mjs +7 -1
  39. package/fesm2022/progress-spinner.mjs.map +1 -1
  40. package/fesm2022/radio.mjs +9 -3
  41. package/fesm2022/radio.mjs.map +1 -1
  42. package/fesm2022/sidenav.mjs +4 -1
  43. package/fesm2022/sidenav.mjs.map +1 -1
  44. package/fesm2022/slide-toggle.mjs.map +1 -1
  45. package/fesm2022/slider.mjs.map +1 -1
  46. package/fesm2022/tabs.mjs +21 -10
  47. package/fesm2022/tabs.mjs.map +1 -1
  48. package/fesm2022/tooltip.mjs +2 -2
  49. package/fesm2022/tooltip.mjs.map +1 -1
  50. package/list/index.d.ts +7 -1
  51. package/package.json +2 -2
  52. package/prebuilt-themes/deeppurple-amber.css +1 -1
  53. package/prebuilt-themes/indigo-pink.css +1 -1
  54. package/prebuilt-themes/pink-bluegrey.css +1 -1
  55. package/prebuilt-themes/purple-green.css +1 -1
  56. package/progress-bar/_progress-bar-theme.scss +10 -7
  57. package/progress-bar/index.d.ts +14 -2
  58. package/progress-spinner/index.d.ts +14 -2
  59. package/radio/index.d.ts +14 -1
  60. package/schematics/ng-add/index.js +1 -1
  61. package/schematics/ng-add/index.mjs +1 -1
  62. package/schematics/ng-generate/m3-theme/index_bundled.js +2 -2
  63. package/schematics/ng-update/index_bundled.js +31 -31
  64. package/sidenav/index.d.ts +1 -0
  65. package/slide-toggle/index.d.ts +7 -1
  66. package/slider/index.d.ts +7 -1
  67. package/tabs/_tabs-common.scss +94 -36
  68. package/tabs/_tabs-theme.scss +33 -25
  69. package/tabs/index.d.ts +20 -3
  70. package/tooltip/_tooltip-theme.scss +18 -16
@@ -454,9 +454,9 @@ var require_tslib = __commonJS({
454
454
  }
455
455
  });
456
456
 
457
- // bazel-out/k8-fastbuild/bin/src/material/schematics/ng-update/data/attribute-selectors.js
457
+ // bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-update/data/attribute-selectors.js
458
458
  var require_attribute_selectors = __commonJS({
459
- "bazel-out/k8-fastbuild/bin/src/material/schematics/ng-update/data/attribute-selectors.js"(exports) {
459
+ "bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-update/data/attribute-selectors.js"(exports) {
460
460
  "use strict";
461
461
  Object.defineProperty(exports, "__esModule", { value: true });
462
462
  exports.attributeSelectors = void 0;
@@ -464,9 +464,9 @@ var require_attribute_selectors = __commonJS({
464
464
  }
465
465
  });
466
466
 
467
- // bazel-out/k8-fastbuild/bin/src/material/schematics/ng-update/data/class-names.js
467
+ // bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-update/data/class-names.js
468
468
  var require_class_names = __commonJS({
469
- "bazel-out/k8-fastbuild/bin/src/material/schematics/ng-update/data/class-names.js"(exports) {
469
+ "bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-update/data/class-names.js"(exports) {
470
470
  "use strict";
471
471
  Object.defineProperty(exports, "__esModule", { value: true });
472
472
  exports.classNames = void 0;
@@ -474,9 +474,9 @@ var require_class_names = __commonJS({
474
474
  }
475
475
  });
476
476
 
477
- // bazel-out/k8-fastbuild/bin/src/material/schematics/ng-update/data/constructor-checks.js
477
+ // bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-update/data/constructor-checks.js
478
478
  var require_constructor_checks = __commonJS({
479
- "bazel-out/k8-fastbuild/bin/src/material/schematics/ng-update/data/constructor-checks.js"(exports) {
479
+ "bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-update/data/constructor-checks.js"(exports) {
480
480
  "use strict";
481
481
  Object.defineProperty(exports, "__esModule", { value: true });
482
482
  exports.constructorChecks = void 0;
@@ -484,9 +484,9 @@ var require_constructor_checks = __commonJS({
484
484
  }
485
485
  });
486
486
 
487
- // bazel-out/k8-fastbuild/bin/src/material/schematics/ng-update/data/css-selectors.js
487
+ // bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-update/data/css-selectors.js
488
488
  var require_css_selectors = __commonJS({
489
- "bazel-out/k8-fastbuild/bin/src/material/schematics/ng-update/data/css-selectors.js"(exports) {
489
+ "bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-update/data/css-selectors.js"(exports) {
490
490
  "use strict";
491
491
  Object.defineProperty(exports, "__esModule", { value: true });
492
492
  exports.cssSelectors = void 0;
@@ -494,9 +494,9 @@ var require_css_selectors = __commonJS({
494
494
  }
495
495
  });
496
496
 
497
- // bazel-out/k8-fastbuild/bin/src/material/schematics/ng-update/data/css-tokens.js
497
+ // bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-update/data/css-tokens.js
498
498
  var require_css_tokens = __commonJS({
499
- "bazel-out/k8-fastbuild/bin/src/material/schematics/ng-update/data/css-tokens.js"(exports) {
499
+ "bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-update/data/css-tokens.js"(exports) {
500
500
  "use strict";
501
501
  Object.defineProperty(exports, "__esModule", { value: true });
502
502
  exports.cssTokens = void 0;
@@ -537,9 +537,9 @@ var require_css_tokens = __commonJS({
537
537
  }
538
538
  });
539
539
 
540
- // bazel-out/k8-fastbuild/bin/src/material/schematics/ng-update/data/element-selectors.js
540
+ // bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-update/data/element-selectors.js
541
541
  var require_element_selectors = __commonJS({
542
- "bazel-out/k8-fastbuild/bin/src/material/schematics/ng-update/data/element-selectors.js"(exports) {
542
+ "bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-update/data/element-selectors.js"(exports) {
543
543
  "use strict";
544
544
  Object.defineProperty(exports, "__esModule", { value: true });
545
545
  exports.elementSelectors = void 0;
@@ -547,9 +547,9 @@ var require_element_selectors = __commonJS({
547
547
  }
548
548
  });
549
549
 
550
- // bazel-out/k8-fastbuild/bin/src/material/schematics/ng-update/data/input-names.js
550
+ // bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-update/data/input-names.js
551
551
  var require_input_names = __commonJS({
552
- "bazel-out/k8-fastbuild/bin/src/material/schematics/ng-update/data/input-names.js"(exports) {
552
+ "bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-update/data/input-names.js"(exports) {
553
553
  "use strict";
554
554
  Object.defineProperty(exports, "__esModule", { value: true });
555
555
  exports.inputNames = void 0;
@@ -557,9 +557,9 @@ var require_input_names = __commonJS({
557
557
  }
558
558
  });
559
559
 
560
- // bazel-out/k8-fastbuild/bin/src/material/schematics/ng-update/data/method-call-checks.js
560
+ // bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-update/data/method-call-checks.js
561
561
  var require_method_call_checks = __commonJS({
562
- "bazel-out/k8-fastbuild/bin/src/material/schematics/ng-update/data/method-call-checks.js"(exports) {
562
+ "bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-update/data/method-call-checks.js"(exports) {
563
563
  "use strict";
564
564
  Object.defineProperty(exports, "__esModule", { value: true });
565
565
  exports.methodCallChecks = void 0;
@@ -567,9 +567,9 @@ var require_method_call_checks = __commonJS({
567
567
  }
568
568
  });
569
569
 
570
- // bazel-out/k8-fastbuild/bin/src/material/schematics/ng-update/data/output-names.js
570
+ // bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-update/data/output-names.js
571
571
  var require_output_names = __commonJS({
572
- "bazel-out/k8-fastbuild/bin/src/material/schematics/ng-update/data/output-names.js"(exports) {
572
+ "bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-update/data/output-names.js"(exports) {
573
573
  "use strict";
574
574
  Object.defineProperty(exports, "__esModule", { value: true });
575
575
  exports.outputNames = void 0;
@@ -577,9 +577,9 @@ var require_output_names = __commonJS({
577
577
  }
578
578
  });
579
579
 
580
- // bazel-out/k8-fastbuild/bin/src/material/schematics/ng-update/data/property-names.js
580
+ // bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-update/data/property-names.js
581
581
  var require_property_names = __commonJS({
582
- "bazel-out/k8-fastbuild/bin/src/material/schematics/ng-update/data/property-names.js"(exports) {
582
+ "bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-update/data/property-names.js"(exports) {
583
583
  "use strict";
584
584
  Object.defineProperty(exports, "__esModule", { value: true });
585
585
  exports.propertyNames = void 0;
@@ -587,9 +587,9 @@ var require_property_names = __commonJS({
587
587
  }
588
588
  });
589
589
 
590
- // bazel-out/k8-fastbuild/bin/src/material/schematics/ng-update/data/symbol-removal.js
590
+ // bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-update/data/symbol-removal.js
591
591
  var require_symbol_removal = __commonJS({
592
- "bazel-out/k8-fastbuild/bin/src/material/schematics/ng-update/data/symbol-removal.js"(exports) {
592
+ "bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-update/data/symbol-removal.js"(exports) {
593
593
  "use strict";
594
594
  Object.defineProperty(exports, "__esModule", { value: true });
595
595
  exports.symbolRemoval = void 0;
@@ -597,9 +597,9 @@ var require_symbol_removal = __commonJS({
597
597
  }
598
598
  });
599
599
 
600
- // bazel-out/k8-fastbuild/bin/src/material/schematics/ng-update/data/index.js
600
+ // bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-update/data/index.js
601
601
  var require_data = __commonJS({
602
- "bazel-out/k8-fastbuild/bin/src/material/schematics/ng-update/data/index.js"(exports) {
602
+ "bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-update/data/index.js"(exports) {
603
603
  "use strict";
604
604
  Object.defineProperty(exports, "__esModule", { value: true });
605
605
  var tslib_1 = require_tslib();
@@ -617,9 +617,9 @@ var require_data = __commonJS({
617
617
  }
618
618
  });
619
619
 
620
- // bazel-out/k8-fastbuild/bin/src/material/schematics/ng-update/upgrade-data.js
620
+ // bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-update/upgrade-data.js
621
621
  var require_upgrade_data = __commonJS({
622
- "bazel-out/k8-fastbuild/bin/src/material/schematics/ng-update/upgrade-data.js"(exports) {
622
+ "bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-update/upgrade-data.js"(exports) {
623
623
  "use strict";
624
624
  Object.defineProperty(exports, "__esModule", { value: true });
625
625
  exports.materialUpgradeData = void 0;
@@ -640,9 +640,9 @@ var require_upgrade_data = __commonJS({
640
640
  }
641
641
  });
642
642
 
643
- // bazel-out/k8-fastbuild/bin/src/material/schematics/ng-update/migrations/m2-theming-v18/migration.js
643
+ // bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-update/migrations/m2-theming-v18/migration.js
644
644
  var require_migration = __commonJS({
645
- "bazel-out/k8-fastbuild/bin/src/material/schematics/ng-update/migrations/m2-theming-v18/migration.js"(exports) {
645
+ "bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-update/migrations/m2-theming-v18/migration.js"(exports) {
646
646
  "use strict";
647
647
  Object.defineProperty(exports, "__esModule", { value: true });
648
648
  exports.migrateM2ThemingApiUsages = void 0;
@@ -818,9 +818,9 @@ var require_migration = __commonJS({
818
818
  }
819
819
  });
820
820
 
821
- // bazel-out/k8-fastbuild/bin/src/material/schematics/ng-update/migrations/m2-theming-v18/index.js
821
+ // bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-update/migrations/m2-theming-v18/index.js
822
822
  var require_m2_theming_v18 = __commonJS({
823
- "bazel-out/k8-fastbuild/bin/src/material/schematics/ng-update/migrations/m2-theming-v18/index.js"(exports) {
823
+ "bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-update/migrations/m2-theming-v18/index.js"(exports) {
824
824
  "use strict";
825
825
  Object.defineProperty(exports, "__esModule", { value: true });
826
826
  exports.M2ThemingMigration = void 0;
@@ -852,7 +852,7 @@ var require_m2_theming_v18 = __commonJS({
852
852
  }
853
853
  });
854
854
 
855
- // bazel-out/k8-fastbuild/bin/src/material/schematics/ng-update/index.mjs
855
+ // bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-update/index.mjs
856
856
  var ng_update_exports = {};
857
857
  __export(ng_update_exports, {
858
858
  updateToV18: () => updateToV18
@@ -145,6 +145,7 @@ export declare class MatDrawer implements AfterViewInit, AfterContentChecked, On
145
145
  */
146
146
  readonly _modeChanged: Subject<void>;
147
147
  private _injector;
148
+ private _changeDetectorRef;
148
149
  constructor(_elementRef: ElementRef<HTMLElement>, _focusTrapFactory: FocusTrapFactory, _focusMonitor: FocusMonitor, _platform: Platform, _ngZone: NgZone, _interactivityChecker: InteractivityChecker, _doc: any, _container?: MatDrawerContainer | undefined);
149
150
  /**
150
151
  * Focuses the provided element. If the element is not focusable, it will add a tabIndex
@@ -170,7 +170,13 @@ export declare class MatSlideToggleChange {
170
170
  export declare interface MatSlideToggleDefaultOptions {
171
171
  /** Whether toggle action triggers value changes in slide toggle. */
172
172
  disableToggleValue?: boolean;
173
- /** Default color for slide toggles. */
173
+ /**
174
+ * Default theme color of the slide toggle. This API is supported in M2 themes only,
175
+ * it has no effect in M3 themes.
176
+ *
177
+ * For information on applying color variants in M3, see
178
+ * https://material.angular.io/guide/theming#using-component-color-variants.
179
+ */
174
180
  color?: ThemePalette;
175
181
  /** Whether to hide the icon inside the slide toggle. */
176
182
  hideIcon?: boolean;
package/slider/index.d.ts CHANGED
@@ -80,7 +80,13 @@ export declare class MatSlider implements AfterViewInit, OnDestroy, _MatSlider {
80
80
  get min(): number;
81
81
  set min(v: number);
82
82
  private _min;
83
- /** Palette color of the slider. */
83
+ /**
84
+ * Theme color of the slider. This API is supported in M2 themes only, it
85
+ * has no effect in M3 themes.
86
+ *
87
+ * For information on applying color variants in M3, see
88
+ * https://material.angular.io/guide/theming#using-component-color-variants.
89
+ */
84
90
  color: ThemePalette;
85
91
  /** Whether ripples are disabled in the slider. */
86
92
  disableRipple: boolean;
@@ -1,29 +1,86 @@
1
- @use '@material/ripple' as mdc-ripple;
2
- @use '@material/tab' as mdc-tab;
3
- @use '@material/tab-indicator' as mdc-tab-indicator;
4
- @use '@material/tab-indicator/tab-indicator-theme' as mdc-tab-indicator-theme;
5
- @use '@material/tab/tab-theme' as mdc-tab-theme;
6
- @use '@material/theme/custom-properties' as mdc-custom-properties;
7
- @use '../core/mdc-helpers/mdc-helpers';
8
1
  @use '../core/style/vendor-prefixes';
9
2
  @use '../core/tokens/m2/mdc/tab-indicator' as tokens-mdc-tab-indicator;
10
- @use '../core/tokens/m2/mdc/tab' as tokens-mdc-tab;
3
+ @use '../core/tokens/m2/mdc/secondary-navigation-tab' as tokens-mdc-secondary-navigation-tab;
11
4
  @use '../core/tokens/m2/mat/tab-header' as tokens-mat-tab-header;
12
5
  @use '../core/tokens/m2/mat/tab-header-with-background' as tokens-mat-tab-header-with-background;
13
6
  @use '../core/tokens/token-utils';
14
- @use 'sass:map';
15
7
 
16
8
 
17
9
  $mat-tab-animation-duration: 500ms !default;
18
10
 
19
11
  // Combines the various structural styles we need for the tab group and tab nav bar.
20
12
  @mixin structural-styles {
21
- @include mdc-custom-properties.configure(
22
- $emit-fallback-values: false,
23
- $emit-fallback-vars: false
24
- ) {
25
- @include mdc-tab.static-styles($query: mdc-helpers.$mdc-base-styles-query);
26
- @include mdc-tab-indicator.static-styles($query: mdc-helpers.$mdc-base-styles-query);
13
+ .mdc-tab {
14
+ min-width: 90px;
15
+ padding: 0 24px;
16
+ display: flex;
17
+ flex: 1 0 auto;
18
+ justify-content: center;
19
+ box-sizing: border-box;
20
+ border: none;
21
+ outline: none;
22
+ text-align: center;
23
+ white-space: nowrap;
24
+ cursor: pointer;
25
+ z-index: 1;
26
+ }
27
+
28
+ .mdc-tab__content {
29
+ display: flex;
30
+ align-items: center;
31
+ justify-content: center;
32
+ height: inherit;
33
+ pointer-events: none;
34
+ }
35
+
36
+ .mdc-tab__text-label {
37
+ transition: 150ms color linear;
38
+ display: inline-block;
39
+ line-height: 1;
40
+ z-index: 2;
41
+ }
42
+
43
+ .mdc-tab--active .mdc-tab__text-label {
44
+ transition-delay: 100ms;
45
+ }
46
+
47
+ ._mat-animation-noopable .mdc-tab__text-label {
48
+ transition: none;
49
+ }
50
+
51
+ .mdc-tab-indicator {
52
+ display: flex;
53
+ position: absolute;
54
+ top: 0;
55
+ left: 0;
56
+ justify-content: center;
57
+ width: 100%;
58
+ height: 100%;
59
+ pointer-events: none;
60
+ z-index: 1;
61
+ }
62
+
63
+ .mdc-tab-indicator__content {
64
+ transition: var(--mat-tab-animation-duration, 250ms) transform cubic-bezier(0.4, 0, 0.2, 1);
65
+ transform-origin: left;
66
+ opacity: 0;
67
+ }
68
+
69
+ .mdc-tab-indicator__content--underline {
70
+ align-self: flex-end;
71
+ box-sizing: border-box;
72
+ width: 100%;
73
+ border-top-style: solid;
74
+ }
75
+
76
+ .mdc-tab-indicator--active .mdc-tab-indicator__content {
77
+ opacity: 1;
78
+ }
79
+
80
+ ._mat-animation-noopable, .mdc-tab-indicator--no-transition {
81
+ .mdc-tab-indicator__content {
82
+ transition: none;
83
+ }
27
84
  }
28
85
 
29
86
  .mat-mdc-tab-ripple {
@@ -37,14 +94,6 @@ $mat-tab-animation-duration: 500ms !default;
37
94
  }
38
95
 
39
96
  @mixin tab {
40
- @include mdc-custom-properties.configure(
41
- $emit-fallback-values: false,
42
- $emit-fallback-vars: false
43
- ) {
44
- @include mdc-tab-indicator-theme.theme-styles(tokens-mdc-tab-indicator.get-token-slots());
45
- @include mdc-tab-theme.secondary-navigation-tab-theme-styles(tokens-mdc-tab.get-token-slots());
46
- }
47
-
48
97
  -webkit-tap-highlight-color: transparent;
49
98
  -webkit-font-smoothing: antialiased;
50
99
  -moz-osx-font-smoothing: grayscale;
@@ -53,6 +102,13 @@ $mat-tab-animation-duration: 500ms !default;
53
102
  // Tabs might be `button` elements so we have to reset the user agent styling.
54
103
  background: none;
55
104
 
105
+ @include token-utils.use-tokens(
106
+ tokens-mdc-secondary-navigation-tab.$prefix,
107
+ tokens-mdc-secondary-navigation-tab.get-token-slots()
108
+ ) {
109
+ @include token-utils.create-token-slot(height, container-height);
110
+ }
111
+
56
112
  &.mdc-tab {
57
113
  // MDC's tabs stretch to fit the header by default, whereas stretching on our current ones
58
114
  // is an opt-in behavior. Also technically we don't need to combine the two classes, but
@@ -60,6 +116,17 @@ $mat-tab-animation-duration: 500ms !default;
60
116
  flex-grow: 0;
61
117
  }
62
118
 
119
+ .mdc-tab-indicator__content--underline {
120
+ @include token-utils.use-tokens(
121
+ tokens-mdc-tab-indicator.$prefix,
122
+ tokens-mdc-tab-indicator.get-token-slots()
123
+ ) {
124
+ @include token-utils.create-token-slot(border-color, active-indicator-color);
125
+ @include token-utils.create-token-slot(border-top-width, active-indicator-height);
126
+ @include token-utils.create-token-slot(border-radius, active-indicator-shape);
127
+ }
128
+ }
129
+
63
130
  @include token-utils.use-tokens(
64
131
  tokens-mat-tab-header.$prefix,
65
132
  tokens-mat-tab-header.get-token-slots()
@@ -185,18 +252,18 @@ $mat-tab-animation-duration: 500ms !default;
185
252
 
186
253
  // We need to handle the hover and focus indication ourselves, because we don't use MDC's ripple.
187
254
  &:hover .mdc-tab__ripple::before {
188
- opacity: map.get(mdc-ripple.$dark-ink-opacities, hover);
255
+ opacity: 0.04;
189
256
  }
190
257
 
191
258
  &.cdk-program-focused,
192
259
  &.cdk-keyboard-focused {
193
260
  .mdc-tab__ripple::before {
194
- opacity: map.get(mdc-ripple.$dark-ink-opacities, focus);
261
+ opacity: 0.12;
195
262
  }
196
263
  }
197
264
 
198
265
  .mat-ripple-element {
199
- opacity: map.get(mdc-ripple.$dark-ink-opacities, press);
266
+ opacity: 0.12;
200
267
 
201
268
  @include token-utils.use-tokens(
202
269
  tokens-mat-tab-header.$prefix,
@@ -243,7 +310,7 @@ $mat-tab-animation-duration: 500ms !default;
243
310
  }
244
311
 
245
312
  .mat-ripple-element {
246
- opacity: map.get(mdc-ripple.$dark-ink-opacities, press);
313
+ opacity: 0.12;
247
314
 
248
315
  @include token-utils.use-tokens(
249
316
  tokens-mat-tab-header.$prefix,
@@ -309,15 +376,6 @@ $mat-tab-animation-duration: 500ms !default;
309
376
  transition: none;
310
377
  }
311
378
  }
312
-
313
- // The `span` is in the selector in order to increase the specificity, ensuring
314
- // that it's always higher than the selector that declares the transition.
315
- ._mat-animation-noopable {
316
- span.mdc-tab-indicator__content,
317
- span.mdc-tab__text-label {
318
- transition: none;
319
- }
320
- }
321
379
  }
322
380
 
323
381
  // Structural styles for the element that wraps the paginated header items.
@@ -1,7 +1,5 @@
1
- @use '@material/tab-indicator/tab-indicator-theme' as mdc-tab-indicator-theme;
2
- @use '@material/tab/tab-theme' as mdc-tab-theme;
3
1
  @use '../core/style/sass-utils';
4
- @use '../core/tokens/m2/mdc/tab' as tokens-mdc-tab;
2
+ @use '../core/tokens/m2/mdc/secondary-navigation-tab' as tokens-mdc-secondary-navigation-tab;
5
3
  @use '../core/tokens/m2/mdc/tab-indicator' as tokens-mdc-tab-indicator;
6
4
  @use '../core/tokens/m2/mat/tab-header' as tokens-mat-tab-header;
7
5
  @use '../core/tokens/m2/mat/tab-header-with-background' as tokens-mat-tab-header-with-background;
@@ -20,14 +18,16 @@
20
18
  }
21
19
  @else {
22
20
  @include sass-utils.current-selector-or-root() {
23
- @include mdc-tab-indicator-theme.theme(tokens-mdc-tab-indicator.get-unthemable-tokens());
24
- @include mdc-tab-theme.secondary-navigation-tab-theme(tokens-mdc-tab.get-unthemable-tokens());
25
21
  @include token-utils.create-token-values(
26
- tokens-mat-tab-header.$prefix, tokens-mat-tab-header.get-unthemable-tokens());
22
+ tokens-mdc-secondary-navigation-tab.$prefix,
23
+ tokens-mdc-secondary-navigation-tab.get-unthemable-tokens());
27
24
  @include token-utils.create-token-values(
28
- tokens-mat-tab-header-with-background.$prefix,
29
- tokens-mat-tab-header-with-background.get-unthemable-tokens()
30
- );
25
+ tokens-mdc-tab-indicator.$prefix, tokens-mdc-tab-indicator.get-unthemable-tokens());
26
+ @include token-utils.create-token-values(
27
+ tokens-mat-tab-header.$prefix, tokens-mat-tab-header.get-unthemable-tokens());
28
+ @include token-utils.create-token-values(
29
+ tokens-mat-tab-header-with-background.$prefix,
30
+ tokens-mat-tab-header-with-background.get-unthemable-tokens());
31
31
  }
32
32
  }
33
33
  }
@@ -74,9 +74,12 @@
74
74
  }
75
75
 
76
76
  @mixin _palette-styles($theme, $palette-name) {
77
- @include mdc-tab-theme.secondary-navigation-tab-theme(
78
- tokens-mdc-tab.get-color-tokens($theme, $palette-name));
79
- @include mdc-tab-indicator-theme.theme(
77
+ @include token-utils.create-token-values(
78
+ tokens-mdc-secondary-navigation-tab.$prefix,
79
+ tokens-mdc-secondary-navigation-tab.get-color-tokens($theme, $palette-name)
80
+ );
81
+ @include token-utils.create-token-values(
82
+ tokens-mdc-tab-indicator.$prefix,
80
83
  tokens-mdc-tab-indicator.get-color-tokens($theme, $palette-name));
81
84
  @include token-utils.create-token-values(tokens-mat-tab-header.$prefix,
82
85
  tokens-mat-tab-header.get-color-tokens($theme, $palette-name));
@@ -90,10 +93,11 @@
90
93
  }
91
94
  @else {
92
95
  .mat-mdc-tab-header {
93
- @include mdc-tab-theme.secondary-navigation-tab-theme(
94
- tokens-mdc-tab.get-typography-tokens($theme));
95
- @include mdc-tab-indicator-theme.theme(
96
- tokens-mdc-tab-indicator.get-typography-tokens($theme));
96
+ @include token-utils.create-token-values(
97
+ tokens-mdc-secondary-navigation-tab.$prefix,
98
+ tokens-mdc-secondary-navigation-tab.get-typography-tokens($theme));
99
+ @include token-utils.create-token-values(
100
+ tokens-mdc-tab-indicator.$prefix, tokens-mdc-tab-indicator.get-typography-tokens($theme));
97
101
  @include token-utils.create-token-values(tokens-mat-tab-header.$prefix,
98
102
  tokens-mat-tab-header.get-typography-tokens($theme));
99
103
  @include token-utils.create-token-values(tokens-mat-tab-header-with-background.$prefix,
@@ -110,10 +114,11 @@
110
114
  }
111
115
  @else {
112
116
  .mat-mdc-tab-header {
113
- @include mdc-tab-theme.secondary-navigation-tab-theme(
114
- tokens-mdc-tab.get-density-tokens($theme));
115
- @include mdc-tab-indicator-theme.theme(
116
- tokens-mdc-tab-indicator.get-density-tokens($theme));
117
+ @include token-utils.create-token-values(
118
+ tokens-mdc-secondary-navigation-tab.$prefix,
119
+ tokens-mdc-secondary-navigation-tab.get-density-tokens($theme));
120
+ @include token-utils.create-token-values(
121
+ tokens-mdc-tab-indicator.$prefix, tokens-mdc-tab-indicator.get-density-tokens($theme));
117
122
  @include token-utils.create-token-values(tokens-mat-tab-header.$prefix,
118
123
  tokens-mat-tab-header.get-density-tokens($theme));
119
124
  @include token-utils.create-token-values(tokens-mat-tab-header-with-background.$prefix,
@@ -125,14 +130,14 @@
125
130
  /// Outputs the CSS variable values for the given tokens.
126
131
  /// @param {Map} $tokens The token values to emit.
127
132
  @mixin overrides($tokens: ()) {
128
- $tab-tokens: tokens-mdc-tab.get-token-slots();
133
+ $tab-tokens: tokens-mdc-secondary-navigation-tab.get-token-slots();
129
134
  $tab-indicator-tokens: tokens-mdc-tab-indicator.get-token-slots();
130
135
  $tab-header-tokens: tokens-mat-tab-header.get-token-slots();
131
136
  $tab-header-with-background-tokens: tokens-mat-tab-header-with-background.get-token-slots();
132
137
 
133
138
  @include token-utils.batch-create-token-values(
134
139
  $tokens,
135
- (prefix: tokens-mdc-tab.$prefix, tokens: $tab-tokens),
140
+ (prefix: tokens-mdc-secondary-navigation-tab.$prefix, tokens: $tab-tokens),
136
141
  (prefix: tokens-mdc-tab-indicator.$prefix, tokens: $tab-indicator-tokens),
137
142
  (prefix: tokens-mat-tab-header.$prefix, tokens: $tab-header-tokens),
138
143
  (
@@ -176,8 +181,11 @@
176
181
  $tokens, tokens-mat-tab-header.$prefix, $options...);
177
182
  // Don't pass $options here, because the mdc-tab doesn't have color variants,
178
183
  // only the mdc-tab-indicator and mat-tab-header do.
179
- $mdc-tab-tokens: token-utils.get-tokens-for($tokens, tokens-mdc-tab.$prefix);
180
- @include mdc-tab-theme.secondary-navigation-tab-theme($mdc-tab-tokens);
181
- @include mdc-tab-indicator-theme.theme($mdc-tab-indicator-tokens);
184
+ $mdc-secondary-navigation-tab-tokens:
185
+ token-utils.get-tokens-for($tokens, tokens-mdc-secondary-navigation-tab.$prefix);
186
+ @include token-utils.create-token-values(tokens-mdc-secondary-navigation-tab.$prefix,
187
+ $mdc-secondary-navigation-tab-tokens);
188
+ @include token-utils.create-token-values(tokens-mdc-tab-indicator.$prefix,
189
+ $mdc-tab-indicator-tokens);
182
190
  @include token-utils.create-token-values(tokens-mat-tab-header.$prefix, $mat-tab-header-tokens);
183
191
  }
package/tabs/index.d.ts CHANGED
@@ -563,7 +563,13 @@ export declare class MatTabGroup implements AfterContentInit, AfterContentChecke
563
563
  private _tabsSubscription;
564
564
  /** Subscription to changes in the tab labels. */
565
565
  private _tabLabelSubscription;
566
- /** Theme color of the tab group. */
566
+ /**
567
+ * Theme color of the tab group. This API is supported in M2 themes only, it
568
+ * has no effect in M3 themes.
569
+ *
570
+ * For information on applying color variants in M3, see
571
+ * https://material.angular.io/guide/theming#using-component-color-variants.
572
+ */
567
573
  color: ThemePalette;
568
574
  /** Whether the ink bar should fit its width to the size of the tab label content. */
569
575
  get fitInkBarToContent(): boolean;
@@ -606,7 +612,12 @@ export declare class MatTabGroup implements AfterContentInit, AfterContentChecke
606
612
  */
607
613
  preserveContent: boolean;
608
614
  /**
609
- * Background color of the tab group.
615
+ * Theme color of the background of the tab group. This API is supported in M2 themes only, it
616
+ * has no effect in M3 themes.
617
+ *
618
+ * For information on applying color variants in M3, see
619
+ * https://material.angular.io/guide/theming#using-component-color-variants.
620
+ *
610
621
  * @deprecated The background color should be customized through Sass theming APIs.
611
622
  * @breaking-change 20.0.0 Remove this input
612
623
  */
@@ -821,7 +832,13 @@ export declare class MatTabNav extends MatPaginatedTabHeader implements AfterCon
821
832
  private _animationDuration;
822
833
  /** Query list of all tab links of the tab navigation. */
823
834
  _items: QueryList<MatTabLink>;
824
- /** Background color of the tab nav. */
835
+ /**
836
+ * Theme color of the background of the tab nav. This API is supported in M2 themes only, it
837
+ * has no effect in M3 themes.
838
+ *
839
+ * For information on applying color variants in M3, see
840
+ * https://material.angular.io/guide/theming#using-component-color-variants.
841
+ */
825
842
  get backgroundColor(): ThemePalette;
826
843
  set backgroundColor(value: ThemePalette);
827
844
  private _backgroundColor;
@@ -1,5 +1,3 @@
1
- @use 'sass:map';
2
- @use '@material/tooltip/plain-tooltip-theme' as mdc-plain-tooltip-theme;
3
1
  @use '../core/style/sass-utils';
4
2
  @use '../core/theming/theming';
5
3
  @use '../core/theming/inspection';
@@ -15,7 +13,10 @@
15
13
  @else {
16
14
  // Add default values for tokens not related to color, typography, or density.
17
15
  @include sass-utils.current-selector-or-root() {
18
- @include mdc-plain-tooltip-theme.theme(tokens-mdc-plain-tooltip.get-unthemable-tokens());
16
+ @include token-utils.create-token-values(
17
+ tokens-mdc-plain-tooltip.$prefix,
18
+ tokens-mdc-plain-tooltip.get-unthemable-tokens()
19
+ );
19
20
  }
20
21
  }
21
22
  }
@@ -25,11 +26,11 @@
25
26
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, color));
26
27
  }
27
28
  @else {
28
- $mdc-tooltip-color-tokens: tokens-mdc-plain-tooltip.get-color-tokens($theme);
29
-
30
- // Add values for MDC tooltip tokens.
31
29
  @include sass-utils.current-selector-or-root() {
32
- @include mdc-plain-tooltip-theme.theme($mdc-tooltip-color-tokens);
30
+ @include token-utils.create-token-values(
31
+ tokens-mdc-plain-tooltip.$prefix,
32
+ tokens-mdc-plain-tooltip.get-color-tokens($theme)
33
+ );
33
34
  }
34
35
  }
35
36
  }
@@ -39,11 +40,11 @@
39
40
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
40
41
  }
41
42
  @else {
42
- $mdc-tooltip-typography-tokens: tokens-mdc-plain-tooltip.get-typography-tokens($theme);
43
-
44
- // Add values for MDC tooltip tokens.
45
43
  @include sass-utils.current-selector-or-root() {
46
- @include mdc-plain-tooltip-theme.theme($mdc-tooltip-typography-tokens);
44
+ @include token-utils.create-token-values(
45
+ tokens-mdc-plain-tooltip.$prefix,
46
+ tokens-mdc-plain-tooltip.get-typography-tokens($theme)
47
+ );
47
48
  }
48
49
  }
49
50
  }
@@ -53,11 +54,11 @@
53
54
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, density));
54
55
  }
55
56
  @else {
56
- $mdc-tooltip-density-tokens: tokens-mdc-plain-tooltip.get-density-tokens($theme);
57
-
58
- // Add values for MDC tooltip tokens.
59
57
  @include sass-utils.current-selector-or-root() {
60
- @include mdc-plain-tooltip-theme.theme($mdc-tooltip-density-tokens);
58
+ @include token-utils.create-token-values(
59
+ tokens-mdc-plain-tooltip.$prefix,
60
+ tokens-mdc-plain-tooltip.get-density-tokens($theme)
61
+ );
61
62
  }
62
63
  }
63
64
  }
@@ -93,6 +94,7 @@
93
94
  @include validation.selector-defined(
94
95
  'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');
95
96
  @if $tokens != () {
96
- @include mdc-plain-tooltip-theme.theme(map.get($tokens, tokens-mdc-plain-tooltip.$prefix));
97
+ $tokens: token-utils.get-tokens-for($tokens, tokens-mdc-plain-tooltip.$prefix);
98
+ @include token-utils.create-token-values(tokens-mdc-plain-tooltip.$prefix, $tokens);
97
99
  }
98
100
  }