@salesforcedevs/mrkt-components 0.30.0 → 0.31.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.
package/lwc.config.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforcedevs/mrkt-components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.31.0",
|
|
4
4
|
"description": "Marketing Lightning web components for DSC",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"engines": {
|
|
@@ -15,5 +15,5 @@
|
|
|
15
15
|
"devDependencies": {
|
|
16
16
|
"@types/classnames": "^2.2.10"
|
|
17
17
|
},
|
|
18
|
-
"gitHead": "
|
|
18
|
+
"gitHead": "840422089a4ab17d0926d2debe5e2a81f3e100b2"
|
|
19
19
|
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
@import "helpers/reset";
|
|
2
|
+
@import "helpers/text";
|
|
3
|
+
|
|
4
|
+
.cta-section {
|
|
5
|
+
position: relative;
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
align-items: center;
|
|
9
|
+
width: 100%;
|
|
10
|
+
padding: var(--dx-g-spacing-3xl) 0 var(--dx-g-spacing-3xl) 0;
|
|
11
|
+
background: white;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.cta-section.dark {
|
|
15
|
+
background: var(--dx-g-blue-vibrant-15, #03234d);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.cta-section.has-images {
|
|
19
|
+
padding-bottom: var(--dx-g-spacing-4xl);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.text-container {
|
|
23
|
+
position: relative;
|
|
24
|
+
display: flex;
|
|
25
|
+
flex-direction: column;
|
|
26
|
+
align-items: center;
|
|
27
|
+
width: 100%;
|
|
28
|
+
padding: 0 var(--dx-g-page-padding-horizontal);
|
|
29
|
+
max-width: 700px;
|
|
30
|
+
text-align: center;
|
|
31
|
+
z-index: 1;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
h2 {
|
|
35
|
+
padding-bottom: var(--dx-g-spacing-sm);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
span {
|
|
39
|
+
padding-bottom: var(--dx-g-spacing-lg);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.cta-section.dark h2,
|
|
43
|
+
.cta-section.dark span {
|
|
44
|
+
color: white;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.img-container {
|
|
48
|
+
position: absolute;
|
|
49
|
+
bottom: 0;
|
|
50
|
+
left: 0;
|
|
51
|
+
width: 100%;
|
|
52
|
+
display: flex;
|
|
53
|
+
flex-direction: row;
|
|
54
|
+
justify-content: space-between;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
img {
|
|
58
|
+
width: 250px;
|
|
59
|
+
aspect-ratio: 25 / 14;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
@media (max-width: 1024px) {
|
|
63
|
+
.cta-section.has-images {
|
|
64
|
+
padding-bottom: var(--dx-g-spacing-5xl);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
img {
|
|
68
|
+
width: 200px;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
@media (max-width: 768px) {
|
|
73
|
+
.cta-section.has-images {
|
|
74
|
+
padding-bottom: unset;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.img-container {
|
|
78
|
+
position: relative;
|
|
79
|
+
padding-top: var(--dx-g-spacing-mlg);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
img {
|
|
83
|
+
width: 30%;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class={className}>
|
|
3
|
+
<div class="text-container">
|
|
4
|
+
<h2 class="dx-text-heading-5">{title}</h2>
|
|
5
|
+
<span if:true={subtitle} class="subtitle dx-text-body-2">
|
|
6
|
+
{subtitle}
|
|
7
|
+
</span>
|
|
8
|
+
<dx-button href={buttonHref}>{buttonText}</dx-button>
|
|
9
|
+
</div>
|
|
10
|
+
<div class="img-container" if:true={hasImages}>
|
|
11
|
+
<img src={imgSrcLeft} alt="" />
|
|
12
|
+
<img src={imgSrcRight} alt="" />
|
|
13
|
+
</div>
|
|
14
|
+
</div>
|
|
15
|
+
</template>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { api, LightningElement } from "lwc";
|
|
2
|
+
import cx from "classnames";
|
|
3
|
+
|
|
4
|
+
export default class CTASection extends LightningElement {
|
|
5
|
+
@api buttonHref: string = "";
|
|
6
|
+
@api buttonText: string = "";
|
|
7
|
+
@api dark?: boolean = false;
|
|
8
|
+
@api subtitle?: string | null = null;
|
|
9
|
+
@api imgSrcLeft?: string | null = null;
|
|
10
|
+
@api imgSrcRight?: string | null = null;
|
|
11
|
+
@api title: string = "";
|
|
12
|
+
|
|
13
|
+
private get hasImages(): boolean {
|
|
14
|
+
return !!this.imgSrcLeft && !!this.imgSrcRight;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
private get className(): string {
|
|
18
|
+
return cx(
|
|
19
|
+
"cta-section",
|
|
20
|
+
this.dark && "dark",
|
|
21
|
+
this.hasImages && "has-images"
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
}
|