@salesforcedevs/dx-components 1.3.131 → 1.3.134
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 +2 -0
- package/package.json +2 -2
- package/src/modules/dx/faq/faq.css +49 -0
- package/src/modules/dx/faq/faq.html +32 -0
- package/src/modules/dx/faq/faq.ts +16 -0
- package/src/modules/dx/featuresListHeader/featuresListHeader.css +110 -0
- package/src/modules/dx/featuresListHeader/featuresListHeader.html +46 -0
- package/src/modules/dx/featuresListHeader/featuresListHeader.ts +78 -0
package/lwc.config.json
CHANGED
|
@@ -32,10 +32,12 @@
|
|
|
32
32
|
"dx/codeBlock",
|
|
33
33
|
"dx/dropdown",
|
|
34
34
|
"dx/emptyState",
|
|
35
|
+
"dx/faq",
|
|
35
36
|
"dx/feature",
|
|
36
37
|
"dx/featureGrid",
|
|
37
38
|
"dx/featuredContentHeader",
|
|
38
39
|
"dx/featuresList",
|
|
40
|
+
"dx/featuresListHeader",
|
|
39
41
|
"dx/filterMenu",
|
|
40
42
|
"dx/footer",
|
|
41
43
|
"dx/formattedDateTime",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforcedevs/dx-components",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.134",
|
|
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": "b60c5fed152e5fe403577993093487128c5ea88b"
|
|
44
44
|
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
@import "dxHelpers/reset";
|
|
2
|
+
@import "dxHelpers/text";
|
|
3
|
+
|
|
4
|
+
details summary {
|
|
5
|
+
cursor: pointer;
|
|
6
|
+
list-style: none;
|
|
7
|
+
display: flex;
|
|
8
|
+
justify-content: space-between;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
details summary::-webkit-details-marker {
|
|
12
|
+
display: none;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
details summary > * {
|
|
16
|
+
display: inline;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/* hide '-' when collapsed & '+' when expanded */
|
|
20
|
+
details > summary > .expanded,
|
|
21
|
+
details[open] > summary > .collapsed {
|
|
22
|
+
display: none;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/* show '-' when expanded */
|
|
26
|
+
details[open] > summary > .expanded {
|
|
27
|
+
display: inline;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
details:not(:first-of-type) {
|
|
31
|
+
margin-top: var(--dx-g-spacing-lg);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.container {
|
|
35
|
+
max-width: 840px;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.faq-title {
|
|
39
|
+
text-align: center;
|
|
40
|
+
margin-bottom: var(--dx-g-spacing-lg);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.faq-content {
|
|
44
|
+
padding: var(--dx-g-spacing-xl) 0;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.faq-body {
|
|
48
|
+
margin: var(--dx-g-spacing-lg) 0;
|
|
49
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="container">
|
|
3
|
+
<h2 class="faq-title dx-text-display-4">{title}</h2>
|
|
4
|
+
<div class="faq-content">
|
|
5
|
+
<template iterator:it={options}>
|
|
6
|
+
<details key={it.value.title} open={it.first}>
|
|
7
|
+
<summary class="dx-text-display-7">
|
|
8
|
+
{it.value.title}
|
|
9
|
+
<dx-icon-badge
|
|
10
|
+
class="collapsed"
|
|
11
|
+
icon-size="small"
|
|
12
|
+
background-color="cloud-blue-vibrant-95"
|
|
13
|
+
background-size="small"
|
|
14
|
+
symbol="add"
|
|
15
|
+
color="blue-vibrant-20"
|
|
16
|
+
></dx-icon-badge>
|
|
17
|
+
<dx-icon-badge
|
|
18
|
+
class="expanded"
|
|
19
|
+
icon-size="small"
|
|
20
|
+
background-color="cloud-blue-vibrant-95"
|
|
21
|
+
background-size="small"
|
|
22
|
+
symbol="dash"
|
|
23
|
+
color="blue-vibrant-20"
|
|
24
|
+
></dx-icon-badge>
|
|
25
|
+
</summary>
|
|
26
|
+
<p class="faq-body dx-text-body-2">{it.value.body}</p>
|
|
27
|
+
<dx-hr no-padding="true"></dx-hr>
|
|
28
|
+
</details>
|
|
29
|
+
</template>
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
</template>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { LightningElement, api } from "lwc";
|
|
2
|
+
import { toJson } from "dxUtils/normalizers";
|
|
3
|
+
|
|
4
|
+
export default class Faq extends LightningElement {
|
|
5
|
+
@api title!: string;
|
|
6
|
+
|
|
7
|
+
@api
|
|
8
|
+
get options() {
|
|
9
|
+
return this._options;
|
|
10
|
+
}
|
|
11
|
+
set options(value: any) {
|
|
12
|
+
this._options = toJson(value);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
private _options = [];
|
|
16
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
@import "dxHelpers/reset";
|
|
2
|
+
@import "dxHelpers/text";
|
|
3
|
+
|
|
4
|
+
.container {
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-direction: row;
|
|
7
|
+
padding: 0 var(--dx-g-page-padding-horizontal);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.text-container {
|
|
11
|
+
display: flex;
|
|
12
|
+
flex-direction: column;
|
|
13
|
+
justify-content: center;
|
|
14
|
+
align-items: flex-start;
|
|
15
|
+
padding: var(--dx-g-spacing-lg) 0 var(--dx-g-spacing-4xl) 0;
|
|
16
|
+
min-height: 460px;
|
|
17
|
+
text-align: left;
|
|
18
|
+
background-position: center;
|
|
19
|
+
background-size: cover;
|
|
20
|
+
background-repeat: no-repeat;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.button-container {
|
|
24
|
+
display: flex;
|
|
25
|
+
gap: var(--dx-g-spacing-md);
|
|
26
|
+
margin-top: var(--dx-g-spacing-smd);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.secondary-button {
|
|
30
|
+
--dx-c-button-background-color: white;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.light-text > *:not(:last-child) {
|
|
34
|
+
color: white;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.features-list {
|
|
38
|
+
display: flex;
|
|
39
|
+
flex-wrap: wrap;
|
|
40
|
+
margin-top: var(--dx-g-spacing-lg);
|
|
41
|
+
gap: var(--dx-g-spacing-md);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.feature-item {
|
|
45
|
+
display: flex;
|
|
46
|
+
align-items: center;
|
|
47
|
+
text-align: left;
|
|
48
|
+
gap: var(--dx-g-spacing-smd);
|
|
49
|
+
flex-basis: calc(50% - var(--dx-g-spacing-smd));
|
|
50
|
+
flex-grow: 1;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.feature-item span {
|
|
54
|
+
color: white;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.text-container > *:not(:last-child) {
|
|
58
|
+
margin-bottom: var(--dx-g-spacing-smd);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
dx-button {
|
|
62
|
+
margin-top: var(--dx-g-spacing-smd);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
img {
|
|
66
|
+
object-fit: contain;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
img.mobile {
|
|
70
|
+
display: none;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
@media screen and (max-width: 1024px) {
|
|
74
|
+
.container {
|
|
75
|
+
flex-direction: column;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.text-container {
|
|
79
|
+
align-items: center;
|
|
80
|
+
text-align: center;
|
|
81
|
+
padding-top: var(--dx-g-spacing-4xl);
|
|
82
|
+
padding-bottom: 0;
|
|
83
|
+
min-height: unset;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.text-container > * {
|
|
87
|
+
max-width: 700px;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
img.desktop {
|
|
91
|
+
display: none;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
img.mobile {
|
|
95
|
+
display: block;
|
|
96
|
+
margin-top: var(--dx-g-spacing-3xl);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
@media screen and (max-width: 768px) {
|
|
101
|
+
.subtitle {
|
|
102
|
+
font-size: var(--dx-g-text-base);
|
|
103
|
+
line-height: var(--dx-g-text-xl);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.heading {
|
|
107
|
+
font-size: var(--dx-g-text-3xl);
|
|
108
|
+
line-height: var(--dx-g-text-4xl);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="container" style={style}>
|
|
3
|
+
<div class={textStyle}>
|
|
4
|
+
<h1 class="heading dx-text-display-2">
|
|
5
|
+
<dx-formatted-rich-text value={title}></dx-formatted-rich-text>
|
|
6
|
+
</h1>
|
|
7
|
+
<span if:true={subtitle} class="dx-text-display-5">{subtitle}</span>
|
|
8
|
+
<div class="features-list">
|
|
9
|
+
<template for:each={featuresList} for:item="feature">
|
|
10
|
+
<div key={feature.title} class="feature-item">
|
|
11
|
+
<dx-icon-badge
|
|
12
|
+
symbol={feature.symbol}
|
|
13
|
+
sprite={feature.sprite}
|
|
14
|
+
background-color="cloud-blue-vibrant-95"
|
|
15
|
+
color="blue-vibrant-60"
|
|
16
|
+
></dx-icon-badge>
|
|
17
|
+
<span class="dx-text-display-7">{feature.title}</span>
|
|
18
|
+
</div>
|
|
19
|
+
</template>
|
|
20
|
+
</div>
|
|
21
|
+
<div class="button-container">
|
|
22
|
+
<dx-button
|
|
23
|
+
onclick={onCtaClick}
|
|
24
|
+
href={ctaHref}
|
|
25
|
+
target={ctaTarget}
|
|
26
|
+
size="large"
|
|
27
|
+
>
|
|
28
|
+
{ctaLabel}
|
|
29
|
+
</dx-button>
|
|
30
|
+
<dx-button
|
|
31
|
+
class="secondary-button"
|
|
32
|
+
if:true={ctaLabelSecondary}
|
|
33
|
+
onclick={onCtaClickSecondary}
|
|
34
|
+
href={ctaHrefSecondary}
|
|
35
|
+
target={ctaTargetSecondary}
|
|
36
|
+
size="large"
|
|
37
|
+
variant="secondary"
|
|
38
|
+
>
|
|
39
|
+
{ctaLabelSecondary}
|
|
40
|
+
</dx-button>
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
<img class="desktop" src={imgSrc} />
|
|
44
|
+
<img class="mobile" src={imgSrcMobile} />
|
|
45
|
+
</div>
|
|
46
|
+
</template>
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { LightningElement, api } from "lwc";
|
|
2
|
+
import cx from "classnames";
|
|
3
|
+
import { track } from "dxUtils/analytics";
|
|
4
|
+
import { toJson } from "dxUtils/normalizers";
|
|
5
|
+
|
|
6
|
+
export default class FeaturesListHeader extends LightningElement {
|
|
7
|
+
@api title!: string;
|
|
8
|
+
@api subtitle?: string;
|
|
9
|
+
@api ctaLabel!: string;
|
|
10
|
+
@api ctaLabelSecondary?: string;
|
|
11
|
+
@api ctaHref!: string;
|
|
12
|
+
@api ctaHrefSecondary?: string;
|
|
13
|
+
@api ctaTarget?: string | null = null;
|
|
14
|
+
@api ctaTargetSecondary?: string | null = null;
|
|
15
|
+
@api imgSrc!: string;
|
|
16
|
+
@api imgSrcMobile!: string;
|
|
17
|
+
@api backgroundDark: boolean = false;
|
|
18
|
+
@api backgroundColor?: string;
|
|
19
|
+
|
|
20
|
+
@api
|
|
21
|
+
get featuresList() {
|
|
22
|
+
return this._featuresList;
|
|
23
|
+
}
|
|
24
|
+
set featuresList(value: string) {
|
|
25
|
+
this._featuresList = toJson(value);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
private get style() {
|
|
29
|
+
return cx(
|
|
30
|
+
this.backgroundColor &&
|
|
31
|
+
`background-color: var(--dx-g-${this.backgroundColor});`
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
private get textStyle() {
|
|
36
|
+
return cx("text-container", this.backgroundDark && "light-text");
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
private _featuresList!: any;
|
|
40
|
+
|
|
41
|
+
private onCtaClick(e: Event) {
|
|
42
|
+
if (e.currentTarget) {
|
|
43
|
+
track(e.currentTarget, "custEv_ctaButtonClick", {
|
|
44
|
+
click_text: this.ctaLabel,
|
|
45
|
+
click_url: this.ctaHref,
|
|
46
|
+
element_type: "button",
|
|
47
|
+
element_title: this.title,
|
|
48
|
+
content_category: "cta"
|
|
49
|
+
});
|
|
50
|
+
track(e.currentTarget!, "custEv_linkClick", {
|
|
51
|
+
click_text: this.ctaLabel,
|
|
52
|
+
element_title: this.title,
|
|
53
|
+
click_url: this.ctaHref,
|
|
54
|
+
element_type: "link",
|
|
55
|
+
content_category: "cta"
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
private onCtaClickSecondary(e: Event) {
|
|
61
|
+
if (e.currentTarget) {
|
|
62
|
+
track(e.currentTarget, "custEv_ctaButtonClick", {
|
|
63
|
+
click_text: this.ctaLabelSecondary,
|
|
64
|
+
click_url: this.ctaHrefSecondary,
|
|
65
|
+
element_type: "button",
|
|
66
|
+
element_title: this.title,
|
|
67
|
+
content_category: "cta"
|
|
68
|
+
});
|
|
69
|
+
track(e.currentTarget!, "custEv_linkClick", {
|
|
70
|
+
click_text: this.ctaLabelSecondary,
|
|
71
|
+
element_title: this.title,
|
|
72
|
+
click_url: this.ctaHrefSecondary,
|
|
73
|
+
element_type: "link",
|
|
74
|
+
content_category: "cta"
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|