@elderbyte/ngx-starter 19.0.1 → 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 +787 -198
  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
@@ -1,235 +0,0 @@
1
- @use 'sass:map';
2
- @use '@angular/material' as mat;
3
- @use '../theming/mat-icon-button-size' as icon-button-size;
4
- @use '../theming/elder-typography-utils' as elder-typography;
5
-
6
- @mixin mdc-theme-support($config-or-theme) {
7
- $color: mat.m2-get-color-config($config-or-theme);
8
- $typography: elder-typography.get-typography-config($config-or-theme);
9
-
10
- @if $color != null {
11
- @include _color-support($color);
12
- }
13
-
14
- @if $typography != null {
15
- @include _typography-support($typography);
16
- }
17
-
18
- /**
19
- * This class should be applied to "controls"
20
- * which themself contain a mat-form-field.
21
- */
22
- .elder-form-field-host {
23
- display: inline-flex;
24
- flex-direction: column;
25
- min-width: 0;
26
- }
27
- }
28
-
29
- @mixin _typography-support($typography-config) {
30
- $config: $typography-config;
31
-
32
- // The unit-less line-height from the font config.
33
- $line-height: mat.m2-line-height($config, body-1);
34
- $font-size: mat.m2-font-size($config, body-1);
35
- $line-height-em: elder-typography.coerce-unitless-to-em($line-height);
36
-
37
- // $control-button-size: 24px; // $line-height-em
38
- $control-button-size: var(--mdc-typography-body1-line-height, 24px);
39
- $control-icon-size: 20px;
40
-
41
- .elder-mdc-input-fix {
42
- max-height: $control-button-size;
43
- }
44
-
45
- .mat-mdc-icon-button.elder-control-icon-button {
46
- @include icon-button-size.matIconButtonSize($control-button-size, $control-icon-size); // 0.6
47
- }
48
-
49
- .mat-datepicker-toggle.elder-control-icon-button {
50
- max-height: $control-button-size;
51
- max-width: $control-button-size;
52
-
53
- .mat-mdc-icon-button {
54
- @include icon-button-size.matIconButtonSize($control-button-size, $control-icon-size); // 0.6
55
- }
56
- }
57
- }
58
-
59
- @mixin _color-support($color-config) {
60
- @include _mdc-control-icon($color-config);
61
- @include _mdc-mat-toolbar($color-config);
62
- @include _mdc-mat-snack-bar($color-config);
63
- }
64
-
65
- /**
66
- * The snackbar has a light background in dark, and a dark background in light theme.
67
- * Therefore, text/contrast colors need to be inverted inside the snackbar.
68
- */
69
- @mixin _mdc-mat-snack-bar($color-config) {
70
- $is-dark-theme: map.get($color-config, is-dark);
71
- $snackbar-text-color: if(
72
- $is-dark-theme,
73
- var(--mdc-theme-text-primary-on-light),
74
- var(--mdc-theme-text-primary-on-dark)
75
- );
76
-
77
- .mat-mdc-snack-bar-container {
78
- color: $snackbar-text-color; // Fix the default text color in snackbar
79
- }
80
- }
81
-
82
- @mixin _mdc-mat-toolbar($color-config) {
83
- $foreground: map.get($color-config, foreground);
84
- $background: map.get($color-config, background);
85
- $primary: map.get($color-config, primary);
86
- $accent: map.get($color-config, accent);
87
- $warn: map.get($color-config, warn);
88
-
89
- .mat-toolbar {
90
- &.mat-primary {
91
- @include _form-field-palette($primary);
92
- }
93
-
94
- &.mat-accent {
95
- @include _form-field-palette($accent);
96
- }
97
-
98
- &.mat-warn {
99
- @include _form-field-palette($warn);
100
- }
101
- }
102
- }
103
-
104
- @mixin _mdc-control-icon($color-config) {
105
- $foreground: map.get($color-config, foreground);
106
- $background: map.get($color-config, background);
107
- $primary: map.get($color-config, primary);
108
- $accent: map.get($color-config, accent);
109
- $warn: map.get($color-config, warn);
110
-
111
- .elder-mdc-control-icon {
112
- color: mat.m2-get-color-from-palette($foreground, secondary-text);
113
- }
114
-
115
- .mat-mdc-form-field {
116
- &.mat-focused {
117
- &.mat-primary {
118
- .elder-mdc-control-icon,
119
- .elder-control-icon-button {
120
- color: mat.m2-get-color-from-palette($primary, text);
121
- }
122
- }
123
-
124
- &.mat-accent {
125
- .elder-mdc-control-icon,
126
- .elder-control-icon-button {
127
- color: mat.m2-get-color-from-palette($accent, text);
128
- }
129
- }
130
-
131
- &.mat-warn {
132
- .elder-mdc-control-icon,
133
- .elder-control-icon-button {
134
- color: mat.m2-get-color-from-palette($warn, text);
135
- }
136
- }
137
- }
138
-
139
- &.mat-form-field-invalid {
140
- .elder-mdc-control-icon,
141
- .elder-control-icon-button {
142
- color: mat.m2-get-color-from-palette($warn, text);
143
- }
144
- }
145
-
146
- &.mat-form-field-disabled {
147
- .elder-mdc-control-icon,
148
- .elder-control-icon-button {
149
- color: mat.m2-get-color-from-palette($foreground, disabled-text);
150
- }
151
- }
152
- }
153
- }
154
-
155
- @mixin _form-field-palette($palette) {
156
- $contrast-color: mat.m2-get-color-from-palette($palette, default-contrast);
157
- $contrast-color-inactive: rgba($contrast-color, 0.5);
158
-
159
- .mat-mdc-slide-toggle .mdc-form-field {
160
- background: mat.m2-get-color-from-palette($palette);
161
- color: $contrast-color;
162
- }
163
-
164
- .mat-mdc-form-field.mat-form-field-appearance-outline {
165
- background: mat.m2-get-color-from-palette($palette);
166
- color: $contrast-color;
167
-
168
- .mdc-text-field__input {
169
- background: mat.m2-get-color-from-palette($palette);
170
- color: $contrast-color;
171
- caret-color: currentColor;
172
- }
173
-
174
- .mat-mdc-select-value {
175
- color: $contrast-color;
176
- }
177
-
178
- ::placeholder,
179
- .mat-mdc-select-placeholder {
180
- color: $contrast-color-inactive;
181
- }
182
-
183
- .elder-mdc-control-icon,
184
- .elder-control-icon-button,
185
- .mat-mdc-select-arrow {
186
- color: $contrast-color-inactive;
187
- }
188
-
189
- .mdc-notched-outline {
190
- .mdc-notched-outline__leading {
191
- border-color: $contrast-color-inactive;
192
- }
193
-
194
- .mdc-notched-outline__notch {
195
- border-color: $contrast-color-inactive;
196
-
197
- .mat-mdc-floating-label {
198
- color: $contrast-color-inactive;
199
- }
200
- }
201
-
202
- .mdc-notched-outline__trailing {
203
- border-color: $contrast-color-inactive;
204
- }
205
- }
206
-
207
- &.mat-focused {
208
- .mat-mdc-select-arrow,
209
- .elder-mdc-control-icon,
210
- .elder-control-icon-button {
211
- color: $contrast-color;
212
- }
213
- }
214
-
215
- &:hover {
216
- .mdc-notched-outline {
217
- .mdc-notched-outline__leading {
218
- border-color: $contrast-color;
219
- }
220
-
221
- .mdc-notched-outline__notch {
222
- border-color: $contrast-color;
223
-
224
- .mat-mdc-floating-label {
225
- color: $contrast-color;
226
- }
227
- }
228
-
229
- .mdc-notched-outline__trailing {
230
- border-color: $contrast-color;
231
- }
232
- }
233
- }
234
- }
235
- }
@@ -1,148 +0,0 @@
1
- @use '@angular/material' as mat;
2
- @use 'sass:map';
3
-
4
- /***************************************************************************
5
- * *
6
- * Overriding Material Base Variables *
7
- * *
8
- **************************************************************************/
9
-
10
- $dark-primary-text: rgba(black, 0.87);
11
- $light-primary-text: white;
12
-
13
- /***************************************************************************
14
- * *
15
- * Material Color Palettes *
16
- * *
17
- **************************************************************************/
18
-
19
- // ElderByte Theme
20
-
21
- $elder-blue: (
22
- 50: #dfe3e8,
23
- 100: #b3bcc8,
24
- 200: #8593a7,
25
- 300: #546883,
26
- 400: #2f4869,
27
- 500: #0b284f,
28
- // Official Main Color tone: #002852 (#0B284F)
29
- 600: #0a2448,
30
- 700: #092040,
31
- 800: #081c38,
32
- 900: #061529,
33
- A100: #809ec5,
34
- A200: #5179bf,
35
- A400: #004390,
36
- A700: #00006b,
37
- contrast: (
38
- 50: $dark-primary-text,
39
- 100: $dark-primary-text,
40
- 200: $dark-primary-text,
41
- 300: $dark-primary-text,
42
- 400: $light-primary-text,
43
- 500: $light-primary-text,
44
- 600: $light-primary-text,
45
- 700: $light-primary-text,
46
- 800: $light-primary-text,
47
- 900: $light-primary-text,
48
- A100: $light-primary-text,
49
- A200: $light-primary-text,
50
- A400: $light-primary-text,
51
- A700: $light-primary-text,
52
- ),
53
- );
54
-
55
- $elder-gold: (
56
- 50: #f6f3ec,
57
- 100: #e8e1d1,
58
- 200: #dacfb4,
59
- 300: #ccbc96,
60
- 400: #c1ad80,
61
- 500: #b69f6a,
62
- // Official ElderByte Accent tone
63
- 600: #a69160,
64
- 700: #948156,
65
- 800: #81714b,
66
- 900: #5f5337,
67
- A100: #e1d1a9,
68
- A200: #efd08f,
69
- A400: #dbbe7a,
70
- A700: #af9144,
71
- contrast: (
72
- 50: $dark-primary-text,
73
- 100: $dark-primary-text,
74
- 200: $dark-primary-text,
75
- 300: $dark-primary-text,
76
- 400: $dark-primary-text,
77
- 500: $dark-primary-text,
78
- 600: $dark-primary-text,
79
- 700: $dark-primary-text,
80
- 800: $dark-primary-text,
81
- 900: $dark-primary-text,
82
- A100: $dark-primary-text,
83
- A200: $dark-primary-text,
84
- A400: $dark-primary-text,
85
- A700: $dark-primary-text,
86
- ),
87
- );
88
-
89
- /***************************************************************************
90
- * *
91
- * Dark Theme Palettes *
92
- * *
93
- **************************************************************************/
94
-
95
- $grey-palette: mat.$m2-grey-palette;
96
- $light-primary-text: rgba(white, 0.87);
97
- $light-secondary-text: rgba(white, 0.4);
98
- $light-disabled-text: rgba(white, 0.38);
99
- $light-dividers: rgba(white, 0.12);
100
- $light-focused: rgba(white, 0.12);
101
-
102
- $dark-background-dp-01: #1f1f1f; // 5%
103
- $dark-background-dp-02: #222222; // 7%
104
- $dark-background-dp-03: #262626; // 8%
105
- $dark-background-dp-04: #272727; // 9%
106
- $dark-background-dp-06: #2c2c2c; // 11%
107
- $dark-background-dp-08: #2d2d2d; // 12%
108
- $dark-background-dp-12: #333333; // 14%
109
-
110
- // Background palette for dark themes.
111
- $elder-dark-theme-background: (
112
- status-bar: black,
113
- app-bar: $dark-background-dp-01,
114
- background: #121212,
115
- // #121212
116
- hover: rgba(white, 0.04),
117
- card: $dark-background-dp-03,
118
- dialog: $dark-background-dp-12,
119
- // $my-dark-dp-06
120
- disabled-button: rgba(white, 0.12),
121
- raised-button: map.get($grey-palette, 800),
122
- focused-button: $light-focused,
123
- selected-button: map.get($grey-palette, 900),
124
- selected-disabled-button: map.get($grey-palette, 800),
125
- disabled-button-toggle: black,
126
- unselected-chip: map.get($grey-palette, 800),
127
- disabled-list-option: rgba(white, 0.12),
128
- tooltip: map.get($grey-palette, 800),
129
- );
130
-
131
- // Foreground palette for dark themes.
132
- $elder-dark-theme-foreground: (
133
- base: rgba(white, 0.87),
134
- divider: $light-dividers,
135
- dividers: $light-dividers,
136
- disabled: $light-disabled-text,
137
- disabled-button: rgba(white, 0.38),
138
- disabled-text: $light-disabled-text,
139
- elevation: black,
140
- hint-text: $light-disabled-text,
141
- secondary-text: $light-secondary-text,
142
- icon: rgba(white, 0.87),
143
- icons: rgba(white, 0.87),
144
- text: rgba(white, 0.87),
145
- slider-min: rgba(white, 0.87),
146
- slider-off: rgba(white, 0.38),
147
- slider-off-active: rgba(white, 0.38),
148
- );
@@ -1,67 +0,0 @@
1
- @use '@angular/material' as mat;
2
- @use 'sass:map';
3
-
4
- @mixin theme($theme) {
5
- @include _starter-scrollbar-theme($theme);
6
- }
7
-
8
- @mixin _starter-scrollbar-theme($theme) {
9
- $scrollbarStyling: map.get($theme, elder, scrollbar-styling);
10
-
11
- @if $scrollbarStyling {
12
- $primary: map-get($theme, primary);
13
- $accent: map-get($theme, accent);
14
- $warn: map-get($theme, warn);
15
- $background: map-get($theme, background);
16
- $foreground: map-get($theme, foreground);
17
- $commonSizes: map.get($theme, elder, common-sizes);
18
-
19
- @include scrollbar-width(map.get($commonSizes, sm)); // default
20
-
21
- .scrollbar-xs {
22
- @include scrollbar-width(map.get($commonSizes, xs));
23
- }
24
-
25
- .scrollbar-sm {
26
- @include scrollbar-width(map.get($commonSizes, sm));
27
- }
28
-
29
- .scrollbar-md {
30
- @include scrollbar-width(map.get($commonSizes, md));
31
- }
32
-
33
- .scrollbar-lg {
34
- @include scrollbar-width(map.get($commonSizes, lg));
35
- }
36
-
37
- .scrollbar-xl {
38
- @include scrollbar-width(map.get($commonSizes, xl));
39
- }
40
-
41
- .scrollbar-xxl {
42
- @include scrollbar-width(map.get($commonSizes, xxl));
43
- }
44
-
45
- /* Track */
46
- ::-webkit-scrollbar-track {
47
- // background: mat.get-color-from-palette($background, background);
48
- }
49
-
50
- /* Handle */
51
- ::-webkit-scrollbar-thumb {
52
- background: mat.m2-get-color-from-palette($primary);
53
- border-radius: 5px;
54
- }
55
-
56
- /* Handle on hover */
57
- ::-webkit-scrollbar-thumb:hover {
58
- background: mat.m2-get-color-from-palette($primary, 300);
59
- }
60
- }
61
- }
62
-
63
- @mixin scrollbar-width($width) {
64
- ::-webkit-scrollbar {
65
- width: $width;
66
- }
67
- }
@@ -1,216 +0,0 @@
1
- @use '@angular/material' as mat;
2
- @use '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
-
9
- // elder custom icons fill color
10
- .mat-icon.svg-icon-inherit-color svg * {
11
- fill: currentColor !important;
12
- }
13
- }
14
-
15
- @mixin _ng-style-fixes {
16
- // Trick to ensure flex functionality within router-outlet
17
- router-outlet.router-flex + * {
18
- display: flex;
19
- flex: 1 1 auto;
20
- flex-direction: column;
21
- height: 100%; // Required for Safari
22
- width: 100%;
23
- min-height: 0; // Fixes scrolling vert
24
- min-width: 0; // Fixes scrolling horz
25
- }
26
- }
27
-
28
- @mixin _mat-style-fixes($theme) {
29
- // Globally disable automatic scrolling of Material Drawer Container
30
- .mat-drawer-inner-container {
31
- overflow: hidden !important;
32
- }
33
-
34
- // Globally disable automatic scrolling of Material Drawer Content
35
- .mat-drawer-content {
36
- overflow: hidden !important;
37
- }
38
-
39
- /******************************
40
- Material tab fix
41
- *******************************/
42
-
43
- .mat-mdc-tab-body-wrapper {
44
- flex: 1 1 100% !important;
45
- height: 100% !important;
46
- }
47
-
48
- .mat-mdc-tab-body {
49
- display: flex !important;
50
- flex-direction: column;
51
- }
52
-
53
- /*
54
- .mat-tab-body-content {
55
- display: flex;
56
- flex-direction: column;
57
- flex-grow: 1;
58
- height: 100% !important;
59
- overflow: hidden !important; // Globally disable automatic scrolling of Material Tabs
60
- }*/
61
-
62
- /******************************
63
- Material Chip fix
64
- *******************************/
65
-
66
- .mat-mdc-chip {
67
- // Fixes default avatar on attribute usage (<mat-chip-avatar> vs matChipAvatar) which is broken in Angular Material 15.0.0
68
- mat-chip-avatar {
69
- .mat-icon {
70
- width: 18px;
71
- height: 18px;
72
- line-height: 18px;
73
- font-size: 18px;
74
- }
75
-
76
- img {
77
- width: 18px;
78
- height: 18px;
79
- overflow: hidden;
80
- border-radius: 9px;
81
- }
82
- }
83
- }
84
-
85
- /******************************
86
- Material Badge Index
87
- *******************************/
88
-
89
- .mat-badge-content {
90
- z-index: 1;
91
- }
92
-
93
- .mat-mdc-form-field-has-icon-prefix .mat-mdc-text-field-wrapper {
94
- padding-left: 0 !important;
95
- }
96
-
97
- .mat-mdc-form-field-has-icon-suffix .mat-mdc-text-field-wrapper {
98
- padding-right: 0 !important;
99
- }
100
-
101
- .mat-mdc-form-field:not(.mat-mdc-form-field.elder-dense) {
102
- $density: map-get($theme, elder, density, form-field);
103
-
104
- /******************************
105
- Fix big paddings for dense form fields
106
- *******************************/
107
-
108
- .mat-mdc-text-field-wrapper {
109
- padding-left: calc-side-paddings($density);
110
- padding-right: calc-side-paddings($density);
111
- }
112
-
113
- /******************************
114
- Fix icon size and placement in mat label
115
- *******************************/
116
-
117
- @include mixins.form-field-icons($density);
118
-
119
- /******************************
120
- Fix text and hover placement of small filled form fields
121
- *******************************/
122
-
123
- $mat-mdc-form-field-label-transform: 0.75;
124
- $mat-mdc-form-field-label-offset-x: -16px;
125
- $form-field-density: map-get($theme, elder, density, form-field);
126
-
127
- @if $form-field-density < -1 {
128
- .mdc-text-field--filled {
129
- .mdc-floating-label--float-above {
130
- transform: var(
131
- $mat-mdc-form-field-label-transform,
132
- translateY(-50%)
133
- translateX(calc(1 * (44px + var($mat-mdc-form-field-label-offset-x, 0px))))
134
- ) !important;
135
- }
136
-
137
- .mat-mdc-form-field-infix {
138
- padding-top: calc-padding-top-form-field-inflix($form-field-density) !important;
139
- padding-bottom: 2px !important;
140
- min-height: 40px; // (24 + 2*16) = 56px by default
141
- }
142
- }
143
- }
144
-
145
- /******************************
146
- Material Form Field Label stealing clicks
147
- *******************************/
148
-
149
- .mat-mdc-floating-label.mdc-floating-label {
150
- pointer-events: none !important;
151
-
152
- mat-label {
153
- pointer-events: none !important;
154
- }
155
- }
156
-
157
- .mdc-notched-outline__notch {
158
- pointer-events: none !important;
159
-
160
- .mdc-floating-label {
161
- pointer-events: none !important;
162
-
163
- mat-label {
164
- pointer-events: none !important;
165
- }
166
- }
167
- }
168
-
169
- .mat-mdc-form-field-error-wrapper {
170
- display: flex;
171
- padding-right: 0;
172
- }
173
- }
174
-
175
- /******************************
176
- Material chip make regular chips clickable when applying this class
177
- *******************************/
178
-
179
- .clickable-chip {
180
- .mat-mdc-chip-action {
181
- cursor: pointer;
182
- }
183
- }
184
- }
185
-
186
- .mat-mdc-text-field-wrapper:not(.mdc-text-field--outlined) .mat-mdc-floating-label {
187
- display: block !important;
188
- }
189
-
190
- @function calc-side-paddings($density) {
191
- $paddingDensityNeg4: 8px;
192
- $paddingDensityNeg3: 10px;
193
- $paddingDensityNeg2: 12px;
194
- $paddingDensityNeg1: 14px;
195
- $paddingDensity0: 16px;
196
-
197
- @if $density == -4 {
198
- @return $paddingDensityNeg4;
199
- } @else if $density == -3 {
200
- @return $paddingDensityNeg3;
201
- } @else if $density == -2 {
202
- @return $paddingDensityNeg2;
203
- } @else if $density == -1 {
204
- @return $paddingDensityNeg1;
205
- } @else if $density == 0 {
206
- @return $paddingDensity0;
207
- }
208
- }
209
-
210
- @function calc-padding-top-form-field-inflix($density) {
211
- @if $density > -3 {
212
- @return 20px;
213
- } @else {
214
- @return 14px;
215
- }
216
- }
@@ -1,51 +0,0 @@
1
- @use '@angular/material' as mat;
2
- @use 'sass:map';
3
- @use 'elder-palettes' as palettes;
4
-
5
- /***************************************************************************
6
- * *
7
- * Public API *
8
- * *
9
- **************************************************************************/
10
-
11
- @function define-dark-elder-theme($config) {
12
- $result: $config;
13
- @if map.get($config, color) {
14
- $color-settings: map.get($config, color);
15
- $primary: map.get($color-settings, primary);
16
- $accent: map.get($color-settings, accent);
17
- $warn: map.get($color-settings, warn);
18
- $result: map.merge(
19
- $config,
20
- (
21
- color: _mat-create-dark-color-config($primary, $accent, $warn),
22
- )
23
- );
24
- }
25
- @return _create-backwards-compatibility-theme($result);
26
- }
27
-
28
- /***************************************************************************
29
- * *
30
- * Private functions *
31
- * *
32
- **************************************************************************/
33
-
34
- @function _mat-create-dark-color-config($primary, $accent, $warn: null) {
35
- @return (
36
- primary: $primary,
37
- accent: $accent,
38
- warn: if($warn != null, $warn, mat.m2-define-palette(mat.$m2-red-palette)),
39
- is-dark: true,
40
- foreground: palettes.$elder-dark-theme-foreground,
41
- background: palettes.$elder-dark-theme-background
42
- );
43
- }
44
-
45
- @function _create-backwards-compatibility-theme($theme) {
46
- @if not map.get($theme, color) {
47
- @return $theme;
48
- }
49
- $color: map.get($theme, color);
50
- @return map.merge($theme, $color);
51
- }