@salesforcedevs/dx-components 1.15.4-ldh-alpha → 1.15.4-ldh-alpha2

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.15.4-ldh-alpha",
3
+ "version": "1.15.4-ldh-alpha2",
4
4
  "description": "DX Lightning web components",
5
5
  "license": "MIT",
6
6
  "engines": {
@@ -24,22 +24,24 @@
24
24
  </div>
25
25
  <div class="sidebar-header" show-shadow={showBoxShadow}>
26
26
  <div class="header padding-horizontal" lwc:if={isDesktop}>
27
- <div lwc:if={devCenter} class="dev-center-link">
28
- <a href={devCenter.link} class="dev-center-content">
29
- <dx-icon symbol="back"></dx-icon>
30
- <dx-icon
31
- class="brand-icon"
32
- lwc:if={devCenter.icon}
33
- sprite="salesforcebrand"
34
- symbol={brand}
35
- size="large"
36
- ></dx-icon>
37
- <h2 class="dx-text-display-6 header-title">
38
- {devCenter.title}
39
- </h2>
40
- </a>
27
+ <div class="header-wrapper">
28
+ <div lwc:if={devCenter} class="dev-center-link link-row">
29
+ <a href={devCenter.link} class="dev-center-content">
30
+ <dx-icon symbol="back"></dx-icon>
31
+ <dx-icon
32
+ class="brand-icon"
33
+ lwc:if={devCenter.icon}
34
+ sprite="salesforcebrand"
35
+ symbol={brand}
36
+ size="large"
37
+ ></dx-icon>
38
+ <span class="subtitle dx-text-body-4">
39
+ {devCenter.title}
40
+ </span>
41
+ </a>
42
+ </div>
43
+ <h2 class="dx-text-display-6 header-title">{header}</h2>
41
44
  </div>
42
- <h2 class="dx-text-display-6 header-title">{header}</h2>
43
45
  </div>
44
46
  <div class="search padding-horizontal">
45
47
  <dx-sidebar-search
@@ -5,7 +5,6 @@ import { getSidebarSearchParams } from "dxUtils/coveo";
5
5
  import { toJson } from "dxUtils/normalizers";
6
6
  import SidebarSearch from "dx/sidebarSearch";
7
7
  import { SidebarBase } from "dxBaseElements/sidebarBase";
8
- import { Brand } from "typings/custom";
9
8
 
10
9
  const MOBILE_SIZE_MATCH = "768px";
11
10
 
@@ -15,16 +14,6 @@ export default class Sidebar extends SidebarBase {
15
14
  @api coveoSearchHub!: string;
16
15
  @api coveoAdvancedQueryConfig!: string;
17
16
  @api header: string = "";
18
- @api brand: Brand | null = null;
19
-
20
- @api
21
- get devCenter() {
22
- return this._devCenter;
23
- }
24
-
25
- set devCenter(value) {
26
- this._devCenter = toJson(value);
27
- }
28
17
 
29
18
  @api
30
19
  get trees() {
@@ -64,7 +53,6 @@ export default class Sidebar extends SidebarBase {
64
53
  private scrollToSelectedSearchResult: boolean = false;
65
54
  private selectedSearchResultIndex: number = -1;
66
55
  private requestedFetchMoreResults: boolean = false;
67
- private _devCenter: any;
68
56
 
69
57
  private get areResultsEmpty(): boolean {
70
58
  return (
@@ -26,7 +26,27 @@
26
26
  <template lwc:if={expanded}>
27
27
  <div class="sidebar-header" show-shadow={showBoxShadow}>
28
28
  <div class="header padding-horizontal" lwc:if={isDesktop}>
29
- <h2 class="dx-text-display-6 header-title">{header}</h2>
29
+ <div class="header-wrapper">
30
+ <div
31
+ lwc:if={devCenter}
32
+ class="dev-center-link link-row"
33
+ >
34
+ <a href={devCenter.link} class="dev-center-content">
35
+ <dx-icon symbol="back"></dx-icon>
36
+ <dx-icon
37
+ class="brand-icon"
38
+ lwc:if={devCenter.icon}
39
+ sprite="salesforcebrand"
40
+ symbol={brand}
41
+ size="large"
42
+ ></dx-icon>
43
+ <span class="subtitle dx-text-body-4">
44
+ {devCenter.title}
45
+ </span>
46
+ </a>
47
+ </div>
48
+ <h2 class="dx-text-display-6 header-title">{header}</h2>
49
+ </div>
30
50
  </div>
31
51
  <div class="search padding-horizontal">
32
52
  <dx-input
@@ -1,6 +1,7 @@
1
1
  import { LightningElement, api } from "lwc";
2
2
  import type { OptionWithLink } from "typings/custom";
3
3
  import { toJson } from "dxUtils/normalizers";
4
+ import { Brand } from "typings/custom";
4
5
 
5
6
  export const HEIGHT_OF_SIDEBAR_ITEM = 32;
6
7
  export const WAIT_TIME_BEFORE_SCROLL_IN_MS = 500;
@@ -16,11 +17,22 @@ export class SidebarBase extends LightningElement {
16
17
  _value?: string = undefined;
17
18
  showBoxShadow: boolean = false;
18
19
  private scrolling: boolean = false;
20
+ _devCenter: any;
19
21
 
20
22
  @api langValuePath: string = "id";
21
23
  @api language!: string;
22
24
  @api bailHref!: string;
23
25
  @api bailLabel!: string;
26
+ @api brand: Brand | null = null;
27
+
28
+ @api
29
+ get devCenter() {
30
+ return this._devCenter;
31
+ }
32
+
33
+ set devCenter(value) {
34
+ this._devCenter = toJson(value);
35
+ }
24
36
 
25
37
  @api
26
38
  get languages() {
@@ -55,6 +55,42 @@
55
55
  padding-left: var(--dx-g-global-header-padding-horizontal);
56
56
  }
57
57
 
58
+ .header-wrapper {
59
+ display: flex;
60
+ flex-direction: column;
61
+ gap: 0.5rem;
62
+ }
63
+
64
+ .link-row a {
65
+ display: flex;
66
+ align-items: center;
67
+ gap: 0.5rem;
68
+ }
69
+
70
+ .dev-center-link {
71
+ display: inline-block;
72
+ padding: var(--dx-g-spacing-smd) var(--dx-g-spacing-lg) 0
73
+ var(--dx-g-global-header-padding-horizontal);
74
+ height: var(--dx-g-spacing-xl);
75
+ }
76
+
77
+ .dev-center-content {
78
+ display: flex;
79
+ align-items: center;
80
+ text-decoration: none;
81
+ color: inherit;
82
+ font-weight: var(--dx-g-font-bold);
83
+ }
84
+
85
+ dx-icon {
86
+ --dx-c-icon-size: var(--dx-g-icon-size-xs);
87
+ --dx-c-icon-color: var(--dx-g-blue-vibrant-20);
88
+ }
89
+
90
+ .dev-center-content > * + * {
91
+ margin-left: 8px;
92
+ }
93
+
58
94
  .container {
59
95
  background-color: white;
60
96
  display: flex;