@ni/nimble-components 24.1.3 → 24.1.5

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.
@@ -16301,7 +16301,7 @@
16301
16301
 
16302
16302
  /**
16303
16303
  * Do not edit directly
16304
- * Generated on Tue, 02 Apr 2024 15:16:13 GMT
16304
+ * Generated on Tue, 02 Apr 2024 21:45:54 GMT
16305
16305
  */
16306
16306
 
16307
16307
  const Information100DarkUi = "#a46eff";
@@ -21202,21 +21202,6 @@
21202
21202
  this.emitChangeIfValueUpdated();
21203
21203
  return returnValue;
21204
21204
  }
21205
- /**
21206
- * @internal
21207
- */
21208
- registerOption(option) {
21209
- if (this.options.includes(option)) {
21210
- return;
21211
- }
21212
- // Adding an option to the end, ultimately, isn't the correct
21213
- // thing to do, as this will mean the option's index in the options,
21214
- // at least temporarily, does not match the DOM order. However, it
21215
- // is expected that a successive run of `slottedOptionsChanged` will
21216
- // correct this order issue. See 'https://github.com/ni/nimble/issues/1915'
21217
- // for more info.
21218
- this.options.push(option);
21219
- }
21220
21205
  focusAndScrollOptionIntoView() {
21221
21206
  if (this.open) {
21222
21207
  super.focusAndScrollOptionIntoView();
@@ -21868,6 +21853,12 @@
21868
21853
  this.triggerAnimation();
21869
21854
  }
21870
21855
  triggerAnimation() {
21856
+ // Read the offsetHeight of the dialog to trigger a reflow. This guarantees that the browser
21857
+ // has processed the 'animating' class being removed before trying to readd it, even if the previous
21858
+ // animation has just finished. Otherwise, problems can occur. For example, trying to close the
21859
+ // drawer immediately after the opening animation ends does not actually close the drawer.
21860
+ // https://github.com/ni/nimble/issues/1994
21861
+ void this.dialog.offsetHeight;
21871
21862
  this.dialog.classList.add('animating');
21872
21863
  if (this.closing) {
21873
21864
  this.dialog.classList.add('closing');