@energycap/components 0.26.6 → 0.26.7-email-css-improvements.20211124-1106

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.
@@ -27,8 +27,7 @@ export declare class SearchableTableComponent implements OnInit, OnDestroy {
27
27
  sort?: TableSort;
28
28
  autofocus: boolean;
29
29
  /**Set to a space-separated set of strings that should be added to the ec-table class attribute
30
- * this allows finer control over styling, including the ability to turn on selectable highlights
31
- * by including is-selectable
30
+ * this allows finer control over styling.
32
31
  */
33
32
  tableClasses: string;
34
33
  /** Emits when table sort has changed */
@@ -141,6 +140,8 @@ export declare class SearchableTableComponent implements OnInit, OnDestroy {
141
140
  resizableColumns: QueryList<ResizableColumnComponent>;
142
141
  /** Optional text to add to the results count in the table footer. This text will be added after the count and objectType. */
143
142
  additionalCountText: string;
143
+ /** Enables table row selection and row highlighting styles when true */
144
+ selectable: boolean;
144
145
  /**
145
146
  * PagingInfo for the current page.
146
147
  */
@@ -28,6 +28,10 @@ export declare class TableSelectableRowContext {
28
28
  export declare class TableSelectableRowComponent implements OnInit, OnDestroy, OnChanges {
29
29
  /**The ID root to use for the checkbox and table cell */
30
30
  id: string;
31
+ /** Disables the selection functionality when false */
32
+ set enabled(value: boolean | null | undefined);
33
+ get enabled(): boolean | null | undefined;
34
+ private _enabled;
31
35
  /**Shared context between master and children. Child directive adds its own FormControl to this
32
36
  and removes it onDestroy. The same context object must be used for all directives in a single table*/
33
37
  context: TableSelectableRowContext;
@@ -1,7 +1,7 @@
1
- import { Renderer2, ElementRef, EventEmitter, AfterViewInit, OnDestroy, OnChanges, SimpleChanges, QueryList, AfterContentInit, TemplateRef } from '@angular/core';
1
+ import { AfterContentInit, AfterViewInit, ElementRef, EventEmitter, OnChanges, OnDestroy, QueryList, Renderer2, SimpleChanges, TemplateRef } from '@angular/core';
2
+ import { ResizableColumnComponent } from './resizable-column.component';
2
3
  import { TableMasterRowComponent } from './table-master-row.component';
3
4
  import { TableSelectableRowContext } from './table-selectable-row.component';
4
- import { ResizableColumnComponent } from './resizable-column.component';
5
5
  export declare type TableSortDirection = 'desc' | 'asc';
6
6
  export interface TableSort {
7
7
  field: string;
@@ -92,7 +92,6 @@ export declare class TableComponent implements AfterViewInit, OnDestroy, OnChang
92
92
  private destroyed;
93
93
  constructor(renderer: Renderer2, el: ElementRef);
94
94
  ngOnChanges(changes: SimpleChanges): void;
95
- ngOnInit(): void;
96
95
  ngAfterContentInit(): void;
97
96
  ngAfterViewInit(): void;
98
97
  ngOnDestroy(): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@energycap/components",
3
- "version": "0.26.6",
3
+ "version": "0.26.7-email-css-improvements.20211124-1106",
4
4
  "dependencies": {
5
5
  "tslib": "^2.0.0"
6
6
  },
Binary file
Binary file
@@ -1,7 +1,9 @@
1
1
  @import '../variables';
2
2
 
3
+ $email-bg: $ec-color-bg-content;
4
+
3
5
  @mixin body {
4
- font-size: .875rem;
6
+ font-size: 14px;
5
7
  font-weight: 400;
6
8
  color: $ec-color-text-primary-dark;
7
9
  line-height: 1.2;
@@ -12,22 +14,22 @@
12
14
  @mixin content {
13
15
  h1, h2, h3, h4, h5, h6, p, ol, ul {
14
16
  margin-top: 0;
15
- margin-bottom: 1rem;
17
+ margin-bottom: 16px;
16
18
  }
17
19
 
18
20
  h1, h2 {
19
- font-size: 1.25rem;
20
- line-height: 1.5rem;
21
+ font-size: 20px;
22
+ line-height: 24px;
21
23
  }
22
24
 
23
25
  h3, h4 {
24
- font-size: 1rem;
25
- line-height: 1.5rem;
26
+ font-size: 16px;
27
+ line-height: 24px;
26
28
  }
27
29
 
28
30
  h5, h6 {
29
- font-size: .75rem;
30
- line-height: 1rem;
31
+ font-size: 12px;
32
+ line-height: 16px;
31
33
  text-transform: uppercase;
32
34
  color: $ec-color-text-secondary-dark;
33
35
  }
@@ -63,9 +65,9 @@
63
65
  }
64
66
 
65
67
  a:focus {
66
- outline: $ec-color-link solid .125rem;
67
- outline-offset: .125rem;
68
- border-radius: .125rem;
68
+ outline: $ec-color-link solid 2px;
69
+ outline-offset: 2px;
70
+ border-radius: 2px;
69
71
  }
70
72
 
71
73
  a:not([href]):not([tabindex]) {
@@ -83,28 +85,28 @@
83
85
  outline: 0;
84
86
  }
85
87
 
86
- a.button,
87
- a.cta {
88
+ .email-button {
88
89
  display: inline-block;
89
- margin-right: .5rem;
90
- margin-bottom: .5rem;
91
- }
92
-
93
- a.button {
94
- line-height: 2rem;
95
- padding: 0 1rem;
96
- border: 1px solid $ec-border-color-default;
97
- color: $ec-color-text-secondary-dark;
90
+ margin-right: 8px;
91
+ margin-bottom: 8px;
92
+ background-color: #D6D6D7;
93
+ padding: 0 16px;
94
+ line-height: 32px;
95
+ border-radius: 4px;
96
+ color: $ec-color-text-primary-dark !important;
98
97
  }
99
98
 
100
- a.cta {
101
- line-height: 3rem;
102
- padding: 0 1.5rem;
99
+ .email-cta {
100
+ display: inline-block;
101
+ margin-right: 8px;
102
+ margin-bottom: 8px;
103
103
  background-color: #17303B;
104
- color: #D8E902;
105
- min-width: 11rem;
104
+ color: #D8E902 !important;
105
+ line-height: 48px;
106
+ padding: 0 24p;
107
+ min-width: 176px;
106
108
  text-align: center;
107
- border-radius: .25rem;
109
+ border-radius: 6px;
108
110
  }
109
111
 
110
112
  img {
@@ -112,19 +114,13 @@
112
114
  }
113
115
 
114
116
  hr {
115
- box-sizing: content-box;
116
117
  height: 0;
117
118
  border-bottom: 0;
118
119
  overflow: visible;
119
- margin: 1rem 0;
120
+ margin: 16px 0;
120
121
  border-color: $ec-border-color-default;
121
122
  }
122
123
 
123
- .banner {
124
- margin-left: -1.5rem;
125
- margin-right: -1.5rem;
126
- }
127
-
128
124
  .text-left {
129
125
  text-align: left;
130
126
  }
@@ -140,24 +136,29 @@
140
136
  .text-underline {
141
137
  text-decoration: underline;
142
138
  }
143
- }
144
139
 
145
- @mixin logos {
146
- .ec-app-icon,
147
- .ec-logo {
148
- background-size: contain;
149
- background-repeat: no-repeat;
150
- height: 1.75rem;
151
- margin-bottom: 2rem;
140
+ .text-caption-1 {
141
+ color: $ec-color-text-secondary-dark;
142
+ font-size: 12px;
152
143
  }
153
144
 
154
- .ec-logo {
155
- background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='464' height='54' fill='none' viewBox='0 0 464 54'%3E%3Cg clip-path='url(%23clip0_754:458)'%3E%3Cpath fill='%231C2C36' d='M8.55 46.268V31.315H34.32v-7.457H8.55V8.868h28.936V1.263H0v52.61h38.504v-7.605H8.55zM84.6 1.264v37.204L54.67 1.264h-6.93v52.61h8.563V16.67l29.942 37.204h6.918V1.264H84.6zM160.922 8.869h11.874c4.477 0 7.936.956 10.267 2.833 2.318 1.877 3.446 4.527 3.446 8.084 0 3.557-1.128 6.219-3.446 8.12-2.331 1.902-5.778 2.87-10.255 2.87h-11.874V8.87h-.012zm23.183 27.44c3.373-1.325 6.023-3.35 7.912-6.035 2.024-2.883 3.054-6.404 3.054-10.476 0-5.74-1.999-10.316-5.949-13.615-3.913-3.263-9.322-4.92-16.105-4.92H152.36v52.61h8.562V38.235h12.095c.735 0 1.717-.036 2.931-.123l11.064 15.763h9.494l-12.401-17.565zM297.029 1.264l-16.18 26.532-16.105-26.532h-9.286l20.89 34.26v18.35h8.488V35.67l20.877-34.407h-8.684zM393.211 33.929H372.91l10.156-23.06 10.145 23.06zm-6.099-32.665h-8.057l-23.822 52.61h8.905l5.656-12.843h26.517l5.656 12.843h9.054l-23.909-52.61M451.743 19.786c0 3.557-1.127 6.207-3.447 8.083-2.329 1.877-5.777 2.834-10.265 2.834h-11.876V8.869h11.876c4.488 0 7.936.956 10.265 2.834 2.332 1.876 3.447 4.526 3.447 8.083zm2.627-13.603c-3.915-3.263-9.323-4.92-16.107-4.92h-20.657v52.61h8.562V38.309h12.095c6.771 0 12.192-1.656 16.107-4.919 3.949-3.287 5.947-7.863 5.947-13.615-.012-5.729-2.01-10.304-5.947-13.591zM228.374 26.14v7.875h13.665v9.101c-3.251 2.012-7.078 3.018-11.407 3.018-3.742 0-7.152-.834-10.145-2.49-2.993-1.644-5.36-3.95-7.053-6.845-1.693-2.895-2.551-6.182-2.551-9.764 0-3.63.858-6.942 2.551-9.837 1.693-2.895 4.06-5.189 7.053-6.808 2.993-1.632 6.428-2.453 10.218-2.453 5.618 0 10.488 1.938 14.45 5.765l.429.417 5.372-5.373-.392-.429c-2.404-2.65-5.348-4.686-8.758-6.047C238.408.908 234.569.21 230.411.21c-5.299 0-10.145 1.152-14.389 3.446-4.256 2.294-7.642 5.52-10.046 9.604-2.417 4.085-3.643 8.722-3.643 13.788 0 5.066 1.226 9.702 3.643 13.75 2.416 4.06 5.777 7.286 10.009 9.593 4.22 2.306 9.028 3.483 14.291 3.483 3.716 0 7.322-.577 10.745-1.717 3.422-1.14 6.477-2.81 9.065-4.944l.221-.184V26.14h-21.933'/%3E%3Cpath fill='%2396B224' d='M102.399 1.239h39.731v7.949h-39.731V1.239M102.399 45.925h40.761v7.95h-40.761v-7.95zM102.399 23.576h26.422v7.949h-26.422v-7.949z'/%3E%3Cpath fill='%231C2C36' d='M332.736 45.974c-10.488 0-19.013-8.537-19.013-19.037 0-2.392.465-4.673 1.277-6.795l-7.067-5.005a26.225 26.225 0 00-2.796 11.8c0 14.855 12.378 26.937 27.599 26.937 7.434 0 14.18-2.883 19.148-7.568l-6.87-4.87c-3.311 2.821-7.592 4.538-12.278 4.538'/%3E%3Cpath fill='%2396B224' d='M332.736 7.9c6 0 11.346 2.796 14.83 7.151l6.796-4.82C349.307 3.998 341.495 0 332.736 0c-8.757 0-16.572 4.01-21.627 10.23l6.796 4.82c3.485-4.354 8.834-7.151 14.831-7.151'/%3E%3Cpath fill='%231C2C36' d='M459.849 48.276c.276-.219.412-.526.412-.922s-.136-.701-.412-.916c-.275-.213-.666-.32-1.164-.32h-1.379v2.486h1.379c.498 0 .889-.109 1.164-.328zm1.103.281a1.902 1.902 0 01-.969.72l1.421 2.204h-1.078l-1.297-2H457.322v2h-1.063v-6.254h2.503c.781 0 1.4.193 1.852.579.453.385.682.901.682 1.548 0 .468-.118.87-.344 1.203zm-.049 3.972a4.661 4.661 0 001.728-1.751 4.85 4.85 0 00.635-2.455c0-.897-.208-1.71-.62-2.44a4.498 4.498 0 00-1.703-1.72c-.725-.416-1.54-.625-2.447-.625-.895 0-1.713.214-2.447.641a4.652 4.652 0 00-1.729 1.744 4.862 4.862 0 00-.625 2.431c0 .886.21 1.697.625 2.432a4.667 4.667 0 001.72 1.743 4.713 4.713 0 002.425.641c.895 0 1.71-.213 2.438-.641zm.399-8.976c.84.48 1.499 1.14 1.979 1.979.48.839.719 1.77.719 2.79a5.525 5.525 0 01-.734 2.807 5.44 5.44 0 01-2.001 2.01 5.479 5.479 0 01-2.8.735c-1.022 0-1.952-.245-2.791-.735a5.364 5.364 0 01-1.985-2.002 5.47 5.47 0 01-.728-2.783 5.47 5.47 0 01.728-2.783 5.364 5.364 0 011.991-2.002c.846-.49 1.784-.735 2.816-.735 1.031 0 1.967.24 2.806.72'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0_754:458'%3E%3Cpath fill='%23fff' d='M0 0h464v53.874H0z'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E%0A");
156
- max-width: 100%;
145
+ .text-caption-2 {
146
+ color: $ec-color-text-secondary-dark;
147
+ font-size: 10px;
148
+ }
149
+ }
150
+
151
+ @mixin logos {
152
+ .email-logo {
153
+ width: 100%;
154
+ max-width: 292px;
155
+ font-size: 28px;
156
+ font-weight: normal;
157
157
  }
158
158
 
159
- .ec-app-icon {
160
- background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none' viewBox='0 0 32 32'%3E%3Cg clip-path='url(%23clip0_755:472)'%3E%3Cpath fill='%23A0AD39' d='M24.243 8.351H11.87v3.138h12.373V8.35zM24.243 20.612H11.87v3.137h12.373v-3.137zM20.177 14.482H11.87v3.137h8.307v-3.137zM18.006 3.514c3.834 0 7.26 1.725 9.563 4.436l2.572-1.826A15.657 15.657 0 0018.006.376c-4.888 0-9.26 2.24-12.135 5.748L8.444 7.95c2.303-2.71 5.728-4.436 9.562-4.436z'/%3E%3Cpath fill='%2317303B' d='M27.575 24.176c-2.303 2.71-5.729 4.436-9.563 4.436-3.833 0-7.26-1.726-9.562-4.436l.013-.007c-1.858-2.19-3-5.007-3-8.106 0-1.97.465-3.821 1.274-5.484L4.14 8.74a15.62 15.62 0 00-1.814 7.323c0 3.77 1.337 7.228 3.552 9.932a15.657 15.657 0 0012.134 5.748c4.888 0 9.262-2.24 12.135-5.748l-2.572-1.82z'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0_755:472'%3E%3Cpath fill='%23fff' d='M0 0h28.235v32H0z' transform='translate(2)'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E%0A");
161
- height: 2.25rem;
159
+ .email-logo-wl {
160
+ margin-left: 4px;
161
+ width: 56px;
162
+ max-width: 56px;
162
163
  }
163
164
  }
@@ -1,60 +1,43 @@
1
1
  /** Standalone styles for energycap application emails. Include the generated css (dist/components/energycap-email.min.css) in a style element in the head of the email document. */
2
2
  @import 'email-base';
3
3
 
4
- *,
5
- *::before,
6
- *::after {
7
- box-sizing: border-box;
8
- }
9
-
10
4
  html {
11
- background-color: $ec-color-bg-body;
5
+ background-color: $ec-color-bg-content;
6
+ font-size: 16px;
12
7
  }
13
8
 
14
- body {
15
- margin: 0 auto;
16
- width: 37.5rem;
17
- max-width: 100%;
18
- padding: 5rem 0;
9
+ body {
19
10
  @include body;
11
+ margin: 0;
20
12
  }
21
13
 
22
- [tabindex="-1"]:focus {
23
- outline: 0 !important;
14
+ table {
15
+ width: 100%;
16
+ border-spacing: 0;
17
+ font-size: 14px;
24
18
  }
25
19
 
26
- main {
27
- background-color: $ec-color-bg-content;
28
- border-radius: .5rem;
29
- box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.1);;
30
- padding: 2rem 1.5rem;
20
+ tr, td {
21
+ border-image-width: 0;
31
22
  }
32
23
 
33
- main + footer {
34
- padding: 1.5rem 1.5rem 0;
35
- font-size: $ec-font-size-tiny;
36
- color: $ec-color-text-secondary-dark;
24
+ .email-wrapper {
25
+ width: 600px;
26
+ padding-top: 48px;
37
27
  }
38
28
 
39
- @include content;
40
- @include logos;
41
-
42
- @media screen and (max-width: 20rem) {
43
- html {
44
- background-color: $ec-color-bg-content;
45
- }
46
-
47
- body {
48
- padding-top: 0;
49
- padding-bottom: 3rem;
50
- }
51
-
52
- main {
53
- box-shadow: none;
54
- border-radius: 0;
55
- }
56
-
57
- main + footer {
58
- border-top: 1px solid $ec-border-color-default;
59
- }
29
+ .email-header {
30
+ padding-right: 16px;
31
+ padding-left: 16px;
60
32
  }
33
+
34
+ .email-body {
35
+ padding: 32px 24px;
36
+ }
37
+
38
+ [tabindex="-1"]:focus {
39
+ outline: 0 !important;
40
+ }
41
+
42
+ @include content;
43
+ @include logos;