@energycap/components 0.44.2-github-actions.20250919-1816 → 0.44.2-github-actions.20250919-1421

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 (184) hide show
  1. package/README.md +188 -188
  2. package/esm2022/lib/components.module.mjs +1 -1
  3. package/esm2022/lib/controls/banner/banner.component.mjs +3 -3
  4. package/esm2022/lib/controls/button/button.component.mjs +3 -3
  5. package/esm2022/lib/controls/button/copy-button-base.directive.mjs +1 -1
  6. package/esm2022/lib/controls/button/copy-button.directive.mjs +1 -1
  7. package/esm2022/lib/controls/button/copy-table-button.directive.mjs +1 -1
  8. package/esm2022/lib/controls/calendar/calendar-item.component.mjs +1 -1
  9. package/esm2022/lib/controls/calendar/calendar.component.mjs +3 -3
  10. package/esm2022/lib/controls/calendar/calendar.types.mjs +1 -1
  11. package/esm2022/lib/controls/checkbox/checkbox.component.mjs +3 -3
  12. package/esm2022/lib/controls/collapsible-toggle/collapsible-toggle.component.mjs +1 -1
  13. package/esm2022/lib/controls/combobox/combobox.component.mjs +3 -3
  14. package/esm2022/lib/controls/date-input/date-input-selection-strategies/date-input-selection-strategy-base.mjs +1 -1
  15. package/esm2022/lib/controls/date-input/date-input-selection-strategies/day-selection-strategy.mjs +1 -1
  16. package/esm2022/lib/controls/date-input/date-input-selection-strategies/last-28-days-selection-strategy.mjs +1 -1
  17. package/esm2022/lib/controls/date-input/date-input-selection-strategies/last-7-days-selection-strategy.mjs +1 -1
  18. package/esm2022/lib/controls/date-input/date-input-selection-strategies/month-selection-strategy.mjs +1 -1
  19. package/esm2022/lib/controls/date-input/date-input-selection-strategies/quarter-selection-strategy.mjs +1 -1
  20. package/esm2022/lib/controls/date-input/date-input-selection-strategies/range-selection-strategy.mjs +1 -1
  21. package/esm2022/lib/controls/date-input/date-input-selection-strategies/year-selection-strategy.mjs +1 -1
  22. package/esm2022/lib/controls/date-input/date-input.component.mjs +3 -3
  23. package/esm2022/lib/controls/date-input/date-input.types.mjs +1 -1
  24. package/esm2022/lib/controls/dropdown/dropdown.component.mjs +3 -3
  25. package/esm2022/lib/controls/file-upload/file-upload.component.mjs +3 -3
  26. package/esm2022/lib/controls/form-control/form-control.component.mjs +3 -3
  27. package/esm2022/lib/controls/form-control-base.mjs +1 -1
  28. package/esm2022/lib/controls/form-control-label/form-control-label.component.mjs +3 -3
  29. package/esm2022/lib/controls/form-group/form-group.component.mjs +3 -3
  30. package/esm2022/lib/controls/help-popover/help-popover.component.mjs +3 -3
  31. package/esm2022/lib/controls/item-picker/item-picker.component.mjs +3 -3
  32. package/esm2022/lib/controls/link-button/link-button.component.mjs +1 -1
  33. package/esm2022/lib/controls/menu/menu.component.mjs +3 -3
  34. package/esm2022/lib/controls/navigation/link-item.mjs +1 -1
  35. package/esm2022/lib/controls/navigation/nav-group.mjs +1 -1
  36. package/esm2022/lib/controls/navigation/nav-item-active.directive.mjs +1 -1
  37. package/esm2022/lib/controls/navigation/nav-item.mjs +1 -1
  38. package/esm2022/lib/controls/numericbox/numericbox.component.mjs +3 -3
  39. package/esm2022/lib/controls/popover/popover.component.mjs +3 -3
  40. package/esm2022/lib/controls/radio-button/radio-button-option.mjs +1 -1
  41. package/esm2022/lib/controls/radio-button/radio-button.component.mjs +3 -3
  42. package/esm2022/lib/controls/select/select.component.mjs +3 -3
  43. package/esm2022/lib/controls/tabs/tabs.component.mjs +3 -3
  44. package/esm2022/lib/controls/textbox/textbox.component.mjs +3 -3
  45. package/esm2022/lib/core/cache.service.mjs +1 -1
  46. package/esm2022/lib/core/custom-validators.mjs +1 -1
  47. package/esm2022/lib/core/date-time-helper.mjs +1 -1
  48. package/esm2022/lib/core/error.service.mjs +1 -1
  49. package/esm2022/lib/core/router-helper.service.mjs +1 -1
  50. package/esm2022/lib/core/scroll.service.mjs +1 -1
  51. package/esm2022/lib/core/telemetry-tracker.service.mjs +1 -1
  52. package/esm2022/lib/core/telemetry.service.mjs +1 -1
  53. package/esm2022/lib/core/validation-message.service.mjs +1 -1
  54. package/esm2022/lib/core/validation-patterns.mjs +1 -1
  55. package/esm2022/lib/core/window.service.mjs +1 -1
  56. package/esm2022/lib/display/app-bar/app-bar.component.mjs +3 -3
  57. package/esm2022/lib/display/avatar/avatar.component.mjs +1 -1
  58. package/esm2022/lib/display/avatar/avatar.service.mjs +1 -1
  59. package/esm2022/lib/display/confirm/confirm.component.mjs +3 -3
  60. package/esm2022/lib/display/dialog/dialog-content.mjs +1 -1
  61. package/esm2022/lib/display/dialog/dialog-group/dialog-group.component.mjs +3 -3
  62. package/esm2022/lib/display/dialog/dialog-types.mjs +1 -1
  63. package/esm2022/lib/display/dialog/dialog.component.mjs +1 -1
  64. package/esm2022/lib/display/dialog/dialog.service.mjs +1 -1
  65. package/esm2022/lib/display/help/help-types.mjs +1 -1
  66. package/esm2022/lib/display/hierarchy/hierarchy-base.mjs +1 -1
  67. package/esm2022/lib/display/hierarchy/hierarchy-mocks.spec.mjs +1 -1
  68. package/esm2022/lib/display/hierarchy/hierarchy-tree/hierarchy-tree.component.mjs +3 -3
  69. package/esm2022/lib/display/item-display/item-display.component.mjs +3 -3
  70. package/esm2022/lib/display/json-display/json-display.component.mjs +3 -3
  71. package/esm2022/lib/display/resizable/resizable-base.mjs +1 -1
  72. package/esm2022/lib/display/resizable/resizable.component.mjs +7 -7
  73. package/esm2022/lib/display/spinner/spinner.component.mjs +3 -3
  74. package/esm2022/lib/display/splash/splash.component.mjs +3 -3
  75. package/esm2022/lib/display/splash/splash.service.mjs +1 -1
  76. package/esm2022/lib/display/table/resizable-column.component.mjs +3 -3
  77. package/esm2022/lib/display/table/resizable-table.directive.mjs +1 -1
  78. package/esm2022/lib/display/table/searchable-table.component.mjs +3 -3
  79. package/esm2022/lib/display/table/table-detail-row.component.mjs +11 -11
  80. package/esm2022/lib/display/table/table-locked-column.component.mjs +1 -1
  81. package/esm2022/lib/display/table/table-master-header-row.component.mjs +1 -1
  82. package/esm2022/lib/display/table/table-master-row.component.mjs +3 -3
  83. package/esm2022/lib/display/table/table-pagination.component.mjs +3 -3
  84. package/esm2022/lib/display/table/table-selectable-row.component.mjs +3 -3
  85. package/esm2022/lib/display/table/table.component.mjs +3 -3
  86. package/esm2022/lib/display/tags/tag.mjs +1 -1
  87. package/esm2022/lib/display/tags/tags.component.mjs +3 -3
  88. package/esm2022/lib/display/toast/toast/toast.component.mjs +3 -3
  89. package/esm2022/lib/display/toast/toast-types.mjs +1 -1
  90. package/esm2022/lib/display/toast/toast.service.mjs +1 -1
  91. package/esm2022/lib/display/toast/toaster/toaster.component.mjs +3 -3
  92. package/esm2022/lib/display/tooltip/tooltip.component.mjs +3 -3
  93. package/esm2022/lib/display/tooltip/tooltip.service.mjs +1 -1
  94. package/esm2022/lib/display/tooltip-directive/tooltip.directive.mjs +1 -1
  95. package/esm2022/lib/display/tree/tree.component.mjs +3 -3
  96. package/esm2022/lib/display/view-overlay/view-overlay.component.mjs +3 -3
  97. package/esm2022/lib/shared/directives/click-area-for/click-area-for.directive.mjs +1 -1
  98. package/esm2022/lib/shared/directives/if-viewport-width/if-viewport-width.directive.mjs +1 -1
  99. package/esm2022/lib/shared/directives/keyboard-nav-container/keyboard-nav-container.directive.mjs +1 -1
  100. package/esm2022/lib/shared/directives/popup/popup-container.directive.mjs +1 -1
  101. package/esm2022/lib/shared/display/pipes/date-display-2.pipe.mjs +1 -1
  102. package/esm2022/lib/shared/display/pipes/date-display.pipe.mjs +1 -1
  103. package/esm2022/lib/shared/display/pipes/highlight-text.pipe.mjs +1 -1
  104. package/esm2022/lib/shared/display/pipes/relative-date.pipe.mjs +1 -1
  105. package/esm2022/lib/shared/display/pipes/row-count.pipe.mjs +1 -1
  106. package/esm2022/lib/shared/display/pipes/time-display.pipe.mjs +1 -1
  107. package/esm2022/lib/shared/display.mjs +1 -1
  108. package/esm2022/lib/shared/form-group.helper.mjs +1 -1
  109. package/esm2022/lib/shared/json-helper.mjs +1 -1
  110. package/esm2022/lib/shared/lodash-helper.mjs +1 -1
  111. package/esm2022/lib/shared/page/page-base/page-base.component.mjs +1 -1
  112. package/esm2022/lib/shared/page/page-statuses.mjs +1 -1
  113. package/esm2022/lib/shared/page/page-title/page-title.component.mjs +3 -3
  114. package/esm2022/lib/shared/page/page-view/page-view.component.mjs +3 -3
  115. package/esm2022/lib/shared/testing/copy-button-base-test-injector-factory.spec.mjs +1 -1
  116. package/esm2022/lib/shared/testing/hierarchy-base-test-injector-factory.spec.mjs +1 -1
  117. package/esm2022/lib/shared/testing/page-base-component-test-helper.spec.mjs +1 -1
  118. package/esm2022/lib/shared/testing/page-base-component-test-injector-factory.spec.mjs +1 -1
  119. package/esm2022/lib/shared/testing/public-mocks.spec.mjs +1 -1
  120. package/esm2022/lib/shared/testing/spy-factory.spec.mjs +1 -1
  121. package/esm2022/lib/shared/testing/translation-mocks.spec.mjs +1 -1
  122. package/esm2022/lib/shared/user-preference.service.mjs +1 -1
  123. package/esm2022/lib/shared/wizard/wizard-base/wizard-base.component.mjs +1 -1
  124. package/esm2022/lib/shared/wizard/wizard-buttons/wizard-buttons.component.mjs +3 -3
  125. package/esm2022/lib/shared/wizard/wizard-progress/wizard-progress.component.mjs +3 -3
  126. package/esm2022/public-api.mjs +1 -1
  127. package/fesm2022/energycap-components.mjs +104 -104
  128. package/fesm2022/energycap-components.mjs.map +1 -1
  129. package/package.json +1 -1
  130. package/schematics/collection.json +4 -4
  131. package/src/assets/images/favicon-ech.svg +14 -14
  132. package/src/assets/images/favicon-esa.svg +6 -6
  133. package/src/assets/images/favicon-eum.svg +13 -13
  134. package/src/assets/images/favicon-whitelabel.svg +4 -4
  135. package/src/assets/images/favicon.svg +12 -12
  136. package/src/assets/images/icon-carbonhub.svg +10 -10
  137. package/src/assets/images/icon-eum.svg +5 -5
  138. package/src/assets/images/icon-ucp.svg +12 -12
  139. package/src/assets/images/icon-wattics.svg +5 -5
  140. package/src/assets/images/icon.svg +11 -11
  141. package/src/assets/images/logo.svg +10 -10
  142. package/src/assets/images/splash-electric.svg +3 -3
  143. package/src/assets/images/splash-interval.svg +3 -3
  144. package/src/assets/images/splash-seedling.svg +11 -11
  145. package/src/assets/images/splash-water.svg +3 -3
  146. package/src/assets/locales/en_US.json +58 -58
  147. package/src/assets/scripts/unsupported-browser.js +17 -17
  148. package/src/styles/_base.scss +38 -38
  149. package/src/styles/_colors.scss +96 -96
  150. package/src/styles/_core.scss +3 -3
  151. package/src/styles/_functions.scss +114 -114
  152. package/src/styles/_global-variables.scss +229 -229
  153. package/src/styles/_icons.scss +23 -23
  154. package/src/styles/bootstrap/_grid.scss +33 -33
  155. package/src/styles/bootstrap/_reboot.scss +322 -322
  156. package/src/styles/components/_card.scss +21 -21
  157. package/src/styles/components/_link-icons.scss +37 -37
  158. package/src/styles/components/_splash.scss +150 -150
  159. package/src/styles/components/_tag.scss +18 -18
  160. package/src/styles/components/_unsupported-browsers.scss +23 -23
  161. package/src/styles/email/_email-base.scss +227 -227
  162. package/src/styles/email/email.scss +42 -42
  163. package/src/styles/index.scss +28 -28
  164. package/src/styles/mixins/_animations.scss +17 -17
  165. package/src/styles/mixins/_button-base.scss +185 -185
  166. package/src/styles/mixins/_card-base.scss +40 -40
  167. package/src/styles/mixins/_common.scss +51 -51
  168. package/src/styles/mixins/_dialog-base.scss +95 -95
  169. package/src/styles/mixins/_form-control-base.scss +640 -640
  170. package/src/styles/mixins/_login.scss +74 -74
  171. package/src/styles/mixins/_menu-base.scss +153 -153
  172. package/src/styles/mixins/_overlay-base.scss +32 -32
  173. package/src/styles/mixins/_resizable-base.scss +57 -57
  174. package/src/styles/mixins/_spinner-base.scss +34 -34
  175. package/src/styles/mixins/_table-base.scss +297 -297
  176. package/src/styles/mixins/_tabs-base.scss +146 -146
  177. package/src/styles/mixins/_tags-base.scss +121 -121
  178. package/src/styles/mixins/_text.scss +89 -89
  179. package/src/styles/mixins.scss +14 -14
  180. package/src/styles/utilities/_borders.scss +29 -29
  181. package/src/styles/utilities/_common.scss +49 -49
  182. package/src/styles/utilities/_layout.scss +115 -115
  183. package/src/styles/utilities/_spacing.scss +64 -64
  184. package/src/styles/utilities/_text.scss +139 -139
