@aurodesignsystem/auro-formkit 4.0.0 → 4.0.2

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.
Files changed (49) hide show
  1. package/CHANGELOG.md +2 -23
  2. package/components/bibtemplate/dist/auro-bibtemplate.d.ts +1 -0
  3. package/components/bibtemplate/dist/index.js +158 -6
  4. package/components/bibtemplate/dist/registered.js +158 -6
  5. package/components/checkbox/README.md +1 -1
  6. package/components/checkbox/demo/api.md +2 -2
  7. package/components/checkbox/demo/api.min.js +24 -20
  8. package/components/checkbox/demo/index.md +2 -2
  9. package/components/checkbox/demo/index.min.js +24 -20
  10. package/components/checkbox/demo/readme.md +1 -1
  11. package/components/checkbox/dist/auro-checkbox.d.ts +2 -2
  12. package/components/checkbox/dist/index.js +24 -20
  13. package/components/checkbox/dist/registered.js +24 -20
  14. package/components/combobox/demo/api.min.js +707 -133
  15. package/components/combobox/demo/index.min.js +707 -133
  16. package/components/combobox/dist/auro-combobox.d.ts +0 -8
  17. package/components/combobox/dist/index.js +627 -123
  18. package/components/combobox/dist/registered.js +627 -123
  19. package/components/counter/demo/api.min.js +583 -43
  20. package/components/counter/demo/index.min.js +583 -43
  21. package/components/counter/dist/index.js +583 -43
  22. package/components/counter/dist/registered.js +583 -43
  23. package/components/datepicker/demo/api.min.js +866 -75
  24. package/components/datepicker/demo/index.min.js +866 -75
  25. package/components/datepicker/dist/index.js +866 -75
  26. package/components/datepicker/dist/registered.js +866 -75
  27. package/components/dropdown/demo/api.min.js +153 -16
  28. package/components/dropdown/demo/index.min.js +153 -16
  29. package/components/dropdown/dist/auro-dropdownBib.d.ts +8 -0
  30. package/components/dropdown/dist/index.js +153 -16
  31. package/components/dropdown/dist/registered.js +153 -16
  32. package/components/input/demo/api.min.js +263 -12
  33. package/components/input/demo/index.min.js +263 -12
  34. package/components/input/dist/index.js +263 -12
  35. package/components/input/dist/registered.js +263 -12
  36. package/components/menu/demo/api.min.js +76 -6
  37. package/components/menu/demo/index.min.js +76 -6
  38. package/components/menu/dist/index.js +76 -6
  39. package/components/menu/dist/registered.js +76 -6
  40. package/components/radio/demo/api.min.js +4 -3
  41. package/components/radio/demo/index.min.js +4 -3
  42. package/components/radio/dist/index.js +4 -3
  43. package/components/radio/dist/registered.js +4 -3
  44. package/components/select/demo/api.min.js +403 -49
  45. package/components/select/demo/index.min.js +403 -49
  46. package/components/select/dist/auro-select.d.ts +0 -1
  47. package/components/select/dist/index.js +325 -41
  48. package/components/select/dist/registered.js +325 -41
  49. package/package.json +3 -3
@@ -10,7 +10,7 @@ import { ifDefined } from 'lit/directives/if-defined.js';
10
10
 
11
11
  /* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
12
12
 
13
- let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
13
+ let AuroLibraryRuntimeUtils$2 = class AuroLibraryRuntimeUtils {
14
14
 
15
15
  /* eslint-disable jsdoc/require-param */
16
16
 
