@angular/material 17.0.0-next.1 → 17.0.0-next.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (121) hide show
  1. package/_index.scss +1 -2
  2. package/autocomplete/_autocomplete-theme.scss +12 -18
  3. package/autocomplete/index.d.ts +15 -24
  4. package/badge/_badge-theme.scss +15 -27
  5. package/badge/index.d.ts +9 -17
  6. package/bottom-sheet/_bottom-sheet-theme.scss +13 -22
  7. package/button-toggle/_button-toggle-theme.scss +17 -28
  8. package/button-toggle/index.d.ts +15 -18
  9. package/checkbox/index.d.ts +21 -27
  10. package/chips/_chips-theme.scss +18 -56
  11. package/core/color/_all-color.scss +7 -15
  12. package/core/density/private/_all-density.scss +34 -39
  13. package/core/focus-indicators/_focus-indicators-theme.scss +6 -8
  14. package/core/focus-indicators/_private.scss +22 -26
  15. package/core/index.d.ts +7 -11
  16. package/core/style/_form-common.scss +7 -7
  17. package/core/style/_private.scss +2 -4
  18. package/core/testing/index.d.ts +2 -1
  19. package/core/theming/_all-theme.scss +41 -41
  20. package/core/theming/_inspection.scss +47 -0
  21. package/core/theming/_m2-inspection.scss +57 -0
  22. package/core/theming/_theming.scss +0 -14
  23. package/core/tokens/m2/mat/_autocomplete.scss +5 -8
  24. package/core/tokens/m2/mat/_badge.scss +12 -15
  25. package/core/tokens/m2/mat/_bottom-sheet.scss +11 -17
  26. package/core/tokens/m2/mat/_datepicker.scss +28 -38
  27. package/core/tokens/m2/mat/_divider.scss +5 -8
  28. package/core/tokens/m2/mat/_expansion.scss +24 -28
  29. package/core/tokens/m2/mat/_grid-list.scss +8 -8
  30. package/core/tokens/m2/mat/_icon.scss +3 -3
  31. package/core/tokens/m2/mat/_legacy-button-toggle.scss +15 -19
  32. package/core/tokens/m2/mat/_menu.scss +12 -17
  33. package/core/tokens/m2/mat/_select.scss +15 -29
  34. package/core/tokens/m2/mat/_sidenav.scss +12 -14
  35. package/core/tokens/m2/mat/_snack-bar.scss +7 -8
  36. package/core/tokens/m2/mat/_standard-button-toggle.scss +23 -22
  37. package/core/tokens/m2/mat/_stepper.scss +30 -33
  38. package/core/tokens/m2/mat/_tab-header-with-background.scss +6 -8
  39. package/core/tokens/m2/mat/_tab-header.scss +13 -18
  40. package/core/tokens/m2/mat/_table.scss +19 -23
  41. package/core/tokens/m2/mat/_toolbar.scss +12 -16
  42. package/core/tokens/m2/mdc/_chip.scss +38 -24
  43. package/core/tokens/m2/mdc/_circular-progress.scss +5 -6
  44. package/core/tokens/m2/mdc/_dialog.scss +16 -30
  45. package/core/tokens/m2/mdc/_icon-button.scss +2 -2
  46. package/core/tokens/m2/mdc/_plain-tooltip.scss +9 -22
  47. package/core/tokens/m2/mdc/_snack-bar.scss +10 -23
  48. package/core/tokens/m2/mdc/_tab-indicator.scss +5 -8
  49. package/core/tokens/m2/mdc/_tab.scss +5 -4
  50. package/core/typography/_all-typography.scss +44 -47
  51. package/core/typography/_typography.scss +32 -155
  52. package/core/typography/_versioning.scss +7 -2
  53. package/datepicker/_datepicker-theme.scss +20 -34
  54. package/dialog/_dialog-theme.scss +14 -25
  55. package/dialog/_mdc-dialog-structure-overrides.scss +12 -10
  56. package/dialog/index.d.ts +2 -0
  57. package/divider/_divider-theme.scss +12 -18
  58. package/esm2022/autocomplete/autocomplete-trigger.mjs +5 -17
  59. package/esm2022/autocomplete/autocomplete.mjs +23 -50
  60. package/esm2022/badge/badge.mjs +11 -29
  61. package/esm2022/button-toggle/button-toggle.mjs +25 -33
  62. package/esm2022/checkbox/checkbox.mjs +32 -39
  63. package/esm2022/core/option/optgroup.mjs +10 -11
  64. package/esm2022/core/option/option.mjs +6 -6
  65. package/esm2022/core/testing/option-harness.mjs +3 -3
  66. package/esm2022/core/version.mjs +1 -1
  67. package/esm2022/dialog/dialog-container.mjs +16 -3
  68. package/esm2022/menu/menu-item.mjs +15 -11
  69. package/esm2022/menu/menu.mjs +9 -22
  70. package/esm2022/slide-toggle/slide-toggle.mjs +33 -37
  71. package/esm2022/tabs/tab-group.mjs +3 -3
  72. package/expansion/_expansion-theme.scss +16 -24
  73. package/fesm2022/autocomplete.mjs +25 -63
  74. package/fesm2022/autocomplete.mjs.map +1 -1
  75. package/fesm2022/badge.mjs +11 -28
  76. package/fesm2022/badge.mjs.map +1 -1
  77. package/fesm2022/button-toggle.mjs +25 -32
  78. package/fesm2022/button-toggle.mjs.map +1 -1
  79. package/fesm2022/checkbox.mjs +31 -38
  80. package/fesm2022/checkbox.mjs.map +1 -1
  81. package/fesm2022/core/testing.mjs +2 -2
  82. package/fesm2022/core/testing.mjs.map +1 -1
  83. package/fesm2022/core.mjs +14 -13
  84. package/fesm2022/core.mjs.map +1 -1
  85. package/fesm2022/dialog.mjs +15 -2
  86. package/fesm2022/dialog.mjs.map +1 -1
  87. package/fesm2022/menu.mjs +23 -31
  88. package/fesm2022/menu.mjs.map +1 -1
  89. package/fesm2022/slide-toggle.mjs +33 -36
  90. package/fesm2022/slide-toggle.mjs.map +1 -1
  91. package/fesm2022/tabs.mjs +2 -2
  92. package/fesm2022/tabs.mjs.map +1 -1
  93. package/form-field/_form-field-sizing.scss +1 -1
  94. package/grid-list/_grid-list-theme.scss +12 -19
  95. package/icon/_icon-theme.scss +17 -25
  96. package/list/_list-theme.scss +1 -1
  97. package/menu/_menu-theme.scss +13 -22
  98. package/menu/index.d.ts +12 -18
  99. package/package.json +2 -2
  100. package/prebuilt-themes/deeppurple-amber.css +1 -1
  101. package/prebuilt-themes/indigo-pink.css +1 -1
  102. package/prebuilt-themes/pink-bluegrey.css +1 -1
  103. package/prebuilt-themes/purple-green.css +1 -1
  104. package/progress-spinner/_progress-spinner-theme.scss +16 -22
  105. package/schematics/ng-add/index.js +1 -1
  106. package/schematics/ng-add/index.mjs +1 -1
  107. package/schematics/ng-generate/mdc-migration/index_bundled.js +44 -44
  108. package/schematics/ng-generate/mdc-migration/index_bundled.js.map +1 -1
  109. package/schematics/ng-update/index_bundled.js +25 -25
  110. package/select/_select-theme.scss +17 -31
  111. package/sidenav/_sidenav-theme.scss +12 -18
  112. package/slide-toggle/index.d.ts +20 -23
  113. package/snack-bar/_snack-bar-theme.scss +15 -24
  114. package/sort/_sort-theme.scss +13 -22
  115. package/stepper/_stepper-theme.scss +16 -34
  116. package/table/_table-theme.scss +14 -25
  117. package/tabs/_tabs-theme.scss +31 -45
  118. package/toolbar/_toolbar-theme.scss +22 -31
  119. package/tooltip/_tooltip-theme.scss +15 -23
  120. package/tree/_tree-theme.scss +20 -29
  121. package/core/typography/_typography-deprecated.scss +0 -39
