@aurodesignsystem-dev/auro-formkit 0.0.0-pr1422.2 → 0.0.0-pr1424.0

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 (38) hide show
  1. package/CHANGELOG.md +2 -2
  2. package/README.md +183 -133
  3. package/components/checkbox/demo/api.min.js +1 -1
  4. package/components/checkbox/demo/index.min.js +1 -1
  5. package/components/checkbox/dist/index.js +1 -1
  6. package/components/checkbox/dist/registered.js +1 -1
  7. package/components/combobox/demo/api.min.js +165 -276
  8. package/components/combobox/demo/index.min.js +165 -276
  9. package/components/combobox/dist/index.js +165 -276
  10. package/components/combobox/dist/registered.js +165 -276
  11. package/components/counter/demo/api.min.js +164 -275
  12. package/components/counter/demo/index.min.js +164 -275
  13. package/components/counter/dist/index.js +164 -275
  14. package/components/counter/dist/registered.js +164 -275
  15. package/components/datepicker/demo/api.min.js +165 -276
  16. package/components/datepicker/demo/index.min.js +165 -276
  17. package/components/datepicker/dist/index.js +165 -276
  18. package/components/datepicker/dist/registered.js +165 -276
  19. package/components/dropdown/demo/api.min.js +164 -275
  20. package/components/dropdown/demo/index.min.js +164 -275
  21. package/components/dropdown/dist/index.js +164 -275
  22. package/components/dropdown/dist/registered.js +164 -275
  23. package/components/form/demo/api.md +460 -76
  24. package/components/form/demo/api.min.js +661 -1105
  25. package/components/form/demo/index.min.js +661 -1105
  26. package/components/input/demo/api.min.js +1 -1
  27. package/components/input/demo/index.min.js +1 -1
  28. package/components/input/dist/index.js +1 -1
  29. package/components/input/dist/registered.js +1 -1
  30. package/components/radio/demo/api.min.js +1 -1
  31. package/components/radio/demo/index.min.js +1 -1
  32. package/components/radio/dist/index.js +1 -1
  33. package/components/radio/dist/registered.js +1 -1
  34. package/components/select/demo/api.min.js +164 -275
  35. package/components/select/demo/index.min.js +164 -275
  36. package/components/select/dist/index.js +164 -275
  37. package/components/select/dist/registered.js +164 -275
  38. package/package.json +3 -3
