@angular/material 16.2.0-next.4 → 16.2.0-rc.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 (113) hide show
  1. package/badge/_badge-theme.scss +84 -118
  2. package/bottom-sheet/_bottom-sheet-theme.scss +10 -11
  3. package/bottom-sheet/index.d.ts +6 -0
  4. package/button-toggle/_button-toggle-theme.scss +20 -97
  5. package/button-toggle/_button-toggle-variables.scss +2 -0
  6. package/chips/index.d.ts +11 -4
  7. package/core/index.d.ts +1 -0
  8. package/core/selection/pseudo-checkbox/_pseudo-checkbox-common.scss +1 -1
  9. package/core/tokens/_token-utils.scss +1 -0
  10. package/core/tokens/m2/mat/_badge.scss +78 -0
  11. package/core/tokens/m2/mat/_bottom-sheet.scss +56 -0
  12. package/core/tokens/m2/mat/_datepicker.scss +184 -0
  13. package/core/tokens/m2/mat/_divider.scss +45 -0
  14. package/core/tokens/m2/mat/_form-field.scss +44 -0
  15. package/core/tokens/m2/mat/_grid-list.scss +46 -0
  16. package/core/tokens/m2/mat/_icon.scss +45 -0
  17. package/core/tokens/m2/mat/_legacy-button-toggle.scss +63 -0
  18. package/core/tokens/m2/mat/_sidenav.scss +65 -0
  19. package/core/tokens/m2/mat/_slide-toggle.scss +1 -1
  20. package/core/tokens/m2/mat/_standard-button-toggle.scss +87 -0
  21. package/core/tokens/m2/mat/_tab-header.scss +1 -1
  22. package/core/tokens/m2/mat/_toolbar.scss +79 -0
  23. package/core/tokens/m2/mdc/_circular-progress.scss +1 -1
  24. package/core/tokens/m2/mdc/_filled-text-field.scss +175 -0
  25. package/core/tokens/m2/mdc/_outlined-text-field.scss +158 -0
  26. package/core/tokens/m2/mdc/_plain-tooltip.scss +2 -2
  27. package/datepicker/_datepicker-theme.scss +44 -203
  28. package/dialog/index.d.ts +6 -0
  29. package/divider/_divider-theme.scss +6 -8
  30. package/esm2022/bottom-sheet/bottom-sheet-container.mjs +3 -3
  31. package/esm2022/bottom-sheet/bottom-sheet-ref.mjs +8 -1
  32. package/esm2022/button-toggle/button-toggle.mjs +2 -2
  33. package/esm2022/chips/chip-option.mjs +4 -5
  34. package/esm2022/chips/chip-row.mjs +15 -10
  35. package/esm2022/chips/chip.mjs +29 -12
  36. package/esm2022/core/private/ripple-loader.mjs +4 -1
  37. package/esm2022/core/version.mjs +1 -1
  38. package/esm2022/datepicker/calendar-body.mjs +2 -2
  39. package/esm2022/datepicker/calendar.mjs +2 -2
  40. package/esm2022/datepicker/date-range-input.mjs +2 -2
  41. package/esm2022/datepicker/datepicker-base.mjs +3 -3
  42. package/esm2022/datepicker/datepicker-toggle.mjs +2 -2
  43. package/esm2022/dialog/dialog-ref.mjs +1 -1
  44. package/esm2022/dialog/dialog.mjs +2 -1
  45. package/esm2022/divider/divider.mjs +2 -2
  46. package/esm2022/form-field/form-field.mjs +3 -3
  47. package/esm2022/grid-list/grid-list.mjs +2 -2
  48. package/esm2022/grid-list/grid-tile.mjs +2 -2
  49. package/esm2022/icon/icon.mjs +2 -2
  50. package/esm2022/menu/menu-item.mjs +4 -4
  51. package/esm2022/menu/menu.mjs +3 -3
  52. package/esm2022/radio/radio.mjs +13 -1
  53. package/esm2022/sidenav/drawer.mjs +3 -3
  54. package/esm2022/sidenav/sidenav.mjs +3 -3
  55. package/esm2022/slide-toggle/slide-toggle.mjs +2 -2
  56. package/esm2022/tabs/ink-bar.mjs +1 -1
  57. package/esm2022/tabs/tab-group.mjs +2 -2
  58. package/esm2022/tabs/tab-nav-bar/tab-nav-bar.mjs +2 -2
  59. package/esm2022/toolbar/toolbar.mjs +2 -2
  60. package/fesm2022/bottom-sheet.mjs +9 -2
  61. package/fesm2022/bottom-sheet.mjs.map +1 -1
  62. package/fesm2022/button-toggle.mjs +2 -2
  63. package/fesm2022/button-toggle.mjs.map +1 -1
  64. package/fesm2022/chips.mjs +41 -17
  65. package/fesm2022/chips.mjs.map +1 -1
  66. package/fesm2022/core.mjs +4 -1
  67. package/fesm2022/core.mjs.map +1 -1
  68. package/fesm2022/datepicker.mjs +10 -10
  69. package/fesm2022/datepicker.mjs.map +1 -1
  70. package/fesm2022/dialog.mjs +1 -0
  71. package/fesm2022/dialog.mjs.map +1 -1
  72. package/fesm2022/divider.mjs +2 -2
  73. package/fesm2022/divider.mjs.map +1 -1
  74. package/fesm2022/form-field.mjs +2 -2
  75. package/fesm2022/form-field.mjs.map +1 -1
  76. package/fesm2022/grid-list.mjs +4 -4
  77. package/fesm2022/grid-list.mjs.map +1 -1
  78. package/fesm2022/icon.mjs +2 -2
  79. package/fesm2022/icon.mjs.map +1 -1
  80. package/fesm2022/menu.mjs +5 -5
  81. package/fesm2022/menu.mjs.map +1 -1
  82. package/fesm2022/radio.mjs +12 -0
  83. package/fesm2022/radio.mjs.map +1 -1
  84. package/fesm2022/sidenav.mjs +4 -4
  85. package/fesm2022/sidenav.mjs.map +1 -1
  86. package/fesm2022/slide-toggle.mjs +2 -2
  87. package/fesm2022/slide-toggle.mjs.map +1 -1
  88. package/fesm2022/tabs.mjs +4 -4
  89. package/fesm2022/tabs.mjs.map +1 -1
  90. package/fesm2022/toolbar.mjs +2 -2
  91. package/fesm2022/toolbar.mjs.map +1 -1
  92. package/form-field/_form-field-theme.scss +37 -44
  93. package/form-field/_mdc-text-field-structure-overrides.scss +18 -0
  94. package/grid-list/_grid-list-theme.scss +7 -6
  95. package/icon/_icon-theme.scss +18 -8
  96. package/legacy-prebuilt-themes/legacy-deeppurple-amber.css +1 -1
  97. package/legacy-prebuilt-themes/legacy-indigo-pink.css +1 -1
  98. package/legacy-prebuilt-themes/legacy-pink-bluegrey.css +1 -1
  99. package/legacy-prebuilt-themes/legacy-purple-green.css +1 -1
  100. package/package.json +49 -49
  101. package/prebuilt-themes/deeppurple-amber.css +1 -1
  102. package/prebuilt-themes/indigo-pink.css +1 -1
  103. package/prebuilt-themes/pink-bluegrey.css +1 -1
  104. package/prebuilt-themes/purple-green.css +1 -1
  105. package/radio/index.d.ts +4 -1
  106. package/schematics/ng-add/index.js +1 -1
  107. package/schematics/ng-add/index.mjs +1 -1
  108. package/schematics/ng-generate/mdc-migration/index_bundled.js +44 -44
  109. package/schematics/ng-update/index_bundled.js +25 -25
  110. package/sidenav/_sidenav-theme.scss +6 -69
  111. package/tabs/_tabs-common.scss +1 -1
  112. package/tabs/index.d.ts +1 -1
  113. package/toolbar/_toolbar-theme.scss +25 -71
