@elderbyte/ngx-starter 18.12.8 → 18.13.0-beta.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 (54) hide show
  1. package/_index.scss +18 -6
  2. package/esm2022/lib/components/data-transfer/http-data-transfer-indicator/http-data-transfer-indicator.component.mjs +3 -3
  3. package/esm2022/lib/components/data-transfer/http-data-transfer-overview/http-data-transfer-overview.component.mjs +3 -3
  4. package/esm2022/lib/components/page/exit-guard/page-exit-lock-indicator/page-exit-lock-indicator.component.mjs +3 -3
  5. package/esm2022/lib/components/select/filter/elder-filter-chip-template/elder-filter-chip-template.component.mjs +3 -3
  6. package/esm2022/lib/components/select/multi/elder-multi-select-chip-options/elder-multi-select-chip-options.component.mjs +3 -3
  7. package/esm2022/lib/components/select/multi/elder-multi-select-chips/elder-multi-select-chips.component.mjs +3 -3
  8. package/esm2022/lib/components/select/popup/templated-selection-dialog/templated-selection-dialog.component.mjs +3 -3
  9. package/esm2022/lib/components/select/single/elder-select/elder-select.component.mjs +3 -3
  10. package/esm2022/lib/components/shell/header/elder-app-header/elder-app-header.component.mjs +5 -3
  11. package/esm2022/lib/components/time/elder-interval-picker/elder-interval-picker.component.mjs +3 -3
  12. package/fesm2022/elderbyte-ngx-starter.mjs +22 -20
  13. package/fesm2022/elderbyte-ngx-starter.mjs.map +1 -1
  14. package/lib/components/shell/header/elder-app-header/elder-app-header.component.d.ts +2 -1
  15. package/package.json +1 -1
  16. package/src/lib/components/button-group/elder-button-group/elder-button-group.component.scss +1 -7
  17. package/src/lib/components/card-organizer/card-stack/elder-card-stack.component.scss +3 -14
  18. package/src/lib/components/cards/elder-card/elder-card.component.scss +2 -8
  19. package/src/lib/components/chips/_elder-chip-theme-old.scss +122 -0
  20. package/src/lib/components/chips/_elder-chip-theme.scss +101 -12
  21. package/src/lib/components/data-transfer/http-data-transfer-indicator/http-data-transfer-indicator.component.scss +0 -6
  22. package/src/lib/components/data-transfer/http-data-transfer-overview/http-data-transfer-overview.component.scss +11 -0
  23. package/src/lib/components/data-view/grid/elder-grid/elder-grid.component.scss +15 -22
  24. package/src/lib/components/data-view/table/elder-table/elder-table.component.scss +11 -18
  25. package/src/lib/components/errors/exception-detail/elder-exception-detail.component.scss +2 -9
  26. package/src/lib/components/expand-toggle-button/elder-expand-toggle-button.component.scss +2 -8
  27. package/src/lib/components/files/drag-n-drop/elder-drop-zone/elder-drop-zone.component.scss +7 -10
  28. package/src/lib/components/iframes/iframe-host/iframe-host.component.scss +0 -4
  29. package/src/lib/components/navigation/nav/_elder-nav-theme.scss +12 -24
  30. package/src/lib/components/page/exit-guard/page-exit-lock-indicator/page-exit-lock-indicator.component.scss +1 -4
  31. package/src/lib/components/panels/card-panel/elder-card-panel.component.scss +3 -12
  32. package/src/lib/components/panels/elder-dialog-panel/elder-dialog-panel.component.scss +4 -12
  33. package/src/lib/components/panels/flat/_elder-panel-theme.scss +26 -9
  34. package/src/lib/components/select/_elder-select-base.scss +1 -9
  35. package/src/lib/components/select/filter/elder-filter-chip-template/elder-filter-chip-template.component.scss +1 -4
  36. package/src/lib/components/select/multi/elder-multi-select-chip-options/elder-multi-select-chip-options.component.scss +10 -39
  37. package/src/lib/components/select/multi/elder-multi-select-chips/elder-multi-select-chips.component.scss +19 -52
  38. package/src/lib/components/select/single/elder-select/elder-select.component.scss +24 -40
  39. package/src/lib/components/time/_elder-time-input.theme.scss +0 -3
  40. package/theming/_elder-color-variants.scss +26 -0
  41. package/theming/_elder-common.scss +6 -399
  42. package/theming/_elder-defaults.scss +3 -7
  43. package/theming/_elder-form.scss +308 -0
  44. package/theming/_elder-layout-system.scss +242 -0
  45. package/theming/_elder-m3-theme.scss +754 -0
  46. package/theming/_elder-mdc-support.scss +59 -142
  47. package/theming/_elder-scrollbar-theme.scss +2 -12
  48. package/theming/_elder-style-fixes.scss +46 -109
  49. package/theming/_elder-typography-utils.scss +0 -11
  50. package/theming/_mixins.scss +35 -0
  51. package/theming/_elder-palettes.scss +0 -148
  52. package/theming/_elder-theme.scss +0 -51
  53. package/theming/_elder-toast-theme.scss +0 -46
  54. package/theming/_mat-icon-button-size.scss +0 -34
