@ng-matero/extensions 17.3.5 → 18.0.1

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 (179) hide show
  1. package/README.md +11 -0
  2. package/_index.scss +6 -0
  3. package/alert/_alert-theme.scss +2 -3
  4. package/colorpicker/_colorpicker-theme.scss +2 -3
  5. package/colorpicker/colorpicker.d.ts +4 -4
  6. package/{experimental/theming/_color-api-back-compat.scss → core/theming/_color-api-backwards-compatibility.scss} +1 -1
  7. package/{experimental → core}/theming/_config-validation.scss +11 -5
  8. package/{experimental → core}/theming/_definition.scss +4 -3
  9. package/core/theming/prebuilt/azure-blue.scss +26 -0
  10. package/core/theming/prebuilt/cyan-orange.scss +26 -0
  11. package/core/theming/prebuilt/deeppurple-amber.scss +4 -4
  12. package/core/theming/prebuilt/indigo-pink.scss +4 -4
  13. package/core/theming/prebuilt/magenta-violet.scss +26 -0
  14. package/core/theming/prebuilt/pink-bluegrey.scss +4 -4
  15. package/core/theming/prebuilt/purple-green.scss +4 -4
  16. package/core/theming/prebuilt/rose-red.scss +26 -0
  17. package/{experimental/theming/_m3-density.scss → core/tokens/_density.scss} +0 -1
  18. package/core/tokens/_m3-tokens.scss +350 -0
  19. package/core/tokens/_token-utils.scss +164 -40
  20. package/core/tokens/m2/_index.scss +2 -3
  21. package/core/tokens/m2/mdc/_plain-tooltip.scss +1 -2
  22. package/core/tokens/m2/mtx/_alert.scss +5 -6
  23. package/core/tokens/m2/mtx/_colorpicker.scss +2 -3
  24. package/core/tokens/m2/mtx/_datetimepicker.scss +7 -8
  25. package/core/tokens/m2/mtx/_drawer.scss +3 -2
  26. package/core/tokens/m2/mtx/_grid.scss +4 -3
  27. package/core/tokens/m2/mtx/_loader.scss +2 -3
  28. package/core/tokens/m2/mtx/_popover.scss +1 -2
  29. package/core/tokens/m2/mtx/_progress.scss +5 -6
  30. package/core/tokens/m2/mtx/_select.scss +3 -2
  31. package/core/tokens/m2/mtx/_split.scss +2 -3
  32. package/core/tokens/m3/index.scss +45 -0
  33. package/core/tokens/m3/mtx/_alert.scss +31 -0
  34. package/core/tokens/m3/mtx/_colorpicker.scss +19 -0
  35. package/{experimental/theming/_custom-tokens.scss → core/tokens/m3/mtx/_datetimepicker.scss} +15 -191
  36. package/core/tokens/m3/mtx/_drawer.scss +22 -0
  37. package/core/tokens/m3/mtx/_grid.scss +34 -0
  38. package/core/tokens/m3/mtx/_loader.scss +22 -0
  39. package/core/tokens/m3/mtx/_popover.scss +22 -0
  40. package/core/tokens/m3/mtx/_progress.scss +31 -0
  41. package/core/tokens/m3/mtx/_select.scss +72 -0
  42. package/core/tokens/m3/mtx/_split.scss +30 -0
  43. package/datetimepicker/_datetimepicker-theme.scss +3 -4
  44. package/datetimepicker/calendar-body.scss +2 -2
  45. package/datetimepicker/calendar.d.ts +1 -0
  46. package/datetimepicker/datetimepicker-content.scss +0 -2
  47. package/datetimepicker/datetimepicker.d.ts +4 -4
  48. package/drawer/_drawer-theme.scss +2 -3
  49. package/drawer/drawer-container.scss +1 -2
  50. package/esm2022/alert/alert-module.mjs +4 -4
  51. package/esm2022/alert/alert.mjs +3 -3
  52. package/esm2022/button/button-loading.mjs +3 -3
  53. package/esm2022/button/button-module.mjs +4 -4
  54. package/esm2022/checkbox-group/checkbox-group-module.mjs +4 -4
  55. package/esm2022/checkbox-group/checkbox-group.mjs +3 -3
  56. package/esm2022/colorpicker/colorpicker-input.mjs +3 -3
  57. package/esm2022/colorpicker/colorpicker-module.mjs +4 -4
  58. package/esm2022/colorpicker/colorpicker-toggle.mjs +6 -6
  59. package/esm2022/colorpicker/colorpicker.mjs +14 -12
  60. package/esm2022/column-resize/column-resize-directives/column-resize-flex.mjs +3 -3
  61. package/esm2022/column-resize/column-resize-directives/column-resize.mjs +3 -3
  62. package/esm2022/column-resize/column-resize-module.mjs +4 -4
  63. package/esm2022/column-resize/column-resize-notifier.mjs +6 -6
  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 +3 -3
  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 +9 -9
  70. package/esm2022/core/datetime/datetime.module.mjs +8 -8
  71. package/esm2022/core/datetime/native-datetime-adapter.mjs +3 -3
  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 +3 -3
  76. package/esm2022/datetimepicker/calendar.mjs +9 -14
  77. package/esm2022/datetimepicker/clock.mjs +5 -5
  78. package/esm2022/datetimepicker/datetimepicker-input.mjs +3 -3
  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 +6 -6
  82. package/esm2022/datetimepicker/datetimepicker.mjs +15 -13
  83. package/esm2022/datetimepicker/month-view.mjs +3 -3
  84. package/esm2022/datetimepicker/multi-year-view.mjs +3 -3
  85. package/esm2022/datetimepicker/time.mjs +6 -6
  86. package/esm2022/datetimepicker/year-view.mjs +3 -3
  87. package/esm2022/dialog/dialog-container.mjs +3 -3
  88. package/esm2022/dialog/dialog-module.mjs +4 -4
  89. package/esm2022/dialog/dialog.mjs +3 -3
  90. package/esm2022/drawer/drawer-container.mjs +5 -5
  91. package/esm2022/drawer/drawer-module.mjs +4 -4
  92. package/esm2022/drawer/drawer.mjs +3 -3
  93. package/esm2022/grid/cell.mjs +3 -3
  94. package/esm2022/grid/column-menu.mjs +5 -5
  95. package/esm2022/grid/column-resize/column-resize-directives/column-resize-flex.mjs +3 -3
  96. package/esm2022/grid/column-resize/column-resize-directives/column-resize.mjs +3 -3
  97. package/esm2022/grid/column-resize/column-resize-module.mjs +8 -8
  98. package/esm2022/grid/column-resize/overlay-handle.mjs +3 -3
  99. package/esm2022/grid/column-resize/resizable-directives/resizable.mjs +3 -3
  100. package/esm2022/grid/column-resize/resize-strategy.mjs +3 -3
  101. package/esm2022/grid/expansion-toggle.mjs +3 -3
  102. package/esm2022/grid/grid-module.mjs +4 -4
  103. package/esm2022/grid/grid-pipes.mjs +21 -21
  104. package/esm2022/grid/grid-utils.mjs +3 -3
  105. package/esm2022/grid/grid.mjs +3 -3
  106. package/esm2022/grid/selectable-cell.mjs +3 -3
  107. package/esm2022/loader/loader-module.mjs +4 -4
  108. package/esm2022/loader/loader.mjs +3 -3
  109. package/esm2022/photoviewer/photoviewer-module.mjs +4 -4
  110. package/esm2022/photoviewer/photoviewer.mjs +3 -3
  111. package/esm2022/popover/popover-content.mjs +6 -6
  112. package/esm2022/popover/popover-module.mjs +4 -4
  113. package/esm2022/popover/popover-target.mjs +3 -3
  114. package/esm2022/popover/popover-trigger.mjs +6 -8
  115. package/esm2022/popover/popover.mjs +6 -6
  116. package/esm2022/progress/progress-module.mjs +4 -4
  117. package/esm2022/progress/progress.mjs +3 -3
  118. package/esm2022/select/option.mjs +3 -3
  119. package/esm2022/select/select-module.mjs +4 -4
  120. package/esm2022/select/select.mjs +37 -23
  121. package/esm2022/select/templates.mjs +33 -33
  122. package/esm2022/split/split-module.mjs +4 -4
  123. package/esm2022/split/split-pane.mjs +37 -28
  124. package/esm2022/split/split.mjs +55 -49
  125. package/esm2022/split/utils.mjs +1 -4
  126. package/esm2022/tooltip/tooltip-module.mjs +4 -4
  127. package/esm2022/tooltip/tooltip.mjs +6 -6
  128. package/fesm2022/mtxAlert.mjs +7 -7
  129. package/fesm2022/mtxButton.mjs +7 -7
  130. package/fesm2022/mtxCheckboxGroup.mjs +7 -7
  131. package/fesm2022/mtxColorpicker.mjs +27 -25
  132. package/fesm2022/mtxColorpicker.mjs.map +1 -1
  133. package/fesm2022/mtxColumnResize.mjs +40 -40
  134. package/fesm2022/mtxCore.mjs +21 -21
  135. package/fesm2022/mtxDatetimepicker.mjs +61 -63
  136. package/fesm2022/mtxDatetimepicker.mjs.map +1 -1
  137. package/fesm2022/mtxDialog.mjs +10 -10
  138. package/fesm2022/mtxDrawer.mjs +13 -13
  139. package/fesm2022/mtxDrawer.mjs.map +1 -1
  140. package/fesm2022/mtxGrid.mjs +68 -68
  141. package/fesm2022/mtxGrid.mjs.map +1 -1
  142. package/fesm2022/mtxLoader.mjs +7 -7
  143. package/fesm2022/mtxPhotoviewer.mjs +7 -7
  144. package/fesm2022/mtxPopover.mjs +24 -26
  145. package/fesm2022/mtxPopover.mjs.map +1 -1
  146. package/fesm2022/mtxProgress.mjs +7 -7
  147. package/fesm2022/mtxSelect.mjs +76 -62
  148. package/fesm2022/mtxSelect.mjs.map +1 -1
  149. package/fesm2022/mtxSplit.mjs +92 -80
  150. package/fesm2022/mtxSplit.mjs.map +1 -1
  151. package/fesm2022/mtxTooltip.mjs +12 -12
  152. package/grid/_grid-theme.scss +3 -4
  153. package/grid/column-menu.scss +15 -9
  154. package/grid/grid.scss +2 -2
  155. package/loader/_loader-theme.scss +2 -3
  156. package/package.json +18 -18
  157. package/popover/_popover-theme.scss +2 -3
  158. package/popover/popover.d.ts +2 -2
  159. package/prebuilt-themes/azure-blue.css +1 -0
  160. package/prebuilt-themes/cyan-orange.css +1 -0
  161. package/prebuilt-themes/deeppurple-amber.css +1 -1
  162. package/prebuilt-themes/indigo-pink.css +1 -1
  163. package/prebuilt-themes/magenta-violet.css +1 -0
  164. package/prebuilt-themes/pink-bluegrey.css +1 -1
  165. package/prebuilt-themes/purple-green.css +1 -1
  166. package/prebuilt-themes/rose-red.css +1 -0
  167. package/progress/_progress-theme.scss +3 -4
  168. package/select/_select-theme.scss +3 -4
  169. package/select/select.d.ts +17 -2
  170. package/select/select.scss +2 -4
  171. package/split/_split-theme.scss +2 -3
  172. package/split/split-pane.d.ts +29 -13
  173. package/split/split.d.ts +44 -20
  174. package/split/utils.d.ts +0 -1
  175. package/tooltip/_tooltip-theme.scss +4 -5
  176. package/core/style/_sass-utils.scss +0 -80
  177. package/experimental/_index.scss +0 -5
  178. package/experimental/theming/_m3-tokens.scss +0 -308
  179. /package/{experimental/theming → core/tokens}/_format-tokens.scss +0 -0
