@ng-matero/extensions 16.3.1 → 17.0.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 (204) hide show
  1. package/_index.scss +2 -1
  2. package/alert/_alert-theme.scss +54 -24
  3. package/alert/alert.d.ts +3 -6
  4. package/alert/alert.scss +3 -3
  5. package/button/_button-theme.scss +6 -4
  6. package/button/button-loading.d.ts +5 -10
  7. package/button/button-module.d.ts +5 -5
  8. package/checkbox-group/checkbox-group.d.ts +4 -9
  9. package/colorpicker/_colorpicker-theme.scss +62 -34
  10. package/colorpicker/colorpicker-input.d.ts +1 -3
  11. package/colorpicker/colorpicker-toggle.d.ts +2 -3
  12. package/colorpicker/colorpicker.d.ts +5 -6
  13. package/core/color/_all-color.scss +7 -18
  14. package/core/density/_all-density.scss +28 -14
  15. package/core/mdc-helpers/_mdc-helpers.scss +27 -238
  16. package/core/style/_sass-utils.scss +13 -1
  17. package/core/style/_validation.scss +43 -0
  18. package/core/theming/_all-theme.scss +32 -17
  19. package/core/theming/_inspection.scss +303 -0
  20. package/core/theming/_m2-inspection.scss +266 -0
  21. package/core/tokens/_token-utils.scss +4 -5
  22. package/core/tokens/m2/mdc/_plain-tooltip.scss +21 -29
  23. package/core/tokens/m2/mtx/_alert.scss +14 -15
  24. package/core/tokens/m2/mtx/_colorpicker.scss +8 -11
  25. package/core/tokens/m2/mtx/_datetimepicker.scss +38 -47
  26. package/core/tokens/m2/mtx/_drawer.scss +9 -10
  27. package/core/tokens/m2/mtx/_grid.scss +34 -22
  28. package/core/tokens/m2/mtx/_loader.scss +6 -6
  29. package/core/tokens/m2/mtx/_popover.scss +10 -11
  30. package/core/tokens/m2/mtx/_progress.scss +18 -17
  31. package/core/tokens/m2/mtx/_select.scss +65 -25
  32. package/core/tokens/m2/mtx/_split.scss +8 -11
  33. package/core/typography/_all-typography.scss +40 -0
  34. package/core/typography/_typography.scss +1 -579
  35. package/datetimepicker/_datetimepicker-theme.scss +75 -48
  36. package/datetimepicker/calendar.d.ts +7 -14
  37. package/datetimepicker/calendar.scss +16 -4
  38. package/datetimepicker/clock.d.ts +1 -2
  39. package/datetimepicker/datetimepicker-content.scss +3 -3
  40. package/datetimepicker/datetimepicker-input.d.ts +1 -2
  41. package/datetimepicker/datetimepicker-toggle.d.ts +2 -3
  42. package/datetimepicker/datetimepicker.d.ts +15 -26
  43. package/datetimepicker/month-view.d.ts +1 -1
  44. package/datetimepicker/multi-year-view.d.ts +1 -1
  45. package/datetimepicker/time.d.ts +3 -5
  46. package/datetimepicker/time.scss +2 -2
  47. package/datetimepicker/year-view.d.ts +1 -1
  48. package/drawer/_drawer-theme.scss +55 -22
  49. package/drawer/drawer-container.scss +25 -4
  50. package/esm2022/alert/alert-module.mjs +4 -4
  51. package/esm2022/alert/alert.mjs +11 -18
  52. package/esm2022/button/button-loading.mjs +13 -23
  53. package/esm2022/button/button-module.mjs +6 -7
  54. package/esm2022/checkbox-group/checkbox-group-module.mjs +4 -4
  55. package/esm2022/checkbox-group/checkbox-group.mjs +18 -29
  56. package/esm2022/colorpicker/colorpicker-input.mjs +13 -14
  57. package/esm2022/colorpicker/colorpicker-module.mjs +4 -4
  58. package/esm2022/colorpicker/colorpicker-toggle.mjs +18 -18
  59. package/esm2022/colorpicker/colorpicker.mjs +31 -36
  60. package/esm2022/column-resize/column-resize-directives/column-resize-flex.mjs +4 -4
  61. package/esm2022/column-resize/column-resize-directives/column-resize.mjs +4 -4
  62. package/esm2022/column-resize/column-resize-module.mjs +4 -4
  63. package/esm2022/column-resize/column-resize-notifier.mjs +7 -7
  64. package/esm2022/column-resize/column-resize.mjs +3 -3
  65. package/esm2022/column-resize/column-size-store.mjs +3 -3
  66. package/esm2022/column-resize/event-dispatcher.mjs +4 -4
  67. package/esm2022/column-resize/overlay-handle.mjs +3 -3
  68. package/esm2022/column-resize/resizable.mjs +3 -3
  69. package/esm2022/column-resize/resize-strategy.mjs +13 -13
  70. package/esm2022/core/datetime/datetime.module.mjs +8 -8
  71. package/esm2022/core/datetime/native-datetime-adapter.mjs +5 -5
  72. package/esm2022/core/pipes/is-template-ref.pipe.mjs +3 -3
  73. package/esm2022/core/pipes/pipes.module.mjs +4 -4
  74. package/esm2022/core/pipes/to-observable.pipe.mjs +3 -3
  75. package/esm2022/datetimepicker/calendar-body.mjs +5 -6
  76. package/esm2022/datetimepicker/calendar.mjs +30 -47
  77. package/esm2022/datetimepicker/clock.mjs +10 -9
  78. package/esm2022/datetimepicker/datetimepicker-input.mjs +14 -15
  79. package/esm2022/datetimepicker/datetimepicker-intl.mjs +3 -3
  80. package/esm2022/datetimepicker/datetimepicker-module.mjs +4 -4
  81. package/esm2022/datetimepicker/datetimepicker-toggle.mjs +18 -18
  82. package/esm2022/datetimepicker/datetimepicker.mjs +57 -80
  83. package/esm2022/datetimepicker/month-view.mjs +8 -9
  84. package/esm2022/datetimepicker/multi-year-view.mjs +8 -8
  85. package/esm2022/datetimepicker/time.mjs +18 -24
  86. package/esm2022/datetimepicker/year-view.mjs +8 -8
  87. package/esm2022/dialog/dialog-container.mjs +7 -7
  88. package/esm2022/dialog/dialog-module.mjs +4 -4
  89. package/esm2022/dialog/dialog.mjs +4 -4
  90. package/esm2022/drawer/drawer-container.mjs +7 -7
  91. package/esm2022/drawer/drawer-module.mjs +4 -4
  92. package/esm2022/drawer/drawer.mjs +5 -5
  93. package/esm2022/grid/cell.mjs +6 -6
  94. package/esm2022/grid/column-menu.mjs +5 -5
  95. package/esm2022/grid/column-resize/column-resize-directives/column-resize-flex.mjs +4 -4
  96. package/esm2022/grid/column-resize/column-resize-directives/column-resize.mjs +4 -4
  97. package/esm2022/grid/column-resize/column-resize-module.mjs +8 -8
  98. package/esm2022/grid/column-resize/overlay-handle.mjs +6 -6
  99. package/esm2022/grid/column-resize/resizable-directives/resizable.mjs +6 -6
  100. package/esm2022/grid/column-resize/resize-strategy.mjs +5 -5
  101. package/esm2022/grid/expansion-toggle.mjs +5 -5
  102. package/esm2022/grid/grid-module.mjs +4 -4
  103. package/esm2022/grid/grid-pipes.mjs +22 -22
  104. package/esm2022/grid/grid-utils.mjs +4 -4
  105. package/esm2022/grid/grid.mjs +76 -44
  106. package/esm2022/loader/loader-module.mjs +4 -4
  107. package/esm2022/loader/loader.mjs +17 -29
  108. package/esm2022/photoviewer/photoviewer-module.mjs +4 -4
  109. package/esm2022/photoviewer/photoviewer.mjs +7 -7
  110. package/esm2022/popover/popover-content.mjs +8 -8
  111. package/esm2022/popover/popover-module.mjs +4 -4
  112. package/esm2022/popover/popover-target.mjs +4 -4
  113. package/esm2022/popover/popover-trigger.mjs +6 -6
  114. package/esm2022/popover/popover.mjs +52 -137
  115. package/esm2022/progress/progress-module.mjs +4 -4
  116. package/esm2022/progress/progress.mjs +14 -25
  117. package/esm2022/select/option.mjs +11 -17
  118. package/esm2022/select/select-module.mjs +4 -4
  119. package/esm2022/select/select.mjs +13 -13
  120. package/esm2022/select/templates.mjs +44 -44
  121. package/esm2022/split/split-module.mjs +4 -4
  122. package/esm2022/split/split-pane.mjs +5 -5
  123. package/esm2022/split/split.mjs +7 -7
  124. package/esm2022/tooltip/tooltip-module.mjs +4 -4
  125. package/esm2022/tooltip/tooltip.mjs +22 -22
  126. package/fesm2022/mtxAlert.mjs +14 -21
  127. package/fesm2022/mtxAlert.mjs.map +1 -1
  128. package/fesm2022/mtxButton.mjs +17 -28
  129. package/fesm2022/mtxButton.mjs.map +1 -1
  130. package/fesm2022/mtxCheckboxGroup.mjs +21 -32
  131. package/fesm2022/mtxCheckboxGroup.mjs.map +1 -1
  132. package/fesm2022/mtxColorpicker.mjs +61 -64
  133. package/fesm2022/mtxColorpicker.mjs.map +1 -1
  134. package/fesm2022/mtxColumnResize.mjs +48 -48
  135. package/fesm2022/mtxCore.mjs +23 -23
  136. package/fesm2022/mtxDatetimepicker.mjs +150 -190
  137. package/fesm2022/mtxDatetimepicker.mjs.map +1 -1
  138. package/fesm2022/mtxDialog.mjs +14 -14
  139. package/fesm2022/mtxDialog.mjs.map +1 -1
  140. package/fesm2022/mtxDrawer.mjs +17 -17
  141. package/fesm2022/mtxDrawer.mjs.map +1 -1
  142. package/fesm2022/mtxGrid.mjs +150 -118
  143. package/fesm2022/mtxGrid.mjs.map +1 -1
  144. package/fesm2022/mtxLoader.mjs +20 -32
  145. package/fesm2022/mtxLoader.mjs.map +1 -1
  146. package/fesm2022/mtxPhotoviewer.mjs +10 -10
  147. package/fesm2022/mtxPhotoviewer.mjs.map +1 -1
  148. package/fesm2022/mtxPopover.mjs +73 -158
  149. package/fesm2022/mtxPopover.mjs.map +1 -1
  150. package/fesm2022/mtxProgress.mjs +17 -28
  151. package/fesm2022/mtxProgress.mjs.map +1 -1
  152. package/fesm2022/mtxSelect.mjs +68 -73
  153. package/fesm2022/mtxSelect.mjs.map +1 -1
  154. package/fesm2022/mtxSplit.mjs +14 -14
  155. package/fesm2022/mtxSplit.mjs.map +1 -1
  156. package/fesm2022/mtxTooltip.mjs +26 -26
  157. package/fesm2022/mtxTooltip.mjs.map +1 -1
  158. package/grid/_grid-theme.scss +60 -24
  159. package/grid/column-menu.scss +32 -3
  160. package/grid/grid.d.ts +33 -1
  161. package/grid/grid.scss +36 -108
  162. package/loader/_loader-theme.scss +55 -22
  163. package/loader/loader.d.ts +4 -9
  164. package/loader/loader.scss +1 -1
  165. package/package.json +13 -19
  166. package/photoviewer/photoviewer.d.ts +1 -0
  167. package/popover/_popover-theme.scss +55 -22
  168. package/popover/popover.d.ts +23 -54
  169. package/popover/popover.scss +2 -2
  170. package/prebuilt-themes/deeppurple-amber.css +1 -1
  171. package/prebuilt-themes/indigo-pink.css +1 -1
  172. package/prebuilt-themes/pink-bluegrey.css +1 -1
  173. package/prebuilt-themes/purple-green.css +1 -1
  174. package/progress/_progress-theme.scss +60 -22
  175. package/progress/progress.d.ts +4 -9
  176. package/progress/progress.scss +3 -3
  177. package/select/_select-theme.scss +66 -34
  178. package/select/option.d.ts +2 -5
  179. package/select/select.d.ts +1 -3
  180. package/select/select.scss +104 -127
  181. package/split/_split-theme.scss +62 -32
  182. package/split/split.scss +2 -4
  183. package/tooltip/_tooltip-theme.scss +66 -34
  184. package/_theming.scss +0 -16
  185. package/alert/_alert-theme.import.scss +0 -2
  186. package/button/_button-theme.import.scss +0 -2
  187. package/colorpicker/_colorpicker-theme.import.scss +0 -2
  188. package/core/style/_elevation.scss +0 -91
  189. package/core/style/_private.scss +0 -32
  190. package/core/style/_variables.scss +0 -44
  191. package/core/style/_vendor-prefixes.scss +0 -46
  192. package/core/theming/_palette.scss +0 -746
  193. package/core/theming/_theming.scss +0 -463
  194. package/core/typography/_typography-utils.scss +0 -101
  195. package/datetimepicker/_datetimepicker-theme.import.scss +0 -4
  196. package/drawer/_drawer-theme.import.scss +0 -2
  197. package/grid/_grid-theme.import.scss +0 -2
  198. package/loader/_loader-theme.import.scss +0 -2
  199. package/popover/_popover-theme.import.scss +0 -2
  200. package/progress/_progress-theme.import.scss +0 -2
  201. package/select/_select-density.scss +0 -68
  202. package/select/_select-theme.import.scss +0 -3
  203. package/split/_split-theme.import.scss +0 -2
  204. package/tooltip/_tooltip-theme.import.scss +0 -1