@@ -6,46 +6,34 @@
6
6
  }
7
7
 
8
8
  @mixin _group-theme($theme) {
9
- $primary: map-get($theme, primary);
10
- $accent: map-get($theme, accent);
11
- $warn: map-get($theme, warn);
12
- $background: map-get($theme, background);
13
- $foreground: map-get($theme, foreground);
14
-
15
9
  .nav-group-button:hover {
16
- background-color: mat.m2-get-color-from-palette($primary, default, 0.1);
17
- transition: background 0.5s;
10
+ background-color: var(--md-sys-color-surface-container-high);
11
+ transition: background-color 0.5s;
18
12
  }
19
13
 
20
14
  .nav-group-button:not(.nav-group-button-open) {
21
15
  .mat-icon {
22
- color: mat.m2-get-color-from-palette($foreground, secondary-text);
16
+ color: var(--md-sys-color-on-surface);
23
17
  }
24
18
  }
25
19
 
26
20
  .nav-group-button-active {
27
- background-color: mat.m2-get-color-from-palette($primary, default, 0.15);
21
+ background-color: var(--md-sys-color-primary-fixed);
28
22
  }
29
23
 
30
24
  .nav-group-button-open {
31
25
  padding-left: 11px !important; // -5 to counter border-left
32
26
  .mat-icon {
33
- color: mat.m2-get-color-from-palette($primary);
27
+ color: var(--md-sys-color-primary);
34
28
  }
35
29
  }
36
30
  }
37
31
 
38
32
  @mixin _link-theme($theme) {
39
- $primary: map-get($theme, primary);
40
- $accent: map-get($theme, accent);
41
- $warn: map-get($theme, warn);
42
- $background: map-get($theme, background);
43
- $foreground: map-get($theme, foreground);
44
-
45
33
  .nav-link.nav-link-clickable {
46
34
  cursor: pointer;
47
35
  &:hover {
48
- background-color: mat.m2-get-color-from-palette($primary, default, 0.1);
36
+ background-color: var(--md-sys-color-surface-container-high);
49
37
  }
50
38
  }
51
39
 
@@ -54,21 +42,21 @@
54
42
  }
55
43
 
56
44
  .nav-link:hover {
57
- background-color: mat.m2-get-color-from-palette($primary, default, 0.05);
45
+ background-color: var(--md-sys-color-primary-fixed);
58
46
  }
59
47
 
60
48
  .nav-link.nav-link-active {
61
- background-color: mat.m2-get-color-from-palette($primary, default, 0.15);
62
- color: mat.m2-get-color-from-palette($primary);
49
+ background-color: var(--md-sys-color-primary-fixed);
50
+ color: var(--md-sys-color-on-primary-fixed);
63
51
  .mat-icon {
64
- color: mat.m2-get-color-from-palette($primary);
52
+ color: var(--md-sys-color-primary);
65
53
  }
66
54
  }
67
55
 
68
56
  .nav-link.nav-link-inactive {
69
- color: mat.m2-get-color-from-palette($foreground, text);
57
+ color: var(--md-sys-color-on-surface);
70
58
  .mat-icon {
71
- color: mat.m2-get-color-from-palette($foreground, secondary-text);
59
+ color: var(--md-sys-color-on-surface);
72
60
  }
73
61
  }
74
62
  }
@@ -3,8 +3,5 @@
3
3
  height: 250px;
4
4
  border-radius: 4px;
5
5
  overflow: hidden;
6
- box-shadow:
7
- 0 5px 5px -3px rgba(0, 0, 0, 0.2),
8
- 0 8px 10px 1px rgba(0, 0, 0, 0.14),
9
- 0 3px 14px 2px rgba(0, 0, 0, 0.12);
6
+ box-shadow: var(--mat-app-elevation-shadow-level-8);
10
7
  }
