@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
@@ -3168,19 +3168,11 @@ class AuroFloatingUI {
3168
3168
  * This ensures that the bib content has the same dimensions as the sizer element.
3169
3169
  */
3170
3170
  mirrorSize() {
3171
- const element = this.element;
3172
- if (!element) {
3173
- return;
3174
- }
3175
-
3176
3171
  // mirror the boxsize from bibSizer
3177
- if (element.bibSizer && element.matchWidth && element.bib?.shadowRoot) {
3178
- const sizerStyle = window.getComputedStyle(element.bibSizer);
3179
- const bibContent = element.bib.shadowRoot.querySelector(".container");
3180
- if (!bibContent) {
3181
- return;
3182
- }
3183
-
3172
+ if (this.element.bibSizer && this.element.matchWidth) {
3173
+ const sizerStyle = window.getComputedStyle(this.element.bibSizer);
3174
+ const bibContent =
3175
+ this.element.bib.shadowRoot.querySelector(".container");
3184
3176
  if (sizerStyle.width !== "0px") {
3185
3177
  bibContent.style.width = sizerStyle.width;
3186
3178
  }
@@ -3202,14 +3194,9 @@ class AuroFloatingUI {
3202
3194
  * @returns {String} The positioning strategy, one of 'fullscreen', 'floating', 'cover'.
3203
3195
  */
3204
3196
  getPositioningStrategy() {
3205
- const element = this.element;
3206
- if (!element) {
3207
- return "floating";
3208
- }
3209
-
3210
3197
  const breakpoint =
3211
- element.bib?.mobileFullscreenBreakpoint ||
3212
- element.floaterConfig?.fullscreenBreakpoint;
3198
+ this.element.bib.mobileFullscreenBreakpoint ||
3199
+ this.element.floaterConfig?.fullscreenBreakpoint;
3213
3200
  switch (this.behavior) {
3214
3201
  case "tooltip":
3215
3202
  return "floating";
@@ -3220,9 +3207,9 @@ class AuroFloatingUI {
3220
3207
  `(max-width: ${breakpoint})`,
3221
3208
  ).matches;
3222
3209
 
3223
- element.expanded = smallerThanBreakpoint;
3210
+ this.element.expanded = smallerThanBreakpoint;
3224
3211
  }
3225
- if (element.nested) {
3212
+ if (this.element.nested) {
3226
3213
  return "cover";
3227
3214
  }
3228
3215
  return "fullscreen";
@@ -3252,65 +3239,42 @@ class AuroFloatingUI {
3252
3239
  * and applies the calculated position to the bib's style.
3253
3240
  */
3254
3241
  position() {
3255
- const element = this.element;
3256
- if (!element) {
3257
- return;
3258
- }
3259
-
3260
3242
  const strategy = this.getPositioningStrategy();
3261
3243
  this.configureBibStrategy(strategy);
3262
3244
 
3263
3245
  if (strategy === "floating") {
3264
- if (!element.trigger || !element.bib) {
3265
- return;
3266
- }
3267
-
3268
3246
  this.mirrorSize();
3269
3247
  // Define the middlware for the floater configuration
3270
3248
  const middleware = [
3271
- offset(element.floaterConfig?.offset || 0),
3272
- ...(element.floaterConfig?.shift ? [shift()] : []), // Add shift middleware if shift is enabled.
3273
- ...(element.floaterConfig?.flip ? [flip()] : []), // Add flip middleware if flip is enabled.
3274
- ...(element.floaterConfig?.autoPlacement ? [autoPlacement()] : []), // Add autoPlacement middleware if autoPlacement is enabled.
3249
+ offset(this.element.floaterConfig?.offset || 0),
3250
+ ...(this.element.floaterConfig?.shift ? [shift()] : []), // Add shift middleware if shift is enabled.
3251
+ ...(this.element.floaterConfig?.flip ? [flip()] : []), // Add flip middleware if flip is enabled.
3252
+ ...(this.element.floaterConfig?.autoPlacement ? [autoPlacement()] : []), // Add autoPlacement middleware if autoPlacement is enabled.
3275
3253
  ];
3276
3254
 
3277
3255
  // Compute the position of the bib
3278
- computePosition(element.trigger, element.bib, {
3279
- strategy: element.floaterConfig?.strategy || "fixed",
3280
- placement: element.floaterConfig?.placement,
3256
+ computePosition(this.element.trigger, this.element.bib, {
3257
+ strategy: this.element.floaterConfig?.strategy || "fixed",
3258
+ placement: this.element.floaterConfig?.placement,
3281
3259
  middleware: middleware || [],
3282
3260
  }).then(({ x, y }) => {
3283
3261
  // eslint-disable-line id-length
3284
- const currentElement = this.element;
3285
- if (!currentElement?.bib) {
3286
- return;
3287
- }
3288
-
3289
- Object.assign(currentElement.bib.style, {
3262
+ Object.assign(this.element.bib.style, {
3290
3263
  left: `${x}px`,
3291
3264
  top: `${y}px`,
3292
3265
  });
3293
3266
  });
3294
3267
  } else if (strategy === "cover") {
3295
- if (!element.parentNode || !element.bib) {
3296
- return;
3297
- }
3298
-
3299
3268
  // Compute the position of the bib
3300
- computePosition(element.parentNode, element.bib, {
3269
+ computePosition(this.element.parentNode, this.element.bib, {
3301
3270
  placement: "bottom-start",
3302
3271
  }).then(({ x, y }) => {
3303
3272
  // eslint-disable-line id-length
3304
- const currentElement = this.element;
3305
- if (!currentElement?.bib || !currentElement.parentNode) {
3306
- return;
3307
- }
3308
-
3309
- Object.assign(currentElement.bib.style, {
3273
+ Object.assign(this.element.bib.style, {
3310
3274
  left: `${x}px`,
3311
- top: `${y - currentElement.parentNode.offsetHeight}px`,
3312
- width: `${currentElement.parentNode.offsetWidth}px`,
3313
- height: `${currentElement.parentNode.offsetHeight}px`,
3275
+ top: `${y - this.element.parentNode.offsetHeight}px`,
3276
+ width: `${this.element.parentNode.offsetWidth}px`,
3277
+ height: `${this.element.parentNode.offsetHeight}px`,
3314
3278
  });
3315
3279
  });
3316
3280
  }
@@ -3322,17 +3286,11 @@ class AuroFloatingUI {
3322
3286
  * @param {Boolean} lock - If true, locks the body's scrolling functionlity; otherwise, unlock.
3323
3287
  */
3324
3288
  lockScroll(lock = true) {
3325
- const element = this.element;
3326
-
3327
3289
  if (lock) {
3328
- if (!element?.bib) {
3329
- return;
3330
- }
3331
-
3332
3290
  document.body.style.overflow = "hidden"; // hide body's scrollbar
3333
3291
 
3334
3292
  // Move `bib` by the amount the viewport is shifted to stay aligned in fullscreen.
3335
- element.bib.style.transform = `translateY(${window?.visualViewport?.offsetTop}px)`;
3293
+ this.element.bib.style.transform = `translateY(${window?.visualViewport?.offsetTop}px)`;
3336
3294
  } else {
3337
3295
  document.body.style.overflow = "";
3338
3296
  }
@@ -3348,24 +3306,20 @@ class AuroFloatingUI {
3348
3306
  * @param {string} strategy - The positioning strategy ('fullscreen' or 'floating').
3349
3307
  */
3350
3308
  configureBibStrategy(value) {
3351
- const element = this.element;
3352
- if (!element?.bib) {
3353
- return;
3354
- }
3355
-
3356
3309
  if (value === "fullscreen") {
3357
- element.isBibFullscreen = true;
3310
+ this.element.isBibFullscreen = true;
3358
3311
  // reset the prev position
3359
- element.bib.setAttribute("isfullscreen", "");
3360
- element.bib.style.position = "fixed";
3361
- element.bib.style.top = "0px";
3362
- element.bib.style.left = "0px";
3363
- element.bib.style.width = "";
3364
- element.bib.style.height = "";
3365
- element.style.contain = "";
3312
+ this.element.bib.setAttribute("isfullscreen", "");
3313
+ this.element.bib.style.position = "fixed";
3314
+ this.element.bib.style.top = "0px";
3315
+ this.element.bib.style.left = "0px";
3316
+ this.element.bib.style.width = "";
3317
+ this.element.bib.style.height = "";
3318
+ this.element.style.contain = "";
3366
3319
 
3367
3320
  // reset the size that was mirroring `size` css-part
3368
- const bibContent = element.bib.shadowRoot?.querySelector(".container");
3321
+ const bibContent =
3322
+ this.element.bib.shadowRoot.querySelector(".container");
3369
3323
  if (bibContent) {
3370
3324
  bibContent.style.width = "";
3371
3325
  bibContent.style.height = "";
@@ -3380,14 +3334,14 @@ class AuroFloatingUI {
3380
3334
  }, 0);
3381
3335
  }
3382
3336
 
3383
- if (element.isPopoverVisible) {
3337
+ if (this.element.isPopoverVisible) {
3384
3338
  this.lockScroll(true);
3385
3339
  }
3386
3340
  } else {
3387
- element.bib.style.position = "";
3388
- element.bib.removeAttribute("isfullscreen");
3389
- element.isBibFullscreen = false;
3390
- element.style.contain = "layout";
3341
+ this.element.bib.style.position = "";
3342
+ this.element.bib.removeAttribute("isfullscreen");
3343
+ this.element.isBibFullscreen = false;
3344
+ this.element.style.contain = "layout";
3391
3345
  }
3392
3346
 
3393
3347
  const isChanged = this.strategy && this.strategy !== value;
@@ -3405,21 +3359,16 @@ class AuroFloatingUI {
3405
3359
  },
3406
3360
  );
3407
3361
 
3408
- element.dispatchEvent(event);
3362
+ this.element.dispatchEvent(event);
3409
3363
  }
3410
3364
  }
3411
3365
 
3412
3366
  updateState() {
3413
- const element = this.element;
3414
- if (!element) {
3415
- return;
3416
- }
3417
-
3418
- const isVisible = element.isPopoverVisible;
3367
+ const isVisible = this.element.isPopoverVisible;
3419
3368
  if (!isVisible) {
3420
3369
  this.cleanupHideHandlers();
3421
3370
  try {
3422
- element.cleanup?.();
3371
+ this.element.cleanup?.();
3423
3372
  } catch (error) {
3424
3373
  // Do nothing
3425
3374
  }
@@ -3435,30 +3384,28 @@ class AuroFloatingUI {
3435
3384
  * If not, and if the bib isn't in fullscreen mode with focus lost, it hides the bib.
3436
3385
  */
3437
3386
  handleFocusLoss() {
3438
- const element = this.element;
3439
- if (!element?.bib) {
3440
- return;
3441
- }
3442
-
3443
3387
  // if mouse is being pressed, skip and let click event to handle the action
3444
3388
  if (AuroFloatingUI.isMousePressed) {
3445
3389
  return;
3446
3390
  }
3447
3391
 
3448
3392
  if (
3449
- element.noHideOnThisFocusLoss ||
3450
- element.hasAttribute("noHideOnThisFocusLoss")
3393
+ this.element.noHideOnThisFocusLoss ||
3394
+ this.element.hasAttribute("noHideOnThisFocusLoss")
3451
3395
  ) {
3452
3396
  return;
3453
3397
  }
3454
3398
 
3455
3399
  // if focus is still inside of trigger or bib, do not close
3456
- if (element.matches(":focus") || element.matches(":focus-within")) {
3400
+ if (
3401
+ this.element.matches(":focus") ||
3402
+ this.element.matches(":focus-within")
3403
+ ) {
3457
3404
  return;
3458
3405
  }
3459
3406
 
3460
3407
  // if fullscreen bib is in fullscreen mode, do not close
3461
- if (element.bib.hasAttribute("isfullscreen")) {
3408
+ if (this.element.bib.hasAttribute("isfullscreen")) {
3462
3409
  return;
3463
3410
  }
3464
3411
 
@@ -3466,33 +3413,23 @@ class AuroFloatingUI {
3466
3413
  }
3467
3414
 
3468
3415
  setupHideHandlers() {
3469
- const element = this.element;
3470
- if (!element) {
3471
- return;
3472
- }
3473
-
3474
3416
  // Define handlers & store references
3475
3417
  this.focusHandler = () => this.handleFocusLoss();
3476
3418
 
3477
3419
  this.clickHandler = (evt) => {
3478
- const element = this.element;
3479
- if (!element?.bib) {
3480
- return;
3481
- }
3482
-
3483
3420
  // When the bib is fullscreen (modal dialog), don't close on outside
3484
3421
  // clicks. VoiceOver's synthetic click events inside a top-layer modal
3485
3422
  // <dialog> may not include the bib in composedPath(), causing false
3486
3423
  // positives. This mirrors the fullscreen guard in handleFocusLoss().
3487
- if (element.bib.hasAttribute("isfullscreen")) {
3424
+ if (this.element.bib && this.element.bib.hasAttribute("isfullscreen")) {
3488
3425
  return;
3489
3426
  }
3490
3427
 
3491
3428
  if (
3492
- (!evt.composedPath().includes(element.trigger) &&
3493
- !evt.composedPath().includes(element.bib)) ||
3494
- (element.bib.backdrop &&
3495
- evt.composedPath().includes(element.bib.backdrop))
3429
+ (!evt.composedPath().includes(this.element.trigger) &&
3430
+ !evt.composedPath().includes(this.element.bib)) ||
3431
+ (this.element.bib.backdrop &&
3432
+ evt.composedPath().includes(this.element.bib.backdrop))
3496
3433
  ) {
3497
3434
  const existedVisibleFloatingUI =
3498
3435
  document.expandedAuroFormkitDropdown || document.expandedAuroFloater;
@@ -3513,12 +3450,7 @@ class AuroFloatingUI {
3513
3450
 
3514
3451
  // ESC key handler
3515
3452
  this.keyDownHandler = (evt) => {
3516
- const element = this.element;
3517
- if (!element) {
3518
- return;
3519
- }
3520
-
3521
- if (evt.key === "Escape" && element.isPopoverVisible) {
3453
+ if (evt.key === "Escape" && this.element.isPopoverVisible) {
3522
3454
  const existedVisibleFloatingUI =
3523
3455
  document.expandedAuroFormkitDropdown || document.expandedAuroFloater;
3524
3456
  if (
@@ -3575,10 +3507,6 @@ class AuroFloatingUI {
3575
3507
  }
3576
3508
 
3577
3509
  updateCurrentExpandedDropdown() {
3578
- if (!this.element) {
3579
- return;
3580
- }
3581
-
3582
3510
  // Close any other dropdown that is already open
3583
3511
  const existedVisibleFloatingUI =
3584
3512
  document.expandedAuroFormkitDropdown || document.expandedAuroFloater;
@@ -3595,34 +3523,25 @@ class AuroFloatingUI {
3595
3523
  }
3596
3524
 
3597
3525
  showBib() {
3598
- const element = this.element;
3599
- if (!element) {
3600
- return;
3601
- }
3602
-
3603
- if (!element.bib || (!element.trigger && !element.parentNode)) {
3604
- return;
3605
- }
3606
-
3607
- if (!element.disabled && !this.showing) {
3526
+ if (!this.element.disabled && !this.showing) {
3608
3527
  this.updateCurrentExpandedDropdown();
3609
- element.triggerChevron?.setAttribute("data-expanded", true);
3528
+ this.element.triggerChevron?.setAttribute("data-expanded", true);
3610
3529
 
3611
3530
  // prevent double showing: isPopovervisible gets first and showBib gets called later
3612
3531
  if (!this.showing) {
3613
- if (!element.modal) {
3532
+ if (!this.element.modal) {
3614
3533
  this.setupHideHandlers();
3615
3534
  }
3616
3535
  this.showing = true;
3617
- element.isPopoverVisible = true;
3536
+ this.element.isPopoverVisible = true;
3618
3537
  this.position();
3619
3538
  this.dispatchEventDropdownToggle();
3620
3539
  }
3621
3540
 
3622
3541
  // Setup auto update to handle resize and scroll
3623
- element.cleanup = autoUpdate(
3624
- element.trigger || element.parentNode,
3625
- element.bib,
3542
+ this.element.cleanup = autoUpdate(
3543
+ this.element.trigger || this.element.parentNode,
3544
+ this.element.bib,
3626
3545
  () => {
3627
3546
  this.position();
3628
3547
  },
@@ -3635,27 +3554,22 @@ class AuroFloatingUI {
3635
3554
  * @param {String} eventType - The event type that triggered the hiding action.
3636
3555
  */
3637
3556
  hideBib(eventType = "unknown") {
3638
- const element = this.element;
3639
- if (!element) {
3640
- return;
3641
- }
3642
-
3643
- if (element.disabled) {
3557
+ if (this.element.disabled) {
3644
3558
  return;
3645
3559
  }
3646
3560
 
3647
3561
  // noToggle dropdowns should not close when the trigger is clicked (the
3648
3562
  // "toggle" behavior), but they CAN still close via other interactions like
3649
3563
  // Escape key or focus loss.
3650
- if (element.noToggle && eventType === "click") {
3564
+ if (this.element.noToggle && eventType === "click") {
3651
3565
  return;
3652
3566
  }
3653
3567
 
3654
3568
  this.lockScroll(false);
3655
- element.triggerChevron?.removeAttribute("data-expanded");
3569
+ this.element.triggerChevron?.removeAttribute("data-expanded");
3656
3570
 
3657
- if (element.isPopoverVisible) {
3658
- element.isPopoverVisible = false;
3571
+ if (this.element.isPopoverVisible) {
3572
+ this.element.isPopoverVisible = false;
3659
3573
  }
3660
3574
  if (this.showing) {
3661
3575
  this.cleanupHideHandlers();
@@ -3675,11 +3589,6 @@ class AuroFloatingUI {
3675
3589
  * @param {String} eventType - The event type that triggered the toggle action.
3676
3590
  */
3677
3591
  dispatchEventDropdownToggle(eventType) {
3678
- const element = this.element;
3679
- if (!element) {
3680
- return;
3681
- }
3682
-
3683
3592
  const event = new CustomEvent(
3684
3593
  this.eventPrefix ? `${this.eventPrefix}-toggled` : "toggled",
3685
3594
  {
@@ -3691,16 +3600,11 @@ class AuroFloatingUI {
3691
3600
  },
3692
3601
  );
3693
3602
 
3694
- element.dispatchEvent(event);
3603
+ this.element.dispatchEvent(event);
3695
3604
  }
3696
3605
 
3697
3606
  handleClick() {
3698
- const element = this.element;
3699
- if (!element) {
3700
- return;
3701
- }
3702
-
3703
- if (element.isPopoverVisible) {
3607
+ if (this.element.isPopoverVisible) {
3704
3608
  this.hideBib("click");
3705
3609
  } else {
3706
3610
  this.showBib();
@@ -3711,66 +3615,63 @@ class AuroFloatingUI {
3711
3615
  {
3712
3616
  composed: true,
3713
3617
  detail: {
3714
- expanded: element.isPopoverVisible,
3618
+ expanded: this.element.isPopoverVisible,
3715
3619
  },
3716
3620
  },
3717
3621
  );
3718
3622
 
3719
- element.dispatchEvent(event);
3623
+ this.element.dispatchEvent(event);
3720
3624
  }
3721
3625
 
3722
3626
  handleEvent(event) {
3723
- const element = this.element;
3724
- if (!element || element.disableEventShow) {
3725
- return;
3726
- }
3727
-
3728
- switch (event.type) {
3729
- case "keydown": {
3730
- // Support both Enter and Space keys for accessibility
3731
- // Space is included as it's expected behavior for interactive elements
3732
-
3733
- const origin = event.composedPath()[0];
3734
- if (
3735
- event.key === "Enter" ||
3736
- (event.key === " " && (!origin || origin.tagName !== "INPUT"))
3737
- ) {
3738
- event.preventDefault();
3739
- this.handleClick();
3627
+ if (!this.element.disableEventShow) {
3628
+ switch (event.type) {
3629
+ case "keydown": {
3630
+ // Support both Enter and Space keys for accessibility
3631
+ // Space is included as it's expected behavior for interactive elements
3632
+
3633
+ const origin = event.composedPath()[0];
3634
+ if (
3635
+ event.key === "Enter" ||
3636
+ (event.key === " " && (!origin || origin.tagName !== "INPUT"))
3637
+ ) {
3638
+ event.preventDefault();
3639
+ this.handleClick();
3640
+ }
3641
+ break;
3740
3642
  }
3741
- break;
3643
+ case "mouseenter":
3644
+ if (this.element.hoverToggle) {
3645
+ this.showBib();
3646
+ }
3647
+ break;
3648
+ case "mouseleave":
3649
+ if (this.element.hoverToggle) {
3650
+ this.hideBib("mouseleave");
3651
+ }
3652
+ break;
3653
+ case "focus":
3654
+ if (this.element.focusShow) {
3655
+ /*
3656
+ This needs to better handle clicking that gives focus -
3657
+ currently it shows and then immediately hides the bib
3658
+ */
3659
+ this.showBib();
3660
+ }
3661
+ break;
3662
+ case "blur":
3663
+ // send this task 100ms later queue to
3664
+ // wait a frame in case focus moves within the floating element/bib
3665
+ setTimeout(() => this.handleFocusLoss(), 0);
3666
+ break;
3667
+ case "click":
3668
+ if (document.activeElement === document.body) {
3669
+ event.currentTarget.focus();
3670
+ }
3671
+ this.handleClick();
3672
+ break;
3673
+ // Do nothing
3742
3674
  }
3743
- case "mouseenter":
3744
- if (element.hoverToggle) {
3745
- this.showBib();
3746
- }
3747
- break;
3748
- case "mouseleave":
3749
- if (element.hoverToggle) {
3750
- this.hideBib("mouseleave");
3751
- }
3752
- break;
3753
- case "focus":
3754
- if (element.focusShow) {
3755
- /*
3756
- This needs to better handle clicking that gives focus -
3757
- currently it shows and then immediately hides the bib
3758
- */
3759
- this.showBib();
3760
- }
3761
- break;
3762
- case "blur":
3763
- // send this task 100ms later queue to
3764
- // wait a frame in case focus moves within the floating element/bib
3765
- setTimeout(() => this.handleFocusLoss(), 0);
3766
- break;
3767
- case "click":
3768
- if (document.activeElement === document.body) {
3769
- event.currentTarget.focus();
3770
- }
3771
- this.handleClick();
3772
- break;
3773
- // Do nothing
3774
3675
  }
3775
3676
  }
3776
3677
 
@@ -3781,11 +3682,6 @@ class AuroFloatingUI {
3781
3682
  * This prevents the component itself from being focusable when the trigger element already handles focus.
3782
3683
  */
3783
3684
  handleTriggerTabIndex() {
3784
- const element = this.element;
3785
- if (!element) {
3786
- return;
3787
- }
3788
-
3789
3685
  const focusableElementSelectors = [
3790
3686
  "a",
3791
3687
  "button",
@@ -3798,7 +3694,7 @@ class AuroFloatingUI {
3798
3694
  "auro-hyperlink",
3799
3695
  ];
3800
3696
 
3801
- const triggerNode = element.querySelectorAll('[slot="trigger"]')[0];
3697
+ const triggerNode = this.element.querySelectorAll('[slot="trigger"]')[0];
3802
3698
  if (!triggerNode) {
3803
3699
  return;
3804
3700
  }
@@ -3807,13 +3703,13 @@ class AuroFloatingUI {
3807
3703
  focusableElementSelectors.forEach((selector) => {
3808
3704
  // Check if the trigger node element is focusable
3809
3705
  if (triggerNodeTagName === selector) {
3810
- element.tabIndex = -1;
3706
+ this.element.tabIndex = -1;
3811
3707
  return;
3812
3708
  }
3813
3709
 
3814
3710
  // Check if any child is focusable
3815
3711
  if (triggerNode.querySelector(selector)) {
3816
- element.tabIndex = -1;
3712
+ this.element.tabIndex = -1;
3817
3713
  }
3818
3714
  });
3819
3715
  }
@@ -3823,18 +3719,13 @@ class AuroFloatingUI {
3823
3719
  * @param {*} eventPrefix
3824
3720
  */
3825
3721
  regenerateBibId() {
3826
- const element = this.element;
3827
- if (!element) {
3828
- return;
3829
- }
3830
-
3831
- this.id = element.getAttribute("id");
3722
+ this.id = this.element.getAttribute("id");
3832
3723
  if (!this.id) {
3833
3724
  this.id = window.crypto.randomUUID();
3834
- element.setAttribute("id", this.id);
3725
+ this.element.setAttribute("id", this.id);
3835
3726
  }
3836
3727
 
3837
- element.bib?.setAttribute("id", `${this.id}-floater-bib`);
3728
+ this.element.bib.setAttribute("id", `${this.id}-floater-bib`);
3838
3729
  }
3839
3730
 
3840
3731
  configure(elem, eventPrefix, enableKeyboardHandling = true) {
@@ -3846,69 +3737,67 @@ class AuroFloatingUI {
3846
3737
  this.element = elem;
3847
3738
  }
3848
3739
 
3849
- const element = this.element;
3850
- if (!element) {
3851
- return;
3740
+ if (this.behavior !== this.element.behavior) {
3741
+ this.behavior = this.element.behavior;
3852
3742
  }
3853
3743
 
3854
- if (this.behavior !== element.behavior) {
3855
- this.behavior = element.behavior;
3856
- }
3857
-
3858
- if (element.trigger) {
3744
+ if (this.element.trigger) {
3859
3745
  this.disconnect();
3860
3746
  }
3861
- element.trigger =
3862
- element.triggerElement ||
3863
- element.shadowRoot?.querySelector("#trigger") ||
3864
- element.trigger;
3865
- element.bib = element.shadowRoot?.querySelector("#bib") || element.bib;
3866
- element.bibSizer = element.shadowRoot?.querySelector("#bibSizer");
3867
- element.triggerChevron =
3868
- element.shadowRoot?.querySelector("#showStateIcon");
3747
+ this.element.trigger =
3748
+ this.element.triggerElement ||
3749
+ this.element.shadowRoot.querySelector("#trigger") ||
3750
+ this.element.trigger;
3751
+ this.element.bib =
3752
+ this.element.shadowRoot.querySelector("#bib") || this.element.bib;
3753
+ this.element.bibSizer = this.element.shadowRoot.querySelector("#bibSizer");
3754
+ this.element.triggerChevron =
3755
+ this.element.shadowRoot.querySelector("#showStateIcon");
3869
3756
 
3870
- if (element.floaterConfig) {
3871
- element.hoverToggle = element.floaterConfig.hoverToggle;
3757
+ if (this.element.floaterConfig) {
3758
+ this.element.hoverToggle = this.element.floaterConfig.hoverToggle;
3872
3759
  }
3873
3760
 
3874
3761
  this.regenerateBibId();
3875
3762
  this.handleTriggerTabIndex();
3876
3763
 
3877
3764
  this.handleEvent = this.handleEvent.bind(this);
3878
- if (element.trigger) {
3765
+ if (this.element.trigger) {
3879
3766
  if (this.enableKeyboardHandling) {
3880
- element.trigger.addEventListener("keydown", this.handleEvent);
3767
+ this.element.trigger.addEventListener("keydown", this.handleEvent);
3881
3768
  }
3882
- element.trigger.addEventListener("click", this.handleEvent);
3883
- element.trigger.addEventListener("mouseenter", this.handleEvent);
3884
- element.trigger.addEventListener("mouseleave", this.handleEvent);
3885
- element.trigger.addEventListener("focus", this.handleEvent);
3886
- element.trigger.addEventListener("blur", this.handleEvent);
3769
+ this.element.trigger.addEventListener("click", this.handleEvent);
3770
+ this.element.trigger.addEventListener("mouseenter", this.handleEvent);
3771
+ this.element.trigger.addEventListener("mouseleave", this.handleEvent);
3772
+ this.element.trigger.addEventListener("focus", this.handleEvent);
3773
+ this.element.trigger.addEventListener("blur", this.handleEvent);
3887
3774
  }
3888
3775
  }
3889
3776
 
3890
3777
  disconnect() {
3891
3778
  this.cleanupHideHandlers();
3779
+ if (this.element) {
3780
+ this.element.cleanup?.();
3892
3781
 
3893
- const element = this.element;
3894
- if (!element) {
3895
- return;
3896
- }
3897
-
3898
- element.cleanup?.();
3899
-
3900
- if (element.bib && element.shadowRoot) {
3901
- element.shadowRoot.append(element.bib);
3902
- }
3782
+ if (this.element.bib) {
3783
+ this.element.shadowRoot.append(this.element.bib);
3784
+ }
3903
3785
 
3904
- // Remove event & keyboard listeners
3905
- if (element.trigger) {
3906
- element.trigger.removeEventListener("keydown", this.handleEvent);
3907
- element.trigger.removeEventListener("click", this.handleEvent);
3908
- element.trigger.removeEventListener("mouseenter", this.handleEvent);
3909
- element.trigger.removeEventListener("mouseleave", this.handleEvent);
3910
- element.trigger.removeEventListener("focus", this.handleEvent);
3911
- element.trigger.removeEventListener("blur", this.handleEvent);
3786
+ // Remove event & keyboard listeners
3787
+ if (this.element?.trigger) {
3788
+ this.element.trigger.removeEventListener("keydown", this.handleEvent);
3789
+ this.element.trigger.removeEventListener("click", this.handleEvent);
3790
+ this.element.trigger.removeEventListener(
3791
+ "mouseenter",
3792
+ this.handleEvent,
3793
+ );
3794
+ this.element.trigger.removeEventListener(
3795
+ "mouseleave",
3796
+ this.handleEvent,
3797
+ );
3798
+ this.element.trigger.removeEventListener("focus", this.handleEvent);
3799
+ this.element.trigger.removeEventListener("blur", this.handleEvent);
3800
+ }
3912
3801
  }
3913
3802
  }
3914
3803
  }
@@ -5036,7 +4925,7 @@ let AuroHelpText$2 = class AuroHelpText extends LitElement {
5036
4925
  }
5037
4926
  };
5038
4927
 
5039
- var formkitVersion$2 = '202604071818';
4928
+ var formkitVersion$2 = '202604072118';
5040
4929
 
5041
4930
  let AuroElement$2 = class AuroElement extends LitElement {
5042
4931
  static get properties() {
@@ -12793,7 +12682,7 @@ let AuroHelpText$1 = class AuroHelpText extends LitElement {
12793
12682
  }
12794
12683
  };
12795
12684
 
12796
- var formkitVersion$1 = '202604071818';
12685
+ var formkitVersion$1 = '202604072118';
12797
12686
 
12798
12687
  // Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
12799
12688
  // See LICENSE in the project root for license information.
@@ -13858,7 +13747,7 @@ class AuroBibtemplate extends LitElement {
13858
13747
  }
13859
13748
  }
13860
13749
 
13861
- var formkitVersion = '202604071818';
13750
+ var formkitVersion = '202604072118';
13862
13751
 
13863
13752
  var styleCss$1 = 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}:host{display:block;text-align:left}:host [auro-dropdown]{--ds-auro-dropdown-trigger-background-color: transparent}:host #inputInBib::part(wrapper){box-shadow:none}:host #inputInBib::part(accent-left){display:none}:host([layout*=classic]) [auro-input]{width:100%}:host([layout*=classic]) [auro-input]::part(helpText){display:none}:host([layout*=classic]) #slotHolder{display:none}`;
13864
13753