@aurodesignsystem-dev/auro-formkit 0.0.0-pr1554.12 → 0.0.0-pr1554.14

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 (45) hide show
  1. package/components/checkbox/demo/customize.min.js +1 -1
  2. package/components/checkbox/demo/getting-started.min.js +1 -1
  3. package/components/checkbox/demo/index.min.js +1 -1
  4. package/components/checkbox/dist/index.js +1 -1
  5. package/components/checkbox/dist/registered.js +1 -1
  6. package/components/combobox/demo/customize.min.js +32 -39
  7. package/components/combobox/demo/getting-started.min.js +32 -39
  8. package/components/combobox/demo/index.min.js +32 -39
  9. package/components/combobox/dist/index.js +32 -39
  10. package/components/combobox/dist/registered.js +32 -39
  11. package/components/counter/demo/customize.min.js +20 -14
  12. package/components/counter/demo/index.min.js +20 -14
  13. package/components/counter/dist/index.js +20 -14
  14. package/components/counter/dist/registered.js +20 -14
  15. package/components/datepicker/demo/customize.min.js +21 -15
  16. package/components/datepicker/demo/index.min.js +21 -15
  17. package/components/datepicker/dist/index.js +21 -15
  18. package/components/datepicker/dist/registered.js +21 -15
  19. package/components/dropdown/demo/customize.min.js +19 -13
  20. package/components/dropdown/demo/getting-started.min.js +19 -13
  21. package/components/dropdown/demo/index.min.js +19 -13
  22. package/components/dropdown/dist/auro-dropdown.d.ts +8 -0
  23. package/components/dropdown/dist/index.js +19 -13
  24. package/components/dropdown/dist/registered.js +19 -13
  25. package/components/form/demo/customize.min.js +96 -85
  26. package/components/form/demo/getting-started.min.js +96 -85
  27. package/components/form/demo/index.min.js +96 -85
  28. package/components/form/demo/registerDemoDeps.min.js +96 -85
  29. package/components/input/demo/customize.min.js +1 -1
  30. package/components/input/demo/getting-started.min.js +1 -1
  31. package/components/input/demo/index.min.js +1 -1
  32. package/components/input/dist/index.js +1 -1
  33. package/components/input/dist/registered.js +1 -1
  34. package/components/radio/demo/customize.min.js +1 -1
  35. package/components/radio/demo/getting-started.min.js +1 -1
  36. package/components/radio/demo/index.min.js +1 -1
  37. package/components/radio/dist/index.js +1 -1
  38. package/components/radio/dist/registered.js +1 -1
  39. package/components/select/demo/customize.min.js +20 -14
  40. package/components/select/demo/getting-started.min.js +20 -14
  41. package/components/select/demo/index.min.js +20 -14
  42. package/components/select/dist/index.js +20 -14
  43. package/components/select/dist/registered.js +20 -14
  44. package/custom-elements.json +10 -0
  45. package/package.json +1 -1
@@ -3709,7 +3709,7 @@ class AuroHelpText extends LitElement {
3709
3709
  }
3710
3710
  }
3711
3711
 
3712
- var formkitVersion = '202607160725';
3712
+ var formkitVersion = '202607160755';
3713
3713
 
