@ni/nimble-components 21.6.3 → 21.6.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 Thu, 22 Feb 2024 19:25:27 GMT
16304
+ * Generated on Fri, 23 Feb 2024 21:07:50 GMT
16305
16305
  */
16306
16306
 
16307
16307
  const Information100DarkUi = "#a46eff";
@@ -20060,9 +20060,8 @@
20060
20060
  `;
20061
20061
 
20062
20062
  const template$w = html `
20063
- ${'' /* Explicitly set role to work around Lighthouse error. See https://github.com/ni/nimble/issues/1650. */}
20064
- <section role="region" aria-labelledby="title-slot">
20065
- <slot name="title" id="title-slot"></slot>
20063
+ <section aria-labelledby="title-slot">
20064
+ <span id="title-slot"><slot name="title"></slot></span>
20066
20065
  <slot></slot>
20067
20066
  </section>
20068
20067
  `;
@@ -21405,7 +21404,7 @@
21405
21404
  role="dialog"
21406
21405
  part="control"
21407
21406
  @cancel="${(x, c) => x.cancelHandler(c.event)}"
21408
- @close="${x => x.closeHandler()}"
21407
+ @close="${(x, c) => x.closeHandler(c.event)}"
21409
21408
  aria-labelledby="header"
21410
21409
  >
21411
21410
  <header id="header">
@@ -21505,7 +21504,10 @@
21505
21504
  /**
21506
21505
  * @internal
21507
21506
  */
21508
- closeHandler() {
21507
+ closeHandler(event) {
21508
+ if (event.target !== this.dialogElement) {
21509
+ return;
21510
+ }
21509
21511
  if (this.resolveShow) {
21510
21512
  // If
21511
21513
  // - the browser implements dialogs with the CloseWatcher API, and
@@ -21707,7 +21709,7 @@
21707
21709
  ${ref('dialog')}
21708
21710
  aria-label="${x => x.ariaLabel}"
21709
21711
  @cancel="${(x, c) => x.cancelHandler(c.event)}"
21710
- @close="${x => x.closeHandler()}"
21712
+ @close="${(x, c) => x.closeHandler(c.event)}"
21711
21713
  >
21712
21714
  <div class="dialog-contents">
21713
21715
  <slot></slot>
@@ -21781,7 +21783,10 @@
21781
21783
  /**
21782
21784
  * @internal
21783
21785
  */
21784
- closeHandler() {
21786
+ closeHandler(event) {
21787
+ if (event.target !== this.dialog) {
21788
+ return;
21789
+ }
21785
21790
  if (this.resolveShow) {
21786
21791
  // If
21787
21792
  // - the browser implements dialogs with the CloseWatcher API, and