@elderbyte/ngx-starter 19.0.2 → 19.1.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 (69) hide show
  1. package/_index.scss +2 -70
  2. package/fesm2022/elderbyte-ngx-starter.mjs +786 -197
  3. package/fesm2022/elderbyte-ngx-starter.mjs.map +1 -1
  4. package/lib/components/layout/pane/pane.component.d.ts +6 -0
  5. package/lib/components/layout/pane-container/pane-container.component.d.ts +11 -0
  6. package/lib/components/layout/public_api.d.ts +2 -0
  7. package/lib/components/m3-sidenav/m3-sidenav.component.d.ts +5 -0
  8. package/lib/components/public_api.d.ts +2 -0
  9. package/lib/components/style-debugger/style-debugger.component.d.ts +40 -0
  10. package/package.json +1 -1
  11. package/src/lib/components/badge/elder-badge/elder-badge.component.scss +2 -2
  12. package/src/lib/components/button-group/elder-button-group/elder-button-group.component.scss +18 -28
  13. package/src/lib/components/card-organizer/card-stack/elder-card-stack.component.scss +9 -36
  14. package/src/lib/components/cards/elder-card/elder-card.component.scss +0 -20
  15. package/src/lib/components/chips/_elder-chip-theme.scss +63 -56
  16. package/src/lib/components/data-transfer/http-data-transfer-indicator/http-data-transfer-indicator.component.scss +1 -7
  17. package/src/lib/components/data-transfer/http-data-transfer-overview/http-data-transfer-overview.component.scss +11 -0
  18. package/src/lib/components/data-view/common/data-context-state-indicator/data-context-state-indicator.component.scss +2 -1
  19. package/src/lib/components/data-view/grid/elder-grid/elder-grid.component.scss +16 -26
  20. package/src/lib/components/data-view/table/elder-table/elder-table.component.scss +100 -92
  21. package/src/lib/components/errors/exception-detail/elder-exception-detail.component.scss +0 -24
  22. package/src/lib/components/expand-toggle-button/elder-expand-toggle-button.component.scss +7 -17
  23. package/src/lib/components/files/blob-viewer/elder-blob-viewer.component.scss +4 -10
  24. package/src/lib/components/files/drag-n-drop/elder-drop-zone/elder-drop-zone.component.scss +23 -34
  25. package/src/lib/components/forms/search/search-box/elder-search-box.component.scss +0 -5
  26. package/src/lib/components/graph/elder-progress-bar/elder-progress-bar.component.scss +0 -1
  27. package/src/lib/components/iframes/iframe-host/iframe-host.component.scss +0 -6
  28. package/src/lib/components/navigation/bread-crumbs/bread-crumbs/elder-bread-crumbs.component.scss +2 -0
  29. package/src/lib/components/navigation/nav/_elder-nav-theme.scss +16 -24
  30. package/src/lib/components/navigation/nav/nav-group/elder-nav-group.component.scss +1 -1
  31. package/src/lib/components/navigation/nav/nav-link/elder-nav-link.component.scss +4 -6
  32. package/src/lib/components/page/exit-guard/page-exit-lock-indicator/page-exit-lock-indicator.component.scss +2 -5
  33. package/src/lib/components/panels/card-panel/elder-card-panel.component.scss +6 -19
  34. package/src/lib/components/panels/elder-dialog-panel/elder-dialog-panel.component.scss +6 -19
  35. package/src/lib/components/select/_elder-select-base.scss +1 -10
  36. package/src/lib/components/select/filter/elder-filter-chip-template/elder-filter-chip-template.component.scss +4 -22
  37. package/src/lib/components/select/multi/elder-multi-select-chip-options/elder-multi-select-chip-options.component.scss +10 -40
  38. package/src/lib/components/select/multi/elder-multi-select-chips/elder-multi-select-chips.component.scss +18 -53
  39. package/src/lib/components/select/single/elder-select/elder-select.component.scss +24 -41
  40. package/src/lib/components/select-chip-list/chip-list-select/elder-chip-list-select.component.scss +2 -8
  41. package/src/lib/components/shell/header/elder-app-header/elder-app-header.component.scss +11 -2
  42. package/src/lib/components/shell/shell/elder-shell.component.scss +8 -0
  43. package/src/lib/components/toasts/standard-toast/standard-toast.component.scss +22 -2
  44. package/theming/style-tweaks/_elder-color-variants.scss +31 -0
  45. package/theming/style-tweaks/_elder-common.scss +179 -0
  46. package/theming/style-tweaks/_elder-component-themes.scss +22 -0
  47. package/theming/style-tweaks/_elder-form.scss +368 -0
  48. package/theming/style-tweaks/_elder-reset.scss +13 -0
  49. package/theming/style-tweaks/_elder-style-fixes.scss +377 -0
  50. package/theming/{_mixins.scss → style-tweaks/_elder-style-tweak-mixins.scss} +35 -1
  51. package/theming/system/_elder-config.scss +141 -0
  52. package/theming/{_elder-defaults.scss → system/_elder-defaults.scss} +9 -14
  53. package/theming/system/_elder-design-tokens.scss +90 -0
  54. package/theming/system/_elder-m3-theme.scss +156 -0
  55. package/theming/system/_elder-starter-theme.scss +41 -0
  56. package/theming/utility-classes/_elder-color-helpers.scss +78 -0
  57. package/theming/{_elder-flex-layout.scss → utility-classes/_elder-flex-layout.scss} +19 -25
  58. package/theming/utility-classes/_elder-layout-system.scss +498 -0
  59. package/src/lib/components/panels/flat/_elder-panel-theme.scss +0 -72
  60. package/src/lib/components/time/_elder-time-input.theme.scss +0 -35
  61. package/theming/_elder-common.scss +0 -573
  62. package/theming/_elder-mdc-support.scss +0 -235
  63. package/theming/_elder-palettes.scss +0 -148
  64. package/theming/_elder-scrollbar-theme.scss +0 -67
  65. package/theming/_elder-style-fixes.scss +0 -216
  66. package/theming/_elder-theme.scss +0 -51
  67. package/theming/_elder-toast-theme.scss +0 -46
  68. package/theming/_elder-typography-utils.scss +0 -23
  69. package/theming/_mat-icon-button-size.scss +0 -34
