@elderbyte/ngx-starter 18.12.7 → 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 (56) hide show
  1. package/_index.scss +18 -6
  2. package/esm2022/lib/common/data/datasource/local/local-list-data-source.mjs +8 -2
  3. package/esm2022/lib/common/data/datasource/rest/rest-client.mjs +7 -1
  4. package/esm2022/lib/components/data-transfer/http-data-transfer-indicator/http-data-transfer-indicator.component.mjs +3 -3
  5. package/esm2022/lib/components/data-transfer/http-data-transfer-overview/http-data-transfer-overview.component.mjs +3 -3
  6. package/esm2022/lib/components/page/exit-guard/page-exit-lock-indicator/page-exit-lock-indicator.component.mjs +3 -3
  7. package/esm2022/lib/components/select/filter/elder-filter-chip-template/elder-filter-chip-template.component.mjs +3 -3
  8. package/esm2022/lib/components/select/multi/elder-multi-select-chip-options/elder-multi-select-chip-options.component.mjs +3 -3
  9. package/esm2022/lib/components/select/multi/elder-multi-select-chips/elder-multi-select-chips.component.mjs +3 -3
  10. package/esm2022/lib/components/select/popup/templated-selection-dialog/templated-selection-dialog.component.mjs +3 -3
  11. package/esm2022/lib/components/select/single/elder-select/elder-select.component.mjs +3 -3
  12. package/esm2022/lib/components/shell/header/elder-app-header/elder-app-header.component.mjs +5 -3
  13. package/esm2022/lib/components/time/elder-interval-picker/elder-interval-picker.component.mjs +3 -3
  14. package/fesm2022/elderbyte-ngx-starter.mjs +35 -21
  15. package/fesm2022/elderbyte-ngx-starter.mjs.map +1 -1
  16. package/lib/components/shell/header/elder-app-header/elder-app-header.component.d.ts +2 -1
  17. package/package.json +1 -1
  18. package/src/lib/components/button-group/elder-button-group/elder-button-group.component.scss +1 -7
  19. package/src/lib/components/card-organizer/card-stack/elder-card-stack.component.scss +3 -14
  20. package/src/lib/components/cards/elder-card/elder-card.component.scss +2 -8
  21. package/src/lib/components/chips/_elder-chip-theme-old.scss +122 -0
  22. package/src/lib/components/chips/_elder-chip-theme.scss +101 -12
  23. package/src/lib/components/data-transfer/http-data-transfer-indicator/http-data-transfer-indicator.component.scss +0 -6
  24. package/src/lib/components/data-transfer/http-data-transfer-overview/http-data-transfer-overview.component.scss +11 -0
  25. package/src/lib/components/data-view/grid/elder-grid/elder-grid.component.scss +15 -22
  26. package/src/lib/components/data-view/table/elder-table/elder-table.component.scss +11 -18
  27. package/src/lib/components/errors/exception-detail/elder-exception-detail.component.scss +2 -9
  28. package/src/lib/components/expand-toggle-button/elder-expand-toggle-button.component.scss +2 -8
  29. package/src/lib/components/files/drag-n-drop/elder-drop-zone/elder-drop-zone.component.scss +7 -10
  30. package/src/lib/components/iframes/iframe-host/iframe-host.component.scss +0 -4
  31. package/src/lib/components/navigation/nav/_elder-nav-theme.scss +12 -24
  32. package/src/lib/components/page/exit-guard/page-exit-lock-indicator/page-exit-lock-indicator.component.scss +1 -4
  33. package/src/lib/components/panels/card-panel/elder-card-panel.component.scss +3 -12
  34. package/src/lib/components/panels/elder-dialog-panel/elder-dialog-panel.component.scss +4 -12
  35. package/src/lib/components/panels/flat/_elder-panel-theme.scss +26 -9
  36. package/src/lib/components/select/_elder-select-base.scss +1 -9
  37. package/src/lib/components/select/filter/elder-filter-chip-template/elder-filter-chip-template.component.scss +1 -4
  38. package/src/lib/components/select/multi/elder-multi-select-chip-options/elder-multi-select-chip-options.component.scss +10 -39
  39. package/src/lib/components/select/multi/elder-multi-select-chips/elder-multi-select-chips.component.scss +19 -52
  40. package/src/lib/components/select/single/elder-select/elder-select.component.scss +24 -40
  41. package/src/lib/components/time/_elder-time-input.theme.scss +0 -3
  42. package/theming/_elder-color-variants.scss +26 -0
  43. package/theming/_elder-common.scss +6 -399
  44. package/theming/_elder-defaults.scss +3 -7
  45. package/theming/_elder-form.scss +308 -0
  46. package/theming/_elder-layout-system.scss +242 -0
  47. package/theming/_elder-m3-theme.scss +754 -0
  48. package/theming/_elder-mdc-support.scss +59 -142
  49. package/theming/_elder-scrollbar-theme.scss +2 -12
  50. package/theming/_elder-style-fixes.scss +46 -109
  51. package/theming/_elder-typography-utils.scss +0 -11
  52. package/theming/_mixins.scss +35 -0
  53. package/theming/_elder-palettes.scss +0 -148
  54. package/theming/_elder-theme.scss +0 -51
  55. package/theming/_elder-toast-theme.scss +0 -46
  56. package/theming/_mat-icon-button-size.scss +0 -34