@@ -1,21 +1,12 @@
1
1
  @use '@angular/material' as mat;
2
2
 
3
3
  @mixin theme($theme) {
4
- $primary: map-get($theme, primary);
5
- $accent: map-get($theme, accent);
6
- $warn: map-get($theme, warn);
7
- $background: map-get($theme, background);
8
- $foreground: map-get($theme, foreground);
9
-
10
4
  .elder-card-panel {
11
- color: mat.m2-get-color-from-palette($foreground, text);
12
- background-color: mat.m2-get-color-from-palette($background, 'card');
5
+ color: var(--md-sys-color-on-surface);
6
+ background-color: var(--md-sys-color-surface);
13
7
 
14
8
  padding: 10px;
15
9
  border-radius: 4px;
16
- box-shadow:
17
- 0 5px 5px -3px rgba(0, 0, 0, 0.2),
18
- 0 8px 10px 1px rgba(0, 0, 0, 0.14),
19
- 0 3px 14px 2px rgba(0, 0, 0, 0.12);
10
+ box-shadow: var(--mat-app-elevation-shadow-level-8);
20
11
  }
21
12
  }
@@ -1,21 +1,13 @@
1
1
  @use '@angular/material' as mat;
2
2
 
3
3
  @mixin theme($theme) {
4
- $primary: map-get($theme, primary);
5
- $accent: map-get($theme, accent);
6
- $warn: map-get($theme, warn);
7
- $background: map-get($theme, background);
8
- $foreground: map-get($theme, foreground);
9
-
10
4
  .elder-dialog-panel {
11
- color: mat.m2-get-color-from-palette($foreground, text);
12
- background-color: mat.m2-get-color-from-palette($background, dialog);
5
+ // Use CSS variables for Material 3
6
+ background-color: var(--md-sys-color-surface);
7
+ color: var(--md-sys-color-on-surface);
13
8
 
14
9
  padding: 10px;
15
10
  border-radius: 4px;
16
- box-shadow:
17
- 0 5px 5px -3px rgba(0, 0, 0, 0.2),
18
- 0 8px 10px 1px rgba(0, 0, 0, 0.14),
19
- 0 3px 14px 2px rgba(0, 0, 0, 0.12);
11
+ box-shadow: var(--mat-app-elevation-shadow-level-8);
20
12
  }
21
13
  }
@@ -1,8 +1,13 @@
1
1
  @use '@angular/material' as mat;
2
2
 
3
- @mixin _elder-panel-color($palette) {
4
- background: mat.m2-get-color-from-palette($palette);
5
- color: mat.m2-get-color-from-palette($palette, default-contrast);
3
+ @mixin _elder-panel-color($palette, $theme) {
4
+ @if (mat.get-theme-version($theme) == 1) {
5
+ background: var(--md-sys-color-primary-container);
6
+ color: var(--md-sys-color-on-primary-container);
7
+ } @else {
8
+ $background: mat.m2-get-color-from-palette($palette, app-bar);
9
+ $foreground: mat.m2-get-color-from-palette($palette, text);
10
+ }
6
11
  }
7
12
 
8
13
  @mixin _elder-panel-form-field-overrides {
@@ -34,23 +39,29 @@
34
39
  $foreground: map-get($theme, foreground);
35
40
 
36
41
  .mat-panel {
37
- background: mat.m2-get-color-from-palette($background, app-bar);
38
- color: mat.m2-get-color-from-palette($foreground, text);
42
+ @if (mat.get-theme-version($theme) == 1) {
43
+ background: var(--md-sys-color-primary-container);
44
+ color: var(--md-sys-color-on-primary-container);
45
+ } @else {
46
+ background: mat.m2-get-color-from-palette($background, app-bar);
47
+ color: mat.m2-get-color-from-palette($foreground, text);
48
+ }
39
49
  transition: background 0.5s;
40
50
 
41
51
  &.mat-primary {
42
- @include _elder-panel-color($primary);
52
+ @include _elder-panel-color($primary, $theme);
43
53
  }
44
54
 
45
55
  &.mat-accent {
46
- @include _elder-panel-color($accent);
56
+ @include _elder-panel-color($accent, $theme);
47
57
  }
48
58
 
49
59
  &.mat-warn {
50
- @include _elder-panel-color($warn);
60
+ @include _elder-panel-color($warn, $theme);
51
61
  }
52
62
 
53
63
  @include _elder-panel-form-field-overrides;
64
+ @include elder-panel-typography($theme);
54
65
  }
55
66
  }
56
67
 
@@ -62,7 +73,13 @@
62
73
  .mat-panel h4,
63
74
  .mat-panel h5,
64
75
  .mat-panel h6 {
65
- @include mat.m2-typography-level($config, title);
76
+ // @include mat.m2-typography-level($config, title);
77
+ // margin: 0;
78
+
79
+ // Set typography styles for different heading levels
80
+ font-family: var(--mdc-typography-font-family); // Use the MDC font family variable
81
+
82
+ //@include mat.typography($config, headline-2); // try, debug disabled
66
83
  margin: 0;
67
84
  }
68
85
  }