@@ -0,0 +1,377 @@
1
+ @use '@angular/material' as mat;
2
+ @use './elder-style-tweak-mixins' as mixins;
3
+ @use 'sass:map';
4
+
5
+ @mixin elder-style-fixes($theme) {
6
+ @include _ng-style-fixes;
7
+ @include _mat-style-fixes($theme);
8
+ @include _mat3-fixes($theme);
9
+
10
+ // elder custom icons fill color
11
+ .mat-icon.svg-icon-inherit-color svg * {
12
+ fill: currentColor !important;
13
+ }
14
+ }
15
+
16
+ @mixin _ng-style-fixes {
17
+ // Trick to ensure flex functionality within router-outlet
18
+ router-outlet.router-flex + * {
19
+ display: flex;
20
+ flex: 1 1 auto;
21
+ flex-direction: column;
22
+ height: 100%; // Required for Safari
23
+ width: 100%;
24
+ min-height: 0; // Fixes scrolling vert
25
+ min-width: 0; // Fixes scrolling horz
26
+ }
27
+ }
28
+
29
+ @mixin _mat-style-fixes($theme) {
30
+ // Globally disable automatic scrolling of Material Drawer Container
31
+ .mat-drawer-inner-container {
32
+ overflow: hidden !important;
33
+ }
34
+
35
+ // Globally disable automatic scrolling of Material Drawer Content
36
+ .mat-drawer-content {
37
+ overflow: hidden !important;
38
+ }
39
+
40
+ /******************************
41
+ Material tab fix
42
+ *******************************/
43
+
44
+ .mat-mdc-tab-body-wrapper {
45
+ flex: 1 1 100% !important;
46
+ height: 100% !important;
47
+ }
48
+
49
+ .mat-mdc-tab-body {
50
+ display: flex !important;
51
+ flex-direction: column;
52
+ }
53
+
54
+ /******************************
55
+ Material Chip fix
56
+ *******************************/
57
+
58
+ .mat-mdc-chip {
59
+ // Fixes default avatar on attribute usage (<mat-chip-avatar> vs matChipAvatar) which is broken in Angular Material 15.0.0
60
+ mat-chip-avatar {
61
+ .mat-icon {
62
+ width: 18px;
63
+ height: 18px;
64
+ line-height: 18px;
65
+ font-size: 18px;
66
+ }
67
+
68
+ img {
69
+ width: 18px;
70
+ height: 18px;
71
+ overflow: hidden;
72
+ border-radius: 9px;
73
+ }
74
+ }
75
+ }
76
+
77
+ /******************************
78
+ Material Badge Index
79
+ *******************************/
80
+
81
+ .mat-badge-content {
82
+ z-index: 1;
83
+ }
84
+
85
+ /******************************
86
+ Material chip make regular chips clickable when applying this class
87
+ *******************************/
88
+
89
+ .clickable-chip {
90
+ .mat-mdc-chip-action {
91
+ cursor: pointer;
92
+ }
93
+ }
94
+
95
+ /******************************
96
+ Styling toast messages
97
+ *******************************/
98
+ .elder-primary-text {
99
+ color: var(--md-sys-color-primary);
100
+ }
101
+
102
+ .elder-accent-text {
103
+ color: var(--md-sys-color-tertiary);
104
+ }
105
+
106
+ .elder-warn-text {
107
+ color: var(--md-sys-color-error);
108
+ }
109
+ }
110
+
111
+ @mixin _mat3-fixes($theme) {
112
+ // remove weird box shadow of card in overlay (Problem: Cards shouldn't be in overlay)
113
+ .mat-mdc-dialog-container .mat-mdc-card {
114
+ box-shadow: none;
115
+ }
116
+ // fix elder badge borders
117
+ elder-badge {
118
+ .mat-mdc-standard-chip .mat-mdc-chip-action::before {
119
+ border: none;
120
+ }
121
+ }
122
+
123
+ .mat-app-background {
124
+ display: block;
125
+ }
126
+
127
+ .mat-mdc-tab-group {
128
+ background-color: var(--md-sys-color-surface-container);
129
+ }
130
+
131
+ .legacy-layout-card {
132
+ background-color: var(--mdc-elevated-card-container-color);
133
+ //border: var(--elder-border-light);
134
+ border-radius: var(--elder-border-radius-sm);
135
+ box-shadow: var(--mdc-elevated-card-container-elevation);
136
+ overflow: hidden; // this might cause issues, but is probably correct..
137
+ }
138
+
139
+ .elder-card-title {
140
+ padding-bottom: 0 !important;
141
+ margin-bottom: 6px !important;
142
+ }
143
+
144
+ // remove extra background from drawer
145
+ .mat-drawer-container {
146
+ background-color: transparent !important;
147
+ }
148
+
149
+ // app header bg color
150
+ &.elder-light-theme,
151
+ &.elder-dark-theme {
152
+ .mat-toolbar {
153
+ &.mat-primary {
154
+ --mat-toolbar-container-text-color: var(--md-sys-color-on-primary);
155
+ --mat-toolbar-container-background-color: var(--md-sys-color-primary);
156
+ .mat-mdc-icon-button {
157
+ color: var(--md-sys-color-on-primary);
158
+ }
159
+ }
160
+ &.mat-accent {
161
+ --mat-toolbar-container-text-color: var(--md-sys-color-on-tertiary);
162
+ --mat-toolbar-container-background-color: var(--md-sys-color-tertiary);
163
+ .mat-mdc-icon-button {
164
+ color: var(--md-sys-color-on-tertiary);
165
+ }
166
+ }
167
+ }
168
+
169
+ .mat-toolbar.elder-toolbar-main-nav-button-container {
170
+ &.mat-primary,
171
+ &.mat-accent {
172
+ background-color: var(--elder-toolbar-main-nav-button-container-bg-color);
173
+
174
+ .mat-mdc-icon-button {
175
+ color: var(--elder-toolbar-main-nav-button-color);
176
+ }
177
+ }
178
+ }
179
+ }
180
+
181
+ &.elder-dark-theme {
182
+ .mat-toolbar.mat-primary,
183
+ .mat-toolbar.mat-accent {
184
+ background-color: var(--elder-dark-gray) !important;
185
+ * {
186
+ color: var(--md-sys-color-on-surface) !important;
187
+ }
188
+ .elder-toolbar-main-nav-button .mat-icon {
189
+ color: var(--md-sys-color-primary) !important;
190
+ }
191
+ }
192
+
193
+ elder-app-header .elder-panel {
194
+ color: var(--md-sys-color-on-surface) !important;
195
+ }
196
+ }
197
+
198
+ /**************************************************************************
199
+ * Start cloudfiles import 1
200
+ *************************************************************************/
201
+
202
+ .mat-mdc-tab-group {
203
+ background-color: transparent !important;
204
+ }
205
+
206
+ elder-data-toolbar {
207
+ display: block;
208
+ }
209
+
210
+ /**************************************************************************
211
+ * End cloudfiles import 1
212
+ *************************************************************************/
213
+
214
+ // Button colors
215
+ .mat-accent.mat-mdc-button-base {
216
+ --md-sys-color-tertiary: var(--md-sys-color-secondary);
217
+ --md-sys-color-on-tertiary: var(--md-sys-color-on-secondary);
218
+ --md-sys-color-tertiary-container: var(--md-sys-color-secondary-container);
219
+ --md-sys-color-on-tertiary-container: var(--md-sys-color-on-secondary-container);
220
+ }
221
+
222
+ // slide toggle colors
223
+ .mat-accent.mat-mdc-slide-toggle {
224
+ --md-sys-color-tertiary: var(--md-sys-color-secondary);
225
+ --md-sys-color-on-tertiary: var(--md-sys-color-on-secondary);
226
+ --md-sys-color-tertiary-container: var(--md-sys-color-secondary-container);
227
+ --md-sys-color-on-tertiary-container: var(--md-sys-color-on-secondary-container);
228
+ }
229
+
230
+ // badge positioning
231
+ .mat-badge-above .mat-badge-content {
232
+ bottom: 82%;
233
+ }
234
+
235
+ // bring back the badge warn color that was removed in m3
236
+ .mat-badge-warn {
237
+ --mat-badge-background-color: var(--md-sys-color-error);
238
+ }
239
+
240
+ & {
241
+ // fix button paddings to keep spacing
242
+ --elder-button-horizontal-padding: 19px;
243
+ --mat-protected-button-horizontal-padding: var(--elder-button-horizontal-padding);
244
+ --mat-outlined-button-horizontal-padding: var(--elder-button-horizontal-padding);
245
+ --mat-filled-button-horizontal-padding: var(--elder-button-horizontal-padding);
246
+
247
+ // mat toolbar title-text line height
248
+ --mat-toolbar-title-text-line-height: 36px;
249
+ }
250
+
251
+ // Sekundärfarbe anstatt Tertiärfarbe, da es wenig Sinn macht, auf dieses Element viel Aufmerksamkeit zu lenken
252
+ .elder-light-theme,
253
+ .elder-dark-theme {
254
+ &.mat-accent.mat-icon {
255
+ --mat-icon-color: var(--md-sys-color-secondary);
256
+ }
257
+ }
258
+
259
+ .elder-pane-grid {
260
+ display: flex;
261
+ flex-flow: row nowrap;
262
+ justify-content: space-around;
263
+ padding: var(--elder-pane-padding);
264
+ gap: var(--elder-pane-gap);
265
+ height: 100%;
266
+ align-items: stretch;
267
+ }
268
+
269
+ .elder-pane {
270
+ border-radius: var(--elder-pane-border-radius, var(--mat-app-corner-medium));
271
+ overflow: hidden;
272
+ background-color: var(--elder-pane-bg-color);
273
+ }
274
+
275
+ // scrollbar styling
276
+ ::-webkit-scrollbar {
277
+ width: var(--elder-scrollbar-width);
278
+ }
279
+
280
+ ::-webkit-scrollbar-thumb {
281
+ background: var(--md-sys-color-outline-variant);
282
+ border-radius: 5px;
283
+ }
284
+
285
+ ::-webkit-scrollbar-thumb:hover {
286
+ background: var(--md-sys-color-outline);
287
+ }
288
+
289
+ // fix
290
+ .elder-pane .legacy-layout-card {
291
+ border-radius: 0 !important;
292
+ }
293
+
294
+ .mat-mdc-card,
295
+ .mat-mdc-card-outlined {
296
+ // set normal mat-cards back to m2 border-radius
297
+ border-radius: var(--elder-border-radius-sm);
298
+ }
299
+
300
+ // round input fields
301
+ &.deactivated {
302
+ elder-search-box .elder-search-box-field,
303
+ .mat-toolbar .mat-mdc-form-field {
304
+ background-color: var(--md-sys-color-surface-container-low);
305
+ border-radius: 24px !important;
306
+
307
+ // remove border from notch piece on input fields
308
+ .mat-mdc-notch-piece {
309
+ border-width: 0 !important;
310
+ }
311
+ }
312
+ }
313
+
314
+ .mat-toolbar .mat-mdc-form-field {
315
+ background-color: var(--elder-lightened-transparent-bg);
316
+ &,
317
+ *,
318
+ .mat-icon {
319
+ color: var(--md-sys-color-inverse-on-surface);
320
+ --mdc-outlined-text-field-input-text-color: var(--md-sys-color-inverse-on-surface) !important;
321
+ --mdc-outlined-text-field-caret-color: var(--md-sys-color-inverse-on-surface) !important;
322
+ }
323
+ // * {
324
+ // color: var(--md-sys-color-inverse-on-surface);
325
+ // border-color: var(--md-sys-color-inverse-on-surface);
326
+ // }
327
+ }
328
+
329
+ .elder-pane {
330
+ background-color: var(--md-sys-color-surface-container-lowest);
331
+ }
332
+
333
+ &.elder-dark-theme {
334
+ // brighter dark mode nav
335
+ .elder-nav-list-full {
336
+ background-color: var(--md-sys-color-surface-container-lowest) !important;
337
+ }
338
+ .nav-link-active {
339
+ color: var(--md-sys-color-primary) !important;
340
+ }
341
+ }
342
+
343
+ /**************************************************************************
344
+ Elder panel
345
+ **************************************************************************/
346
+ .elder-panel {
347
+ background: var(--md-sys-color-primary-container);
348
+ color: var(--md-sys-color-on-primary-container);
349
+ transition: background-color 0.5s;
350
+
351
+ &.mat-primary,
352
+ &.mat-accent,
353
+ &.mat-warn {
354
+ background: var(--elder-dark-mode-color-surface, var(--md-sys-color-primary));
355
+ color: var(--elder-dark-mode-color-on-surface, var(--md-sys-color-on-primary));
356
+ }
357
+
358
+ // form field overrides
359
+ .mat-form-field-underline,
360
+ .mat-form-field-ripple,
361
+ .mat-focused .mat-form-field-ripple {
362
+ background-color: currentColor;
363
+ }
364
+
365
+ .mat-mdc-form-field-label,
366
+ .mat-focused .mat-form-field-label,
367
+ .mat-select-value,
368
+ .mat-select-arrow,
369
+ .mat-form-field.mat-focused .mat-select-arrow {
370
+ color: inherit;
371
+ }
372
+
373
+ .mat-mdc-input-element {
374
+ caret-color: currentColor;
375
+ }
376
+ }
377
+ }
@@ -17,7 +17,6 @@
17
17
  display: inline-flex;
