@ng-matero/extensions 16.3.2 → 17.1.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 (251) hide show
  1. package/_index.scss +26 -13
  2. package/alert/_alert-theme.scss +54 -24
  3. package/alert/alert-module.d.ts +3 -3
  4. package/alert/alert.d.ts +4 -7
  5. package/alert/alert.scss +3 -3
  6. package/button/_button-theme.scss +6 -4
  7. package/button/button-loading.d.ts +5 -10
  8. package/button/button-module.d.ts +5 -5
  9. package/checkbox-group/checkbox-group-module.d.ts +6 -6
  10. package/checkbox-group/checkbox-group.d.ts +5 -10
  11. package/colorpicker/_colorpicker-theme.scss +62 -34
  12. package/colorpicker/colorpicker-input.d.ts +2 -4
  13. package/colorpicker/colorpicker-module.d.ts +10 -10
  14. package/colorpicker/colorpicker-toggle.d.ts +4 -5
  15. package/colorpicker/colorpicker.d.ts +8 -9
  16. package/column-resize/column-resize-directives/column-resize-flex.d.ts +1 -1
  17. package/column-resize/column-resize-directives/column-resize.d.ts +1 -1
  18. package/column-resize/column-resize-module.d.ts +1 -1
  19. package/core/color/_all-color.scss +7 -18
  20. package/core/datetime/datetime.module.d.ts +4 -1
  21. package/core/density/_all-density.scss +17 -25
  22. package/core/pipes/is-template-ref.pipe.d.ts +1 -1
  23. package/core/pipes/pipes.module.d.ts +4 -4
  24. package/core/pipes/to-observable.pipe.d.ts +1 -1
  25. package/core/style/_sass-utils.scss +13 -1
  26. package/core/theming/_all-theme.scss +32 -17
  27. package/core/tokens/_token-utils.scss +4 -5
  28. package/core/tokens/m2/mdc/_plain-tooltip.scss +21 -29
  29. package/core/tokens/m2/mtx/_alert.scss +14 -15
  30. package/core/tokens/m2/mtx/_colorpicker.scss +8 -11
  31. package/core/tokens/m2/mtx/_datetimepicker.scss +38 -47
  32. package/core/tokens/m2/mtx/_drawer.scss +9 -10
  33. package/core/tokens/m2/mtx/_grid.scss +23 -22
  34. package/core/tokens/m2/mtx/_loader.scss +6 -6
  35. package/core/tokens/m2/mtx/_popover.scss +10 -11
  36. package/core/tokens/m2/mtx/_progress.scss +18 -17
  37. package/core/tokens/m2/mtx/_select.scss +23 -24
  38. package/core/tokens/m2/mtx/_split.scss +8 -11
  39. package/core/typography/_all-typography.scss +40 -0
  40. package/core/typography/_typography.scss +1 -579
  41. package/datetimepicker/_datetimepicker-theme.scss +75 -48
  42. package/datetimepicker/calendar-body.d.ts +1 -1
  43. package/datetimepicker/calendar.d.ts +8 -15
  44. package/datetimepicker/calendar.scss +16 -4
  45. package/datetimepicker/clock.d.ts +2 -3
  46. package/datetimepicker/datetimepicker-content.scss +3 -3
  47. package/datetimepicker/datetimepicker-input.d.ts +2 -3
  48. package/datetimepicker/datetimepicker-module.d.ts +16 -16
  49. package/datetimepicker/datetimepicker-toggle.d.ts +4 -5
  50. package/datetimepicker/datetimepicker.d.ts +16 -27
  51. package/datetimepicker/month-view.d.ts +2 -2
  52. package/datetimepicker/multi-year-view.d.ts +2 -2
  53. package/datetimepicker/time.d.ts +6 -8
  54. package/datetimepicker/time.scss +2 -2
  55. package/datetimepicker/year-view.d.ts +2 -2
  56. package/dialog/dialog-container.d.ts +1 -1
  57. package/dialog/dialog-module.d.ts +7 -7
  58. package/drawer/_drawer-theme.scss +55 -22
  59. package/drawer/drawer-container.d.ts +1 -1
  60. package/drawer/drawer-container.scss +25 -4
  61. package/drawer/drawer-module.d.ts +5 -5
  62. package/esm2022/alert/alert-module.mjs +6 -7
  63. package/esm2022/alert/alert.mjs +11 -18
  64. package/esm2022/button/button-loading.mjs +13 -23
  65. package/esm2022/button/button-module.mjs +6 -7
  66. package/esm2022/checkbox-group/checkbox-group-module.mjs +6 -7
  67. package/esm2022/checkbox-group/checkbox-group.mjs +19 -31
  68. package/esm2022/colorpicker/colorpicker-input.mjs +14 -14
  69. package/esm2022/colorpicker/colorpicker-module.mjs +20 -19
  70. package/esm2022/colorpicker/colorpicker-toggle.mjs +19 -18
  71. package/esm2022/colorpicker/colorpicker.mjs +46 -44
  72. package/esm2022/column-resize/column-resize-directives/column-resize-flex.mjs +6 -5
  73. package/esm2022/column-resize/column-resize-directives/column-resize.mjs +6 -5
  74. package/esm2022/column-resize/column-resize-module.mjs +6 -6
  75. package/esm2022/column-resize/column-resize-notifier.mjs +7 -7
  76. package/esm2022/column-resize/column-resize.mjs +4 -4
  77. package/esm2022/column-resize/column-size-store.mjs +3 -3
  78. package/esm2022/column-resize/event-dispatcher.mjs +5 -5
  79. package/esm2022/column-resize/overlay-handle.mjs +4 -4
  80. package/esm2022/column-resize/polyfill.mjs +1 -1
  81. package/esm2022/column-resize/resizable.mjs +4 -4
  82. package/esm2022/column-resize/resize-strategy.mjs +14 -14
  83. package/esm2022/core/datetime/datetime-adapter.mjs +1 -1
  84. package/esm2022/core/datetime/datetime.module.mjs +19 -23
  85. package/esm2022/core/datetime/native-datetime-adapter.mjs +6 -6
  86. package/esm2022/core/pipes/is-template-ref.pipe.mjs +5 -5
  87. package/esm2022/core/pipes/pipes.module.mjs +6 -7
  88. package/esm2022/core/pipes/to-observable.pipe.mjs +5 -5
  89. package/esm2022/datetimepicker/calendar-body.mjs +5 -6
  90. package/esm2022/datetimepicker/calendar.mjs +38 -48
  91. package/esm2022/datetimepicker/clock.mjs +11 -11
  92. package/esm2022/datetimepicker/datetimepicker-errors.mjs +4 -3
  93. package/esm2022/datetimepicker/datetimepicker-input.mjs +14 -14
  94. package/esm2022/datetimepicker/datetimepicker-intl.mjs +3 -3
  95. package/esm2022/datetimepicker/datetimepicker-module.mjs +28 -11
  96. package/esm2022/datetimepicker/datetimepicker-toggle.mjs +19 -18
  97. package/esm2022/datetimepicker/datetimepicker.mjs +70 -89
  98. package/esm2022/datetimepicker/month-view.mjs +8 -10
  99. package/esm2022/datetimepicker/multi-year-view.mjs +10 -11
  100. package/esm2022/datetimepicker/time.mjs +19 -24
  101. package/esm2022/datetimepicker/year-view.mjs +10 -11
  102. package/esm2022/dialog/dialog-container.mjs +21 -12
  103. package/esm2022/dialog/dialog-module.mjs +23 -7
  104. package/esm2022/dialog/dialog.mjs +7 -6
  105. package/esm2022/drawer/drawer-container.mjs +7 -8
  106. package/esm2022/drawer/drawer-module.mjs +6 -7
  107. package/esm2022/drawer/drawer-ref.mjs +1 -1
  108. package/esm2022/drawer/drawer.mjs +8 -7
  109. package/esm2022/grid/cell.mjs +36 -14
  110. package/esm2022/grid/column-menu.mjs +31 -15
  111. package/esm2022/grid/column-resize/column-resize-directives/column-resize-flex.mjs +6 -5
  112. package/esm2022/grid/column-resize/column-resize-directives/column-resize.mjs +6 -5
  113. package/esm2022/grid/column-resize/column-resize-module.mjs +14 -14
  114. package/esm2022/grid/column-resize/index.mjs +8 -0
  115. package/esm2022/grid/column-resize/overlay-handle.mjs +7 -6
  116. package/esm2022/grid/column-resize/resizable-directives/resizable.mjs +7 -6
  117. package/esm2022/grid/column-resize/resize-strategy.mjs +5 -5
  118. package/esm2022/grid/expansion-toggle.mjs +6 -5
  119. package/esm2022/grid/grid-module.mjs +39 -37
  120. package/esm2022/grid/grid-pipes.mjs +30 -30
  121. package/esm2022/grid/grid-utils.mjs +7 -6
  122. package/esm2022/grid/grid.mjs +175 -111
  123. package/esm2022/loader/loader-module.mjs +6 -7
  124. package/esm2022/loader/loader.mjs +17 -29
  125. package/esm2022/photoviewer/photoviewer-module.mjs +6 -7
  126. package/esm2022/photoviewer/photoviewer.mjs +8 -7
  127. package/esm2022/popover/popover-content.mjs +10 -9
  128. package/esm2022/popover/popover-module.mjs +22 -7
  129. package/esm2022/popover/popover-target.mjs +6 -5
  130. package/esm2022/popover/popover-trigger.mjs +15 -8
  131. package/esm2022/popover/popover.mjs +54 -139
  132. package/esm2022/progress/progress-module.mjs +6 -7
  133. package/esm2022/progress/progress.mjs +15 -26
  134. package/esm2022/select/option.mjs +12 -17
  135. package/esm2022/select/select-module.mjs +20 -9
  136. package/esm2022/select/select.mjs +19 -19
  137. package/esm2022/select/templates.mjs +56 -56
  138. package/esm2022/split/split-module.mjs +6 -7
  139. package/esm2022/split/split-pane.mjs +6 -5
  140. package/esm2022/split/split.mjs +8 -8
  141. package/esm2022/split/utils.mjs +1 -1
  142. package/esm2022/tooltip/tooltip-module.mjs +24 -7
  143. package/esm2022/tooltip/tooltip.mjs +104 -117
  144. package/fesm2022/mtxAlert.mjs +15 -23
  145. package/fesm2022/mtxAlert.mjs.map +1 -1
  146. package/fesm2022/mtxButton.mjs +17 -28
  147. package/fesm2022/mtxButton.mjs.map +1 -1
  148. package/fesm2022/mtxCheckboxGroup.mjs +22 -37
  149. package/fesm2022/mtxCheckboxGroup.mjs.map +1 -1
  150. package/fesm2022/mtxColorpicker.mjs +479 -474
  151. package/fesm2022/mtxColorpicker.mjs.map +1 -1
  152. package/fesm2022/mtxColumnResize.mjs +51 -49
  153. package/fesm2022/mtxColumnResize.mjs.map +1 -1
  154. package/fesm2022/mtxCore.mjs +36 -41
  155. package/fesm2022/mtxCore.mjs.map +1 -1
  156. package/fesm2022/mtxDatetimepicker.mjs +898 -905
  157. package/fesm2022/mtxDatetimepicker.mjs.map +1 -1
  158. package/fesm2022/mtxDialog.mjs +47 -25
  159. package/fesm2022/mtxDialog.mjs.map +1 -1
  160. package/fesm2022/mtxDrawer.mjs +20 -21
  161. package/fesm2022/mtxDrawer.mjs.map +1 -1
  162. package/fesm2022/mtxGrid.mjs +330 -229
  163. package/fesm2022/mtxGrid.mjs.map +1 -1
  164. package/fesm2022/mtxLoader.mjs +21 -36
  165. package/fesm2022/mtxLoader.mjs.map +1 -1
  166. package/fesm2022/mtxPhotoviewer.mjs +12 -12
  167. package/fesm2022/mtxPhotoviewer.mjs.map +1 -1
  168. package/fesm2022/mtxPopover.mjs +103 -165
  169. package/fesm2022/mtxPopover.mjs.map +1 -1
  170. package/fesm2022/mtxProgress.mjs +19 -32
  171. package/fesm2022/mtxProgress.mjs.map +1 -1
  172. package/fesm2022/mtxSelect.mjs +99 -93
  173. package/fesm2022/mtxSelect.mjs.map +1 -1
  174. package/fesm2022/mtxSplit.mjs +17 -18
  175. package/fesm2022/mtxSplit.mjs.map +1 -1
  176. package/fesm2022/mtxTooltip.mjs +128 -125
  177. package/fesm2022/mtxTooltip.mjs.map +1 -1
  178. package/grid/_grid-theme.scss +58 -29
  179. package/grid/cell.d.ts +1 -1
  180. package/grid/column-menu.d.ts +1 -1
  181. package/grid/column-resize/column-resize-directives/column-resize-flex.d.ts +1 -1
  182. package/grid/column-resize/column-resize-directives/column-resize.d.ts +1 -1
  183. package/grid/column-resize/column-resize-module.d.ts +7 -6
  184. package/grid/column-resize/index.d.ts +7 -0
  185. package/grid/column-resize/overlay-handle.d.ts +1 -1
  186. package/grid/column-resize/resizable-directives/resizable.d.ts +1 -1
  187. package/grid/expansion-toggle.d.ts +1 -1
  188. package/grid/grid-module.d.ts +25 -25
  189. package/grid/grid-pipes.d.ts +7 -7
  190. package/grid/grid.d.ts +57 -25
  191. package/grid/grid.scss +8 -1
  192. package/loader/_loader-theme.scss +55 -22
  193. package/loader/loader-module.d.ts +5 -5
  194. package/loader/loader.d.ts +5 -10
  195. package/loader/loader.scss +1 -1
  196. package/package.json +13 -19
  197. package/photoviewer/photoviewer-module.d.ts +1 -1
  198. package/photoviewer/photoviewer.d.ts +2 -1
  199. package/popover/_popover-theme.scss +55 -22
  200. package/popover/popover-content.d.ts +1 -1
  201. package/popover/popover-module.d.ts +8 -8
  202. package/popover/popover-target.d.ts +1 -1
  203. package/popover/popover-trigger.d.ts +1 -1
  204. package/popover/popover.d.ts +24 -55
  205. package/popover/popover.scss +1 -1
  206. package/prebuilt-themes/deeppurple-amber.css +1 -1
  207. package/prebuilt-themes/indigo-pink.css +1 -1
  208. package/prebuilt-themes/pink-bluegrey.css +1 -1
  209. package/prebuilt-themes/purple-green.css +1 -1
  210. package/progress/_progress-theme.scss +60 -22
  211. package/progress/progress-module.d.ts +3 -3
  212. package/progress/progress.d.ts +5 -10
  213. package/progress/progress.scss +3 -3
  214. package/select/_select-theme.scss +66 -34
  215. package/select/option.d.ts +3 -6
  216. package/select/select-module.d.ts +7 -7
  217. package/select/select.d.ts +2 -4
  218. package/select/select.scss +109 -109
  219. package/select/templates.d.ts +11 -11
  220. package/split/_split-theme.scss +62 -32
  221. package/split/split-module.d.ts +4 -4
  222. package/split/split-pane.d.ts +1 -1
  223. package/split/split.d.ts +1 -1
  224. package/split/split.scss +2 -4
  225. package/tooltip/_tooltip-theme.scss +66 -34
  226. package/tooltip/tooltip-module.d.ts +7 -7
  227. package/tooltip/tooltip.d.ts +30 -44
  228. package/tooltip/tooltip.scss +2 -4
  229. package/_theming.scss +0 -16
  230. package/alert/_alert-theme.import.scss +0 -2
  231. package/button/_button-theme.import.scss +0 -2
  232. package/colorpicker/_colorpicker-theme.import.scss +0 -2
  233. package/core/density/_compatibility.scss +0 -74
  234. package/core/mdc-helpers/_mdc-helpers.scss +0 -242
  235. package/core/style/_elevation.scss +0 -91
  236. package/core/style/_private.scss +0 -32
  237. package/core/style/_variables.scss +0 -44
  238. package/core/style/_vendor-prefixes.scss +0 -46
  239. package/core/theming/_palette.scss +0 -746
  240. package/core/theming/_theming.scss +0 -497
  241. package/core/typography/_typography-utils.scss +0 -101
  242. package/datetimepicker/_datetimepicker-theme.import.scss +0 -4
  243. package/drawer/_drawer-theme.import.scss +0 -2
  244. package/grid/_grid-theme.import.scss +0 -2
  245. package/loader/_loader-theme.import.scss +0 -2
  246. package/popover/_popover-theme.import.scss +0 -2
  247. package/progress/_progress-theme.import.scss +0 -2
  248. package/select/_select-density.scss +0 -68
  249. package/select/_select-theme.import.scss +0 -3
  250. package/split/_split-theme.import.scss +0 -2
  251. package/tooltip/_tooltip-theme.import.scss +0 -1
