@salesforcedevs/dx-components 1.40.0-integration-alpha → 1.40.0-integration-alpha1

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.40.0-integration-alpha",
3
+ "version": "1.40.0-integration-alpha1",
4
4
  "description": "DX Lightning web components",
5
5
  "license": "MIT",
6
6
  "engines": {
@@ -26,6 +26,11 @@
26
26
  margin-right: var(--dx-g-spacing-lg);
27
27
  }
28
28
 
29
+ .tree-item-row-selected {
30
+ background: var(--dx-g-cloud-blue-vibrant-95);
31
+ box-shadow: inset var(--dx-g-spacing-xs) 0 0 0 var(--dx-g-blue-vibrant-40);
32
+ }
33
+
29
34
  button {
30
35
  width: 100%;
31
36
  text-align: left;
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div class="tree-item-row">
2
+ <div class={rowClass}>
3
3
  <dx-tree-tile
4
4
  href={href}
5
5
  is-root={isRoot}
@@ -7,6 +7,7 @@
7
7
  is-expanded={isExpanded}
8
8
  has-children={hasChildren}
9
9
  is-selected={isSelected}
10
+ is-contained-selection={isContainedSelection}
10
11
  oniconclick={onIconClick}
11
12
  show-arrow={isParent}
12
13
  target={target}
@@ -51,6 +51,16 @@ export default class TreeItem extends LightningElement {
51
51
  return this._treeNode.key === this.selectedKey && !this.isExternalLink;
52
52
  }
53
53
 
54
+ private get rowClass(): string {
55
+ return this.isSelected && this.showVersionPicker
56
+ ? "tree-item-row tree-item-row-selected"
57
+ : "tree-item-row";
58
+ }
59
+
60
+ private get isContainedSelection(): boolean {
61
+ return this.isSelected && this.showVersionPicker;
62
+ }
63
+
54
64
  private get hasChildren(): boolean {
55
65
  return !!(
56
66
  this.treeNode &&
@@ -28,6 +28,7 @@ export default class TreeTile extends LightningElement {
28
28
  @api isExpanded = false;
29
29
  @api hasChildren = false;
30
30
  @api isSelected = false;
31
+ @api isContainedSelection = false;
31
32
  @api href!: string;
32
33
  @api showArrow = false;
33
34
  @api target!: string;
@@ -80,7 +81,10 @@ export default class TreeTile extends LightningElement {
80
81
  "tile-root": this.isRoot,
81
82
  "tile-with-children": !this.isRoot && this.hasChildren,
82
83
  "tile-root-with-child": this.isRoot && this.showArrow,
83
- "sidebar-item-selected": this.isSelected,
84
+ "sidebar-item-selected":
85
+ this.isSelected && !this.isContainedSelection,
86
+ "sidebar-item-selected-text":
87
+ this.isSelected && this.isContainedSelection,
84
88
  "tile-with-version-picker": this.hasVersionPicker
85
89
  });
86
90
  }
@@ -13,6 +13,10 @@
13
13
  color: var(--dx-g-blue-vibrant-40) !important;
14
14
  }
15
15
 
16
+ .sidebar-item-selected-text {
17
+ color: var(--dx-g-blue-vibrant-40) !important;
18
+ }
19
+
16
20
  .sidebar-item {
17
21
  padding: 6px var(--dx-g-spacing-lg) 6px
18
22
  var(--dx-g-global-header-padding-horizontal);