@ng-matero/extensions 19.4.0 → 20.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 (282) hide show
  1. package/_index.scss +1 -1
  2. package/alert/_alert-theme.scss +26 -31
  3. package/alert/_m2-alert.scss +59 -0
  4. package/alert/_m3-alert.scss +41 -0
  5. package/alert/alert.scss +27 -31
  6. package/alert/index.d.ts +30 -5
  7. package/button/index.d.ts +31 -5
  8. package/checkbox-group/index.d.ts +117 -5
  9. package/colorpicker/_colorpicker-theme.scss +31 -36
  10. package/{core/tokens/m2/mtx/_colorpicker.scss → colorpicker/_m2-colorpicker.scss} +6 -10
  11. package/colorpicker/_m3-colorpicker.scss +23 -0
  12. package/colorpicker/colorpicker-toggle.scss +4 -9
  13. package/colorpicker/index.d.ts +285 -3
  14. package/column-resize/index.d.ts +456 -3
  15. package/core/index.d.ts +147 -5
  16. package/core/theming/_color-api-backwards-compatibility.scss +8 -15
  17. package/core/theming/_definition.scss +81 -75
  18. package/core/theming/_palettes.scss +1036 -0
  19. package/core/tokens/{m2/_index.scss → _m2-tokens.scss} +22 -22
  20. package/core/tokens/_m2-utils.scss +108 -0
  21. package/core/tokens/_m3-system.scss +128 -106
  22. package/core/tokens/_m3-tokens.scss +36 -282
  23. package/core/tokens/_m3-utils.scss +48 -0
  24. package/core/tokens/_token-utils.scss +67 -239
  25. package/core/tokens/m3/_index.scss +7 -0
  26. package/core/tokens/m3/_md-sys-color.scss +156 -0
  27. package/core/tokens/m3/_md-sys-elevation.scss +15 -0
  28. package/core/tokens/m3/_md-sys-motion.scss +35 -0
  29. package/core/tokens/m3/_md-sys-shape.scss +21 -0
  30. package/core/tokens/m3/_md-sys-state.scss +13 -0
  31. package/core/tokens/m3/_md-sys-typescale.scss +128 -0
  32. package/core/tokens/m3/_theme.scss +47 -0
  33. package/datetimepicker/_datetimepicker-theme.scss +29 -39
  34. package/datetimepicker/_m2-datetimepicker.scss +149 -0
  35. package/datetimepicker/_m3-datetimepicker.scss +81 -0
  36. package/datetimepicker/calendar-body.scss +31 -56
  37. package/datetimepicker/calendar.scss +43 -79
  38. package/datetimepicker/clock.scss +28 -47
  39. package/datetimepicker/datetimepicker-content.scss +9 -15
  40. package/datetimepicker/datetimepicker-toggle.scss +4 -9
  41. package/datetimepicker/index.d.ts +1208 -3
  42. package/datetimepicker/time-view.scss +26 -32
  43. package/dialog/index.d.ts +54 -5
  44. package/drawer/_drawer-theme.scss +25 -30
  45. package/{core/tokens/m2/mtx/_drawer.scss → drawer/_m2-drawer.scss} +9 -12
  46. package/drawer/_m3-drawer.scss +24 -0
  47. package/drawer/drawer-container.scss +13 -24
  48. package/drawer/index.d.ts +221 -3
  49. package/fesm2022/mtxAlert.mjs +7 -7
  50. package/fesm2022/mtxAlert.mjs.map +1 -1
  51. package/fesm2022/mtxButton.mjs +7 -7
  52. package/fesm2022/mtxCheckboxGroup.mjs +7 -7
  53. package/fesm2022/mtxColorpicker.mjs +21 -21
  54. package/fesm2022/mtxColorpicker.mjs.map +1 -1
  55. package/fesm2022/mtxColumnResize.mjs +232 -103
  56. package/fesm2022/mtxColumnResize.mjs.map +1 -1
  57. package/fesm2022/mtxCore.mjs +21 -21
  58. package/fesm2022/mtxDatetimepicker.mjs +63 -63
  59. package/fesm2022/mtxDatetimepicker.mjs.map +1 -1
  60. package/fesm2022/mtxDialog.mjs +10 -10
  61. package/fesm2022/mtxDialog.mjs.map +1 -1
  62. package/fesm2022/mtxDrawer.mjs +10 -10
  63. package/fesm2022/mtxGrid.mjs +78 -77
  64. package/fesm2022/mtxGrid.mjs.map +1 -1
  65. package/fesm2022/mtxLoader.mjs +7 -7
  66. package/fesm2022/mtxPhotoviewer.mjs +7 -7
  67. package/fesm2022/mtxPopover.mjs +24 -25
  68. package/fesm2022/mtxPopover.mjs.map +1 -1
  69. package/fesm2022/mtxProgress.mjs +7 -7
  70. package/fesm2022/mtxSelect.mjs +54 -54
  71. package/fesm2022/mtxSelect.mjs.map +1 -1
  72. package/fesm2022/mtxSplit.mjs +10 -10
  73. package/fesm2022/mtxTooltip.mjs +13 -13
  74. package/fesm2022/mtxTooltip.mjs.map +1 -1
  75. package/grid/_grid-theme.scss +22 -35
  76. package/grid/_m2-grid.scss +66 -0
  77. package/grid/_m3-grid.scss +35 -0
  78. package/grid/column-menu.scss +6 -23
  79. package/grid/column-resize/_column-resize.scss +35 -30
  80. package/grid/grid.scss +41 -73
  81. package/grid/index.d.ts +799 -3
  82. package/index.d.ts +2 -5
  83. package/loader/_loader-theme.scss +26 -31
  84. package/{core/tokens/m2/mtx/_loader.scss → loader/_m2-loader.scss} +5 -10
  85. package/loader/_m3-loader.scss +20 -0
  86. package/loader/index.d.ts +43 -5
  87. package/loader/loader.scss +4 -5
  88. package/package.json +29 -29
  89. package/photoviewer/index.d.ts +26 -5
  90. package/{core/tokens/m2/mtx/_popover.scss → popover/_m2-popover.scss} +9 -12
  91. package/popover/_m3-popover.scss +26 -0
  92. package/popover/_popover-theme.scss +26 -31
  93. package/popover/index.d.ts +399 -3
  94. package/popover/popover.scss +23 -29
  95. package/prebuilt-themes/azure-blue.css +1 -1
  96. package/prebuilt-themes/cyan-orange.css +1 -1
  97. package/prebuilt-themes/deeppurple-amber.css +1 -1
  98. package/prebuilt-themes/indigo-pink.css +1 -1
  99. package/prebuilt-themes/magenta-violet.css +1 -1
  100. package/prebuilt-themes/pink-bluegrey.css +1 -1
  101. package/prebuilt-themes/purple-green.css +1 -1
  102. package/prebuilt-themes/rose-red.css +1 -1
  103. package/progress/_m2-progress.scss +53 -0
  104. package/progress/_m3-progress.scss +33 -0
  105. package/progress/_progress-theme.scss +22 -34
  106. package/progress/index.d.ts +35 -5
  107. package/progress/progress.scss +28 -43
  108. package/select/_m2-select.scss +79 -0
  109. package/select/_m3-select.scss +46 -0
  110. package/select/_select-theme.scss +27 -37
  111. package/select/index.d.ts +381 -3
  112. package/select/select.scss +189 -205
  113. package/{core/tokens/m2/mtx/_split.scss → split/_m2-split.scss} +6 -9
  114. package/split/_m3-split.scss +23 -0
  115. package/split/_split-theme.scss +31 -34
  116. package/split/index.d.ts +255 -3
  117. package/split/split.scss +8 -11
  118. package/tooltip/_m2-tooltip.scss +50 -0
  119. package/tooltip/_m3-tooltip.scss +28 -0
  120. package/tooltip/_tooltip-theme.scss +23 -47
  121. package/tooltip/index.d.ts +345 -3
  122. package/tooltip/tooltip.scss +11 -15
  123. package/alert/alert-module.d.ts +0 -8
  124. package/alert/alert.d.ts +0 -19
  125. package/alert/public-api.d.ts +0 -2
  126. package/button/button-loading.d.ts +0 -19
  127. package/button/button-module.d.ts +0 -10
  128. package/button/public-api.d.ts +0 -2
  129. package/checkbox-group/checkbox-group-module.d.ts +0 -11
  130. package/checkbox-group/checkbox-group.d.ts +0 -86
  131. package/checkbox-group/interfaces.d.ts +0 -17
  132. package/checkbox-group/public-api.d.ts +0 -3
  133. package/colorpicker/colorpicker-animations.d.ts +0 -9
  134. package/colorpicker/colorpicker-input.d.ts +0 -88
  135. package/colorpicker/colorpicker-module.d.ts +0 -15
  136. package/colorpicker/colorpicker-toggle.d.ts +0 -39
  137. package/colorpicker/colorpicker.d.ts +0 -140
  138. package/colorpicker/public-api.d.ts +0 -5
  139. package/column-resize/column-resize-directives/column-resize-flex.d.ts +0 -29
  140. package/column-resize/column-resize-directives/column-resize.d.ts +0 -29
  141. package/column-resize/column-resize-directives/constants.d.ts +0 -10
  142. package/column-resize/column-resize-module.d.ts +0 -12
  143. package/column-resize/column-resize-notifier.d.ts +0 -48
  144. package/column-resize/column-resize.d.ts +0 -39
  145. package/column-resize/column-size-store.d.ts +0 -12
  146. package/column-resize/event-dispatcher.d.ts +0 -35
  147. package/column-resize/overlay-handle.d.ts +0 -43
  148. package/column-resize/polyfill.d.ts +0 -9
  149. package/column-resize/public-api.d.ts +0 -12
  150. package/column-resize/resizable.d.ts +0 -63
  151. package/column-resize/resize-ref.d.ts +0 -17
  152. package/column-resize/resize-strategy.d.ts +0 -84
  153. package/column-resize/selectors.d.ts +0 -10
  154. package/core/datetime/datetime-adapter.d.ts +0 -45
  155. package/core/datetime/datetime-formats.d.ts +0 -22
  156. package/core/datetime/datetime.module.d.ts +0 -15
  157. package/core/datetime/index.d.ts +0 -5
  158. package/core/datetime/native-datetime-adapter.d.ts +0 -40
  159. package/core/datetime/native-datetime-formats.d.ts +0 -2
  160. package/core/pipes/index.d.ts +0 -3
  161. package/core/pipes/is-template-ref.pipe.d.ts +0 -7
  162. package/core/pipes/pipes.module.d.ts +0 -9
  163. package/core/pipes/to-observable.pipe.d.ts +0 -8
  164. package/core/public-api.d.ts +0 -2
  165. package/core/theming/_inspection.scss +0 -38
  166. package/core/theming/_validation.scss +0 -5
  167. package/core/tokens/_density.scss +0 -49
  168. package/core/tokens/_format-tokens.scss +0 -5
  169. package/core/tokens/_token-definition.scss +0 -271
  170. package/core/tokens/m2/mdc/_plain-tooltip.scss +0 -63
  171. package/core/tokens/m2/mtx/_alert.scss +0 -62
  172. package/core/tokens/m2/mtx/_datetimepicker.scss +0 -152
  173. package/core/tokens/m2/mtx/_grid.scss +0 -69
  174. package/core/tokens/m2/mtx/_progress.scss +0 -56
  175. package/core/tokens/m2/mtx/_select.scss +0 -82
  176. package/core/tokens/m3/definitions/_index.scss +0 -9
  177. package/core/tokens/m3/definitions/_md-comp-plain-tooltip.scss +0 -51
  178. package/core/tokens/m3/definitions/_md-ref-palette.scss +0 -100
  179. package/core/tokens/m3/definitions/_md-ref-typeface.scss +0 -14
  180. package/core/tokens/m3/definitions/_md-sys-color.scss +0 -126
  181. package/core/tokens/m3/definitions/_md-sys-elevation.scss +0 -15
  182. package/core/tokens/m3/definitions/_md-sys-motion.scss +0 -46
  183. package/core/tokens/m3/definitions/_md-sys-shape.scss +0 -24
  184. package/core/tokens/m3/definitions/_md-sys-state.scss +0 -13
  185. package/core/tokens/m3/definitions/_md-sys-typescale.scss +0 -308
  186. package/core/tokens/m3/index.scss +0 -47
  187. package/core/tokens/m3/mdc/_plain-tooltip.scss +0 -15
  188. package/core/tokens/m3/mtx/_alert.scss +0 -41
  189. package/core/tokens/m3/mtx/_colorpicker.scss +0 -19
  190. package/core/tokens/m3/mtx/_datetimepicker.scss +0 -140
  191. package/core/tokens/m3/mtx/_drawer.scss +0 -22
  192. package/core/tokens/m3/mtx/_grid.scss +0 -32
  193. package/core/tokens/m3/mtx/_loader.scss +0 -22
  194. package/core/tokens/m3/mtx/_popover.scss +0 -25
  195. package/core/tokens/m3/mtx/_progress.scss +0 -32
  196. package/core/tokens/m3/mtx/_select.scss +0 -76
  197. package/core/tokens/m3/mtx/_split.scss +0 -30
  198. package/datetimepicker/calendar-body.d.ts +0 -66
  199. package/datetimepicker/calendar.d.ts +0 -157
  200. package/datetimepicker/clock.d.ts +0 -101
  201. package/datetimepicker/datetimepicker-actions.d.ts +0 -36
  202. package/datetimepicker/datetimepicker-animations.d.ts +0 -11
  203. package/datetimepicker/datetimepicker-errors.d.ts +0 -2
  204. package/datetimepicker/datetimepicker-filtertype.d.ts +0 -5
  205. package/datetimepicker/datetimepicker-input.d.ts +0 -105
  206. package/datetimepicker/datetimepicker-intl.d.ts +0 -53
  207. package/datetimepicker/datetimepicker-module.d.ts +0 -22
  208. package/datetimepicker/datetimepicker-toggle.d.ts +0 -42
  209. package/datetimepicker/datetimepicker-types.d.ts +0 -6
  210. package/datetimepicker/datetimepicker.d.ts +0 -274
  211. package/datetimepicker/month-view.d.ts +0 -80
  212. package/datetimepicker/multi-year-view.d.ts +0 -86
  213. package/datetimepicker/public-api.d.ts +0 -16
  214. package/datetimepicker/time-view.d.ts +0 -147
  215. package/datetimepicker/year-view.d.ts +0 -68
  216. package/dialog/dialog-config.d.ts +0 -17
  217. package/dialog/dialog-container.d.ts +0 -11
  218. package/dialog/dialog-module.d.ts +0 -12
  219. package/dialog/dialog.d.ts +0 -15
  220. package/dialog/public-api.d.ts +0 -4
  221. package/drawer/drawer-animations.d.ts +0 -8
  222. package/drawer/drawer-config.d.ts +0 -63
  223. package/drawer/drawer-container.d.ts +0 -35
  224. package/drawer/drawer-module.d.ts +0 -10
  225. package/drawer/drawer-ref.d.ts +0 -53
  226. package/drawer/drawer.d.ts +0 -59
  227. package/drawer/public-api.d.ts +0 -6
  228. package/grid/cell.d.ts +0 -32
  229. package/grid/column-menu.d.ts +0 -39
  230. package/grid/column-resize/column-resize-directives/column-resize-flex.d.ts +0 -24
  231. package/grid/column-resize/column-resize-directives/column-resize.d.ts +0 -24
  232. package/grid/column-resize/column-resize-directives/common.d.ts +0 -13
  233. package/grid/column-resize/column-resize-module.d.ts +0 -17
  234. package/grid/column-resize/index.d.ts +0 -7
  235. package/grid/column-resize/overlay-handle.d.ts +0 -32
  236. package/grid/column-resize/resizable-directives/common.d.ts +0 -19
  237. package/grid/column-resize/resizable-directives/resizable.d.ts +0 -32
  238. package/grid/column-resize/resize-strategy.d.ts +0 -20
  239. package/grid/expansion-toggle.d.ts +0 -17
  240. package/grid/grid-module.d.ts +0 -31
  241. package/grid/grid-pipes.d.ts +0 -39
  242. package/grid/grid-utils.d.ts +0 -33
  243. package/grid/grid.d.ts +0 -268
  244. package/grid/interfaces.d.ts +0 -180
  245. package/grid/public-api.d.ts +0 -17
  246. package/grid/selectable-cell.d.ts +0 -16
  247. package/loader/loader-module.d.ts +0 -10
  248. package/loader/loader.d.ts +0 -30
  249. package/loader/public-api.d.ts +0 -2
  250. package/photoviewer/photoviewer-module.d.ts +0 -7
  251. package/photoviewer/photoviewer.d.ts +0 -17
  252. package/photoviewer/public-api.d.ts +0 -2
  253. package/popover/popover-animations.d.ts +0 -11
  254. package/popover/popover-content.d.ts +0 -43
  255. package/popover/popover-errors.d.ts +0 -14
  256. package/popover/popover-interfaces.d.ts +0 -50
  257. package/popover/popover-module.d.ts +0 -13
  258. package/popover/popover-target.d.ts +0 -7
  259. package/popover/popover-trigger.d.ts +0 -132
  260. package/popover/popover-types.d.ts +0 -10
  261. package/popover/popover.d.ts +0 -147
  262. package/popover/public-api.d.ts +0 -8
  263. package/progress/progress-module.d.ts +0 -8
  264. package/progress/progress.d.ts +0 -24
  265. package/progress/public-api.d.ts +0 -2
  266. package/public-api.d.ts +0 -2
  267. package/select/option.d.ts +0 -21
  268. package/select/public-api.d.ts +0 -5
  269. package/select/select-intl.d.ts +0 -18
  270. package/select/select-module.d.ts +0 -12
  271. package/select/select.d.ts +0 -270
  272. package/select/templates.d.ts +0 -67
  273. package/split/interfaces.d.ts +0 -52
  274. package/split/public-api.d.ts +0 -5
  275. package/split/split-module.d.ts +0 -9
  276. package/split/split-pane.d.ts +0 -53
  277. package/split/split.d.ts +0 -133
  278. package/split/utils.d.ts +0 -13
  279. package/tooltip/public-api.d.ts +0 -3
  280. package/tooltip/tooltip-animations.d.ts +0 -9
  281. package/tooltip/tooltip-module.d.ts +0 -13
  282. package/tooltip/tooltip.d.ts +0 -321
