@aurodesignsystem/auro-library 5.2.3 → 5.3.1

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Semantic Release Automated Changelog
2
2
 
3
+ ## [5.3.1](https://github.com/AlaskaAirlines/auro-library/compare/v5.3.0...v5.3.1) (2025-07-11)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * add contain: layout as needed to resolve issues with positioning in projects that use tailwindcss ([ad8474d](https://github.com/AlaskaAirlines/auro-library/commit/ad8474d958bcf088be880f494f0505e873819490))
9
+
10
+ # [5.3.0](https://github.com/AlaskaAirlines/auro-library/compare/v5.2.3...v5.3.0) (2025-07-04)
11
+
12
+
13
+ ### Features
14
+
15
+ * add event type to auroDropdown-toggled for keyboard detection ([d7ec5b7](https://github.com/AlaskaAirlines/auro-library/commit/d7ec5b755cee75d0371bf3202d5a382ce20cd47c))
16
+
3
17
  ## [5.2.3](https://github.com/AlaskaAirlines/auro-library/compare/v5.2.2...v5.2.3) (2025-07-02)
4
18
 
5
19
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aurodesignsystem/auro-library",
3
- "version": "5.2.3",
3
+ "version": "5.3.1",
4
4
  "description": "This repository holds shared scripts, utilities, and workflows utilized across repositories along the Auro Design System.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -231,6 +231,7 @@ export default class AuroFloatingUI {
231
231
  this.element.bib.style.left = "0px";
232
232
  this.element.bib.style.width = '';
233
233
  this.element.bib.style.height = '';
234
+ this.element.style.contain = '';
234
235
 
235
236
  // reset the size that was mirroring `size` css-part
236
237
  const bibContent = this.element.bib.shadowRoot.querySelector(".container");
@@ -255,6 +256,7 @@ export default class AuroFloatingUI {
255
256
  this.element.bib.style.position = '';
256
257
  this.element.bib.removeAttribute('isfullscreen');
257
258
  this.element.isBibFullscreen = false;
259
+ this.element.style.contain = 'layout';
258
260
  }
259
261
 
260
262
  const isChanged = this.strategy && this.strategy !== value;
@@ -313,7 +315,7 @@ export default class AuroFloatingUI {
313
315
  return;
314
316
  }
315
317
 
316
- this.hideBib();
318
+ this.hideBib("keydown");
317
319
  }
318
320
 
319
321
  setupHideHandlers() {
@@ -338,7 +340,7 @@ export default class AuroFloatingUI {
338
340
  document.expandedAuroFormkitDropdown = null;
339
341
  document.expandedAuroFloater = this;
340
342
  } else {
341
- this.hideBib();
343
+ this.hideBib("click");
342
344
  }
343
345
  }
344
346
  };
@@ -351,7 +353,7 @@ export default class AuroFloatingUI {
351
353
  // if something else is open, let it handle itself
352
354
  return;
353
355
  }
354
- this.hideBib();
356
+ this.hideBib("keydown");
355
357
  }
356
358
  };
357
359
 
@@ -434,7 +436,11 @@ export default class AuroFloatingUI {
434
436
  }
435
437
  }
436
438
 
437
- hideBib() {
439
+ /**
440
+ * Hides the floating UI element.
441
+ * @param {String} eventType - The event type that triggered the hiding action.
442
+ */
443
+ hideBib(eventType = "unknown") {
438
444
  if (!this.element.disabled && !this.element.noToggle) {
439
445
  this.lockScroll(false);
440
446
  this.element.triggerChevron?.removeAttribute('data-expanded');
@@ -445,7 +451,7 @@ export default class AuroFloatingUI {
445
451
  if (this.showing) {
446
452
  this.cleanupHideHandlers();
447
453
  this.showing = false;
448
- this.dispatchEventDropdownToggle();
454
+ this.dispatchEventDropdownToggle(eventType);
449
455
  }
450
456
  }
451
457
  document.expandedAuroFloater = null;
@@ -454,11 +460,13 @@ export default class AuroFloatingUI {
454
460
  /**
455
461
  * @private
456
462
  * @returns {void} Dispatches event with an object showing the state of the dropdown.
463
+ * @param {String} eventType - The event type that triggered the toggle action.
457
464
  */
458
- dispatchEventDropdownToggle() {
465
+ dispatchEventDropdownToggle(eventType) {
459
466
  const event = new CustomEvent(this.eventPrefix ? `${this.eventPrefix}-toggled` : 'toggled', {
460
467
  detail: {
461
468
  expanded: this.showing,
469
+ eventType: eventType || "unknown",
462
470
  },
463
471
  composed: true
464
472
  });
@@ -468,7 +476,7 @@ export default class AuroFloatingUI {
468
476
 
469
477
  handleClick() {
470
478
  if (this.element.isPopoverVisible) {
471
- this.hideBib();
479
+ this.hideBib("click");
472
480
  } else {
473
481
  this.showBib();
474
482
  }
@@ -504,7 +512,7 @@ export default class AuroFloatingUI {
504
512
  break;
505
513
  case 'mouseleave':
506
514
  if (this.element.hoverToggle) {
507
- this.hideBib();
515
+ this.hideBib("mouseleave");
508
516
  }
509
517
  break;
510
518
  case 'focus':