@salesforcedevs/dx-components 1.3.242-alpha.0 → 1.3.242-alpha.2

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforcedevs/dx-components",
3
- "version": "1.3.242-alpha.0",
3
+ "version": "1.3.242-alpha.2",
4
4
  "description": "DX Lightning web components",
5
5
  "license": "MIT",
6
6
  "engines": {
@@ -1,7 +1,3 @@
1
- :host {
2
- --dx-c-grid-justify-items: stretch;
3
- }
4
-
5
1
  .container {
6
2
  --one-third-width: calc((100% - 2 * var(--dx-g-page-grid-gap)) / 3);
7
3
 
@@ -9,7 +5,7 @@
9
5
  gap: var(--dx-g-page-grid-gap);
10
6
  grid-template-rows: repeat(auto-fill, 1fr);
11
7
  grid-template-columns: 1fr;
12
- justify-items: var(--dx-c-grid-justify-items);
8
+ justify-items: stretch;
13
9
  align-items: stretch;
14
10
  position: relative;
15
11
  }
@@ -5,6 +5,15 @@
5
5
  --dx-c-padding: 0 var(--dx-g-page-padding-horizontal);
6
6
  }
7
7
 
8
+ dx-formatted-rich-text {
9
+ --dx-c-formatted-rich-text-inline-link-color: var(
10
+ --dx-g-cloud-blue-vibrant-95
11
+ );
12
+ --dx-c-formatted-rich-text-inline-link-color-hover: var(
13
+ --dx-g-blue-vibrant-70
14
+ );
15
+ }
16
+
8
17
  .container {
9
18
  display: flex;
10
19
  flex-direction: row;
@@ -66,6 +75,29 @@ img.mobile {
66
75
  min-width: 1024px;
67
76
  }
68
77
 
78
+ .multiple-image-container {
79
+ position: relative;
80
+ max-width: 646px;
81
+ }
82
+
83
+ .image-one {
84
+ display: block;
85
+ position: absolute;
86
+ left: 0;
87
+ bottom: 0;
88
+ width: 418px;
89
+ height: 515px;
90
+ }
91
+
92
+ .image-two {
93
+ display: block;
94
+ position: absolute;
95
+ right: 0;
96
+ bottom: 0;
97
+ width: 341px;
98
+ height: 339px;
99
+ }
100
+
69
101
  .text-container > *:not(:last-child) {
70
102
  margin-bottom: var(--dx-g-spacing-smd);
71
103
  }
@@ -80,6 +112,16 @@ svg {
80
112
  bottom: 60px;
81
113
  }
82
114
 
115
+ .foot-note-container {
116
+ display: flex;
117
+ }
118
+
119
+ @media screen and (min-width: 1024px) {
120
+ .text-container {
121
+ text-align: left;
122
+ }
123
+ }
124
+
83
125
  @media screen and (max-width: 1024px) {
84
126
  .container {
85
127
  flex-direction: column;
@@ -91,12 +133,15 @@ svg {
91
133
 
92
134
  .text-container {
93
135
  align-items: center;
94
- text-align: center;
95
136
  padding-top: var(--dx-g-spacing-4xl);
96
137
  padding-bottom: 0;
97
138
  min-height: unset;
98
139
  }
99
140
 
141
+ .button-container {
142
+ justify-content: center;
143
+ }
144
+
100
145
  .text-container > * {
101
146
  max-width: 700px;
102
147
  }
@@ -113,6 +158,10 @@ svg {
113
158
  display: block;
114
159
  margin-top: var(--dx-g-spacing-3xl);
115
160
  }
161
+
162
+ .multiple-image-container {
163
+ display: none;
164
+ }
116
165
  }
117
166
 
118
167
  @media screen and (max-width: 768px) {
@@ -127,3 +176,20 @@ svg {
127
176
  line-height: var(--dx-g-text-4xl);
128
177
  }
129
178
  }
179
+ @media screen and (min-width: 479px) and (max-width: 1024px) {
180
+ .text-container {
181
+ text-align: center;
182
+ }
183
+ }
184
+
185
+ @media screen and (min-width: 479px) {
186
+ .foot-note-image {
187
+ display: none;
188
+ }
189
+ }
190
+
191
+ @media screen and (max-width: 479px) {
192
+ .foot-note-image {
193
+ object-fit: contain;
194
+ }
195
+ }
@@ -6,34 +6,54 @@
6
6
  <span lwc:if={subtitle} class="subtitle dx-text-display-7">
7
7
  {subtitle}
8
8
  </span>
9
- <span lwc:if={footNote} class="dx-text-body-4">
10
- <dx-formatted-rich-text
11
- value={footNote}
12
- ></dx-formatted-rich-text>
13
- </span>
14
- <div class="button-container">
15
- <dx-button
16
- onclick={onCtaClick}
17
- href={ctaHref}
18
- target={ctaTarget}
19
- size="large"
20
- >
21
- {ctaLabel}
22
- </dx-button>
23
- <dx-button
24
- class="secondary-button"
25
- lwc:if={ctaLabelSecondary}
26
- onclick={onCtaClickSecondary}
27
- href={ctaHrefSecondary}
28
- target={ctaTargetSecondary}
29
- size="large"
30
- variant="secondary"
31
- >
32
- {ctaLabelSecondary}
33
- </dx-button>
9
+ <div class="foot-note-container">
10
+ <div class="foot-note-text-button-container">
11
+ <span
12
+ lwc:if={footNote}
13
+ class="dx-text-body-4"
14
+ style={footNoteStyle}
15
+ >
16
+ <dx-formatted-rich-text
17
+ value={footNote}
18
+ ></dx-formatted-rich-text>
19
+ </span>
20
+ <div class="button-container">
21
+ <dx-button
22
+ onclick={onCtaClick}
23
+ href={ctaHref}
24
+ target={ctaTarget}
25
+ size="large"
26
+ >
27
+ {ctaLabel}
28
+ </dx-button>
29
+ <dx-button
30
+ class="secondary-button"
31
+ lwc:if={ctaLabelSecondary}
32
+ onclick={onCtaClickSecondary}
33
+ href={ctaHrefSecondary}
34
+ target={ctaTargetSecondary}
35
+ size="large"
36
+ variant="secondary"
37
+ >
38
+ {ctaLabelSecondary}
39
+ </dx-button>
40
+ </div>
41
+ </div>
42
+ <img
43
+ lwc:if={footNoteImage}
44
+ class="foot-note-image"
45
+ src={footNoteImage}
46
+ alt={footNoteImageAlt}
47
+ width={footNoteImageWidth}
48
+ height={footNoteImageHeight}
49
+ />
34
50
  </div>
35
51
  </div>
36
- <div class="image-container">
52
+ <div lwc:if={multipleImages} class="multiple-image-container">
53
+ <img class="image-one" src={imgSrcOne} alt="" />
54
+ <img class="image-two" src={imgSrcTwo} alt="" />
55
+ </div>
56
+ <div lwc:else class="image-container">
37
57
  <img class="desktop" src={imgSrc} alt="" />
38
58
  <img class="mobile" src={imgSrcMobile} alt="" />
39
59
  </div>
@@ -7,18 +7,25 @@ export default class MainContentHeader extends LightningElement {
7
7
  @api subtitle?: string;
8
8
  @api body!: string;
9
9
  @api footNote?: string;
10
+ @api footNoteImage?: string;
11
+ @api footNoteImageAlt?: string;
12
+ @api footNoteImageHeight?: string;
13
+ @api footNoteImageWidth?: string;
10
14
  @api ctaLabel!: string;
11
15
  @api ctaLabelSecondary?: string;
12
16
  @api ctaHref!: string;
13
17
  @api ctaHrefSecondary?: string;
14
- @api imgSrc!: string;
15
- @api imgSrcMobile!: string;
18
+ @api imgSrc?: string;
19
+ @api imgSrcMobile?: string;
16
20
  @api ctaTarget?: string | null = null;
17
21
  @api ctaTargetSecondary?: string | null = null;
18
22
  @api backgroundGradientColor?: string;
19
- @api backgroundGradientDark: boolean = false;
20
23
  @api backgroundImage?: string;
21
- @api hasSwoop: boolean = false;
24
+ @api backgroundGradientDark = false;
25
+ @api hasSwoop = false;
26
+ @api multipleImages = false;
27
+ @api imgSrcOne?: string;
28
+ @api imgSrcTwo?: string;
22
29
 
23
30
  private get style() {
24
31
  return cx(
@@ -39,6 +46,10 @@ export default class MainContentHeader extends LightningElement {
39
46
  );
40
47
  }
41
48
 
49
+ private get footNoteStyle() {
50
+ return cx(this.backgroundGradientDark && "color: white;");
51
+ }
52
+
42
53
  private onCtaClick(e: Event) {
43
54
  if (e.currentTarget) {
44
55
  track(e.currentTarget, "custEv_ctaButtonClick", {