@salesforcedevs/dx-components 1.3.142 → 1.3.144

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.142",
3
+ "version": "1.3.144",
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": "2d361bb1d2275ab3a1f84e3f73603b8c5d4fa6dc"
43
+ "gitHead": "3a8cebc9c14abbfde89c1716d950d9fa275ecbce"
44
44
  }
@@ -374,6 +374,19 @@ a.image-container > img {
374
374
  display: block;
375
375
  }
376
376
 
377
+ /* BUTTONS */
378
+
379
+ .buttons {
380
+ display: flex;
381
+ padding-top: var(--item-spacing);
382
+ padding-bottom: var(--item-spacing);
383
+ }
384
+
385
+ dx-button {
386
+ display: inline-block;
387
+ padding-right: var(--dx-g-spacing-lg);
388
+ }
389
+
377
390
  /* AUTHORS */
378
391
 
379
392
  .authors {
@@ -495,6 +508,14 @@ dx-image-and-label {
495
508
  line-height: var(--dx-g-spacing-lg);
496
509
  }
497
510
 
511
+ .buttons {
512
+ flex-direction: column;
513
+ }
514
+
515
+ dx-button {
516
+ padding-bottom: var(--dx-g-spacing-sm);
517
+ }
518
+
498
519
  .authors {
499
520
  padding-top: 0;
500
521
  }
@@ -50,6 +50,27 @@
50
50
  </template>
51
51
  </div>
52
52
  <span class="body dx-text-body-1">{body}</span>
53
+ <div class="buttons" if:true={hasButtons}>
54
+ <dx-button
55
+ if:true={ctaPrimaryLabel}
56
+ href={ctaPrimaryHref}
57
+ icon-symbol={ctaPrimarySymbol}
58
+ target={ctaPrimaryTarget}
59
+ size="large"
60
+ >
61
+ {ctaPrimaryLabel}
62
+ </dx-button>
63
+ <dx-button
64
+ if:true={ctaSecondaryLabel}
65
+ href={ctaSecondaryHref}
66
+ variant="secondary"
67
+ icon-symbol={ctaSecondarySymbol}
68
+ target={ctaSecondaryTarget}
69
+ size="large"
70
+ >
71
+ {ctaSecondaryLabel}
72
+ </dx-button>
73
+ </div>
53
74
  <div class="slot-container">
54
75
  <slot onslotchange={onSlotChange}></slot>
55
76
  </div>
@@ -11,6 +11,14 @@ export default class FeaturedContentHeader extends LightningElement {
11
11
  @api label?: string | null = null;
12
12
  @api labelAsPrimaryHeading: boolean = false;
13
13
  @api body!: string;
14
+ @api ctaPrimaryLabel?: string;
15
+ @api ctaPrimaryHref?: string;
16
+ @api ctaPrimarySymbol?: string;
17
+ @api ctaPrimaryTarget?: string;
18
+ @api ctaSecondaryLabel?: string;
19
+ @api ctaSecondaryHref?: string;
20
+ @api ctaSecondarySymbol?: string;
21
+ @api ctaSecondaryTarget?: string;
14
22
  @api imgSrc?: string;
15
23
  @api imgAlt?: string = "Featured content image";
16
24
  @api imgPlacement?: "inline" | "below" = "inline";
@@ -69,6 +77,10 @@ export default class FeaturedContentHeader extends LightningElement {
69
77
  );
70
78
  }
71
79
 
80
+ private get hasButtons() {
81
+ return this.ctaPrimaryLabel && this.ctaSecondaryLabel;
82
+ }
83
+
72
84
  private get style() {
73
85
  return cx(
74
86
  this.backgroundImg &&
@@ -4,6 +4,8 @@
4
4
  .container {
5
5
  display: flex;
6
6
  flex-direction: row;
7
+ align-items: center;
8
+ justify-content: space-between;
7
9
  padding: 0 var(--dx-g-page-padding-horizontal);
8
10
  }
9
11
 
@@ -35,8 +37,8 @@
35
37
  }
36
38
 
37
39
  .features-list {
38
- display: flex;
39
- flex-wrap: wrap;
40
+ display: grid;
41
+ grid-template-columns: 1fr 1fr;
40
42
  margin-top: var(--dx-g-spacing-lg);
41
43
  gap: var(--dx-g-spacing-md);
42
44
  }
@@ -44,10 +46,8 @@
44
46
  .feature-item {
45
47
  display: flex;
46
48
  align-items: center;
47
- text-align: left;
48
49
  gap: var(--dx-g-spacing-smd);
49
- flex-basis: calc(50% - var(--dx-g-spacing-smd));
50
- flex-grow: 1;
50
+ white-space: nowrap;
51
51
  }
52
52
 
53
53
  .feature-item span {
@@ -62,10 +62,6 @@ dx-button {
62
62
  margin-top: var(--dx-g-spacing-smd);
63
63
  }
64
64
 
65
- img {
66
- object-fit: contain;
67
- }
68
-
69
65
  img.mobile {
70
66
  display: none;
71
67
  }
@@ -112,6 +108,6 @@ img.mobile {
112
108
 
113
109
  @media screen and (max-width: 640px) {
114
110
  .features-list {
115
- flex-direction: column;
111
+ grid-template-columns: 1fr;
116
112
  }
117
113
  }