@@ -1,14 +1,9 @@
1
1
  @use 'sass:map';
2
2
  @use '@angular/material' as mat;
3
3
  @use '../../../../theming/elder-typography-utils' as elder-typography;
4
- @use '../../../../theming/mat-icon-button-size' as icon-button-size;
5
4
 
6
5
  @mixin typography($typography-config) {
7
- $config: $typography-config; // TODO $typography-config
8
- // The unit-less line-height from the font config.
9
- $line-height: mat.m2-line-height($config, body-1);
10
- $font-size: mat.m2-font-size($config, body-1);
11
- $line-height-em: elder-typography.coerce-unitless-to-em($line-height);
6
+ $line-height-em: var(--md-sys-typescale-body-medium-line-height);
12
7
 
13
8
  $icon-size: 16px;
14
9
  $arrow-icon-size: 24px;
@@ -32,6 +27,3 @@
32
27
  font-size: $icon-size !important;
33
28
  }
34
29
  }
35
-
36
- @mixin color($color-config) {
37
- }
@@ -80,10 +80,7 @@
80
80
  .cdk-drag-preview {
81
81
  box-sizing: border-box;
82
82
  // border-radius: 4px;
83
- box-shadow:
84
- 0 5px 5px -3px rgba(0, 0, 0, 0.2),
85
- 0 8px 10px 1px rgba(0, 0, 0, 0.14),
86
- 0 3px 14px 2px rgba(0, 0, 0, 0.12);
83
+ box-shadow: var(--mat-app-elevation-shadow-level-8);
87
84
  }
88
85
 
