@salesforcedevs/dx-components 1.3.197 → 1.3.198
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.
|
|
3
|
+
"version": "1.3.198",
|
|
4
4
|
"description": "DX Lightning web components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"engines": {
|
|
@@ -41,5 +41,5 @@
|
|
|
41
41
|
"eventsourcemock": "^2.0.0",
|
|
42
42
|
"luxon": "^3.1.0"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "b3dd8e55be2d535c10e2ea0420c251d4ec975fdf"
|
|
45
45
|
}
|
|
@@ -96,6 +96,12 @@
|
|
|
96
96
|
);
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
+
.cta-inline {
|
|
100
|
+
display: flex;
|
|
101
|
+
justify-content: space-between;
|
|
102
|
+
max-width: unset;
|
|
103
|
+
}
|
|
104
|
+
|
|
99
105
|
/* sections with a swoop and center alignment should not left align as it encroaches on the graphic */
|
|
100
106
|
.section.align-center.graphic-top .text {
|
|
101
107
|
text-align: center;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<div class={className} style={style} part="container">
|
|
3
3
|
<svg
|
|
4
4
|
class="background-graphic background-graphic-top"
|
|
5
|
-
if
|
|
5
|
+
lwc:if={topGraphic}
|
|
6
6
|
preserveAspectRatio="none"
|
|
7
7
|
width="1438px"
|
|
8
8
|
height="83px"
|
|
@@ -26,21 +26,38 @@
|
|
|
26
26
|
</g>
|
|
27
27
|
</svg>
|
|
28
28
|
|
|
29
|
-
<div part="text" class="text" if
|
|
30
|
-
<span class="label dx-text-display-8" if
|
|
31
|
-
<h2 class={headingClassName} if
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
29
|
+
<div part="text" class="text" lwc:if={hasText}>
|
|
30
|
+
<span class="label dx-text-display-8" lwc:if={label}>{label}</span>
|
|
31
|
+
<h2 class={headingClassName} lwc:if={title}>
|
|
32
|
+
{title}
|
|
33
|
+
<template lwc:if={ctaBtnInline}>
|
|
34
|
+
<dx-button
|
|
35
|
+
class="cta"
|
|
36
|
+
lwc:if={ctaLabel}
|
|
37
|
+
href={ctaHref}
|
|
38
|
+
variant={ctaBtnVariant}
|
|
39
|
+
icon-symbol={ctaBtnSymbol}
|
|
40
|
+
target={ctaBtnTarget}
|
|
41
|
+
onclick={handleLabelClick}
|
|
42
|
+
>
|
|
43
|
+
{ctaLabel}
|
|
44
|
+
</dx-button>
|
|
45
|
+
</template>
|
|
46
|
+
</h2>
|
|
47
|
+
<span class={subtitleClassName} lwc:if={subtitle}>{subtitle}</span>
|
|
48
|
+
<template lwc:if={ctaNotInline}>
|
|
49
|
+
<dx-button
|
|
50
|
+
class="cta"
|
|
51
|
+
lwc:if={ctaLabel}
|
|
52
|
+
href={ctaHref}
|
|
53
|
+
variant={ctaBtnVariant}
|
|
54
|
+
icon-symbol={ctaBtnSymbol}
|
|
55
|
+
target={ctaBtnTarget}
|
|
56
|
+
onclick={handleLabelClick}
|
|
57
|
+
>
|
|
58
|
+
{ctaLabel}
|
|
59
|
+
</dx-button>
|
|
60
|
+
</template>
|
|
44
61
|
</div>
|
|
45
62
|
<div part="content" class="content">
|
|
46
63
|
<slot></slot>
|
|
@@ -48,7 +65,7 @@
|
|
|
48
65
|
|
|
49
66
|
<svg
|
|
50
67
|
class="background-graphic background-graphic-bottom"
|
|
51
|
-
if
|
|
68
|
+
lwc:if={bottomGraphic}
|
|
52
69
|
preserveAspectRatio="none"
|
|
53
70
|
width="1438px"
|
|
54
71
|
height="83px"
|
|
@@ -17,6 +17,7 @@ export default class Section extends LightningElement {
|
|
|
17
17
|
@api ctaBtnVariant?: string;
|
|
18
18
|
@api ctaBtnSymbol?: string;
|
|
19
19
|
@api ctaBtnTarget?: string = "_self";
|
|
20
|
+
@api ctaBtnInline?: boolean = false;
|
|
20
21
|
@api topGraphic: boolean = false;
|
|
21
22
|
@api graphicOverlap: boolean = false;
|
|
22
23
|
@api bottomGraphic: boolean = false;
|
|
@@ -43,13 +44,21 @@ export default class Section extends LightningElement {
|
|
|
43
44
|
}
|
|
44
45
|
|
|
45
46
|
private get headingClassName() {
|
|
46
|
-
return cx(
|
|
47
|
+
return cx(
|
|
48
|
+
"heading",
|
|
49
|
+
`dx-text-display-${this.headingLevel}`,
|
|
50
|
+
this.ctaBtnInline && "cta-inline"
|
|
51
|
+
);
|
|
47
52
|
}
|
|
48
53
|
|
|
49
54
|
private get hasText(): boolean {
|
|
50
55
|
return !!(this.title || this.label || this.subtitle);
|
|
51
56
|
}
|
|
52
57
|
|
|
58
|
+
private get ctaNotInline(): boolean {
|
|
59
|
+
return !this.ctaBtnInline;
|
|
60
|
+
}
|
|
61
|
+
|
|
53
62
|
private handleLabelClick(e: Event) {
|
|
54
63
|
track(e.target!, "custEv_ctaLinkClick", {
|
|
55
64
|
click_text: this.ctaLabel,
|