@@ -0,0 +1,308 @@
1
+ @use './mixins' as mixins;
2
+ @use '@angular/material' as mat;
3
+
4
+ @mixin elder-form-styles($theme) {
5
+ $common-sizes: map-get($theme, elder, common-sizes);
6
+ $form-field-density: map-get($theme, elder, density, form-field);
7
+ @include mat.form-field-density($form-field-density);
8
+
9
+ $xs: map-get($common-sizes, xs);
10
+ $sm: map-get($common-sizes, sm);
11
+ $md: map-get($common-sizes, md);
12
+ $lg: map-get($common-sizes, lg);
13
+ $xl: map-get($common-sizes, xl);
14
+ $xxl: map-get($common-sizes, xxl);
15
+
16
+ /******************************
17
+ elder-form-field-host fix
18
+ *******************************/
19
+ .elder-form-field-host {
20
+ // This class should be applied to "controls" which themselves contain a mat-form-field.
21
+ display: inline-flex;
22
+ flex-direction: column;
23
+ min-width: 0;
24
+ }
25
+
26
+ /******************************
27
+ mdc form field fixes
28
+ *******************************/
29
+ .mat-mdc-text-field-wrapper:not(.mdc-text-field--outlined) .mat-mdc-floating-label {
30
+ display: block !important;
31
+ }
32
+
33
+ .mat-mdc-form-field-has-icon-prefix .mat-mdc-text-field-wrapper {
34
+ padding-left: 0 !important;
35
+ }
36
+
37
+ .mat-mdc-form-field-has-icon-suffix .mat-mdc-text-field-wrapper {
38
+ padding-right: 0 !important;
39
+ }
40
+
41
+ .mat-mdc-form-field:not(.mat-mdc-form-field.elder-dense) {
42
+ $density: map-get($theme, elder, density, form-field);
43
+
44
+ /******************************
45
+ Fix big paddings for dense form fields
46
+ *******************************/
47
+
48
+ .mat-mdc-text-field-wrapper {
49
+ padding-left: calc-side-paddings($density);
50
+ padding-right: calc-side-paddings($density);
51
+ }
52
+
53
+ /******************************
54
+ Fix icon size and placement in mat label
55
+ *******************************/
56
+
57
+ @include mixins.form-field-icons($density);
58
+
59
+ /******************************
60
+ Fix text and hover placement of small filled form fields
61
+ *******************************/
62
+
63
+ $mat-mdc-form-field-label-transform: 0.75;
64
+ $mat-mdc-form-field-label-offset-x: -16px;
65
+ $form-field-density: map-get($theme, elder, density, form-field);
66
+
67
+ @if $form-field-density < -1 {
68
+ .mdc-text-field--filled {
69
+ .mdc-floating-label--float-above {
70
+ transform: var(
71
+ $mat-mdc-form-field-label-transform,
72
+ translateY(-50%)
73
+ translateX(calc(1 * (44px + var($mat-mdc-form-field-label-offset-x, 0px))))
74
+ ) !important;
75
+ }
76
+
77
+ .mat-mdc-form-field-infix {
78
+ padding-top: calc-padding-top-form-field-inflix($form-field-density) !important;
79
+ padding-bottom: 2px !important;
80
+ min-height: 40px; // (24 + 2*16) = 56px by default
81
+ }
82
+ }
83
+ }
84
+
85
+ /******************************
86
+ Material Form Field Label stealing clicks
87
+ *******************************/
88
+
89
+ .mat-mdc-floating-label.mdc-floating-label {
90
+ pointer-events: none !important;
91
+
92
+ mat-label {
93
+ pointer-events: none !important;
94
+ }
95
+ }
96
+
97
+ .mdc-notched-outline__notch {
98
+ pointer-events: none !important;
99
+
100
+ .mdc-floating-label {
101
+ pointer-events: none !important;
102
+
103
+ mat-label {
104
+ pointer-events: none !important;
105
+ }
106
+ }
107
+ }
108
+
109
+ .mat-mdc-form-field-error-wrapper {
110
+ display: flex;
111
+ padding-right: 0;
112
+ }
113
+ }
114
+
115
+ // A legacy styled form field with class 'elder-form-field-label' will get these styles
116
+ .mat-form-field-appearance-legacy.elder-form-field-label {
117
+ /*TODO(mdc-migration): The following rule targets internal classes of form-field that may no longer apply for the MDC version.*/
118
+ .mat-form-field-underline {
119
+ display: none;
120
+ }
121
+ }
122
+
123
+ /******************************************************************
124
+ Icon button size
125
+ ******************************************************************/
126
+
127
+ $control-button-size: var(--mdc-typography-body1-line-height, 24px);
128
+ $control-icon-size: 20px;
129
+ .elder-mdc-input-fix {
130
+ max-height: $control-button-size;
131
+ }
132
+ .mat-mdc-icon-button.elder-control-icon-button {
133
+ @include mixins.matIconButtonSize($control-button-size, $control-icon-size); // 0.6
134
+ }
135
+ .mat-datepicker-toggle.elder-control-icon-button {
136
+ max-height: $control-button-size;
137
+ max-width: $control-button-size;
138
+ .mat-mdc-icon-button {
139
+ @include mixins.matIconButtonSize($control-button-size, $control-icon-size); // 0.6
140
+ }
141
+ }
142
+
143
+ /***************************************************************************
144
+ Form field dense styling
145
+ **************************************************************************/
146
+
147
+ .mat-mdc-form-field.elder-dense {
148
+ .mat-mdc-text-field-wrapper {
149
+ // padding left / right 16 by default
150
+ padding-left: $sm !important;
151
+ padding-right: $sm !important;
152
+ }
153
+
154
+ .mat-mdc-form-field-flex {
155
+ padding: 0;
156
+ }
157
+
158
+ .mdc-text-field--outlined {
159
+ .mat-mdc-form-field-infix {
160
+ padding-top: $sm !important; // 16px by default
161
+ padding-bottom: $sm !important; // 16px by default
162
+ min-height: 40px; // (24 + 2*16) = 56px by default
163
+ }
164
+ }
165
+
166
+ .mdc-text-field--filled {
167
+ .mdc-floating-label--float-above {
168
+ transform: translateY(-100%) scale(0.75);
169
+ }
170
+ .mat-mdc-form-field-infix {
171
+ padding-top: 14px !important; // 16px by default
172
+ padding-bottom: 2px;
173
+ min-height: 40px; // (24 + 2*16) = 56px by default
174
+ }
175
+ }
176
+
177
+ @include mixins.form-field-icons(-4);
178
+ }
179
+
180
+ .mat-mdc-form-field.elder-no-hint {
181
+ /*TODO(mdc-migration): The following rule targets internal classes of form-field that may no longer apply for the MDC version.*/
182
+ .mat-form-field-wrapper {
183
+ padding-bottom: 0;
184
+ }
185
+ /*TODO(mdc-migration): The following rule targets internal classes of form-field that may no longer apply for the MDC version.*/
186
+ .mat-form-field-underline {
187
+ bottom: 0;
188
+ }
189
+ }
190
+
191
+ /******************************
192
+ Material Form Controls
193
+ *******************************/
194
+
195
+ .elder-form-control {
196
+ width: 180px;
197
+ overflow: hidden; // This allows flex items to shrink (min/max is not defaulting auto)
198
+ }
199
+
200
+ .elder-flex-control {
201
+ flex: 1 1 180px;
202
+ overflow: hidden;
203
+ }
204
+
205
+ /******************************
206
+ Material Form Field
207
+ *******************************/
208
+
209
+ .elder-form-field-gap {
210
+ width: 12px;
211
+ }
212
+
213
+ // two fields plus 12px gap add up to elder-std-form-field width
214
+ .elder-form-field-small {
215
+ width: 84px;
216
+ }
217
+
218
+ // three fields plus 12px gap add up to elder-std-form-field width
219
+ .elder-form-field-tiny {
220
+ width: 52px;
221
+ }
222
+
223
+ .elder-std-form-field {
224
+ width: 180px;
225
+ overflow: hidden; // This allows flex items to shrink (min/max is not defaulting auto)
226
+ }
227
+
228
+ .elder-form-field-large {
229
+ width: 244px;
230
+ overflow: hidden;
231
+ }
232
+
233
+ .elder-form-field-xl {
234
+ width: 276px;
235
+ overflow: hidden;
236
+ }
237
+
238
+ .elder-form-field-xxl {
239
+ width: 372px;
240
+ overflow: hidden;
241
+ }
242
+
243
+ /**
244
+ * mat-form-field style shorthands
245
+ */
246
+ mat-form-field {
247
+ // three fields plus 12px gap add up to elder-std-form-field width
248
+ .tiny {
249
+ width: 52px; // (180-(2*12)) / 3
250
+ }
251
+
252
+ // two fields plus 12px gap add up to elder-std-form-field width
253
+ .small {
254
+ width: 84px; // (180-(1*12)) / 2
255
+ }
256
+
257
+ .standard {
258
+ width: 180px;
259
+ overflow: hidden; // This allows flex items to shrink (min/max is not defaulting auto)
260
+ }
261
+
262
+ // one and a half plus 12px gap 180 + 52 + 12
263
+ .large {
264
+ width: 244px;
265
+ overflow: hidden;
266
+ }
267
+
268
+ // one and a half plus 12px gap 180 + 84 + 12
269
+ .xl {
270
+ width: 276px;
271
+ overflow: hidden;
272
+ }
273
+
274
+ // two standard fields plus 12px gap (180 + 180 + 12)
275
+ .xxl {
276
+ width: 372px;
277
+ overflow: hidden;
278
+ }
279
+ }
280
+ }
281
+
282
+ @function calc-side-paddings($density) {
283
+ $paddingDensityNeg4: 8px;
284
+ $paddingDensityNeg3: 10px;
285
+ $paddingDensityNeg2: 12px;
286
+ $paddingDensityNeg1: 14px;
287
+ $paddingDensity0: 16px;
288
+
289
+ @if $density == -4 {
290
+ @return $paddingDensityNeg4;
291
+ } @else if $density == -3 {
292
+ @return $paddingDensityNeg3;
293
+ } @else if $density == -2 {
294
+ @return $paddingDensityNeg2;
295
+ } @else if $density == -1 {
296
+ @return $paddingDensityNeg1;
297
+ } @else if $density == 0 {
298
+ @return $paddingDensity0;
299
+ }
300
+ }
301
+
302
+ @function calc-padding-top-form-field-inflix($density) {
303
+ @if $density > -3 {
304
+ @return 20px;
305
+ } @else {
306
+ @return 14px;
307
+ }
308
+ }
@@ -0,0 +1,242 @@
1
+ @use '@angular/material' as mat;
2
+
3
+ @mixin elder-layout-system($theme) {
4
+ $common-sizes: map-get($theme, elder, common-sizes);
5
+
6
+ /***************************************************************************
7
+ * *
8
+ * Common Sizes *
9
+ * *
10
+ **************************************************************************/
11
+
12
+ $xs: map-get($common-sizes, xs);
13
+ $sm: map-get($common-sizes, sm);
14
+ $md: map-get($common-sizes, md);
15
+ $lg: map-get($common-sizes, lg);
16
+ $xl: map-get($common-sizes, xl);
17
+ $xxl: map-get($common-sizes, xxl);
18
+
19
+ /***************************************************************************
20
+ * *
21
+ * Padding *
22
+ * *
23
+ **************************************************************************/
24
+
25
+ .p-xs {
26
+ padding: $xs;
27
+ }
28
+
29
+ .pt-xs {
30
+ padding-top: $xs;
31
+ }
32
+
33
+ .pb-xs {
34
+ padding-bottom: $xs;
35
+ }
36
+
37
+ .pr-xs {
38
+ padding-right: $xs;
39
+ }
40
+
41
+ .pl-xs {
42
+ padding-left: $xs;
43
+ }
44
+
45
+ .px-xs {
46
+ padding-left: $xs;
47
+ padding-right: $xs;
48
+ }
49
+
50
+ .py-xs {
51
+ padding-top: $xs;
52
+ padding-bottom: $xs;
53
+ }
54
+
55
+ .p-sm {
56
+ padding: $sm;
57
+ }
58
+
59
+ .pt-sm {
60
+ padding-top: $sm;
61
+ }
62
+
63
+ .pb-sm {
64
+ padding-bottom: $sm;
65
+ }
66
+
67
+ .pr-sm {
68
+ padding-right: $sm;
69
+ }
70
+
71
+ .pl-sm {
72
+ padding-left: $sm;
73
+ }
74
+
75
+ .px-sm {
76
+ padding-left: $sm;
77
+ padding-right: $sm;
78
+ }
79
+
80
+ .py-sm {
81
+ padding-top: $sm;
82
+ padding-bottom: $sm;
83
+ }
84
+
85
+ .p-md {
86
+ padding: $md;
87
+ }
88
+
89
+ .pt-md {
90
+ padding-top: $md;
91
+ }
92
+
93
+ .pb-md {
94
+ padding-bottom: $md;
95
+ }
96
+
97
+ .pr-md {
98
+ padding-right: $md;
99
+ }
100
+
101
+ .pl-md {
102
+ padding-left: $md;
103
+ }
104
+
105
+ .px-md {
106
+ padding-left: $md;
107
+ padding-right: $md;
108
+ }
109
+
110
+ .py-md {
111
+ padding-top: $md;
112
+ padding-bottom: $md;
113
+ }
114
+
115
+ .p-lg {
116
+ padding: $lg;
117
+ }
118
+
119
+ .pt-lg {
120
+ padding-top: $lg;
121
+ }
122
+
123
+ .pb-lg {
124
+ padding-bottom: $lg;
125
+ }
126
+
127
+ .pr-lg {
128
+ padding-right: $lg;
129
+ }
130
+
131
+ .pl-lg {
132
+ padding-left: $lg;
133
+ }
134
+
135
+ .px-lg {
136
+ padding-left: $lg;
137
+ padding-right: $lg;
138
+ }
139
+
140
+ .py-lg {
141
+ padding-top: $lg;
142
+ padding-bottom: $lg;
143
+ }
144
+
145
+ .p-xl {
146
+ padding: $xl;
147
+ }
148
+
149
+ .pt-xl {
150
+ padding-top: $xl;
151
+ }
152
+
153
+ .pb-xl {
154
+ padding-bottom: $xl;
155
+ }
156
+
157
+ .pr-xl {
158
+ padding-right: $xl;
159
+ }
160
+
161
+ .pl-xl {
162
+ padding-left: $xl;
163
+ }
164
+
165
+ .px-xl {
166
+ padding-left: $xl;
167
+ padding-right: $xl;
168
+ }
169
+
170
+ .py-xl {
171
+ padding-top: $xl;
172
+ padding-bottom: $xl;
173
+ }
174
+
175
+ .p-xxl {
176
+ padding: $xxl;
177
+ }
178
+
179
+ .pt-xxl {
180
+ padding-top: $xxl;
181
+ }
182
+
183
+ .pb-xxl {
184
+ padding-bottom: $xxl;
185
+ }
186
+
187
+ .pr-xxl {
188
+ padding-right: $xxl;
189
+ }
190
+
191
+ .pl-xxl {
192
+ padding-left: $xxl;
193
+ }
194
+
195
+ .px-xxl {
196
+ padding-left: $xxl;
197
+ padding-right: $xxl;
198
+ }
199
+
200
+ .py-xxl {
201
+ padding-top: $xxl;
202
+ padding-bottom: $xxl;
203
+ }
204
+
205
+ /***************************************************************************
206
+ * *
207
+ * Layout Widths *
208
+ * *
209
+ **************************************************************************/
210
+
211
+ .width-5p {
212
+ width: 5%;
213
+ }
214
+
215
+ .width-10p {
216
+ width: 10%;
217
+ }
218
+
219
+ .width-15p {
220
+ width: 15%;
221
+ }
222
+
223
+ .width-20p {
224
+ width: 20%;
225
+ }
226
+
227
+ .width-25p {
228
+ width: 25%;
229
+ }
230
+
231
+ .width-30p {
232
+ width: 30%;
233
+ }
234
+
235
+ .width-40p {
236
+ width: 40%;
237
+ }
238
+
239
+ .width-50p {
240
+ width: 50%;
241
+ }
242
+ }