@@ -1605,8 +1605,28 @@ class AuroFloatingUI {
1605
1605
  if (!AuroFloatingUI.isMousePressHandlerInitialized && window && window.addEventListener) {
1606
1606
  AuroFloatingUI.isMousePressHandlerInitialized = true;
1607
1607
 
1608
+ // Track timeout for isMousePressed reset to avoid race conditions
1609
+ if (!AuroFloatingUI._mousePressedTimeout) {
1610
+ AuroFloatingUI._mousePressedTimeout = null;
1611
+ }
1608
1612
  const mouseEventGlobalHandler = (event) => {
1609
- AuroFloatingUI.isMousePressed = event.type === 'mousedown';
1613
+ const isPressed = event.type === 'mousedown';
1614
+ if (isPressed) {
1615
+ // Clear any pending timeout to prevent race condition
1616
+ if (AuroFloatingUI._mousePressedTimeout !== null) {
1617
+ clearTimeout(AuroFloatingUI._mousePressedTimeout);
1618
+ AuroFloatingUI._mousePressedTimeout = null;
1619
+ }
1620
+ if (!AuroFloatingUI.isMousePressed) {
1621
+ AuroFloatingUI.isMousePressed = true;
1622
+ }
1623
+ } else if (AuroFloatingUI.isMousePressed && !isPressed) {
1624
+ // Schedule reset and track timeout ID
1625
+ AuroFloatingUI._mousePressedTimeout = setTimeout(() => {
1626
+ AuroFloatingUI.isMousePressed = false;
1627
+ AuroFloatingUI._mousePressedTimeout = null;
1628
+ }, 0);
1629
+ }
1610
1630
  };
1611
1631
 
1612
1632
  window.addEventListener('mousedown', mouseEventGlobalHandler);
@@ -1733,6 +1753,7 @@ class AuroFloatingUI {
1733
1753
 
1734
1754
  // Compute the position of the bib
1735
1755
  computePosition(this.element.trigger, this.element.bib, {
1756
+ strategy: this.element.floaterConfig?.strategy || 'fixed',
1736
1757
  placement: this.element.floaterConfig?.placement,
1737
1758
  middleware: middleware || []
1738
1759
  }).then(({ x, y }) => { // eslint-disable-line id-length
@@ -1867,8 +1888,9 @@ class AuroFloatingUI {
1867
1888
  if (this.element.contains(activeElement) || this.element.bib?.contains(activeElement)) {
1868
1889
  return;
1869
1890
  }
1870
- // if fullscreen bib is still open and the focus is missing, do not close
1871
- if (this.element.bib.hasAttribute('isfullscreen') && activeElement === document.body) {
1891
+
1892
+ // if fullscreen bib is in fullscreen mode, do not close
1893
+ if (this.element.bib.hasAttribute('isfullscreen')) {
1872
1894
  return;
1873
1895
  }
1874
1896
 
@@ -2169,8 +2191,6 @@ class AuroFloatingUI {
2169
2191
  this.element.hoverToggle = this.element.floaterConfig.hoverToggle;
2170
2192
  }
2171
2193
 
2172
- document.body.append(this.element.bib);
2173
-
2174
2194
  this.regenerateBibId();
2175
2195
  this.handleTriggerTabIndex();
2176
2196
 
@@ -2401,6 +2421,76 @@ var tokensCss$2 = css`:host{--ds-auro-icon-color:var(--ds-basic-color-texticon-d
2401
2421
 
2402
2422
  var colorCss$3 = css`:host{color:var(--ds-auro-icon-color)}:host([customColor]){color:inherit}:host(:not([onDark])[variant=accent1]){--ds-auro-icon-color:var(--ds-basic-color-texticon-accent1, #265688)}:host(:not([onDark])[variant=disabled]){--ds-auro-icon-color:var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host(:not([onDark])[variant=muted]){--ds-auro-icon-color:var(--ds-basic-color-texticon-muted, #676767)}:host(:not([onDark])[variant=statusDefault]){--ds-auro-icon-color:var(--ds-basic-color-status-default, #afb9c6)}:host(:not([onDark])[variant=statusInfo]){--ds-auro-icon-color:var(--ds-basic-color-status-info, #01426a)}:host(:not([onDark])[variant=statusSuccess]){--ds-auro-icon-color:var(--ds-basic-color-status-success, #447a1f)}:host(:not([onDark])[variant=statusWarning]){--ds-auro-icon-color:var(--ds-basic-color-status-warning, #fac200)}:host(:not([onDark])[variant=statusError]){--ds-auro-icon-color:var(--ds-basic-color-status-error, #e31f26)}:host(:not([onDark])[variant=statusInfoSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-info-subtle, #ebf3f9)}:host(:not([onDark])[variant=statusSuccessSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-success-subtle, #d6eac7)}:host(:not([onDark])[variant=statusWarningSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-warning-subtle, #fff0b2)}:host(:not([onDark])[variant=statusErrorSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-error-subtle, #fbc6c6)}:host(:not([onDark])[variant=fareBasicEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-basiceconomy, #97eaf8)}:host(:not([onDark])[variant=fareBusiness]){--ds-auro-icon-color:var(--ds-basic-color-fare-business, #01426a)}:host(:not([onDark])[variant=fareEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-economy, #0074ca)}:host(:not([onDark])[variant=fareFirst]){--ds-auro-icon-color:var(--ds-basic-color-fare-first, #00274a)}:host(:not([onDark])[variant=farePremiumEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-premiumeconomy, #005154)}:host(:not([onDark])[variant=tierOneWorldEmerald]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-emerald, #139142)}:host(:not([onDark])[variant=tierOneWorldSapphire]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-sapphire, #015daa)}:host(:not([onDark])[variant=tierOneWorldRuby]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-ruby, #a41d4a)}:host([onDark]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse, #ffffff)}:host([onDark][variant=disabled]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}:host([onDark][variant=muted]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}`;
2403
2423
 
2424
+ // Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
2425
+ // See LICENSE in the project root for license information.
2426
+
2427
+ // ---------------------------------------------------------------------
2428
+
2429
+ /* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
2430
+
2431
+ let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
2432
+
2433
+ /* eslint-disable jsdoc/require-param */
2434
+
2435
+ /**
2436
+ * This will register a new custom element with the browser.
2437
+ * @param {String} name - The name of the custom element.
2438
+ * @param {Object} componentClass - The class to register as a custom element.
2439
+ * @returns {void}
2440
+ */
2441
+ registerComponent(name, componentClass) {
2442
+ if (!customElements.get(name)) {
2443
+ customElements.define(name, class extends componentClass {});
2444
+ }
2445
+ }
2446
+
2447
+ /**
2448
+ * Finds and returns the closest HTML Element based on a selector.
2449
+ * @returns {void}
2450
+ */
2451
+ closestElement(
2452
+ selector, // selector like in .closest()
2453
+ base = this, // extra functionality to skip a parent
2454
+ __Closest = (el, found = el && el.closest(selector)) =>
2455
+ !el || el === document || el === window
2456
+ ? null // standard .closest() returns null for non-found selectors also
2457
+ : found
2458
+ ? found // found a selector INside this element
2459
+ : __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
2460
+ ) {
2461
+ return __Closest(base);
2462
+ }
2463
+ /* eslint-enable jsdoc/require-param */
2464
+
2465
+ /**
2466
+ * If the element passed is registered with a different tag name than what is passed in, the tag name is added as an attribute to the element.
2467
+ * @param {Object} elem - The element to check.
2468
+ * @param {String} tagName - The name of the Auro component to check for or add as an attribute.
2469
+ * @returns {void}
2470
+ */
2471
+ handleComponentTagRename(elem, tagName) {
2472
+ const tag = tagName.toLowerCase();
2473
+ const elemTag = elem.tagName.toLowerCase();
2474
+
2475
+ if (elemTag !== tag) {
2476
+ elem.setAttribute(tag, true);
2477
+ }
2478
+ }
2479
+
2480
+ /**
2481
+ * Validates if an element is a specific Auro component.
2482
+ * @param {Object} elem - The element to validate.
2483
+ * @param {String} tagName - The name of the Auro component to check against.
2484
+ * @returns {Boolean} - Returns true if the element is the specified Auro component.
2485
+ */
2486
+ elementMatch(elem, tagName) {
2487
+ const tag = tagName.toLowerCase();
2488
+ const elemTag = elem.tagName.toLowerCase();
2489
+
2490
+ return elemTag === tag || elem.hasAttribute(tag);
2491
+ }
2492
+ };
2493
+
2404
2494
  // Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
2405
2495
  // See LICENSE in the project root for license information.
2406
2496
 
@@ -2570,7 +2660,7 @@ class AuroIcon extends BaseIcon {
2570
2660
 
2571
2661
  var iconVersion = '6.1.2';
2572
2662
 
2573
- var styleCss$2 = css`:host{position:absolute;z-index:var(--depth-tooltip, 400);display:none}.container{display:inline-block;overflow:auto;box-sizing:border-box;margin:var(--ds-size-50, 0.25rem) 0}:host([isfullscreen]){position:fixed;top:0;left:0}:host([isfullscreen]) .container{width:100dvw;max-width:none;height:100dvh;max-height:none;border-radius:unset;margin-top:0;box-shadow:unset;overscroll-behavior:contain}:host([data-show]){display:flex}:host([common]:not([isfullscreen])) .container,:host([rounded]:not([isfullscreen])) .container{border-radius:var(--ds-border-radius, 0.375rem)}:host([common][isfullscreen]) .container,:host([rounded][isfullscreen]) .container{border-radius:unset;box-shadow:unset}`;
2663
+ var styleCss$2 = css`:host{position:fixed;z-index:var(--depth-tooltip, 400);display:none;isolation:isolate}.container{display:inline-block;overflow:auto;box-sizing:border-box;margin:var(--ds-size-50, 0.25rem) 0}:host([isfullscreen]){position:fixed;top:0;left:0}:host([isfullscreen]) .container{width:100dvw;max-width:none;height:100dvh;max-height:none;border-radius:unset;margin-top:0;box-shadow:unset;overscroll-behavior:contain}:host([data-show]){display:flex}:host([common]:not([isfullscreen])) .container,:host([rounded]:not([isfullscreen])) .container{border-radius:var(--ds-border-radius, 0.375rem)}:host([common][isfullscreen]) .container,:host([rounded][isfullscreen]) .container{border-radius:unset;box-shadow:unset}`;
2574
2664
 
2575
2665
  var colorCss$2 = css`.container{background-color:var(--ds-auro-dropdownbib-container-color);box-shadow:var(--ds-auro-dropdownbib-boxshadow-color);color:var(--ds-auro-dropdownbib-text-color)}`;
2576
2666
 
@@ -2580,7 +2670,6 @@ var tokensCss$1 = css`:host{--ds-auro-dropdown-label-text-color: var(--ds-basic-
2580
2670
  // See LICENSE in the project root for license information.
2581
2671
 
2582
2672
 
2583
-
2584
2673
  const DESIGN_TOKEN_BREAKPOINT_PREFIX = '--ds-grid-breakpoint-';
2585
2674
  const DESIGN_TOKEN_BREAKPOINT_OPTIONS = [
2586
2675
  'xl',
@@ -2605,7 +2694,7 @@ class AuroDropdownBib extends LitElement {
2605
2694
  */
2606
2695
  this._mobileBreakpointValue = undefined;
2607
2696
 
2608
- AuroLibraryRuntimeUtils$1.prototype.handleComponentTagRename(this, 'auro-dropdownbib');
2697
+ AuroLibraryRuntimeUtils$2.prototype.handleComponentTagRename(this, 'auro-dropdownbib');
2609
2698
  }
2610
2699
 
2611
2700
  static get styles() {
@@ -2650,6 +2739,13 @@ class AuroDropdownBib extends LitElement {
2650
2739
  type: Boolean,
2651
2740
  reflect: true
2652
2741
  },
2742
+
2743
+ /**
2744
+ * A reference to the associated bib template element.
2745
+ */
2746
+ bibTemplate: {
2747
+ type: Object
2748
+ }
2653
2749
  };
2654
2750
  }
2655
2751
 
@@ -2682,9 +2778,50 @@ class AuroDropdownBib extends LitElement {
2682
2778
  }
2683
2779
  }
2684
2780
  });
2781
+
2782
+ if (this.bibTemplate) {
2783
+ // If the bib template is found, set the fullscreen attribute
2784
+ if (this.isFullscreen) {
2785
+ this.bibTemplate.setAttribute('isFullscreen', 'true');
2786
+ } else {
2787
+ this.bibTemplate.removeAttribute('isFullscreen');
2788
+ }
2789
+ }
2685
2790
  }
2686
2791
  }
2687
2792
 
2793
+ connectedCallback() {
2794
+ super.connectedCallback();
2795
+
2796
+ // Listen for the auro-bibtemplate-connected event to set the fullscreen attribute
2797
+ this.addEventListener('auro-bibtemplate-connected', (event) => {
2798
+ const bibTemplate = event.detail.element;
2799
+ this.bibTemplate = bibTemplate;
2800
+
2801
+ if (bibTemplate) {
2802
+ // If the bib template is found, set the fullscreen attribute
2803
+ if (this.isFullscreen) {
2804
+ bibTemplate.setAttribute('isFullscreen', 'true');
2805
+ } else {
2806
+ bibTemplate.removeAttribute('isFullscreen');
2807
+ }
2808
+ }
2809
+ });
2810
+ }
2811
+
2812
+ firstUpdated(changedProperties) {
2813
+ super.firstUpdated(changedProperties);
2814
+
2815
+ // Dispatch a custom event when the component is connected
2816
+ this.dispatchEvent(new CustomEvent('auro-dropdownbib-connected', {
2817
+ bubbles: true,
2818
+ composed: true,
2819
+ detail: {
2820
+ element: this
2821
+ }
2822
+ }));
2823
+ }
2824
+
2688
2825
  // function that renders the HTML and CSS into the scope of the component
2689
2826
  render() {
2690
2827
  return html$1`
@@ -2994,7 +3131,7 @@ class AuroDropdown extends LitElement {
2994
3131
  /**
2995
3132
  * @private
2996
3133
  */
2997
- this.runtimeUtils = new AuroLibraryRuntimeUtils$1();
3134
+ this.runtimeUtils = new AuroLibraryRuntimeUtils$2();
2998
3135
 
2999
3136
  /**
3000
3137
  * @private
@@ -3323,7 +3460,7 @@ class AuroDropdown extends LitElement {
3323
3460
  *
3324
3461
  */
3325
3462
  static register(name = "auro-dropdown") {
3326
- AuroLibraryRuntimeUtils$1.prototype.registerComponent(name, AuroDropdown);
3463
+ AuroLibraryRuntimeUtils$2.prototype.registerComponent(name, AuroDropdown);
3327
3464
  }
3328
3465
 
3329
3466
  /**
@@ -3640,8 +3777,7 @@ class AuroDropdown extends LitElement {
3640
3777
  * @param {Event} event - The event object representing the slot change.
3641
3778
  * @fires Function#onSlotChange - Optional callback invoked when the slot content changes.
3642
3779
  */
3643
- handleDefaultSlot(event) {
3644
- [...event.target.assignedNodes()].forEach((node) => this.bibContent.append(node));
3780
+ handleDefaultSlot() {
3645
3781
 
3646
3782
  if (this.onSlotChange) {
3647
3783
  this.onSlotChange();
@@ -3713,9 +3849,7 @@ class AuroDropdown extends LitElement {
3713
3849
  <${this.helpTextTag} part="helpText" ?onDark=${this.onDark} ?error="${this.error}">
3714
3850
  <slot name="helpText"></slot>
3715
3851
  </${this.helpTextTag}>
3716
- <div class="slotContent">
3717
- <slot @slotchange="${this.handleDefaultSlot}"></slot>
3718
- </div>
3852
+
3719
3853
  <div id="bibSizer" part="size"></div>
3720
3854
  <${this.dropdownBibTag}
3721
3855
  id="bib"
@@ -3725,6 +3859,9 @@ class AuroDropdown extends LitElement {
3725
3859
  ?rounded="${this.common || this.rounded}"
3726
3860
  ?inset="${this.common || this.inset}"
3727
3861
  >
3862
+ <div class="slotContent">
3863
+ <slot @slotchange="${this.handleDefaultSlot}"></slot>
3864
+ </div>
3728
3865
  </${this.dropdownBibTag}>
3729
3866
  </div>
3730
3867
  `;
@@ -10,7 +10,7 @@ import { ifDefined } from 'lit/directives/if-defined.js';
10
10
 
11
11
  /* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
12
12
 
13
- let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
13
+ let AuroLibraryRuntimeUtils$2 = class AuroLibraryRuntimeUtils {
14
14
 
15
15
  /* eslint-disable jsdoc/require-param */
16
16
 
@@ -1605,8 +1605,28 @@ class AuroFloatingUI {
1605
1605
  if (!AuroFloatingUI.isMousePressHandlerInitialized && window && window.addEventListener) {
1606
1606
  AuroFloatingUI.isMousePressHandlerInitialized = true;
1607
1607
 
1608
+ // Track timeout for isMousePressed reset to avoid race conditions
1609
+ if (!AuroFloatingUI._mousePressedTimeout) {
1610
+ AuroFloatingUI._mousePressedTimeout = null;
1611
+ }
1608
1612
  const mouseEventGlobalHandler = (event) => {
1609
- AuroFloatingUI.isMousePressed = event.type === 'mousedown';
1613
+ const isPressed = event.type === 'mousedown';
1614
+ if (isPressed) {
1615
+ // Clear any pending timeout to prevent race condition
1616
+ if (AuroFloatingUI._mousePressedTimeout !== null) {
1617
+ clearTimeout(AuroFloatingUI._mousePressedTimeout);
1618
+ AuroFloatingUI._mousePressedTimeout = null;
1619
+ }
1620
+ if (!AuroFloatingUI.isMousePressed) {
1621
+ AuroFloatingUI.isMousePressed = true;
1622
+ }
1623
+ } else if (AuroFloatingUI.isMousePressed && !isPressed) {
1624
+ // Schedule reset and track timeout ID
1625
+ AuroFloatingUI._mousePressedTimeout = setTimeout(() => {
1626
+ AuroFloatingUI.isMousePressed = false;
1627
+ AuroFloatingUI._mousePressedTimeout = null;
1628
+ }, 0);
1629
+ }
1610
1630
  };
1611
1631
 
1612
1632
  window.addEventListener('mousedown', mouseEventGlobalHandler);
@@ -1733,6 +1753,7 @@ class AuroFloatingUI {
1733
1753
 
1734
1754
  // Compute the position of the bib
1735
1755
  computePosition(this.element.trigger, this.element.bib, {
1756
+ strategy: this.element.floaterConfig?.strategy || 'fixed',
1736
1757
  placement: this.element.floaterConfig?.placement,
1737
1758
  middleware: middleware || []
1738
1759
  }).then(({ x, y }) => { // eslint-disable-line id-length
@@ -1867,8 +1888,9 @@ class AuroFloatingUI {
1867
1888
  if (this.element.contains(activeElement) || this.element.bib?.contains(activeElement)) {
1868
1889
  return;
1869
1890
  }
1870
- // if fullscreen bib is still open and the focus is missing, do not close
1871
- if (this.element.bib.hasAttribute('isfullscreen') && activeElement === document.body) {
1891
+
1892
+ // if fullscreen bib is in fullscreen mode, do not close
1893
+ if (this.element.bib.hasAttribute('isfullscreen')) {
1872
1894
  return;
1873
1895
  }
1874
1896
 
@@ -2169,8 +2191,6 @@ class AuroFloatingUI {
2169
2191
  this.element.hoverToggle = this.element.floaterConfig.hoverToggle;
2170
2192
  }
2171
2193
 
2172
- document.body.append(this.element.bib);
2173
-
2174
2194
  this.regenerateBibId();
2175
2195
  this.handleTriggerTabIndex();
2176
2196
 
@@ -2401,6 +2421,76 @@ var tokensCss$2 = css`:host{--ds-auro-icon-color:var(--ds-basic-color-texticon-d
2401
2421
 
2402
2422
  var colorCss$3 = css`:host{color:var(--ds-auro-icon-color)}:host([customColor]){color:inherit}:host(:not([onDark])[variant=accent1]){--ds-auro-icon-color:var(--ds-basic-color-texticon-accent1, #265688)}:host(:not([onDark])[variant=disabled]){--ds-auro-icon-color:var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host(:not([onDark])[variant=muted]){--ds-auro-icon-color:var(--ds-basic-color-texticon-muted, #676767)}:host(:not([onDark])[variant=statusDefault]){--ds-auro-icon-color:var(--ds-basic-color-status-default, #afb9c6)}:host(:not([onDark])[variant=statusInfo]){--ds-auro-icon-color:var(--ds-basic-color-status-info, #01426a)}:host(:not([onDark])[variant=statusSuccess]){--ds-auro-icon-color:var(--ds-basic-color-status-success, #447a1f)}:host(:not([onDark])[variant=statusWarning]){--ds-auro-icon-color:var(--ds-basic-color-status-warning, #fac200)}:host(:not([onDark])[variant=statusError]){--ds-auro-icon-color:var(--ds-basic-color-status-error, #e31f26)}:host(:not([onDark])[variant=statusInfoSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-info-subtle, #ebf3f9)}:host(:not([onDark])[variant=statusSuccessSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-success-subtle, #d6eac7)}:host(:not([onDark])[variant=statusWarningSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-warning-subtle, #fff0b2)}:host(:not([onDark])[variant=statusErrorSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-error-subtle, #fbc6c6)}:host(:not([onDark])[variant=fareBasicEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-basiceconomy, #97eaf8)}:host(:not([onDark])[variant=fareBusiness]){--ds-auro-icon-color:var(--ds-basic-color-fare-business, #01426a)}:host(:not([onDark])[variant=fareEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-economy, #0074ca)}:host(:not([onDark])[variant=fareFirst]){--ds-auro-icon-color:var(--ds-basic-color-fare-first, #00274a)}:host(:not([onDark])[variant=farePremiumEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-premiumeconomy, #005154)}:host(:not([onDark])[variant=tierOneWorldEmerald]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-emerald, #139142)}:host(:not([onDark])[variant=tierOneWorldSapphire]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-sapphire, #015daa)}:host(:not([onDark])[variant=tierOneWorldRuby]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-ruby, #a41d4a)}:host([onDark]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse, #ffffff)}:host([onDark][variant=disabled]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}:host([onDark][variant=muted]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}`;
2403
2423
 
2424
+ // Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
2425
+ // See LICENSE in the project root for license information.
2426
+
2427
+ // ---------------------------------------------------------------------
2428
+
2429
+ /* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
2430
+
2431
+ let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
2432
+
2433
+ /* eslint-disable jsdoc/require-param */
2434
+
2435
+ /**
2436
+ * This will register a new custom element with the browser.
2437
+ * @param {String} name - The name of the custom element.
2438
+ * @param {Object} componentClass - The class to register as a custom element.
2439
+ * @returns {void}
2440
+ */
2441
+ registerComponent(name, componentClass) {
2442
+ if (!customElements.get(name)) {
2443
+ customElements.define(name, class extends componentClass {});
2444
+ }
2445
+ }
2446
+
2447
+ /**
2448
+ * Finds and returns the closest HTML Element based on a selector.
2449
+ * @returns {void}
2450
+ */
2451
+ closestElement(
2452
+ selector, // selector like in .closest()
2453
+ base = this, // extra functionality to skip a parent
2454
+ __Closest = (el, found = el && el.closest(selector)) =>
2455
+ !el || el === document || el === window
2456
+ ? null // standard .closest() returns null for non-found selectors also
2457
+ : found
2458
+ ? found // found a selector INside this element
2459
+ : __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
2460
+ ) {
2461
+ return __Closest(base);
2462
+ }
2463
+ /* eslint-enable jsdoc/require-param */
2464
+
2465
+ /**
2466
+ * If the element passed is registered with a different tag name than what is passed in, the tag name is added as an attribute to the element.
2467
+ * @param {Object} elem - The element to check.
2468
+ * @param {String} tagName - The name of the Auro component to check for or add as an attribute.
2469
+ * @returns {void}
2470
+ */
2471
+ handleComponentTagRename(elem, tagName) {
2472
+ const tag = tagName.toLowerCase();
2473
+ const elemTag = elem.tagName.toLowerCase();
2474
+
2475
+ if (elemTag !== tag) {
2476
+ elem.setAttribute(tag, true);
2477
+ }
2478
+ }
2479
+
2480
+ /**
2481
+ * Validates if an element is a specific Auro component.
2482
+ * @param {Object} elem - The element to validate.
2483
+ * @param {String} tagName - The name of the Auro component to check against.
2484
+ * @returns {Boolean} - Returns true if the element is the specified Auro component.
2485
+ */
2486
+ elementMatch(elem, tagName) {
2487
+ const tag = tagName.toLowerCase();
2488
+ const elemTag = elem.tagName.toLowerCase();
2489
+
2490
+ return elemTag === tag || elem.hasAttribute(tag);
2491
+ }
2492
+ };
2493
+
2404
2494
  // Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
2405
2495
  // See LICENSE in the project root for license information.
2406
2496
 
@@ -2570,7 +2660,7 @@ class AuroIcon extends BaseIcon {
2570
2660
 
2571
2661
  var iconVersion = '6.1.2';
2572
2662
 
2573
- var styleCss$2 = css`:host{position:absolute;z-index:var(--depth-tooltip, 400);display:none}.container{display:inline-block;overflow:auto;box-sizing:border-box;margin:var(--ds-size-50, 0.25rem) 0}:host([isfullscreen]){position:fixed;top:0;left:0}:host([isfullscreen]) .container{width:100dvw;max-width:none;height:100dvh;max-height:none;border-radius:unset;margin-top:0;box-shadow:unset;overscroll-behavior:contain}:host([data-show]){display:flex}:host([common]:not([isfullscreen])) .container,:host([rounded]:not([isfullscreen])) .container{border-radius:var(--ds-border-radius, 0.375rem)}:host([common][isfullscreen]) .container,:host([rounded][isfullscreen]) .container{border-radius:unset;box-shadow:unset}`;
2663
+ var styleCss$2 = css`:host{position:fixed;z-index:var(--depth-tooltip, 400);display:none;isolation:isolate}.container{display:inline-block;overflow:auto;box-sizing:border-box;margin:var(--ds-size-50, 0.25rem) 0}:host([isfullscreen]){position:fixed;top:0;left:0}:host([isfullscreen]) .container{width:100dvw;max-width:none;height:100dvh;max-height:none;border-radius:unset;margin-top:0;box-shadow:unset;overscroll-behavior:contain}:host([data-show]){display:flex}:host([common]:not([isfullscreen])) .container,:host([rounded]:not([isfullscreen])) .container{border-radius:var(--ds-border-radius, 0.375rem)}:host([common][isfullscreen]) .container,:host([rounded][isfullscreen]) .container{border-radius:unset;box-shadow:unset}`;
2574
2664
 
2575
2665
  var colorCss$2 = css`.container{background-color:var(--ds-auro-dropdownbib-container-color);box-shadow:var(--ds-auro-dropdownbib-boxshadow-color);color:var(--ds-auro-dropdownbib-text-color)}`;
2576
2666
 
@@ -2580,7 +2670,6 @@ var tokensCss$1 = css`:host{--ds-auro-dropdown-label-text-color: var(--ds-basic-
2580
2670
  // See LICENSE in the project root for license information.
2581
2671
 
2582
2672
 
2583
-
2584
2673
  const DESIGN_TOKEN_BREAKPOINT_PREFIX = '--ds-grid-breakpoint-';
2585
2674
  const DESIGN_TOKEN_BREAKPOINT_OPTIONS = [
2586
2675
  'xl',
@@ -2605,7 +2694,7 @@ class AuroDropdownBib extends LitElement {
2605
2694
  */
2606
2695
  this._mobileBreakpointValue = undefined;
2607
2696
 
2608
- AuroLibraryRuntimeUtils$1.prototype.handleComponentTagRename(this, 'auro-dropdownbib');
2697
+ AuroLibraryRuntimeUtils$2.prototype.handleComponentTagRename(this, 'auro-dropdownbib');
2609
2698
  }
2610
2699
 
2611
2700
  static get styles() {
@@ -2650,6 +2739,13 @@ class AuroDropdownBib extends LitElement {
2650
2739
  type: Boolean,
2651
2740
  reflect: true
2652
2741
  },
2742
+
2743
+ /**
2744
+ * A reference to the associated bib template element.
2745
+ */
2746
+ bibTemplate: {
2747
+ type: Object
2748
+ }
2653
2749
  };
2654
2750
  }
2655
2751
 
@@ -2682,9 +2778,50 @@ class AuroDropdownBib extends LitElement {
2682
2778
  }
2683
2779
  }
2684
2780
  });
2781
+
2782
+ if (this.bibTemplate) {
2783
+ // If the bib template is found, set the fullscreen attribute
2784
+ if (this.isFullscreen) {
2785
+ this.bibTemplate.setAttribute('isFullscreen', 'true');
2786
+ } else {
2787
+ this.bibTemplate.removeAttribute('isFullscreen');
2788
+ }
2789
+ }
2685
2790
  }
2686
2791
  }
2687
2792
 
2793
+ connectedCallback() {
2794
+ super.connectedCallback();
2795
+
2796
+ // Listen for the auro-bibtemplate-connected event to set the fullscreen attribute
2797
+ this.addEventListener('auro-bibtemplate-connected', (event) => {
2798
+ const bibTemplate = event.detail.element;
2799
+ this.bibTemplate = bibTemplate;
2800
+
2801
+ if (bibTemplate) {
2802
+ // If the bib template is found, set the fullscreen attribute
2803
+ if (this.isFullscreen) {
2804
+ bibTemplate.setAttribute('isFullscreen', 'true');
2805
+ } else {
2806
+ bibTemplate.removeAttribute('isFullscreen');
2807
+ }
2808
+ }
2809
+ });
2810
+ }
2811
+
2812
+ firstUpdated(changedProperties) {
2813
+ super.firstUpdated(changedProperties);
2814
+
2815
+ // Dispatch a custom event when the component is connected
2816
+ this.dispatchEvent(new CustomEvent('auro-dropdownbib-connected', {
2817
+ bubbles: true,
2818
+ composed: true,
2819
+ detail: {
2820
+ element: this
2821
+ }
2822
+ }));
2823
+ }
2824
+
2688
2825
  // function that renders the HTML and CSS into the scope of the component
2689
2826
  render() {
2690
2827
  return html$1`
@@ -2994,7 +3131,7 @@ class AuroDropdown extends LitElement {
2994
3131
  /**
2995
3132
  * @private
2996
3133
  */
2997
- this.runtimeUtils = new AuroLibraryRuntimeUtils$1();
3134
+ this.runtimeUtils = new AuroLibraryRuntimeUtils$2();
2998
3135
 
2999
3136
  /**
3000
3137
  * @private
@@ -3323,7 +3460,7 @@ class AuroDropdown extends LitElement {
3323
3460
  *
3324
3461
  */
3325
3462
  static register(name = "auro-dropdown") {
3326
- AuroLibraryRuntimeUtils$1.prototype.registerComponent(name, AuroDropdown);
3463
+ AuroLibraryRuntimeUtils$2.prototype.registerComponent(name, AuroDropdown);
3327
3464
  }
3328
3465
 
3329
3466
  /**
@@ -3640,8 +3777,7 @@ class AuroDropdown extends LitElement {
3640
3777
  * @param {Event} event - The event object representing the slot change.
3641
3778
  * @fires Function#onSlotChange - Optional callback invoked when the slot content changes.
3642
3779
  */
3643
- handleDefaultSlot(event) {
3644
- [...event.target.assignedNodes()].forEach((node) => this.bibContent.append(node));
3780
+ handleDefaultSlot() {
3645
3781
 
3646
3782
  if (this.onSlotChange) {
3647
3783
  this.onSlotChange();
@@ -3713,9 +3849,7 @@ class AuroDropdown extends LitElement {
3713
3849
  <${this.helpTextTag} part="helpText" ?onDark=${this.onDark} ?error="${this.error}">
3714
3850
  <slot name="helpText"></slot>
3715
3851
  </${this.helpTextTag}>
3716
- <div class="slotContent">
3717
- <slot @slotchange="${this.handleDefaultSlot}"></slot>
3718
- </div>
3852
+
3719
3853
  <div id="bibSizer" part="size"></div>
3720
3854
  <${this.dropdownBibTag}
3721
3855
  id="bib"
@@ -3725,6 +3859,9 @@ class AuroDropdown extends LitElement {
3725
3859
  ?rounded="${this.common || this.rounded}"
3726
3860
  ?inset="${this.common || this.inset}"
3727
3861
  >
3862
+ <div class="slotContent">
3863
+ <slot @slotchange="${this.handleDefaultSlot}"></slot>
3864
+ </div>
3728
3865
  </${this.dropdownBibTag}>
3729
3866
  </div>
3730
3867
  `;