package/_index.scss CHANGED
@@ -27,7 +27,7 @@ tooltip-color, tooltip-typography, tooltip-density, tooltip-base, tooltip-overri
27
27
  define-density;
28
28
  @forward './core/theming/color-api-backwards-compatibility' show color-variants-backwards-compatibility;
29
29
 
30
- @forward './core/tokens/m2' show m2-tokens-from-theme;
30
+ @forward './core/tokens/m2-tokens' show m2-tokens-from-theme;
31
31
  @forward './core/tokens/m3-system' show system-level-colors,
32
32
  system-level-typography, system-level-elevation, system-level-shape,
33
33
  system-level-motion, system-level-state, theme, theme-overrides;
@@ -1,70 +1,74 @@
1
1
  @use 'sass:map';
2
2
  @use '@angular/material' as mat;
3
- @use '../core/theming/inspection';
4
- @use '../core/theming/validation';
5
3
  @use '../core/tokens/token-utils';
6
- @use '../core/tokens/m2/mtx/alert' as tokens-mtx-alert;
4
+ @use './m2-alert';
5
+ @use './m3-alert';
7
6
 
8
7
  @mixin base($theme) {
9
8
  @if mat.get-theme-version($theme) == 1 {
10
- @include _theme-from-tokens(inspection.get-theme-tokens($theme, base));
9
+ @include token-utils.create-token-values(map.get(m3-alert.get-tokens($theme), base));
11
10
  }
12
11
  @else {
13
12
  @include mat.private-current-selector-or-root() {
14
- @include token-utils.create-token-values(
15
- tokens-mtx-alert.$prefix,
16
- tokens-mtx-alert.get-unthemable-tokens()
17
- );
13
+ @include token-utils.create-token-values-mixed(m2-alert.get-unthemable-tokens());
18
14
  }
19
15
  }
20
16
  }
