@elderbyte/ngx-starter 19.6.3 → 19.8.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.
- package/fesm2022/elderbyte-ngx-starter.mjs +1280 -1213
- package/fesm2022/elderbyte-ngx-starter.mjs.map +1 -1
- package/lib/common/enums/elder-enum-translation.service.d.ts +20 -1
- package/lib/components/badge/elder-badge/elder-badge.component.d.ts +3 -0
- package/lib/components/chips/elder-chip-label.directive.d.ts +14 -36
- package/lib/components/chips/elder-chips.module.d.ts +1 -1
- package/lib/components/colors/named/named-color-select-value/named-color-select-value.component.d.ts +9 -0
- package/lib/components/colors/named/named-color-select.directive.d.ts +9 -0
- package/lib/components/colors/named/named-color.d.ts +5 -0
- package/lib/components/colors/named/named-color.directive.d.ts +14 -0
- package/lib/components/colors/named/public_api.d.ts +4 -0
- package/lib/components/colors/public_api.d.ts +1 -0
- package/lib/components/public_api.d.ts +1 -0
- package/lib/components/select/multi/elder-multi-select-chips/select-chip-spec.d.ts +2 -0
- package/package.json +1 -1
- package/src/assets/i18n/de.json +17 -0
- package/src/assets/i18n/en.json +17 -0
- package/src/assets/i18n/fr.json +17 -0
- package/src/lib/components/colors/named/named-color-select-value/named-color-select-value.component.scss +0 -0
- package/src/lib/components/data-view/grid/elder-grid/elder-grid.component.scss +2 -1
- package/src/lib/components/data-view/grid/elder-tile/elder-tile.component.scss +5 -15
- package/theming/abstracts/_elder-design-tokens.scss +18 -26
- package/theming/abstracts/_elder-scss-variables.scss +16 -17
- package/theming/components/_elder-chip-theme.scss +77 -139
|
@@ -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
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
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
|
-
|
|
240
|
-
|
|
241
|
-
|
|
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
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
170
|
+
// Level color mapping
|
|
171
|
+
$levels: (
|
|
172
|
+
low: 'green',
|
|
173
|
+
medium: 'blue',
|
|
174
|
+
high: 'orange',
|
|
175
|
+
critical: 'red',
|
|
176
|
+
);
|
|
248
177
|
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
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
|
-
|
|
255
|
-
|
|
256
|
-
|
|
186
|
+
@each $level, $color in $levels {
|
|
187
|
+
&.level-#{$level} {
|
|
188
|
+
background-color: var(--elder-named-color-#{$color});
|
|
189
|
+
}
|
|
257
190
|
}
|
|
258
191
|
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
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
|
-
|
|
265
|
-
|
|
266
|
-
|
|
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
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
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
|
-
|
|
284
|
-
|
|
285
|
-
|
|
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
|
|
291
|
-
$color-
|
|
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
|
|
299
|
-
with-icon-icon-color: $color
|
|
300
|
-
|
|
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
|
}
|