@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
@@ -3295,19 +3295,11 @@ class AuroFloatingUI {
3295
3295
  * This ensures that the bib content has the same dimensions as the sizer element.
3296
3296
  */
3297
3297
  mirrorSize() {
3298
- const element = this.element;
3299
- if (!element) {
3300
- return;
3301
- }
3302
-
3303
3298
  // mirror the boxsize from bibSizer
3304
- if (element.bibSizer && element.matchWidth && element.bib?.shadowRoot) {
3305
- const sizerStyle = window.getComputedStyle(element.bibSizer);
3306
- const bibContent = element.bib.shadowRoot.querySelector(".container");
3307
- if (!bibContent) {
3308
- return;
3309
- }
3310
-
3299
+ if (this.element.bibSizer && this.element.matchWidth) {
3300
+ const sizerStyle = window.getComputedStyle(this.element.bibSizer);
3301
+ const bibContent =
3302
+ this.element.bib.shadowRoot.querySelector(".container");
3311
3303
  if (sizerStyle.width !== "0px") {
3312
3304
  bibContent.style.width = sizerStyle.width;
3313
3305
  }
@@ -3329,14 +3321,9 @@ class AuroFloatingUI {
3329
3321
  * @returns {String} The positioning strategy, one of 'fullscreen', 'floating', 'cover'.
3330
3322
  */
3331
3323
  getPositioningStrategy() {
3332
- const element = this.element;
3333
- if (!element) {
3334
- return "floating";
3335
- }
3336
-
3337
3324
  const breakpoint =
3338
- element.bib?.mobileFullscreenBreakpoint ||
3339
- element.floaterConfig?.fullscreenBreakpoint;
3325
+ this.element.bib.mobileFullscreenBreakpoint ||
3326
+ this.element.floaterConfig?.fullscreenBreakpoint;
3340
3327
  switch (this.behavior) {
3341
3328
  case "tooltip":
3342
3329
  return "floating";
@@ -3347,9 +3334,9 @@ class AuroFloatingUI {
3347
3334
  `(max-width: ${breakpoint})`,
3348
3335
  ).matches;
3349
3336
 
3350
- element.expanded = smallerThanBreakpoint;
3337
+ this.element.expanded = smallerThanBreakpoint;
3351
3338
  }
3352
- if (element.nested) {
3339
+ if (this.element.nested) {
3353
3340
  return "cover";
3354
3341
  }
3355
3342
  return "fullscreen";
@@ -3379,65 +3366,42 @@ class AuroFloatingUI {
3379
3366
  * and applies the calculated position to the bib's style.
3380
3367
  */
3381
3368
  position() {
3382
- const element = this.element;
3383
- if (!element) {
3384
- return;
3385
- }
3386
-
3387
3369
  const strategy = this.getPositioningStrategy();
3388
3370
  this.configureBibStrategy(strategy);
3389
3371
 
3390
3372
  if (strategy === "floating") {
3391
- if (!element.trigger || !element.bib) {
3392
- return;
3393
- }
3394
-
3395
3373
  this.mirrorSize();
3396
3374
  // Define the middlware for the floater configuration
3397
3375
  const middleware = [
3398
- offset(element.floaterConfig?.offset || 0),
3399
- ...(element.floaterConfig?.shift ? [shift()] : []), // Add shift middleware if shift is enabled.
3400
- ...(element.floaterConfig?.flip ? [flip()] : []), // Add flip middleware if flip is enabled.
3401
- ...(element.floaterConfig?.autoPlacement ? [autoPlacement()] : []), // Add autoPlacement middleware if autoPlacement is enabled.
3376
+ offset(this.element.floaterConfig?.offset || 0),
3377
+ ...(this.element.floaterConfig?.shift ? [shift()] : []), // Add shift middleware if shift is enabled.
3378
+ ...(this.element.floaterConfig?.flip ? [flip()] : []), // Add flip middleware if flip is enabled.
3379
+ ...(this.element.floaterConfig?.autoPlacement ? [autoPlacement()] : []), // Add autoPlacement middleware if autoPlacement is enabled.
3402
3380
  ];
3403
3381
 
3404
3382
  // Compute the position of the bib
3405
- computePosition(element.trigger, element.bib, {
3406
- strategy: element.floaterConfig?.strategy || "fixed",
3407
- placement: element.floaterConfig?.placement,
3383
+ computePosition(this.element.trigger, this.element.bib, {
3384
+ strategy: this.element.floaterConfig?.strategy || "fixed",
3385
+ placement: this.element.floaterConfig?.placement,
3408
3386
  middleware: middleware || [],
3409
3387
  }).then(({ x, y }) => {
3410
3388
  // eslint-disable-line id-length
3411
- const currentElement = this.element;
3412
- if (!currentElement?.bib) {
3413
- return;
3414
- }
3415
-
3416
- Object.assign(currentElement.bib.style, {
3389
+ Object.assign(this.element.bib.style, {
3417
3390
  left: `${x}px`,
3418
3391
  top: `${y}px`,
3419
3392
  });
3420
3393
  });
3421
3394
  } else if (strategy === "cover") {
3422
- if (!element.parentNode || !element.bib) {
3423
- return;
3424
- }
3425
-
3426
3395
  // Compute the position of the bib
3427
- computePosition(element.parentNode, element.bib, {
3396
+ computePosition(this.element.parentNode, this.element.bib, {
3428
3397
  placement: "bottom-start",
3429
3398
  }).then(({ x, y }) => {
3430
3399
  // eslint-disable-line id-length
3431
- const currentElement = this.element;
3432
- if (!currentElement?.bib || !currentElement.parentNode) {
3433
- return;
3434
- }
3435
-
3436
- Object.assign(currentElement.bib.style, {
3400
+ Object.assign(this.element.bib.style, {
3437
3401
  left: `${x}px`,
3438
- top: `${y - currentElement.parentNode.offsetHeight}px`,
3439
- width: `${currentElement.parentNode.offsetWidth}px`,
3440
- height: `${currentElement.parentNode.offsetHeight}px`,
3402
+ top: `${y - this.element.parentNode.offsetHeight}px`,
3403
+ width: `${this.element.parentNode.offsetWidth}px`,
3404
+ height: `${this.element.parentNode.offsetHeight}px`,
3441
3405
  });
3442
3406
  });
3443
3407
  }
@@ -3449,17 +3413,11 @@ class AuroFloatingUI {
3449
3413
  * @param {Boolean} lock - If true, locks the body's scrolling functionlity; otherwise, unlock.
3450
3414
  */
3451
3415
  lockScroll(lock = true) {
3452
- const element = this.element;
3453
-
3454
3416
  if (lock) {
3455
- if (!element?.bib) {
3456
- return;
3457
- }
3458
-
3459
3417
  document.body.style.overflow = "hidden"; // hide body's scrollbar
3460
3418
 
3461
3419
  // Move `bib` by the amount the viewport is shifted to stay aligned in fullscreen.
3462
- element.bib.style.transform = `translateY(${window?.visualViewport?.offsetTop}px)`;
3420
+ this.element.bib.style.transform = `translateY(${window?.visualViewport?.offsetTop}px)`;
3463
3421
  } else {
3464
3422
  document.body.style.overflow = "";
3465
3423
  }
@@ -3475,24 +3433,20 @@ class AuroFloatingUI {
3475
3433
  * @param {string} strategy - The positioning strategy ('fullscreen' or 'floating').
3476
3434
  */
3477
3435
  configureBibStrategy(value) {
3478
- const element = this.element;
3479
- if (!element?.bib) {
3480
- return;
3481
- }
3482
-
3483
3436
  if (value === "fullscreen") {
3484
- element.isBibFullscreen = true;
3437
+ this.element.isBibFullscreen = true;
3485
3438
  // reset the prev position
3486
- element.bib.setAttribute("isfullscreen", "");
3487
- element.bib.style.position = "fixed";
3488
- element.bib.style.top = "0px";
3489
- element.bib.style.left = "0px";
3490
- element.bib.style.width = "";
3491
- element.bib.style.height = "";
3492
- element.style.contain = "";
3439
+ this.element.bib.setAttribute("isfullscreen", "");
3440
+ this.element.bib.style.position = "fixed";
3441
+ this.element.bib.style.top = "0px";
3442
+ this.element.bib.style.left = "0px";
3443
+ this.element.bib.style.width = "";
3444
+ this.element.bib.style.height = "";
3445
+ this.element.style.contain = "";
3493
3446
 
3494
3447
  // reset the size that was mirroring `size` css-part
3495
- const bibContent = element.bib.shadowRoot?.querySelector(".container");
3448
+ const bibContent =
3449
+ this.element.bib.shadowRoot.querySelector(".container");
3496
3450
  if (bibContent) {
3497
3451
  bibContent.style.width = "";
3498
3452
  bibContent.style.height = "";
@@ -3507,14 +3461,14 @@ class AuroFloatingUI {
3507
3461
  }, 0);
3508
3462
  }
3509
3463
 
3510
- if (element.isPopoverVisible) {
3464
+ if (this.element.isPopoverVisible) {
3511
3465
  this.lockScroll(true);
3512
3466
  }
3513
3467
  } else {
3514
- element.bib.style.position = "";
3515
- element.bib.removeAttribute("isfullscreen");
3516
- element.isBibFullscreen = false;
3517
- element.style.contain = "layout";
3468
+ this.element.bib.style.position = "";
3469
+ this.element.bib.removeAttribute("isfullscreen");
3470
+ this.element.isBibFullscreen = false;
3471
+ this.element.style.contain = "layout";
3518
3472
  }
3519
3473
 
3520
3474
  const isChanged = this.strategy && this.strategy !== value;
@@ -3532,21 +3486,16 @@ class AuroFloatingUI {
3532
3486
  },
3533
3487
  );
3534
3488
 
3535
- element.dispatchEvent(event);
3489
+ this.element.dispatchEvent(event);
3536
3490
  }
3537
3491
  }
3538
3492
 
3539
3493
  updateState() {
3540
- const element = this.element;
3541
- if (!element) {
3542
- return;
3543
- }
3544
-
3545
- const isVisible = element.isPopoverVisible;
3494
+ const isVisible = this.element.isPopoverVisible;
3546
3495
  if (!isVisible) {
3547
3496
  this.cleanupHideHandlers();
3548
3497
  try {
3549
- element.cleanup?.();
3498
+ this.element.cleanup?.();
3550
3499
  } catch (error) {
3551
3500
  // Do nothing
3552
3501
  }
@@ -3562,30 +3511,28 @@ class AuroFloatingUI {
3562
3511
  * If not, and if the bib isn't in fullscreen mode with focus lost, it hides the bib.
3563
3512
  */
3564
3513
  handleFocusLoss() {
3565
- const element = this.element;
3566
- if (!element?.bib) {
3567
- return;
3568
- }
3569
-
3570
3514
  // if mouse is being pressed, skip and let click event to handle the action
3571
3515
  if (AuroFloatingUI.isMousePressed) {
3572
3516
  return;
3573
3517
  }
3574
3518
 
3575
3519
  if (
3576
- element.noHideOnThisFocusLoss ||
3577
- element.hasAttribute("noHideOnThisFocusLoss")
3520
+ this.element.noHideOnThisFocusLoss ||
3521
+ this.element.hasAttribute("noHideOnThisFocusLoss")
3578
3522
  ) {
3579
3523
  return;
3580
3524
  }
3581
3525
 
3582
3526
  // if focus is still inside of trigger or bib, do not close
3583
- if (element.matches(":focus") || element.matches(":focus-within")) {
3527
+ if (
3528
+ this.element.matches(":focus") ||
3529
+ this.element.matches(":focus-within")
3530
+ ) {
3584
3531
  return;
3585
3532
  }
3586
3533
 
3587
3534
  // if fullscreen bib is in fullscreen mode, do not close
3588
- if (element.bib.hasAttribute("isfullscreen")) {
3535
+ if (this.element.bib.hasAttribute("isfullscreen")) {
3589
3536
  return;
3590
3537
  }
3591
3538
 
@@ -3593,33 +3540,23 @@ class AuroFloatingUI {
3593
3540
  }
3594
3541
 
3595
3542
  setupHideHandlers() {
3596
- const element = this.element;
3597
- if (!element) {
3598
- return;
3599
- }
3600
-
3601
3543
  // Define handlers & store references
3602
3544
  this.focusHandler = () => this.handleFocusLoss();
3603
3545
 
3604
3546
  this.clickHandler = (evt) => {
3605
- const element = this.element;
3606
- if (!element?.bib) {
3607
- return;
3608
- }
3609
-
3610
3547
  // When the bib is fullscreen (modal dialog), don't close on outside
3611
3548
  // clicks. VoiceOver's synthetic click events inside a top-layer modal
3612
3549
  // <dialog> may not include the bib in composedPath(), causing false
3613
3550
  // positives. This mirrors the fullscreen guard in handleFocusLoss().
3614
- if (element.bib.hasAttribute("isfullscreen")) {
3551
+ if (this.element.bib && this.element.bib.hasAttribute("isfullscreen")) {
3615
3552
  return;
3616
3553
  }
3617
3554
 
3618
3555
  if (
3619
- (!evt.composedPath().includes(element.trigger) &&
3620
- !evt.composedPath().includes(element.bib)) ||
3621
- (element.bib.backdrop &&
3622
- evt.composedPath().includes(element.bib.backdrop))
3556
+ (!evt.composedPath().includes(this.element.trigger) &&
3557
+ !evt.composedPath().includes(this.element.bib)) ||
3558
+ (this.element.bib.backdrop &&
3559
+ evt.composedPath().includes(this.element.bib.backdrop))
3623
3560
  ) {
3624
3561
  const existedVisibleFloatingUI =
3625
3562
  document.expandedAuroFormkitDropdown || document.expandedAuroFloater;
@@ -3640,12 +3577,7 @@ class AuroFloatingUI {
3640
3577
 
3641
3578
  // ESC key handler
3642
3579
  this.keyDownHandler = (evt) => {
3643
- const element = this.element;
3644
- if (!element) {
3645
- return;
3646
- }
3647
-
3648
- if (evt.key === "Escape" && element.isPopoverVisible) {
3580
+ if (evt.key === "Escape" && this.element.isPopoverVisible) {
3649
3581
  const existedVisibleFloatingUI =
3650
3582
  document.expandedAuroFormkitDropdown || document.expandedAuroFloater;
3651
3583
  if (
@@ -3702,10 +3634,6 @@ class AuroFloatingUI {
3702
3634
  }
3703
3635
 
3704
3636
  updateCurrentExpandedDropdown() {
3705
- if (!this.element) {
3706
- return;
3707
- }
3708
-
3709
3637
  // Close any other dropdown that is already open
3710
3638
  const existedVisibleFloatingUI =
3711
3639
  document.expandedAuroFormkitDropdown || document.expandedAuroFloater;
@@ -3722,34 +3650,25 @@ class AuroFloatingUI {
3722
3650
  }
3723
3651
 
3724
3652
  showBib() {
3725
- const element = this.element;
3726
- if (!element) {
3727
- return;
3728
- }
3729
-
3730
- if (!element.bib || (!element.trigger && !element.parentNode)) {
3731
- return;
3732
- }
3733
-
3734
- if (!element.disabled && !this.showing) {
3653
+ if (!this.element.disabled && !this.showing) {
3735
3654
  this.updateCurrentExpandedDropdown();
3736
- element.triggerChevron?.setAttribute("data-expanded", true);
3655
+ this.element.triggerChevron?.setAttribute("data-expanded", true);
3737
3656
 
3738
3657
  // prevent double showing: isPopovervisible gets first and showBib gets called later
3739
3658
  if (!this.showing) {
3740
- if (!element.modal) {
3659
+ if (!this.element.modal) {
3741
3660
  this.setupHideHandlers();
3742
3661
  }
3743
3662
  this.showing = true;
3744
- element.isPopoverVisible = true;
3663
+ this.element.isPopoverVisible = true;
3745
3664
  this.position();
3746
3665
  this.dispatchEventDropdownToggle();
3747
3666
  }
3748
3667
 
3749
3668
  // Setup auto update to handle resize and scroll
3750
- element.cleanup = autoUpdate(
3751
- element.trigger || element.parentNode,
3752
- element.bib,
3669
+ this.element.cleanup = autoUpdate(
3670
+ this.element.trigger || this.element.parentNode,
3671
+ this.element.bib,
3753
3672
  () => {
3754
3673
  this.position();
3755
3674
  },
@@ -3762,27 +3681,22 @@ class AuroFloatingUI {
3762
3681
  * @param {String} eventType - The event type that triggered the hiding action.
3763
3682
  */
3764
3683
  hideBib(eventType = "unknown") {
3765
- const element = this.element;
3766
- if (!element) {
3767
- return;
3768
- }
3769
-
3770
- if (element.disabled) {
3684
+ if (this.element.disabled) {
3771
3685
  return;
3772
3686
  }
3773
3687
 
3774
3688
  // noToggle dropdowns should not close when the trigger is clicked (the
3775
3689
  // "toggle" behavior), but they CAN still close via other interactions like
3776
3690
  // Escape key or focus loss.
3777
- if (element.noToggle && eventType === "click") {
3691
+ if (this.element.noToggle && eventType === "click") {
3778
3692
  return;
3779
3693
  }
3780
3694
 
3781
3695
  this.lockScroll(false);
3782
- element.triggerChevron?.removeAttribute("data-expanded");
3696
+ this.element.triggerChevron?.removeAttribute("data-expanded");
3783
3697
 
3784
- if (element.isPopoverVisible) {
3785
- element.isPopoverVisible = false;
3698
+ if (this.element.isPopoverVisible) {
3699
+ this.element.isPopoverVisible = false;
3786
3700
  }
3787
3701
  if (this.showing) {
3788
3702
  this.cleanupHideHandlers();
@@ -3802,11 +3716,6 @@ class AuroFloatingUI {
3802
3716
  * @param {String} eventType - The event type that triggered the toggle action.
3803
3717
  */
3804
3718
  dispatchEventDropdownToggle(eventType) {
3805
- const element = this.element;
3806
- if (!element) {
3807
- return;
3808
- }
3809
-
3810
3719
  const event = new CustomEvent(
3811
3720
  this.eventPrefix ? `${this.eventPrefix}-toggled` : "toggled",
3812
3721
  {
@@ -3818,16 +3727,11 @@ class AuroFloatingUI {
3818
3727
  },
3819
3728
  );
3820
3729
 
3821
- element.dispatchEvent(event);
3730
+ this.element.dispatchEvent(event);
3822
3731
  }
3823
3732
 
3824
3733
  handleClick() {
3825
- const element = this.element;
3826
- if (!element) {
3827
- return;
3828
- }
3829
-
3830
- if (element.isPopoverVisible) {
3734
+ if (this.element.isPopoverVisible) {
3831
3735
  this.hideBib("click");
3832
3736
  } else {
3833
3737
  this.showBib();
@@ -3838,66 +3742,63 @@ class AuroFloatingUI {
3838
3742
  {
3839
3743
  composed: true,
3840
3744
  detail: {
3841
- expanded: element.isPopoverVisible,
3745
+ expanded: this.element.isPopoverVisible,
3842
3746
  },
3843
3747
  },
3844
3748
  );
3845
3749
 
3846
- element.dispatchEvent(event);
3750
+ this.element.dispatchEvent(event);
3847
3751
  }
3848
3752
 
3849
3753
  handleEvent(event) {
3850
- const element = this.element;
3851
- if (!element || element.disableEventShow) {
3852
- return;
3853
- }
3854
-
3855
- switch (event.type) {
3856
- case "keydown": {
3857
- // Support both Enter and Space keys for accessibility
3858
- // Space is included as it's expected behavior for interactive elements
3859
-
3860
- const origin = event.composedPath()[0];
3861
- if (
3862
- event.key === "Enter" ||
3863
- (event.key === " " && (!origin || origin.tagName !== "INPUT"))
3864
- ) {
3865
- event.preventDefault();
3866
- this.handleClick();
3754
+ if (!this.element.disableEventShow) {
3755
+ switch (event.type) {
3756
+ case "keydown": {
3757
+ // Support both Enter and Space keys for accessibility
3758
+ // Space is included as it's expected behavior for interactive elements
3759
+
3760
+ const origin = event.composedPath()[0];
3761
+ if (
3762
+ event.key === "Enter" ||
3763
+ (event.key === " " && (!origin || origin.tagName !== "INPUT"))
3764
+ ) {
3765
+ event.preventDefault();
3766
+ this.handleClick();
3767
+ }
3768
+ break;
3867
3769
  }
3868
- break;
3770
+ case "mouseenter":
3771
+ if (this.element.hoverToggle) {
3772
+ this.showBib();
3773
+ }
3774
+ break;
3775
+ case "mouseleave":
3776
+ if (this.element.hoverToggle) {
3777
+ this.hideBib("mouseleave");
3778
+ }
3779
+ break;
3780
+ case "focus":
3781
+ if (this.element.focusShow) {
3782
+ /*
3783
+ This needs to better handle clicking that gives focus -
3784
+ currently it shows and then immediately hides the bib
3785
+ */
3786
+ this.showBib();
3787
+ }
3788
+ break;
3789
+ case "blur":
3790
+ // send this task 100ms later queue to
3791
+ // wait a frame in case focus moves within the floating element/bib
3792
+ setTimeout(() => this.handleFocusLoss(), 0);
3793
+ break;
3794
+ case "click":
3795
+ if (document.activeElement === document.body) {
3796
+ event.currentTarget.focus();
3797
+ }
3798
+ this.handleClick();
3799
+ break;
3800
+ // Do nothing
3869
3801
  }
3870
- case "mouseenter":
3871
- if (element.hoverToggle) {
3872
- this.showBib();
3873
- }
3874
- break;
3875
- case "mouseleave":
3876
- if (element.hoverToggle) {
3877
- this.hideBib("mouseleave");
3878
- }
3879
- break;
3880
- case "focus":
3881
- if (element.focusShow) {
3882
- /*
3883
- This needs to better handle clicking that gives focus -
3884
- currently it shows and then immediately hides the bib
3885
- */
3886
- this.showBib();
3887
- }
3888
- break;
3889
- case "blur":
3890
- // send this task 100ms later queue to
3891
- // wait a frame in case focus moves within the floating element/bib
3892
- setTimeout(() => this.handleFocusLoss(), 0);
3893
- break;
3894
- case "click":
3895
- if (document.activeElement === document.body) {
3896
- event.currentTarget.focus();
3897
- }
3898
- this.handleClick();
3899
- break;
3900
- // Do nothing
3901
3802
  }
3902
3803
  }
3903
3804
 
@@ -3908,11 +3809,6 @@ class AuroFloatingUI {
3908
3809
  * This prevents the component itself from being focusable when the trigger element already handles focus.
3909
3810
  */
3910
3811
  handleTriggerTabIndex() {
3911
- const element = this.element;
3912
- if (!element) {
3913
- return;
3914
- }
3915
-
3916
3812
  const focusableElementSelectors = [
3917
3813
  "a",
3918
3814
  "button",
@@ -3925,7 +3821,7 @@ class AuroFloatingUI {
3925
3821
  "auro-hyperlink",
3926
3822
  ];
3927
3823
 
3928
- const triggerNode = element.querySelectorAll('[slot="trigger"]')[0];
3824
+ const triggerNode = this.element.querySelectorAll('[slot="trigger"]')[0];
3929
3825
  if (!triggerNode) {
3930
3826
  return;
3931
3827
  }
@@ -3934,13 +3830,13 @@ class AuroFloatingUI {
3934
3830
  focusableElementSelectors.forEach((selector) => {
3935
3831
  // Check if the trigger node element is focusable
3936
3832
  if (triggerNodeTagName === selector) {
3937
- element.tabIndex = -1;
3833
+ this.element.tabIndex = -1;
3938
3834
  return;
3939
3835
  }
3940
3836
 
3941
3837
  // Check if any child is focusable
3942
3838
  if (triggerNode.querySelector(selector)) {
3943
- element.tabIndex = -1;
3839
+ this.element.tabIndex = -1;
3944
3840
  }
3945
3841
  });
3946
3842
  }
@@ -3950,18 +3846,13 @@ class AuroFloatingUI {
3950
3846
  * @param {*} eventPrefix
3951
3847
  */
3952
3848
  regenerateBibId() {
3953
- const element = this.element;
3954
- if (!element) {
3955
- return;
3956
- }
3957
-
3958
- this.id = element.getAttribute("id");
3849
+ this.id = this.element.getAttribute("id");
3959
3850
  if (!this.id) {
3960
3851
  this.id = window.crypto.randomUUID();
3961
- element.setAttribute("id", this.id);
3852
+ this.element.setAttribute("id", this.id);
3962
3853
  }
3963
3854
 
3964
- element.bib?.setAttribute("id", `${this.id}-floater-bib`);
3855
+ this.element.bib.setAttribute("id", `${this.id}-floater-bib`);
3965
3856
  }
3966
3857
 
3967
3858
  configure(elem, eventPrefix, enableKeyboardHandling = true) {
@@ -3973,69 +3864,67 @@ class AuroFloatingUI {
3973
3864
  this.element = elem;
3974
3865
  }
3975
3866
 
3976
- const element = this.element;
3977
- if (!element) {
3978
- return;
3867
+ if (this.behavior !== this.element.behavior) {
3868
+ this.behavior = this.element.behavior;
3979
3869
  }
3980
3870
 
3981
- if (this.behavior !== element.behavior) {
3982
- this.behavior = element.behavior;
3983
- }
3984
-
3985
- if (element.trigger) {
3871
+ if (this.element.trigger) {
3986
3872
  this.disconnect();
3987
3873
  }
3988
- element.trigger =
3989
- element.triggerElement ||
3990
- element.shadowRoot?.querySelector("#trigger") ||
3991
- element.trigger;
3992
- element.bib = element.shadowRoot?.querySelector("#bib") || element.bib;
3993
- element.bibSizer = element.shadowRoot?.querySelector("#bibSizer");
3994
- element.triggerChevron =
3995
- element.shadowRoot?.querySelector("#showStateIcon");
3874
+ this.element.trigger =
3875
+ this.element.triggerElement ||
3876
+ this.element.shadowRoot.querySelector("#trigger") ||
3877
+ this.element.trigger;
3878
+ this.element.bib =
3879
+ this.element.shadowRoot.querySelector("#bib") || this.element.bib;
3880
+ this.element.bibSizer = this.element.shadowRoot.querySelector("#bibSizer");
3881
+ this.element.triggerChevron =
3882
+ this.element.shadowRoot.querySelector("#showStateIcon");
3996
3883
 
3997
- if (element.floaterConfig) {
3998
- element.hoverToggle = element.floaterConfig.hoverToggle;
3884
+ if (this.element.floaterConfig) {
3885
+ this.element.hoverToggle = this.element.floaterConfig.hoverToggle;
3999
3886
  }
4000
3887
 
4001
3888
  this.regenerateBibId();
4002
3889
  this.handleTriggerTabIndex();
4003
3890
 
4004
3891
  this.handleEvent = this.handleEvent.bind(this);
4005
- if (element.trigger) {
3892
+ if (this.element.trigger) {
4006
3893
  if (this.enableKeyboardHandling) {
4007
- element.trigger.addEventListener("keydown", this.handleEvent);
3894
+ this.element.trigger.addEventListener("keydown", this.handleEvent);
4008
3895
  }
4009
- element.trigger.addEventListener("click", this.handleEvent);
4010
- element.trigger.addEventListener("mouseenter", this.handleEvent);
4011
- element.trigger.addEventListener("mouseleave", this.handleEvent);
4012
- element.trigger.addEventListener("focus", this.handleEvent);
4013
- element.trigger.addEventListener("blur", this.handleEvent);
3896
+ this.element.trigger.addEventListener("click", this.handleEvent);
3897
+ this.element.trigger.addEventListener("mouseenter", this.handleEvent);
3898
+ this.element.trigger.addEventListener("mouseleave", this.handleEvent);
3899
+ this.element.trigger.addEventListener("focus", this.handleEvent);
3900
+ this.element.trigger.addEventListener("blur", this.handleEvent);
4014
3901
  }
4015
3902
  }
4016
3903
 
4017
3904
  disconnect() {
4018
3905
  this.cleanupHideHandlers();
3906
+ if (this.element) {
3907
+ this.element.cleanup?.();
4019
3908
 
4020
- const element = this.element;
4021
- if (!element) {
4022
- return;
4023
- }
4024
-
4025
- element.cleanup?.();
4026
-
4027
- if (element.bib && element.shadowRoot) {
4028
- element.shadowRoot.append(element.bib);
4029
- }
3909
+ if (this.element.bib) {
3910
+ this.element.shadowRoot.append(this.element.bib);
3911
+ }
4030
3912
 
4031
- // Remove event & keyboard listeners
4032
- if (element.trigger) {
4033
- element.trigger.removeEventListener("keydown", this.handleEvent);
4034
- element.trigger.removeEventListener("click", this.handleEvent);
4035
- element.trigger.removeEventListener("mouseenter", this.handleEvent);
4036
- element.trigger.removeEventListener("mouseleave", this.handleEvent);
4037
- element.trigger.removeEventListener("focus", this.handleEvent);
4038
- element.trigger.removeEventListener("blur", this.handleEvent);
3913
+ // Remove event & keyboard listeners
3914
+ if (this.element?.trigger) {
3915
+ this.element.trigger.removeEventListener("keydown", this.handleEvent);
3916
+ this.element.trigger.removeEventListener("click", this.handleEvent);
3917
+ this.element.trigger.removeEventListener(
3918
+ "mouseenter",
3919
+ this.handleEvent,
3920
+ );
3921
+ this.element.trigger.removeEventListener(
3922
+ "mouseleave",
3923
+ this.handleEvent,
3924
+ );
3925
+ this.element.trigger.removeEventListener("focus", this.handleEvent);
3926
+ this.element.trigger.removeEventListener("blur", this.handleEvent);
3927
+ }
4039
3928
  }
4040
3929
  }
4041
3930
  }
@@ -5163,7 +5052,7 @@ let AuroHelpText$1 = class AuroHelpText extends i$3 {
5163
5052
  }
5164
5053
  };
5165
5054
 
5166
- var formkitVersion$1 = '202604071818';
5055
+ var formkitVersion$1 = '202604072118';
5167
5056
 
5168
5057
  class AuroElement extends i$3 {
5169
5058
  static get properties() {
@@ -6916,7 +6805,7 @@ class AuroHelpText extends i$3 {
6916
6805
  }
6917
6806
  }
6918
6807
 
6919
- var formkitVersion = '202604071818';
6808
+ var formkitVersion = '202604072118';
6920
6809
 
6921
6810
  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}`;
6922
6811