21
17
 
22
18
  @mixin color($theme) {
23
19
  @if mat.get-theme-version($theme) == 1 {
24
- @include _theme-from-tokens(inspection.get-theme-tokens($theme, color));
20
+ @include token-utils.create-token-values(map.get(m3-alert.get-tokens($theme), color));
25
21
  }
26
22
  @else {
27
23
  @include mat.private-current-selector-or-root() {
28
- @include token-utils.create-token-values(
29
- tokens-mtx-alert.$prefix,
30
- tokens-mtx-alert.get-color-tokens($theme)
31
- );
24
+ @include token-utils.create-token-values-mixed(m2-alert.get-color-tokens($theme));
32
25
  }
33
26
  }
34
27
  }
35
28
 
36
29
  @mixin typography($theme) {
37
30
  @if mat.get-theme-version($theme) == 1 {
38
- @include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
31
+ @include token-utils.create-token-values(map.get(m3-alert.get-tokens($theme), typography));
32
+ }
33
+ @else {
34
+ @include mat.private-current-selector-or-root() {
35
+ @include token-utils.create-token-values-mixed(m2-alert.get-typography-tokens($theme));
36
+ }
39
37
  }
40
- @else {}
41
38
  }
42
39
 
43
40
  @mixin density($theme) {
44
41
  @if mat.get-theme-version($theme) == 1 {
45
- @include _theme-from-tokens(inspection.get-theme-tokens($theme, density));
42
+ @include token-utils.create-token-values(map.get(m3-alert.get-tokens($theme), density));
43
+ }
44
+ @else {
45
+ @include mat.private-current-selector-or-root() {
46
+ @include token-utils.create-token-values-mixed(m2-alert.get-density-tokens($theme));
47
+ }
46
48
  }
47
- @else {}
48
49
  }
