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

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 (62) hide show
  1. package/CHANGELOG.md +2 -2
  2. package/README.md +133 -183
  3. package/components/checkbox/demo/api.min.js +3 -3
  4. package/components/checkbox/demo/index.min.js +3 -3
  5. package/components/checkbox/dist/index.js +3 -3
  6. package/components/checkbox/dist/registered.js +3 -3
  7. package/components/combobox/demo/api.html +1 -0
  8. package/components/combobox/demo/api.js +3 -1
  9. package/components/combobox/demo/api.md +75 -0
  10. package/components/combobox/demo/api.min.js +314 -172
  11. package/components/combobox/demo/index.min.js +301 -171
  12. package/components/combobox/dist/comboboxKeyboardStrategy.d.ts +1 -1
  13. package/components/combobox/dist/index.js +291 -171
  14. package/components/combobox/dist/registered.js +291 -171
  15. package/components/counter/demo/api.html +3 -0
  16. package/components/counter/demo/api.js +4 -0
  17. package/components/counter/demo/api.md +130 -0
  18. package/components/counter/demo/api.min.js +320 -167
  19. package/components/counter/demo/index.min.js +300 -167
  20. package/components/counter/dist/counterGroupKeyboardStrategy.d.ts +3 -0
  21. package/components/counter/dist/index.js +300 -167
  22. package/components/counter/dist/registered.js +300 -167
  23. package/components/datepicker/demo/api.html +1 -0
  24. package/components/datepicker/demo/api.js +2 -0
  25. package/components/datepicker/demo/api.md +57 -0
  26. package/components/datepicker/demo/api.min.js +376 -171
  27. package/components/datepicker/demo/index.min.js +364 -171
  28. package/components/datepicker/dist/datepickerKeyboardStrategy.d.ts +3 -1
  29. package/components/datepicker/dist/index.js +364 -171
  30. package/components/datepicker/dist/registered.js +364 -171
  31. package/components/dropdown/demo/api.html +1 -0
  32. package/components/dropdown/demo/api.js +2 -0
  33. package/components/dropdown/demo/api.md +95 -0
  34. package/components/dropdown/demo/api.min.js +296 -165
  35. package/components/dropdown/demo/index.min.js +276 -165
  36. package/components/dropdown/dist/index.js +276 -165
  37. package/components/dropdown/dist/registered.js +276 -165
  38. package/components/form/demo/api.min.js +1254 -684
  39. package/components/form/demo/index.min.js +1254 -684
  40. package/components/input/demo/api.min.js +1 -1
  41. package/components/input/demo/index.min.js +1 -1
  42. package/components/input/dist/index.js +1 -1
  43. package/components/input/dist/registered.js +1 -1
  44. package/components/menu/demo/api.md +1 -0
  45. package/components/menu/demo/api.min.js +10 -0
  46. package/components/menu/demo/index.min.js +10 -0
  47. package/components/menu/dist/auro-menuoption.d.ts +9 -0
  48. package/components/menu/dist/index.js +10 -0
  49. package/components/menu/dist/registered.js +10 -0
  50. package/components/radio/demo/api.min.js +2 -2
  51. package/components/radio/demo/index.min.js +2 -2
  52. package/components/radio/dist/index.js +2 -2
  53. package/components/radio/dist/registered.js +2 -2
  54. package/components/select/demo/api.html +1 -0
  55. package/components/select/demo/api.js +2 -0
  56. package/components/select/demo/api.md +76 -0
  57. package/components/select/demo/api.min.js +306 -169
  58. package/components/select/demo/index.min.js +293 -169
  59. package/components/select/dist/index.js +283 -169
  60. package/components/select/dist/registered.js +283 -169
  61. package/custom-elements.json +48 -3
  62. package/package.json +5 -3
@@ -152,7 +152,7 @@ let AuroLibraryRuntimeUtils$4 = class AuroLibraryRuntimeUtils {
152
152
  }
153
153
  };
154
154
 
155
- // Copyright (c) 2026 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
155
+ // Copyright (c) 2026 Alaska Airlines. All rights reserved. Licensed under the Apache-2.0 license
156
156
  // See LICENSE in the project root for license information.
157
157
 
158
158
 
@@ -1471,9 +1471,9 @@ let AuroHelpText$1 = class AuroHelpText extends LitElement {
1471
1471
  }
1472
1472
  };
1473
1473
 
1474
- var formkitVersion$1 = '202604072212';
1474
+ var formkitVersion$1 = '202604091759';
1475
1475
 
1476
- // Copyright (c) 2026 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
1476
+ // Copyright (c) 2026 Alaska Airlines. All rights reserved. Licensed under the Apache-2.0 license
1477
1477
  // See LICENSE in the project root for license information.
1478
1478
 
