@ni/nimble-components 28.0.2 → 28.0.4

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.
@@ -16333,7 +16333,7 @@
16333
16333
 
16334
16334
  /**
16335
16335
  * Do not edit directly
16336
- * Generated on Tue, 07 May 2024 16:11:49 GMT
16336
+ * Generated on Wed, 08 May 2024 17:16:54 GMT
16337
16337
  */
16338
16338
 
16339
16339
  const Information100DarkUi = "#a46eff";
@@ -58709,6 +58709,10 @@ img.ProseMirror-separator {
58709
58709
  background-color: transparent;
58710
58710
  }
58711
58711
 
58712
+ ::slotted([role='option']:hover) {
58713
+ background-color: ${fillHoverColor};
58714
+ }
58715
+
58712
58716
  ::slotted([role='option'][active-option]) {
58713
58717
  background-color: ${fillSelectedColor};
58714
58718
  }
@@ -59018,15 +59022,20 @@ img.ProseMirror-separator {
59018
59022
  if (this.disabled) {
59019
59023
  return;
59020
59024
  }
59025
+ let optionClicked = false;
59021
59026
  if (this.open) {
59022
59027
  const captured = e.target.closest('option,[role=option]');
59028
+ optionClicked = captured !== null;
59023
59029
  if (captured?.disabled) {
59024
59030
  return;
59025
59031
  }
59026
59032
  }
59033
+ const currentIndex = this.openActiveIndex ?? this.selectedIndex;
59027
59034
  super.clickHandler(e);
59028
59035
  this.open = this.collapsible && !this.open;
59029
- if (!this.open && this.selectedIndex !== -1) {
59036
+ if (!this.open
59037
+ && this.selectedIndex !== currentIndex
59038
+ && optionClicked) {
59030
59039
  this.updateValue(true);
59031
59040
  }
59032
59041
  }
@@ -59163,22 +59172,12 @@ img.ProseMirror-separator {
59163
59172
  if (!this.open) {
59164
59173
  return true;
59165
59174
  }
59175
+ this.open = false;
59166
59176
  const focusTarget = e.relatedTarget;
59167
59177
  if (this.isSameNode(focusTarget)) {
59168
59178
  this.focus();
59169
59179
  return true;
59170
59180
  }
59171
- if (!this.options?.includes(focusTarget)) {
59172
- let currentActiveIndex = this.openActiveIndex ?? this.selectedIndex;
59173
- this.open = false;
59174
- if (currentActiveIndex === -1) {
59175
- currentActiveIndex = this.selectedIndex;
59176
- }
59177
- if (this.selectedIndex !== currentActiveIndex) {
59178
- this.selectedIndex = currentActiveIndex;
59179
- this.updateValue(true);
59180
- }
59181
- }
59182
59181
  return true;
59183
59182
  }
59184
59183
  /**