@@ -1,105 +1,59 @@
1
1
  @use 'sass:map';
2
- @use '../core/density/private/compatibility';
3
- @use '../core/style/variables';
4
2
  @use '../core/theming/theming';
5
3
  @use '../core/typography/typography';
6
- @use '../core/typography/typography-utils';
7
- @use './toolbar-variables';
8
-
9
- @mixin _height($height) {
10
- .mat-toolbar-multiple-rows {
11
- min-height: $height;
12
- }
13
- .mat-toolbar-row, .mat-toolbar-single-row {
14
- height: $height;
15
- }
16
- }
4
+ @use '../core/tokens/m2/mat/toolbar' as tokens-mat-toolbar;
5
+ @use '../core/tokens/token-utils';
6
+ @use '../core/style/sass-utils';
17
7
 
18
8
  @mixin _palette-styles($palette) {
19
- background: theming.get-color-from-palette($palette);
20
- color: theming.get-color-from-palette($palette, default-contrast);
21
- }
22
-
23
- @mixin _form-field-overrides {
24
- .mat-form-field-underline,
25
- .mat-form-field-ripple,
26
- .mat-focused .mat-form-field-ripple {
27
- background-color: currentColor;
28
- }
29
-
30
- .mat-form-field-label,
31
- .mat-focused .mat-form-field-label,
32
- .mat-select-value,
33
- .mat-select-arrow,
34
- .mat-form-field.mat-focused .mat-select-arrow {
35
- color: inherit;
36
- }
37
-
38
- .mat-input-element {
39
- caret-color: currentColor;
40
- }
9
+ @include token-utils.create-token-values(
10
+ tokens-mat-toolbar.$prefix,
11
+ tokens-mat-toolbar.private-get-color-palette-color-tokens(
12
+ $background-color: theming.get-color-from-palette($palette),
13
+ $text-color: theming.get-color-from-palette($palette, default-contrast)
14
+ )
15
+ );
41
16
  }