@@ -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/element-selectors.js
497
+ // bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-update/data/element-selectors.js
498
498
  var require_element_selectors = __commonJS({
499
- "bazel-out/k8-fastbuild/bin/src/material/schematics/ng-update/data/element-selectors.js"(exports) {
499
+ "bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-update/data/element-selectors.js"(exports) {
500
500
  "use strict";
501
501
  Object.defineProperty(exports, "__esModule", { value: true });
502
502
  exports.elementSelectors = void 0;
@@ -504,9 +504,9 @@ var require_element_selectors = __commonJS({
504
504
  }
505
505
  });
506
506
 
507
- // bazel-out/k8-fastbuild/bin/src/material/schematics/ng-update/data/input-names.js
507
+ // bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-update/data/input-names.js
508
508
  var require_input_names = __commonJS({
509
- "bazel-out/k8-fastbuild/bin/src/material/schematics/ng-update/data/input-names.js"(exports) {
509
+ "bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-update/data/input-names.js"(exports) {
510
510
  "use strict";
511
511
  Object.defineProperty(exports, "__esModule", { value: true });
512
512
  exports.inputNames = void 0;
@@ -514,9 +514,9 @@ var require_input_names = __commonJS({
514
514
  }
515
515
  });
516
516
 
517
- // bazel-out/k8-fastbuild/bin/src/material/schematics/ng-update/data/method-call-checks.js
517
+ // bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-update/data/method-call-checks.js
518
518
  var require_method_call_checks = __commonJS({
519
- "bazel-out/k8-fastbuild/bin/src/material/schematics/ng-update/data/method-call-checks.js"(exports) {
519
+ "bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-update/data/method-call-checks.js"(exports) {
520
520
  "use strict";
521
521
  Object.defineProperty(exports, "__esModule", { value: true });
522
522
  exports.methodCallChecks = void 0;
@@ -524,9 +524,9 @@ var require_method_call_checks = __commonJS({
524
524
  }
525
525
  });
526
526
 
527
- // bazel-out/k8-fastbuild/bin/src/material/schematics/ng-update/data/output-names.js
527
+ // bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-update/data/output-names.js
528
528
  var require_output_names = __commonJS({
529
- "bazel-out/k8-fastbuild/bin/src/material/schematics/ng-update/data/output-names.js"(exports) {
529
+ "bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-update/data/output-names.js"(exports) {
530
530
  "use strict";
531
531
  Object.defineProperty(exports, "__esModule", { value: true });
532
532
  exports.outputNames = void 0;
@@ -534,9 +534,9 @@ var require_output_names = __commonJS({
534
534
  }
535
535
  });
536
536
 
537
- // bazel-out/k8-fastbuild/bin/src/material/schematics/ng-update/data/property-names.js
537
+ // bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-update/data/property-names.js
538
538
  var require_property_names = __commonJS({
539
- "bazel-out/k8-fastbuild/bin/src/material/schematics/ng-update/data/property-names.js"(exports) {
539
+ "bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-update/data/property-names.js"(exports) {
540
540
  "use strict";
541
541
  Object.defineProperty(exports, "__esModule", { value: true });
542
542
  exports.propertyNames = void 0;
@@ -544,9 +544,9 @@ var require_property_names = __commonJS({
544
544
  }
545
545
  });
546
546
 
547
- // bazel-out/k8-fastbuild/bin/src/material/schematics/ng-update/data/symbol-removal.js
547
+ // bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-update/data/symbol-removal.js
548
548
  var require_symbol_removal = __commonJS({
549
- "bazel-out/k8-fastbuild/bin/src/material/schematics/ng-update/data/symbol-removal.js"(exports) {
549
+ "bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-update/data/symbol-removal.js"(exports) {
550
550
  "use strict";
551
551
  Object.defineProperty(exports, "__esModule", { value: true });
552
552
  exports.symbolRemoval = void 0;
@@ -554,9 +554,9 @@ var require_symbol_removal = __commonJS({
554
554
  }
555
555
  });
556
556
 
557
- // bazel-out/k8-fastbuild/bin/src/material/schematics/ng-update/data/index.js
557
+ // bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-update/data/index.js
558
558
  var require_data = __commonJS({
559
- "bazel-out/k8-fastbuild/bin/src/material/schematics/ng-update/data/index.js"(exports) {
559
+ "bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-update/data/index.js"(exports) {
560
560
  "use strict";
561
561
  Object.defineProperty(exports, "__esModule", { value: true });
562
562
  var tslib_1 = require_tslib();
@@ -573,9 +573,9 @@ var require_data = __commonJS({
573
573
  }
574
574
  });
575
575
 
576
- // bazel-out/k8-fastbuild/bin/src/material/schematics/ng-update/upgrade-data.js
576
+ // bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-update/upgrade-data.js
577
577
  var require_upgrade_data = __commonJS({
578
- "bazel-out/k8-fastbuild/bin/src/material/schematics/ng-update/upgrade-data.js"(exports) {
578
+ "bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-update/upgrade-data.js"(exports) {
579
579
  "use strict";
580
580
  Object.defineProperty(exports, "__esModule", { value: true });
581
581
  exports.materialUpgradeData = void 0;
@@ -595,7 +595,7 @@ var require_upgrade_data = __commonJS({
595
595
  }
596
596
  });
597
597
 
598
- // bazel-out/k8-fastbuild/bin/src/material/schematics/ng-update/index.mjs
598
+ // bazel-out/darwin_arm64-fastbuild/bin/src/material/schematics/ng-update/index.mjs
599
599
  var ng_update_exports = {};
600
600
  __export(ng_update_exports, {
601
601
  updateToV17: () => updateToV17
@@ -1,4 +1,3 @@
1
- @use 'sass:map';
2
1
  @use '@material/density' as mdc-density;
3
2
  @use '@material/textfield' as mdc-textfield;
4
3
  @use '../core/tokens/m2/mat/select' as tokens-mat-select;
@@ -6,43 +5,35 @@
6
5
  @use '../core/style/sass-utils';
7
6
 
8
7
  @use '../core/theming/theming';
8
+ @use '../core/theming/inspection';
9
9
  @use '../core/typography/typography';
10
10
 
11
- @mixin color($config-or-theme) {
12
- $config: theming.get-color-config($config-or-theme);
13
-
11
+ @mixin color($theme) {
14
12
  @include sass-utils.current-selector-or-root() {
15
13
  @include token-utils.create-token-values(tokens-mat-select.$prefix,
16
- tokens-mat-select.get-color-tokens($config));
14
+ tokens-mat-select.get-color-tokens($theme));
17
15
 
18
16
  .mat-mdc-form-field.mat-accent {
19
- $accent: map.get($config, accent);
20
- $accent-config: map.merge($config, (primary: $accent));
21
17
  @include token-utils.create-token-values(tokens-mat-select.$prefix,
22
- tokens-mat-select.get-color-tokens($accent-config));
18
+ tokens-mat-select.get-color-tokens($theme, accent));
23
19
  }
24
20
 
25
21
  .mat-mdc-form-field.mat-warn {
26
- $warn: map.get($config, warn);
27
- $warn-config: map.merge($config, (primary: $warn));
28
22
  @include token-utils.create-token-values(tokens-mat-select.$prefix,
29
- tokens-mat-select.get-color-tokens($warn-config));
23
+ tokens-mat-select.get-color-tokens($theme, warn));
30
24
  }
31
25
  }
32
26
  }
33
27
 
34
- @mixin typography($config-or-theme) {
35
- $config: typography.private-typography-to-2018-config(
36
- theming.get-typography-config($config-or-theme));
37
-
28
+ @mixin typography($theme) {
38
29
  @include sass-utils.current-selector-or-root() {
39
30
  @include token-utils.create-token-values(tokens-mat-select.$prefix,
40
- tokens-mat-select.get-typography-tokens($config));
31
+ tokens-mat-select.get-typography-tokens($theme));
41
32
  }
42
33
  }
43
34
 
44
- @mixin density($config-or-theme) {
45
- $density-scale: theming.get-density-config($config-or-theme);
35
+ @mixin density($theme) {
36
+ $density-scale: inspection.get-theme-density($theme);
46
37
 
47
38
  // Density is clamped at -5 here, because MDC's form field throws an error for anything lower.
48
39
  $form-field-height: mdc-density.prop-value(
@@ -61,25 +52,20 @@
61
52
 
62
53
  @include sass-utils.current-selector-or-root() {
63
54
  @include token-utils.create-token-values(tokens-mat-select.$prefix,
64
- tokens-mat-select.get-density-tokens($density-scale));
55
+ tokens-mat-select.get-density-tokens($theme));
65
56
  }
66
57
  }
67
58
 
68
- @mixin theme($theme-or-color-config) {
69
- $theme: theming.private-legacy-get-theme($theme-or-color-config);
59
+ @mixin theme($theme) {
70
60
  @include theming.private-check-duplicate-theme-styles($theme, 'mat-select') {
71
- $color: theming.get-color-config($theme);
72
- $density: theming.get-density-config($theme);
73
- $typography: theming.get-typography-config($theme);
74
-
75
- @if $color != null {
76
- @include color($color);
61
+ @if inspection.theme-has($theme, color) {
62
+ @include color($theme);
77
63
  }
78
- @if $density != null {
79
- @include density($density);
64
+ @if inspection.theme-has($theme, density) {
65
+ @include density($theme);
80
66
  }
81
- @if $typography != null {
82
- @include typography($typography);
67
+ @if inspection.theme-has($theme, typography) {
68
+ @include typography($theme);
83
69
  }
84
70
  }
85
71
  }
@@ -1,36 +1,30 @@
1
1
  @use '../core/theming/theming';
2
+ @use '../core/theming/inspection';
2
3
  @use '../core/tokens/m2/mat/sidenav' as tokens-mat-sidenav;
3
4
  @use '../core/tokens/token-utils';
4
5
  @use '../core/style/sass-utils';
5
6
 
6
- @mixin color($config-or-theme) {
7
- $config: theming.get-color-config($config-or-theme);
8
-
7
+ @mixin color($theme) {
9
8
  @include sass-utils.current-selector-or-root() {
10
9
  @include token-utils.create-token-values(tokens-mat-sidenav.$prefix,
11
- tokens-mat-sidenav.get-color-tokens($config));
10
+ tokens-mat-sidenav.get-color-tokens($theme));
12
11
  }
13
12
  }
14
13
 
15
- @mixin typography($config-or-theme) {}
14
+ @mixin typography($theme) {}
16
15
 
17
- @mixin density($config-or-theme) {}
16
+ @mixin density($theme) {}
18
17
 
19
- @mixin theme($theme-or-color-config) {
20
- $theme: theming.private-legacy-get-theme($theme-or-color-config);
18
+ @mixin theme($theme) {
21
19
  @include theming.private-check-duplicate-theme-styles($theme, 'mat-sidenav') {
22
- $color: theming.get-color-config($theme);
23
- $density: theming.get-density-config($theme);
24
- $typography: theming.get-typography-config($theme);
25
-
26
- @if $color != null {
27
- @include color($color);
20
+ @if inspection.theme-has($theme, color) {
21
+ @include color($theme);
28
22
  }
29
- @if $density != null {
30
- @include density($density);
23
+ @if inspection.theme-has($theme, density) {
24
+ @include density($theme);
31
25
  }
32
- @if $typography != null {
33
- @include typography($typography);
26
+ @if inspection.theme-has($theme, typography) {
27
+ @include typography($theme);
34
28
  }
35
29
  }
36
30
  }
@@ -1,17 +1,10 @@
1
- import { _AbstractConstructor } from '@angular/material/core';
2
1
  import { AfterContentInit } from '@angular/core';
3
- import { BooleanInput } from '@angular/cdk/coercion';
4
- import { CanColor } from '@angular/material/core';
5
- import { CanDisable } from '@angular/material/core';
6
- import { CanDisableRipple } from '@angular/material/core';
7
2
  import { ChangeDetectorRef } from '@angular/core';
8
3
  import { CheckboxRequiredValidator } from '@angular/forms';
9
- import { _Constructor } from '@angular/material/core';
10
4
  import { ControlValueAccessor } from '@angular/forms';
11
5
  import { ElementRef } from '@angular/core';
12
6
  import { EventEmitter } from '@angular/core';
13
7
  import { FocusMonitor } from '@angular/cdk/a11y';
14
- import { HasTabIndex } from '@angular/material/core';
15
8
  import * as i0 from '@angular/core';
16
9
  import * as i3 from '@angular/material/core';
17
10
  import * as i4 from '@angular/common';
@@ -48,14 +41,14 @@ export declare const MAT_SLIDE_TOGGLE_VALUE_ACCESSOR: {
48
41
  multi: boolean;
49
42
  };
50
43
 
51
- export declare class MatSlideToggle extends _MatSlideToggleMixinBase implements OnDestroy, AfterContentInit, ControlValueAccessor, CanDisable, CanColor, HasTabIndex, CanDisableRipple {
44
+ export declare class MatSlideToggle implements OnDestroy, AfterContentInit, ControlValueAccessor {
45
+ private _elementRef;
52
46
  protected _focusMonitor: FocusMonitor;
53
47
  protected _changeDetectorRef: ChangeDetectorRef;
54
48
  defaults: MatSlideToggleDefaultOptions;
55
49
  private _onChange;
56
50
  private _onTouched;
57
51
  private _uniqueId;
58
- private _required;
59
52
  private _checked;
60
53
  private _createChangeEvent;
61
54
  /** Unique ID for the label element. */
@@ -83,15 +76,20 @@ export declare class MatSlideToggle extends _MatSlideToggleMixinBase implements
83
76
  /** Used to set the aria-describedby attribute on the underlying input element. */
84
77
  ariaDescribedby: string;
85
78
  /** Whether the slide-toggle is required. */
86
- get required(): boolean;
87
- set required(value: BooleanInput);
79
+ required: boolean;
80
+ /** Palette color of slide toggle. */
81
+ color: string | undefined;
82
+ /** Whether the slide toggle is disabled. */
83
+ disabled: boolean;
84
+ /** Whether the slide toggle has a ripple. */
85
+ disableRipple: boolean;
86
+ /** Tabindex of slide toggle. */
87
+ tabIndex: number;
88
88
  /** Whether the slide-toggle element is checked or not. */
89
89
  get checked(): boolean;
90
- set checked(value: BooleanInput);
90
+ set checked(value: boolean);
91
91
  /** Whether to hide the icon inside of the slide toggle. */
92
- get hideIcon(): boolean;
93
- set hideIcon(value: BooleanInput);
94
- private _hideIcon;
92
+ hideIcon: boolean;
95
93
  /** An event will be dispatched each time the slide-toggle changes its value. */
96
94
  readonly change: EventEmitter<MatSlideToggleChange>;
97
95
  /**
@@ -102,7 +100,7 @@ export declare class MatSlideToggle extends _MatSlideToggleMixinBase implements
102
100
  readonly toggleChange: EventEmitter<void>;
103
101
  /** Returns the unique id for the visual hidden input. */
104
102
  get inputId(): string;
105
- constructor(elementRef: ElementRef, _focusMonitor: FocusMonitor, _changeDetectorRef: ChangeDetectorRef, tabIndex: string, defaults: MatSlideToggleDefaultOptions, animationMode?: string);
103
+ constructor(_elementRef: ElementRef, _focusMonitor: FocusMonitor, _changeDetectorRef: ChangeDetectorRef, tabIndex: string, defaults: MatSlideToggleDefaultOptions, animationMode?: string);
106
104
  ngAfterContentInit(): void;
107
105
  ngOnDestroy(): void;
108
106
  /** Implemented as part of ControlValueAccessor. */
@@ -124,6 +122,12 @@ export declare class MatSlideToggle extends _MatSlideToggleMixinBase implements
124
122
  _getAriaLabelledBy(): string | null;
125
123
  static ɵfac: i0.ɵɵFactoryDeclaration<MatSlideToggle, [null, null, null, { attribute: "tabindex"; }, null, { optional: true; }]>;
126
124
  static ɵcmp: i0.ɵɵComponentDeclaration<MatSlideToggle, "mat-slide-toggle", ["matSlideToggle"], { "disabled": { "alias": "disabled"; "required": false; }; "disableRipple": { "alias": "disableRipple"; "required": false; }; "color": { "alias": "color"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "name": { "alias": "name"; "required": false; }; "id": { "alias": "id"; "required": false; }; "labelPosition": { "alias": "labelPosition"; "required": false; }; "ariaLabel": { "alias": "aria-label"; "required": false; }; "ariaLabelledby": { "alias": "aria-labelledby"; "required": false; }; "ariaDescribedby": { "alias": "aria-describedby"; "required": false; }; "required": { "alias": "required"; "required": false; }; "checked": { "alias": "checked"; "required": false; }; "hideIcon": { "alias": "hideIcon"; "required": false; }; }, { "change": "change"; "toggleChange": "toggleChange"; }, never, ["*"], false, never>;
125
+ static ngAcceptInputType_disabled: unknown;
126
+ static ngAcceptInputType_disableRipple: unknown;
127
+ static ngAcceptInputType_tabIndex: unknown;
128
+ static ngAcceptInputType_required: unknown;
129
+ static ngAcceptInputType_checked: unknown;
130
+ static ngAcceptInputType_hideIcon: unknown;
127
131
  }
128
132
 
129
133
  /** Change event object emitted by a slide toggle. */
@@ -149,13 +153,6 @@ export declare interface MatSlideToggleDefaultOptions {
149
153
  hideIcon?: boolean;
150
154
  }
151
155
 
152
- /** @docs-private */
153
- declare const _MatSlideToggleMixinBase: _Constructor<HasTabIndex> & _AbstractConstructor<HasTabIndex> & _Constructor<CanColor> & _AbstractConstructor<CanColor> & _Constructor<CanDisableRipple> & _AbstractConstructor<CanDisableRipple> & _Constructor<CanDisable> & _AbstractConstructor<CanDisable> & {
154
- new (_elementRef: ElementRef): {
155
- _elementRef: ElementRef;
156
- };
157
- };
158
-
159
156
  export declare class MatSlideToggleModule {
160
157
  static ɵfac: i0.ɵɵFactoryDeclaration<MatSlideToggleModule, never>;
161
158
  static ɵmod: i0.ɵɵNgModuleDeclaration<MatSlideToggleModule, [typeof i2.MatSlideToggle], [typeof _MatSlideToggleRequiredValidatorModule, typeof i3.MatCommonModule, typeof i3.MatRippleModule, typeof i4.CommonModule], [typeof _MatSlideToggleRequiredValidatorModule, typeof i2.MatSlideToggle, typeof i3.MatCommonModule]>;
@@ -1,57 +1,48 @@
1
1
  @use '@material/snackbar/snackbar-theme' as mdc-snackbar-theme;
2
2
  @use '../core/theming/theming';
3
+ @use '../core/theming/inspection';
3
4
  @use '../core/style/sass-utils';
4
5
  @use '../core/typography/typography';
5
6
  @use '../core/tokens/token-utils';
6
7
  @use '../core/tokens/m2/mdc/snack-bar' as tokens-mdc-snack-bar;
7
8
  @use '../core/tokens/m2/mat/snack-bar' as tokens-mat-snack-bar;
8
9
 
9
- @mixin base($config-or-theme) {
10
+ @mixin base($theme) {
10
11
  // Add default values for tokens not related to color, typography, or density.
11
12
  @include sass-utils.current-selector-or-root() {
12
13
  @include mdc-snackbar-theme.theme(tokens-mdc-snack-bar.get-unthemable-tokens());
13
14
  }
14
15
  }
15
16
 
16
- @mixin color($config-or-theme) {
17
- $config: theming.get-color-config($config-or-theme);
18
-
17
+ @mixin color($theme) {
19
18
  @include sass-utils.current-selector-or-root() {
20
- @include mdc-snackbar-theme.theme(tokens-mdc-snack-bar.get-color-tokens($config));
19
+ @include mdc-snackbar-theme.theme(tokens-mdc-snack-bar.get-color-tokens($theme));
21
20
  @include token-utils.create-token-values(
22
21
  tokens-mat-snack-bar.$prefix,
23
- tokens-mat-snack-bar.get-color-tokens($config)
22
+ tokens-mat-snack-bar.get-color-tokens($theme)
24
23
  );
25
24
  }
26
25
  }
27
26
 
28
- @mixin typography($config-or-theme) {
29
- $config: typography.private-typography-to-2018-config(
30
- theming.get-typography-config($config-or-theme));
31
-
27
+ @mixin typography($theme) {
32
28
  @include sass-utils.current-selector-or-root() {
33
- @include mdc-snackbar-theme.theme(tokens-mdc-snack-bar.get-typography-tokens($config));
29
+ @include mdc-snackbar-theme.theme(tokens-mdc-snack-bar.get-typography-tokens($theme));
34
30
  }
35
31
  }
36
32
 
37
- @mixin density($config-or-theme) {}
33
+ @mixin density($theme) {}
38
34
 
39
- @mixin theme($theme-or-color-config) {
40
- $theme: theming.private-legacy-get-theme($theme-or-color-config);
35
+ @mixin theme($theme) {
41
36
  @include theming.private-check-duplicate-theme-styles($theme, 'mat-snack-bar') {
42
- $color: theming.get-color-config($theme);
43
- $density: theming.get-density-config($theme);
44
- $typography: theming.get-typography-config($theme);
45
-
46
37
  @include base($theme);
47
- @if $color != null {
48
- @include color($color);
38
+ @if inspection.theme-has($theme, color) {
39
+ @include color($theme);
49
40
  }
50
- @if $density != null {
51
- @include density($density);
41
+ @if inspection.theme-has($theme, density) {
42
+ @include density($theme);
52
43
  }
53
- @if $typography != null {
54
- @include typography($typography);
44
+ @if inspection.theme-has($theme, typography) {
45
+ @include typography($theme);
55
46
  }
56
47
  }
57
48
  }
@@ -1,16 +1,12 @@
1
1
  @use 'sass:color';
2
- @use 'sass:map';
3
2
  @use 'sass:meta';
4
3
  @use '../core/theming/theming';
4
+ @use '../core/theming/inspection';
5
5
 
6
- @mixin color($config-or-theme) {
7
- $config: theming.get-color-config($config-or-theme);
8
- $background: map.get($config, background);
9
- $foreground: map.get($config, foreground);
10
-
6
+ @mixin color($theme) {
11
7
  .mat-sort-header-arrow {
12
- $table-background: theming.get-color-from-palette($background, 'card');
13
- $text-color: theming.get-color-from-palette($foreground, secondary-text);
8
+ $table-background: inspection.get-theme-color($theme, background, card);
9
+ $text-color: inspection.get-theme-color($theme, foreground, secondary-text);
14
10
 
15
11
  // Because the arrow is made up of multiple elements that are stacked on top of each other,
16
12
  // we can't use the semi-transparent color from the theme directly. If the value is a color
@@ -28,25 +24,20 @@
28
24
  }
29
25
  }
30
26
 
31
- @mixin typography($config-or-theme) {}
27
+ @mixin typography($theme) {}
32
28
 
33
- @mixin density($config-or-theme) {}
29
+ @mixin density($theme) {}
34
30
 
35
- @mixin theme($theme-or-color-config) {
36
- $theme: theming.private-legacy-get-theme($theme-or-color-config);
31
+ @mixin theme($theme) {
37
32
  @include theming.private-check-duplicate-theme-styles($theme, 'mat-sort') {
38
- $color: theming.get-color-config($theme);
39
- $density: theming.get-density-config($theme);
40
- $typography: theming.get-typography-config($theme);
41
-
42
- @if $color != null {
43
- @include color($color);
33
+ @if inspection.theme-has($theme, color) {
34
+ @include color($theme);
44
35
  }
45
- @if $density != null {
46
- @include density($density);
36
+ @if inspection.theme-has($theme, density) {
37
+ @include density($theme);
47
38
  }
48
- @if $typography != null {
49
- @include typography($typography);
39
+ @if inspection.theme-has($theme, typography) {
40
+ @include typography($theme);
50
41
  }
51
42
  }
52
43
  }
@@ -1,69 +1,51 @@
1
- @use 'sass:map';
2
- @use 'sass:math';
3
1
  @use '../core/theming/theming';
2
+ @use '../core/theming/inspection';
4
3
  @use '../core/typography/typography';
5
- @use '../core/density/private/compatibility';
6
4
  @use '../core/style/sass-utils';
7
5
  @use '../core/tokens/token-utils';
8
6
  @use '../core/tokens/m2/mat/stepper' as tokens-mat-stepper;
9
- @use './stepper-variables';
10
-
11
- @mixin color($config-or-theme) {
12
- $config: theming.get-color-config($config-or-theme);
13
7
 
8
+ @mixin color($theme) {
14
9
  @include sass-utils.current-selector-or-root() {
15
10
  @include token-utils.create-token-values(tokens-mat-stepper.$prefix,
16
- tokens-mat-stepper.get-color-tokens($config));
11
+ tokens-mat-stepper.get-color-tokens($theme));
17
12
 
18
13
  .mat-step-header.mat-accent {
19
14
  @include token-utils.create-token-values(tokens-mat-stepper.$prefix,
20
- tokens-mat-stepper.private-get-color-palette-color-tokens(map.get($config, accent)));
15
+ tokens-mat-stepper.private-get-color-palette-color-tokens($theme, accent));
21
16
  }
22
17
 
23
18
  .mat-step-header.mat-warn {
24
19
  @include token-utils.create-token-values(tokens-mat-stepper.$prefix,
25
- tokens-mat-stepper.private-get-color-palette-color-tokens(map.get($config, warn)));
20
+ tokens-mat-stepper.private-get-color-palette-color-tokens($theme, warn));
26
21
  }
27
22
  }
28
23
  }
29
24
 
30
- @mixin typography($config-or-theme) {
31
- $config: typography.private-typography-to-2014-config(
32
- theming.get-typography-config($config-or-theme));
33
-
25
+ @mixin typography($theme) {
34
26
  @include sass-utils.current-selector-or-root() {
35
27
  @include token-utils.create-token-values(tokens-mat-stepper.$prefix,
36
- tokens-mat-stepper.get-typography-tokens($config));
28
+ tokens-mat-stepper.get-typography-tokens($theme));
37
29
  }
38
30
  }
39
31
 
40
- @mixin density($config-or-theme) {
41
- $density-scale: theming.get-density-config($config-or-theme);
42
- $height: compatibility.private-density-prop-value(stepper-variables.$density-config,
43
- $density-scale, height);
44
- $vertical-padding: math.div($height - stepper-variables.$label-header-height, 2);
45
-
32
+ @mixin density($theme) {
46
33
  @include sass-utils.current-selector-or-root() {
47
34
  @include token-utils.create-token-values(tokens-mat-stepper.$prefix,
48
- tokens-mat-stepper.get-density-tokens($density-scale));
35
+ tokens-mat-stepper.get-density-tokens($theme));
49
36
  }
50
37
  }
51
38
 
52
- @mixin theme($theme-or-color-config) {
53
- $theme: theming.private-legacy-get-theme($theme-or-color-config);
39
+ @mixin theme($theme) {
54
40
  @include theming.private-check-duplicate-theme-styles($theme, 'mat-stepper') {
55
- $color: theming.get-color-config($theme);
56
- $density: theming.get-density-config($theme);
57
- $typography: theming.get-typography-config($theme);
58
-
59
- @if $color != null {
60
- @include color($color);
41
+ @if inspection.theme-has($theme, color) {
42
+ @include color($theme);
61
43
  }
62
- @if $density != null {
63
- @include density($density);
44
+ @if inspection.theme-has($theme, density) {
45
+ @include density($theme);
64
46
  }
65
- @if $typography != null {
66
- @include typography($typography);
47
+ @if inspection.theme-has($theme, typography) {
48
+ @include typography($theme);
67
49
  }
68
50
  }
69
51
  }