@salesforcedevs/dx-components 1.3.260 → 1.3.261

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
@@ -38,6 +38,7 @@
38
38
  "dx/codeBlock",
39
39
  "dx/coveoRecommendations",
40
40
  "dx/dropdown",
41
+ "dx/embeddedVideo",
41
42
  "dx/emptyState",
42
43
  "dx/faq",
43
44
  "dx/feature",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforcedevs/dx-components",
3
- "version": "1.3.260",
3
+ "version": "1.3.261",
4
4
  "description": "DX Lightning web components",
5
5
  "license": "MIT",
6
6
  "engines": {
@@ -45,5 +45,5 @@
45
45
  "volta": {
46
46
  "node": "16.19.1"
47
47
  },
48
- "gitHead": "b839cf5e249f61097ec60de9f07257c7ddbdf0e5"
48
+ "gitHead": "8f326de081fbbef38ac44074ed4f54190e6416c1"
49
49
  }
@@ -23,10 +23,7 @@
23
23
  />
24
24
  </a>
25
25
  <div
26
- class="
27
- dx-card-base_section-vertical dx-card-base_column
28
- card_section-text
29
- "
26
+ class="dx-card-base_section-vertical dx-card-base_column card_section-text"
30
27
  >
31
28
  <span if:true={label} part="label" class="label dx-text-label-3">
32
29
  {label}
@@ -0,0 +1,35 @@
1
+ @import "dxHelpers/text";
2
+ @import "dxHelpers/reset";
3
+
4
+ iframe {
5
+ border-radius: 16px;
6
+ }
7
+
8
+ h2 {
9
+ margin-top: var(--dx-g-spacing-md);
10
+ }
11
+
12
+ .profile-image {
13
+ height: 48px;
14
+ width: 48px;
15
+ border-radius: 48px;
16
+ }
17
+
18
+ .profile-container {
19
+ display: grid;
20
+ grid-template-columns: 48px 1fr 100px;
21
+ align-items: center;
22
+ }
23
+
24
+ .profile-text {
25
+ margin-left: 10px;
26
+ }
27
+
28
+ .profile-text p {
29
+ color: var(--dx-g-blue-vibrant-20);
30
+ }
31
+
32
+ dx-icon {
33
+ display: inline;
34
+ margin: 0 6px;
35
+ }
@@ -0,0 +1,56 @@
1
+ <template>
2
+ <div class="container">
3
+ <template lwc:if={isTwitter}>
4
+ <iframe
5
+ scrolling="no"
6
+ frameborder="0"
7
+ allowfullscreen="true"
8
+ title="X Post"
9
+ src={twitterSrc}
10
+ height="215"
11
+ width="382"
12
+ ></iframe>
13
+ </template>
14
+ <template lwc:if={isLinkedin}>
15
+ <iframe
16
+ scrolling="no"
17
+ src={linkedinSrc}
18
+ height="215"
19
+ width="382"
20
+ frameborder="0"
21
+ allowfullscreen=""
22
+ title="Embedded post"
23
+ ></iframe>
24
+ </template>
25
+ <h2 class="dx-text-display-6">{title}</h2>
26
+ <p class="dx-text-body-2">{body}</p>
27
+ <div lwc:if={hasSocial}>
28
+ <dx-hr no-padding="true" spacing="smd"></dx-hr>
29
+ <div class="profile-container">
30
+ <img
31
+ class="profile-image"
32
+ src={socialProfileImgSrc}
33
+ alt={socialProfileImgAlt}
34
+ />
35
+ <div class="profile-text">
36
+ <p class="dx-text-display-8">{socialName}</p>
37
+ <p class="dx-text-body-3">{socialJobTitle}</p>
38
+ </div>
39
+ <dx-button
40
+ variant="inline"
41
+ icon-symbol="new_window"
42
+ target="_blank"
43
+ href={href}
44
+ >
45
+ View on
46
+ <dx-icon
47
+ sprite="brand"
48
+ symbol={type}
49
+ color={socialIconColor}
50
+ size="large"
51
+ ></dx-icon>
52
+ </dx-button>
53
+ </div>
54
+ </div>
55
+ </div>
56
+ </template>
@@ -0,0 +1,40 @@
1
+ import { LightningElement, api } from "lwc";
2
+
3
+ export default class EmbeddedVideo extends LightningElement {
4
+ @api type: "twitter" | "linkedin" = "twitter";
5
+ @api videoId!: string;
6
+ @api compact = false;
7
+
8
+ @api title = "";
9
+ @api body = "";
10
+
11
+ @api hasSocial? = false;
12
+ @api socialName?: string;
13
+ @api socialJobTitle?: string;
14
+ @api socialProfileImgSrc?: string;
15
+ @api href?: string;
16
+
17
+ get isTwitter() {
18
+ return this.type === "twitter";
19
+ }
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x9LCJ0ZndfdHdlZXRfZWRpdF9mcm9udGVuZCI6eyJidWNrZXQiOiJvbiIsInZlcnNpb24iOm51bGx9fQ%3D%3D&frame=false&hideCard=false&hideThread=false&id=${this.videoId}&lang=en&maxWidth=318px&origin=https%3A%2F%2Fpublish.twitter.com%2F%23&sessionId=89704af49f57022abd058f0b4cff7b8ed0d9e820&theme=light&widgetsVersion=2615f7e52b7e0%3A1702314776716&width=318px`;
23
+ }
24
+
25
+ get isLinkedin() {
26
+ return this.type === "linkedin";
27
+ }
28
+
29
+ get linkedinSrc() {
30
+ return `https://www.linkedin.com/embed/feed/update/urn:li:ugcPost:${this.videoId}?compact=1`;
31
+ }
32
+
33
+ get socialProfileImgAlt() {
34
+ return `headshot of ${this.socialName}`;
35
+ }
36
+
37
+ get socialIconColor() {
38
+ return this.type === "twitter" ? "black" : "blue-vibrant-50";
39
+ }
40
+ }
@@ -12,6 +12,8 @@
12
12
  --dx-c-section-cta-color: var(--dx-g-blue-vibrant-50);
13
13
  --dx-c-section-cta-inline-hover-color: var(--dx-g-blue-vibrant-30);
14
14
  --dx-c-section-position: relative;
15
+ --dx-c-section-graphic-margin-top: var(--graphic-height);
16
+ --dx-c-section-graphic-margin-bottom: var(--graphic-height);
15
17
  }
16
18
 
17
19
  .section {
@@ -34,11 +36,11 @@
34
36
  }
35
37
 
36
38
  .section.graphic-top:not(.graphic-overlap) {
37
- margin-top: var(--graphic-height);
39
+ margin-top: var(--dx-c-section-graphic-margin-top);
38
40
  }
39
41
 
40
42
  .section.graphic-bottom:not(.graphic-overlap) {
41
- margin-bottom: var(--graphic-height);
43
+ margin-bottom: var(--dx-c-section-graphic-margin-bottom);
42
44
  }
43
45
 
44
46
  .background-graphic {