@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
@@ -3367,19 +3367,11 @@ class AuroFloatingUI {
3367
3367
  * This ensures that the bib content has the same dimensions as the sizer element.
3368
3368
  */
3369
3369
  mirrorSize() {
3370
- const element = this.element;
3371
- if (!element) {
3372
- return;
3373
- }
3374
-
3375
3370
  // mirror the boxsize from bibSizer
3376
- if (element.bibSizer && element.matchWidth && element.bib?.shadowRoot) {
3377
- const sizerStyle = window.getComputedStyle(element.bibSizer);
3378
- const bibContent = element.bib.shadowRoot.querySelector(".container");
3379
- if (!bibContent) {
3380
- return;
3381
- }
3382
-
3371
+ if (this.element.bibSizer && this.element.matchWidth) {
3372
+ const sizerStyle = window.getComputedStyle(this.element.bibSizer);
3373
+ const bibContent =
3374
+ this.element.bib.shadowRoot.querySelector(".container");
3383
3375
  if (sizerStyle.width !== "0px") {
3384
3376
  bibContent.style.width = sizerStyle.width;
3385
3377
  }
@@ -3401,14 +3393,9 @@ class AuroFloatingUI {
3401
3393
  * @returns {String} The positioning strategy, one of 'fullscreen', 'floating', 'cover'.
3402
3394
  */
3403
3395
  getPositioningStrategy() {
3404
- const element = this.element;
3405
- if (!element) {
3406
- return "floating";
3407
- }
3408
-
3409
3396
  const breakpoint =
3410
- element.bib?.mobileFullscreenBreakpoint ||
3411
- element.floaterConfig?.fullscreenBreakpoint;
3397
+ this.element.bib.mobileFullscreenBreakpoint ||
3398
+ this.element.floaterConfig?.fullscreenBreakpoint;
3412
3399
  switch (this.behavior) {
3413
3400
  case "tooltip":
3414
3401
  return "floating";
@@ -3419,9 +3406,9 @@ class AuroFloatingUI {
3419
3406
  `(max-width: ${breakpoint})`,
3420
3407
  ).matches;
3421
3408
 
3422
- element.expanded = smallerThanBreakpoint;
3409
+ this.element.expanded = smallerThanBreakpoint;
3423
3410
  }
3424
- if (element.nested) {
3411
+ if (this.element.nested) {
3425
3412
  return "cover";
3426
3413
  }
3427
3414
  return "fullscreen";
@@ -3451,65 +3438,42 @@ class AuroFloatingUI {
3451
3438
  * and applies the calculated position to the bib's style.
3452
3439
  */
3453
3440
  position() {
3454
- const element = this.element;
3455
- if (!element) {
3456
- return;
3457
- }
3458
-
3459
3441
  const strategy = this.getPositioningStrategy();
3460
3442
  this.configureBibStrategy(strategy);
3461
3443
 
3462
3444
  if (strategy === "floating") {
3463
- if (!element.trigger || !element.bib) {
3464
- return;
3465
- }
3466
-
3467
3445
  this.mirrorSize();
3468
3446
  // Define the middlware for the floater configuration
3469
3447
  const middleware = [
3470
- offset(element.floaterConfig?.offset || 0),
3471
- ...(element.floaterConfig?.shift ? [shift()] : []), // Add shift middleware if shift is enabled.
3472
- ...(element.floaterConfig?.flip ? [flip()] : []), // Add flip middleware if flip is enabled.
3473
- ...(element.floaterConfig?.autoPlacement ? [autoPlacement()] : []), // Add autoPlacement middleware if autoPlacement is enabled.
3448
+ offset(this.element.floaterConfig?.offset || 0),
3449
+ ...(this.element.floaterConfig?.shift ? [shift()] : []), // Add shift middleware if shift is enabled.
3450
+ ...(this.element.floaterConfig?.flip ? [flip()] : []), // Add flip middleware if flip is enabled.
3451
+ ...(this.element.floaterConfig?.autoPlacement ? [autoPlacement()] : []), // Add autoPlacement middleware if autoPlacement is enabled.
3474
3452
  ];
3475
3453
 
3476
3454
  // Compute the position of the bib
3477
- computePosition(element.trigger, element.bib, {
3478
- strategy: element.floaterConfig?.strategy || "fixed",
3479
- placement: element.floaterConfig?.placement,
3455
+ computePosition(this.element.trigger, this.element.bib, {
3456
+ strategy: this.element.floaterConfig?.strategy || "fixed",
3457
+ placement: this.element.floaterConfig?.placement,
3480
3458
  middleware: middleware || [],
3481
3459
  }).then(({ x, y }) => {
3482
3460
  // eslint-disable-line id-length
3483
- const currentElement = this.element;
3484
- if (!currentElement?.bib) {
3485
- return;
3486
- }
3487
-
3488
- Object.assign(currentElement.bib.style, {
3461
+ Object.assign(this.element.bib.style, {
3489
3462
  left: `${x}px`,
3490
3463
  top: `${y}px`,
3491
3464
  });
3492
3465
  });
3493
3466
  } else if (strategy === "cover") {
3494
- if (!element.parentNode || !element.bib) {
3495
- return;
3496
- }
3497
-
3498
3467
  // Compute the position of the bib
3499
- computePosition(element.parentNode, element.bib, {
3468
+ computePosition(this.element.parentNode, this.element.bib, {
3500
3469
  placement: "bottom-start",
3501
3470
  }).then(({ x, y }) => {
3502
3471
  // eslint-disable-line id-length
3503
- const currentElement = this.element;
3504
- if (!currentElement?.bib || !currentElement.parentNode) {
3505
- return;
3506
- }
3507
-
3508
- Object.assign(currentElement.bib.style, {
3472
+ Object.assign(this.element.bib.style, {
3509
3473
  left: `${x}px`,
3510
- top: `${y - currentElement.parentNode.offsetHeight}px`,
3511
- width: `${currentElement.parentNode.offsetWidth}px`,
3512
- height: `${currentElement.parentNode.offsetHeight}px`,
3474
+ top: `${y - this.element.parentNode.offsetHeight}px`,
3475
+ width: `${this.element.parentNode.offsetWidth}px`,
3476
+ height: `${this.element.parentNode.offsetHeight}px`,
3513
3477
  });
3514
3478
  });
3515
3479
  }
@@ -3521,17 +3485,11 @@ class AuroFloatingUI {
3521
3485
  * @param {Boolean} lock - If true, locks the body's scrolling functionlity; otherwise, unlock.
3522
3486
  */
3523
3487
  lockScroll(lock = true) {
3524
- const element = this.element;
3525
-
3526
3488
  if (lock) {
3527
- if (!element?.bib) {
3528
- return;
3529
- }
3530
-
3531
3489
  document.body.style.overflow = "hidden"; // hide body's scrollbar
3532
3490
 
3533
3491
  // Move `bib` by the amount the viewport is shifted to stay aligned in fullscreen.
3534
- element.bib.style.transform = `translateY(${window?.visualViewport?.offsetTop}px)`;
3492
+ this.element.bib.style.transform = `translateY(${window?.visualViewport?.offsetTop}px)`;
3535
3493
  } else {
3536
3494
  document.body.style.overflow = "";
3537
3495
  }
@@ -3547,24 +3505,20 @@ class AuroFloatingUI {
3547
3505
  * @param {string} strategy - The positioning strategy ('fullscreen' or 'floating').
3548
3506
  */
3549
3507
  configureBibStrategy(value) {
3550
- const element = this.element;
3551
- if (!element?.bib) {
3552
- return;
3553
- }
3554
-
3555
3508
  if (value === "fullscreen") {
3556
- element.isBibFullscreen = true;
3509
+ this.element.isBibFullscreen = true;
3557
3510
  // reset the prev position
3558
- element.bib.setAttribute("isfullscreen", "");
3559
- element.bib.style.position = "fixed";
3560
- element.bib.style.top = "0px";
3561
- element.bib.style.left = "0px";
3562
- element.bib.style.width = "";
3563
- element.bib.style.height = "";
3564
- element.style.contain = "";
3511
+ this.element.bib.setAttribute("isfullscreen", "");
3512
+ this.element.bib.style.position = "fixed";
3513
+ this.element.bib.style.top = "0px";
3514
+ this.element.bib.style.left = "0px";
3515
+ this.element.bib.style.width = "";
3516
+ this.element.bib.style.height = "";
3517
+ this.element.style.contain = "";
3565
3518
 
3566
3519
  // reset the size that was mirroring `size` css-part
3567
- const bibContent = element.bib.shadowRoot?.querySelector(".container");
3520
+ const bibContent =
3521
+ this.element.bib.shadowRoot.querySelector(".container");
3568
3522
  if (bibContent) {
3569
3523
  bibContent.style.width = "";
3570
3524
  bibContent.style.height = "";
@@ -3579,14 +3533,14 @@ class AuroFloatingUI {
3579
3533
  }, 0);
3580
3534
  }
3581
3535
 
3582
- if (element.isPopoverVisible) {
3536
+ if (this.element.isPopoverVisible) {
3583
3537
  this.lockScroll(true);
3584
3538
  }
3585
3539
  } else {
3586
- element.bib.style.position = "";
3587
- element.bib.removeAttribute("isfullscreen");
3588
- element.isBibFullscreen = false;
3589
- element.style.contain = "layout";
3540
+ this.element.bib.style.position = "";
3541
+ this.element.bib.removeAttribute("isfullscreen");
3542
+ this.element.isBibFullscreen = false;
3543
+ this.element.style.contain = "layout";
3590
3544
  }
3591
3545
 
3592
3546
  const isChanged = this.strategy && this.strategy !== value;
@@ -3604,21 +3558,16 @@ class AuroFloatingUI {
3604
3558
  },
3605
3559
  );
3606
3560
 
3607
- element.dispatchEvent(event);
3561
+ this.element.dispatchEvent(event);
3608
3562
  }
3609
3563
  }
3610
3564
 
3611
3565
  updateState() {
3612
- const element = this.element;
3613
- if (!element) {
3614
- return;
3615
- }
3616
-
3617
- const isVisible = element.isPopoverVisible;
3566
+ const isVisible = this.element.isPopoverVisible;
3618
3567
  if (!isVisible) {
3619
3568
  this.cleanupHideHandlers();
3620
3569
  try {
3621
- element.cleanup?.();
3570
+ this.element.cleanup?.();
3622
3571
  } catch (error) {
3623
3572
  // Do nothing
3624
3573
  }
@@ -3634,30 +3583,28 @@ class AuroFloatingUI {
3634
3583
  * If not, and if the bib isn't in fullscreen mode with focus lost, it hides the bib.
3635
3584
  */
3636
3585
  handleFocusLoss() {
3637
- const element = this.element;
3638
- if (!element?.bib) {
3639
- return;
3640
- }
3641
-
3642
3586
  // if mouse is being pressed, skip and let click event to handle the action
3643
3587
  if (AuroFloatingUI.isMousePressed) {
3644
3588
  return;
3645
3589
  }
3646
3590
 
3647
3591
  if (
3648
- element.noHideOnThisFocusLoss ||
3649
- element.hasAttribute("noHideOnThisFocusLoss")
3592
+ this.element.noHideOnThisFocusLoss ||
3593
+ this.element.hasAttribute("noHideOnThisFocusLoss")
3650
3594
  ) {
3651
3595
  return;
3652
3596
  }
3653
3597
 
3654
3598
  // if focus is still inside of trigger or bib, do not close
3655
- if (element.matches(":focus") || element.matches(":focus-within")) {
3599
+ if (
3600
+ this.element.matches(":focus") ||
3601
+ this.element.matches(":focus-within")
3602
+ ) {
3656
3603
  return;
3657
3604
  }
3658
3605
 
3659
3606
  // if fullscreen bib is in fullscreen mode, do not close
3660
- if (element.bib.hasAttribute("isfullscreen")) {
3607
+ if (this.element.bib.hasAttribute("isfullscreen")) {
3661
3608
  return;
3662
3609
  }
3663
3610
 
@@ -3665,33 +3612,23 @@ class AuroFloatingUI {
3665
3612
  }
3666
3613
 
3667
3614
  setupHideHandlers() {
3668
- const element = this.element;
3669
- if (!element) {
3670
- return;
3671
- }
3672
-
3673
3615
  // Define handlers & store references
3674
3616
  this.focusHandler = () => this.handleFocusLoss();
3675
3617
 
3676
3618
  this.clickHandler = (evt) => {
3677
- const element = this.element;
3678
- if (!element?.bib) {
3679
- return;
3680
- }
3681
-
3682
3619
  // When the bib is fullscreen (modal dialog), don't close on outside
3683
3620
  // clicks. VoiceOver's synthetic click events inside a top-layer modal
3684
3621
  // <dialog> may not include the bib in composedPath(), causing false
3685
3622
  // positives. This mirrors the fullscreen guard in handleFocusLoss().
3686
- if (element.bib.hasAttribute("isfullscreen")) {
3623
+ if (this.element.bib && this.element.bib.hasAttribute("isfullscreen")) {
3687
3624
  return;
3688
3625
  }
3689
3626
 
3690
3627
  if (
3691
- (!evt.composedPath().includes(element.trigger) &&
3692
- !evt.composedPath().includes(element.bib)) ||
3693
- (element.bib.backdrop &&
3694
- evt.composedPath().includes(element.bib.backdrop))
3628
+ (!evt.composedPath().includes(this.element.trigger) &&
3629
+ !evt.composedPath().includes(this.element.bib)) ||
3630
+ (this.element.bib.backdrop &&
3631
+ evt.composedPath().includes(this.element.bib.backdrop))
3695
3632
  ) {
3696
3633
  const existedVisibleFloatingUI =
3697
3634
  document.expandedAuroFormkitDropdown || document.expandedAuroFloater;
@@ -3712,12 +3649,7 @@ class AuroFloatingUI {
3712
3649
 
3713
3650
  // ESC key handler
3714
3651
  this.keyDownHandler = (evt) => {
3715
- const element = this.element;
3716
- if (!element) {
3717
- return;
3718
- }
3719
-
3720
- if (evt.key === "Escape" && element.isPopoverVisible) {
3652
+ if (evt.key === "Escape" && this.element.isPopoverVisible) {
3721
3653
  const existedVisibleFloatingUI =
3722
3654
  document.expandedAuroFormkitDropdown || document.expandedAuroFloater;
3723
3655
  if (
@@ -3774,10 +3706,6 @@ class AuroFloatingUI {
3774
3706
  }
3775
3707
 
3776
3708
  updateCurrentExpandedDropdown() {
3777
- if (!this.element) {
3778
- return;
3779
- }
3780
-
3781
3709
  // Close any other dropdown that is already open
3782
3710
  const existedVisibleFloatingUI =
3783
3711
  document.expandedAuroFormkitDropdown || document.expandedAuroFloater;
@@ -3794,34 +3722,25 @@ class AuroFloatingUI {
3794
3722
  }
3795
3723
 
3796
3724
  showBib() {
3797
- const element = this.element;
3798
- if (!element) {
3799
- return;
3800
- }
3801
-
3802
- if (!element.bib || (!element.trigger && !element.parentNode)) {
3803
- return;
3804
- }
3805
-
3806
- if (!element.disabled && !this.showing) {
3725
+ if (!this.element.disabled && !this.showing) {
3807
3726
  this.updateCurrentExpandedDropdown();
3808
- element.triggerChevron?.setAttribute("data-expanded", true);
3727
+ this.element.triggerChevron?.setAttribute("data-expanded", true);
3809
3728
 
3810
3729
  // prevent double showing: isPopovervisible gets first and showBib gets called later
3811
3730
  if (!this.showing) {
3812
- if (!element.modal) {
3731
+ if (!this.element.modal) {
3813
3732
  this.setupHideHandlers();
3814
3733
  }
3815
3734
  this.showing = true;
3816
- element.isPopoverVisible = true;
3735
+ this.element.isPopoverVisible = true;
3817
3736
  this.position();
3818
3737
  this.dispatchEventDropdownToggle();
3819
3738
  }
3820
3739
 
3821
3740
  // Setup auto update to handle resize and scroll
3822
- element.cleanup = autoUpdate(
3823
- element.trigger || element.parentNode,
3824
- element.bib,
3741
+ this.element.cleanup = autoUpdate(
3742
+ this.element.trigger || this.element.parentNode,
3743
+ this.element.bib,
3825
3744
  () => {
3826
3745
  this.position();
3827
3746
  },
@@ -3834,27 +3753,22 @@ class AuroFloatingUI {
3834
3753
  * @param {String} eventType - The event type that triggered the hiding action.
3835
3754
  */
3836
3755
  hideBib(eventType = "unknown") {
3837
- const element = this.element;
3838
- if (!element) {
3839
- return;
3840
- }
3841
-
3842
- if (element.disabled) {
3756
+ if (this.element.disabled) {
3843
3757
  return;
3844
3758
  }
3845
3759
 
3846
3760
  // noToggle dropdowns should not close when the trigger is clicked (the
3847
3761
  // "toggle" behavior), but they CAN still close via other interactions like
3848
3762
  // Escape key or focus loss.
3849
- if (element.noToggle && eventType === "click") {
3763
+ if (this.element.noToggle && eventType === "click") {
3850
3764
  return;
3851
3765
  }
3852
3766
 
3853
3767
  this.lockScroll(false);
3854
- element.triggerChevron?.removeAttribute("data-expanded");
3768
+ this.element.triggerChevron?.removeAttribute("data-expanded");
3855
3769
 
3856
- if (element.isPopoverVisible) {
3857
- element.isPopoverVisible = false;
3770
+ if (this.element.isPopoverVisible) {
3771
+ this.element.isPopoverVisible = false;
3858
3772
  }
3859
3773
  if (this.showing) {
3860
3774
  this.cleanupHideHandlers();
@@ -3874,11 +3788,6 @@ class AuroFloatingUI {
3874
3788
  * @param {String} eventType - The event type that triggered the toggle action.
3875
3789
  */
3876
3790
  dispatchEventDropdownToggle(eventType) {
3877
- const element = this.element;
3878
- if (!element) {
3879
- return;
3880
- }
3881
-
3882
3791
  const event = new CustomEvent(
3883
3792
  this.eventPrefix ? `${this.eventPrefix}-toggled` : "toggled",
3884
3793
  {
@@ -3890,16 +3799,11 @@ class AuroFloatingUI {
3890
3799
  },
3891
3800
  );
3892
3801
 
3893
- element.dispatchEvent(event);
3802
+ this.element.dispatchEvent(event);
3894
3803
  }
3895
3804
 
3896
3805
  handleClick() {
3897
- const element = this.element;
3898
- if (!element) {
3899
- return;
3900
- }
3901
-
3902
- if (element.isPopoverVisible) {
3806
+ if (this.element.isPopoverVisible) {
3903
3807
  this.hideBib("click");
3904
3808
  } else {
3905
3809
  this.showBib();
@@ -3910,66 +3814,63 @@ class AuroFloatingUI {
3910
3814
  {
3911
3815
  composed: true,
3912
3816
  detail: {
3913
- expanded: element.isPopoverVisible,
3817
+ expanded: this.element.isPopoverVisible,
3914
3818
  },
3915
3819
  },
3916
3820
  );
3917
3821
 
3918
- element.dispatchEvent(event);
3822
+ this.element.dispatchEvent(event);
3919
3823
  }
3920
3824
 
3921
3825
  handleEvent(event) {
3922
- const element = this.element;
3923
- if (!element || element.disableEventShow) {
3924
- return;
3925
- }
3926
-
3927
- switch (event.type) {
3928
- case "keydown": {
3929
- // Support both Enter and Space keys for accessibility
3930
- // Space is included as it's expected behavior for interactive elements
3931
-
3932
- const origin = event.composedPath()[0];
3933
- if (
3934
- event.key === "Enter" ||
3935
- (event.key === " " && (!origin || origin.tagName !== "INPUT"))
3936
- ) {
3937
- event.preventDefault();
3938
- this.handleClick();
3826
+ if (!this.element.disableEventShow) {
3827
+ switch (event.type) {
3828
+ case "keydown": {
3829
+ // Support both Enter and Space keys for accessibility
3830
+ // Space is included as it's expected behavior for interactive elements
3831
+
3832
+ const origin = event.composedPath()[0];
3833
+ if (
3834
+ event.key === "Enter" ||
3835
+ (event.key === " " && (!origin || origin.tagName !== "INPUT"))
3836
+ ) {
3837
+ event.preventDefault();
3838
+ this.handleClick();
3839
+ }
3840
+ break;
3939
3841
  }
3940
- break;
3842
+ case "mouseenter":
3843
+ if (this.element.hoverToggle) {
3844
+ this.showBib();
3845
+ }
3846
+ break;
3847
+ case "mouseleave":
3848
+ if (this.element.hoverToggle) {
3849
+ this.hideBib("mouseleave");
3850
+ }
3851
+ break;
3852
+ case "focus":
3853
+ if (this.element.focusShow) {
3854
+ /*
3855
+ This needs to better handle clicking that gives focus -
3856
+ currently it shows and then immediately hides the bib
3857
+ */
3858
+ this.showBib();
3859
+ }
3860
+ break;
3861
+ case "blur":
3862
+ // send this task 100ms later queue to
3863
+ // wait a frame in case focus moves within the floating element/bib
3864
+ setTimeout(() => this.handleFocusLoss(), 0);
3865
+ break;
3866
+ case "click":
3867
+ if (document.activeElement === document.body) {
3868
+ event.currentTarget.focus();
3869
+ }
3870
+ this.handleClick();
3871
+ break;
3872
+ // Do nothing
3941
3873
  }
3942
- case "mouseenter":
3943
- if (element.hoverToggle) {
3944
- this.showBib();
3945
- }
3946
- break;
3947
- case "mouseleave":
3948
- if (element.hoverToggle) {
3949
- this.hideBib("mouseleave");
3950
- }
3951
- break;
3952
- case "focus":
3953
- if (element.focusShow) {
3954
- /*
3955
- This needs to better handle clicking that gives focus -
3956
- currently it shows and then immediately hides the bib
3957
- */
3958
- this.showBib();
3959
- }
3960
- break;
3961
- case "blur":
3962
- // send this task 100ms later queue to
3963
- // wait a frame in case focus moves within the floating element/bib
3964
- setTimeout(() => this.handleFocusLoss(), 0);
3965
- break;
3966
- case "click":
3967
- if (document.activeElement === document.body) {
3968
- event.currentTarget.focus();
3969
- }
3970
- this.handleClick();
3971
- break;
3972
- // Do nothing
3973
3874
  }
3974
3875
  }
3975
3876
 
@@ -3980,11 +3881,6 @@ class AuroFloatingUI {
3980
3881
  * This prevents the component itself from being focusable when the trigger element already handles focus.
3981
3882
  */
3982
3883
  handleTriggerTabIndex() {
3983
- const element = this.element;
3984
- if (!element) {
3985
- return;
3986
- }
3987
-
3988
3884
  const focusableElementSelectors = [
3989
3885
  "a",
3990
3886
  "button",
@@ -3997,7 +3893,7 @@ class AuroFloatingUI {
3997
3893
  "auro-hyperlink",
3998
3894
  ];
3999
3895
 
4000
- const triggerNode = element.querySelectorAll('[slot="trigger"]')[0];
3896
+ const triggerNode = this.element.querySelectorAll('[slot="trigger"]')[0];
4001
3897
  if (!triggerNode) {
4002
3898
  return;
4003
3899
  }
@@ -4006,13 +3902,13 @@ class AuroFloatingUI {
4006
3902
  focusableElementSelectors.forEach((selector) => {
4007
3903
  // Check if the trigger node element is focusable
4008
3904
  if (triggerNodeTagName === selector) {
4009
- element.tabIndex = -1;
3905
+ this.element.tabIndex = -1;
4010
3906
  return;
4011
3907
  }
4012
3908
 
4013
3909
  // Check if any child is focusable
4014
3910
  if (triggerNode.querySelector(selector)) {
4015
- element.tabIndex = -1;
3911
+ this.element.tabIndex = -1;
4016
3912
  }
4017
3913
  });
4018
3914
  }
@@ -4022,18 +3918,13 @@ class AuroFloatingUI {
4022
3918
  * @param {*} eventPrefix
4023
3919
  */
4024
3920
  regenerateBibId() {
4025
- const element = this.element;
4026
- if (!element) {
4027
- return;
4028
- }
4029
-
4030
- this.id = element.getAttribute("id");
3921
+ this.id = this.element.getAttribute("id");
4031
3922
  if (!this.id) {
4032
3923
  this.id = window.crypto.randomUUID();
4033
- element.setAttribute("id", this.id);
3924
+ this.element.setAttribute("id", this.id);
4034
3925
  }
4035
3926
 
4036
- element.bib?.setAttribute("id", `${this.id}-floater-bib`);
3927
+ this.element.bib.setAttribute("id", `${this.id}-floater-bib`);
4037
3928
  }
4038
3929
 
4039
3930
  configure(elem, eventPrefix, enableKeyboardHandling = true) {
@@ -4045,69 +3936,67 @@ class AuroFloatingUI {
4045
3936
  this.element = elem;
4046
3937
  }
4047
3938
 
4048
- const element = this.element;
4049
- if (!element) {
4050
- return;
3939
+ if (this.behavior !== this.element.behavior) {
3940
+ this.behavior = this.element.behavior;
4051
3941
  }
4052
3942
 
4053
- if (this.behavior !== element.behavior) {
4054
- this.behavior = element.behavior;
4055
- }
4056
-
4057
- if (element.trigger) {
3943
+ if (this.element.trigger) {
4058
3944
  this.disconnect();
4059
3945
  }
4060
- element.trigger =
4061
- element.triggerElement ||
4062
- element.shadowRoot?.querySelector("#trigger") ||
4063
- element.trigger;
4064
- element.bib = element.shadowRoot?.querySelector("#bib") || element.bib;
4065
- element.bibSizer = element.shadowRoot?.querySelector("#bibSizer");
4066
- element.triggerChevron =
4067
- element.shadowRoot?.querySelector("#showStateIcon");
3946
+ this.element.trigger =
3947
+ this.element.triggerElement ||
3948
+ this.element.shadowRoot.querySelector("#trigger") ||
3949
+ this.element.trigger;
3950
+ this.element.bib =
3951
+ this.element.shadowRoot.querySelector("#bib") || this.element.bib;
3952
+ this.element.bibSizer = this.element.shadowRoot.querySelector("#bibSizer");
3953
+ this.element.triggerChevron =
3954
+ this.element.shadowRoot.querySelector("#showStateIcon");
4068
3955
 
4069
- if (element.floaterConfig) {
4070
- element.hoverToggle = element.floaterConfig.hoverToggle;
3956
+ if (this.element.floaterConfig) {
3957
+ this.element.hoverToggle = this.element.floaterConfig.hoverToggle;
4071
3958
  }
4072
3959
 
4073
3960
  this.regenerateBibId();
4074
3961
  this.handleTriggerTabIndex();
4075
3962
 
4076
3963
  this.handleEvent = this.handleEvent.bind(this);
4077
- if (element.trigger) {
3964
+ if (this.element.trigger) {
4078
3965
  if (this.enableKeyboardHandling) {
4079
- element.trigger.addEventListener("keydown", this.handleEvent);
3966
+ this.element.trigger.addEventListener("keydown", this.handleEvent);
4080
3967
  }
4081
- element.trigger.addEventListener("click", this.handleEvent);
4082
- element.trigger.addEventListener("mouseenter", this.handleEvent);
4083
- element.trigger.addEventListener("mouseleave", this.handleEvent);
4084
- element.trigger.addEventListener("focus", this.handleEvent);
4085
- element.trigger.addEventListener("blur", this.handleEvent);
3968
+ this.element.trigger.addEventListener("click", this.handleEvent);
3969
+ this.element.trigger.addEventListener("mouseenter", this.handleEvent);
3970
+ this.element.trigger.addEventListener("mouseleave", this.handleEvent);
3971
+ this.element.trigger.addEventListener("focus", this.handleEvent);
3972
+ this.element.trigger.addEventListener("blur", this.handleEvent);
4086
3973
  }
4087
3974
  }
4088
3975
 
4089
3976
  disconnect() {
4090
3977
  this.cleanupHideHandlers();
3978
+ if (this.element) {
3979
+ this.element.cleanup?.();
4091
3980
 
4092
- const element = this.element;
4093
- if (!element) {
4094
- return;
4095
- }
4096
-
4097
- element.cleanup?.();
4098
-
4099
- if (element.bib && element.shadowRoot) {
4100
- element.shadowRoot.append(element.bib);
4101
- }
3981
+ if (this.element.bib) {
3982
+ this.element.shadowRoot.append(this.element.bib);
3983
+ }
4102
3984
 
4103
- // Remove event & keyboard listeners
4104
- if (element.trigger) {
4105
- element.trigger.removeEventListener("keydown", this.handleEvent);
4106
- element.trigger.removeEventListener("click", this.handleEvent);
4107
- element.trigger.removeEventListener("mouseenter", this.handleEvent);
4108
- element.trigger.removeEventListener("mouseleave", this.handleEvent);
4109
- element.trigger.removeEventListener("focus", this.handleEvent);
4110
- element.trigger.removeEventListener("blur", this.handleEvent);
3985
+ // Remove event & keyboard listeners
3986
+ if (this.element?.trigger) {
3987
+ this.element.trigger.removeEventListener("keydown", this.handleEvent);
3988
+ this.element.trigger.removeEventListener("click", this.handleEvent);
3989
+ this.element.trigger.removeEventListener(
3990
+ "mouseenter",
3991
+ this.handleEvent,
3992
+ );
3993
+ this.element.trigger.removeEventListener(
3994
+ "mouseleave",
3995
+ this.handleEvent,
3996
+ );
3997
+ this.element.trigger.removeEventListener("focus", this.handleEvent);
3998
+ this.element.trigger.removeEventListener("blur", this.handleEvent);
3999
+ }
4111
4000
  }
4112
4001
  }
4113
4002
  }
@@ -5235,7 +5124,7 @@ let AuroHelpText$1 = class AuroHelpText extends i$3 {
5235
5124
  }
5236
5125
  };
5237
5126
 
5238
- var formkitVersion$1 = '202604071818';
5127
+ var formkitVersion$1 = '202604072118';
5239
5128
 
5240
5129
  class AuroElement extends i$3 {
5241
5130
  static get properties() {
@@ -6988,7 +6877,7 @@ class AuroHelpText extends i$3 {
6988
6877
  }
6989
6878
  }
6990
6879
 
6991
- var formkitVersion = '202604071818';
6880
+ var formkitVersion = '202604072118';
6992
6881
 
6993
6882
  var styleCss$2 = i$6`.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}.body-default{font-size:var(--wcss-body-default-font-size, 1rem);line-height:var(--wcss-body-default-line-height, 1.5rem)}.body-default,.body-lg{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-lg{font-size:var(--wcss-body-lg-font-size, 1.125rem);line-height:var(--wcss-body-lg-line-height, 1.625rem)}.body-sm{font-size:var(--wcss-body-sm-font-size, 0.875rem);line-height:var(--wcss-body-sm-line-height, 1.25rem)}.body-sm,.body-xs{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-xs{font-size:var(--wcss-body-xs-font-size, 0.75rem);line-height:var(--wcss-body-xs-line-height, 1rem)}.body-2xs{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-size:var(--wcss-body-2xs-font-size, 0.625rem);font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0);line-height:var(--wcss-body-2xs-line-height, 0.875rem)}.display-2xl{font-family:var(--wcss-display-2xl-family, "AS Circular"),var(--wcss-display-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-2xl-font-size, clamp(3.5rem, 6vw, 5.375rem));font-weight:var(--wcss-display-2xl-weight, 300);letter-spacing:var(--wcss-display-2xl-letter-spacing, 0);line-height:var(--wcss-display-2xl-line-height, 1.3)}.display-xl{font-family:var(--wcss-display-xl-family, "AS Circular"),var(--wcss-display-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xl-font-size, clamp(3rem, 5.3333333333vw, 4.5rem));font-weight:var(--wcss-display-xl-weight, 300);letter-spacing:var(--wcss-display-xl-letter-spacing, 0);line-height:var(--wcss-display-xl-line-height, 1.3)}.display-lg{font-family:var(--wcss-display-lg-family, "AS Circular"),var(--wcss-display-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-lg-font-size, clamp(2.75rem, 4.6666666667vw, 4rem));font-weight:var(--wcss-display-lg-weight, 300);letter-spacing:var(--wcss-display-lg-letter-spacing, 0);line-height:var(--wcss-display-lg-line-height, 1.3)}.display-md{font-family:var(--wcss-display-md-family, "AS Circular"),var(--wcss-display-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-md-font-size, clamp(2.5rem, 4vw, 3.5rem));font-weight:var(--wcss-display-md-weight, 300);letter-spacing:var(--wcss-display-md-letter-spacing, 0);line-height:var(--wcss-display-md-line-height, 1.3)}.display-sm{font-family:var(--wcss-display-sm-family, "AS Circular"),var(--wcss-display-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-sm-font-size, clamp(2rem, 3.6666666667vw, 3rem));font-weight:var(--wcss-display-sm-weight, 300);letter-spacing:var(--wcss-display-sm-letter-spacing, 0);line-height:var(--wcss-display-sm-line-height, 1.3)}.display-xs{font-family:var(--wcss-display-xs-family, "AS Circular"),var(--wcss-display-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xs-font-size, clamp(1.75rem, 3vw, 2.375rem));font-weight:var(--wcss-display-xs-weight, 300);letter-spacing:var(--wcss-display-xs-letter-spacing, 0);line-height:var(--wcss-display-xs-line-height, 1.3)}.heading-xl{font-family:var(--wcss-heading-xl-family, "AS Circular"),var(--wcss-heading-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xl-font-size, clamp(2rem, 3vw, 2.5rem));font-weight:var(--wcss-heading-xl-weight, 300);letter-spacing:var(--wcss-heading-xl-letter-spacing, 0);line-height:var(--wcss-heading-xl-line-height, 1.3)}.heading-lg{font-family:var(--wcss-heading-lg-family, "AS Circular"),var(--wcss-heading-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-lg-font-size, clamp(1.75rem, 2.6666666667vw, 2.25rem));font-weight:var(--wcss-heading-lg-weight, 300);letter-spacing:var(--wcss-heading-lg-letter-spacing, 0);line-height:var(--wcss-heading-lg-line-height, 1.3)}.heading-md{font-family:var(--wcss-heading-md-family, "AS Circular"),var(--wcss-heading-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-md-font-size, clamp(1.625rem, 2.3333333333vw, 1.75rem));font-weight:var(--wcss-heading-md-weight, 300);letter-spacing:var(--wcss-heading-md-letter-spacing, 0);line-height:var(--wcss-heading-md-line-height, 1.3)}.heading-sm{font-family:var(--wcss-heading-sm-family, "AS Circular"),var(--wcss-heading-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-sm-font-size, clamp(1.375rem, 2vw, 1.5rem));font-weight:var(--wcss-heading-sm-weight, 300);letter-spacing:var(--wcss-heading-sm-letter-spacing, 0);line-height:var(--wcss-heading-sm-line-height, 1.3)}.heading-xs{font-family:var(--wcss-heading-xs-family, "AS Circular"),var(--wcss-heading-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xs-font-size, clamp(1.25rem, 1.6666666667vw, 1.25rem));font-weight:var(--wcss-heading-xs-weight, 450);letter-spacing:var(--wcss-heading-xs-letter-spacing, 0);line-height:var(--wcss-heading-xs-line-height, 1.3)}.heading-2xs{font-family:var(--wcss-heading-2xs-family, "AS Circular"),var(--wcss-heading-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-2xs-font-size, clamp(1.125rem, 1.5vw, 1.125rem));font-weight:var(--wcss-heading-2xs-weight, 450);letter-spacing:var(--wcss-heading-2xs-letter-spacing, 0);line-height:var(--wcss-heading-2xs-line-height, 1.3)}.accent-2xl{font-family:var(--wcss-accent-2xl-family, "Good OT"),var(--wcss-accent-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xl-font-size, clamp(2rem, 3.1666666667vw, 2.375rem));font-weight:var(--wcss-accent-2xl-weight, 450);letter-spacing:var(--wcss-accent-2xl-letter-spacing, 0.05em);line-height:var(--wcss-accent-2xl-line-height, 1)}.accent-2xl,.accent-xl{text-transform:uppercase}.accent-xl{font-family:var(--wcss-accent-xl-family, "Good OT"),var(--wcss-accent-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xl-font-size, clamp(1.625rem, 2.3333333333vw, 2rem));font-weight:var(--wcss-accent-xl-weight, 450);letter-spacing:var(--wcss-accent-xl-letter-spacing, 0.05em);line-height:var(--wcss-accent-xl-line-height, 1.3)}.accent-lg{font-family:var(--wcss-accent-lg-family, "Good OT"),var(--wcss-accent-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-lg-font-size, clamp(1.5rem, 2.1666666667vw, 1.75rem));font-weight:var(--wcss-accent-lg-weight, 450);letter-spacing:var(--wcss-accent-lg-letter-spacing, 0.05em);line-height:var(--wcss-accent-lg-line-height, 1.3)}.accent-lg,.accent-md{text-transform:uppercase}.accent-md{font-family:var(--wcss-accent-md-family, "Good OT"),var(--wcss-accent-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-md-font-size, clamp(1.375rem, 1.8333333333vw, 1.5rem));font-weight:var(--wcss-accent-md-weight, 500);letter-spacing:var(--wcss-accent-md-letter-spacing, 0.05em);line-height:var(--wcss-accent-md-line-height, 1.3)}.accent-sm{font-family:var(--wcss-accent-sm-family, "Good OT"),var(--wcss-accent-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-sm-font-size, clamp(1.125rem, 1.5vw, 1.25rem));font-weight:var(--wcss-accent-sm-weight, 500);letter-spacing:var(--wcss-accent-sm-letter-spacing, 0.05em);line-height:var(--wcss-accent-sm-line-height, 1.3)}.accent-sm,.accent-xs{text-transform:uppercase}.accent-xs{font-family:var(--wcss-accent-xs-family, "Good OT"),var(--wcss-accent-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xs-font-size, clamp(1rem, 1.3333333333vw, 1rem));font-weight:var(--wcss-accent-xs-weight, 500);letter-spacing:var(--wcss-accent-xs-letter-spacing, 0.1em);line-height:var(--wcss-accent-xs-line-height, 1.3)}.accent-2xs{font-family:var(--wcss-accent-2xs-family, "Good OT"),var(--wcss-accent-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xs-font-size, clamp(0.875rem, 1.1666666667vw, 0.875rem));font-weight:var(--wcss-accent-2xs-weight, 450);letter-spacing:var(--wcss-accent-2xs-letter-spacing, 0.1em);line-height:var(--wcss-accent-2xs-line-height, 1.3);text-transform:uppercase}[auro-dropdown]{--ds-auro-dropdown-trigger-border-color: var(--ds-auro-select-border-color);--ds-auro-dropdown-trigger-background-color: var(--ds-auro-select-background-color);--ds-auro-dropdown-trigger-container-color: var(--ds-auro-select-background-color);--ds-auro-dropdown-trigger-outline-color: var(--ds-auro-select-outline-color)}:host{display:inline-block;text-align:left;vertical-align:top}:host([layout*=emphasized]) [auro-dropdown],:host([layout*=snowflake]) [auro-dropdown]{--ds-auro-select-border-color: transparent}:host([layout*=emphasized]) .mainContent,:host([layout*=snowflake]) .mainContent{text-align:center}.mainContent{position:relative;display:flex;overflow:hidden;flex:1;flex-direction:column;align-items:center;justify-content:center}.valueContainer [slot=displayValue]{display:none}.accents{display:flex;flex-direction:row;align-items:center;justify-content:center}::slotted([slot=typeIcon]){margin-right:var(--ds-size-100, 0.5rem)}.displayValue{display:block}.displayValue:not(.force){display:none}.displayValue:not(.force).hasContent:is(.withValue):not(.hasFocus){display:block}.triggerContent{display:flex;width:100%;align-items:center;justify-content:center}:host([layout*=emphasized]) .triggerContent{padding:0 var(--ds-size-100, 0.5rem) 0 var(--ds-size-300, 1.5rem)}:host([layout*=snowflake]) .triggerContent{padding:0 var(--ds-size-100, 0.5rem) 0 var(--ds-size-200, 1rem)}:host([layout*=snowflake]) label{padding-block:var(--ds-size-25, 0.125rem)}:host([layout*=classic]) .triggerContent{padding:0 var(--ds-size-100, 0.5rem)}:host([layout*=classic]) .mainContent{align-items:start}:host([layout*=classic]) label{overflow:hidden;cursor:text;text-overflow:ellipsis;white-space:nowrap}:host([layout*=classic]) .value{height:auto}label{color:var(--ds-auro-select-label-text-color)}:host(:is([validity]:not([validity=valid]))) [auro-dropdown]{--ds-auro-select-border-color: var(--ds-basic-color-status-error, #e31f26);--ds-auro-select-outline-color: var(--ds-basic-color-status-error, #e31f26);--ds-auro-dropdown-helptext-text-color: var(--ds-basic-color-texticon-default, #2a2a2a)}:host([ondark]:is([validity]:not([validity=valid]))) [auro-dropdown],:host([appearance=inverse]:is([validity]:not([validity=valid]))) [auro-dropdown]{--ds-auro-select-border-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8);--ds-auro-select-outline-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8);--ds-auro-dropdown-helptext-text-color: var(--ds-basic-color-texticon-inverse, #ffffff)}#slotHolder{display:none}:host([fluid]){width:100%}:host([disabled]){pointer-events:none;user-select:none}:host([disabled]:not([ondark])) [auro-dropdown],:host([disabled]:not([appearance=inverse])) [auro-dropdown]{--ds-auro-select-border-color: var(--ds-basic-color-border-subtle, #dddddd)}:host(:not([layout*=classic])[disabled][ondark]) [auro-dropdown],:host(:not([layout*=classic])[disabled][appearance=inverse]) [auro-dropdown]{--ds-auro-select-border-color: transparent}`;
6994
6883