@@ -1,641 +1,641 @@
1
- @use "sass:math";
2
-
3
- @import '../icons';
4
-
5
- $form-control-icon-size: 1rem;
6
- $form-control-font-size: 1rem;
7
- $form-control-icon-position: .5rem center;
8
- $form-control-label-size: var(--ec-font-size-label);
9
- $form-control-height: 2rem;
10
- $form-control-line-height: 1.25rem;
11
- $form-control-padding-x: .5rem;
12
- $form-control-spacing-y: 1rem;
13
- $form-control-padding-y: .3125rem;
14
-
15
- $checkbox-indicator-size: $form-control-icon-size;
16
-
17
- @mixin form-control-input-base {
18
- &::selection {
19
- background-color: var(--ec-form-control-background-color-selection);
20
- color: var(--ec-form-control-color-selection);
21
- }
22
- &::-webkit-input-placeholder { /* Chrome/Opera/Safari */
23
- color: var(--ec-form-control-color-placeholder);
24
- }
25
- &::-moz-placeholder { /* Firefox 19+ */
26
- color: var(--ec-form-control-color-placeholder);
27
- opacity: 1;
28
- }
29
- &:-ms-input-placeholder { /* IE 10+ */
30
- color: var(--ec-form-control-color-placeholder);
31
- }
32
- &:-moz-placeholder { /* Firefox 18- */
33
- color: var(--ec-form-control-color-placeholder);
34
- opacity: 1;
35
- }
36
- }
37
-
38
- @mixin form-control-input-group-invalid {
39
- .textbox-group-input ::ng-deep .control input.ng-invalid,
40
- .textbox-group-input ::ng-deep .control input.ng-valid {
41
- @include form-control-state(invalid, input);
42
-
43
- background-image: none;
44
-
45
- & ~ .icon-invalid {
46
- display: inline-flex;
47
- position: absolute;
48
- left: .5rem;
49
- top: .5rem;
50
- z-index: 1;
51
- }
52
-
53
- & ~ .icon-required {
54
- display: none
55
- }
56
- }
57
-
58
- &:not(.open) {
59
- .textbox-group-btn-right ::ng-deep button{
60
- &:not(:focus) {
61
- border-color: var(--ec-form-control-border-color-invalid);
62
- }
63
- background-color: var(--ec-form-control-background-color-invalid);
64
- }
65
- }
66
- }
67
-
68
- /// Calculate the background properties for an input icon
69
- /// @param {string} $icon - The classname of the icon (matches the filename)
70
- /// @param {number} $width [$form-control-icon-size] - The width of the icon, converted to ems
71
- /// @param {number} $height [$form-control-icon-size] - The height of the icon, converted to ems
72
- /// @param {string|number|list} $position [$form-control-icon-position] - The background-position of the icon
73
- /// @param {number} $indent [$form-control-icon-size] - The amount to indent the text to allow room for the icon
74
- @mixin form-control-input-icon(
75
- $icon,
76
- $width: $form-control-icon-size,
77
- $height: $form-control-icon-size,
78
- $position: $form-control-icon-position,
79
- $indent: $form-control-icon-size + .25rem,
80
- ) {
81
- $size: $width, $height;
82
- @include icon-bg-image($icon, $position, $size);
83
- padding-left: ($indent + $form-control-padding-x);
84
- }
85
-
86
- @mixin form-control-state($state, $selector) {
87
- $icon-position: $form-control-icon-position;
88
-
89
- @if $selector == textarea {
90
- $icon-position: .5rem .5rem;
91
- }
92
-
93
- /// Required
94
- @if $state == required {
95
- // TODO: remove when all bootstrap and kendo controls have been replaced in EUM
96
- @include form-control-input-icon($required-icon, $position: $icon-position);
97
-
98
- /// Pending
99
- } @else if $state == pending {
100
-
101
- // TODO: remove when all bootstrap and kendo controls have been replaced in EUM
102
- @include form-control-input-icon(pending-icon(), $position: $icon-position);
103
-
104
- /// Invalid
105
- } @else if $state == invalid {
106
- background-color: var(--ec-form-control-background-color-invalid);
107
- border-color: var(--ec-form-control-border-color-invalid);
108
-
109
- &:focus {
110
- border-color: var(--ec-form-control-background-color-invalid);
111
- }
112
-
113
- // TODO: remove when all bootstrap and kendo controls have been replaced in EUM
114
- @include form-control-input-icon($invalid-icon, $position: $icon-position);
115
-
116
- /// Focus
117
- } @else if $state == focus {
118
- border-color: var(--ec-form-control-border-color-focus);
119
- box-shadow: var(--ec-form-control-box-shadow-focus);
120
- position: relative;
121
- z-index: 1;
122
-
123
- /// Disabled
124
- } @else if $state == disabled {
125
- background-color: var(--ec-form-control-background-color-disabled);
126
- border-color: var(--ec-form-control-border-color-disabled);
127
- color: var(--ec-form-control-color-disabled);
128
- opacity: var(--ec-form-control-opacity-disabled);
129
-
130
- &:required,
131
- &:required.is-empty {
132
- background-image: none;
133
- padding-left: $form-control-padding-x;
134
-
135
- // We need to define these again because the :required styles override
136
- // the background-color and border-color we set above
137
- background-color: var(--ec-form-control-background-color-disabled);
138
- border-color: var(--ec-form-control-border-color-disabled);
139
-
140
- & + .icon-required {
141
- display: none;
142
- }
143
- }
144
- }
145
- }
146
-
147
- /// A form control label
148
- @mixin form-control-label {
149
- color: var(--ec-form-control-label-color, var(--ec-color-secondary-dark));
150
- display: block;
151
- font-size: $form-control-label-size;
152
- line-height: 1;
153
- margin: calc(#{$form-control-label-size} / 2) 0;
154
- }
155
-
156
- /// The default form control element in the control component
157
- /// @param {string} $tag [input] - The HTML tag name of the input element (e.g. input, textarea)
158
- @mixin form-control-input($selector: input, $new-state-icons: false) {
159
- @include form-control-input-base;
160
- background-color: var(--ec-form-control-background-color);
161
- border: 1px solid var(--ec-form-control-border-color);
162
- border-radius: var(--ec-border-radius);
163
- background-image: none;
164
- background-clip: padding-box;
165
- width: 100%;
166
- line-height: $form-control-line-height;
167
- padding: $form-control-padding-y $form-control-padding-x;
168
-
169
- @if $selector == input {
170
- height: $form-control-height;
171
- } @else {
172
- height: auto;
173
- }
174
-
175
- & ~ .icon-required,
176
- & ~ .icon-invalid {
177
- color: var(--ec-form-control-border-color-invalid);
178
- }
179
-
180
- &:required {
181
- &.is-empty {
182
- @include form-control-state(required, $selector);
183
-
184
- @if $new-state-icons {
185
- background-image: none;
186
-
187
- & ~ .icon-required {
188
- display: inline-flex;
189
- position: absolute;
190
- left: .5rem;
191
- top: .5rem;
192
- z-index: 1;
193
- }
194
- }
195
- }
196
- }
197
-
198
- // Use .ng-invalid because not all Angular validators trigger :invalid
199
- &.ng-invalid {
200
- &.ng-touched {
201
- @include form-control-state(invalid, $selector);
202
-
203
- @if $new-state-icons {
204
- background-image: none;
205
-
206
- & ~ .icon-invalid {
207
- display: inline-flex;
208
- position: absolute;
209
- left: .5rem;
210
- top: .5rem;
211
- z-index: 1;
212
- }
213
-
214
- & ~ .icon-required {
215
- display: none
216
- }
217
- }
218
- }
219
- }
220
-
221
- &.is-pending {
222
- &.ng-valid,
223
- &.ng-invalid,
224
- &.ng-pending {
225
- @include form-control-state(pending, $selector);
226
-
227
- @if $new-state-icons {
228
- & ~ .icon-loading {
229
- display: inline-flex;
230
- position: absolute;
231
- left: .5rem;
232
- top: .5rem;
233
- z-index: 1;
234
- }
235
-
236
- & ~ .icon-required,
237
- & ~ .icon-invalid {
238
- display: none;
239
- }
240
- }
241
- }
242
- }
243
-
244
- &:focus,
245
- &:focus.is-empty {
246
- @include form-control-state(focus, $selector);
247
- }
248
-
249
- &:disabled {
250
- @include form-control-state(disabled, $selector);
251
- }
252
-
253
- &.is-uppercase:not(.is-empty) {
254
- text-transform: uppercase;
255
- }
256
- }
257
-
258
- /// The base styles of a control component. These styles will be applied to :host
259
- @mixin form-control-base() {
260
- color: var(--ec-form-control-color);
261
- // font-family: $control-font-family;
262
- font-size: var(--ec-form-control-font-size);
263
- display: block;
264
- margin-bottom: 1rem;
265
- width: 100%;
266
-
267
- :host-context(.form-condensed) {
268
- margin-bottom: .5rem;
269
- }
270
-
271
- .control {
272
- width: 100%;
273
- display: flex;
274
- flex-direction: column;
275
-
276
- &.control-label-bottom {
277
- flex-direction: column-reverse;
278
- }
279
-
280
- &.control-label-left {
281
- flex-direction: row;
282
- label {
283
- margin-right: .25rem;
284
- }
285
- }
286
-
287
- &.control-label-right {
288
- flex-direction: row-reverse;
289
- label {
290
- margin-left: .25rem;
291
- }
292
- }
293
-
294
- &.control-label-left,
295
- &.control-label-right {
296
- align-items: center;
297
-
298
- label {
299
- flex: 1 1;
300
- margin-top: 0;
301
- margin-bottom: 0;
302
- }
303
- .control-input {
304
- flex: 2 2;
305
- }
306
- }
307
-
308
- &.is-readonly {
309
- input,
310
- select,
311
- textarea {
312
- @include form-control-read-only;
313
- }
314
- }
315
-
316
- &.invalid {
317
- @include form-control-input-group-invalid;
318
- }
319
- }
320
-
321
- .textbox-group {
322
- display: flex;
323
- position: relative;
324
- }
325
-
326
- textarea:focus,
327
- input:focus,
328
- select:focus {
329
- outline: none;
330
- }
331
- }
332
-
333
- @mixin checkbox-radio {
334
- cursor: pointer;
335
- display: inline-flex;
336
- margin-bottom: 0;
337
- position: relative;
338
- }
339
-
340
- @mixin checkbox-radio-input(
341
- $type,
342
- $indicator-selector: '.indicator',
343
- $label-selector: '.label'
344
- ) {
345
- margin-top: .5rem;
346
- opacity: 0;
347
- position: absolute;
348
- z-index: -1;
349
-
350
- &:not(:checked) {
351
- + #{$indicator-selector} {
352
- color: var(--ec-form-control-border-color);
353
-
354
- &::before {
355
- display: none;
356
- }
357
- }
358
- }
359
-
360
- @if $type == 'checkbox' {
361
- &.indeterminate,
362
- &:indeterminate {
363
- + #{$indicator-selector} {
364
- color: var(--ec-color-interactive);
365
-
366
- &::before {
367
- content: '';
368
- background-color: currentColor;
369
- display: block;
370
- width: 10px;
371
- height: 3px;
372
- }
373
- }
374
- }
375
- }
376
-
377
- &:focus {
378
- + #{$indicator-selector} {
379
- color: var(--ec-color-interactive);
380
- box-shadow: var(--ec-form-control-box-shadow-focus);
381
- border-color: var(--ec-form-control-border-color-focus);
382
- }
383
- }
384
-
385
- &:disabled {
386
- + #{$indicator-selector} {
387
- color: var(--ec-form-control-color-disabled);
388
- background-color: var(--ec-form-control-background-color-disabled);
389
- border-color: var(--ec-form-control-border-color-disabled);
390
- opacity: var(--ec-form-control-opacity-disabled);
391
- }
392
-
393
- ~ #{$label-selector} {
394
- color: var(--ec-form-control-color-disabled);
395
- opacity: var(--ec-form-control-opacity-disabled);
396
- }
397
- }
398
- }
399
-
400
- @mixin checkbox-radio-indicator($type) {
401
- background-color: var(--ec-form-control-background-color);
402
- background-clip: padding-box;
403
- border: 1px solid currentColor;
404
- color: var(--ec-color-interactive);
405
- margin-top: .5rem;
406
- flex: none;
407
- pointer-events: none;
408
- display: inline-flex;
409
- align-items: center;
410
- justify-content: center;
411
- height: 1em;
412
- width: 1em;
413
-
414
- @if $type == 'radio' {
415
- border-radius: 50%;
416
-
417
- &::before {
418
- background-color: currentColor;
419
- content: "";
420
- display: block;
421
- width: .5em;
422
- height: .5em;
423
- border-radius: 50%;
424
- }
425
-
426
- } @else {
427
- border-radius: .125rem;
428
-
429
- &::before {
430
- font-size: .6875em;
431
- }
432
- }
433
- }
434
-
435
- @mixin checkbox-radio-label() {
436
- line-height: $form-control-line-height;
437
- padding: 0.375rem 0;
438
- margin-left: .5rem;
439
- min-height: $form-control-height;
440
- height: auto;
441
- }
442
-
443
- @mixin checkbox-radio-readonly(
444
- $input-selector: '.input',
445
- $indicator-selector: '.indicator',
446
- $label-selector: '.label'
447
- ) {
448
- pointer-events: none;
449
-
450
- #{$input-selector} {
451
- opacity: 0;
452
- }
453
-
454
- #{$indicator-selector} {
455
- background-color: var(--ec-form-control-background-color-readonly);
456
- border-color: var(--ec-form-control-border-color-readonly);
457
- }
458
-
459
- #{$label-selector},
460
- #{$indicator-selector} {
461
- opacity: 1;
462
- color: var(--ec-form-control-color);
463
- }
464
- }
465
-
466
- @mixin toggle() {
467
- font-size: var(--ec-form-control-font-size);
468
- background-color: var(--ec-border-color);
469
- border-radius: var(--ec-border-radius);
470
- border: 1px solid var(--ec-border-color);
471
- min-height: 2em;
472
- position: relative;
473
- color: var(--ec-color-secondary-dark);
474
- display: flex;
475
-
476
- input {
477
- position: absolute;
478
- z-index: -1;
479
- opacity: 0;
480
-
481
- &:checked {
482
- & + label {
483
- color: var(--ec-color-interactive);
484
- }
485
-
486
- &:last-of-type {
487
- & ~ a {
488
- transform: translateX(100%);
489
- }
490
- }
491
- }
492
-
493
- &:focus ~ .toggle-focused {
494
- display: block;
495
- }
496
- }
497
-
498
- .toggle-focused {
499
- position: absolute;
500
- top: 0;
501
- left: 0;
502
- bottom: 0;
503
- right: 0;
504
- box-shadow: var(--ec-form-control-box-shadow-focus);
505
- border-radius: var(--ec-form-control-border-radius);
506
- display: none;
507
- }
508
-
509
- label {
510
- align-items: center;
511
- cursor: pointer;
512
- display: flex;
513
- flex: 1 1 0%;
514
- justify-content: center;
515
- line-height: 1.1em;
516
- margin-bottom: 0;
517
- padding: 0.375rem .5rem;
518
- position: relative;
519
- text-align: center;
520
- transition: color .3s ease;
521
- z-index: 2;
522
-
523
- .ec-icon {
524
- color: inherit;
525
- }
526
- }
527
-
528
- a {
529
- border: 0.1875rem solid transparent;
530
- border-radius: calc(var(--ec-form-control-border-radius) * .75);
531
- display: block;
532
- height: 100%;
533
- left: 0;
534
- position: absolute;
535
- top: 0;
536
- transition: transform .25s ease;
537
- width: 50%;
538
- z-index: 1;
539
-
540
- .toggle-handle {
541
- background-color: var(--ec-form-control-background-color);
542
- border-radius: calc(var(--ec-form-control-border-radius) * .75);
543
- height: 100%;
544
- }
545
- }
546
-
547
- &.is-disabled {
548
- opacity: var(--ec-form-control-opacity-disabled);
549
- color: var(--ec-form-control-color-disabled);
550
-
551
- label {
552
- color: inherit !important;
553
- cursor: default;
554
- }
555
- }
556
- }
557
-
558
- @mixin toggle-options {
559
- @each $count in (3,4,5) {
560
- .toggle-options-#{$count} {
561
- a {
562
- width: percentage(math.div(1, $count));
563
- }
564
-
565
- input:checked:last-of-type ~ a {
566
- transform: translateX(percentage($count - 1));
567
- }
568
-
569
- @while $count > 2 {
570
- $count: $count - 1;
571
- input:checked:nth-of-type(#{$count}) ~ a {
572
- transform: translateX(percentage($count - 1));
573
- }
574
- }
575
- }
576
- }
577
- }
578
-
579
- @mixin form-heading() {
580
- @include form-control-label;
581
- font-weight: bold;
582
- }
583
-
584
- // Override the presentation of children controls when the parent control is
585
- // untouched
586
- @mixin form-control-untouched {
587
- input {
588
- &.ng-invalid.ng-touched {
589
- background-image: none;
590
- padding-left: $form-control-padding-x;
591
-
592
- &:not(.is-empty) ~ .units-left {
593
- left: 0;
594
- }
595
- }
596
- &:required:not(:disabled).is-empty {
597
- @include form-control-state(required, input);
598
-
599
- &:focus {
600
- @include form-control-state(focus, input);
601
- }
602
- }
603
- }
604
- }
605
-
606
- // Shared styles for controls that include a popup when the popup is open (combobox, dateinput)
607
- @mixin form-control-open() {
608
- .textbox-group {
609
- ec-textbox {
610
- --ec-form-control-box-shadow-focus: none;
611
- --ec-form-control-border-color-focus: var(--ec-form-control-border-color);
612
- }
613
-
614
- ec-button {
615
- --ec-button-box-shadow-focus-secondary: none;
616
- --ec-button-background-color-secondary: var(--ec-background-color-selected);
617
- }
618
- }
619
- }
620
-
621
- @mixin form-control-read-only {
622
- border-color: var(--ec-form-control-border-color-readonly);
623
- background-color: var(--ec-form-control-background-color-readonly);
624
- background-clip: border-box;
625
- background-image: none;
626
- color: var(--ec-form-control-color-readonly);
627
- opacity: 1;
628
- user-select: none;
629
- pointer-events: none;
630
- overflow: hidden;
631
- white-space: nowrap;
632
- }
633
-
634
- @mixin form-control-popup {
635
- background-color: var(--ec-background-color);
636
- border-radius: var(--ec-border-radius-card);
637
- box-shadow: var(--ec-box-shadow-overlay);
638
- margin-top: .25rem;
639
- overflow: hidden;
640
- z-index: var(--ec-z-index-popup);
1
+ @use "sass:math";
2
+
3
+ @import '../icons';
4
+
5
+ $form-control-icon-size: 1rem;
6
+ $form-control-font-size: 1rem;
7
+ $form-control-icon-position: .5rem center;
8
+ $form-control-label-size: var(--ec-font-size-label);
9
+ $form-control-height: 2rem;
10
+ $form-control-line-height: 1.25rem;
11
+ $form-control-padding-x: .5rem;
12
+ $form-control-spacing-y: 1rem;
13
+ $form-control-padding-y: .3125rem;
14
+
15
+ $checkbox-indicator-size: $form-control-icon-size;
16
+
17
+ @mixin form-control-input-base {
18
+ &::selection {
19
+ background-color: var(--ec-form-control-background-color-selection);
20
+ color: var(--ec-form-control-color-selection);
21
+ }
22
+ &::-webkit-input-placeholder { /* Chrome/Opera/Safari */
23
+ color: var(--ec-form-control-color-placeholder);
24
+ }
25
+ &::-moz-placeholder { /* Firefox 19+ */
26
+ color: var(--ec-form-control-color-placeholder);
27
+ opacity: 1;
28
+ }
29
+ &:-ms-input-placeholder { /* IE 10+ */
30
+ color: var(--ec-form-control-color-placeholder);
31
+ }
32
+ &:-moz-placeholder { /* Firefox 18- */
33
+ color: var(--ec-form-control-color-placeholder);
34
+ opacity: 1;
35
+ }
36
+ }
37
+
38
+ @mixin form-control-input-group-invalid {
39
+ .textbox-group-input ::ng-deep .control input.ng-invalid,
40
+ .textbox-group-input ::ng-deep .control input.ng-valid {
41
+ @include form-control-state(invalid, input);
42
+
43
+ background-image: none;
44
+
45
+ & ~ .icon-invalid {
46
+ display: inline-flex;
47
+ position: absolute;
48
+ left: .5rem;
49
+ top: .5rem;
50
+ z-index: 1;
51
+ }
52
+
53
+ & ~ .icon-required {
54
+ display: none
55
+ }
56
+ }
57
+
58
+ &:not(.open) {
59
+ .textbox-group-btn-right ::ng-deep button{
60
+ &:not(:focus) {
61
+ border-color: var(--ec-form-control-border-color-invalid);
62
+ }
63
+ background-color: var(--ec-form-control-background-color-invalid);
64
+ }
65
+ }
66
+ }
67
+
68
+ /// Calculate the background properties for an input icon
69
+ /// @param {string} $icon - The classname of the icon (matches the filename)
70
+ /// @param {number} $width [$form-control-icon-size] - The width of the icon, converted to ems
71
+ /// @param {number} $height [$form-control-icon-size] - The height of the icon, converted to ems
72
+ /// @param {string|number|list} $position [$form-control-icon-position] - The background-position of the icon
73
+ /// @param {number} $indent [$form-control-icon-size] - The amount to indent the text to allow room for the icon
74
+ @mixin form-control-input-icon(
75
+ $icon,
76
+ $width: $form-control-icon-size,
77
+ $height: $form-control-icon-size,
78
+ $position: $form-control-icon-position,
79
+ $indent: $form-control-icon-size + .25rem,
80
+ ) {
81
+ $size: $width, $height;
82
+ @include icon-bg-image($icon, $position, $size);
83
+ padding-left: ($indent + $form-control-padding-x);
84
+ }
85
+
86
+ @mixin form-control-state($state, $selector) {
87
+ $icon-position: $form-control-icon-position;
88
+
89
+ @if $selector == textarea {
90
+ $icon-position: .5rem .5rem;
91
+ }
92
+
93
+ /// Required
94
+ @if $state == required {
95
+ // TODO: remove when all bootstrap and kendo controls have been replaced in EUM
96
+ @include form-control-input-icon($required-icon, $position: $icon-position);
97
+
98
+ /// Pending
99
+ } @else if $state == pending {
100
+
101
+ // TODO: remove when all bootstrap and kendo controls have been replaced in EUM
102
+ @include form-control-input-icon(pending-icon(), $position: $icon-position);
103
+
104
+ /// Invalid
105
+ } @else if $state == invalid {
106
+ background-color: var(--ec-form-control-background-color-invalid);
107
+ border-color: var(--ec-form-control-border-color-invalid);
108
+
109
+ &:focus {
110
+ border-color: var(--ec-form-control-background-color-invalid);
111
+ }
112
+
113
+ // TODO: remove when all bootstrap and kendo controls have been replaced in EUM
114
+ @include form-control-input-icon($invalid-icon, $position: $icon-position);
115
+
116
+ /// Focus
117
+ } @else if $state == focus {
118
+ border-color: var(--ec-form-control-border-color-focus);
119
+ box-shadow: var(--ec-form-control-box-shadow-focus);
120
+ position: relative;
121
+ z-index: 1;
122
+
123
+ /// Disabled
124
+ } @else if $state == disabled {
125
+ background-color: var(--ec-form-control-background-color-disabled);
126
+ border-color: var(--ec-form-control-border-color-disabled);
127
+ color: var(--ec-form-control-color-disabled);
128
+ opacity: var(--ec-form-control-opacity-disabled);
129
+
130
+ &:required,
131
+ &:required.is-empty {
132
+ background-image: none;
133
+ padding-left: $form-control-padding-x;
134
+
135
+ // We need to define these again because the :required styles override
136
+ // the background-color and border-color we set above
137
+ background-color: var(--ec-form-control-background-color-disabled);
138
+ border-color: var(--ec-form-control-border-color-disabled);
139
+
140
+ & + .icon-required {
141
+ display: none;
142
+ }
143
+ }
144
+ }
145
+ }
146
+
147
+ /// A form control label
148
+ @mixin form-control-label {
149
+ color: var(--ec-form-control-label-color, var(--ec-color-secondary-dark));
150
+ display: block;
151
+ font-size: $form-control-label-size;
152
+ line-height: 1;
153
+ margin: calc(#{$form-control-label-size} / 2) 0;
154
+ }
155
+
156
+ /// The default form control element in the control component
157
+ /// @param {string} $tag [input] - The HTML tag name of the input element (e.g. input, textarea)
158
+ @mixin form-control-input($selector: input, $new-state-icons: false) {
159
+ @include form-control-input-base;
160
+ background-color: var(--ec-form-control-background-color);
161
+ border: 1px solid var(--ec-form-control-border-color);
162
+ border-radius: var(--ec-border-radius);
163
+ background-image: none;
164
+ background-clip: padding-box;
165
+ width: 100%;
166
+ line-height: $form-control-line-height;
167
+ padding: $form-control-padding-y $form-control-padding-x;
168
+
169
+ @if $selector == input {
170
+ height: $form-control-height;
171
+ } @else {
172
+ height: auto;
173
+ }
174
+
175
+ & ~ .icon-required,
176
+ & ~ .icon-invalid {
177
+ color: var(--ec-form-control-border-color-invalid);
178
+ }
179
+
180
+ &:required {
181
+ &.is-empty {
182
+ @include form-control-state(required, $selector);
183
+
184
+ @if $new-state-icons {
185
+ background-image: none;
186
+
187
+ & ~ .icon-required {
188
+ display: inline-flex;
189
+ position: absolute;
190
+ left: .5rem;
191
+ top: .5rem;
192
+ z-index: 1;
193
+ }
194
+ }
195
+ }
196
+ }
197
+
198
+ // Use .ng-invalid because not all Angular validators trigger :invalid
199
+ &.ng-invalid {
200
+ &.ng-touched {
201
+ @include form-control-state(invalid, $selector);
202
+
203
+ @if $new-state-icons {
204
+ background-image: none;
205
+
206
+ & ~ .icon-invalid {
207
+ display: inline-flex;
208
+ position: absolute;
209
+ left: .5rem;
210
+ top: .5rem;
211
+ z-index: 1;
212
+ }
213
+
214
+ & ~ .icon-required {
215
+ display: none
216
+ }
217
+ }
218
+ }
219
+ }
220
+
221
+ &.is-pending {
222
+ &.ng-valid,
223
+ &.ng-invalid,
224
+ &.ng-pending {
225
+ @include form-control-state(pending, $selector);
226
+
227
+ @if $new-state-icons {
228
+ & ~ .icon-loading {
229
+ display: inline-flex;
230
+ position: absolute;
231
+ left: .5rem;
232
+ top: .5rem;
233
+ z-index: 1;
234
+ }
235
+
236
+ & ~ .icon-required,
237
+ & ~ .icon-invalid {
238
+ display: none;
239
+ }
240
+ }
241
+ }
242
+ }
243
+
244
+ &:focus,
245
+ &:focus.is-empty {
246
+ @include form-control-state(focus, $selector);
247
+ }
248
+
249
+ &:disabled {
250
+ @include form-control-state(disabled, $selector);
251
+ }
252
+
253
+ &.is-uppercase:not(.is-empty) {
254
+ text-transform: uppercase;
255
+ }
256
+ }
257
+
258
+ /// The base styles of a control component. These styles will be applied to :host
259
+ @mixin form-control-base() {
260
+ color: var(--ec-form-control-color);
261
+ // font-family: $control-font-family;
262
+ font-size: var(--ec-form-control-font-size);
263
+ display: block;
264
+ margin-bottom: 1rem;
265
+ width: 100%;
266
+
267
+ :host-context(.form-condensed) {
268
+ margin-bottom: .5rem;
269
+ }
270
+
271
+ .control {
272
+ width: 100%;
273
+ display: flex;
274
+ flex-direction: column;
275
+
276
+ &.control-label-bottom {
277
+ flex-direction: column-reverse;
278
+ }
279
+
280
+ &.control-label-left {
281
+ flex-direction: row;
282
+ label {
283
+ margin-right: .25rem;
284
+ }
285
+ }
286
+
287
+ &.control-label-right {
288
+ flex-direction: row-reverse;
289
+ label {
290
+ margin-left: .25rem;
291
+ }
292
+ }
293
+
294
+ &.control-label-left,
295
+ &.control-label-right {
296
+ align-items: center;
297
+
298
+ label {
299
+ flex: 1 1;
300
+ margin-top: 0;
301
+ margin-bottom: 0;
302
+ }
303
+ .control-input {
304
+ flex: 2 2;
305
+ }
306
+ }
307
+
308
+ &.is-readonly {
309
+ input,
310
+ select,
311
+ textarea {
312
+ @include form-control-read-only;
313
+ }
314
+ }
315
+
316
+ &.invalid {
317
+ @include form-control-input-group-invalid;
318
+ }
319
+ }
320
+
321
+ .textbox-group {
322
+ display: flex;
323
+ position: relative;
324
+ }
325
+
326
+ textarea:focus,
327
+ input:focus,
328
+ select:focus {
329
+ outline: none;
330
+ }
331
+ }
332
+
333
+ @mixin checkbox-radio {
334
+ cursor: pointer;
335
+ display: inline-flex;
336
+ margin-bottom: 0;
337
+ position: relative;
338
+ }
339
+
340
+ @mixin checkbox-radio-input(
341
+ $type,
342
+ $indicator-selector: '.indicator',
343
+ $label-selector: '.label'
344
+ ) {
345
+ margin-top: .5rem;
346
+ opacity: 0;
347
+ position: absolute;
348
+ z-index: -1;
349
+
350
+ &:not(:checked) {
351
+ + #{$indicator-selector} {
352
+ color: var(--ec-form-control-border-color);
353
+
354
+ &::before {
355
+ display: none;
356
+ }
357
+ }
358
+ }
359
+
360
+ @if $type == 'checkbox' {
361
+ &.indeterminate,
362
+ &:indeterminate {
363
+ + #{$indicator-selector} {
364
+ color: var(--ec-color-interactive);
365
+
366
+ &::before {
367
+ content: '';
368
+ background-color: currentColor;
369
+ display: block;
370
+ width: 10px;
371
+ height: 3px;
372
+ }
373
+ }
374
+ }
375
+ }
376
+
377
+ &:focus {
378
+ + #{$indicator-selector} {
379
+ color: var(--ec-color-interactive);
380
+ box-shadow: var(--ec-form-control-box-shadow-focus);
381
+ border-color: var(--ec-form-control-border-color-focus);
382
+ }
383
+ }
384
+
385
+ &:disabled {
386
+ + #{$indicator-selector} {
387
+ color: var(--ec-form-control-color-disabled);
388
+ background-color: var(--ec-form-control-background-color-disabled);
389
+ border-color: var(--ec-form-control-border-color-disabled);
390
+ opacity: var(--ec-form-control-opacity-disabled);
391
+ }
392
+
393
+ ~ #{$label-selector} {
394
+ color: var(--ec-form-control-color-disabled);
395
+ opacity: var(--ec-form-control-opacity-disabled);
396
+ }
397
+ }
398
+ }
399
+
400
+ @mixin checkbox-radio-indicator($type) {
401
+ background-color: var(--ec-form-control-background-color);
402
+ background-clip: padding-box;
403
+ border: 1px solid currentColor;
404
+ color: var(--ec-color-interactive);
405
+ margin-top: .5rem;
406
+ flex: none;
407
+ pointer-events: none;
408
+ display: inline-flex;
409
+ align-items: center;
410
+ justify-content: center;
411
+ height: 1em;
412
+ width: 1em;
413
+
414
+ @if $type == 'radio' {
415
+ border-radius: 50%;
416
+
417
+ &::before {
418
+ background-color: currentColor;
419
+ content: "";
420
+ display: block;
421
+ width: .5em;
422
+ height: .5em;
423
+ border-radius: 50%;
424
+ }
425
+
426
+ } @else {
427
+ border-radius: .125rem;
428
+
429
+ &::before {
430
+ font-size: .6875em;
431
+ }
432
+ }
433
+ }
434
+
435
+ @mixin checkbox-radio-label() {
436
+ line-height: $form-control-line-height;
437
+ padding: 0.375rem 0;
438
+ margin-left: .5rem;
439
+ min-height: $form-control-height;
440
+ height: auto;
441
+ }
442
+
443
+ @mixin checkbox-radio-readonly(
444
+ $input-selector: '.input',
445
+ $indicator-selector: '.indicator',
446
+ $label-selector: '.label'
447
+ ) {
448
+ pointer-events: none;
449
+
450
+ #{$input-selector} {
451
+ opacity: 0;
452
+ }
453
+
454
+ #{$indicator-selector} {
455
+ background-color: var(--ec-form-control-background-color-readonly);
456
+ border-color: var(--ec-form-control-border-color-readonly);
457
+ }
458
+
459
+ #{$label-selector},
460
+ #{$indicator-selector} {
461
+ opacity: 1;
462
+ color: var(--ec-form-control-color);
463
+ }
464
+ }
465
+
466
+ @mixin toggle() {
467
+ font-size: var(--ec-form-control-font-size);
468
+ background-color: var(--ec-border-color);
469
+ border-radius: var(--ec-border-radius);
470
+ border: 1px solid var(--ec-border-color);
471
+ min-height: 2em;
472
+ position: relative;
473
+ color: var(--ec-color-secondary-dark);
474
+ display: flex;
475
+
476
+ input {
477
+ position: absolute;
478
+ z-index: -1;
479
+ opacity: 0;
480
+
481
+ &:checked {
482
+ & + label {
483
+ color: var(--ec-color-interactive);
484
+ }
485
+
486
+ &:last-of-type {
487
+ & ~ a {
488
+ transform: translateX(100%);
489
+ }
490
+ }
491
+ }
492
+
493
+ &:focus ~ .toggle-focused {
494
+ display: block;
495
+ }
496
+ }
497
+
498
+ .toggle-focused {
499
+ position: absolute;
500
+ top: 0;
501
+ left: 0;
502
+ bottom: 0;
503
+ right: 0;
504
+ box-shadow: var(--ec-form-control-box-shadow-focus);
505
+ border-radius: var(--ec-form-control-border-radius);
506
+ display: none;
507
+ }
508
+
509
+ label {
510
+ align-items: center;
511
+ cursor: pointer;
512
+ display: flex;
513
+ flex: 1 1 0%;
514
+ justify-content: center;
515
+ line-height: 1.1em;
516
+ margin-bottom: 0;
517
+ padding: 0.375rem .5rem;
518
+ position: relative;
519
+ text-align: center;
520
+ transition: color .3s ease;
521
+ z-index: 2;
522
+
523
+ .ec-icon {
524
+ color: inherit;
525
+ }
526
+ }
527
+
528
+ a {
529
+ border: 0.1875rem solid transparent;
530
+ border-radius: calc(var(--ec-form-control-border-radius) * .75);
531
+ display: block;
532
+ height: 100%;
533
+ left: 0;
534
+ position: absolute;
535
+ top: 0;
536
+ transition: transform .25s ease;
537
+ width: 50%;
538
+ z-index: 1;
539
+
540
+ .toggle-handle {
541
+ background-color: var(--ec-form-control-background-color);
542
+ border-radius: calc(var(--ec-form-control-border-radius) * .75);
543
+ height: 100%;
544
+ }
545
+ }
546
+
547
+ &.is-disabled {
548
+ opacity: var(--ec-form-control-opacity-disabled);
549
+ color: var(--ec-form-control-color-disabled);
550
+
551
+ label {
552
+ color: inherit !important;
553
+ cursor: default;
554
+ }
555
+ }
556
+ }
557
+
558
+ @mixin toggle-options {
559
+ @each $count in (3,4,5) {
560
+ .toggle-options-#{$count} {
561
+ a {
562
+ width: percentage(math.div(1, $count));
563
+ }
564
+
565
+ input:checked:last-of-type ~ a {
566
+ transform: translateX(percentage($count - 1));
567
+ }
568
+
569
+ @while $count > 2 {
570
+ $count: $count - 1;
571
+ input:checked:nth-of-type(#{$count}) ~ a {
572
+ transform: translateX(percentage($count - 1));
573
+ }
574
+ }
575
+ }
576
+ }
577
+ }
578
+
579
+ @mixin form-heading() {
580
+ @include form-control-label;
581
+ font-weight: bold;
582
+ }
583
+
584
+ // Override the presentation of children controls when the parent control is
585
+ // untouched
586
+ @mixin form-control-untouched {
587
+ input {
588
+ &.ng-invalid.ng-touched {
589
+ background-image: none;
590
+ padding-left: $form-control-padding-x;
591
+
592
+ &:not(.is-empty) ~ .units-left {
593
+ left: 0;
594
+ }
595
+ }
596
+ &:required:not(:disabled).is-empty {
597
+ @include form-control-state(required, input);
598
+
599
+ &:focus {
600
+ @include form-control-state(focus, input);
601
+ }
602
+ }
603
+ }
604
+ }
605
+
606
+ // Shared styles for controls that include a popup when the popup is open (combobox, dateinput)
607
+ @mixin form-control-open() {
608
+ .textbox-group {
609
+ ec-textbox {
610
+ --ec-form-control-box-shadow-focus: none;
611
+ --ec-form-control-border-color-focus: var(--ec-form-control-border-color);
612
+ }
613
+
614
+ ec-button {
615
+ --ec-button-box-shadow-focus-secondary: none;
616
+ --ec-button-background-color-secondary: var(--ec-background-color-selected);
617
+ }
618
+ }
619
+ }
620
+
621
+ @mixin form-control-read-only {
622
+ border-color: var(--ec-form-control-border-color-readonly);
623
+ background-color: var(--ec-form-control-background-color-readonly);
624
+ background-clip: border-box;
625
+ background-image: none;
626
+ color: var(--ec-form-control-color-readonly);
627
+ opacity: 1;
628
+ user-select: none;
629
+ pointer-events: none;
630
+ overflow: hidden;
631
+ white-space: nowrap;
632
+ }
633
+
634
+ @mixin form-control-popup {
635
+ background-color: var(--ec-background-color);
636
+ border-radius: var(--ec-border-radius-card);
637
+ box-shadow: var(--ec-box-shadow-overlay);
638
+ margin-top: .25rem;
639
+ overflow: hidden;
640
+ z-index: var(--ec-z-index-popup);
641
641
  }