@elderbyte/ngx-starter 19.6.3 → 19.7.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.
@@ -48,6 +48,9 @@ export declare class ElderBadgeComponent {
48
48
  readonly templates$: Observable<TemplateWrapper>;
49
49
  private readonly chipTemplate$;
50
50
  private readonly chipAvatarTemplate$;
51
+ /**
52
+ * @deprecated No longer supported - has no effect
53
+ */
51
54
  appearance: ElderChipAppearance;
52
55
  /***************************************************************************
53
56
  * *
@@ -1,57 +1,36 @@
1
- import { OnInit } from '@angular/core';
2
- import { MatChip } from '@angular/material/chips';
3
1
  import { ThemePalette } from '@angular/material/core';
4
2
  import * as i0 from "@angular/core";
5
- export type ElderStateColor = undefined | 'open' | 'inProgress' | 'completed' | 'warn' | 'error' | 'other';
6
- export type ElderLevelColor = undefined | 'low' | 'medium' | 'high' | 'critical';
3
+ export declare const elderChipColorNames: readonly ["white", "grey", "blue", "turquoise", "green", "orange", "yellow", "red", "purple", "pink"];
4
+ export type ElderNamedColor = (typeof elderChipColorNames)[number] | undefined;
5
+ export declare const elderChipColorStates: readonly ["open", "inProgress", "completed", "warn", "error", "other"];
6
+ export type ElderStateColor = (typeof elderChipColorStates)[number] | undefined;
7
+ export declare const elderChipColorLevels: readonly ["low", "medium", "high", "critical"];
8
+ export type ElderLevelColor = (typeof elderChipColorLevels)[number] | undefined;
7
9
  export type ElderChipAppearance = 'md3' | 'legacy';
8
- export declare class ElderChipLabelDirective implements OnInit {
9
- private readonly matChip;
10
+ export declare class ElderChipLabelDirective {
10
11
  /***************************************************************************
11
12
  * *
12
13
  * Fields *
13
14
  * *
14
15
  **************************************************************************/
15
16
  private readonly baseClass;
16
- private cssClasses;
17
- private _appearance;
18
- private _stateColor;
19
- private _themeColor;
20
- private _levelColor;
21
- /***************************************************************************
22
- * *
23
- * Constructor *
24
- * *
25
- **************************************************************************/
26
- constructor(matChip: MatChip);
27
- ngOnInit(): void;
28
- /***************************************************************************
29
- * *
30
- * Host Bindings *
31
- * *
32
- **************************************************************************/
33
- get classes(): string;
34
- /***************************************************************************
35
- * *
36
- * Properties *
37
- * *
38
- **************************************************************************/
39
- set appearance(appearance: ElderChipAppearance);
40
- set themeColor(themeColor: ThemePalette);
41
- set stateColor(stateColor: ElderStateColor);
42
- set levelColor(levelColor: ElderLevelColor);
17
+ readonly stateColor: import("@angular/core").InputSignal<ElderStateColor>;
18
+ readonly levelColor: import("@angular/core").InputSignal<ElderLevelColor>;
19
+ readonly namedColor: import("@angular/core").InputSignal<ElderNamedColor>;
20
+ readonly themeColor: import("@angular/core").InputSignal<ThemePalette>;
21
+ readonly cssClasses: import("@angular/core").Signal<string>;
43
22
  /***************************************************************************
44
23
  * *
45
24
  * Private methods *
46
25
  * *
47
26
  **************************************************************************/
48
- private refreshClasses;
49
27
  private buildClassesString;
50
28
  private buildClasses;
51
29
  private resolveColorClass;
30
+ private getNamedColorClass;
52
31
  private getLevelColorClass;
53
32
  private getStateColorClass;
54
33
  private getThemeColorClass;
55
- static ɵfac: i0.ɵɵFactoryDeclaration<ElderChipLabelDirective, [{ optional: true; host: true; }]>;
56
- static ɵdir: i0.ɵɵDirectiveDeclaration<ElderChipLabelDirective, "[elderChipLabel]", never, { "appearance": { "alias": "appearance"; "required": false; }; "themeColor": { "alias": "color"; "required": false; }; "stateColor": { "alias": "stateColor"; "required": false; }; "levelColor": { "alias": "levelColor"; "required": false; }; }, {}, never, never, true, never>;
34
+ static ɵfac: i0.ɵɵFactoryDeclaration<ElderChipLabelDirective, never>;
35
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ElderChipLabelDirective, "[elderChipLabel]", never, { "stateColor": { "alias": "stateColor"; "required": false; "isSignal": true; }; "levelColor": { "alias": "levelColor"; "required": false; "isSignal": true; }; "namedColor": { "alias": "namedColor"; "required": false; "isSignal": true; }; "themeColor": { "alias": "color"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
57
36
  }
@@ -4,7 +4,7 @@ import * as i2 from "@ngx-translate/core";
4
4
  import * as i3 from "@angular/material/chips";
5
5
  import * as i4 from "@angular/cdk/a11y";
6
6
  import * as i5 from "./elder-chip-label.directive";
7
- export { ElderChipLabelDirective } from './elder-chip-label.directive';
7
+ export { ElderChipLabelDirective, elderChipColorStates, elderChipColorLevels, elderChipColorNames, } from './elder-chip-label.directive';
8
8
  export declare class ElderChipsModule {
9
9
  static ɵfac: i0.ɵɵFactoryDeclaration<ElderChipsModule, never>;
10
10
  static ɵmod: i0.ɵɵNgModuleDeclaration<ElderChipsModule, never, [typeof i1.CommonModule, typeof i2.TranslateModule, typeof i3.MatChipsModule, typeof i4.A11yModule, typeof i5.ElderChipLabelDirective], [typeof i5.ElderChipLabelDirective]>;
@@ -1,5 +1,5 @@
1
1
  import { ThemePalette } from '@angular/material/core';
2
- import { ElderLevelColor, ElderStateColor } from '../../../chips/elder-chip-label.directive';
2
+ import { ElderLevelColor, ElderNamedColor, ElderStateColor } from '../../../chips/elder-chip-label.directive';
3
3
  export declare class SelectChipSpecUtil {
4
4
  static readonly DefaultChipSpec: SelectChipSpec;
5
5
  }
@@ -13,6 +13,7 @@ export interface ChipColorSpec {
13
13
  themeColor?: ThemePalette;
14
14
  stateColor?: ElderStateColor;
15
15
  levelColor?: ElderLevelColor;
16
+ namedColor?: ElderNamedColor;
16
17
  }
17
18
  export interface ChipAvatarSpec {
18
19
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elderbyte/ngx-starter",
3
- "version": "19.6.3",
3
+ "version": "19.7.0",
4
4
  "peerDependencies": {
5
5
  "@angular/core": "^18.0.0 || ^19.0.0",
6
6
  "@angular/common": "^18.0.0 || ^19.0.0",
@@ -1,16 +1,17 @@
1
1
  $elder-tile-padding: 8px;
2
2
 
3
3
  .elder-grid-tile {
4
- // margin: 0 $elder-tile-padding;
5
4
  width: 100%;
6
5
  height: 100%;
7
6
  cursor: pointer;
7
+ overflow: hidden;
8
8
  }
9
9
 
10
10
  .elder-grid-tile-row {
11
11
  display: grid;
12
12
  align-items: start;
13
13
  justify-items: start;
14
+ overflow: hidden;
14
15
 
15
16
  padding: $elder-tile-padding ($elder-tile-padding * 2);
16
17
 
@@ -3,22 +3,16 @@
3
3
  background-color: var(--md-sys-color-surface-container-low);
4
4
  text-align: left;
5
5
  overflow: hidden;
6
- transition:
7
- box-shadow 200ms cubic-bezier(0, 0, 0.2, 1),
8
- border 0.25s linear;
9
6
  }
10
7
 
11
8
  .elder-tile:hover {
12
- //border-color: rgba(var(--md-sys-color-primary), 0.75);
13
- border-color: var(--md-sys-color-primary);
9
+ border-color: var(--elder-color-highlight-hover);
14
10
  }
15
11
 
16
12
  .elder-tile-content {
17
13
  position: relative;
18
14
  width: 100%;
19
15
  height: 100%;
20
-
21
- border-radius: var(--elder-pane-border-radius);
22
16
  }
23
17
 
24
18
  .elder-tile-content:hover .elder-selection-overlay {
@@ -26,11 +20,6 @@
26
20
  background-color: rgba(white, 0.08);
27
21
  }
28
22
 
29
- .elder-tile:active {
30
- z-index: 100;
31
- box-shadow: var(--elder-box-shadow-default);
32
- }
33
-
34
23
  .elder-selection-overlay {
35
24
  position: absolute;
36
25
  left: 0;
@@ -87,7 +76,8 @@
87
76
  // Disable browser focus style
88
77
  // box-shadow: color-mix(in rgb, 80%, black);
89
78
  //background-color: color-mix(in sRGB, var(--elder-color-highlight-strong) 80%, black)
90
- outline: 2px solid var(--elder-color-highlight-focus);
79
+ border: 2px solid var(--elder-color-highlight-focus);
80
+ outline: none;
91
81
 
92
82
  // background-color: var(--elder-color-highlight-strong);
93
83
  }
@@ -96,13 +86,13 @@
96
86
  // Disable browser focus style
97
87
  // box-shadow: color-mix(in rgb, 80%, black);
98
88
  //background-color: color-mix(in sRGB, var(--elder-color-highlight-strong) 80%, black)
99
- outline: 2px solid var(--elder-color-highlight-focus);
89
+ border: 2px solid var(--elder-color-highlight-focus);
100
90
  // background-color: var(--elder-color-highlight-strong);
101
91
  }
102
92
 
103
93
  .elder-tile.activated {
104
94
  // background-color: var(--elder-color-highlight-strong);
105
- outline: 2px dashed var(--elder-color-highlight-focus);
95
+ border: 2px dashed var(--elder-color-highlight-focus);
106
96
  .elder-tile-overlay {
107
97
  // opacity: 1;
108
98
  // background-color: color-mix(in sRGB, var(--elder-color-highlight-strong), transparent 70%);
@@ -124,11 +124,8 @@
124
124
  --elder-color-highlight-light: #ebebeb;
125
125
  --elder-color-highlight-variant: var(--md-sys-color-secondary-fixed);
126
126
 
127
- --elder-color-highlight-focus: color-mix(
128
- in sRGB,
129
- var(--elder-color-highlight-strong) 80%,
130
- black
131
- );
127
+ --elder-color-highlight-focus: var(--md-sys-color-primary);
128
+ --elder-color-highlight-hover: color-mix(in sRGB, var(--md-sys-color-primary) 60%, white);
132
129
 
133
130
  // missing md3 color
134
131
  --md-sys-color-on-primary-fixed-dim: var(--md-sys-color-on-primary-fixed);
@@ -169,24 +166,23 @@
169
166
 
170
167
  // chip colors light
171
168
  &.elder-light-theme {
172
- --elder-chip-color-state-none: #{map.get(config.$chip-colors, state-none)};
173
- --elder-chip-color-state-open: #{map.get(config.$chip-colors, state-open)};
174
- --elder-chip-color-state-in-progress: #{map.get(config.$chip-colors, state-in-progress)};
175
- --elder-chip-color-state-completed: #{map.get(config.$chip-colors, state-completed)};
176
- --elder-chip-color-state-warn: #{map.get(config.$chip-colors, state-warn)};
177
- --elder-chip-color-state-error: #{map.get(config.$chip-colors, state-error)};
178
- --elder-chip-color-state-other: #{map.get(config.$chip-colors, state-other)};
169
+ // Base colors
170
+ @each $key, $value in config.$named-colors {
171
+ --elder-named-color-#{$key}: #{$value};
172
+ }
173
+
174
+ // "on" (darker) variants
175
+ @each $key, $value in config.$named-colors-darker {
176
+ --elder-named-color-on-#{$key}: #{$value};
177
+ }
179
178
  }
180
179
 
181
180
  // chip colors dark
182
181
  &.elder-dark-theme {
183
- --elder-chip-color-state-none: #{map.get(config.$chip-colors-dark, state-none)};
184
- --elder-chip-color-state-open: #{map.get(config.$chip-colors-dark, state-open)};
185
- --elder-chip-color-state-in-progress: #{map.get(config.$chip-colors-dark, state-in-progress)};
186
- --elder-chip-color-state-completed: #{map.get(config.$chip-colors-dark, state-completed)};
187
- --elder-chip-color-state-warn: #{map.get(config.$chip-colors-dark, state-warn)};
188
- --elder-chip-color-state-error: #{map.get(config.$chip-colors-dark, state-error)};
189
- --elder-chip-color-state-other: #{map.get(config.$chip-colors-dark, state-other)};
182
+ // Base colors
183
+ @each $key, $value in config.$named-colors-darker {
184
+ --elder-named-color-#{$key}: #{$value};
185
+ }
190
186
  }
191
187
 
192
188
  &.elder-dark-theme {
@@ -196,7 +192,7 @@
196
192
 
197
193
  &.elder-dark-theme {
198
194
  // dark theme blue
199
- --md-sys-color-primary: hsl(222, 45%, 74%); // dim primary color
195
+ --md-sys-color-primary: hsl(222, 50%, 65%); // dim primary color
200
196
  }
201
197
 
202
198
  // dark theme overwrites
@@ -208,12 +204,6 @@
208
204
  --elder-color-highlight-strong: var(--elder-gold-semi-dark);
209
205
  --elder-color-highlight-variant: var(--elder-gold-dark);
210
206
 
211
- --elder-color-highlight-focus: color-mix(
212
- in sRGB,
213
- var(--elder-color-highlight-strong) 70%,
214
- white
215
- );
216
-
217
207
  --md-sys-color-tertiary-container: var(--elder-gold-semi-dark);
218
208
  --md-sys-color-surface-container-highest: #181818;
219
209
  --md-sys-color-surface-container: #1e1f20;
@@ -34,25 +34,24 @@ $custom-colors: (
34
34
  elder-gold-light: #f0e9d8,
35
35
  );
36
36
 
37
- $chip-colors: (
38
- state-none: #e1e1e1,
39
- state-open: #cecbca,
40
- state-in-progress: #bdd5e7,
41
- state-completed: #b1ddce,
42
- state-warn: #f4dab8,
43
- state-error: #e6b6b6,
44
- state-other: #cdc7e5,
37
+ $named-colors: (
38
+ 'white': #e1e1e1,
39
+ 'grey': #cecbca,
40
+ 'blue': #bddcf3,
41
+ 'turquoise': #b0e6ef,
42
+ 'green': #b1ddce,
43
+ 'orange': #f4dab8,
44
+ 'yellow': #f3e7ad,
45
+ 'red': #e6b6b6,
46
+ 'purple': #cdc7e5,
47
+ 'pink': #eec2ea,
45
48
  );
46
49
 
47
- $chip-colors-dark: (
48
- state-none: color.adjust(map.get($chip-colors, state-none), $lightness: -45%),
49
- state-open: color.adjust(map.get($chip-colors, state-open), $lightness: -45%),
50
- state-in-progress: color.adjust(map.get($chip-colors, state-in-progress), $lightness: -45%),
51
- state-completed: color.adjust(map.get($chip-colors, state-completed), $lightness: -45%),
52
- state-warn: color.adjust(map.get($chip-colors, state-warn), $lightness: -45%),
53
- state-error: color.adjust(map.get($chip-colors, state-error), $lightness: -45%),
54
- state-other: color.adjust(map.get($chip-colors, state-other), $lightness: -45%),
55
- );
50
+ $named-colors-darker: ();
51
+ @each $key, $value in $named-colors {
52
+ $darkened: color.adjust($value, $lightness: -45%);
53
+ $named-colors-darker: map.set($named-colors-darker, $key, $darkened);
54
+ }
56
55
 
57
56
  $palettes: (
58
57
  primary: (
@@ -2,9 +2,11 @@
2
2
  @use 'sass:color';
3
3
  @use '@angular/material' as mat;
4
4
  @use '../abstracts/elder-scss-variables' as config;
5
+ @use 'sass:string';
5
6
 
6
7
  @mixin theme($config-or-theme) {
7
8
  @include mat-chip-fixes();
9
+ @include chip-theme-palette-colors();
8
10
  @include chip-colors();
9
11
 
10
12
  .elder-chip-text {
@@ -97,107 +99,25 @@
97
99
  );
98
100
  }
99
101
 
100
- @mixin chip-colors {
101
- $colorStateNone: var(--elder-chip-color-state-none);
102
- // $colorStateNone: transparent;
103
- $colorStateOpen: var(--elder-chip-color-state-open);
104
-
105
- $colorStateInProgress: var(--elder-chip-color-state-in-progress);
106
- $colorStateCompleted: var(--elder-chip-color-state-completed);
107
- $colorStateWarn: var(--elder-chip-color-state-warn);
108
- $colorStateError: var(--elder-chip-color-state-error);
109
- $colorStateOther: var(--elder-chip-color-state-other);
110
-
111
- $level-low: $colorStateCompleted;
112
- $level-medium: $colorStateInProgress;
113
- $level-high: $colorStateWarn;
114
- $level-critical: $colorStateError;
115
-
116
- // light theme elder progress chip colors
117
- $colorStateNoneLightContent: map.get(config.$chip-colors-dark, state-none);
118
- $colorStateOpenLightContent: map.get(config.$chip-colors-dark, state-open);
119
- $colorStateInProgressLightContent: map.get(config.$chip-colors-dark, state-in-progress);
120
- $colorStateCompletedLightContent: map.get(config.$chip-colors-dark, state-completed);
121
- $colorStateWarnLightContent: map.get(config.$chip-colors-dark, state-warn);
122
- $colorStateErrorLightContent: map.get(config.$chip-colors-dark, state-error);
123
- $colorStateOtherLightContent: map.get(config.$chip-colors-dark, state-other);
124
-
125
- // map to level colors
126
- $levelLowLightContent: $colorStateCompletedLightContent;
127
- $levelMediumLightContent: $colorStateInProgressLightContent;
128
- $levelHighLightContent: $colorStateWarnLightContent;
129
- $levelCriticalLightContent: $colorStateErrorLightContent;
130
-
131
- .mat-mdc-chip.mat-mdc-chip {
132
- &.elder-chip-state-none {
133
- background-color: $colorStateNone;
134
- }
135
-
136
- &.elder-chip-state-open,
137
- &.state-open {
138
- background-color: $colorStateOpen;
139
- }
140
-
141
- &.elder-chip-state-in-progress,
142
- &.state-in-progress {
143
- background-color: $colorStateInProgress;
144
- }
145
-
146
- &.elder-chip-state-completed,
147
- &.state-completed {
148
- background-color: $colorStateCompleted;
149
- }
150
-
151
- &.elder-chip-state-warn,
152
- &.state-warn {
153
- background-color: $colorStateWarn;
154
- }
155
-
156
- &.elder-chip-state-error,
157
- &.state-error {
158
- background-color: $colorStateError;
159
- }
160
-
161
- &.elder-chip-state-other,
162
- &.state-other {
163
- background-color: $colorStateOther;
164
- }
165
-
166
- // ---
167
-
168
- &.elder-chip-level-low,
169
- &.level-low {
170
- background-color: $level-low;
171
- }
172
- &.elder-chip-level-medium,
173
- &.level-medium {
174
- background-color: $level-medium;
175
- }
176
- &.elder-chip-level-high,
177
- &.level-high {
178
- background-color: $level-high;
179
- }
180
- &.elder-chip-level-critical,
181
- &.level-critical {
182
- background-color: $level-critical;
183
- }
184
- }
185
-
102
+ @mixin chip-theme-palette-colors {
186
103
  &.elder-light-theme .mat-mdc-chip.mat-mdc-chip {
187
104
  &.mat-mdc-chip-highlighted {
188
105
  $col: map.get(config.$palettes, primary, 30);
189
106
  @include standard-chip-content-color-variant($col);
190
107
  }
108
+
191
109
  &.color-primary,
192
110
  &[color='primary'] {
193
111
  $col: map.get(config.$palettes, primary, 30);
194
112
  @include standard-chip-content-color-variant($col);
195
113
  }
114
+
196
115
  &.color-accent,
197
116
  &[color='accent'] {
198
117
  $col: map.get(config.$palettes, tertiary, 40);
199
118
  @include standard-chip-content-color-variant($col);
200
119
  }
120
+
201
121
  &.color-warn,
202
122
  &[color='warn'] {
203
123
  $col: map.get(config.$palettes, error, 40);
@@ -215,89 +135,107 @@
215
135
  $col: map.get(config.$palettes, primary, 50);
216
136
  @include standard-chip-content-color-variant($col);
217
137
  }
138
+
218
139
  &.color-accent,
219
140
  &[color='accent'] {
220
141
  $col: map.get(config.$palettes, tertiary, 50);
221
142
  @include standard-chip-content-color-variant($col);
222
143
  }
144
+
223
145
  &.color-warn,
224
146
  &[color='warn'] {
225
147
  $col: map.get(config.$palettes, error, 50);
226
148
  @include standard-chip-content-color-variant($col);
227
149
  }
228
150
  }
151
+ }
229
152
 
230
- &.elder-light-theme .mat-mdc-chip.mat-mdc-chip {
231
- &.elder-chip-state-none,
232
- &.none {
233
- @include chip-content-color-variant($colorStateNoneLightContent); // TODO
234
- &.mat-mdc-chip-highlighted {
235
- background-color: $colorStateNone;
236
- }
237
- }
153
+ @mixin chip-colors {
154
+ $namedColors: ();
155
+ @each $key, $value in config.$named-colors {
156
+ $namedColors: map.set($namedColors, $key, $key);
157
+ }
238
158
 
239
- &.elder-chip-state-open,
240
- &.state-open {
241
- @include chip-content-color-variant($colorStateOpenLightContent);
242
- }
159
+ // State colors and light content colors
160
+ $states: (
161
+ none: 'white',
162
+ open: 'grey',
163
+ inProgress: 'blue',
164
+ completed: 'green',
165
+ warn: 'orange',
166
+ error: 'red',
167
+ other: 'purple',
168
+ );
243
169
 
244
- &.elder-chip-state-in-progress,
245
- &.state-in-progress {
246
- @include chip-content-color-variant($colorStateInProgressLightContent);
247
- }
170
+ // Level color mapping
171
+ $levels: (
172
+ low: 'green',
173
+ medium: 'blue',
174
+ high: 'orange',
175
+ critical: 'red',
176
+ );
248
177
 
249
- &.elder-chip-state-completed,
250
- &.state-completed {
251
- @include chip-content-color-variant($colorStateCompletedLightContent);
178
+ // Apply background colors for states and levels
179
+ .mat-mdc-chip.elder-chip-label {
180
+ @each $state, $color in $states {
181
+ &.state-#{$state} {
182
+ background-color: var(--elder-named-color-#{$color});
183
+ }
252
184
  }
253
185
 
254
- &.elder-chip-state-warn,
255
- &.state-warn {
256
- @include chip-content-color-variant($colorStateWarnLightContent);
186
+ @each $level, $color in $levels {
187
+ &.level-#{$level} {
188
+ background-color: var(--elder-named-color-#{$color});
189
+ }
257
190
  }
258
191
 
259
- &.elder-chip-state-error,
260
- &.state-error {
261
- @include chip-content-color-variant($colorStateErrorLightContent);
192
+ @each $name, $color in $namedColors {
193
+ &.named-color-#{$name} {
194
+ background-color: var(--elder-named-color-#{$name});
195
+ }
262
196
  }
197
+ }
263
198
 
264
- &.elder-chip-state-other,
265
- &.state-other {
266
- @include chip-content-color-variant($colorStateOtherLightContent);
199
+ // Light theme chip content color handling
200
+ &.elder-light-theme .mat-mdc-chip.elder-chip-label {
201
+ @each $state, $color in $states {
202
+ &.state-#{$state} {
203
+ $on-color: var(--elder-named-color-on-#{$color});
204
+ @include chip-content-color-variant($on-color);
205
+ }
267
206
  }
268
207
 
269
- // level -------------
270
-
271
- &.elder-chip-level-low,
272
- &.level-low {
273
- @include chip-content-color-variant($levelLowLightContent);
274
- }
275
- &.elder-chip-level-medium,
276
- &.level-medium {
277
- @include chip-content-color-variant($levelMediumLightContent);
278
- }
279
- &.elder-chip-level-high,
280
- &.level-high {
281
- @include chip-content-color-variant($levelHighLightContent);
208
+ @each $level, $color in $levels {
209
+ &.level-#{$level} {
210
+ $on-color: var(--elder-named-color-on-#{$color});
211
+ @include chip-content-color-variant($on-color);
212
+ }
282
213
  }
283
- &.elder-chip-level-critical,
284
- &.level-critical {
285
- @include chip-content-color-variant($levelCriticalLightContent);
214
+
215
+ @each $name, $color in $namedColors {
216
+ &.named-color-#{$name} {
217
+ $on-color: var(--elder-named-color-on-#{$color});
218
+ @include chip-content-color-variant($on-color);
219
+ }
286
220
  }
287
221
  }
288
222
  }
289
223
 
290
- @mixin chip-content-color-variant($color, $inverse: false) {
291
- $color-dark: color.adjust($color, $lightness: -12%);
292
- @if $inverse {
293
- $color-dark: color.adjust($color, $lightness: 12%);
294
- }
224
+ @mixin chip-content-color-variant($on-color) {
225
+ $on-color-disabled: string.unquote('color-mix(in srgb, #FFF 12%, #{$on-color})');
295
226
  @include mat.chips-overrides(
296
227
  (
297
- outline-color: $color,
298
- label-text-color: $color-dark,
299
- with-icon-icon-color: $color-dark,
300
- with-trailing-icon-trailing-icon-color: $color-dark,
228
+ outline-color: $on-color,
229
+ label-text-color: $on-color,
230
+ with-icon-icon-color: $on-color,
231
+ selected-trailing-icon-color: $on-color,
232
+ with-trailing-icon-trailing-icon-color: $on-color,
233
+
234
+ // disabled-outline-color: $color-disabled,
235
+ disabled-label-text-color: $on-color-disabled,
236
+ with-icon-disabled-icon-color: $on-color-disabled,
237
+ with-trailing-icon-disabled-trailing-icon-color: $on-color-disabled,
238
+ selected-disabled-trailing-icon-color: $on-color-disabled,
301
239
  )
302
240
  );
303
241
  }