18
18
  justify-content: center;
19
19
  align-items: center;
20
- box-sizing: border-box;
21
20
  }
22
21
 
23
22
  .mat-mdc-form-field-icon-prefix > .mat-mdc-icon-button,
@@ -50,3 +49,38 @@
50
49
  @return 40px;
51
50
  }
52
51
  }
52
+
53
+ /**
54
+ * Based on https://github.com/btxtiger/mat-icon-button-sizes
55
+ * The default factor between button and icon size is *= 0.6
56
+ */
57
+ @mixin matIconButtonSize($buttonSize, $iconSize) {
58
+ width: $buttonSize !important;
59
+ height: $buttonSize !important;
60
+ padding: 0 !important;
61
+ display: inline-flex !important;
62
+ align-items: center;
63
+ justify-content: center;
64
+
65
+ .mat-icon,
66
+ img {
67
+ width: $iconSize;
68
+ height: $iconSize;
69
+ font-size: $iconSize;
70
+
71
+ svg {
72
+ width: $iconSize;
73
+ height: $iconSize;
74
+ }
75
+ }
76
+
77
+ svg {
78
+ width: $iconSize;
79
+ height: $iconSize;
80
+ }
81
+
82
+ .mat-mdc-button-touch-target {
83
+ width: $buttonSize !important;
84
+ height: $buttonSize !important;
85
+ }
86
+ }
@@ -0,0 +1,141 @@
1
+ $sizes: (
2
+ xs: 4px,
3
+ sm: 8px,
4
+ md: 12px,
5
+ lg: 16px,
6
+ xl: 24px,
7
+ xxl: 32px,
8
+ );
9
+
10
+ $extra: (
11
+ form-field-density: -4,
12
+ );
13
+
14
+ $media: (
15
+ xs: 0px,
16
+ sm: 600px,
17
+ md: 960px,
18
+ lg: 1024px,
19
+ xl: 1280px,
20
+ );
21
+
22
+ $palettes: (
23
+ primary: (
24
+ 0: #000000,
25
+ 10: #001b3c,
26
+ 20: #0d315b,
27
+ 25: #1b3c67,
28
+ 30: #284773,
29
+ 35: #35537f,
30
+ 40: #425f8c,
31
+ 50: #5b78a6,
32
+ 60: #7592c2,
33
+ 70: #8facde,
34
+ 80: #aac8fb,
35
+ 90: #d5e3ff,
36
+ 95: #ebf1ff,
37
+ 98: #f9f9ff,
38
+ 99: #fdfbff,
39
+ 100: #ffffff,
40
+ ),
41
+ secondary: (
42
+ 0: #000000,
43
+ 10: #111c2c,
44
+ 20: #263142,
45
+ 25: #313c4e,
46
+ 30: #3d4759,
47
+ 35: #485366,
48
+ 40: #545f72,
49
+ 50: #6d778c,
50
+ 60: #8691a6,
51
+ 70: #a1acc1,
52
+ 80: #bcc7dd,
53
+ 90: #d8e3fa,
54
+ 95: #ebf1ff,
55
+ 98: #f9f9ff,
56
+ 99: #fdfbff,
57
+ 100: #ffffff,
58
+ ),
59
+ tertiary: (
60
+ 0: #000000,
61
+ 10: #251a00,
62
+ 20: #3f2e00,
63
+ 25: #4c3903,
64
+ 30: #58440e,
65
+ 35: #654f19,
66
+ 40: #725b24,
67
+ 50: #8d743a,
68
+ 60: #a88d51,
69
+ 70: #c4a869,
70
+ 80: #e1c381,
71
+ 90: #ffdf9b,
72
+ 95: #ffefd3,
73
+ 98: #fff8f2,
74
+ 99: #fffbff,
75
+ 100: #ffffff,
76
+ ),
77
+ neutral: (
78
+ 0: #000000,
79
+ 10: #1a1c1f,
80
+ 20: #2f3034,
81
+ 25: #3a3b3f,
82
+ 30: #46474a,
83
+ 35: #515256,
84
+ 40: #5d5e62,
85
+ 50: #76777b,
86
+ 60: #909094,
87
+ 70: #ababaf,
88
+ 80: #c6c6ca,
89
+ 90: #e3e2e6,
90
+ 95: #f1f0f4,
91
+ 98: #faf9fd,
92
+ 99: #fdfbff,
93
+ 100: #ffffff,
94
+ 4: #0d0e11,
95
+ 6: #121316,
96
+ 12: #1e2023,
97
+ 17: #292a2d,
98
+ 22: #343538,
99
+ 24: #38393c,
100
+ 87: #dad9de,
101
+ 92: #e8e7ec,
102
+ 94: #eeedf1,
103
+ 96: #f4f3f7,
104
+ ),
105
+ neutral-variant: (
106
+ 0: #000000,
107
+ 10: #181c23,
108
+ 20: #2d3038,
109
+ 25: #383b43,
110
+ 30: #43474f,
111
+ 35: #4f525a,
112
+ 40: #5b5e67,
113
+ 50: #747780,
114
+ 60: #8d9199,
115
+ 70: #a8abb4,
116
+ 80: #c4c6d0,
117
+ 90: #e0e2ec,
118
+ 95: #eef0fa,
119
+ 98: #f9f9ff,
120
+ 99: #fdfbff,
121
+ 100: #ffffff,
122
+ ),
123
+ error: (
124
+ 0: #000000,
125
+ 10: #410002,
126
+ 20: #690005,
127
+ 25: #7e0007,
128
+ 30: #93000a,
129
+ 35: #a80710,
130
+ 40: #ba1a1a,
131
+ 50: #de3730,
132
+ 60: #ff5449,
133
+ 70: #ff897d,
134
+ 80: #ffb4ab,
135
+ 90: #ffdad6,
136
+ 95: #ffedea,
137
+ 98: #fff8f7,
138
+ 99: #fffbff,
139
+ 100: #ffffff,
140
+ ),
141
+ );
@@ -1,18 +1,18 @@
1
1
  @use 'sass:map';