1479
1479
  const keyboardStrategy = {
@@ -3769,11 +3769,19 @@ class AuroFloatingUI {
3769
3769
  * This ensures that the bib content has the same dimensions as the sizer element.
3770
3770
  */
3771
3771
  mirrorSize() {
3772
+ const element = this.element;
3773
+ if (!element) {
3774
+ return;
3775
+ }
3776
+
3772
3777
  // mirror the boxsize from bibSizer
3773
- if (this.element.bibSizer && this.element.matchWidth) {
3774
- const sizerStyle = window.getComputedStyle(this.element.bibSizer);
3775
- const bibContent =
3776
- this.element.bib.shadowRoot.querySelector(".container");
3778
+ if (element.bibSizer && element.matchWidth && element.bib?.shadowRoot) {
3779
+ const sizerStyle = window.getComputedStyle(element.bibSizer);
3780
+ const bibContent = element.bib.shadowRoot.querySelector(".container");
3781
+ if (!bibContent) {
3782
+ return;
3783
+ }
3784
+
3777
3785
  if (sizerStyle.width !== "0px") {
3778
3786
  bibContent.style.width = sizerStyle.width;
3779
3787
  }
@@ -3795,9 +3803,14 @@ class AuroFloatingUI {
3795
3803
  * @returns {String} The positioning strategy, one of 'fullscreen', 'floating', 'cover'.
3796
3804
  */
3797
3805
  getPositioningStrategy() {
3806
+ const element = this.element;
3807
+ if (!element) {
3808
+ return "floating";
3809
+ }
3810
+
3798
3811
  const breakpoint =
3799
- this.element.bib.mobileFullscreenBreakpoint ||
3800
- this.element.floaterConfig?.fullscreenBreakpoint;
3812
+ element.bib?.mobileFullscreenBreakpoint ||
3813
+ element.floaterConfig?.fullscreenBreakpoint;
3801
3814
  switch (this.behavior) {
3802
3815
  case "tooltip":
3803
3816
  return "floating";
@@ -3808,9 +3821,9 @@ class AuroFloatingUI {
3808
3821
  `(max-width: ${breakpoint})`,
3809
3822
  ).matches;
3810
3823
 
3811
- this.element.expanded = smallerThanBreakpoint;
3824
+ element.expanded = smallerThanBreakpoint;
3812
3825
  }
3813
- if (this.element.nested) {
3826
+ if (element.nested) {
3814
3827
  return "cover";
3815
3828
  }
3816
3829
  return "fullscreen";
@@ -3840,42 +3853,65 @@ class AuroFloatingUI {
3840
3853
  * and applies the calculated position to the bib's style.
3841
3854
  */
3842
3855
  position() {
3856
+ const element = this.element;
3857
+ if (!element) {
3858
+ return;
3859
+ }
3860
+
3843
3861
  const strategy = this.getPositioningStrategy();
3844
3862
  this.configureBibStrategy(strategy);
3845
3863
 
3846
3864
  if (strategy === "floating") {
3865
+ if (!element.trigger || !element.bib) {
3866
+ return;
3867
+ }
3868
+
3847
3869
  this.mirrorSize();
3848
3870
  // Define the middlware for the floater configuration
3849
3871
  const middleware = [
3850
- offset(this.element.floaterConfig?.offset || 0),
3851
- ...(this.element.floaterConfig?.shift ? [shift()] : []), // Add shift middleware if shift is enabled.
3852
- ...(this.element.floaterConfig?.flip ? [flip()] : []), // Add flip middleware if flip is enabled.
3853
- ...(this.element.floaterConfig?.autoPlacement ? [autoPlacement()] : []), // Add autoPlacement middleware if autoPlacement is enabled.
3872
+ offset(element.floaterConfig?.offset || 0),
3873
+ ...(element.floaterConfig?.shift ? [shift()] : []), // Add shift middleware if shift is enabled.
3874
+ ...(element.floaterConfig?.flip ? [flip()] : []), // Add flip middleware if flip is enabled.
3875
+ ...(element.floaterConfig?.autoPlacement ? [autoPlacement()] : []), // Add autoPlacement middleware if autoPlacement is enabled.
3854
3876
  ];
3855
3877
 
3856
3878
  // Compute the position of the bib
3857
- computePosition(this.element.trigger, this.element.bib, {
3858
- strategy: this.element.floaterConfig?.strategy || "fixed",
3859
- placement: this.element.floaterConfig?.placement,
3879
+ computePosition(element.trigger, element.bib, {
3880
+ strategy: element.floaterConfig?.strategy || "fixed",
3881
+ placement: element.floaterConfig?.placement,
3860
3882
  middleware: middleware || [],
3861
3883
  }).then(({ x, y }) => {
3862
3884
  // eslint-disable-line id-length
3863
- Object.assign(this.element.bib.style, {
3885
+ const currentElement = this.element;
3886
+ if (!currentElement?.bib) {
3887
+ return;
3888
+ }
3889
+
3890
+ Object.assign(currentElement.bib.style, {
3864
3891
  left: `${x}px`,
3865
3892
  top: `${y}px`,
3866
3893
  });
3867
3894
  });
3868
3895
  } else if (strategy === "cover") {
3896
+ if (!element.parentNode || !element.bib) {
3897
+ return;
3898
+ }
3899
+
3869
3900
  // Compute the position of the bib
3870
- computePosition(this.element.parentNode, this.element.bib, {
3901
+ computePosition(element.parentNode, element.bib, {
3871
3902
  placement: "bottom-start",
3872
3903
  }).then(({ x, y }) => {
3873
3904
  // eslint-disable-line id-length
3874
- Object.assign(this.element.bib.style, {
3905
+ const currentElement = this.element;
3906
+ if (!currentElement?.bib || !currentElement.parentNode) {
3907
+ return;
3908
+ }
3909
+
3910
+ Object.assign(currentElement.bib.style, {
3875
3911
  left: `${x}px`,
3876
- top: `${y - this.element.parentNode.offsetHeight}px`,
3877
- width: `${this.element.parentNode.offsetWidth}px`,
3878
- height: `${this.element.parentNode.offsetHeight}px`,
3912
+ top: `${y - currentElement.parentNode.offsetHeight}px`,
3913
+ width: `${currentElement.parentNode.offsetWidth}px`,
3914
+ height: `${currentElement.parentNode.offsetHeight}px`,
3879
3915
  });
3880
3916
  });
3881
3917
  }
@@ -3887,11 +3923,17 @@ class AuroFloatingUI {
3887
3923
  * @param {Boolean} lock - If true, locks the body's scrolling functionlity; otherwise, unlock.
3888
3924
  */
3889
3925
  lockScroll(lock = true) {
3926
+ const element = this.element;
3927
+
3890
3928
  if (lock) {
3929
+ if (!element?.bib) {
3930
+ return;
3931
+ }
3932
+
3891
3933
  document.body.style.overflow = "hidden"; // hide body's scrollbar
3892
3934
 
3893
3935
  // Move `bib` by the amount the viewport is shifted to stay aligned in fullscreen.
3894
- this.element.bib.style.transform = `translateY(${window?.visualViewport?.offsetTop}px)`;
3936
+ element.bib.style.transform = `translateY(${window?.visualViewport?.offsetTop}px)`;
3895
3937
  } else {
3896
3938
  document.body.style.overflow = "";
3897
3939
  }
@@ -3907,20 +3949,24 @@ class AuroFloatingUI {
3907
3949
  * @param {string} strategy - The positioning strategy ('fullscreen' or 'floating').
3908
3950
  */
3909
3951
  configureBibStrategy(value) {
3952
+ const element = this.element;
3953
+ if (!element?.bib) {
3954
+ return;
3955
+ }
3956
+
3910
3957
  if (value === "fullscreen") {
3911
- this.element.isBibFullscreen = true;
3958
+ element.isBibFullscreen = true;
3912
3959
  // reset the prev position
3913
- this.element.bib.setAttribute("isfullscreen", "");
3914
- this.element.bib.style.position = "fixed";
3915
- this.element.bib.style.top = "0px";
3916
- this.element.bib.style.left = "0px";
3917
- this.element.bib.style.width = "";
3918
- this.element.bib.style.height = "";
3919
- this.element.style.contain = "";
3960
+ element.bib.setAttribute("isfullscreen", "");
3961
+ element.bib.style.position = "fixed";
3962
+ element.bib.style.top = "0px";
3963
+ element.bib.style.left = "0px";
3964
+ element.bib.style.width = "";
3965
+ element.bib.style.height = "";
3966
+ element.style.contain = "";
3920
3967
 
3921
3968
  // reset the size that was mirroring `size` css-part
3922
- const bibContent =
3923
- this.element.bib.shadowRoot.querySelector(".container");
3969
+ const bibContent = element.bib.shadowRoot?.querySelector(".container");
3924
3970
  if (bibContent) {
3925
3971
  bibContent.style.width = "";
3926
3972
  bibContent.style.height = "";
@@ -3935,14 +3981,14 @@ class AuroFloatingUI {
3935
3981
  }, 0);
3936
3982
  }
3937
3983
 
3938
- if (this.element.isPopoverVisible) {
3984
+ if (element.isPopoverVisible) {
3939
3985
  this.lockScroll(true);
3940
3986
  }
3941
3987
  } else {
3942
- this.element.bib.style.position = "";
3943
- this.element.bib.removeAttribute("isfullscreen");
3944
- this.element.isBibFullscreen = false;
3945
- this.element.style.contain = "layout";
3988
+ element.bib.style.position = "";
3989
+ element.bib.removeAttribute("isfullscreen");
3990
+ element.isBibFullscreen = false;
3991
+ element.style.contain = "layout";
3946
3992
  }
3947
3993
 
3948
3994
  const isChanged = this.strategy && this.strategy !== value;
@@ -3960,16 +4006,21 @@ class AuroFloatingUI {
3960
4006
  },
3961
4007
  );
3962
4008
 
3963
- this.element.dispatchEvent(event);
4009
+ element.dispatchEvent(event);
3964
4010
  }
3965
4011
  }
3966
4012
 
3967
4013
  updateState() {
3968
- const isVisible = this.element.isPopoverVisible;
4014
+ const element = this.element;
4015
+ if (!element) {
4016
+ return;
4017
+ }
4018
+
4019
+ const isVisible = element.isPopoverVisible;
3969
4020
  if (!isVisible) {
3970
4021
  this.cleanupHideHandlers();
3971
4022
  try {
3972
- this.element.cleanup?.();
4023
+ element.cleanup?.();
3973
4024
  } catch (error) {
3974
4025
  // Do nothing
3975
4026
  }
@@ -3985,28 +4036,30 @@ class AuroFloatingUI {
3985
4036
  * If not, and if the bib isn't in fullscreen mode with focus lost, it hides the bib.
3986
4037
  */
3987
4038
  handleFocusLoss() {
4039
+ const element = this.element;
4040
+ if (!element?.bib) {
4041
+ return;
4042
+ }
4043
+
3988
4044
  // if mouse is being pressed, skip and let click event to handle the action
3989
4045
  if (AuroFloatingUI.isMousePressed) {
3990
4046
  return;
3991
4047
  }
3992
4048
 
3993
4049
  if (
3994
- this.element.noHideOnThisFocusLoss ||
3995
- this.element.hasAttribute("noHideOnThisFocusLoss")
4050
+ element.noHideOnThisFocusLoss ||
4051
+ element.hasAttribute("noHideOnThisFocusLoss")
3996
4052
  ) {
3997
4053
  return;
3998
4054
  }
3999
4055
 
4000
4056
  // if focus is still inside of trigger or bib, do not close
4001
- if (
4002
- this.element.matches(":focus") ||
4003
- this.element.matches(":focus-within")
4004
- ) {
4057
+ if (element.matches(":focus") || element.matches(":focus-within")) {
4005
4058
  return;
4006
4059
  }
4007
4060
 
4008
4061
  // if fullscreen bib is in fullscreen mode, do not close
4009
- if (this.element.bib.hasAttribute("isfullscreen")) {
4062
+ if (element.bib.hasAttribute("isfullscreen")) {
4010
4063
  return;
4011
4064
  }
4012
4065
 
@@ -4014,23 +4067,33 @@ class AuroFloatingUI {
4014
4067
  }
4015
4068
 
4016
4069
  setupHideHandlers() {
4070
+ const element = this.element;
4071
+ if (!element) {
4072
+ return;
4073
+ }
4074
+
4017
4075
  // Define handlers & store references
4018
4076
  this.focusHandler = () => this.handleFocusLoss();
4019
4077
 
4020
4078
  this.clickHandler = (evt) => {
4079
+ const element = this.element;
4080
+ if (!element?.bib) {
4081
+ return;
4082
+ }
4083
+
4021
4084
  // When the bib is fullscreen (modal dialog), don't close on outside
4022
4085
  // clicks. VoiceOver's synthetic click events inside a top-layer modal
4023
4086
  // <dialog> may not include the bib in composedPath(), causing false
4024
4087
  // positives. This mirrors the fullscreen guard in handleFocusLoss().
4025
- if (this.element.bib && this.element.bib.hasAttribute("isfullscreen")) {
4088
+ if (element.bib.hasAttribute("isfullscreen")) {
4026
4089
  return;
4027
4090
  }
4028
4091
 
4029
4092
  if (
4030
- (!evt.composedPath().includes(this.element.trigger) &&
4031
- !evt.composedPath().includes(this.element.bib)) ||
4032
- (this.element.bib.backdrop &&
4033
- evt.composedPath().includes(this.element.bib.backdrop))
4093
+ (!evt.composedPath().includes(element.trigger) &&
4094
+ !evt.composedPath().includes(element.bib)) ||
4095
+ (element.bib.backdrop &&
4096
+ evt.composedPath().includes(element.bib.backdrop))
4034
4097
  ) {
4035
4098
  const existedVisibleFloatingUI =
4036
4099
  document.expandedAuroFormkitDropdown || document.expandedAuroFloater;
@@ -4051,7 +4114,12 @@ class AuroFloatingUI {
4051
4114
 
4052
4115
  // ESC key handler
4053
4116
  this.keyDownHandler = (evt) => {
4054
- if (evt.key === "Escape" && this.element.isPopoverVisible) {
4117
+ const element = this.element;
4118
+ if (!element) {
4119
+ return;
4120
+ }
4121
+
4122
+ if (evt.key === "Escape" && element.isPopoverVisible) {
4055
4123
  const existedVisibleFloatingUI =
4056
4124
  document.expandedAuroFormkitDropdown || document.expandedAuroFloater;
4057
4125
  if (
@@ -4108,6 +4176,10 @@ class AuroFloatingUI {
4108
4176
  }
4109
4177
 
4110
4178
  updateCurrentExpandedDropdown() {
4179
+ if (!this.element) {
4180
+ return;
4181
+ }
4182
+
4111
4183
  // Close any other dropdown that is already open
4112
4184
  const existedVisibleFloatingUI =
4113
4185
  document.expandedAuroFormkitDropdown || document.expandedAuroFloater;
@@ -4124,25 +4196,34 @@ class AuroFloatingUI {
4124
4196
  }
4125
4197
 
4126
4198
  showBib() {
4127
- if (!this.element.disabled && !this.showing) {
4199
+ const element = this.element;
4200
+ if (!element) {
4201
+ return;
4202
+ }
4203
+
4204
+ if (!element.bib || (!element.trigger && !element.parentNode)) {
4205
+ return;
4206
+ }
4207
+
4208
+ if (!element.disabled && !this.showing) {
4128
4209
  this.updateCurrentExpandedDropdown();
4129
- this.element.triggerChevron?.setAttribute("data-expanded", true);
4210
+ element.triggerChevron?.setAttribute("data-expanded", true);
4130
4211
 
4131
4212
  // prevent double showing: isPopovervisible gets first and showBib gets called later
4132
4213
  if (!this.showing) {
4133
- if (!this.element.modal) {
4214
+ if (!element.modal) {
4134
4215
  this.setupHideHandlers();
4135
4216
  }
4136
4217
  this.showing = true;
4137
- this.element.isPopoverVisible = true;
4218
+ element.isPopoverVisible = true;
4138
4219
  this.position();
4139
4220
  this.dispatchEventDropdownToggle();
4140
4221
  }
4141
4222
 
4142
4223
  // Setup auto update to handle resize and scroll
4143
- this.element.cleanup = autoUpdate(
4144
- this.element.trigger || this.element.parentNode,
4145
- this.element.bib,
4224
+ element.cleanup = autoUpdate(
4225
+ element.trigger || element.parentNode,
4226
+ element.bib,
4146
4227
  () => {
4147
4228
  this.position();
4148
4229
  },
@@ -4155,22 +4236,27 @@ class AuroFloatingUI {
4155
4236
  * @param {String} eventType - The event type that triggered the hiding action.
4156
4237
  */
4157
4238
  hideBib(eventType = "unknown") {
4158
- if (this.element.disabled) {
4239
+ const element = this.element;
4240
+ if (!element) {
4241
+ return;
4242
+ }
4243
+
4244
+ if (element.disabled) {
4159
4245
  return;
4160
4246
  }
4161
4247
 
4162
4248
  // noToggle dropdowns should not close when the trigger is clicked (the
4163
4249
  // "toggle" behavior), but they CAN still close via other interactions like
4164
4250
  // Escape key or focus loss.
4165
- if (this.element.noToggle && eventType === "click") {
4251
+ if (element.noToggle && eventType === "click") {
4166
4252
  return;
4167
4253
  }
4168
4254
 
4169
4255
  this.lockScroll(false);
4170
- this.element.triggerChevron?.removeAttribute("data-expanded");
4256
+ element.triggerChevron?.removeAttribute("data-expanded");
4171
4257
 
4172
- if (this.element.isPopoverVisible) {
4173
- this.element.isPopoverVisible = false;
4258
+ if (element.isPopoverVisible) {
4259
+ element.isPopoverVisible = false;
4174
4260
  }
4175
4261
  if (this.showing) {
4176
4262
  this.cleanupHideHandlers();
@@ -4190,6 +4276,11 @@ class AuroFloatingUI {
4190
4276
  * @param {String} eventType - The event type that triggered the toggle action.
4191
4277
  */
4192
4278
  dispatchEventDropdownToggle(eventType) {
4279
+ const element = this.element;
4280
+ if (!element) {
4281
+ return;
4282
+ }
4283
+
4193
4284
  const event = new CustomEvent(
4194
4285
  this.eventPrefix ? `${this.eventPrefix}-toggled` : "toggled",
4195
4286
  {
@@ -4201,11 +4292,16 @@ class AuroFloatingUI {
4201
4292
  },
4202
4293
  );
4203
4294
 
4204
- this.element.dispatchEvent(event);
4295
+ element.dispatchEvent(event);
4205
4296
  }
4206
4297
 
4207
4298
  handleClick() {
4208
- if (this.element.isPopoverVisible) {
4299
+ const element = this.element;
4300
+ if (!element) {
4301
+ return;
4302
+ }
4303
+
4304
+ if (element.isPopoverVisible) {
4209
4305
  this.hideBib("click");
4210
4306
  } else {
4211
4307
  this.showBib();
@@ -4216,63 +4312,66 @@ class AuroFloatingUI {
4216
4312
  {
4217
4313
  composed: true,
4218
4314
  detail: {
4219
- expanded: this.element.isPopoverVisible,
4315
+ expanded: element.isPopoverVisible,
4220
4316
  },
4221
4317
  },
4222
4318
  );
4223
4319
 
4224
- this.element.dispatchEvent(event);
4320
+ element.dispatchEvent(event);
4225
4321
  }
4226
4322
 
4227
4323
  handleEvent(event) {
4228
- if (!this.element.disableEventShow) {
4229
- switch (event.type) {
4230
- case "keydown": {
4231
- // Support both Enter and Space keys for accessibility
4232
- // Space is included as it's expected behavior for interactive elements
4233
-
4234
- const origin = event.composedPath()[0];
4235
- if (
4236
- event.key === "Enter" ||
4237
- (event.key === " " && (!origin || origin.tagName !== "INPUT"))
4238
- ) {
4239
- event.preventDefault();
4240
- this.handleClick();
4241
- }
4242
- break;
4243
- }
4244
- case "mouseenter":
4245
- if (this.element.hoverToggle) {
4246
- this.showBib();
4247
- }
4248
- break;
4249
- case "mouseleave":
4250
- if (this.element.hoverToggle) {
4251
- this.hideBib("mouseleave");
4252
- }
4253
- break;
4254
- case "focus":
4255
- if (this.element.focusShow) {
4256
- /*
4257
- This needs to better handle clicking that gives focus -
4258
- currently it shows and then immediately hides the bib
4259
- */
4260
- this.showBib();
4261
- }
4262
- break;
4263
- case "blur":
4264
- // send this task 100ms later queue to
4265
- // wait a frame in case focus moves within the floating element/bib
4266
- setTimeout(() => this.handleFocusLoss(), 0);
4267
- break;
4268
- case "click":
4269
- if (document.activeElement === document.body) {
4270
- event.currentTarget.focus();
4271
- }
4324
+ const element = this.element;
4325
+ if (!element || element.disableEventShow) {
4326
+ return;
4327
+ }
4328
+
4329
+ switch (event.type) {
4330
+ case "keydown": {
4331
+ // Support both Enter and Space keys for accessibility
4332
+ // Space is included as it's expected behavior for interactive elements
4333
+
4334
+ const origin = event.composedPath()[0];
4335
+ if (
4336
+ event.key === "Enter" ||
4337
+ (event.key === " " && (!origin || origin.tagName !== "INPUT"))
4338
+ ) {
4339
+ event.preventDefault();
4272
4340
  this.handleClick();
4273
- break;
4274
- // Do nothing
4341
+ }
4342
+ break;
4275
4343
  }
4344
+ case "mouseenter":
4345
+ if (element.hoverToggle) {
4346
+ this.showBib();
4347
+ }
4348
+ break;
4349
+ case "mouseleave":
4350
+ if (element.hoverToggle) {
4351
+ this.hideBib("mouseleave");
4352
+ }
4353
+ break;
4354
+ case "focus":
4355
+ if (element.focusShow) {
4356
+ /*
4357
+ This needs to better handle clicking that gives focus -
4358
+ currently it shows and then immediately hides the bib
4359
+ */
4360
+ this.showBib();
4361
+ }
4362
+ break;
4363
+ case "blur":
4364
+ // send this task 100ms later queue to
4365
+ // wait a frame in case focus moves within the floating element/bib
4366
+ setTimeout(() => this.handleFocusLoss(), 0);
4367
+ break;
4368
+ case "click":
4369
+ if (document.activeElement === document.body) {
4370
+ event.currentTarget.focus();
4371
+ }
4372
+ this.handleClick();
4373
+ break;
4374
+ // Do nothing
4276
4375
  }
4277
4376
  }
4278
4377
 
@@ -4283,6 +4382,11 @@ class AuroFloatingUI {
4283
4382
  * This prevents the component itself from being focusable when the trigger element already handles focus.
4284
4383
  */
4285
4384
  handleTriggerTabIndex() {
4385
+ const element = this.element;
4386
+ if (!element) {
4387
+ return;
4388
+ }
4389
+
4286
4390
  const focusableElementSelectors = [
4287
4391
  "a",
4288
4392
  "button",
@@ -4295,7 +4399,7 @@ class AuroFloatingUI {
4295
4399
  "auro-hyperlink",
4296
4400
  ];
4297
4401
 
4298
- const triggerNode = this.element.querySelectorAll('[slot="trigger"]')[0];
4402
+ const triggerNode = element.querySelectorAll('[slot="trigger"]')[0];
4299
4403
  if (!triggerNode) {
4300
4404
  return;
4301
4405
  }
@@ -4304,13 +4408,13 @@ class AuroFloatingUI {
4304
4408
  focusableElementSelectors.forEach((selector) => {
4305
4409
  // Check if the trigger node element is focusable
4306
4410
  if (triggerNodeTagName === selector) {
4307
- this.element.tabIndex = -1;
4411
+ element.tabIndex = -1;
4308
4412
  return;
4309
4413
  }
4310
4414
 
4311
4415
  // Check if any child is focusable
4312
4416
  if (triggerNode.querySelector(selector)) {
4313
- this.element.tabIndex = -1;
4417
+ element.tabIndex = -1;
4314
4418
  }
4315
4419
  });
4316
4420
  }
@@ -4320,13 +4424,18 @@ class AuroFloatingUI {
4320
4424
  * @param {*} eventPrefix
4321
4425
  */
4322
4426
  regenerateBibId() {
4323
- this.id = this.element.getAttribute("id");
4427
+ const element = this.element;
4428
+ if (!element) {
4429
+ return;
4430
+ }
4431
+
4432
+ this.id = element.getAttribute("id");
4324
4433
  if (!this.id) {
4325
4434
  this.id = window.crypto.randomUUID();
4326
- this.element.setAttribute("id", this.id);
4435
+ element.setAttribute("id", this.id);
4327
4436
  }
4328
4437
 
4329
- this.element.bib.setAttribute("id", `${this.id}-floater-bib`);
4438
+ element.bib?.setAttribute("id", `${this.id}-floater-bib`);
4330
4439
  }
4331
4440
 
4332
4441
  configure(elem, eventPrefix, enableKeyboardHandling = true) {
@@ -4338,67 +4447,69 @@ class AuroFloatingUI {
4338
4447
  this.element = elem;
4339
4448
  }
4340
4449
 
4341
- if (this.behavior !== this.element.behavior) {
4342
- this.behavior = this.element.behavior;
4450
+ const element = this.element;
4451
+ if (!element) {
4452
+ return;
4453
+ }
4454
+
4455
+ if (this.behavior !== element.behavior) {
4456
+ this.behavior = element.behavior;
4343
4457
  }
4344
4458
 
4345
- if (this.element.trigger) {
4459
+ if (element.trigger) {
4346
4460
  this.disconnect();
4347
4461
  }
4348
- this.element.trigger =
4349
- this.element.triggerElement ||
4350
- this.element.shadowRoot.querySelector("#trigger") ||
4351
- this.element.trigger;
4352
- this.element.bib =
4353
- this.element.shadowRoot.querySelector("#bib") || this.element.bib;
4354
- this.element.bibSizer = this.element.shadowRoot.querySelector("#bibSizer");
4355
- this.element.triggerChevron =
4356
- this.element.shadowRoot.querySelector("#showStateIcon");
4462
+ element.trigger =
4463
+ element.triggerElement ||
4464
+ element.shadowRoot?.querySelector("#trigger") ||
4465
+ element.trigger;
4466
+ element.bib = element.shadowRoot?.querySelector("#bib") || element.bib;
4467
+ element.bibSizer = element.shadowRoot?.querySelector("#bibSizer");
4468
+ element.triggerChevron =
4469
+ element.shadowRoot?.querySelector("#showStateIcon");
4357
4470
 
4358
- if (this.element.floaterConfig) {
4359
- this.element.hoverToggle = this.element.floaterConfig.hoverToggle;
4471
+ if (element.floaterConfig) {
4472
+ element.hoverToggle = element.floaterConfig.hoverToggle;
4360
4473
  }
4361
4474
 
4362
4475
  this.regenerateBibId();
4363
4476
  this.handleTriggerTabIndex();
4364
4477
 
4365
4478
  this.handleEvent = this.handleEvent.bind(this);
4366
- if (this.element.trigger) {
4479
+ if (element.trigger) {
4367
4480
  if (this.enableKeyboardHandling) {
4368
- this.element.trigger.addEventListener("keydown", this.handleEvent);
4481
+ element.trigger.addEventListener("keydown", this.handleEvent);
4369
4482
  }
4370
- this.element.trigger.addEventListener("click", this.handleEvent);
4371
- this.element.trigger.addEventListener("mouseenter", this.handleEvent);
4372
- this.element.trigger.addEventListener("mouseleave", this.handleEvent);
4373
- this.element.trigger.addEventListener("focus", this.handleEvent);
4374
- this.element.trigger.addEventListener("blur", this.handleEvent);
4483
+ element.trigger.addEventListener("click", this.handleEvent);
4484
+ element.trigger.addEventListener("mouseenter", this.handleEvent);
4485
+ element.trigger.addEventListener("mouseleave", this.handleEvent);
4486
+ element.trigger.addEventListener("focus", this.handleEvent);
4487
+ element.trigger.addEventListener("blur", this.handleEvent);
4375
4488
  }
4376
4489
  }
4377
4490
 
4378
4491
  disconnect() {
4379
4492
  this.cleanupHideHandlers();
4380
- if (this.element) {
4381
- this.element.cleanup?.();
4382
4493
 
4383
- if (this.element.bib) {
4384
- this.element.shadowRoot.append(this.element.bib);
4385
- }
4494
+ const element = this.element;
4495
+ if (!element) {
4496
+ return;
4497
+ }
4386
4498
 
4387
- // Remove event & keyboard listeners
4388
- if (this.element?.trigger) {
4389
- this.element.trigger.removeEventListener("keydown", this.handleEvent);
4390
- this.element.trigger.removeEventListener("click", this.handleEvent);
4391
- this.element.trigger.removeEventListener(
4392
- "mouseenter",
4393
- this.handleEvent,
4394
- );
4395
- this.element.trigger.removeEventListener(
4396
- "mouseleave",
4397
- this.handleEvent,
4398
- );
4399
- this.element.trigger.removeEventListener("focus", this.handleEvent);
4400
- this.element.trigger.removeEventListener("blur", this.handleEvent);
4401
- }
4499
+ element.cleanup?.();
4500
+
4501
+ if (element.bib && element.shadowRoot) {
4502
+ element.shadowRoot.append(element.bib);
4503
+ }
4504
+
4505
+ // Remove event & keyboard listeners
4506
+ if (element.trigger) {
4507
+ element.trigger.removeEventListener("keydown", this.handleEvent);
4508
+ element.trigger.removeEventListener("click", this.handleEvent);
4509
+ element.trigger.removeEventListener("mouseenter", this.handleEvent);
4510
+ element.trigger.removeEventListener("mouseleave", this.handleEvent);
4511
+ element.trigger.removeEventListener("focus", this.handleEvent);
4512
+ element.trigger.removeEventListener("blur", this.handleEvent);
4402
4513
  }
4403
4514
  }
4404
4515
  }
@@ -5526,7 +5637,7 @@ class AuroHelpText extends LitElement {
5526
5637
  }
5527
5638
  }
5528
5639
 
5529
- var formkitVersion = '202604072212';
5640
+ var formkitVersion = '202604091759';
5530
5641
 
5531
5642
  let AuroElement$1 = class AuroElement extends LitElement {
5532
5643
  static get properties() {
@@ -5632,7 +5743,7 @@ let AuroElement$1 = class AuroElement extends LitElement {
5632
5743
  }
5633
5744
  };
5634
5745
 
5635
- // Copyright (c) 2026 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
5746
+ // Copyright (c) 2026 Alaska Airlines. All rights reserved. Licensed under the Apache-2.0 license
5636
5747
  // See LICENSE in the project root for license information.
5637
5748
 
5638
5749
 
@@ -7192,6 +7303,24 @@ class AuroElement extends LitElement {
7192
7303
  }
7193
7304
  }
7194
7305
 
7306
+ // Copyright (c) 2026 Alaska Airlines. All rights reserved. Licensed under the Apache-2.0 license
7307
+ // See LICENSE in the project root for license information.
7308
+
7309
+ const counterGroupKeyboardStrategy = {
7310
+ Escape(component, evt) {
7311
+ if (!component.dropdown || !component.dropdown.isPopoverVisible) {
7312
+ return;
7313
+ }
7314
+
7315
+ // Prevent the Escape key from bubbling up and closing any parent dialogs / drawers / popups.
7316
+ // Because stopPropagation prevents the document-level floatingUI keydown handler from
7317
+ // seeing this event, we must also close the dropdown explicitly.
7318
+ evt.stopPropagation();
7319
+
7320
+ component.dropdown.hide();
7321
+ },
7322
+ };
7323
+
7195
7324
  /* eslint-disable lit/no-invalid-html, lit/binding-positions, max-lines, no-underscore-dangle, arrow-parens, no-confusing-arrow, curly, dot-location, no-inline-comments, line-comment-position,
7196
7325
  */
7197
7326
 
@@ -7792,6 +7921,10 @@ class AuroCounterGroup extends AuroElement {
7792
7921
  super.firstUpdated();
7793
7922
  this.updateValue();
7794
7923
  this.updateValueText();
7924
+
7925
+ if (this.isDropdown) {
7926
+ applyKeyboardStrategy$1(this, counterGroupKeyboardStrategy);
7927
+ }
7795
7928
  }
7796
7929
 
7797
7930
  /**