3714
3714
  class AuroElement extends LitElement {
3715
3715
  static get properties() {
@@ -3849,6 +3849,15 @@ class AuroDropdown extends AuroElement {
3849
3849
  this.matchWidth = false;
3850
3850
  this.noHideOnThisFocusLoss = false;
3851
3851
 
3852
+ /**
3853
+ * When true, the dropdown skips its generic focus restoration on close.
3854
+ * Set by consumers (e.g. combobox) that manage their own focus routing
3855
+ * via setClearBtnFocus / setInputFocus / keyboard strategy.
3856
+ * Separate from noHideOnThisFocusLoss (which controls auto-close behavior).
3857
+ * @private
3858
+ */
3859
+ this.noFocusRestoreOnClose = false;
3860
+
3852
3861
  this.errorMessage = undefined; // TODO - check with Doug if there is still more to do here
3853
3862
 
3854
3863
  // Layout Config
@@ -4022,25 +4031,22 @@ class AuroDropdown extends AuroElement {
4022
4031
  // getFocusableElements can't find it. Query assigned nodes directly.
4023
4032
  const slot = this.trigger.querySelector('slot[name="trigger"]');
4024
4033
  if (slot) {
4025
- const assigned = slot.assignedElements({ flatten: true });
4034
+ const assigned = slot.assignedElements();
4026
4035
  for (const el of assigned) {
4027
4036
  if (el.hasAttribute('disabled')) {
4028
4037
  continue;
4029
4038
  }
4030
-
4031
- // Try focusing a focusable descendant first (handles non-focusable wrappers).
4039
+ // Try finding a focusable descendant first (handles non-focusable
4040
+ // wrappers like <div> containing a <button>). If none found, try
4041
+ // focusing the element directly (works for custom elements like
4042
+ // auro-input that have delegatesFocus or a custom focus() method).
4032
4043
  const descendants = getFocusableElements(el);
4033
4044
  if (descendants.length > 0) {
4034
4045
  descendants[0].focus();
4035
4046
  return;
4036
4047
  }
4037
-
4038
- // Otherwise, try focusing the assigned element itself. Only stop if focus moved.
4039
- const prevActive = document.activeElement;
4040
4048
  el.focus();
4041
- if (document.activeElement !== prevActive) {
4042
- return;
4043
- }
4049
+ return;
4044
4050
  }
4045
4051
  }
4046
4052
  // Fallback: try DOM children (non-slotted content)
@@ -4500,7 +4506,7 @@ class AuroDropdown extends AuroElement {
4500
4506
  }
4501
4507
 
4502
4508
  const eventType = event.detail.eventType || "unknown";
4503
- if (!this.isPopoverVisible && this.hasFocus && eventType === "keydown" && !this.noHideOnThisFocusLoss) {
4509
+ if (!this.isPopoverVisible && this.hasFocus && eventType === "keydown" && !this.noFocusRestoreOnClose) {
4504
4510
  this.focusTrigger();
4505
4511
  }
4506
4512
 
@@ -4508,9 +4514,9 @@ class AuroDropdown extends AuroElement {
4508
4514
  // On Tab-driven close (eventType "focusloss"), let focus advance naturally
4509
4515
  // — restoring to the trigger would trap the user on this dropdown, forcing
4510
4516
  // an extra Tab to move on. Escape and outside-click still restore.
4511
- // When noHideOnThisFocusLoss is true, the consumer (e.g. combobox) manages
4517
+ // When noFocusRestoreOnClose is true, the consumer (e.g. combobox) manages
4512
4518
  // its own focus restoration — skip the generic trigger focus to avoid races.
4513
- if (!this.isPopoverVisible && eventType !== "focusloss" && !this.noHideOnThisFocusLoss) {
4519
+ if (!this.isPopoverVisible && eventType !== "focusloss" && !this.noFocusRestoreOnClose) {
4514
4520
  // wait til the bib gets fully closed and rendered
4515
4521
  setTimeout(() => {
4516
4522
  // Skip if the bib re-opened, or if focus moved intentionally outside the dropdown (not to body).
@@ -3709,7 +3709,7 @@ class AuroHelpText extends LitElement {
3709
3709
  }
3710
3710
  }
3711
3711
 
3712
- var formkitVersion = '202607160725';
3712
+ var formkitVersion = '202607160755';
3713
3713
 
3714
3714
  class AuroElement extends LitElement {
3715
3715
  static get properties() {
@@ -3849,6 +3849,15 @@ class AuroDropdown extends AuroElement {
3849
3849
  this.matchWidth = false;
3850
3850
  this.noHideOnThisFocusLoss = false;
3851
3851
 
3852
+ /**
3853
+ * When true, the dropdown skips its generic focus restoration on close.
3854
+ * Set by consumers (e.g. combobox) that manage their own focus routing
3855
+ * via setClearBtnFocus / setInputFocus / keyboard strategy.
3856
+ * Separate from noHideOnThisFocusLoss (which controls auto-close behavior).
3857
+ * @private
3858
+ */
3859
+ this.noFocusRestoreOnClose = false;
3860
+
3852
3861
  this.errorMessage = undefined; // TODO - check with Doug if there is still more to do here
3853
3862
 
3854
3863
  // Layout Config
@@ -4022,25 +4031,22 @@ class AuroDropdown extends AuroElement {
4022
4031
  // getFocusableElements can't find it. Query assigned nodes directly.
4023
4032
  const slot = this.trigger.querySelector('slot[name="trigger"]');
4024
4033
  if (slot) {
4025
- const assigned = slot.assignedElements({ flatten: true });
4034
+ const assigned = slot.assignedElements();
4026
4035
  for (const el of assigned) {
4027
4036
  if (el.hasAttribute('disabled')) {
4028
4037
  continue;
4029
4038
  }
4030
-
4031
- // Try focusing a focusable descendant first (handles non-focusable wrappers).
4039
+ // Try finding a focusable descendant first (handles non-focusable
4040
+ // wrappers like <div> containing a <button>). If none found, try
4041
+ // focusing the element directly (works for custom elements like
4042
+ // auro-input that have delegatesFocus or a custom focus() method).
4032
4043
  const descendants = getFocusableElements(el);
4033
4044
  if (descendants.length > 0) {
4034
4045
  descendants[0].focus();
4035
4046
  return;
4036
4047
  }
4037
-
4038
- // Otherwise, try focusing the assigned element itself. Only stop if focus moved.
4039
- const prevActive = document.activeElement;
4040
4048
  el.focus();
4041
- if (document.activeElement !== prevActive) {
4042
- return;
4043
- }
4049
+ return;
4044
4050
  }
4045
4051
  }
4046
4052
  // Fallback: try DOM children (non-slotted content)
@@ -4500,7 +4506,7 @@ class AuroDropdown extends AuroElement {
4500
4506
  }
4501
4507
 
4502
4508
  const eventType = event.detail.eventType || "unknown";
4503
- if (!this.isPopoverVisible && this.hasFocus && eventType === "keydown" && !this.noHideOnThisFocusLoss) {
4509
+ if (!this.isPopoverVisible && this.hasFocus && eventType === "keydown" && !this.noFocusRestoreOnClose) {
4504
4510
  this.focusTrigger();
4505
4511
  }
4506
4512
 
@@ -4508,9 +4514,9 @@ class AuroDropdown extends AuroElement {
4508
4514
  // On Tab-driven close (eventType "focusloss"), let focus advance naturally
4509
4515
  // — restoring to the trigger would trap the user on this dropdown, forcing
4510
4516
  // an extra Tab to move on. Escape and outside-click still restore.
4511
- // When noHideOnThisFocusLoss is true, the consumer (e.g. combobox) manages
4517
+ // When noFocusRestoreOnClose is true, the consumer (e.g. combobox) manages
4512
4518
  // its own focus restoration — skip the generic trigger focus to avoid races.
4513
- if (!this.isPopoverVisible && eventType !== "focusloss" && !this.noHideOnThisFocusLoss) {
4519
+ if (!this.isPopoverVisible && eventType !== "focusloss" && !this.noFocusRestoreOnClose) {
4514
4520
  // wait til the bib gets fully closed and rendered
4515
4521
  setTimeout(() => {
4516
4522
  // Skip if the bib re-opened, or if focus moved intentionally outside the dropdown (not to body).