49
50
 
50
51
  /// Defines the tokens that will be available in the `overrides` mixin and for docs extraction.
51
52
  @function _define-overrides() {
52
53
  @return (
53
54
  (
54
- namespace: tokens-mtx-alert.$prefix,
55
- tokens: tokens-mtx-alert.get-token-slots(),
55
+ namespace: alert,
56
+ tokens: token-utils.get-overrides(m3-alert.get-tokens(), alert),
56
57
  ),
57
58
  );
58
59
  }
59
60
 
60
61
  @mixin overrides($tokens: ()) {
61
- @include token-utils.batch-create-token-values($tokens, _define-overrides()...);
62
+ @include token-utils.batch-create-token-values($tokens, _define-overrides());
62
63
  }
63
64
 
64
- @mixin theme($theme) {
65
+ @mixin theme($theme, $color-variant: null) {
65
66
  @include mat.private-check-duplicate-theme-styles($theme, 'mtx-alert') {
66
67
  @if mat.get-theme-version($theme) == 1 {
67
- @include _theme-from-tokens(inspection.get-theme-tokens($theme));
68
+ @include base($theme);
69
+ @include color($theme);
70
+ @include density($theme);
71
+ @include typography($theme);
68
72
  }
69
73
  @else {
70
74
  @include base($theme);
@@ -80,12 +84,3 @@
80
84
  }
81
85
  }
82
86
  }
83
-
84
- @mixin _theme-from-tokens($tokens) {
85
- @include validation.selector-defined(
86
- 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');
87
- @if ($tokens != ()) {
88
- @include token-utils.create-token-values(tokens-mtx-alert.$prefix,
89
- map.get($tokens, tokens-mtx-alert.$prefix));
90
- }
91
- }
@@ -0,0 +1,59 @@
1
+ @use 'sass:map';
2
+ @use '@angular/material' as mat;
3
+ @use '../core/tokens/m2-utils';
4
+
5
+ // Tokens that can't be configured through Angular Material's current theming API,
6
+ // but may be in a future version of the theming API.
7
+ @function get-unthemable-tokens() {
8
+ @return (
9
+ alert-container-shape: 4px,
10
+ );
11
+ }
12
+
13
+ // Tokens that can be configured through Angular Material's color theming API.
14
+ @function get-color-tokens($theme) {
15
+ $is-dark: mat.get-theme-type($theme) == dark;
16
+
17
+ @return (
18
+ alert-outline-color: transparent,
19
+ alert-background-color: mat.m2-get-color-from-palette(mat.$m2-gray-palette, if($is-dark, 900, 100)),
20
+ alert-text-color: mat.get-theme-color($theme, foreground, text),
21
+
22
+ alert-info-outline-color: transparent,
23
+ alert-info-background-color: mat.m2-get-color-from-palette(mat.$m2-blue-palette, if($is-dark, 900, 100)),
24
+ alert-info-text-color: mat.get-theme-color($theme, foreground, text),
25
+
26
+ alert-success-outline-color: transparent,
27
+ alert-success-background-color: mat.m2-get-color-from-palette(mat.$m2-green-palette, if($is-dark, 900, 100)),
28
+ alert-success-text-color: mat.get-theme-color($theme, foreground, text),
29
+
30
+ alert-warning-outline-color: transparent,
31
+ alert-warning-background-color: mat.m2-get-color-from-palette(mat.$m2-amber-palette, if($is-dark, 900, 100)),
32
+ alert-warning-text-color: mat.get-theme-color($theme, foreground, text),
33
+
34
+ alert-danger-outline-color: transparent,
35
+ alert-danger-background-color: mat.m2-get-color-from-palette(mat.$m2-red-palette, if($is-dark, 900, 100)),
36
+ alert-danger-text-color: mat.get-theme-color($theme, foreground, text),
37
+ );
38
+ }
39
+
40
+ // Tokens that can be configured through Angular Material's typography theming API.
41
+ @function get-typography-tokens($theme) {
42
+ @return ();
43
+ }
44
+
45
+ // Tokens that can be configured through Angular Material's density theming API.
46
+ @function get-density-tokens($theme) {
47
+ @return ();
48
+ }
49
+
50
+ // Combines the tokens generated by the above functions into a single map with placeholder values.
51
+ // This is used to create token slots.
52
+ @function get-token-slots() {
53
+ @return mat.private-deep-merge-all(
54
+ get-unthemable-tokens(),
55
+ get-color-tokens(m2-utils.$placeholder-color-config),
56
+ get-typography-tokens(m2-utils.$placeholder-typography-config),
57
+ get-density-tokens(m2-utils.$placeholder-density-config)
58
+ );
59
+ }
@@ -0,0 +1,41 @@
1
+ @use 'sass:map';
2
+ @use '@angular/material' as mat;
3
+ @use '../core/tokens/m3-utils';
4
+ @use '../core/tokens/m3';
5
+
6
+ /// Generates custom tokens for the mtx-alert.
7
+ @function get-tokens($theme: m3.$sys-theme) {
8
+ $system: m3-utils.get-system($theme);
9
+ $is-dark: map.get($system, md-sys-type) == dark;
10
+
11
+ $tokens: (
12
+ base: (
13
+ alert-container-shape: map.get($system, corner-small),
14
+ ),
15
+ color: (
16
+ alert-outline-color: map.get($system, outline-variant),
17
+ alert-background-color: map.get($system, surface-container),
18
+ alert-text-color: map.get($system, on-surface),
19
+
20
+ alert-info-outline-color: light-dark(map.get(mat.$azure-palette, 80), map.get(mat.$azure-palette, 40)),
21
+ alert-info-background-color: light-dark(map.get(mat.$azure-palette, 90), map.get(mat.$azure-palette, 20)),
22
+ alert-info-text-color: light-dark(map.get(mat.$azure-palette, 20), map.get(mat.$azure-palette, 90)),
23
+
24
+ alert-success-outline-color: light-dark(map.get(mat.$green-palette, 80), map.get(mat.$green-palette, 40)),
25
+ alert-success-background-color: light-dark(map.get(mat.$green-palette, 95), map.get(mat.$green-palette, 20)),
26
+ alert-success-text-color: light-dark(map.get(mat.$green-palette, 20), map.get(mat.$green-palette, 95)),
27
+
28
+ alert-warning-outline-color: light-dark(map.get(mat.$yellow-palette, 80), map.get(mat.$yellow-palette, 40)),
29
+ alert-warning-background-color: light-dark(map.get(mat.$yellow-palette, 98), map.get(mat.$yellow-palette, 20)),
30
+ alert-warning-text-color: light-dark(map.get(mat.$yellow-palette, 20), map.get(mat.$yellow-palette, 98)),
31
+
32
+ alert-danger-outline-color: light-dark(map.get(mat.$red-palette, 80), map.get(mat.$red-palette, 40)),
33
+ alert-danger-background-color: light-dark(map.get(mat.$red-palette, 90), map.get(mat.$red-palette, 20)),
34
+ alert-danger-text-color: light-dark(map.get(mat.$red-palette, 20), map.get(mat.$red-palette, 90)),
35
+ ),
36
+ typography: (),
37
+ density: (),
38
+ );
39
+
40
+ @return $tokens;
41
+ }
package/alert/alert.scss CHANGED
@@ -1,5 +1,7 @@
1
1
  @use '../core/tokens/token-utils';
2
- @use '../core/tokens/m2/mtx/alert' as tokens-mtx-alert;
2
+ @use './m3-alert';
3
+
4
+ $fallbacks: m3-alert.get-tokens();
3
5
 
4
6
  .mtx-alert {
5
7
  position: relative;
@@ -7,39 +9,33 @@
7
9
  padding: .75rem 1rem;
8
10
  margin-bottom: 1rem;
9
11
  line-height: 1.5;
12
+ border: 1px solid token-utils.slot(alert-outline-color, $fallbacks);
13
+ border-radius: token-utils.slot(alert-container-shape, $fallbacks);
14
+ background-color: token-utils.slot(alert-background-color, $fallbacks);
15
+ color: token-utils.slot(alert-text-color, $fallbacks);
16
+
17
+ &.mtx-alert-info {
18
+ border-color: token-utils.slot(alert-info-outline-color, $fallbacks);
19
+ background-color: token-utils.slot(alert-info-background-color, $fallbacks);
20
+ color: token-utils.slot(alert-info-text-color, $fallbacks);
21
+ }
10
22
 
11
- @include token-utils.use-tokens(tokens-mtx-alert.$prefix, tokens-mtx-alert.get-token-slots()) {
12
- $border-color: token-utils.get-token-variable(outline-color);
13
-
14
- border: 1px solid $border-color;
15
-
16
- @include token-utils.create-token-slot(border-radius, container-shape);
17
- @include token-utils.create-token-slot(background-color, background-color);
18
- @include token-utils.create-token-slot(color, text-color);
19
-
20
- &.mtx-alert-info {
21
- @include token-utils.create-token-slot(border-color, info-outline-color);
22
- @include token-utils.create-token-slot(background-color, info-background-color);
23
- @include token-utils.create-token-slot(color, info-text-color);
24
- }
25
-
26
- &.mtx-alert-success {
27
- @include token-utils.create-token-slot(border-color, success-outline-color);
28
- @include token-utils.create-token-slot(background-color, success-background-color);
29
- @include token-utils.create-token-slot(color, success-text-color);
30
- }
23
+ &.mtx-alert-success {
24
+ border-color: token-utils.slot(alert-success-outline-color, $fallbacks);
25
+ background-color: token-utils.slot(alert-success-background-color, $fallbacks);
26
+ color: token-utils.slot(alert-success-text-color, $fallbacks);
27
+ }
31
28
 
32
- &.mtx-alert-warning {
33
- @include token-utils.create-token-slot(border-color, warning-outline-color);
34
- @include token-utils.create-token-slot(background-color, warning-background-color);
35
- @include token-utils.create-token-slot(color, warning-text-color);
36
- }
29
+ &.mtx-alert-warning {
30
+ border-color: token-utils.slot(alert-warning-outline-color, $fallbacks);
31
+ background-color: token-utils.slot(alert-warning-background-color, $fallbacks);
32
+ color: token-utils.slot(alert-warning-text-color, $fallbacks);
33
+ }
37
34
 
38
- &.mtx-alert-danger {
39
- @include token-utils.create-token-slot(border-color, danger-outline-color);
40
- @include token-utils.create-token-slot(background-color, danger-background-color);
41
- @include token-utils.create-token-slot(color, danger-text-color);
42
- }
35
+ &.mtx-alert-danger {
36
+ border-color: token-utils.slot(alert-danger-outline-color, $fallbacks);
37
+ background-color: token-utils.slot(alert-danger-background-color, $fallbacks);
38
+ color: token-utils.slot(alert-danger-text-color, $fallbacks);
43
39
  }
44
40
  }
45
41
 
package/alert/index.d.ts CHANGED
@@ -1,5 +1,30 @@
1
- /**
2
- * Generated bundle index. Do not edit.
3
- */
4
- /// <amd-module name="@ng-matero/extensions/alert" />
5
- export * from './public-api';
1
+ import * as i0 from '@angular/core';
2
+ import { EventEmitter } from '@angular/core';
3
+ import * as i1 from '@angular/common';
4
+
5
+ type MtxAlertType = 'default' | 'info' | 'success' | 'warning' | 'danger';
6
+ declare class MtxAlert {
7
+ private _changeDetectorRef;
8
+ get hostClassList(): string;
9
+ /** The alert's type. Can be `default`, `info`, `success`, `warning` or `danger`. */
10
+ type: MtxAlertType;
11
+ /** Whether to display an inline close button. */
12
+ dismissible: boolean;
13
+ /** The alert's elevation (0~24). */
14
+ elevation: number;
15
+ /** Event emitted when the alert closed. */
16
+ closed: EventEmitter<MtxAlert>;
17
+ _onClosed(): void;
18
+ static ɵfac: i0.ɵɵFactoryDeclaration<MtxAlert, never>;
19
+ static ɵcmp: i0.ɵɵComponentDeclaration<MtxAlert, "mtx-alert", ["mtxAlert"], { "type": { "alias": "type"; "required": false; }; "dismissible": { "alias": "dismissible"; "required": false; }; "elevation": { "alias": "elevation"; "required": false; }; }, { "closed": "closed"; }, never, ["*"], true, never>;
20
+ static ngAcceptInputType_dismissible: unknown;
21
+ }
22
+
23
+ declare class MtxAlertModule {
24
+ static ɵfac: i0.ɵɵFactoryDeclaration<MtxAlertModule, never>;
25
+ static ɵmod: i0.ɵɵNgModuleDeclaration<MtxAlertModule, never, [typeof i1.CommonModule, typeof MtxAlert], [typeof MtxAlert]>;
26
+ static ɵinj: i0.ɵɵInjectorDeclaration<MtxAlertModule>;
27
+ }
28
+
29
+ export { MtxAlert, MtxAlertModule };
30
+ export type { MtxAlertType };
package/button/index.d.ts CHANGED
@@ -1,5 +1,31 @@
1
- /**
2
- * Generated bundle index. Do not edit.
3
- */
4
- /// <amd-module name="@ng-matero/extensions/button" />
5
- export * from './public-api';
1
+ import * as i0 from '@angular/core';
2
+ import { OnChanges, SimpleChanges } from '@angular/core';
3
+ import * as i1 from '@angular/common';
4
+ import * as i2 from '@angular/material/button';
5
+ import * as i3 from '@angular/material/progress-spinner';
6
+ import { ThemePalette } from '@angular/material/core';
7
+
8
+ declare class MatButtonLoading implements OnChanges {
9
+ private _elementRef;
10
+ private _viewContainerRef;
11
+ private _renderer;
12
+ private spinner;
13
+ loading: boolean;
14
+ disabled: boolean;
15
+ color: ThemePalette;
16
+ ngOnChanges(changes: SimpleChanges): void;
17
+ private createSpinner;
18
+ private destroySpinner;
19
+ static ɵfac: i0.ɵɵFactoryDeclaration<MatButtonLoading, never>;
20
+ static ɵdir: i0.ɵɵDirectiveDeclaration<MatButtonLoading, "[mat-button][loading], [mat-raised-button][loading], [mat-stroked-button][loading], [mat-flat-button][loading], [mat-icon-button][loading], [mat-fab][loading], [mat-mini-fab][loading]", never, { "loading": { "alias": "loading"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "color": { "alias": "color"; "required": false; }; }, {}, never, never, true, never>;
21
+ static ngAcceptInputType_loading: unknown;
22
+ static ngAcceptInputType_disabled: unknown;
23
+ }
24
+
25
+ declare class MtxButtonModule {
26
+ static ɵfac: i0.ɵɵFactoryDeclaration<MtxButtonModule, never>;
27
+ static ɵmod: i0.ɵɵNgModuleDeclaration<MtxButtonModule, never, [typeof i1.CommonModule, typeof i2.MatButtonModule, typeof i3.MatProgressSpinnerModule, typeof MatButtonLoading], [typeof MatButtonLoading]>;
28
+ static ɵinj: i0.ɵɵInjectorDeclaration<MtxButtonModule>;
29
+ }
30
+
31
+ export { MatButtonLoading, MtxButtonModule };
@@ -1,5 +1,117 @@
1
- /**
2
- * Generated bundle index. Do not edit.
3
- */
4
- /// <amd-module name="@ng-matero/extensions/checkbox-group" />
5
- export * from './public-api';
1
+ import * as i0 from '@angular/core';
2
+ import { AfterViewInit, OnDestroy, QueryList, TrackByFunction, EventEmitter } from '@angular/core';
3
+ import * as i1 from '@angular/common';
4
+ import * as i2 from '@angular/forms';
5
+ import { ControlValueAccessor } from '@angular/forms';
6
+ import * as i3 from '@angular/material/checkbox';
7
+ import { MatCheckbox, MatCheckboxChange } from '@angular/material/checkbox';
8
+ import * as i4 from '@ng-matero/extensions/core';
9
+
10
+ interface MtxCheckboxGroupOption {
11
+ ariaDescribedby?: string;
12
+ ariaLabel?: string;
13
+ ariaLabelledby?: string;
14
+ label?: any;
15
+ value?: any;
16
+ color?: string;
17
+ checked?: boolean;
18
+ disabled?: boolean;
19
+ disableRipple?: boolean;
20
+ indeterminate?: boolean;
21
+ labelPosition?: 'before' | 'after';
22
+ id?: string;
23
+ name?: string | null;
24
+ required?: boolean;
25
+ [k: string]: any;
26
+ }
27
+
28
+ declare class MtxCheckboxBase {
29
+ label?: any | undefined;
30
+ value?: any | undefined;
31
+ constructor(label?: any | undefined, value?: any | undefined);
32
+ }
33
+ declare class MtxCheckboxGroup implements AfterViewInit, OnDestroy, ControlValueAccessor {
34
+ private _changeDetectorRef;
35
+ private _focusMonitor;
36
+ private _elementRef;
37
+ _checkboxes: QueryList<MatCheckbox>;
38
+ /**
39
+ * Tracking function that will be used to check the differences in data changes. Used similarly
40
+ * to `ngFor` `trackBy` function. Optimize row operations by identifying a row based on its data
41
+ * relative to the function to know if a row should be added/removed/moved.
42
+ * Accepts a function that takes two parameters, `index` and `item`.
43
+ */
44
+ get trackBy(): TrackByFunction<any> | undefined;
45
+ set trackBy(fn: TrackByFunction<any> | undefined);
46
+ private _trackByFn?;
47
+ get items(): any[];
48
+ set items(value: any[]);
49
+ private _items;
50
+ private _originalItems;
51
+ bindLabel: string;
52
+ bindValue: string;
53
+ showSelectAll: boolean;
54
+ selectAllLabel: string;
55
+ get compareWith(): ((o1: any, o2: any) => boolean) | undefined;
56
+ set compareWith(fn: ((o1: any, o2: any) => boolean) | undefined);
57
+ private _compareWith?;
58
+ disabled: boolean;
59
+ change: EventEmitter<{
60
+ model: MtxCheckboxGroupOption[];
61
+ index: number;
62
+ }>;
63
+ selectAll: boolean;
64
+ selectAllIndeterminate: boolean;
65
+ selectedItems: MtxCheckboxGroupOption[];
66
+ _onChange: (value: MtxCheckboxGroupOption[]) => void;
67
+ _onTouched: () => void;
68
+ ngAfterViewInit(): void;
69
+ ngOnDestroy(): void;
70
+ /**
71
+ * Finds and selects and option based on its value.
72
+ * @returns Option that has the corresponding value.
73
+ */
74
+ private _selectValue;
75
+ /**
76
+ * Sets the model value. Implemented as part of ControlValueAccessor.
77
+ * @param value New value to be written to the model.
78
+ */
79
+ writeValue(value: any[]): void;
80
+ /**
81
+ * Registers a callback to be triggered when the model value changes.
82
+ * Implemented as part of ControlValueAccessor.
83
+ * @param fn Callback to be registered.
84
+ */
85
+ registerOnChange(fn: (value: MtxCheckboxGroupOption[]) => Record<string, unknown>): void;
86
+ /**
87
+ * Registers a callback to be triggered when the control is touched.
88
+ * Implemented as part of ControlValueAccessor.
89
+ * @param fn Callback to be registered.
90
+ */
91
+ registerOnTouched(fn: () => Record<string, unknown>): void;
92
+ /**
93
+ * Sets the disabled state of the control. Implemented as a part of ControlValueAccessor.
94
+ * @param isDisabled Whether the control should be disabled.
95
+ */
96
+ setDisabledState(isDisabled: boolean): void;
97
+ private _checkMasterCheckboxState;
98
+ private _getSelectedItems;
99
+ /** Handle normal checkbox toggle */
100
+ _updateNormalCheckboxState(e: MatCheckboxChange, index: number): void;
101
+ /** Handle master checkbox toggle */
102
+ _updateMasterCheckboxState(e: MatCheckboxChange, index: number): void;
103
+ _trackBy: (index: number, item: any) => any;
104
+ static ɵfac: i0.ɵɵFactoryDeclaration<MtxCheckboxGroup, never>;
105
+ static ɵcmp: i0.ɵɵComponentDeclaration<MtxCheckboxGroup, "mtx-checkbox-group", ["mtxCheckboxGroup"], { "trackBy": { "alias": "trackBy"; "required": false; }; "items": { "alias": "items"; "required": false; }; "bindLabel": { "alias": "bindLabel"; "required": false; }; "bindValue": { "alias": "bindValue"; "required": false; }; "showSelectAll": { "alias": "showSelectAll"; "required": false; }; "selectAllLabel": { "alias": "selectAllLabel"; "required": false; }; "compareWith": { "alias": "compareWith"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "change": "change"; }, ["_checkboxes"], never, true, never>;
106
+ static ngAcceptInputType_showSelectAll: unknown;
107
+ static ngAcceptInputType_disabled: unknown;
108
+ }
109
+
110
+ declare class MtxCheckboxGroupModule {
111
+ static ɵfac: i0.ɵɵFactoryDeclaration<MtxCheckboxGroupModule, never>;
112
+ static ɵmod: i0.ɵɵNgModuleDeclaration<MtxCheckboxGroupModule, never, [typeof i1.CommonModule, typeof i2.FormsModule, typeof i3.MatCheckboxModule, typeof i4.MtxPipesModule, typeof MtxCheckboxGroup], [typeof MtxCheckboxGroup, typeof i4.MtxPipesModule]>;
113
+ static ɵinj: i0.ɵɵInjectorDeclaration<MtxCheckboxGroupModule>;
114
+ }
115
+
116
+ export { MtxCheckboxBase, MtxCheckboxGroup, MtxCheckboxGroupModule };
117
+ export type { MtxCheckboxGroupOption };
@@ -1,46 +1,39 @@
1
1
  @use 'sass:color';
2
2
  @use 'sass:map';
3
3
  @use '@angular/material' as mat;
4
- @use '../core/theming/inspection';
5
- @use '../core/theming/validation';
6
4
  @use '../core/tokens/token-utils';
7
- @use '../core/tokens/m2/mtx/colorpicker' as tokens-mtx-colorpicker;
5
+ @use './m2-colorpicker';
6
+ @use './m3-colorpicker';
8
7
 
9
8
  @mixin base($theme) {
10
9
  @if mat.get-theme-version($theme) == 1 {
11
- @include _theme-from-tokens(inspection.get-theme-tokens($theme, base));
10
+ @include token-utils.create-token-values(map.get(m3-colorpicker.get-tokens($theme), base));
12
11
  }
13
12
  @else {
14
13
  @include mat.private-current-selector-or-root() {
15
- @include token-utils.create-token-values(
16
- tokens-mtx-colorpicker.$prefix,
17
- tokens-mtx-colorpicker.get-unthemable-tokens()
18
- );
14
+ @include token-utils.create-token-values-mixed(m2-colorpicker.get-unthemable-tokens());
19
15
  }
20
16
  }
21
17
  }
22
18
 
23
- @mixin color($theme) {
19
+ @mixin color($theme, $color-variant: null) {
24
20
  @if mat.get-theme-version($theme) == 1 {
25
- @include _theme-from-tokens(inspection.get-theme-tokens($theme, color));
21
+ @include token-utils.create-token-values(map.get(m3-colorpicker.get-tokens($theme), color));
26
22
  }
27
23
  @else {
28
24
  @include mat.private-current-selector-or-root() {
29
- @include token-utils.create-token-values(
30
- tokens-mtx-colorpicker.$prefix,
31
- tokens-mtx-colorpicker.get-color-tokens($theme)
32
- );
25
+ @include token-utils.create-token-values-mixed(m2-colorpicker.get-color-tokens($theme));
33
26
  }
34
27
 
35
28
  .mtx-colorpicker-toggle-active {
36
29
  &.mat-accent {
37
- $accent-tokens: tokens-mtx-colorpicker.private-get-toggle-color-palette-color-tokens($theme, accent);
38
- @include token-utils.create-token-values(tokens-mtx-colorpicker.$prefix, $accent-tokens);
30
+ $accent-tokens: m2-colorpicker.private-get-toggle-color-palette-color-tokens($theme, accent);
31
+ @include token-utils.create-token-values-mixed($accent-tokens);
39
32
  }
40
33
 
41
34
  &.mat-warn {
42
- $warn-tokens: tokens-mtx-colorpicker.private-get-toggle-color-palette-color-tokens($theme, warn);
43
- @include token-utils.create-token-values(tokens-mtx-colorpicker.$prefix, $warn-tokens);
35
+ $warn-tokens: m2-colorpicker.private-get-toggle-color-palette-color-tokens($theme, warn);
36
+ @include token-utils.create-token-values-mixed($warn-tokens);
44
37
  }
45
38
  }
46
39
  }
@@ -48,36 +41,47 @@
48
41
 
49
42
  @mixin typography($theme) {
50
43
  @if mat.get-theme-version($theme) == 1 {
51
- @include _theme-from-tokens(inspection.get-theme-tokens($theme, typography));
44
+ @include token-utils.create-token-values(map.get(m3-colorpicker.get-tokens($theme), typography));
45
+ }
46
+ @else {
47
+ @include mat.private-current-selector-or-root() {
48
+ @include token-utils.create-token-values-mixed(m2-colorpicker.get-typography-tokens($theme));
49
+ }
52
50
  }
53
- @else {}
54
51
  }
55
52
 
56
53
  @mixin density($theme) {
57
54
  @if mat.get-theme-version($theme) == 1 {
58
- @include _theme-from-tokens(inspection.get-theme-tokens($theme, density));
55
+ @include token-utils.create-token-values(map.get(m3-colorpicker.get-tokens($theme), density));
56
+ }
57
+ @else {
58
+ @include mat.private-current-selector-or-root() {
59
+ @include token-utils.create-token-values-mixed(m2-colorpicker.get-density-tokens($theme));
60
+ }
59
61
  }
60
- @else {}
61
62
  }
62
63
 
63
64
  /// Defines the tokens that will be available in the `overrides` mixin and for docs extraction.
64
65
  @function _define-overrides() {
65
66
  @return (
66
67
  (
67
- namespace: tokens-mtx-colorpicker.$prefix,
68
- tokens: tokens-mtx-colorpicker.get-token-slots(),
68
+ namespace: colorpicker,
69
+ tokens: token-utils.get-overrides(m3-colorpicker.get-tokens(), colorpicker),
69
70
  ),
70
71
  );
71
72
  }
72
73
 
73
74
  @mixin overrides($tokens: ()) {
74
- @include token-utils.batch-create-token-values($tokens, _define-overrides()...);
75
+ @include token-utils.batch-create-token-values($tokens, _define-overrides());
75
76
  }
76
77
 
77
- @mixin theme($theme) {
78
+ @mixin theme($theme, $color-variant: null) {
78
79
  @include mat.private-check-duplicate-theme-styles($theme, 'mtx-colorpicker') {
79
80
  @if mat.get-theme-version($theme) == 1 {
80
- @include _theme-from-tokens(inspection.get-theme-tokens($theme));
81
+ @include base($theme);
82
+ @include color($theme, $color-variant);
83
+ @include density($theme);
84
+ @include typography($theme);
81
85
  }
82
86
  @else {
83
87
  @include base($theme);
@@ -93,12 +97,3 @@
93
97
  }
94
98
  }
95
99
  }
96
-
97
- @mixin _theme-from-tokens($tokens) {
98
- @include validation.selector-defined(
99
- 'Calls to Angular Material theme mixins with an M3 theme must be wrapped in a selector');
100
- @if ($tokens != ()) {
101
- @include token-utils.create-token-values(tokens-mtx-colorpicker.$prefix,
102
- map.get($tokens, tokens-mtx-colorpicker.$prefix));
103
- }
104
- }
@@ -1,15 +1,11 @@
1
1
  @use 'sass:color';
2
2
  @use 'sass:map';
3
- @use 'sass:meta';
4
3
  @use '@angular/material' as mat;
5
- @use '../../token-definition';
6
-
7
- // The prefix used to generate the fully qualified name for tokens in this file.
8
- $prefix: (mtx, colorpicker);
4
+ @use '../core/tokens/m2-utils';
9
5
 
10
6
  @function private-get-toggle-color-palette-color-tokens($theme, $palette-name) {
11
7
  @return (
12
- toggle-active-state-icon-color: mat.get-theme-color($theme, $palette-name, text),
8
+ colorpicker-toggle-active-state-icon-color: mat.get-theme-color($theme, $palette-name, text),
13
9
  );
14
10
  }
15
11
 
@@ -25,7 +21,7 @@ $prefix: (mtx, colorpicker);
25
21
  $toggle-tokens: private-get-toggle-color-palette-color-tokens($theme, primary);
26
22
 
27
23
  @return mat.private-merge-all($toggle-tokens, (
28
- toggle-icon-color: $inactive-icon-color
24
+ colorpicker-toggle-icon-color: $inactive-icon-color
29
25
  ));
30
26
  }
31
27
 
@@ -44,8 +40,8 @@ $prefix: (mtx, colorpicker);
44
40
  @function get-token-slots() {
45
41
  @return mat.private-deep-merge-all(
46
42
  get-unthemable-tokens(),
47
- get-color-tokens(token-definition.$placeholder-color-config),
48
- get-typography-tokens(token-definition.$placeholder-typography-config),
49
- get-density-tokens(token-definition.$placeholder-density-config)
43
+ get-color-tokens(m2-utils.$placeholder-color-config),
44
+ get-typography-tokens(m2-utils.$placeholder-typography-config),
45
+ get-density-tokens(m2-utils.$placeholder-density-config)
50
46
  );
51
47
  }