2
+ @use '@angular/material' as mat;
3
+ @use './elder-config' as settings;
2
4
 
3
5
  /******************************
4
6
  Default values
5
7
  *******************************/
6
- $commonSizesXs: 4px;
7
- $commonSizesSm: 8px;
8
- $commonSizesMd: 12px;
9
- $commonSizesLg: 16px;
10
- $commonSizesXl: 24px;
11
- $commonSizesXxl: 32px;
8
+ $commonSizesXs: map.get(settings.$sizes, xs);
9
+ $commonSizesSm: map.get(settings.$sizes, sm);
10
+ $commonSizesMd: map.get(settings.$sizes, md);
11
+ $commonSizesLg: map.get(settings.$sizes, lg);
12
+ $commonSizesXl: map.get(settings.$sizes, xl);
13
+ $commonSizesXxl: map.get(settings.$sizes, xxl);
12
14
 
13
- $densityFormField: 0;
14
-
15
- $scrollbarStyling: false;
15
+ $densityFormField: map.get(settings.$extra, form-field-density);
16
16
 
17
17
  /******************************
18
18
  Validates $theme and sets default value if null
@@ -30,7 +30,6 @@ Validates $theme and sets default value if null
30
30
  density: (
31
31
  form-field: get-or-default($theme, $densityFormField, density, form-field),
32
32
  ),
33
- scrollbar-styling: get-or-default($theme, $scrollbarStyling, scrollbar-styling),
34
33
  );
35
34
 
36
35
  @return map.set($theme, elder, $elderMap);
@@ -43,7 +42,3 @@ Validates $theme and sets default value if null
43
42
  @return $defaultValue;
44
43
  }
45
44
  }
46
-
47
- @function get-default-input() {
48
- @return ();
49
- }
@@ -0,0 +1,90 @@
1
+ @mixin elder-design-tokens() {
2
+ @include elder-badge-sizing();
3
+
4
+ // bg color
5
+ --md-sys-color-background: var(--md-sys-color-surface-container-highest);
6
+
7
+ // mat variables
8
+ --mat-sidenav-container-width: auto; // is set to around 300px by default in MAT 3 (MAT 2 was auto by default)
9
+ --mat-badge-small-size-text-size: 9px; // this is the mat2 setting, mat3 somehow sets this to 0, which hides the font, unclear why.
10
+ --mdc-dialog-container-shape: 16px; // make border-radius of dialog container smaller (default is 28px)
11
+ --mat-dialog-container-max-width: 80vw; // 80vw is mat 2 default, mat 3 default is very narrow: 560px;
12
+ --mat-toolbar-title-text-tracking: 0; // mat toolbar typography
13
+ --mat-toolbar-title-text-weight: 500; // mat toolbar typography
14
+ --mat-table-row-item-outline-color: var(--md-sys-color-outline-variant);
15
+ --mat-divider-color: var(--md-sys-color-outline-variant); // make divider color lighter
16
+ --mat-sidenav-container-elevation-shadow: var(--mat-app-elevation-shadow-level-16);
17
+
18
+ // elder custom variables
19
+ --elder-border-radius-sm: 4px; // typical small border radius, inspired by mat 2
20
+ --elder-border-light: 1px solid var(--md-sys-color-outline-variant);
21
+ --elder-box-shadow-default: var(--mat-app-elevation-shadow-level-8);
22
+ --elder-scrollbar-width: 8px;
23
+ --elder-lightened-transparent-bg: rgba(255, 255, 255, 0.15);
24
+
25
+ // elder pane
26
+ --elder-pane-padding: 8px;
27
+ --elder-pane-gap: calc(var(--elder-pane-padding) * 2);
28
+ --elder-pane-border-radius: var(
29
+ --mdc-outlined-card-container-shape,
30
+ var(--mat-app-corner-medium)
31
+ );
32
+ --elder-pane-bg-color: var(--md-sys-color-surface-container-lowest);
33
+
34
+ // card header
35
+ --elder-card-header-padding: 15px 15px 5px 15px;
36
+
37
+ // cards white bg
38
+ --mdc-elevated-card-container-color: var(--md-sys-color-surface-container-lowest);
39
+ --mdc-outlined-card-container-color: var(--mdc-elevated-card-container-color);
40
+ --mat-table-background-color: var(--md-sys-color-surface-container-lowest);
41
+ --mat-paginator-container-background-color: var(--mat-table-background-color);
42
+
43
+ // elder toast messages
44
+ --elder-toast-message-color-title-default: var(--md-sys-color-inverse-on-surface);
45
+ --elder-toast-message-color-title-warn: var(--md-sys-color-inverse-on-surface);
46
+ --elder-toast-message-color-title-error: var(--md-sys-color-inverse-on-surface);
47
+
48
+ // main nav top left button color
49
+ --elder-toolbar-main-nav-button-color: var(--md-sys-color-on-primary);
50
+ --elder-toolbar-main-nav-button-container-bg-color: var(--md-sys-color-primary);
51
+
52
+ // dark theme overwrites
53
+ &.elder-dark-theme {
54
+ --md-sys-color-primary-container: #826e38; // lighten up dark mode container color
55
+ --md-sys-color-tertiary-container: var(--md-sys-color-primary-container);
56
+ --md-sys-color-surface-container-highest: #191919;
57
+ --md-sys-color-surface-container-lowest: #262626;
58
+ --elder-dark-gray: var(--md-sys-color-surface-container);
59
+ --mat-sidenav-container-background-color: var(--md-sys-color-surface-container);
60
+ --mdc-chip-outline-color: rgba(255, 255, 255, 0.3);
61
+
62
+ // dark mode specific colors
63
+ --elder-dark-mode-color-primary: var(--md-sys-color-primary);
64
+ --elder-dark-mode-color-on-primary: var(--md-sys-color-on-primary);
65
+ --elder-dark-mode-color-surface: var(--md-sys-color-surface);
66
+ --elder-dark-mode-color-on-surface: var(--md-sys-color-on-surface);
67
+ }
68
+ }
69
+
70
+ @mixin elder-badge-sizing() {
71
+ // Use legacy MAT 2 badge sizing
72
+ --mat-badge-container-size: unset;
73
+ --mat-badge-small-size-container-size: unset;
74
+ --mat-badge-large-size-container-size: unset;
75
+ --mat-badge-legacy-container-size: 22px;
76
+ --mat-badge-legacy-small-size-container-size: 16px;
77
+ --mat-badge-legacy-large-size-container-size: 28px;
78
+ --mat-badge-container-offset: -11px 0;
79
+ --mat-badge-small-size-container-offset: -8px 0;
80
+ --mat-badge-large-size-container-offset: -14px 0;
81
+ --mat-badge-container-overlap-offset: -11px;
82
+ --mat-badge-small-size-container-overlap-offset: -8px;
83
+ --mat-badge-large-size-container-overlap-offset: -14px;
84
+ --mat-badge-container-padding: 0;
85
+ --mat-badge-small-size-container-padding: 0;
86
+ --mat-badge-large-size-container-padding: 0;
87
+ --mat-badge-line-height: var(--mat-badge-legacy-container-size);
88
+ --mat-badge-small-size-line-height: var(--mat-badge-legacy-small-size-container-size);
89
+ --mat-badge-large-size-line-height: var(--mat-badge-legacy-large-size-container-size);
90
+ }