@salesforcedevs/dx-components 1.3.129 → 1.3.133

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
@@ -36,6 +36,7 @@
36
36
  "dx/featureGrid",
37
37
  "dx/featuredContentHeader",
38
38
  "dx/featuresList",
39
+ "dx/featuresListHeader",
39
40
  "dx/filterMenu",
40
41
  "dx/footer",
41
42
  "dx/formattedDateTime",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforcedevs/dx-components",
3
- "version": "1.3.129",
3
+ "version": "1.3.133",
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": "42056b3c6d9dc4e27d4cb8c24433e0b377579dde"
43
+ "gitHead": "5b2a2e71549582eab1aa16198ff536ca31d811c5"
44
44
  }
@@ -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
+ }
@@ -19,7 +19,6 @@ export default class extends LightningElement {
19
19
  connectedCallback() {
20
20
  this.isOpen =
21
21
  window.localStorage.getItem(this.localStorageKey) !== "false";
22
- console.log(this.isOpen, "TOAST");
23
22
  }
24
23
 
25
24
  private get iconSymbol() {