@@ -1,8 +1,7 @@
1
1
  @use 'sass:map';
2
+ @use '@angular/material' as mat;
2
3
  @use '../../token-utils';
3
- @use '../../../theming/theming';
4
4
  @use '../../../style/sass-utils';
5
- @use '../../../theming/palette';
6
5
 
7
6
  // The prefix used to generate the fully qualified name for tokens in this file.
8
7
  $prefix: (mtx, alert);
@@ -10,36 +9,36 @@ $prefix: (mtx, alert);
10
9
  // Tokens that can't be configured through Angular Material's current theming API,
11
10
  // but may be in a future version of the theming API.
12
11
  @function get-unthemable-tokens() {
13
- @return ();
12
+ @return (
13
+ container-shape: 4px,
14
+ );
14
15
  }
15
16
 
16
17
  // Tokens that can be configured through Angular Material's color theming API.
17
- @function get-color-tokens($config) {
18
- $foreground: map.get($config, foreground);
19
- $background: map.get($config, background);
20
- $is-dark-theme: map.get($config, is-dark);
18
+ @function get-color-tokens($theme) {
19
+ $is-dark: mat.get-theme-type($theme) == dark;
21
20
 
22
21
  @return (
23
- background-color: theming.get-color-from-palette($background, dialog),
24
- text-color: theming.get-color-from-palette($foreground, text),
25
- info-background-color: theming.get-color-from-palette(palette.$blue-palette, if($is-dark-theme, 900, 500)),
22
+ background-color: mat.get-theme-color($theme, background, dialog),
23
+ text-color: mat.get-theme-color($theme, foreground, text),
24
+ info-background-color: mat.get-color-from-palette(mat.$blue-palette, if($is-dark, 900, 500)),
26
25
  info-text-color: white,
27
- success-background-color: theming.get-color-from-palette(palette.$green-palette, if($is-dark-theme, 900, 500)),
26
+ success-background-color: mat.get-color-from-palette(mat.$green-palette, if($is-dark, 900, 500)),
28
27
  success-text-color: white,
29
- warning-background-color: theming.get-color-from-palette(palette.$orange-palette, if($is-dark-theme, 900, 500)),
28
+ warning-background-color: mat.get-color-from-palette(mat.$orange-palette, if($is-dark, 900, 500)),
30
29
  warning-text-color: white,
31
- danger-background-color: theming.get-color-from-palette(palette.$red-palette, if($is-dark-theme, 900, 500)),
30
+ danger-background-color: mat.get-color-from-palette(mat.$red-palette, if($is-dark, 900, 500)),
32
31
  danger-text-color: white,
33
32
  );
34
33
  }
35
34
 
36
35
  // Tokens that can be configured through Angular Material's typography theming API.
37
- @function get-typography-tokens($config) {
36
+ @function get-typography-tokens($theme) {
38
37
  @return ();
39
38
  }
40
39
 
41
40
  // Tokens that can be configured through Angular Material's density theming API.
42
- @function get-density-tokens($config) {
41
+ @function get-density-tokens($theme) {
43
42
  @return ();
44
43
  }
45
44
 
@@ -1,18 +1,16 @@
1
1
  @use 'sass:color';
2
2
  @use 'sass:map';
3
3
  @use 'sass:meta';
4
+ @use '@angular/material' as mat;
4
5
  @use '../../token-utils';
5
- @use '../../../theming/theming';
6
6
  @use '../../../style/sass-utils';
7
7
 
8
8
  // The prefix used to generate the fully qualified name for tokens in this file.
9
9
  $prefix: (mtx, colorpicker);
10
10
 
11
- @function private-get-toggle-color-palette-color-tokens($config, $palette-name) {
12
- $palette: map.get($config, $palette-name);
13
-
11
+ @function private-get-toggle-color-palette-color-tokens($theme, $palette-name) {
14
12
  @return (
15
- toggle-active-state-icon-color: theming.get-color-from-palette($palette, text),
13
+ toggle-active-state-icon-color: mat.get-theme-color($theme, $palette-name, text),
16
14
  );
17
15
  }
18
16
 
@@ -23,10 +21,9 @@ $prefix: (mtx, colorpicker);
23
21
  }
24
22
 
25
23
  // Tokens that can be configured through Angular Material's color theming API.
26
- @function get-color-tokens($config) {
27
- $foreground: map.get($config, foreground);
28
- $inactive-icon-color: theming.get-color-from-palette($foreground, icon);
29
- $toggle-tokens: private-get-toggle-color-palette-color-tokens($config, primary);
24
+ @function get-color-tokens($theme) {
25
+ $inactive-icon-color: mat.get-theme-color($theme, foreground, icon);
26
+ $toggle-tokens: private-get-toggle-color-palette-color-tokens($theme, primary);
30
27
 
31
28
  @return sass-utils.merge-all($toggle-tokens, (
32
29
  toggle-icon-color: $inactive-icon-color
@@ -34,12 +31,12 @@ $prefix: (mtx, colorpicker);
34
31
  }
35
32
 
36
33
  // Tokens that can be configured through Angular Material's typography theming API.
37
- @function get-typography-tokens($config) {
34
+ @function get-typography-tokens($theme) {
38
35
  @return ();
39
36
  }
40
37
 
41
38
  // Tokens that can be configured through Angular Material's density theming API.
42
- @function get-density-tokens($config) {
39
+ @function get-density-tokens($theme) {
43
40
  @return ();
44
41
  }
45
42
 
@@ -1,10 +1,9 @@
1
1
  @use 'sass:color';
2
2
  @use 'sass:map';
3
3
  @use 'sass:meta';
4
+ @use '@angular/material' as mat;
4
5
  @use '../../token-utils';
5
- @use '../../../theming/theming';
6
6
  @use '../../../style/sass-utils';
7
- @use '../../../typography/typography-utils';
8
7
 
9
8
  // The prefix used to generate the fully qualified name for tokens in this file.
10
9
  $prefix: (mtx, datetimepicker);
@@ -12,20 +11,17 @@ $prefix: (mtx, datetimepicker);
12
11
  $_selected-fade-amount: .6;
13
12
  $_today-fade-amount: .2;
14
13
 
15
- @function private-get-calendar-color-palette-color-tokens($config, $palette-name) {
16
- $foreground: map.get($config, foreground);
17
- $background: map.get($config, background);
18
- $palette: map.get($config, $palette-name);
19
- $palette-color: theming.get-color-from-palette($palette);
20
- $default-contrast: theming.get-color-from-palette($palette, default-contrast);
21
- $active-background-color: theming.get-color-from-palette($palette, .3);
14
+ @function private-get-calendar-color-palette-color-tokens($theme, $palette-name) {
15
+ $palette-color: mat.get-theme-color($theme, $palette-name);
16
+ $default-contrast: mat.get-theme-color($theme, $palette-name, default-contrast);
17
+ $active-background-color: sass-utils.safe-color-change($palette-color, $alpha: .3);
22
18
  $active-disabled-color: null;
23
19
 
24
20
  @if (meta.type-of($palette-color) == color) {
25
21
  $active-disabled-color: color.adjust($palette-color, $alpha: -$_selected-fade-amount);
26
22
  }
27
23
  @else {
28
- $active-disabled-color: theming.get-color-from-palette($foreground, disabled-button);
24
+ $active-disabled-color: mat.get-theme-color($theme, foreground, disabled-button);
29
25
  }
30
26
 
31
27
  @return (
@@ -42,45 +38,40 @@ $_today-fade-amount: .2;
42
38
  clock-cell-selected-state-background-color: $palette-color,
43
39
 
44
40
  time-input-active-state-text-color: $palette-color,
45
- time-input-active-state-background-color: theming.get-color-from-palette($palette, .2),
41
+ time-input-active-state-background-color: sass-utils.safe-color-change($palette-color, $alpha: .2),
46
42
  time-input-focus-state-border-color: $palette-color,
47
- time-input-focus-state-placeholder-text-color: theming.get-color-from-palette($palette, .6),
43
+ time-input-focus-state-placeholder-text-color: sass-utils.safe-color-change($palette-color, $alpha: .6),
48
44
  );
49
45
  }
50
46
 
51
- @function private-get-toggle-color-palette-color-tokens($config, $palette-name) {
52
- $palette: map.get($config, $palette-name);
53
-
47
+ @function private-get-toggle-color-palette-color-tokens($theme, $palette-name) {
54
48
  @return (
55
- toggle-active-state-icon-color: theming.get-color-from-palette($palette, text),
49
+ toggle-active-state-icon-color: mat.get-theme-color($theme, $palette-name, text),
56
50
  );
57
51
  }
58
52
 
59
53
  // Tokens that can't be configured through Angular Material's current theming API,
60
54
  // but may be in a future version of the theming API.
61
55
  @function get-unthemable-tokens() {
62
- @return ();
56
+ @return (
57
+ container-shape: 4px,
58
+ );
63
59
  }
64
60
 
65
61
  // Tokens that can be configured through Angular Material's color theming API.
66
- @function get-color-tokens($config) {
67
- $foreground: map.get($config, foreground);
68
- $background: map.get($config, background);
69
- $primary: map.get($config, primary);
70
- $accent: map.get($config, accent);
71
- $warn: map.get($config, warn);
72
- $inactive-icon-color: theming.get-color-from-palette($foreground, icon);
73
- $text-color: theming.get-color-from-palette($foreground, text);
74
- $secondary-text-color: theming.get-color-from-palette($foreground, secondary-text);
75
- $disabled-text-color: theming.get-color-from-palette($foreground, disabled-text);
76
- $divider-color: theming.get-color-from-palette($foreground, divider);
77
- $hint-text-color: theming.get-color-from-palette($foreground, hint-text);
62
+ @function get-color-tokens($theme) {
63
+ $inactive-icon-color: mat.get-theme-color($theme, foreground, icon);
64
+ $text-color: mat.get-theme-color($theme, foreground, text);
65
+ $secondary-text-color: mat.get-theme-color($theme, foreground, secondary-text);
66
+ $disabled-text-color: mat.get-theme-color($theme, foreground, disabled-text);
67
+ $divider-color: mat.get-theme-color($theme, foreground, divider);
68
+ $hint-text-color: mat.get-theme-color($theme, foreground, hint-text);
78
69
  $preview-outline-color: $divider-color;
79
70
  $today-disabled-outline-color: null;
80
71
 
81
- $primary-color: theming.get-color-from-palette(map.get($config, primary));
82
- $calendar-tokens: private-get-calendar-color-palette-color-tokens($config, primary);
83
- $toggle-tokens: private-get-toggle-color-palette-color-tokens($config, primary);
72
+ $primary-color: mat.get-theme-color($theme, primary);
73
+ $calendar-tokens: private-get-calendar-color-palette-color-tokens($theme, primary);
74
+ $toggle-tokens: private-get-toggle-color-palette-color-tokens($theme, primary);
84
75
 
85
76
  @return sass-utils.merge-all($calendar-tokens, $toggle-tokens, (
86
77
  toggle-icon-color: $inactive-icon-color,
@@ -100,46 +91,46 @@ $_today-fade-amount: .2;
100
91
  calendar-date-disabled-state-text-color: $disabled-text-color,
101
92
  // calendar-date-preview-state-outline-color: $preview-outline-color,
102
93
 
103
- calendar-container-background-color: theming.get-color-from-palette($background, card),
94
+ calendar-container-background-color: mat.get-theme-color($theme, background, card),
104
95
  calendar-container-text-color: $text-color,
105
96
 
106
97
  clock-dial-background-color: $divider-color,
107
98
  clock-cell-text-color: $text-color,
108
- clock-cell-hover-state-background-color: theming.get-color-from-palette($background, hover),
99
+ clock-cell-hover-state-background-color: mat.get-theme-color($theme, background, hover),
109
100
  clock-cell-disabled-state-text-color: $disabled-text-color,
110
101
 
111
102
  time-input-text-color: $text-color,
112
103
  time-input-background-color: $divider-color,
113
- time-input-focus-state-background-color: theming.get-color-from-palette($background, background),
114
- time-input-warn-state-border-color: theming.get-color-from-palette($warn),
115
- time-ampm-text-color: theming.get-color-from-palette($foreground, text, .75),
104
+ time-input-focus-state-background-color: mat.get-theme-color($theme, background, background),
105
+ time-input-warn-state-border-color: mat.get-theme-color($theme, warn),
106
+ time-ampm-text-color: sass-utils.safe-color-change($text-color, $alpha: .75),
116
107
  time-ampm-border-color: $hint-text-color,
117
- time-ampm-selected-state-text-color: theming.get-color-from-palette($foreground, text),
118
- time-ampm-selected-state-background-color: theming.get-color-from-palette($accent, .2),
108
+ time-ampm-selected-state-text-color: $text-color,
109
+ time-ampm-selected-state-background-color: mat.get-theme-color($theme, accent, .2),
119
110
  ));
120
111
  }
121
112
 
122
113
  // Tokens that can be configured through Angular Material's typography theming API.
123
- @function get-typography-tokens($config) {
114
+ @function get-typography-tokens($theme) {
124
115
  @return (
125
- calendar-text-font: typography-utils.font-family($config),
116
+ calendar-text-font: mat.get-theme-typography($theme, body-1, font-family),
126
117
  calendar-text-size: 13px,
127
118
 
128
- calendar-body-label-text-size: typography-utils.font-size($config, button),
129
- calendar-body-label-text-weight: typography-utils.font-weight($config, button),
119
+ calendar-body-label-text-size: mat.get-theme-typography($theme, button, font-size),
120
+ calendar-body-label-text-weight: mat.get-theme-typography($theme, button, font-weight),
130
121
 
131
- calendar-period-button-text-size: typography-utils.font-size($config, button),
132
- calendar-period-button-text-weight: typography-utils.font-weight($config, button),
122
+ calendar-period-button-text-size: mat.get-theme-typography($theme, button, font-size),
123
+ calendar-period-button-text-weight: mat.get-theme-typography($theme, button, font-weight),
133
124
 
134
125
  calendar-table-header-text-size: 11px,
135
- calendar-table-header-text-weight: typography-utils.font-weight($config, body-1),
126
+ calendar-table-header-text-weight: mat.get-theme-typography($theme, body-1, font-weight),
136
127
 
137
128
  clock-text-size: 14px,
138
129
  );
139
130
  }
140
131
 
141
132
  // Tokens that can be configured through Angular Material's density theming API.
142
- @function get-density-tokens($config) {
133
+ @function get-density-tokens($theme) {
143
134
  @return ();
144
135
  }
145
136
 
@@ -1,6 +1,6 @@
1
1
  @use 'sass:map';
2
+ @use '@angular/material' as mat;
2
3
  @use '../../token-utils';
3
- @use '../../../theming/theming';
4
4
  @use '../../../style/sass-utils';
5
5
 
6
6
  // The prefix used to generate the fully qualified name for tokens in this file.
@@ -9,27 +9,26 @@ $prefix: (mtx, drawer);
9
9
  // Tokens that can't be configured through Angular Material's current theming API,
10
10
  // but may be in a future version of the theming API.
11
11
  @function get-unthemable-tokens() {
12
- @return ();
12
+ @return (
13
+ container-shape: 0,
14
+ );
13
15
  }
14
16
 
15
17
  // Tokens that can be configured through Angular Material's color theming API.
16
- @function get-color-tokens($config) {
17
- $foreground: map.get($config, foreground);
18
- $background: map.get($config, background);
19
-
18
+ @function get-color-tokens($theme) {
20
19
  @return (
21
- container-background-color: theming.get-color-from-palette($background, dialog),
22
- container-text-color: theming.get-color-from-palette($foreground, text),
20
+ container-background-color: mat.get-theme-color($theme, background, dialog),
21
+ container-text-color: mat.get-theme-color($theme, foreground, text),
23
22
  );
24
23
  }
25
24
 
26
25
  // Tokens that can be configured through Angular Material's typography theming API.
27
- @function get-typography-tokens($config) {
26
+ @function get-typography-tokens($theme) {
28
27
  @return ();
29
28
  }
30
29
 
31
30
  // Tokens that can be configured through Angular Material's density theming API.
32
- @function get-density-tokens($config) {
31
+ @function get-density-tokens($theme) {
33
32
  @return ();
34
33
  }
35
34
 
@@ -1,6 +1,6 @@
1
1
  @use 'sass:map';
2
+ @use '@angular/material' as mat;
2
3
  @use '../../token-utils';
3
- @use '../../../theming/theming';
4
4
  @use '../../../style/sass-utils';
5
5
 
6
6
  // The prefix used to generate the fully qualified name for tokens in this file.
@@ -9,40 +9,52 @@ $prefix: (mtx, grid);
9
9
  // Tokens that can't be configured through Angular Material's current theming API,
10
10
  // but may be in a future version of the theming API.
11
11
  @function get-unthemable-tokens() {
12
- @return ();
12
+ @return (
13
+ container-shape: 0,
14
+ table-cell-min-width: 80px,
15
+ );
13
16
  }
14
17
 
15
18
  // Tokens that can be configured through Angular Material's color theming API.
16
- @function get-color-tokens($config) {
17
- $is-dark-theme: map.get($config, is-dark);
18
- $foreground: map.get($config, foreground);
19
- $background: map.get($config, background);
20
- $primary: map.get($config, primary);
21
- $accent: map.get($config, accent);
19
+ @function get-color-tokens($theme) {
20
+ $is-dark: mat.get-theme-type($theme) == dark;
21
+ $text-color: mat.get-theme-color($theme, foreground, text);
22
+ $divider-color: mat.get-theme-color($theme, foreground, divider);
22
23
 
23
24
  @return (
24
- outline-color: theming.get-color-from-palette($foreground, secondary-text, .2),
25
- column-menu-text-color: theming.get-color-from-palette($foreground, text),
26
- column-menu-divider-color: theming.get-color-from-palette($foreground, divider),
27
- table-footer-background-color: theming.get-color-from-palette($background, app-bar),
28
- table-row-striped-background-color: if($is-dark-theme, #3a3a3a, #f5f5f5),
29
- table-row-hover-background-color: if($is-dark-theme, #2a2a2a, #e5e5e5),
30
- table-row-selected-background-color: if($is-dark-theme, #2a2a2a, #e5e5e5),
31
- table-cell-selected-outline-color: theming.get-color-from-palette($accent),
32
- resizable-handle-active-background-color: theming.get-color-from-palette($primary),
33
- resizable-handle-hover-background-color: theming.get-color-from-palette($primary),
34
- resizable-handle-disabled-background-color: theming.get-color-from-palette($foreground, divider),
25
+ outline-color: sass-utils.safe-color-change($text-color, $alpha: .2),
26
+ column-menu-text-color: $text-color,
27
+ column-menu-divider-color: $divider-color,
28
+ table-footer-background-color: mat.get-theme-color($theme, background, app-bar),
29
+ table-row-striped-background-color: if($is-dark, #3a3a3a, #f5f5f5),
30
+ table-row-hover-background-color: if($is-dark, #2a2a2a, #e5e5e5),
31
+ table-row-selected-background-color: if($is-dark, #2a2a2a, #e5e5e5),
32
+ table-cell-selected-outline-color: mat.get-theme-color($theme, accent),
33
+ resizable-handle-active-background-color: mat.get-theme-color($theme, primary),
34
+ resizable-handle-hover-background-color: mat.get-theme-color($theme, primary),
35
+ resizable-handle-disabled-background-color: $divider-color,
35
36
  );
36
37
  }
37
38
 
38
39
  // Tokens that can be configured through Angular Material's typography theming API.
39
- @function get-typography-tokens($config) {
40
+ @function get-typography-tokens($theme) {
40
41
  @return ();
41
42
  }
42
43
 
43
44
  // Tokens that can be configured through Angular Material's density theming API.
44
- @function get-density-tokens($config) {
45
- @return ();
45
+ @function get-density-tokens($theme) {
46
+ $scale: mat.private-clamp-density(mat.get-theme-density($theme), -4);
47
+ $expand-button-scale: (
48
+ 0: 48px,
49
+ -1: 44px,
50
+ -2: 40px,
51
+ -3: 36px,
52
+ -4: 28px
53
+ );
54
+
55
+ @return (
56
+ row-expand-button-size: map.get($expand-button-scale, $scale),
57
+ );
46
58
  }
47
59
 
48
60
  // Combines the tokens generated by the above functions into a single map with placeholder values.
@@ -1,8 +1,8 @@
1
1
  @use 'sass:color';
2
2
  @use 'sass:map';
3
3
  @use 'sass:meta';
4
+ @use '@angular/material' as mat;
4
5
  @use '../../token-utils';
5
- @use '../../../theming/theming';
6
6
  @use '../../../style/sass-utils';
7
7
 
8
8
  // The prefix used to generate the fully qualified name for tokens in this file.
@@ -15,21 +15,21 @@ $prefix: (mtx, loader);
15
15
  }
16
16
 
17
17
  // Tokens that can be configured through Angular Material's color theming API.
18
- @function get-color-tokens($config) {
19
- $background: map.get($config, background);
18
+ @function get-color-tokens($theme) {
19
+ $background-color: mat.get-theme-color($theme, background, background);
20
20
 
21
21
  @return (
22
- backdrop-background-color: theming.get-color-from-palette($background, background, .75),
22
+ backdrop-background-color: sass-utils.safe-color-change($background-color, $alpha: .75),
23
23
  );
24
24
  }
25
25
 
26
26
  // Tokens that can be configured through Angular Material's typography theming API.
27
- @function get-typography-tokens($config) {
27
+ @function get-typography-tokens($theme) {
28
28
  @return ();
29
29
  }
30
30
 
31
31
  // Tokens that can be configured through Angular Material's density theming API.
32
- @function get-density-tokens($config) {
32
+ @function get-density-tokens($theme) {
33
33
  @return ();
34
34
  }
35
35
 
@@ -1,6 +1,6 @@
1
1
  @use 'sass:map';
2
+ @use '@angular/material' as mat;
2
3
  @use '../../token-utils';
3
- @use '../../../theming/theming';
4
4
  @use '../../../style/sass-utils';
5
5
 
6
6
  // The prefix used to generate the fully qualified name for tokens in this file.
@@ -9,28 +9,27 @@ $prefix: (mtx, popover);
9
9
  // Tokens that can't be configured through Angular Material's current theming API,
10
10
  // but may be in a future version of the theming API.
11
11
  @function get-unthemable-tokens() {
12
- @return ();
12
+ @return (
13
+ container-shape: 4px,
14
+ );
13
15
  }
14
16
 
15
17
  // Tokens that can be configured through Angular Material's color theming API.
16
- @function get-color-tokens($config) {
17
- $foreground: map.get($config, foreground);
18
- $background: map.get($config, background);
19
-
18
+ @function get-color-tokens($theme) {
20
19
  @return (
21
- background-color: theming.get-color-from-palette($background, card),
22
- text-color: theming.get-color-from-palette($foreground, text),
23
- arrow-outline-color: theming.get-color-from-palette($foreground, divider),
20
+ background-color: mat.get-theme-color($theme, background, card),
21
+ text-color: mat.get-theme-color($theme, foreground, text),
22
+ arrow-outline-color: mat.get-theme-color($theme, foreground, divider),
24
23
  );
25
24
  }
26
25
 
27
26
  // Tokens that can be configured through Angular Material's typography theming API.
28
- @function get-typography-tokens($config) {
27
+ @function get-typography-tokens($theme) {
29
28
  @return ();
30
29
  }
31
30
 
32
31
  // Tokens that can be configured through Angular Material's density theming API.
33
- @function get-density-tokens($config) {
32
+ @function get-density-tokens($theme) {
34
33
  @return ();
35
34
  }
36
35
 
@@ -1,8 +1,7 @@
1
1
  @use 'sass:map';
2
+ @use '@angular/material' as mat;
2
3
  @use '../../token-utils';
3
- @use '../../../theming/theming';
4
4
  @use '../../../style/sass-utils';
5
- @use '../../../theming/palette';
6
5
 
7
6
  // The prefix used to generate the fully qualified name for tokens in this file.
8
7
  $prefix: (mtx, progress);
@@ -10,37 +9,39 @@ $prefix: (mtx, progress);
10
9
  // Tokens that can't be configured through Angular Material's current theming API,
11
10
  // but may be in a future version of the theming API.
12
11
  @function get-unthemable-tokens() {
13
- @return ();
12
+ @return (
13
+ container-shape: 4px,
14
+ );
14
15
  }
15
16
 
16
17
  // Tokens that can be configured through Angular Material's color theming API.
17
- @function get-color-tokens($config) {
18
- $foreground: map.get($config, foreground);
19
- $background: map.get($config, background);
20
- $is-dark-theme: map.get($config, is-dark);
18
+ @function get-color-tokens($theme) {
19
+ $is-dark: mat.get-theme-type($theme) == dark;
21
20
 
22
21
  @return (
23
- track-color: theming.get-color-from-palette($background, hover),
24
- indicator-color: theming.get-color-from-palette($foreground, divider),
25
- text-color: theming.get-color-from-palette($foreground, text),
26
- info-indicator-color: theming.get-color-from-palette(palette.$blue-palette, if($is-dark-theme, 900, 500)),
22
+ track-color: mat.get-theme-color($theme, background, hover),
23
+ indicator-color: mat.get-theme-color($theme, foreground, divider),
24
+ text-color: mat.get-theme-color($theme, foreground, text),
25
+ info-indicator-color: mat.get-color-from-palette(mat.$blue-palette, if($is-dark, 900, 500)),
27
26
  info-text-color: white,
28
- success-indicator-color: theming.get-color-from-palette(palette.$green-palette, if($is-dark-theme, 900, 500)),
27
+ success-indicator-color: mat.get-color-from-palette(mat.$green-palette, if($is-dark, 900, 500)),
29
28
  success-text-color: white,
30
- warning-indicator-color: theming.get-color-from-palette(palette.$orange-palette, if($is-dark-theme, 900, 500)),
29
+ warning-indicator-color: mat.get-color-from-palette(mat.$orange-palette, if($is-dark, 900, 500)),
31
30
  warning-text-color: white,
32
- danger-indicator-color: theming.get-color-from-palette(palette.$red-palette, if($is-dark-theme, 900, 500)),
31
+ danger-indicator-color: mat.get-color-from-palette(mat.$red-palette, if($is-dark, 900, 500)),
33
32
  danger-text-color: white,
34
33
  );
35
34
  }
36
35
 
37
36
  // Tokens that can be configured through Angular Material's typography theming API.
38
- @function get-typography-tokens($config) {
39
- @return ();
37
+ @function get-typography-tokens($theme) {
38
+ @return (
39
+ text-size: 12px,
40
+ );
40
41
  }
41
42
 
42
43
  // Tokens that can be configured through Angular Material's density theming API.
43
- @function get-density-tokens($config) {
44
+ @function get-density-tokens($theme) {
44
45
  @return ();
45
46
  }
46
47