package/README.md CHANGED
@@ -57,6 +57,17 @@ You can also [using a pre-built theme](https://material.angular.io/guide/theming
57
57
  @import '@ng-matero/extensions/prebuilt-themes/indigo-pink.css'
58
58
  ```
59
59
 
60
+ ## Development
61
+
62
+ ```bash
63
+ $ git clone git@github.com:ng-matero/extensions.git
64
+ $ cd extensions
65
+ $ yarn
66
+ $ yarn run start
67
+ ```
68
+
69
+ Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
70
+
60
71
  ## License
61
72
 
62
73
  MIT
package/_index.scss CHANGED
@@ -23,7 +23,13 @@ split-color, split-typography, split-density, split-base;
23
23
  @forward './tooltip/tooltip-theme' as tooltip-* show tooltip-theme,
24
24
  tooltip-color, tooltip-typography, tooltip-density, tooltip-base;
25
25
 
26
+ @forward './core/theming/definition' show define-theme, define-colors, define-typography,
27
+ define-density;
28
+ @forward './core/theming/color-api-backwards-compatibility' show
29
+ color-variants-backwards-compatibility;
30
+
26
31
  @forward './core/tokens/m2' show m2-tokens-from-theme;
32
+ @forward './core/tokens/m3-tokens' show system-level-colors, system-level-typography;
27
33
 
28
34
  @forward './core/theming/all-theme' show all-component-themes, all-component-bases;
29
35
  @forward './core/color/all-color' show all-component-colors;
@@ -1,6 +1,5 @@
1
1
  @use 'sass:map';
2
2
  @use '@angular/material' as mat;
3
- @use '../core/style/sass-utils';
4
3
  @use '../core/theming/inspection';
5
4
  @use '../core/theming/validation';
6
5
  @use '../core/tokens/token-utils';
@@ -11,7 +10,7 @@
11
10
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, base));
12
11
  }
13
12
  @else {
14
- @include sass-utils.current-selector-or-root() {
13
+ @include mat.private-current-selector-or-root() {
15
14
  @include token-utils.create-token-values(tokens-mtx-alert.$prefix,
16
15
  tokens-mtx-alert.get-unthemable-tokens());
17
16
  }
@@ -23,7 +22,7 @@
23
22
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, color));
24
23
  }
25
24
  @else {
26
- @include sass-utils.current-selector-or-root() {
25
+ @include mat.private-current-selector-or-root() {
27
26
  @include token-utils.create-token-values(tokens-mtx-alert.$prefix,
28
27
  tokens-mtx-alert.get-color-tokens($theme));
29
28
  }
@@ -1,7 +1,6 @@
1
1
  @use 'sass:color';
2
2
  @use 'sass:map';
3
3
  @use '@angular/material' as mat;
4
- @use '../core/style/sass-utils';
5
4
  @use '../core/theming/inspection';
6
5
  @use '../core/theming/validation';
7
6
  @use '../core/tokens/token-utils';
@@ -12,7 +11,7 @@
12
11
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, base));
13
12
  }
14
13
  @else {
15
- @include sass-utils.current-selector-or-root() {
14
+ @include mat.private-current-selector-or-root() {
16
15
  @include token-utils.create-token-values(tokens-mtx-colorpicker.$prefix,
17
16
  tokens-mtx-colorpicker.get-unthemable-tokens());
18
17
  }
@@ -24,7 +23,7 @@
24
23
  @include _theme-from-tokens(inspection.get-theme-tokens($theme, color));
25
24
  }
26
25
  @else {
27
- @include sass-utils.current-selector-or-root() {
26
+ @include mat.private-current-selector-or-root() {
28
27
  @include token-utils.create-token-values(tokens-mtx-colorpicker.$prefix,
29
28
  tokens-mtx-colorpicker.get-color-tokens($theme));
30
29
  }
@@ -1,6 +1,6 @@
1
1
  import { Directionality } from '@angular/cdk/bidi';
2
2
  import { Overlay, ScrollStrategy } from '@angular/cdk/overlay';
3
- import { ChangeDetectorRef, EventEmitter, InjectionToken, NgZone, OnChanges, OnDestroy, TemplateRef, ViewContainerRef } from '@angular/core';
3
+ import { ChangeDetectorRef, EventEmitter, InjectionToken, OnChanges, OnDestroy, TemplateRef, ViewContainerRef } from '@angular/core';
4
4
  import { ThemePalette } from '@angular/material/core';
5
5
  import { Subject } from 'rxjs';
6
6
  import { ColorEvent } from 'ngx-color';
@@ -35,7 +35,6 @@ export declare class MtxColorpickerContent implements OnDestroy {
35
35
  }
36
36
  export declare class MtxColorpicker implements OnChanges, OnDestroy {
37
37
  private _overlay;
38
- private _ngZone;
39
38
  private _viewContainerRef;
40
39
  private _dir;
41
40
  private _document;
@@ -92,7 +91,8 @@ export declare class MtxColorpicker implements OnChanges, OnDestroy {
92
91
  readonly _disabledChange: Subject<boolean>;
93
92
  /** Emits new selected color when selected color changes. */
94
93
  readonly _selectedChanged: Subject<string>;
95
- constructor(_overlay: Overlay, _ngZone: NgZone, _viewContainerRef: ViewContainerRef, scrollStrategy: any, _dir: Directionality, _document: any);
94
+ private _injector;
95
+ constructor(_overlay: Overlay, _viewContainerRef: ViewContainerRef, scrollStrategy: any, _dir: Directionality, _document: any);
96
96
  ngOnChanges(): void;
97
97
  ngOnDestroy(): void;
98
98
  /** Selects the given color. */
@@ -118,7 +118,7 @@ export declare class MtxColorpicker implements OnChanges, OnDestroy {
118
118
  private _setConnectedPositions;
119
119
  /** Gets an observable that will emit when the overlay is supposed to be closed. */
120
120
  private _getCloseStream;
121
- static ɵfac: i0.ɵɵFactoryDeclaration<MtxColorpicker, [null, null, null, null, { optional: true; }, { optional: true; }]>;
121
+ static ɵfac: i0.ɵɵFactoryDeclaration<MtxColorpicker, [null, null, null, { optional: true; }, { optional: true; }]>;
122
122
  static ɵcmp: i0.ɵɵComponentDeclaration<MtxColorpicker, "mtx-colorpicker", ["mtxColorpicker"], { "content": { "alias": "content"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "xPosition": { "alias": "xPosition"; "required": false; }; "yPosition": { "alias": "yPosition"; "required": false; }; "restoreFocus": { "alias": "restoreFocus"; "required": false; }; "opened": { "alias": "opened"; "required": false; }; "color": { "alias": "color"; "required": false; }; "format": { "alias": "format"; "required": false; }; }, { "openedStream": "opened"; "closedStream": "closed"; }, never, never, true, never>;
123
123
  static ngAcceptInputType_disabled: unknown;
124
124
  static ngAcceptInputType_restoreFocus: unknown;
@@ -31,7 +31,7 @@ $_overrides-only: true;
31
31
  }
32
32
  }
33
33
 
34
- @mixin color-variants-back-compat($theme) {
34
+ @mixin color-variants-backwards-compatibility($theme) {
35
35
  .mat-primary {
36
36
  @include color-variant-styles($theme, primary);
37
37
  }
@@ -3,7 +3,6 @@
3
3
  @use 'sass:meta';
4
4
  @use 'sass:string';
5
5
  @use '@angular/material' as mat;
6
- @use '@angular/material-experimental' as matx;
7
6
 
8
7
  /// Creates an error message by finding `$config` in the existing message and appending a suffix to
9
8
  /// it.
@@ -34,13 +33,13 @@
34
33
  @return true;
35
34
  }
36
35
  $keys: map.keys($palette);
37
- $expected-keys: map.keys(matx.$m3-red-palette);
36
+ $expected-keys: map.keys(mat.$red-palette);
38
37
  @if mat.private-validate-allowed-values($keys, $expected-keys...) or
39
38
  mat.private-validate-required-values($keys, $expected-keys...) {
40
39
  @return true;
41
40
  }
42
41
  $nv-keys: map.keys(map.get($palette, neutral-variant));
43
- $expected-nv-keys: map.keys(map.get(matx.$m3-red-palette, neutral-variant));
42
+ $expected-nv-keys: map.keys(map.get(mat.$red-palette, neutral-variant));
44
43
  @if mat.private-validate-allowed-values($nv-keys, $expected-nv-keys...) or
45
44
  mat.private-validate-required-values($nv-keys, $expected-nv-keys...) {
46
45
  @return true;
@@ -89,7 +88,7 @@
89
88
  @if $err {
90
89
  @return (#{'$config should be a color configuration object. Got:'} $config);
91
90
  }
92
- $allowed: (theme-type, primary, tertiary);
91
+ $allowed: (theme-type, primary, tertiary, use-system-variables);
93
92
  $err: mat.private-validate-allowed-values(map.keys($config or ()), $allowed...);
94
93
  @if $err {
95
94
  @return (
@@ -128,7 +127,14 @@
128
127
  @if $err {
129
128
  @return (#{'$config should be a typography configuration object. Got:'} $config);
130
129
  }
131
- $allowed: (brand-family, plain-family, bold-weight, medium-weight, regular-weight);
130
+ $allowed: (
131
+ brand-family,
132
+ plain-family,
133
+ bold-weight,
134
+ medium-weight,
135
+ regular-weight,
136
+ use-system-variables
137
+ );
132
138
  $err: mat.private-validate-allowed-values(map.keys($config or ()), $allowed...);
133
139
  @if $err {
134
140
  @return (
@@ -2,8 +2,7 @@
2
2
 
3
3
  @use 'sass:map';
4
4
  @use '@angular/material' as mat;
5
- @use '@angular/material-experimental' as matx;
6
- @use './m3-tokens';
5
+ @use '../tokens/m3-tokens';
7
6
  @use './config-validation';
8
7
 
9
8
  /// Map key used to store internals of theme config.
@@ -38,8 +37,9 @@ $theme-version: 1;
38
37
  }
39
38
 
40
39
  $type: map.get($config, theme-type) or light;
41
- $primary: map.get($config, primary) or matx.$m3-violet-palette;
40
+ $primary: map.get($config, primary) or mat.$violet-palette;
42
41
  $tertiary: map.get($config, tertiary) or $primary;
42
+ // mat.$private-use-system-color-variables: map.get($config, use-system-variables) or false;
43
43
 
44
44
  @return (
45
45
  $internals: (
@@ -73,6 +73,7 @@ $theme-version: 1;
73
73
  $bold: map.get($config, bold-weight) or 700;
74
74
  $medium: map.get($config, medium-weight) or 500;
75
75
  $regular: map.get($config, regular-weight) or 400;
76
+ // mat.$private-use-system-typography-variables: map.get($config, use-system-variables) or false;
76
77
 
77
78
  @return (
78
79
  $internals: (
@@ -0,0 +1,26 @@
1
+ @use '@angular/material' as mat;
2
+ @use '../definition' as mtx;
3
+ @use '../color-api-backwards-compatibility';
4
+ @use '../all-theme';
5
+
6
+ $config: (
7
+ color: (
8
+ theme-type: light,
9
+ primary: mat.$azure-palette,
10
+ tertiary: mat.$blue-palette,
11
+ ),
12
+ density: (
13
+ scale: 0,
14
+ )
15
+ );
16
+
17
+ $theme: mat.private-deep-merge-all(
18
+ mat.define-theme($config),
19
+ mtx.define-theme($config),
20
+ );
21
+
22
+ html {
23
+ @include all-theme.all-component-themes($theme);
24
+ }
25
+
26
+ @include color-api-backwards-compatibility.color-variants-backwards-compatibility($theme);
@@ -0,0 +1,26 @@
1
+ @use '@angular/material' as mat;
2
+ @use '../definition' as mtx;
3
+ @use '../color-api-backwards-compatibility';
4
+ @use '../all-theme';
5
+
6
+ $config: (
7
+ color: (
8
+ theme-type: dark,
9
+ primary: mat.$cyan-palette,
10
+ tertiary: mat.$orange-palette,
11
+ ),
12
+ density: (
13
+ scale: 0,
14
+ )
15
+ );
16
+
17
+ $theme: mat.private-deep-merge-all(
18
+ mat.define-theme($config),
19
+ mtx.define-theme($config),
20
+ );
21
+
22
+ html {
23
+ @include all-theme.all-component-themes($theme);
24
+ }
25
+
26
+ @include color-api-backwards-compatibility.color-variants-backwards-compatibility($theme);
@@ -2,16 +2,16 @@
2
2
  @use '../all-theme';
3
3
 
4
4
  // Define a theme.
5
- $primary: mat.define-palette(mat.$deep-purple-palette);
6
- $accent: mat.define-palette(mat.$amber-palette, A200, A100, A400);
5
+ $primary: mat.m2-define-palette(mat.$m2-deep-purple-palette);
6
+ $accent: mat.m2-define-palette(mat.$m2-amber-palette, A200, A100, A400);
7
7
 
8
- $theme: mat.define-light-theme(
8
+ $theme: mat.m2-define-light-theme(
9
9
  (
10
10
  color: (
11
11
  primary: $primary,
12
12
  accent: $accent,
13
13
  ),
14
- typography: mat.define-typography-config(),
14
+ typography: mat.m2-define-typography-config(),
15
15
  density: 0,
16
16
  )
17
17
  );
@@ -2,16 +2,16 @@
2
2
  @use '../all-theme';
3
3
 
4
4
  // Define a theme.
5
- $primary: mat.define-palette(mat.$indigo-palette);
6
- $accent: mat.define-palette(mat.$pink-palette, A200, A100, A400);
5
+ $primary: mat.m2-define-palette(mat.$m2-indigo-palette);
6
+ $accent: mat.m2-define-palette(mat.$m2-pink-palette, A200, A100, A400);
7
7
 
8
- $theme: mat.define-light-theme(
8
+ $theme: mat.m2-define-light-theme(
9
9
  (
10
10
  color: (
11
11
  primary: $primary,
12
12
  accent: $accent
13
13
  ),
14
- typography: mat.define-typography-config(),
14
+ typography: mat.m2-define-typography-config(),
15
15
  density: 0,
16
16
  )
17
17
  );
@@ -0,0 +1,26 @@
1
+ @use '@angular/material' as mat;
2
+ @use '../definition' as mtx;
3
+ @use '../color-api-backwards-compatibility';
4
+ @use '../all-theme';
5
+
6
+ $config: (
7
+ color: (
8
+ theme-type: dark,
9
+ primary: mat.$magenta-palette,
10
+ tertiary: mat.$violet-palette,
11
+ ),
12
+ density: (
13
+ scale: 0,
14
+ )
15
+ );
16
+
17
+ $theme: mat.private-deep-merge-all(
18
+ mat.define-theme($config),
19
+ mtx.define-theme($config),
20
+ );
21
+
22
+ html {
23
+ @include all-theme.all-component-themes($theme);
24
+ }
25
+
26
+ @include color-api-backwards-compatibility.color-variants-backwards-compatibility($theme);
@@ -2,16 +2,16 @@
2
2
  @use '../all-theme';
3
3
 
4
4
  // Define a theme.
5
- $primary: mat.define-palette(mat.$pink-palette, 700, 500, 900);
6
- $accent: mat.define-palette(mat.$blue-grey-palette, A200, A100, A400);
5
+ $primary: mat.m2-define-palette(mat.$m2-pink-palette, 700, 500, 900);
6
+ $accent: mat.m2-define-palette(mat.$m2-blue-grey-palette, A200, A100, A400);
7
7
 
8
- $theme: mat.define-dark-theme(
8
+ $theme: mat.m2-define-dark-theme(
9
9
  (
10
10
  color: (
11
11
  primary: $primary,
12
12
  accent: $accent
13
13
  ),
14
- typography: mat.define-typography-config(),
14
+ typography: mat.m2-define-typography-config(),
15
15
  density: 0,
16
16
  )
17
17
  );
@@ -2,16 +2,16 @@
2
2
  @use '../all-theme';
3
3
 
4
4
  // Define a theme.
5
- $primary: mat.define-palette(mat.$purple-palette, 700, 500, 800);
6
- $accent: mat.define-palette(mat.$green-palette, A200, A100, A400);
5
+ $primary: mat.m2-define-palette(mat.$m2-purple-palette, 700, 500, 800);
6
+ $accent: mat.m2-define-palette(mat.$m2-green-palette, A200, A100, A400);
7
7
 
8
- $theme: mat.define-dark-theme(
8
+ $theme: mat.m2-define-dark-theme(
9
9
  (
10
10
  color: (
11
11
  primary: $primary,
12
12
  accent: $accent
13
13
  ),
14
- typography: mat.define-typography-config(),
14
+ typography: mat.m2-define-typography-config(),
15
15
  density: 0,
16
16
  )
17
17
  );
@@ -0,0 +1,26 @@
1
+ @use '@angular/material' as mat;
2
+ @use '../definition' as mtx;
3
+ @use '../color-api-backwards-compatibility';
4
+ @use '../all-theme';
5
+
6
+ $config: (
7
+ color: (
8
+ theme-type: light,
9
+ primary: mat.$rose-palette,
10
+ tertiary: mat.$red-palette,
11
+ ),
12
+ density: (
13
+ scale: 0,
14
+ )
15
+ );
16
+
17
+ $theme: mat.private-deep-merge-all(
18
+ mat.define-theme($config),
19
+ mtx.define-theme($config),
20
+ );
21
+
22
+ html {
23
+ @include all-theme.all-component-themes($theme);
24
+ }
25
+
26
+ @include color-api-backwards-compatibility.color-variants-backwards-compatibility($theme);
@@ -13,7 +13,6 @@
13
13
  /// ),
14
14
  /// ...
15
15
  /// )
16
- // TODO(mmalerba): Add density tokens for remaining components.
17
16
  $_density-tokens: (
18
17
  );
19
18