42
17
 
43
18
  @mixin color($config-or-theme) {
44
19
  $config: theming.get-color-config($config-or-theme);
45
- $primary: map.get($config, primary);
46
- $accent: map.get($config, accent);
47
- $warn: map.get($config, warn);
48
- $background: map.get($config, background);
49
- $foreground: map.get($config, foreground);
50
20
 
51
- .mat-toolbar {
52
- background: theming.get-color-from-palette($background, app-bar);
53
- color: theming.get-color-from-palette($foreground, text);
21
+ @include sass-utils.current-selector-or-root() {
22
+ @include token-utils.create-token-values(tokens-mat-toolbar.$prefix,
23
+ tokens-mat-toolbar.get-color-tokens($config));
24
+ }
54
25
 
26
+ .mat-toolbar {
55
27
  &.mat-primary {
56
- @include _palette-styles($primary);
28
+ @include _palette-styles(map.get($config, primary));
57
29
  }
58
30
 
59
31
  &.mat-accent {
60
- @include _palette-styles($accent);
32
+ @include _palette-styles(map.get($config, accent));
61
33
  }
62
34
 
63
35
  &.mat-warn {
64
- @include _palette-styles($warn);
36
+ @include _palette-styles(map.get($config, warn));
65
37
  }
66
-
67
- @include _form-field-overrides;
68
38
  }
69
39
  }
70
40
 
71
41
  @mixin typography($config-or-theme) {
72
42
  $config: typography.private-typography-to-2014-config(
73
43
  theming.get-typography-config($config-or-theme));
74
- .mat-toolbar,
75
- .mat-toolbar h1,
76
- .mat-toolbar h2,
77
- .mat-toolbar h3,
78
- .mat-toolbar h4,
79
- .mat-toolbar h5,
80
- .mat-toolbar h6 {
81
- @include typography-utils.typography-level($config, title);
82
- margin: 0;
44
+
45
+ @include sass-utils.current-selector-or-root() {
46
+ @include token-utils.create-token-values(tokens-mat-toolbar.$prefix,
47
+ tokens-mat-toolbar.get-typography-tokens($config));
83
48
  }
84
49
  }
85
50
 
86
51
  @mixin density($config-or-theme) {
87
52
  $density-scale: theming.get-density-config($config-or-theme);
88
- $height-desktop: compatibility.private-density-prop-value(
89
- toolbar-variables.$desktop-density-config, $density-scale, height);
90
- $height-mobile: compatibility.private-density-prop-value(
91
- toolbar-variables.$mobile-density-config, $density-scale, height);
92
53
 
93
- @include compatibility.private-density-legacy-compatibility() {
94
- // Set the default height for the toolbar.
95
- @include _height($height-desktop);
96
-
97
- // As per specs, toolbars should have a different height in mobile devices. This has been
98
- // specified in the old guidelines and is still observable in the new specifications by
99
- // looking at the spec images. See: https://material.io/design/components/app-bars-top.html#anatomy
100
- @media (variables.$xsmall) {
101
- @include _height($height-mobile);
102
- }
54
+ @include sass-utils.current-selector-or-root() {
55
+ @include token-utils.create-token-values(tokens-mat-toolbar.$prefix,
56
+ tokens-mat-toolbar.get-density-tokens($density-scale));
103
57
  }
104
58
  }
105
59