@salesforcedevs/dx-components 1.3.26-alpha02 → 1.3.29

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/LICENSE ADDED
@@ -0,0 +1,12 @@
1
+ Copyright (c) 2020, Salesforce.com, Inc.
2
+ All rights reserved.
3
+
4
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
5
+
6
+ * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
7
+
8
+ * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
9
+
10
+ * Neither the name of Salesforce.com nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
11
+
12
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
package/lwc.config.json CHANGED
@@ -52,7 +52,6 @@
52
52
  "dx/input",
53
53
  "dx/interactiveImage",
54
54
  "dx/logo",
55
- "dx/mainContentHeader",
56
55
  "dx/modal",
57
56
  "dx/metadataBadge",
58
57
  "dx/modalDrawer",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforcedevs/dx-components",
3
- "version": "1.3.26-alpha02",
3
+ "version": "1.3.29",
4
4
  "description": "DX Lightning web components",
5
5
  "license": "MIT",
6
6
  "engines": {
@@ -37,5 +37,6 @@
37
37
  "@types/vimeo__player": "^2.16.2",
38
38
  "eventsourcemock": "^2.0.0",
39
39
  "luxon": "^3.1.0"
40
- }
40
+ },
41
+ "gitHead": "5d0d8e8ae99896c6f2da9afd8f826a5c37ae45a1"
41
42
  }
@@ -9,6 +9,8 @@
9
9
  --dx-c-section-padding-top: var(--dx-c-section-padding-vertical);
10
10
  --dx-c-section-padding-bottom: var(--dx-c-section-padding-vertical);
11
11
  --dx-c-section-heading-margin-bottom: var(--dx-g-spacing-2xl);
12
+ --dx-c-section-cta-color: var(--dx-g-blue-vibrant-50);
13
+ --dx-c-section-cta-inline-hover-color: var(--dx-g-blue-vibrant-30);
12
14
  }
13
15
 
14
16
  .section {
@@ -86,6 +88,13 @@
86
88
  z-index: 50;
87
89
  }
88
90
 
91
+ .cta {
92
+ --dx-c-button-primary-color: var(--dx-c-section-cta-color);
93
+ --dx-c-button-inline-color-hover: var(
94
+ --dx-c-section-cta-inline-hover-color
95
+ );
96
+ }
97
+
89
98
  /* sections with a swoop and center alignment should not left align as it encroaches on the graphic */
90
99
  .section.align-center.graphic-top .text {
91
100
  text-align: center;
@@ -32,6 +32,16 @@
32
32
  <span class="subtitle dx-text-body-1" if:true={subtitle}>
33
33
  {subtitle}
34
34
  </span>
35
+ <dx-button
36
+ class="cta"
37
+ if:true={ctaLabel}
38
+ href={ctaHref}
39
+ variant={ctaBtnVariant}
40
+ icon-symbol={ctaBtnSymbol}
41
+ target={ctaBtnTarget}
42
+ >
43
+ {ctaLabel}
44
+ </dx-button>
35
45
  </div>
36
46
  <div part="content" class="content">
37
47
  <slot></slot>
@@ -10,6 +10,11 @@ export default class Section extends LightningElement {
10
10
  @api subtitle?: string;
11
11
  @api textAlign: "center" | "left" = "left";
12
12
  @api title?: string;
13
+ @api ctaLabel?: string;
14
+ @api ctaHref?: string;
15
+ @api ctaBtnVariant?: string;
16
+ @api ctaBtnSymbol?: string;
17
+ @api ctaBtnTarget?: string = "_self";
13
18
  @api topGraphic: boolean = false;
14
19
  @api graphicOverlap: boolean = false;
15
20
  @api bottomGraphic: boolean = false;
@@ -1,90 +0,0 @@
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
- overflow: hidden;
9
- }
10
-
11
- .container > * {
12
- width: 50%;
13
- }
14
-
15
- .text-container {
16
- display: flex;
17
- flex-direction: column;
18
- justify-content: center;
19
- align-items: flex-start;
20
- padding: var(--dx-g-spacing-lg) 0;
21
- min-height: 460px;
22
- text-align: left;
23
- background-position: center;
24
- background-size: cover;
25
- background-repeat: no-repeat;
26
- }
27
-
28
- .image-container {
29
- display: flex;
30
- flex-direction: row;
31
- justify-content: flex-start;
32
- overflow: visible;
33
- }
34
-
35
- img {
36
- width: 100%;
37
- }
38
-
39
- img.desktop {
40
- height: fit-content;
41
- min-width: 876px;
42
- margin-left: var(--dx-g-spacing-lg);
43
- }
44
-
45
- img.mobile {
46
- display: none;
47
- min-width: 1024px;
48
- }
49
-
50
- .text-container > *:not(:last-child) {
51
- margin-bottom: var(--dx-g-spacing-smd);
52
- }
53
-
54
- dx-button {
55
- margin-top: var(--dx-g-spacing-smd);
56
- }
57
-
58
- @media screen and (max-width: 1024px) {
59
- .container {
60
- flex-direction: column;
61
- }
62
-
63
- .container > * {
64
- width: 100%;
65
- }
66
-
67
- .text-container {
68
- align-items: center;
69
- text-align: center;
70
- padding-top: var(--dx-g-spacing-4xl);
71
- padding-bottom: 0;
72
- min-height: unset;
73
- }
74
-
75
- .text-container > * {
76
- max-width: 700px;
77
- }
78
-
79
- .image-container {
80
- justify-content: center;
81
- }
82
-
83
- img.desktop {
84
- display: none;
85
- }
86
-
87
- img.mobile {
88
- display: block;
89
- }
90
- }
@@ -1,18 +0,0 @@
1
- <template>
2
- <div class="container">
3
- <div class="text-container" style={style}>
4
- <h1 class="heading dx-text-heading-2">{title}</h1>
5
- <span class="body dx-text-body-1">{body}</span>
6
- <span if:true={subtitle} class="subtitle dx-text-heading-4b">
7
- {subtitle}
8
- </span>
9
- <dx-button href={ctaHref} target={ctaTarget} size="hero">
10
- {ctaLabel}
11
- </dx-button>
12
- </div>
13
- <div class="image-container">
14
- <img class="desktop" src={imgSrc} />
15
- <img class="mobile" src={imgSrcMobile} />
16
- </div>
17
- </div>
18
- </template>
@@ -1,26 +0,0 @@
1
- import { LightningElement, api } from "lwc";
2
- import { track } from "dxUtils/analytics";
3
-
4
- export default class MainContentHeader extends LightningElement {
5
- @api title!: string;
6
- @api subtitle?: string;
7
- @api body!: string;
8
- @api ctaLabel!: string;
9
- @api ctaHref!: string;
10
- @api imgSrc!: string;
11
- @api imgSrcMobile!: string;
12
- @api ctaTarget?: string | null = null;
13
-
14
- private onCtaClick(e: Event) {
15
- if (e.currentTarget) {
16
- track(e.currentTarget, "custEv_ctaButtonClick", {
17
- clickText: this.ctaLabel,
18
- itemTitle: this.title,
19
- clickUrl: this.ctaHref,
20
- elementType: "button",
21
- destinationType: "internal",
22
- ctaClick: true
23
- });
24
- }
25
- }
26
- }