@ni/nimble-components 28.0.3 → 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 20:03:30 GMT
16336
+ * Generated on Wed, 08 May 2024 17:16:54 GMT
16337
16337
  */
16338
16338
 
16339
16339
  const Information100DarkUi = "#a46eff";
@@ -59022,15 +59022,20 @@ img.ProseMirror-separator {
59022
59022
  if (this.disabled) {
59023
59023
  return;
59024
59024
  }
59025
+ let optionClicked = false;
59025
59026
  if (this.open) {
59026
59027
  const captured = e.target.closest('option,[role=option]');
59028
+ optionClicked = captured !== null;
59027
59029
  if (captured?.disabled) {
59028
59030
  return;
59029
59031
  }
59030
59032
  }
59033
+ const currentIndex = this.openActiveIndex ?? this.selectedIndex;
59031
59034
  super.clickHandler(e);
59032
59035
  this.open = this.collapsible && !this.open;
59033
- if (!this.open && this.selectedIndex !== -1) {
59036
+ if (!this.open
59037
+ && this.selectedIndex !== currentIndex
59038
+ && optionClicked) {
59034
59039
  this.updateValue(true);
59035
59040
  }
59036
59041
  }
@@ -59167,22 +59172,12 @@ img.ProseMirror-separator {
59167
59172
  if (!this.open) {
59168
59173
  return true;
59169
59174
  }
59175
+ this.open = false;
59170
59176
  const focusTarget = e.relatedTarget;
59171
59177
  if (this.isSameNode(focusTarget)) {
59172
59178
  this.focus();
59173
59179
  return true;
59174
59180
  }
59175
- if (!this.options?.includes(focusTarget)) {
59176
- let currentActiveIndex = this.openActiveIndex ?? this.selectedIndex;
59177
- this.open = false;
59178
- if (currentActiveIndex === -1) {
59179
- currentActiveIndex = this.selectedIndex;
59180
- }
59181
- if (this.selectedIndex !== currentActiveIndex) {
59182
- this.selectedIndex = currentActiveIndex;
59183
- this.updateValue(true);
59184
- }
59185
- }
59186
59181
  return true;
59187
59182
  }
59188
59183
  /**