89
86
  .cdk-drag-placeholder {
@@ -4,19 +4,13 @@
4
4
  @use '../../elder-select-base' as elder-select-base;
5
5
 
6
6
  @mixin typography($typography-config) {
7
- $config: $typography-config; // TODO $typography-config
8
- // The unit-less line-height from the font config.
9
- $line-height: mat.m2-line-height($config, body-1);
10
- $font-size: mat.m2-font-size($config, body-1);
11
- $line-height-em: elder-typography.coerce-unitless-to-em($line-height);
12
-
13
7
  @include elder-select-base.typography($typography-config);
14
8
 
15
9
  .elder-multi-select {
16
- font-family: mat.m2-font-family($config);
10
+ font-family: var(--md-sys-typescale-body-medium-font);
17
11
 
18
12
  .elder-select-input {
19
- height: $line-height-em;
13
+ height: var(--md-sys-typescale-body-medium-line-height);
20
14
  }
21
15
 
22
16
  .elder-prefix-icon {
@@ -40,39 +34,16 @@
40
34
  }
41
35
 
42
36
  @mixin theme($config-or-theme) {
43
- $color: mat.m2-get-color-config($config-or-theme);
44
- $typography: elder-typography.get-typography-config($config-or-theme);
45
-
46
- // If no actual typography configuration has been specified, create a default one.
47
- @if not $typography {
48
- $typography: mat.m2-define-typography-config();
49
- }
37
+ @include typography($config-or-theme);
50
38
 
51
- @if $color != null {
52
- @include elder-select-base.color($color);
53
- @include _chip_color($config-or-theme);
39
+ .elder-chip-text {
40
+ overflow: hidden;
41
+ text-overflow: ellipsis;
42
+ white-space: nowrap;
54
43
  }
55
44
 
56
- @if $typography != null {
57
- @include typography($typography);
45
+ .elder-trailing-icon {
46
+ color: var(--mdc-chip-with-trailing-icon-trailing-icon-color);
47
+ opacity: 0.54;
58
48
  }
59
49
  }
60
-
61
- @mixin _chip_color($theme) {
62
- $primary: map-get($theme, primary);
63
- $accent: map-get($theme, accent);
64
- $warn: map-get($theme, warn);
65
- $background: map-get($theme, background);
66
- $foreground: map-get($theme, foreground);
67
- }
68
-
69
- .elder-chip-text {
70
- overflow: hidden;
71
- text-overflow: ellipsis;
72
- white-space: nowrap;
73
- }
74
-
75
- .elder-trailing-icon {
76
- color: var(--mdc-chip-with-trailing-icon-trailing-icon-color);
77
- opacity: 0.54;
78
- }
@@ -4,19 +4,13 @@
4
4
  @use '../../elder-select-base' as elder-select-base;
5
5
 
6
6
  @mixin typography($typography-config) {
7
- $config: $typography-config; // TODO $typography-config
8
- // The unit-less line-height from the font config.
9
- $line-height: mat.m2-line-height($config, body-1);
10
- $font-size: mat.m2-font-size($config, body-1);
11
- $line-height-em: elder-typography.coerce-unitless-to-em($line-height);
12
-
13
7
  @include elder-select-base.typography($typography-config);
14
8
 
15
9
  .elder-multi-select {
16
- font-family: mat.m2-font-family($config);
10
+ font-family: var(--md-sys-typescale-body-medium-font);
17
11
 
18
12
  .elder-select-input {
19
- height: $line-height-em;
13
+ height: var(--md-sys-typescale-body-medium-line-height);
20
14
  }
21
15
 
22
16
  .elder-prefix-icon {
@@ -40,56 +34,29 @@
40
34
  }
41
35
 
42
36
  @mixin theme($config-or-theme) {
43
- $color: mat.m2-get-color-config($config-or-theme);
44
- $typography: elder-typography.get-typography-config($config-or-theme);
37
+ @include typography($config-or-theme);
45
38
 
46
- // If no actual typography configuration has been specified, create a default one.
47
- @if not $typography {
48
- $typography: mat.m2-define-typography-config();
39
+ .elder-chip-text {
40
+ overflow: hidden;
41
+ text-overflow: ellipsis;
42
+ white-space: nowrap;
49
43
  }
50
44
 
51
- @if $color != null {
52
- @include elder-select-base.color($color);
53
- @include _chip_color($config-or-theme);
45
+ .elder-trailing-icon {
46
+ color: var(--mdc-chip-with-trailing-icon-trailing-icon-color);
47
+ opacity: 0.54;
54
48
  }
55
49
 
56
- @if $typography != null {
57
- @include typography($typography);
50
+ .cdk-drag-preview {
51
+ box-sizing: border-box;
52
+ box-shadow: var(--mat-app-elevation-shadow-level-8);
58
53
  }
59
- }
60
-
61
- @mixin _chip_color($theme) {
62
- $primary: map-get($theme, primary);
63
- $accent: map-get($theme, accent);
64
- $warn: map-get($theme, warn);
65
- $background: map-get($theme, background);
66
- $foreground: map-get($theme, foreground);
67
- }
68
54
 
69
- .elder-chip-text {
70
- overflow: hidden;
71
- text-overflow: ellipsis;
72
- white-space: nowrap;
73
- }
74
-
75
- .elder-trailing-icon {
76
- color: var(--mdc-chip-with-trailing-icon-trailing-icon-color);
77
- opacity: 0.54;
78
- }
79
-
80
- .cdk-drag-preview {
81
- box-sizing: border-box;
82
- // border-radius: 4px;
83
- box-shadow:
84
- 0 5px 5px -3px rgba(0, 0, 0, 0.2),
85
- 0 8px 10px 1px rgba(0, 0, 0, 0.14),
86
- 0 3px 14px 2px rgba(0, 0, 0, 0.12);
87
- }
88
-
89
- .cdk-drag-placeholder {
90
- opacity: 0;
91
- }
55
+ .cdk-drag-placeholder {
56
+ opacity: 0;
57
+ }
92
58
 
93
- .cdk-drag-animating {
94
- transition: transform 250ms cubic-bezier(0, 0, 0.2, 1);
59
+ .cdk-drag-animating {
60
+ transition: transform 250ms cubic-bezier(0, 0, 0.2, 1);
61
+ }
95
62
  }
@@ -3,17 +3,13 @@
3
3
  @use '../../../../../../theming/elder-typography-utils' as elder-typography;
4
4
  @use '../../elder-select-base' as elder-select-base;
5
5
 
6
- @mixin typography($typography-config) {
7
- $config: $typography-config;
8
- // The unit-less line-height from the font config.
9
- $line-height: mat.m2-line-height($config, body-1);
10
- $font-size: mat.m2-font-size($config, body-1);
11
- $line-height-em: elder-typography.coerce-unitless-to-em($line-height);
6
+ @mixin typography($config-or-theme) {
7
+ $line-height-em: var(--md-sys-typescale-body-medium-line-height);
12
8
 
13
- @include elder-select-base.typography($typography-config);
9
+ @include elder-select-base.typography($config-or-theme);
14
10
 
15
11
  .elder-select {
16
- font-family: mat.m2-font-family($config);
12
+ font-family: var(--md-sys-typescale-body-medium-font);
17
13
 
18
14
  .elder-input-prefix-icon-container {
19
15
  padding-right: 3px;
@@ -31,45 +27,33 @@
31
27
  }
32
28
 
33
29
  @mixin theme($config-or-theme) {
34
- $color: mat.m2-get-color-config($config-or-theme);
35
- $typography: elder-typography.get-typography-config($config-or-theme);
30
+ // @debug mat.get-theme-typography($config-or-theme, body-medium, line-height);
31
+ // @debug mat.get-theme-typography($config-or-theme, body-medium, font-family);
32
+ @include typography($config-or-theme);
36
33
 
37
- // If no actual typography configuration has been specified, create a default one.
38
- @if not $typography {
39
- $typography: mat.m2-define-typography-config();
34
+ @keyframes shrink {
35
+ 0% {
36
+ transform: scale(1);
37
+ }
38
+ 100% {
39
+ transform: scale(0.75);
40
+ }
40
41
  }
41
42
 
42
- @if $color != null {
43
- @include elder-select-base.color($color);
43
+ .loading {
44
+ animation: shrink 0.3s ease-in-out infinite alternate;
45
+ -webkit-animation: shrink 0.3s ease-in-out infinite alternate;
44
46
  }
45
47
 
46
- @if $typography != null {
47
- @include typography($typography);
48
+ .clickable-icon {
49
+ cursor: pointer;
48
50
  }
49
- }
50
51
 
51
- @keyframes shrink {
52
- 0% {
53
- transform: scale(1);
52
+ .full-width {
53
+ width: 100%;
54
54
  }
55
- 100% {
56
- transform: scale(0.75);
57
- }
58
- }
59
-
60
- .loading {
61
- animation: shrink 0.3s ease-in-out infinite alternate;
62
- -webkit-animation: shrink 0.3s ease-in-out infinite alternate;
63
- }
64
-
65
- .clickable-icon {
66
- cursor: pointer;
67
- }
68
55
 
69
- .full-width {
70
- width: 100%;
71
- }
72
-
73
- .elder-select-dropdown-input {
74
- cursor: pointer;
56
+ .elder-select-dropdown-input {
57
+ cursor: pointer;
58
+ }
75
59
  }
@@ -3,9 +3,6 @@
3
3
  @use '../../../../theming/elder-typography-utils' as elder-typography;
4
4
 
5
5
  @mixin theme($config-or-theme) {
6
- $color: mat.m2-get-color-config($config-or-theme);
7
- $typography: mat.m2-get-typography-config($config-or-theme);
8
-
9
6
  @include _interval-form-field-sizing();
10
7
  @include _interval-form-field-color();
11
8
  }
@@ -0,0 +1,26 @@
1
+ @use '@angular/material' as mat;
2
+
3
+ /**
4
+ * Source: https://material.angular.io/guide/theming#using-component-color-variants
5
+ *
6
+ * This applies custom color variants for the legacy M2 color system for usage in M3.
7
+ * There are different mixins for many components (not all).
8
+ * You can find the list of the components and there supported color variants here:
9
+ * https://material.angular.io/guide/theming#using-component-color-variants
10
+ */
11
+ @mixin elder-color-variants($theme) {
12
+ // Apply primary color variants for button components
13
+ mat-chip-option[color='primary'] {
14
+ @include mat.chips-color($theme, $color-variant: primary);
15
+ }
16
+
17
+ // Apply secondary color variants for button components
18
+ mat-chip-option[color='danger'] {
19
+ @include mat.chips-color($theme, $color-variant: error);
20
+ }
21
+
22
+ // Apply tertiary color variants for button components
23
+ mat-chip-option[color='accent'] {
24
+ @include mat.chips-color($theme, $color-variant: tertiary);
25
+ }
26
+ }