@aurodesignsystem-dev/auro-formkit 0.0.0-pr1395.2 → 0.0.0-pr1396.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/components/checkbox/demo/api.min.js +1 -1
  2. package/components/checkbox/demo/index.min.js +1 -1
  3. package/components/checkbox/dist/index.js +1 -1
  4. package/components/checkbox/dist/registered.js +1 -1
  5. package/components/combobox/demo/api.min.js +45 -13
  6. package/components/combobox/demo/index.min.js +45 -13
  7. package/components/combobox/dist/index.js +45 -13
  8. package/components/combobox/dist/registered.js +45 -13
  9. package/components/counter/demo/api.min.js +44 -12
  10. package/components/counter/demo/index.min.js +44 -12
  11. package/components/counter/dist/index.js +44 -12
  12. package/components/counter/dist/registered.js +44 -12
  13. package/components/datepicker/demo/api.min.js +51 -85
  14. package/components/datepicker/demo/index.min.js +51 -85
  15. package/components/datepicker/dist/index.js +51 -85
  16. package/components/datepicker/dist/registered.js +51 -85
  17. package/components/dropdown/demo/api.min.js +43 -11
  18. package/components/dropdown/demo/index.min.js +43 -11
  19. package/components/dropdown/dist/auro-dropdownBib.d.ts +14 -2
  20. package/components/dropdown/dist/index.js +43 -11
  21. package/components/dropdown/dist/registered.js +43 -11
  22. package/components/form/demo/api.min.js +187 -125
  23. package/components/form/demo/index.min.js +187 -125
  24. package/components/input/demo/api.min.js +1 -1
  25. package/components/input/demo/index.min.js +1 -1
  26. package/components/input/dist/index.js +1 -1
  27. package/components/input/dist/registered.js +1 -1
  28. package/components/radio/demo/api.min.js +1 -1
  29. package/components/radio/demo/index.min.js +1 -1
  30. package/components/radio/dist/index.js +1 -1
  31. package/components/radio/dist/registered.js +1 -1
  32. package/components/select/demo/api.min.js +44 -12
  33. package/components/select/demo/index.min.js +44 -12
  34. package/components/select/dist/index.js +44 -12
  35. package/components/select/dist/registered.js +44 -12
  36. package/custom-elements.json +1418 -1420
  37. package/package.json +2 -1
  38. package/components/datepicker/dist/datepickerKeyboardStrategy.d.ts +0 -4
@@ -2936,6 +2936,7 @@ class AuroDropdownBib extends LitElement {
2936
2936
 
2937
2937
  this.shape = "rounded";
2938
2938
  this.matchWidth = false;
2939
+ this.hasActiveDescendant = false;
2939
2940
  }
2940
2941
 
2941
2942
  static get styles() {
@@ -3022,6 +3023,18 @@ class AuroDropdownBib extends LitElement {
3022
3023
  */
3023
3024
  dialogRole: {
3024
3025
  type: String
3026
+ },
3027
+
3028
+ /**
3029
+ * Set by auro-dropdown when a menu option is highlighted via
3030
+ * aria-activedescendant. The dialog keyboard bridge checks this
3031
+ * flag so that Enter selects the highlighted option instead of
3032
+ * activating the focused interactive element (e.g. the trigger
3033
+ * button, or the bibtemplate close button in fullscreen).
3034
+ * @private
3035
+ */
3036
+ hasActiveDescendant: {
3037
+ type: Boolean
3025
3038
  }
3026
3039
  };
3027
3040
  }
@@ -3105,7 +3118,7 @@ class AuroDropdownBib extends LitElement {
3105
3118
  /**
3106
3119
  * Forwards the dialog's native `cancel` event (fired on ESC) as
3107
3120
  * an `auro-bib-cancel` custom event so parent components can close.
3108
- * @param {HTMLDialogElement} dialog
3121
+ * @param {HTMLDialogElement} dialog - The dialog element to attach the cancel listener to.
3109
3122
  * @private
3110
3123
  */
3111
3124
  _setupCancelHandler(dialog) {
@@ -3149,7 +3162,7 @@ class AuroDropdownBib extends LitElement {
3149
3162
  * is a secondary path for parent components that also listen for
3150
3163
  * Escape keydown.
3151
3164
  *
3152
- * @param {HTMLDialogElement} dialog
3165
+ * @param {HTMLDialogElement} dialog - The dialog element to attach the keyboard bridge to.
3153
3166
  * @private
3154
3167
  */
3155
3168
  _setupKeyboardBridge(dialog) {
@@ -3168,15 +3181,23 @@ class AuroDropdownBib extends LitElement {
3168
3181
 
3169
3182
  // Custom elements (auro-button) don't get the native Enter→click
3170
3183
  // behavior that <button> has. Find the button in the composed path
3171
- // and click it directly.
3184
+ // and click it directly — but only when no menu option is
3185
+ // highlighted. In fullscreen mode focus stays on the close button
3186
+ // while arrow keys move the active-descendant highlight through
3187
+ // the listbox. If the user presses Enter with an option
3188
+ // highlighted, the intent is to select that option, not to click
3189
+ // the close button. In that case we fall through and bridge the
3190
+ // Enter key to the parent component's keyboard strategy.
3172
3191
  if (event.key === 'Enter') {
3173
- const buttonSelector = 'button, [role="button"], auro-button, [auro-button]';
3174
- const btn = event.composedPath().find((el) => el.matches && el.matches(buttonSelector));
3175
- if (btn) {
3176
- event.preventDefault();
3177
- event.stopPropagation();
3178
- btn.click();
3179
- return;
3192
+ if (!this.hasActiveDescendant) {
3193
+ const buttonSelector = 'button, [role="button"], auro-button, [auro-button]';
3194
+ const btn = event.composedPath().find((el) => el.matches && el.matches(buttonSelector));
3195
+ if (btn) {
3196
+ event.preventDefault();
3197
+ event.stopPropagation();
3198
+ btn.click();
3199
+ return;
3200
+ }
3180
3201
  }
3181
3202
  }
3182
3203
 
@@ -3291,6 +3312,8 @@ class AuroDropdownBib extends LitElement {
3291
3312
  * Closes the dialog.
3292
3313
  */
3293
3314
  close() {
3315
+ this.hasActiveDescendant = false;
3316
+
3294
3317
  const dialog = this.shadowRoot.querySelector('dialog');
3295
3318
 
3296
3319
  if (dialog && dialog.open) {
@@ -3568,7 +3591,7 @@ class AuroHelpText extends LitElement {
3568
3591
  }
3569
3592
  }
3570
3593
 
3571
- var formkitVersion = '202603241855';
3594
+ var formkitVersion = '202603242359';
3572
3595
 
3573
3596
  class AuroElement extends LitElement {
3574
3597
  static get properties() {
@@ -3887,6 +3910,15 @@ class AuroDropdown extends AuroElement {
3887
3910
  this.trigger.ariaActiveDescendantElement = null;
3888
3911
  this.trigger.removeAttribute('aria-activedescendant');
3889
3912
  }
3913
+
3914
+ // In fullscreen, focus stays on the close button while arrow keys
3915
+ // highlight options via active-descendant. Without this flag the
3916
+ // keyboard bridge clicks the close button on Enter (closing the
3917
+ // bib without selecting). When true, the bridge skips the button
3918
+ // click and forwards Enter to the parent to make the selection.
3919
+ if (this.bibContent) {
3920
+ this.bibContent.hasActiveDescendant = this.isBibFullscreen && Boolean(element);
3921
+ }
3890
3922
  }
3891
3923
 
3892
3924
  // function to define props used within the scope of this component