@@ -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,41 @@ $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
- $scale: theming.clamp-density($config, -4);
45
+ @function get-density-tokens($theme) {
46
+ $scale: mat.private-clamp-density(mat.get-theme-density($theme), -4);
46
47
  $expand-button-scale: (
47
48
  0: 48px,
48
49
  -1: 44px,
@@ -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
 
@@ -1,57 +1,56 @@
1
1
  @use 'sass:map';
2
+ @use 'sass:math';
3
+ @use '@material/textfield' as mdc-textfield;
4
+ @use '@material/density' as mdc-density;
5
+ @use '@angular/material' as mat;
2
6
  @use '../../token-utils';
3
- @use '../../../theming/theming';
4
7
  @use '../../../style/sass-utils';
5
8
 
6
9
  // The prefix used to generate the fully qualified name for tokens in this file.
7
10
  $prefix: (mtx, select);
8
11
 
9
12
  // Generates the tokens used to theme the option based on a palette.
10
- @function private-get-color-palette-color-tokens($config, $palette-name) {
11
- $palette: map.get($config, $palette-name);
12
-
13
+ @function private-get-color-palette-color-tokens($theme, $palette-name) {
13
14
  @return (
14
- option-selected-state-text-color: theming.get-color-from-palette($palette),
15
+ option-selected-state-text-color: mat.get-theme-color($theme, $palette-name),
15
16
  );
16
17
  }
17
18
 
18
19
  // Tokens that can't be configured through Angular Material's current theming API,
19
20
  // but may be in a future version of the theming API.
20
21
  @function get-unthemable-tokens() {
21
- @return ();
22
+ @return (
23
+ container-shape: 4px,
24
+ );
22
25
  }
23
26
 
24
27
  // Tokens that can be configured through Angular Material's color theming API.
25
- @function get-color-tokens($config) {
26
- $foreground: map.get($config, foreground);
27
- $background: map.get($config, background);
28
- $primary: map.get($config, primary);
29
- $warn: map.get($config, warn);
30
- $text-color: theming.get-color-from-palette($foreground, text);
31
- $hint-text-color: theming.get-color-from-palette($foreground, hint-text);
32
- $secondary-text-color: theming.get-color-from-palette($foreground, secondary-text);
33
- $disabled-text-color: theming.get-color-from-palette($foreground, disabled-text);
34
- $divider-color: theming.get-color-from-palette($foreground, divider);
35
- $hover-color: theming.get-color-from-palette($background, hover);
36
- $palette-tokens: private-get-color-palette-color-tokens($config, primary);
28
+ @function get-color-tokens($theme) {
29
+ $text-color: mat.get-theme-color($theme, foreground, text);
30
+ $hint-text-color: mat.get-theme-color($theme, foreground, hint-text);
31
+ $secondary-text-color: mat.get-theme-color($theme, foreground, secondary-text);
32
+ $disabled-text-color: mat.get-theme-color($theme, foreground, disabled-text);
33
+ $divider-color: mat.get-theme-color($theme, foreground, divider);
34
+ $hover-color: mat.get-theme-color($theme, background, hover);
35
+ $palette-tokens: private-get-color-palette-color-tokens($theme, primary);
37
36
 
38
37
  @return map.merge($palette-tokens, (
39
38
  container-text-color: $text-color,
40
39
  placeholder-text-color: $hint-text-color,
41
40
  disabled-text-color: $hint-text-color,
42
41
 
43
- multiple-value-background-color: theming.get-color-from-palette($background, unselected-chip),
42
+ multiple-value-background-color: mat.get-theme-color($theme, background, unselected-chip),
44
43
  multiple-value-border-color: $divider-color,
45
44
  multiple-value-icon-hover-background-color: $divider-color,
46
45
 
47
46
  clear-icon-color: $secondary-text-color,
48
- clear-icon-hover-color: theming.get-color-from-palette($warn),
47
+ clear-icon-hover-color: mat.get-theme-color($theme, warn),
49
48
 
50
49
  enabled-arrow-color: $secondary-text-color,
51
50
  disabled-arrow-color: $disabled-text-color,
52
- invalid-arrow-color: theming.get-color-from-palette($warn),
51
+ invalid-arrow-color: mat.get-theme-color($theme, warn),
53
52
 
54
- panel-background-color: theming.get-color-from-palette($background, card),
53
+ panel-background-color: mat.get-theme-color($theme, background, card),
55
54
  panel-divider-color: $divider-color,
56
55
  optgroup-label-text-color: $secondary-text-color,
57
56
  option-label-text-color: $text-color,
@@ -62,12 +61,12 @@ $prefix: (mtx, select);
62
61
  }
63
62
 
64
63
  // Tokens that can be configured through Angular Material's typography theming API.
65
- @function get-typography-tokens($config) {
64
+ @function get-typography-tokens($theme) {
66
65
  @return ();
67
66
  }
68
67
 
69
68
  // Tokens that can be configured through Angular Material's density theming API.
70
- @function get-density-tokens($config) {
69
+ @function get-density-tokens($theme) {
71
70
  @return ();
72
71
  }
73
72
 
@@ -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, split);
10
10
 
11
- @function private-get-color-palette-color-tokens($config, $palette-name) {
12
- $palette: map.get($config, $palette-name);
13
-
11
+ @function private-get-color-palette-color-tokens($theme, $palette-name) {
14
12
  @return (
15
- gutter-hover-state-background-color: theming.get-color-from-palette($palette, text),
13
+ gutter-hover-state-background-color: mat.get-theme-color($theme, $palette-name, text),
16
14
  );
17
15
  }
18
16
 
@@ -23,22 +21,21 @@ $prefix: (mtx, split);
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
- $gutter-tokens: private-get-color-palette-color-tokens($config, primary);
24
+ @function get-color-tokens($theme) {
25
+ $gutter-tokens: private-get-color-palette-color-tokens($theme, primary);
29
26
 
30
27
  @return sass-utils.merge-all($gutter-tokens, (
31
- gutter-background-color: theming.get-color-from-palette($foreground, divider),
28
+ gutter-background-color: mat.get-theme-color($theme, foreground, divider),
32
29
  ));
33
30
  }
34
31
 
35
32
  // Tokens that can be configured through Angular Material's typography theming API.
36
- @function get-typography-tokens($config) {
33
+ @function get-typography-tokens($theme) {
37
34
  @return ();
38
35
  }
39
36
 
40
37
  // Tokens that can be configured through Angular Material's density theming API.
41
- @function get-density-tokens($config) {
38
+ @function get-density-tokens($theme) {
42
39
  @return ();
43
40
  }
44
41
 
@@ -0,0 +1,40 @@
1
+ @use '@angular/material' as mat;
2
+ @use './typography';
3
+ @use '../../alert/alert-theme';
4
+ @use '../../button/button-theme';
5
+ @use '../../colorpicker/colorpicker-theme';
6
+ @use '../../datetimepicker/datetimepicker-theme';
7
+ @use '../../drawer/drawer-theme';
8
+ @use '../../grid/grid-theme';
9
+ @use '../../loader/loader-theme';
10
+ @use '../../popover/popover-theme';
11
+ @use '../../progress/progress-theme';
12
+ @use '../../select/select-theme';
13
+ @use '../../split/split-theme';
14
+ @use '../../tooltip/tooltip-theme';
15
+
16
+ // Includes all of the typographic styles.
17
+ @mixin all-component-typographies($theme: null) {
18
+ // If no actual color configuration has been specified, create a default one.
19
+ @if not mat.theme-has($theme, typography) {
20
+ $theme: typography.define-typography-config();
21
+ }
22
+
23
+ @include alert-theme.typography($theme);
24
+ @include button-theme.typography($theme);
25
+ @include colorpicker-theme.typography($theme);
26
+ @include datetimepicker-theme.typography($theme);
27
+ @include drawer-theme.typography($theme);
28
+ @include grid-theme.typography($theme);
29
+ @include loader-theme.typography($theme);
30
+ @include popover-theme.typography($theme);
31
+ @include progress-theme.typography($theme);
32
+ @include select-theme.typography($theme);
33
+ @include split-theme.typography($theme);
34
+ @include tooltip-theme.typography($theme);
35
+ }
36
+
37
+ // @deprecated Use `all-component-typographies`.
38
+ @mixin material-extensions-typography($theme: null) {
39
+ @include all-component-typographies($theme);
40
+ }