@salesforcedevs/dx-components 1.3.62 → 1.3.64
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 +2 -2
- package/src/modules/dx/cardEvent/cardEvent.css +12 -1
- package/src/modules/dx/cardEvent/cardEvent.html +6 -7
- package/src/modules/dx/mainContentHeader/mainContentHeader.css +21 -1
- package/src/modules/dx/mainContentHeader/mainContentHeader.html +36 -9
- package/src/modules/dx/mainContentHeader/mainContentHeader.ts +35 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforcedevs/dx-components",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.64",
|
|
4
4
|
"description": "DX Lightning web components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"engines": {
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"eventsourcemock": "^2.0.0",
|
|
41
41
|
"luxon": "^3.1.0"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "cde66dd9492632603b645b0cfe061b94c7c2508c"
|
|
44
44
|
}
|
|
@@ -10,6 +10,10 @@
|
|
|
10
10
|
flex-direction: column;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
+
.dx-card-base_layout-horizontal dx-card-title {
|
|
14
|
+
--dx-c-card-title-font-size: var(--dx-g-text-lg);
|
|
15
|
+
}
|
|
16
|
+
|
|
13
17
|
.details {
|
|
14
18
|
align-self: flex-start;
|
|
15
19
|
display: flex;
|
|
@@ -58,6 +62,10 @@
|
|
|
58
62
|
flex-wrap: wrap;
|
|
59
63
|
}
|
|
60
64
|
|
|
65
|
+
.card-event_detail-datetime {
|
|
66
|
+
width: 100%;
|
|
67
|
+
}
|
|
68
|
+
|
|
61
69
|
.card-event_detail-datetime-spacing {
|
|
62
70
|
padding-right: var(--dx-g-spacing-xs);
|
|
63
71
|
padding-left: var(--dx-g-spacing-xs);
|
|
@@ -81,10 +89,13 @@ dx-button {
|
|
|
81
89
|
}
|
|
82
90
|
|
|
83
91
|
dx-type-badge {
|
|
84
|
-
margin-top: var(--dx-g-spacing-sm);
|
|
85
92
|
margin-bottom: var(--dx-g-spacing-sm);
|
|
86
93
|
}
|
|
87
94
|
|
|
95
|
+
dx-formatted-date-time {
|
|
96
|
+
--dx-g-text-body-color: var(--dx-g-indigo-vibrant-40);
|
|
97
|
+
}
|
|
98
|
+
|
|
88
99
|
@media (max-width: 1024px) {
|
|
89
100
|
.card-event:not(.dx-card-base_featured) .image-link {
|
|
90
101
|
display: none;
|
|
@@ -28,6 +28,11 @@
|
|
|
28
28
|
></dx-formatted-date-time>
|
|
29
29
|
</div>
|
|
30
30
|
<div class="card-event_detail-section">
|
|
31
|
+
<dx-type-badge
|
|
32
|
+
color={typeBadgeColor}
|
|
33
|
+
value={type}
|
|
34
|
+
if:true={type}
|
|
35
|
+
></dx-type-badge>
|
|
31
36
|
<dx-card-title
|
|
32
37
|
href={href}
|
|
33
38
|
onmouseenter={setLinkHovered}
|
|
@@ -43,11 +48,6 @@
|
|
|
43
48
|
>
|
|
44
49
|
{location}
|
|
45
50
|
</span>
|
|
46
|
-
<dx-type-badge
|
|
47
|
-
color={typeBadgeColor}
|
|
48
|
-
value={type}
|
|
49
|
-
if:true={type}
|
|
50
|
-
></dx-type-badge>
|
|
51
51
|
</div>
|
|
52
52
|
<span
|
|
53
53
|
class="dx-text-body-2"
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
</span>
|
|
59
59
|
<span class="card-event_detail-datetime-row">
|
|
60
60
|
<dx-formatted-date-time
|
|
61
|
-
class="dx-text-body-3"
|
|
61
|
+
class="dx-text-body-3 card-event_detail-datetime"
|
|
62
62
|
value={startDatetime}
|
|
63
63
|
weekday="long"
|
|
64
64
|
month="long"
|
|
@@ -66,7 +66,6 @@
|
|
|
66
66
|
year="numeric"
|
|
67
67
|
time-zone-name="short"
|
|
68
68
|
></dx-formatted-date-time>
|
|
69
|
-
<div class="card-event_detail-datetime-spacing">•</div>
|
|
70
69
|
<dx-formatted-date-time
|
|
71
70
|
class="dx-text-body-3"
|
|
72
71
|
value={startDatetime}
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
flex-direction: column;
|
|
18
18
|
justify-content: center;
|
|
19
19
|
align-items: flex-start;
|
|
20
|
-
padding: var(--dx-g-spacing-lg) 0;
|
|
20
|
+
padding: var(--dx-g-spacing-lg) 0 var(--dx-g-spacing-4xl) 0;
|
|
21
21
|
min-height: 460px;
|
|
22
22
|
text-align: left;
|
|
23
23
|
background-position: center;
|
|
@@ -25,6 +25,19 @@
|
|
|
25
25
|
background-repeat: no-repeat;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
+
.button-container {
|
|
29
|
+
display: flex;
|
|
30
|
+
gap: var(--dx-g-spacing-md);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.secondary-button {
|
|
34
|
+
--dx-c-button-background-color: white;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.light-text > *:not(:last-child) {
|
|
38
|
+
color: white;
|
|
39
|
+
}
|
|
40
|
+
|
|
28
41
|
.image-container {
|
|
29
42
|
display: flex;
|
|
30
43
|
flex-direction: row;
|
|
@@ -54,6 +67,12 @@ dx-button {
|
|
|
54
67
|
margin-top: var(--dx-g-spacing-smd);
|
|
55
68
|
}
|
|
56
69
|
|
|
70
|
+
svg {
|
|
71
|
+
width: 100%;
|
|
72
|
+
position: relative;
|
|
73
|
+
bottom: 60px;
|
|
74
|
+
}
|
|
75
|
+
|
|
57
76
|
@media screen and (max-width: 1024px) {
|
|
58
77
|
.container {
|
|
59
78
|
flex-direction: column;
|
|
@@ -85,6 +104,7 @@ dx-button {
|
|
|
85
104
|
|
|
86
105
|
img.mobile {
|
|
87
106
|
display: block;
|
|
107
|
+
margin-top: var(--dx-g-spacing-3xl);
|
|
88
108
|
}
|
|
89
109
|
}
|
|
90
110
|
|
|
@@ -1,23 +1,50 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="container" style={style}>
|
|
3
|
-
<div class=
|
|
3
|
+
<div class={textStyle}>
|
|
4
4
|
<h1 class="heading dx-text-heading-2">{title}</h1>
|
|
5
5
|
<span class="body dx-text-body-1">{body}</span>
|
|
6
6
|
<span if:true={subtitle} class="subtitle dx-text-heading-4b">
|
|
7
7
|
{subtitle}
|
|
8
8
|
</span>
|
|
9
|
-
<
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
9
|
+
<div class="button-container">
|
|
10
|
+
<dx-button
|
|
11
|
+
onclick={onCtaClick}
|
|
12
|
+
href={ctaHref}
|
|
13
|
+
target={ctaTarget}
|
|
14
|
+
size="large"
|
|
15
|
+
>
|
|
16
|
+
{ctaLabel}
|
|
17
|
+
</dx-button>
|
|
18
|
+
<dx-button
|
|
19
|
+
class="secondary-button"
|
|
20
|
+
if:true={ctaLabelSecondary}
|
|
21
|
+
onclick={onCtaClickSecondary}
|
|
22
|
+
href={ctaHrefSecondary}
|
|
23
|
+
target={ctaTargetSecondary}
|
|
24
|
+
size="large"
|
|
25
|
+
variant="secondary"
|
|
26
|
+
>
|
|
27
|
+
{ctaLabelSecondary}
|
|
28
|
+
</dx-button>
|
|
29
|
+
</div>
|
|
17
30
|
</div>
|
|
18
31
|
<div class="image-container">
|
|
19
32
|
<img class="desktop" src={imgSrc} />
|
|
20
33
|
<img class="mobile" src={imgSrcMobile} />
|
|
21
34
|
</div>
|
|
22
35
|
</div>
|
|
36
|
+
<template if:true={hasSwoop}>
|
|
37
|
+
<svg
|
|
38
|
+
width="500"
|
|
39
|
+
height="80"
|
|
40
|
+
viewBox="0 -40 500 40"
|
|
41
|
+
preserveAspectRatio="none"
|
|
42
|
+
>
|
|
43
|
+
<path
|
|
44
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
45
|
+
d="M 0 0 L 0 -40 C 120 0 400 0 500 -40 L 500 0 Z"
|
|
46
|
+
fill="#FFFFFF"
|
|
47
|
+
></path>
|
|
48
|
+
</svg>
|
|
49
|
+
</template>
|
|
23
50
|
</template>
|
|
@@ -7,16 +7,31 @@ export default class MainContentHeader extends LightningElement {
|
|
|
7
7
|
@api subtitle?: string;
|
|
8
8
|
@api body!: string;
|
|
9
9
|
@api ctaLabel!: string;
|
|
10
|
+
@api ctaLabelSecondary?: string;
|
|
10
11
|
@api ctaHref!: string;
|
|
12
|
+
@api ctaHrefSecondary?: string;
|
|
11
13
|
@api imgSrc!: string;
|
|
12
14
|
@api imgSrcMobile!: string;
|
|
13
15
|
@api ctaTarget?: string | null = null;
|
|
16
|
+
@api ctaTargetSecondary?: string | null = null;
|
|
14
17
|
@api backgroundGradientColor?: string;
|
|
18
|
+
@api backgroundGradientDark: boolean = false;
|
|
19
|
+
@api hasSwoop: boolean = false;
|
|
15
20
|
|
|
16
21
|
private get style() {
|
|
17
22
|
return cx(
|
|
18
23
|
this.backgroundGradientColor &&
|
|
19
|
-
|
|
24
|
+
!this.backgroundGradientDark &&
|
|
25
|
+
`background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #ffff 100%), var(--dx-g-${this.backgroundGradientColor});`,
|
|
26
|
+
this.backgroundGradientDark &&
|
|
27
|
+
`background: linear-gradient(90deg, var(--dx-g-indigo-vibrant-20) 0%, var(--dx-g-indigo-vibrant-30) 100%);`
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
private get textStyle() {
|
|
32
|
+
return cx(
|
|
33
|
+
"text-container",
|
|
34
|
+
this.backgroundGradientDark && "light-text"
|
|
20
35
|
);
|
|
21
36
|
}
|
|
22
37
|
|
|
@@ -38,4 +53,23 @@ export default class MainContentHeader extends LightningElement {
|
|
|
38
53
|
});
|
|
39
54
|
}
|
|
40
55
|
}
|
|
56
|
+
|
|
57
|
+
private onCtaClickSecondary(e: Event) {
|
|
58
|
+
if (e.currentTarget) {
|
|
59
|
+
track(e.currentTarget, "custEv_ctaButtonClick", {
|
|
60
|
+
click_text: this.ctaLabelSecondary,
|
|
61
|
+
click_url: this.ctaHrefSecondary,
|
|
62
|
+
element_type: "button",
|
|
63
|
+
element_title: "dx-button",
|
|
64
|
+
content_category: "cta"
|
|
65
|
+
});
|
|
66
|
+
track(e.currentTarget!, "custEv_linkClick", {
|
|
67
|
+
click_text: this.ctaLabelSecondary,
|
|
68
|
+
element_title: "dx-button",
|
|
69
|
+
click_url: this.ctaHrefSecondary,
|
|
70
|
+
element_type: "link",
|
|
71
|
+
content_category: "cta"
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
}
|
|
41
75
|
}
|