@ni/nimble-components 7.7.0 → 7.8.2

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.
@@ -18245,6 +18245,7 @@
18245
18245
  (function (TreeViewSelectionMode) {
18246
18246
  TreeViewSelectionMode["All"] = "all";
18247
18247
  TreeViewSelectionMode["LeavesOnly"] = "leaves-only";
18248
+ TreeViewSelectionMode["None"] = "none";
18248
18249
  })(TreeViewSelectionMode || (TreeViewSelectionMode = {}));
18249
18250
 
18250
18251
  /* eslint-disable */
@@ -18361,6 +18362,10 @@
18361
18362
  background: ${fillHoverColor};
18362
18363
  }
18363
18364
 
18365
+ :host([${groupSelectedAttribute}]) .positioning-region:hover {
18366
+ background: ${fillHoverSelectedColor};
18367
+ }
18368
+
18364
18369
  :host(${focusVisible}) .positioning-region {
18365
18370
  box-shadow: 0px 0px 0px ${borderWidth} ${borderHoverColor} inset;
18366
18371
  outline: ${borderWidth} solid ${borderHoverColor};
@@ -18391,17 +18396,14 @@
18391
18396
  font: inherit;
18392
18397
  font-size: ${bodyFontSize};
18393
18398
  user-select: none;
18399
+ position: relative;
18400
+ margin-inline-start: ${iconSize};
18394
18401
  }
18395
18402
 
18396
18403
  :host(${focusVisible}) .content-region {
18397
18404
  outline: none;
18398
18405
  }
18399
18406
 
18400
- :host(.nested) .content-region {
18401
- position: relative;
18402
- margin-inline-start: ${iconSize};
18403
- }
18404
-
18405
18407
  :host([disabled]) .content-region {
18406
18408
  opacity: 0.5;
18407
18409
  cursor: not-allowed;
@@ -18418,9 +18420,6 @@
18418
18420
  align-items: center;
18419
18421
  cursor: pointer;
18420
18422
  margin-left: 10px;
18421
- }
18422
-
18423
- :host(.nested) .expand-collapse-button {
18424
18423
  position: absolute;
18425
18424
  }
18426
18425
 
@@ -18485,7 +18484,7 @@
18485
18484
  // prettier-ignore
18486
18485
  .withBehaviors(new DirectionalStyleSheetBehavior(css `
18487
18486
  ${ /* ltr styles */''}
18488
- :host(.nested) .expand-collapse-button {
18487
+ .expand-collapse-button {
18489
18488
  left: var(
18490
18489
  --ni-private-expand-collapse-button-nested-width,
18491
18490
  calc(${iconSize} * -1)
@@ -18501,7 +18500,7 @@
18501
18500
  }
18502
18501
  `, css `
18503
18502
  ${ /* rtl styles */''}
18504
- :host(.nested) .expand-collapse-button {
18503
+ .expand-collapse-button {
18505
18504
  right: var(
18506
18505
  --ni-private-expand-collapse-button-nested-width,
18507
18506
  calc(${iconSize} * -1)
@@ -18543,8 +18542,9 @@
18543
18542
  return;
18544
18543
  }
18545
18544
  const leavesOnly = this.treeView?.selectionMode === TreeViewSelectionMode.LeavesOnly;
18545
+ const all = this.treeView?.selectionMode === TreeViewSelectionMode.All;
18546
18546
  const hasChildren = this.hasChildTreeItems();
18547
- if ((leavesOnly && !hasChildren) || !leavesOnly) {
18547
+ if ((leavesOnly && !hasChildren) || all) {
18548
18548
  const selectedTreeItem = this.getImmediateTreeItem(this.treeView?.currentSelected);
18549
18549
  // deselect currently selected item if different than this instance
18550
18550
  if (selectedTreeItem && this !== this.treeView?.currentSelected) {
@@ -18553,7 +18553,7 @@
18553
18553
  this.selected = true;
18554
18554
  }
18555
18555
  else {
18556
- // implicit hasChildren && leavesOnly, so only allow expand/collapse, not select
18556
+ // implicit (hasChildren && leavesOnly) || none, so only allow expand/collapse, not select
18557
18557
  this.expanded = !this.expanded;
18558
18558
  }
18559
18559
  // don't allow base class to process click event