@@ -3312,19 +3312,11 @@ class AuroFloatingUI {
3312
3312
  * This ensures that the bib content has the same dimensions as the sizer element.
3313
3313
  */
3314
3314
  mirrorSize() {
3315
- const element = this.element;
3316
- if (!element) {
3317
- return;
3318
- }
3319
-
3320
3315
  // mirror the boxsize from bibSizer
3321
- if (element.bibSizer && element.matchWidth && element.bib?.shadowRoot) {
3322
- const sizerStyle = window.getComputedStyle(element.bibSizer);
3323
- const bibContent = element.bib.shadowRoot.querySelector(".container");
3324
- if (!bibContent) {
3325
- return;
3326
- }
3327
-
3316
+ if (this.element.bibSizer && this.element.matchWidth) {
3317
+ const sizerStyle = window.getComputedStyle(this.element.bibSizer);
3318
+ const bibContent =
3319
+ this.element.bib.shadowRoot.querySelector(".container");
3328
3320
  if (sizerStyle.width !== "0px") {
3329
3321
  bibContent.style.width = sizerStyle.width;
3330
3322
  }
@@ -3346,14 +3338,9 @@ class AuroFloatingUI {
3346
3338
  * @returns {String} The positioning strategy, one of 'fullscreen', 'floating', 'cover'.
3347
3339
  */
3348
3340
  getPositioningStrategy() {
3349
- const element = this.element;
3350
- if (!element) {
3351
- return "floating";
3352
- }
3353
-
3354
3341
  const breakpoint =
3355
- element.bib?.mobileFullscreenBreakpoint ||
3356
- element.floaterConfig?.fullscreenBreakpoint;
3342
+ this.element.bib.mobileFullscreenBreakpoint ||
3343
+ this.element.floaterConfig?.fullscreenBreakpoint;
3357
3344
  switch (this.behavior) {
3358
3345
  case "tooltip":
3359
3346
  return "floating";
@@ -3364,9 +3351,9 @@ class AuroFloatingUI {
3364
3351
  `(max-width: ${breakpoint})`,
3365
3352
  ).matches;
3366
3353
 
3367
- element.expanded = smallerThanBreakpoint;
3354
+ this.element.expanded = smallerThanBreakpoint;
3368
3355
  }
3369
- if (element.nested) {
3356
+ if (this.element.nested) {
3370
3357
  return "cover";
3371
3358
  }
3372
3359
  return "fullscreen";
@@ -3396,65 +3383,42 @@ class AuroFloatingUI {
3396
3383
  * and applies the calculated position to the bib's style.
3397
3384
  */
3398
3385
  position() {
3399
- const element = this.element;
3400
- if (!element) {
3401
- return;
3402
- }
3403
-
3404
3386
  const strategy = this.getPositioningStrategy();
3405
3387
  this.configureBibStrategy(strategy);
3406
3388
 
3407
3389
  if (strategy === "floating") {
3408
- if (!element.trigger || !element.bib) {
3409
- return;
3410
- }
3411
-
3412
3390
  this.mirrorSize();
3413
3391
  // Define the middlware for the floater configuration
3414
3392
  const middleware = [
3415
- offset(element.floaterConfig?.offset || 0),
3416
- ...(element.floaterConfig?.shift ? [shift()] : []), // Add shift middleware if shift is enabled.
3417
- ...(element.floaterConfig?.flip ? [flip()] : []), // Add flip middleware if flip is enabled.
3418
- ...(element.floaterConfig?.autoPlacement ? [autoPlacement()] : []), // Add autoPlacement middleware if autoPlacement is enabled.
3393
+ offset(this.element.floaterConfig?.offset || 0),
3394
+ ...(this.element.floaterConfig?.shift ? [shift()] : []), // Add shift middleware if shift is enabled.
3395
+ ...(this.element.floaterConfig?.flip ? [flip()] : []), // Add flip middleware if flip is enabled.
3396
+ ...(this.element.floaterConfig?.autoPlacement ? [autoPlacement()] : []), // Add autoPlacement middleware if autoPlacement is enabled.
3419
3397
  ];
3420
3398
 
3421
3399
  // Compute the position of the bib
3422
- computePosition(element.trigger, element.bib, {
3423
- strategy: element.floaterConfig?.strategy || "fixed",
3424
- placement: element.floaterConfig?.placement,
3400
+ computePosition(this.element.trigger, this.element.bib, {
3401
+ strategy: this.element.floaterConfig?.strategy || "fixed",
3402
+ placement: this.element.floaterConfig?.placement,
3425
3403
  middleware: middleware || [],
3426
3404
  }).then(({ x, y }) => {
3427
3405
  // eslint-disable-line id-length
3428
- const currentElement = this.element;
3429
- if (!currentElement?.bib) {
3430
- return;
3431
- }
3432
-
3433
- Object.assign(currentElement.bib.style, {
3406
+ Object.assign(this.element.bib.style, {
3434
3407
  left: `${x}px`,
3435
3408
  top: `${y}px`,
3436
3409
  });
3437
3410
  });
3438
3411
  } else if (strategy === "cover") {
3439
- if (!element.parentNode || !element.bib) {
3440
- return;
3441
- }
3442
-
3443
3412
  // Compute the position of the bib
3444
- computePosition(element.parentNode, element.bib, {
3413
+ computePosition(this.element.parentNode, this.element.bib, {
3445
3414
  placement: "bottom-start",
3446
3415
  }).then(({ x, y }) => {
3447
3416
  // eslint-disable-line id-length
3448
- const currentElement = this.element;
3449
- if (!currentElement?.bib || !currentElement.parentNode) {
3450
- return;
3451
- }
3452
-
3453
- Object.assign(currentElement.bib.style, {
3417
+ Object.assign(this.element.bib.style, {
3454
3418
  left: `${x}px`,
3455
- top: `${y - currentElement.parentNode.offsetHeight}px`,
3456
- width: `${currentElement.parentNode.offsetWidth}px`,
3457
- height: `${currentElement.parentNode.offsetHeight}px`,
3419
+ top: `${y - this.element.parentNode.offsetHeight}px`,
3420
+ width: `${this.element.parentNode.offsetWidth}px`,
3421
+ height: `${this.element.parentNode.offsetHeight}px`,
3458
3422
  });
3459
3423
  });
3460
3424
  }
@@ -3466,17 +3430,11 @@ class AuroFloatingUI {
3466
3430
  * @param {Boolean} lock - If true, locks the body's scrolling functionlity; otherwise, unlock.
3467
3431
  */
3468
3432
  lockScroll(lock = true) {
3469
- const element = this.element;
3470
-
3471
3433
  if (lock) {
3472
- if (!element?.bib) {
3473
- return;
3474
- }
3475
-
3476
3434
  document.body.style.overflow = "hidden"; // hide body's scrollbar
3477
3435
 
3478
3436
  // Move `bib` by the amount the viewport is shifted to stay aligned in fullscreen.
3479
- element.bib.style.transform = `translateY(${window?.visualViewport?.offsetTop}px)`;
3437
+ this.element.bib.style.transform = `translateY(${window?.visualViewport?.offsetTop}px)`;
3480
3438
  } else {
3481
3439
  document.body.style.overflow = "";
3482
3440
  }
@@ -3492,24 +3450,20 @@ class AuroFloatingUI {
3492
3450
  * @param {string} strategy - The positioning strategy ('fullscreen' or 'floating').
3493
3451
  */
3494
3452
  configureBibStrategy(value) {
3495
- const element = this.element;
3496
- if (!element?.bib) {
3497
- return;
3498
- }
3499
-
3500
3453
  if (value === "fullscreen") {
3501
- element.isBibFullscreen = true;
3454
+ this.element.isBibFullscreen = true;
3502
3455
  // reset the prev position
3503
- element.bib.setAttribute("isfullscreen", "");
3504
- element.bib.style.position = "fixed";
3505
- element.bib.style.top = "0px";
3506
- element.bib.style.left = "0px";
3507
- element.bib.style.width = "";
3508
- element.bib.style.height = "";
3509
- element.style.contain = "";
3456
+ this.element.bib.setAttribute("isfullscreen", "");
3457
+ this.element.bib.style.position = "fixed";
3458
+ this.element.bib.style.top = "0px";
3459
+ this.element.bib.style.left = "0px";
3460
+ this.element.bib.style.width = "";
3461
+ this.element.bib.style.height = "";
3462
+ this.element.style.contain = "";
3510
3463
 
3511
3464
  // reset the size that was mirroring `size` css-part
3512
- const bibContent = element.bib.shadowRoot?.querySelector(".container");
3465
+ const bibContent =
3466
+ this.element.bib.shadowRoot.querySelector(".container");
3513
3467
  if (bibContent) {
3514
3468
  bibContent.style.width = "";
3515
3469
  bibContent.style.height = "";
@@ -3524,14 +3478,14 @@ class AuroFloatingUI {
3524
3478
  }, 0);
3525
3479
  }
3526
3480
 
3527
- if (element.isPopoverVisible) {
3481
+ if (this.element.isPopoverVisible) {
3528
3482
  this.lockScroll(true);
3529
3483
  }
3530
3484
  } else {
3531
- element.bib.style.position = "";
3532
- element.bib.removeAttribute("isfullscreen");
3533
- element.isBibFullscreen = false;
3534
- element.style.contain = "layout";
3485
+ this.element.bib.style.position = "";
3486
+ this.element.bib.removeAttribute("isfullscreen");
3487
+ this.element.isBibFullscreen = false;
3488
+ this.element.style.contain = "layout";
3535
3489
  }
3536
3490
 
3537
3491
  const isChanged = this.strategy && this.strategy !== value;
@@ -3549,21 +3503,16 @@ class AuroFloatingUI {
3549
3503
  },
3550
3504
  );
3551
3505
 
3552
- element.dispatchEvent(event);
3506
+ this.element.dispatchEvent(event);
3553
3507
  }
3554
3508
  }
3555
3509
 
3556
3510
  updateState() {
3557
- const element = this.element;
3558
- if (!element) {
3559
- return;
3560
- }
3561
-
3562
- const isVisible = element.isPopoverVisible;
3511
+ const isVisible = this.element.isPopoverVisible;
3563
3512
  if (!isVisible) {
3564
3513
  this.cleanupHideHandlers();
3565
3514
  try {
3566
- element.cleanup?.();
3515
+ this.element.cleanup?.();
3567
3516
  } catch (error) {
3568
3517
  // Do nothing
3569
3518
  }
@@ -3579,30 +3528,28 @@ class AuroFloatingUI {
3579
3528
  * If not, and if the bib isn't in fullscreen mode with focus lost, it hides the bib.
3580
3529
  */
3581
3530
  handleFocusLoss() {
3582
- const element = this.element;
3583
- if (!element?.bib) {
3584
- return;
3585
- }
3586
-
3587
3531
  // if mouse is being pressed, skip and let click event to handle the action
3588
3532
  if (AuroFloatingUI.isMousePressed) {
3589
3533
  return;
3590
3534
  }
3591
3535
 
3592
3536
  if (
3593
- element.noHideOnThisFocusLoss ||
3594
- element.hasAttribute("noHideOnThisFocusLoss")
3537
+ this.element.noHideOnThisFocusLoss ||
3538
+ this.element.hasAttribute("noHideOnThisFocusLoss")
3595
3539
  ) {
3596
3540
  return;
3597
3541
  }
3598
3542
 
3599
3543
  // if focus is still inside of trigger or bib, do not close
3600
- if (element.matches(":focus") || element.matches(":focus-within")) {
3544
+ if (
3545
+ this.element.matches(":focus") ||
3546
+ this.element.matches(":focus-within")
3547
+ ) {
3601
3548
  return;
3602
3549
  }
3603
3550
 
3604
3551
  // if fullscreen bib is in fullscreen mode, do not close
3605
- if (element.bib.hasAttribute("isfullscreen")) {
3552
+ if (this.element.bib.hasAttribute("isfullscreen")) {
3606
3553
  return;
3607
3554
  }
3608
3555
 
@@ -3610,33 +3557,23 @@ class AuroFloatingUI {
3610
3557
  }
3611
3558
 
3612
3559
  setupHideHandlers() {
3613
- const element = this.element;
3614
- if (!element) {
3615
- return;
3616
- }
3617
-
3618
3560
  // Define handlers & store references
3619
3561
  this.focusHandler = () => this.handleFocusLoss();
3620
3562
 
3621
3563
  this.clickHandler = (evt) => {
3622
- const element = this.element;
3623
- if (!element?.bib) {
3624
- return;
3625
- }
3626
-
3627
3564
  // When the bib is fullscreen (modal dialog), don't close on outside
3628
3565
  // clicks. VoiceOver's synthetic click events inside a top-layer modal
3629
3566
  // <dialog> may not include the bib in composedPath(), causing false
3630
3567
  // positives. This mirrors the fullscreen guard in handleFocusLoss().
3631
- if (element.bib.hasAttribute("isfullscreen")) {
3568
+ if (this.element.bib && this.element.bib.hasAttribute("isfullscreen")) {
3632
3569
  return;
3633
3570
  }
3634
3571
 
3635
3572
  if (
3636
- (!evt.composedPath().includes(element.trigger) &&
3637
- !evt.composedPath().includes(element.bib)) ||
3638
- (element.bib.backdrop &&
3639
- evt.composedPath().includes(element.bib.backdrop))
3573
+ (!evt.composedPath().includes(this.element.trigger) &&
3574
+ !evt.composedPath().includes(this.element.bib)) ||
3575
+ (this.element.bib.backdrop &&
3576
+ evt.composedPath().includes(this.element.bib.backdrop))
3640
3577
  ) {
3641
3578
  const existedVisibleFloatingUI =
3642
3579
  document.expandedAuroFormkitDropdown || document.expandedAuroFloater;
@@ -3657,12 +3594,7 @@ class AuroFloatingUI {
3657
3594
 
3658
3595
  // ESC key handler
3659
3596
  this.keyDownHandler = (evt) => {
3660
- const element = this.element;
3661
- if (!element) {
3662
- return;
3663
- }
3664
-
3665
- if (evt.key === "Escape" && element.isPopoverVisible) {
3597
+ if (evt.key === "Escape" && this.element.isPopoverVisible) {
3666
3598
  const existedVisibleFloatingUI =
3667
3599
  document.expandedAuroFormkitDropdown || document.expandedAuroFloater;
3668
3600
  if (
@@ -3719,10 +3651,6 @@ class AuroFloatingUI {
3719
3651
  }
3720
3652
 
3721
3653
  updateCurrentExpandedDropdown() {
3722
- if (!this.element) {
3723
- return;
3724
- }
3725
-
3726
3654
  // Close any other dropdown that is already open
3727
3655
  const existedVisibleFloatingUI =
3728
3656
  document.expandedAuroFormkitDropdown || document.expandedAuroFloater;
@@ -3739,34 +3667,25 @@ class AuroFloatingUI {
3739
3667
  }
3740
3668
 
3741
3669
  showBib() {
3742
- const element = this.element;
3743
- if (!element) {
3744
- return;
3745
- }
3746
-
3747
- if (!element.bib || (!element.trigger && !element.parentNode)) {
3748
- return;
3749
- }
3750
-
3751
- if (!element.disabled && !this.showing) {
3670
+ if (!this.element.disabled && !this.showing) {
3752
3671
  this.updateCurrentExpandedDropdown();
3753
- element.triggerChevron?.setAttribute("data-expanded", true);
3672
+ this.element.triggerChevron?.setAttribute("data-expanded", true);
3754
3673
 
3755
3674
  // prevent double showing: isPopovervisible gets first and showBib gets called later
3756
3675
  if (!this.showing) {
3757
- if (!element.modal) {
3676
+ if (!this.element.modal) {
3758
3677
  this.setupHideHandlers();
3759
3678
  }
3760
3679
  this.showing = true;
3761
- element.isPopoverVisible = true;
3680
+ this.element.isPopoverVisible = true;
3762
3681
  this.position();
3763
3682
  this.dispatchEventDropdownToggle();
3764
3683
  }
3765
3684
 
3766
3685
  // Setup auto update to handle resize and scroll
3767
- element.cleanup = autoUpdate(
3768
- element.trigger || element.parentNode,
3769
- element.bib,
3686
+ this.element.cleanup = autoUpdate(
3687
+ this.element.trigger || this.element.parentNode,
3688
+ this.element.bib,
3770
3689
  () => {
3771
3690
  this.position();
3772
3691
  },
@@ -3779,27 +3698,22 @@ class AuroFloatingUI {
3779
3698
  * @param {String} eventType - The event type that triggered the hiding action.
3780
3699
  */
3781
3700
  hideBib(eventType = "unknown") {
3782
- const element = this.element;
3783
- if (!element) {
3784
- return;
3785
- }
3786
-
3787
- if (element.disabled) {
3701
+ if (this.element.disabled) {
3788
3702
  return;
3789
3703
  }
3790
3704
 
3791
3705
  // noToggle dropdowns should not close when the trigger is clicked (the
3792
3706
  // "toggle" behavior), but they CAN still close via other interactions like
3793
3707
  // Escape key or focus loss.
3794
- if (element.noToggle && eventType === "click") {
3708
+ if (this.element.noToggle && eventType === "click") {
3795
3709
  return;
3796
3710
  }
3797
3711
 
3798
3712
  this.lockScroll(false);
3799
- element.triggerChevron?.removeAttribute("data-expanded");
3713
+ this.element.triggerChevron?.removeAttribute("data-expanded");
3800
3714
 
3801
- if (element.isPopoverVisible) {
3802
- element.isPopoverVisible = false;
3715
+ if (this.element.isPopoverVisible) {
3716
+ this.element.isPopoverVisible = false;
3803
3717
  }
3804
3718
  if (this.showing) {
3805
3719
  this.cleanupHideHandlers();
@@ -3819,11 +3733,6 @@ class AuroFloatingUI {
3819
3733
  * @param {String} eventType - The event type that triggered the toggle action.
3820
3734
  */
3821
3735
  dispatchEventDropdownToggle(eventType) {
3822
- const element = this.element;
3823
- if (!element) {
3824
- return;
3825
- }
3826
-
3827
3736
  const event = new CustomEvent(
3828
3737
  this.eventPrefix ? `${this.eventPrefix}-toggled` : "toggled",
3829
3738
  {
@@ -3835,16 +3744,11 @@ class AuroFloatingUI {
3835
3744
  },
3836
3745
  );
3837
3746
 
3838
- element.dispatchEvent(event);
3747
+ this.element.dispatchEvent(event);
3839
3748
  }
3840
3749
 
3841
3750
  handleClick() {
3842
- const element = this.element;
3843
- if (!element) {
3844
- return;
3845
- }
3846
-
3847
- if (element.isPopoverVisible) {
3751
+ if (this.element.isPopoverVisible) {
3848
3752
  this.hideBib("click");
3849
3753
  } else {
3850
3754
  this.showBib();
@@ -3855,66 +3759,63 @@ class AuroFloatingUI {
3855
3759
  {
3856
3760
  composed: true,
3857
3761
  detail: {
3858
- expanded: element.isPopoverVisible,
3762
+ expanded: this.element.isPopoverVisible,
3859
3763
  },
3860
3764
  },
3861
3765
  );
3862
3766
 
3863
- element.dispatchEvent(event);
3767
+ this.element.dispatchEvent(event);
3864
3768
  }
3865
3769
 
3866
3770
  handleEvent(event) {
3867
- const element = this.element;
3868
- if (!element || element.disableEventShow) {
3869
- return;
3870
- }
3871
-
3872
- switch (event.type) {
3873
- case "keydown": {
3874
- // Support both Enter and Space keys for accessibility
3875
- // Space is included as it's expected behavior for interactive elements
3876
-
3877
- const origin = event.composedPath()[0];
3878
- if (
3879
- event.key === "Enter" ||
3880
- (event.key === " " && (!origin || origin.tagName !== "INPUT"))
3881
- ) {
3882
- event.preventDefault();
3883
- this.handleClick();
3771
+ if (!this.element.disableEventShow) {
3772
+ switch (event.type) {
3773
+ case "keydown": {
3774
+ // Support both Enter and Space keys for accessibility
3775
+ // Space is included as it's expected behavior for interactive elements
3776
+
3777
+ const origin = event.composedPath()[0];
3778
+ if (
3779
+ event.key === "Enter" ||
3780
+ (event.key === " " && (!origin || origin.tagName !== "INPUT"))
3781
+ ) {
3782
+ event.preventDefault();
3783
+ this.handleClick();
3784
+ }
3785
+ break;
3884
3786
  }
3885
- break;
3787
+ case "mouseenter":
3788
+ if (this.element.hoverToggle) {
3789
+ this.showBib();
3790
+ }
3791
+ break;
3792
+ case "mouseleave":
3793
+ if (this.element.hoverToggle) {
3794
+ this.hideBib("mouseleave");
3795
+ }
3796
+ break;
3797
+ case "focus":
3798
+ if (this.element.focusShow) {
3799
+ /*
3800
+ This needs to better handle clicking that gives focus -
3801
+ currently it shows and then immediately hides the bib
3802
+ */
3803
+ this.showBib();
3804
+ }
3805
+ break;
3806
+ case "blur":
3807
+ // send this task 100ms later queue to
3808
+ // wait a frame in case focus moves within the floating element/bib
3809
+ setTimeout(() => this.handleFocusLoss(), 0);
3810
+ break;
3811
+ case "click":
3812
+ if (document.activeElement === document.body) {
3813
+ event.currentTarget.focus();
3814
+ }
3815
+ this.handleClick();
3816
+ break;
3817
+ // Do nothing
3886
3818
  }
3887
- case "mouseenter":
3888
- if (element.hoverToggle) {
3889
- this.showBib();
3890
- }
3891
- break;
3892
- case "mouseleave":
3893
- if (element.hoverToggle) {
3894
- this.hideBib("mouseleave");
3895
- }
3896
- break;
3897
- case "focus":
3898
- if (element.focusShow) {
3899
- /*
3900
- This needs to better handle clicking that gives focus -
3901
- currently it shows and then immediately hides the bib
3902
- */
3903
- this.showBib();
3904
- }
3905
- break;
3906
- case "blur":
3907
- // send this task 100ms later queue to
3908
- // wait a frame in case focus moves within the floating element/bib
3909
- setTimeout(() => this.handleFocusLoss(), 0);
3910
- break;
3911
- case "click":
3912
- if (document.activeElement === document.body) {
3913
- event.currentTarget.focus();
3914
- }
3915
- this.handleClick();
3916
- break;
3917
- // Do nothing
3918
3819
  }
3919
3820
  }
3920
3821
 
@@ -3925,11 +3826,6 @@ class AuroFloatingUI {
3925
3826
  * This prevents the component itself from being focusable when the trigger element already handles focus.
3926
3827
  */
3927
3828
  handleTriggerTabIndex() {
3928
- const element = this.element;
3929
- if (!element) {
3930
- return;
3931
- }
3932
-
3933
3829
  const focusableElementSelectors = [
3934
3830
  "a",
3935
3831
  "button",
@@ -3942,7 +3838,7 @@ class AuroFloatingUI {
3942
3838
  "auro-hyperlink",
3943
3839
  ];
3944
3840
 
3945
- const triggerNode = element.querySelectorAll('[slot="trigger"]')[0];
3841
+ const triggerNode = this.element.querySelectorAll('[slot="trigger"]')[0];
3946
3842
  if (!triggerNode) {
3947
3843
  return;
3948
3844
  }
@@ -3951,13 +3847,13 @@ class AuroFloatingUI {
3951
3847
  focusableElementSelectors.forEach((selector) => {
3952
3848
  // Check if the trigger node element is focusable
3953
3849
  if (triggerNodeTagName === selector) {
3954
- element.tabIndex = -1;
3850
+ this.element.tabIndex = -1;
3955
3851
  return;
3956
3852
  }
3957
3853
 
3958
3854
  // Check if any child is focusable
3959
3855
  if (triggerNode.querySelector(selector)) {
3960
- element.tabIndex = -1;
3856
+ this.element.tabIndex = -1;
3961
3857
  }
3962
3858
  });
3963
3859
  }
@@ -3967,18 +3863,13 @@ class AuroFloatingUI {
3967
3863
  * @param {*} eventPrefix
3968
3864
  */
3969
3865
  regenerateBibId() {
3970
- const element = this.element;
3971
- if (!element) {
3972
- return;
3973
- }
3974
-
3975
- this.id = element.getAttribute("id");
3866
+ this.id = this.element.getAttribute("id");
3976
3867
  if (!this.id) {
3977
3868
  this.id = window.crypto.randomUUID();
3978
- element.setAttribute("id", this.id);
3869
+ this.element.setAttribute("id", this.id);
3979
3870
  }
3980
3871
 
3981
- element.bib?.setAttribute("id", `${this.id}-floater-bib`);
3872
+ this.element.bib.setAttribute("id", `${this.id}-floater-bib`);
3982
3873
  }
3983
3874
 
3984
3875
  configure(elem, eventPrefix, enableKeyboardHandling = true) {
@@ -3990,69 +3881,67 @@ class AuroFloatingUI {
3990
3881
  this.element = elem;
3991
3882
  }
3992
3883
 
3993
- const element = this.element;
3994
- if (!element) {
3995
- return;
3884
+ if (this.behavior !== this.element.behavior) {
3885
+ this.behavior = this.element.behavior;
3996
3886
  }
3997
3887
 
3998
- if (this.behavior !== element.behavior) {
3999
- this.behavior = element.behavior;
4000
- }
4001
-
4002
- if (element.trigger) {
3888
+ if (this.element.trigger) {
4003
3889
  this.disconnect();
4004
3890
  }
4005
- element.trigger =
4006
- element.triggerElement ||
4007
- element.shadowRoot?.querySelector("#trigger") ||
4008
- element.trigger;
4009
- element.bib = element.shadowRoot?.querySelector("#bib") || element.bib;
4010
- element.bibSizer = element.shadowRoot?.querySelector("#bibSizer");
4011
- element.triggerChevron =
4012
- element.shadowRoot?.querySelector("#showStateIcon");
3891
+ this.element.trigger =
3892
+ this.element.triggerElement ||
3893
+ this.element.shadowRoot.querySelector("#trigger") ||
3894
+ this.element.trigger;
3895
+ this.element.bib =
3896
+ this.element.shadowRoot.querySelector("#bib") || this.element.bib;
3897
+ this.element.bibSizer = this.element.shadowRoot.querySelector("#bibSizer");
3898
+ this.element.triggerChevron =
3899
+ this.element.shadowRoot.querySelector("#showStateIcon");
4013
3900
 
4014
- if (element.floaterConfig) {
4015
- element.hoverToggle = element.floaterConfig.hoverToggle;
3901
+ if (this.element.floaterConfig) {
3902
+ this.element.hoverToggle = this.element.floaterConfig.hoverToggle;
4016
3903
  }
4017
3904
 
4018
3905
  this.regenerateBibId();
4019
3906
  this.handleTriggerTabIndex();
4020
3907
 
4021
3908
  this.handleEvent = this.handleEvent.bind(this);
4022
- if (element.trigger) {
3909
+ if (this.element.trigger) {
4023
3910
  if (this.enableKeyboardHandling) {
4024
- element.trigger.addEventListener("keydown", this.handleEvent);
3911
+ this.element.trigger.addEventListener("keydown", this.handleEvent);
4025
3912
  }
4026
- element.trigger.addEventListener("click", this.handleEvent);
4027
- element.trigger.addEventListener("mouseenter", this.handleEvent);
4028
- element.trigger.addEventListener("mouseleave", this.handleEvent);
4029
- element.trigger.addEventListener("focus", this.handleEvent);
4030
- element.trigger.addEventListener("blur", this.handleEvent);
3913
+ this.element.trigger.addEventListener("click", this.handleEvent);
3914
+ this.element.trigger.addEventListener("mouseenter", this.handleEvent);
3915
+ this.element.trigger.addEventListener("mouseleave", this.handleEvent);
3916
+ this.element.trigger.addEventListener("focus", this.handleEvent);
3917
+ this.element.trigger.addEventListener("blur", this.handleEvent);
4031
3918
  }
4032
3919
  }
4033
3920
 
4034
3921
  disconnect() {
4035
3922
  this.cleanupHideHandlers();
3923
+ if (this.element) {
3924
+ this.element.cleanup?.();
4036
3925
 
4037
- const element = this.element;
4038
- if (!element) {
4039
- return;
4040
- }
4041
-
4042
- element.cleanup?.();
4043
-
4044
- if (element.bib && element.shadowRoot) {
4045
- element.shadowRoot.append(element.bib);
4046
- }
3926
+ if (this.element.bib) {
3927
+ this.element.shadowRoot.append(this.element.bib);
3928
+ }
4047
3929
 
4048
- // Remove event & keyboard listeners
4049
- if (element.trigger) {
4050
- element.trigger.removeEventListener("keydown", this.handleEvent);
4051
- element.trigger.removeEventListener("click", this.handleEvent);
4052
- element.trigger.removeEventListener("mouseenter", this.handleEvent);
4053
- element.trigger.removeEventListener("mouseleave", this.handleEvent);
4054
- element.trigger.removeEventListener("focus", this.handleEvent);
4055
- element.trigger.removeEventListener("blur", this.handleEvent);
3930
+ // Remove event & keyboard listeners
3931
+ if (this.element?.trigger) {
3932
+ this.element.trigger.removeEventListener("keydown", this.handleEvent);
3933
+ this.element.trigger.removeEventListener("click", this.handleEvent);
3934
+ this.element.trigger.removeEventListener(
3935
+ "mouseenter",
3936
+ this.handleEvent,
3937
+ );
3938
+ this.element.trigger.removeEventListener(
3939
+ "mouseleave",
3940
+ this.handleEvent,
3941
+ );
3942
+ this.element.trigger.removeEventListener("focus", this.handleEvent);
3943
+ this.element.trigger.removeEventListener("blur", this.handleEvent);
3944
+ }
4056
3945
  }
4057
3946
  }
4058
3947
  }
@@ -5180,7 +5069,7 @@ let AuroHelpText$2 = class AuroHelpText extends i$4 {
5180
5069
  }
5181
5070
  };
5182
5071
 
5183
- var formkitVersion$2 = '202604071818';
5072
+ var formkitVersion$2 = '202604072118';
5184
5073
 
5185
5074
  let AuroElement$2 = class AuroElement extends i$4 {
5186
5075
  static get properties() {
@@ -12944,7 +12833,7 @@ let AuroHelpText$1 = class AuroHelpText extends i$4 {
12944
12833
  }
12945
12834
  };
12946
12835
 
12947
- var formkitVersion$1 = '202604071818';
12836
+ var formkitVersion$1 = '202604072118';
12948
12837
 
12949
12838
  // Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
12950
12839
  // See LICENSE in the project root for license information.
@@ -14009,7 +13898,7 @@ class AuroBibtemplate extends i$4 {
14009
13898
  }
14010
13899
  }
14011
13900
 
14012
- var formkitVersion = '202604071818';
13901
+ var formkitVersion = '202604072118';
14013
13902
 
14014
13903
  var styleCss$3 = i$7`.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock{display:block}.util_displayFlex{display:flex}.util_displayHidden{display:none}.util_displayHiddenVisually{position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}:host{display:block;text-align:left}:host [auro-dropdown]{--ds-auro-dropdown-trigger-background-color: transparent}:host #inputInBib::part(wrapper){box-shadow:none}:host #inputInBib::part(accent-left){display:none}:host([layout*=classic]) [auro-input]{width:100%}:host([layout*=classic]) [auro-input]::part(helpText){display:none}:host([layout*=classic]) #slotHolder{display:none}`;
14015
13904