@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
@@ -3228,19 +3228,11 @@ class AuroFloatingUI {
3228
3228
  * This ensures that the bib content has the same dimensions as the sizer element.
3229
3229
  */
3230
3230
  mirrorSize() {
3231
- const element = this.element;
3232
- if (!element) {
3233
- return;
3234
- }
3235
-
3236
3231
  // mirror the boxsize from bibSizer
3237
- if (element.bibSizer && element.matchWidth && element.bib?.shadowRoot) {
3238
- const sizerStyle = window.getComputedStyle(element.bibSizer);
3239
- const bibContent = element.bib.shadowRoot.querySelector(".container");
3240
- if (!bibContent) {
3241
- return;
3242
- }
3243
-
3232
+ if (this.element.bibSizer && this.element.matchWidth) {
3233
+ const sizerStyle = window.getComputedStyle(this.element.bibSizer);
3234
+ const bibContent =
3235
+ this.element.bib.shadowRoot.querySelector(".container");
3244
3236
  if (sizerStyle.width !== "0px") {
3245
3237
  bibContent.style.width = sizerStyle.width;
3246
3238
  }
@@ -3262,14 +3254,9 @@ class AuroFloatingUI {
3262
3254
  * @returns {String} The positioning strategy, one of 'fullscreen', 'floating', 'cover'.
3263
3255
  */
3264
3256
  getPositioningStrategy() {
3265
- const element = this.element;
3266
- if (!element) {
3267
- return "floating";
3268
- }
3269
-
3270
3257
  const breakpoint =
3271
- element.bib?.mobileFullscreenBreakpoint ||
3272
- element.floaterConfig?.fullscreenBreakpoint;
3258
+ this.element.bib.mobileFullscreenBreakpoint ||
3259
+ this.element.floaterConfig?.fullscreenBreakpoint;
3273
3260
  switch (this.behavior) {
3274
3261
  case "tooltip":
3275
3262
  return "floating";
@@ -3280,9 +3267,9 @@ class AuroFloatingUI {
3280
3267
  `(max-width: ${breakpoint})`,
3281
3268
  ).matches;
3282
3269
 
3283
- element.expanded = smallerThanBreakpoint;
3270
+ this.element.expanded = smallerThanBreakpoint;
3284
3271
  }
3285
- if (element.nested) {
3272
+ if (this.element.nested) {
3286
3273
  return "cover";
3287
3274
  }
3288
3275
  return "fullscreen";
@@ -3312,65 +3299,42 @@ class AuroFloatingUI {
3312
3299
  * and applies the calculated position to the bib's style.
3313
3300
  */
3314
3301
  position() {
3315
- const element = this.element;
3316
- if (!element) {
3317
- return;
3318
- }
3319
-
3320
3302
  const strategy = this.getPositioningStrategy();
3321
3303
  this.configureBibStrategy(strategy);
3322
3304
 
3323
3305
  if (strategy === "floating") {
3324
- if (!element.trigger || !element.bib) {
3325
- return;
3326
- }
3327
-
3328
3306
  this.mirrorSize();
3329
3307
  // Define the middlware for the floater configuration
3330
3308
  const middleware = [
3331
- offset(element.floaterConfig?.offset || 0),
3332
- ...(element.floaterConfig?.shift ? [shift()] : []), // Add shift middleware if shift is enabled.
3333
- ...(element.floaterConfig?.flip ? [flip()] : []), // Add flip middleware if flip is enabled.
3334
- ...(element.floaterConfig?.autoPlacement ? [autoPlacement()] : []), // Add autoPlacement middleware if autoPlacement is enabled.
3309
+ offset(this.element.floaterConfig?.offset || 0),
3310
+ ...(this.element.floaterConfig?.shift ? [shift()] : []), // Add shift middleware if shift is enabled.
3311
+ ...(this.element.floaterConfig?.flip ? [flip()] : []), // Add flip middleware if flip is enabled.
3312
+ ...(this.element.floaterConfig?.autoPlacement ? [autoPlacement()] : []), // Add autoPlacement middleware if autoPlacement is enabled.
3335
3313
  ];
3336
3314
 
3337
3315
  // Compute the position of the bib
3338
- computePosition(element.trigger, element.bib, {
3339
- strategy: element.floaterConfig?.strategy || "fixed",
3340
- placement: element.floaterConfig?.placement,
3316
+ computePosition(this.element.trigger, this.element.bib, {
3317
+ strategy: this.element.floaterConfig?.strategy || "fixed",
3318
+ placement: this.element.floaterConfig?.placement,
3341
3319
  middleware: middleware || [],
3342
3320
  }).then(({ x, y }) => {
3343
3321
  // eslint-disable-line id-length
3344
- const currentElement = this.element;
3345
- if (!currentElement?.bib) {
3346
- return;
3347
- }
3348
-
3349
- Object.assign(currentElement.bib.style, {
3322
+ Object.assign(this.element.bib.style, {
3350
3323
  left: `${x}px`,
3351
3324
  top: `${y}px`,
3352
3325
  });
3353
3326
  });
3354
3327
  } else if (strategy === "cover") {
3355
- if (!element.parentNode || !element.bib) {
3356
- return;
3357
- }
3358
-
3359
3328
  // Compute the position of the bib
3360
- computePosition(element.parentNode, element.bib, {
3329
+ computePosition(this.element.parentNode, this.element.bib, {
3361
3330
  placement: "bottom-start",
3362
3331
  }).then(({ x, y }) => {
3363
3332
  // eslint-disable-line id-length
3364
- const currentElement = this.element;
3365
- if (!currentElement?.bib || !currentElement.parentNode) {
3366
- return;
3367
- }
3368
-
3369
- Object.assign(currentElement.bib.style, {
3333
+ Object.assign(this.element.bib.style, {
3370
3334
  left: `${x}px`,
3371
- top: `${y - currentElement.parentNode.offsetHeight}px`,
3372
- width: `${currentElement.parentNode.offsetWidth}px`,
3373
- height: `${currentElement.parentNode.offsetHeight}px`,
3335
+ top: `${y - this.element.parentNode.offsetHeight}px`,
3336
+ width: `${this.element.parentNode.offsetWidth}px`,
3337
+ height: `${this.element.parentNode.offsetHeight}px`,
3374
3338
  });
3375
3339
  });
3376
3340
  }
@@ -3382,17 +3346,11 @@ class AuroFloatingUI {
3382
3346
  * @param {Boolean} lock - If true, locks the body's scrolling functionlity; otherwise, unlock.
3383
3347
  */
3384
3348
  lockScroll(lock = true) {
3385
- const element = this.element;
3386
-
3387
3349
  if (lock) {
3388
- if (!element?.bib) {
3389
- return;
3390
- }
3391
-
3392
3350
  document.body.style.overflow = "hidden"; // hide body's scrollbar
3393
3351
 
3394
3352
  // Move `bib` by the amount the viewport is shifted to stay aligned in fullscreen.
3395
- element.bib.style.transform = `translateY(${window?.visualViewport?.offsetTop}px)`;
3353
+ this.element.bib.style.transform = `translateY(${window?.visualViewport?.offsetTop}px)`;
3396
3354
  } else {
3397
3355
  document.body.style.overflow = "";
3398
3356
  }
@@ -3408,24 +3366,20 @@ class AuroFloatingUI {
3408
3366
  * @param {string} strategy - The positioning strategy ('fullscreen' or 'floating').
3409
3367
  */
3410
3368
  configureBibStrategy(value) {
3411
- const element = this.element;
3412
- if (!element?.bib) {
3413
- return;
3414
- }
3415
-
3416
3369
  if (value === "fullscreen") {
3417
- element.isBibFullscreen = true;
3370
+ this.element.isBibFullscreen = true;
3418
3371
  // reset the prev position
3419
- element.bib.setAttribute("isfullscreen", "");
3420
- element.bib.style.position = "fixed";
3421
- element.bib.style.top = "0px";
3422
- element.bib.style.left = "0px";
3423
- element.bib.style.width = "";
3424
- element.bib.style.height = "";
3425
- element.style.contain = "";
3372
+ this.element.bib.setAttribute("isfullscreen", "");
3373
+ this.element.bib.style.position = "fixed";
3374
+ this.element.bib.style.top = "0px";
3375
+ this.element.bib.style.left = "0px";
3376
+ this.element.bib.style.width = "";
3377
+ this.element.bib.style.height = "";
3378
+ this.element.style.contain = "";
3426
3379
 
3427
3380
  // reset the size that was mirroring `size` css-part
3428
- const bibContent = element.bib.shadowRoot?.querySelector(".container");
3381
+ const bibContent =
3382
+ this.element.bib.shadowRoot.querySelector(".container");
3429
3383
  if (bibContent) {
3430
3384
  bibContent.style.width = "";
3431
3385
  bibContent.style.height = "";
@@ -3440,14 +3394,14 @@ class AuroFloatingUI {
3440
3394
  }, 0);
3441
3395
  }
3442
3396
 
3443
- if (element.isPopoverVisible) {
3397
+ if (this.element.isPopoverVisible) {
3444
3398
  this.lockScroll(true);
3445
3399
  }
3446
3400
  } else {
3447
- element.bib.style.position = "";
3448
- element.bib.removeAttribute("isfullscreen");
3449
- element.isBibFullscreen = false;
3450
- element.style.contain = "layout";
3401
+ this.element.bib.style.position = "";
3402
+ this.element.bib.removeAttribute("isfullscreen");
3403
+ this.element.isBibFullscreen = false;
3404
+ this.element.style.contain = "layout";
3451
3405
  }
3452
3406
 
3453
3407
  const isChanged = this.strategy && this.strategy !== value;
@@ -3465,21 +3419,16 @@ class AuroFloatingUI {
3465
3419
  },
3466
3420
  );
3467
3421
 
3468
- element.dispatchEvent(event);
3422
+ this.element.dispatchEvent(event);
3469
3423
  }
3470
3424
  }
3471
3425
 
3472
3426
  updateState() {
3473
- const element = this.element;
3474
- if (!element) {
3475
- return;
3476
- }
3477
-
3478
- const isVisible = element.isPopoverVisible;
3427
+ const isVisible = this.element.isPopoverVisible;
3479
3428
  if (!isVisible) {
3480
3429
  this.cleanupHideHandlers();
3481
3430
  try {
3482
- element.cleanup?.();
3431
+ this.element.cleanup?.();
3483
3432
  } catch (error) {
3484
3433
  // Do nothing
3485
3434
  }
@@ -3495,30 +3444,28 @@ class AuroFloatingUI {
3495
3444
  * If not, and if the bib isn't in fullscreen mode with focus lost, it hides the bib.
3496
3445
  */
3497
3446
  handleFocusLoss() {
3498
- const element = this.element;
3499
- if (!element?.bib) {
3500
- return;
3501
- }
3502
-
3503
3447
  // if mouse is being pressed, skip and let click event to handle the action
3504
3448
  if (AuroFloatingUI.isMousePressed) {
3505
3449
  return;
3506
3450
  }
3507
3451
 
3508
3452
  if (
3509
- element.noHideOnThisFocusLoss ||
3510
- element.hasAttribute("noHideOnThisFocusLoss")
3453
+ this.element.noHideOnThisFocusLoss ||
3454
+ this.element.hasAttribute("noHideOnThisFocusLoss")
3511
3455
  ) {
3512
3456
  return;
3513
3457
  }
3514
3458
 
3515
3459
  // if focus is still inside of trigger or bib, do not close
3516
- if (element.matches(":focus") || element.matches(":focus-within")) {
3460
+ if (
3461
+ this.element.matches(":focus") ||
3462
+ this.element.matches(":focus-within")
3463
+ ) {
3517
3464
  return;
3518
3465
  }
3519
3466
 
3520
3467
  // if fullscreen bib is in fullscreen mode, do not close
3521
- if (element.bib.hasAttribute("isfullscreen")) {
3468
+ if (this.element.bib.hasAttribute("isfullscreen")) {
3522
3469
  return;
3523
3470
  }
3524
3471
 
@@ -3526,33 +3473,23 @@ class AuroFloatingUI {
3526
3473
  }
3527
3474
 
3528
3475
  setupHideHandlers() {
3529
- const element = this.element;
3530
- if (!element) {
3531
- return;
3532
- }
3533
-
3534
3476
  // Define handlers & store references
3535
3477
  this.focusHandler = () => this.handleFocusLoss();
3536
3478
 
3537
3479
  this.clickHandler = (evt) => {
3538
- const element = this.element;
3539
- if (!element?.bib) {
3540
- return;
3541
- }
3542
-
3543
3480
  // When the bib is fullscreen (modal dialog), don't close on outside
3544
3481
  // clicks. VoiceOver's synthetic click events inside a top-layer modal
3545
3482
  // <dialog> may not include the bib in composedPath(), causing false
3546
3483
  // positives. This mirrors the fullscreen guard in handleFocusLoss().
3547
- if (element.bib.hasAttribute("isfullscreen")) {
3484
+ if (this.element.bib && this.element.bib.hasAttribute("isfullscreen")) {
3548
3485
  return;
3549
3486
  }
3550
3487
 
3551
3488
  if (
3552
- (!evt.composedPath().includes(element.trigger) &&
3553
- !evt.composedPath().includes(element.bib)) ||
3554
- (element.bib.backdrop &&
3555
- evt.composedPath().includes(element.bib.backdrop))
3489
+ (!evt.composedPath().includes(this.element.trigger) &&
3490
+ !evt.composedPath().includes(this.element.bib)) ||
3491
+ (this.element.bib.backdrop &&
3492
+ evt.composedPath().includes(this.element.bib.backdrop))
3556
3493
  ) {
3557
3494
  const existedVisibleFloatingUI =
3558
3495
  document.expandedAuroFormkitDropdown || document.expandedAuroFloater;
@@ -3573,12 +3510,7 @@ class AuroFloatingUI {
3573
3510
 
3574
3511
  // ESC key handler
3575
3512
  this.keyDownHandler = (evt) => {
3576
- const element = this.element;
3577
- if (!element) {
3578
- return;
3579
- }
3580
-
3581
- if (evt.key === "Escape" && element.isPopoverVisible) {
3513
+ if (evt.key === "Escape" && this.element.isPopoverVisible) {
3582
3514
  const existedVisibleFloatingUI =
3583
3515
  document.expandedAuroFormkitDropdown || document.expandedAuroFloater;
3584
3516
  if (
@@ -3635,10 +3567,6 @@ class AuroFloatingUI {
3635
3567
  }
3636
3568
 
3637
3569
  updateCurrentExpandedDropdown() {
3638
- if (!this.element) {
3639
- return;
3640
- }
3641
-
3642
3570
  // Close any other dropdown that is already open
3643
3571
  const existedVisibleFloatingUI =
3644
3572
  document.expandedAuroFormkitDropdown || document.expandedAuroFloater;
@@ -3655,34 +3583,25 @@ class AuroFloatingUI {
3655
3583
  }
3656
3584
 
3657
3585
  showBib() {
3658
- const element = this.element;
3659
- if (!element) {
3660
- return;
3661
- }
3662
-
3663
- if (!element.bib || (!element.trigger && !element.parentNode)) {
3664
- return;
3665
- }
3666
-
3667
- if (!element.disabled && !this.showing) {
3586
+ if (!this.element.disabled && !this.showing) {
3668
3587
  this.updateCurrentExpandedDropdown();
3669
- element.triggerChevron?.setAttribute("data-expanded", true);
3588
+ this.element.triggerChevron?.setAttribute("data-expanded", true);
3670
3589
 
3671
3590
  // prevent double showing: isPopovervisible gets first and showBib gets called later
3672
3591
  if (!this.showing) {
3673
- if (!element.modal) {
3592
+ if (!this.element.modal) {
3674
3593
  this.setupHideHandlers();
3675
3594
  }
3676
3595
  this.showing = true;
3677
- element.isPopoverVisible = true;
3596
+ this.element.isPopoverVisible = true;
3678
3597
  this.position();
3679
3598
  this.dispatchEventDropdownToggle();
3680
3599
  }
3681
3600
 
3682
3601
  // Setup auto update to handle resize and scroll
3683
- element.cleanup = autoUpdate(
3684
- element.trigger || element.parentNode,
3685
- element.bib,
3602
+ this.element.cleanup = autoUpdate(
3603
+ this.element.trigger || this.element.parentNode,
3604
+ this.element.bib,
3686
3605
  () => {
3687
3606
  this.position();
3688
3607
  },
@@ -3695,27 +3614,22 @@ class AuroFloatingUI {
3695
3614
  * @param {String} eventType - The event type that triggered the hiding action.
3696
3615
  */
3697
3616
  hideBib(eventType = "unknown") {
3698
- const element = this.element;
3699
- if (!element) {
3700
- return;
3701
- }
3702
-
3703
- if (element.disabled) {
3617
+ if (this.element.disabled) {
3704
3618
  return;
3705
3619
  }
3706
3620
 
3707
3621
  // noToggle dropdowns should not close when the trigger is clicked (the
3708
3622
  // "toggle" behavior), but they CAN still close via other interactions like
3709
3623
  // Escape key or focus loss.
3710
- if (element.noToggle && eventType === "click") {
3624
+ if (this.element.noToggle && eventType === "click") {
3711
3625
  return;
3712
3626
  }
3713
3627
 
3714
3628
  this.lockScroll(false);
3715
- element.triggerChevron?.removeAttribute("data-expanded");
3629
+ this.element.triggerChevron?.removeAttribute("data-expanded");
3716
3630
 
3717
- if (element.isPopoverVisible) {
3718
- element.isPopoverVisible = false;
3631
+ if (this.element.isPopoverVisible) {
3632
+ this.element.isPopoverVisible = false;
3719
3633
  }
3720
3634
  if (this.showing) {
3721
3635
  this.cleanupHideHandlers();
@@ -3735,11 +3649,6 @@ class AuroFloatingUI {
3735
3649
  * @param {String} eventType - The event type that triggered the toggle action.
3736
3650
  */
3737
3651
  dispatchEventDropdownToggle(eventType) {
3738
- const element = this.element;
3739
- if (!element) {
3740
- return;
3741
- }
3742
-
3743
3652
  const event = new CustomEvent(
3744
3653
  this.eventPrefix ? `${this.eventPrefix}-toggled` : "toggled",
3745
3654
  {
@@ -3751,16 +3660,11 @@ class AuroFloatingUI {
3751
3660
  },
3752
3661
  );
3753
3662
 
3754
- element.dispatchEvent(event);
3663
+ this.element.dispatchEvent(event);
3755
3664
  }
3756
3665
 
3757
3666
  handleClick() {
3758
- const element = this.element;
3759
- if (!element) {
3760
- return;
3761
- }
3762
-
3763
- if (element.isPopoverVisible) {
3667
+ if (this.element.isPopoverVisible) {
3764
3668
  this.hideBib("click");
3765
3669
  } else {
3766
3670
  this.showBib();
@@ -3771,66 +3675,63 @@ class AuroFloatingUI {
3771
3675
  {
3772
3676
  composed: true,
3773
3677
  detail: {
3774
- expanded: element.isPopoverVisible,
3678
+ expanded: this.element.isPopoverVisible,
3775
3679
  },
3776
3680
  },
3777
3681
  );
3778
3682
 
3779
- element.dispatchEvent(event);
3683
+ this.element.dispatchEvent(event);
3780
3684
  }
3781
3685
 
3782
3686
  handleEvent(event) {
3783
- const element = this.element;
3784
- if (!element || element.disableEventShow) {
3785
- return;
3786
- }
3787
-
3788
- switch (event.type) {
3789
- case "keydown": {
3790
- // Support both Enter and Space keys for accessibility
3791
- // Space is included as it's expected behavior for interactive elements
3792
-
3793
- const origin = event.composedPath()[0];
3794
- if (
3795
- event.key === "Enter" ||
3796
- (event.key === " " && (!origin || origin.tagName !== "INPUT"))
3797
- ) {
3798
- event.preventDefault();
3799
- this.handleClick();
3687
+ if (!this.element.disableEventShow) {
3688
+ switch (event.type) {
3689
+ case "keydown": {
3690
+ // Support both Enter and Space keys for accessibility
3691
+ // Space is included as it's expected behavior for interactive elements
3692
+
3693
+ const origin = event.composedPath()[0];
3694
+ if (
3695
+ event.key === "Enter" ||
3696
+ (event.key === " " && (!origin || origin.tagName !== "INPUT"))
3697
+ ) {
3698
+ event.preventDefault();
3699
+ this.handleClick();
3700
+ }
3701
+ break;
3800
3702
  }
3801
- break;
3703
+ case "mouseenter":
3704
+ if (this.element.hoverToggle) {
3705
+ this.showBib();
3706
+ }
3707
+ break;
3708
+ case "mouseleave":
3709
+ if (this.element.hoverToggle) {
3710
+ this.hideBib("mouseleave");
3711
+ }
3712
+ break;
3713
+ case "focus":
3714
+ if (this.element.focusShow) {
3715
+ /*
3716
+ This needs to better handle clicking that gives focus -
3717
+ currently it shows and then immediately hides the bib
3718
+ */
3719
+ this.showBib();
3720
+ }
3721
+ break;
3722
+ case "blur":
3723
+ // send this task 100ms later queue to
3724
+ // wait a frame in case focus moves within the floating element/bib
3725
+ setTimeout(() => this.handleFocusLoss(), 0);
3726
+ break;
3727
+ case "click":
3728
+ if (document.activeElement === document.body) {
3729
+ event.currentTarget.focus();
3730
+ }
3731
+ this.handleClick();
3732
+ break;
3733
+ // Do nothing
3802
3734
  }
3803
- case "mouseenter":
3804
- if (element.hoverToggle) {
3805
- this.showBib();
3806
- }
3807
- break;
3808
- case "mouseleave":
3809
- if (element.hoverToggle) {
3810
- this.hideBib("mouseleave");
3811
- }
3812
- break;
3813
- case "focus":
3814
- if (element.focusShow) {
3815
- /*
3816
- This needs to better handle clicking that gives focus -
3817
- currently it shows and then immediately hides the bib
3818
- */
3819
- this.showBib();
3820
- }
3821
- break;
3822
- case "blur":
3823
- // send this task 100ms later queue to
3824
- // wait a frame in case focus moves within the floating element/bib
3825
- setTimeout(() => this.handleFocusLoss(), 0);
3826
- break;
3827
- case "click":
3828
- if (document.activeElement === document.body) {
3829
- event.currentTarget.focus();
3830
- }
3831
- this.handleClick();
3832
- break;
3833
- // Do nothing
3834
3735
  }
3835
3736
  }
3836
3737
 
@@ -3841,11 +3742,6 @@ class AuroFloatingUI {
3841
3742
  * This prevents the component itself from being focusable when the trigger element already handles focus.
3842
3743
  */
3843
3744
  handleTriggerTabIndex() {
3844
- const element = this.element;
3845
- if (!element) {
3846
- return;
3847
- }
3848
-
3849
3745
  const focusableElementSelectors = [
3850
3746
  "a",
3851
3747
  "button",
@@ -3858,7 +3754,7 @@ class AuroFloatingUI {
3858
3754
  "auro-hyperlink",
3859
3755
  ];
3860
3756
 
3861
- const triggerNode = element.querySelectorAll('[slot="trigger"]')[0];
3757
+ const triggerNode = this.element.querySelectorAll('[slot="trigger"]')[0];
3862
3758
  if (!triggerNode) {
3863
3759
  return;
3864
3760
  }
@@ -3867,13 +3763,13 @@ class AuroFloatingUI {
3867
3763
  focusableElementSelectors.forEach((selector) => {
3868
3764
  // Check if the trigger node element is focusable
3869
3765
  if (triggerNodeTagName === selector) {
3870
- element.tabIndex = -1;
3766
+ this.element.tabIndex = -1;
3871
3767
  return;
3872
3768
  }
3873
3769
 
3874
3770
  // Check if any child is focusable
3875
3771
  if (triggerNode.querySelector(selector)) {
3876
- element.tabIndex = -1;
3772
+ this.element.tabIndex = -1;
3877
3773
  }
3878
3774
  });
3879
3775
  }
@@ -3883,18 +3779,13 @@ class AuroFloatingUI {
3883
3779
  * @param {*} eventPrefix
3884
3780
  */
3885
3781
  regenerateBibId() {
3886
- const element = this.element;
3887
- if (!element) {
3888
- return;
3889
- }
3890
-
3891
- this.id = element.getAttribute("id");
3782
+ this.id = this.element.getAttribute("id");
3892
3783
  if (!this.id) {
3893
3784
  this.id = window.crypto.randomUUID();
3894
- element.setAttribute("id", this.id);
3785
+ this.element.setAttribute("id", this.id);
3895
3786
  }
3896
3787
 
3897
- element.bib?.setAttribute("id", `${this.id}-floater-bib`);
3788
+ this.element.bib.setAttribute("id", `${this.id}-floater-bib`);
3898
3789
  }
3899
3790
 
3900
3791
  configure(elem, eventPrefix, enableKeyboardHandling = true) {
@@ -3906,69 +3797,67 @@ class AuroFloatingUI {
3906
3797
  this.element = elem;
3907
3798
  }
3908
3799
 
3909
- const element = this.element;
3910
- if (!element) {
3911
- return;
3800
+ if (this.behavior !== this.element.behavior) {
3801
+ this.behavior = this.element.behavior;
3912
3802
  }
3913
3803
 
3914
- if (this.behavior !== element.behavior) {
3915
- this.behavior = element.behavior;
3916
- }
3917
-
3918
- if (element.trigger) {
3804
+ if (this.element.trigger) {
3919
3805
  this.disconnect();
3920
3806
  }
3921
- element.trigger =
3922
- element.triggerElement ||
3923
- element.shadowRoot?.querySelector("#trigger") ||
3924
- element.trigger;
3925
- element.bib = element.shadowRoot?.querySelector("#bib") || element.bib;
3926
- element.bibSizer = element.shadowRoot?.querySelector("#bibSizer");
3927
- element.triggerChevron =
3928
- element.shadowRoot?.querySelector("#showStateIcon");
3807
+ this.element.trigger =
3808
+ this.element.triggerElement ||
3809
+ this.element.shadowRoot.querySelector("#trigger") ||
3810
+ this.element.trigger;
3811
+ this.element.bib =
3812
+ this.element.shadowRoot.querySelector("#bib") || this.element.bib;
3813
+ this.element.bibSizer = this.element.shadowRoot.querySelector("#bibSizer");
3814
+ this.element.triggerChevron =
3815
+ this.element.shadowRoot.querySelector("#showStateIcon");
3929
3816
 
3930
- if (element.floaterConfig) {
3931
- element.hoverToggle = element.floaterConfig.hoverToggle;
3817
+ if (this.element.floaterConfig) {
3818
+ this.element.hoverToggle = this.element.floaterConfig.hoverToggle;
3932
3819
  }
3933
3820
 
3934
3821
  this.regenerateBibId();
3935
3822
  this.handleTriggerTabIndex();
3936
3823
 
3937
3824
  this.handleEvent = this.handleEvent.bind(this);
3938
- if (element.trigger) {
3825
+ if (this.element.trigger) {
3939
3826
  if (this.enableKeyboardHandling) {
3940
- element.trigger.addEventListener("keydown", this.handleEvent);
3827
+ this.element.trigger.addEventListener("keydown", this.handleEvent);
3941
3828
  }
3942
- element.trigger.addEventListener("click", this.handleEvent);
3943
- element.trigger.addEventListener("mouseenter", this.handleEvent);
3944
- element.trigger.addEventListener("mouseleave", this.handleEvent);
3945
- element.trigger.addEventListener("focus", this.handleEvent);
3946
- element.trigger.addEventListener("blur", this.handleEvent);
3829
+ this.element.trigger.addEventListener("click", this.handleEvent);
3830
+ this.element.trigger.addEventListener("mouseenter", this.handleEvent);
3831
+ this.element.trigger.addEventListener("mouseleave", this.handleEvent);
3832
+ this.element.trigger.addEventListener("focus", this.handleEvent);
3833
+ this.element.trigger.addEventListener("blur", this.handleEvent);
3947
3834
  }
3948
3835
  }
3949
3836
 
3950
3837
  disconnect() {
3951
3838
  this.cleanupHideHandlers();
3839
+ if (this.element) {
3840
+ this.element.cleanup?.();
3952
3841
 
3953
- const element = this.element;
3954
- if (!element) {
3955
- return;
3956
- }
3957
-
3958
- element.cleanup?.();
3959
-
3960
- if (element.bib && element.shadowRoot) {
3961
- element.shadowRoot.append(element.bib);
3962
- }
3842
+ if (this.element.bib) {
3843
+ this.element.shadowRoot.append(this.element.bib);
3844
+ }
3963
3845
 
3964
- // Remove event & keyboard listeners
3965
- if (element.trigger) {
3966
- element.trigger.removeEventListener("keydown", this.handleEvent);
3967
- element.trigger.removeEventListener("click", this.handleEvent);
3968
- element.trigger.removeEventListener("mouseenter", this.handleEvent);
3969
- element.trigger.removeEventListener("mouseleave", this.handleEvent);
3970
- element.trigger.removeEventListener("focus", this.handleEvent);
3971
- element.trigger.removeEventListener("blur", this.handleEvent);
3846
+ // Remove event & keyboard listeners
3847
+ if (this.element?.trigger) {
3848
+ this.element.trigger.removeEventListener("keydown", this.handleEvent);
3849
+ this.element.trigger.removeEventListener("click", this.handleEvent);
3850
+ this.element.trigger.removeEventListener(
3851
+ "mouseenter",
3852
+ this.handleEvent,
3853
+ );
3854
+ this.element.trigger.removeEventListener(
3855
+ "mouseleave",
3856
+ this.handleEvent,
3857
+ );
3858
+ this.element.trigger.removeEventListener("focus", this.handleEvent);
3859
+ this.element.trigger.removeEventListener("blur", this.handleEvent);
3860
+ }
3972
3861
  }
3973
3862
  }
3974
3863
  }
@@ -5096,7 +4985,7 @@ let AuroHelpText$1 = class AuroHelpText extends LitElement {
5096
4985
  }
5097
4986
  };
5098
4987
 
5099
- var formkitVersion$1 = '202604071818';
4988
+ var formkitVersion$1 = '202604072118';
5100
4989
 
5101
4990
  class AuroElement extends LitElement {
5102
4991
  static get properties() {
@@ -6849,7 +6738,7 @@ class AuroHelpText extends LitElement {
6849
6738
  }
6850
6739
  }
6851
6740
 
6852
- var formkitVersion = '202604071818';
6741
+ var formkitVersion = '202604072118';
6853
6742
 
6854
6743
  var styleCss = css`.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}`;
6855
6744