@aurodesignsystem-dev/auro-formkit 0.0.0-pr1554.9 → 0.0.0-pr1555.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 (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 +45 -150
  7. package/components/combobox/demo/getting-started.min.js +45 -150
  8. package/components/combobox/demo/index.min.js +45 -150
  9. package/components/combobox/dist/index.js +45 -150
  10. package/components/combobox/dist/registered.js +45 -150
  11. package/components/counter/demo/customize.min.js +6 -47
  12. package/components/counter/demo/index.min.js +6 -47
  13. package/components/counter/dist/index.js +6 -47
  14. package/components/counter/dist/registered.js +6 -47
  15. package/components/datepicker/demo/customize.min.js +20 -89
  16. package/components/datepicker/demo/index.min.js +20 -89
  17. package/components/datepicker/dist/index.js +20 -89
  18. package/components/datepicker/dist/registered.js +20 -89
  19. package/components/dropdown/demo/customize.min.js +5 -46
  20. package/components/dropdown/demo/getting-started.min.js +5 -46
  21. package/components/dropdown/demo/index.min.js +5 -46
  22. package/components/dropdown/dist/auro-dropdown.d.ts +1 -8
  23. package/components/dropdown/dist/index.js +5 -46
  24. package/components/dropdown/dist/registered.js +5 -46
  25. package/components/form/demo/customize.min.js +90 -374
  26. package/components/form/demo/getting-started.min.js +90 -374
  27. package/components/form/demo/index.min.js +90 -374
  28. package/components/form/demo/registerDemoDeps.min.js +90 -374
  29. package/components/input/demo/customize.min.js +11 -39
  30. package/components/input/demo/getting-started.min.js +11 -39
  31. package/components/input/demo/index.min.js +11 -39
  32. package/components/input/dist/index.js +11 -39
  33. package/components/input/dist/registered.js +11 -39
  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 +6 -47
  40. package/components/select/demo/getting-started.min.js +6 -47
  41. package/components/select/demo/index.min.js +6 -47
  42. package/components/select/dist/index.js +6 -47
  43. package/components/select/dist/registered.js +6 -47
  44. package/custom-elements.json +1504 -1510
  45. package/package.json +1 -1
@@ -4986,7 +4986,7 @@ let AuroHelpText$2 = class AuroHelpText extends i$3 {
4986
4986
  }
4987
4987
  };
4988
4988
 
4989
- var formkitVersion$2 = '202607160654';
4989
+ var formkitVersion$2 = '202607152222';
4990
4990
 
4991
4991
  let AuroElement$2 = class AuroElement extends i$3 {
4992
4992
  static get properties() {
@@ -5115,6 +5115,7 @@ class AuroDropdown extends AuroElement$2 {
5115
5115
  static get shadowRootOptions() {
5116
5116
  return {
5117
5117
  ...AuroElement$2.shadowRootOptions,
5118
+ delegatesFocus: true,
5118
5119
  };
5119
5120
  }
5120
5121
 
@@ -5281,47 +5282,7 @@ class AuroDropdown extends AuroElement$2 {
5281
5282
  focusables[0].focus();
5282
5283
  }
5283
5284
  } else {
5284
- this.focusTrigger();
5285
- }
5286
- }
5287
-
5288
- /**
5289
- * Focus the trigger content. When the trigger wrapper itself is focusable
5290
- * (has tabindex), focus it directly. Otherwise, focus the first focusable
5291
- * element slotted into the trigger slot (e.g. the auro-input).
5292
- * @private
5293
- */
5294
- focusTrigger() {
5295
- if (this.trigger.hasAttribute('tabindex')) {
5296
5285
  this.trigger.focus();
5297
- } else {
5298
- // Slotted content isn't a DOM child of the trigger div, so
5299
- // getFocusableElements can't find it. Query assigned nodes directly.
5300
- const slot = this.trigger.querySelector('slot[name="trigger"]');
5301
- if (slot) {
5302
- const assigned = slot.assignedElements();
5303
- for (const el of assigned) {
5304
- if (el.hasAttribute('disabled')) {
5305
- continue;
5306
- }
5307
- // Try finding a focusable descendant first (handles non-focusable
5308
- // wrappers like <div> containing a <button>). If none found, try
5309
- // focusing the element directly (works for custom elements like
5310
- // auro-input that have delegatesFocus or a custom focus() method).
5311
- const descendants = getFocusableElements(el);
5312
- if (descendants.length > 0) {
5313
- descendants[0].focus();
5314
- return;
5315
- }
5316
- el.focus();
5317
- return;
5318
- }
5319
- }
5320
- // Fallback: try DOM children (non-slotted content)
5321
- const focusables = getFocusableElements(this.trigger);
5322
- if (focusables.length > 0) {
5323
- focusables[0].focus();
5324
- }
5325
5286
  }
5326
5287
  }
5327
5288
 
@@ -5775,16 +5736,14 @@ class AuroDropdown extends AuroElement$2 {
5775
5736
 
5776
5737
  const eventType = event.detail.eventType || "unknown";
5777
5738
  if (!this.isPopoverVisible && this.hasFocus && eventType === "keydown") {
5778
- this.focusTrigger();
5739
+ this.trigger.focus();
5779
5740
  }
5780
5741
 
5781
5742
 
5782
5743
  // On Tab-driven close (eventType "focusloss"), let focus advance naturally
5783
5744
  // — restoring to the trigger would trap the user on this dropdown, forcing
5784
5745
  // an extra Tab to move on. Escape and outside-click still restore.
5785
- // When noHideOnThisFocusLoss is true, the consumer (e.g. combobox) manages
5786
- // its own focus restoration — skip the generic trigger focus to avoid races.
5787
- if (!this.isPopoverVisible && eventType !== "focusloss" && !this.noHideOnThisFocusLoss) {
5746
+ if (!this.isPopoverVisible && eventType !== "focusloss") {
5788
5747
  // wait til the bib gets fully closed and rendered
5789
5748
  setTimeout(() => {
5790
5749
  // Skip if the bib re-opened, or if focus moved intentionally outside the dropdown (not to body).
@@ -5796,7 +5755,7 @@ class AuroDropdown extends AuroElement$2 {
5796
5755
  return;
5797
5756
  }
5798
5757
  // Restore focus to the trigger.
5799
- this.focusTrigger();
5758
+ this.trigger.focus();
5800
5759
  });
5801
5760
  }
5802
5761
  }
@@ -16977,10 +16936,9 @@ class DomHandler {
16977
16936
  class BaseInput extends AuroElement$1 {
16978
16937
 
16979
16938
  // Delegate focus to the native <input> inside the shadow root so that
16980
- // clicking anywhere on the input wrapper focuses the native input, and
16981
- // programmatic .focus() calls on elements in the shadow DOM work correctly.
16982
- // The initial-load focus theft was caused by the static `autofocus`
16983
- // attribute on the bib input (now conditional), not by delegatesFocus.
16939
+ // showModal()'s dialog focusing steps reach the input element.
16940
+ // This keeps the mobile virtual keyboard open when the fullscreen dialog
16941
+ // opens, because the browser sees an input-to-input focus transfer.
16984
16942
  static get shadowRootOptions() {
16985
16943
  return {
16986
16944
  ...AuroElement$1.shadowRootOptions,
@@ -18657,7 +18615,7 @@ let AuroHelpText$1 = class AuroHelpText extends i$3 {
18657
18615
  }
18658
18616
  };
18659
18617
 
18660
- var formkitVersion$1 = '202607160654';
18618
+ var formkitVersion$1 = '202607152222';
18661
18619
 
18662
18620
  // Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
18663
18621
  // See LICENSE in the project root for license information.
@@ -18943,42 +18901,15 @@ class AuroInput extends BaseInput {
18943
18901
  * @returns {void}
18944
18902
  */
18945
18903
  checkDisplayValueSlotChange() {
18946
- const slot = this.shadowRoot?.querySelector('slot[name="displayValue"]');
18947
- if (!slot) {
18948
- // Shadow slot not yet rendered — fall back to checking light-DOM
18949
- // children so hasDisplayValueContent isn't stuck false when called
18950
- // before firstUpdated (e.g. from auro-combobox during mount).
18951
- // Check for any element (including custom elements like <auro-icon>
18952
- // that render via shadow DOM with no text content).
18953
- const lightDomContent = this.querySelector('[slot="displayValue"]:not(slot)');
18954
- this.hasDisplayValueContent = Boolean(lightDomContent && (
18955
- lightDomContent.textContent.trim().length > 0 ||
18956
- lightDomContent.children.length > 0 ||
18957
- lightDomContent.shadowRoot !== null
18958
- ));
18959
- return;
18960
- }
18904
+ // flatten:true resolves through auro-combobox's forwarding slot
18905
+ // (<slot name="displayValue" slot="displayValue">) so a clone appended
18906
+ // directly to auro-input's light DOM alongside the forwarder still
18907
+ // counts as content. The prior nodes[0].tagName === 'SLOT' recursion
18908
+ // discarded any siblings past the forwarder.
18909
+ const slot = this.shadowRoot.querySelector('slot[name="displayValue"]');
18961
18910
  const nodes = slot.assignedNodes({ flatten: true });
18962
18911
 
18963
- // Check for actual visible content, not just node existence.
18964
- // An empty <span slot="displayValue"></span> forwarded from the
18965
- // consumer should not be treated as "has content" — it causes the
18966
- // displayValue wrapper to render (with hasContent class) but show
18967
- // nothing, blocking the combobox's synthetic displayValue from
18968
- // being visible on preset/deeplink load.
18969
- // Custom elements (e.g. <auro-icon>) that render via shadow DOM are
18970
- // treated as content even when they have no text or light-DOM children.
18971
- this.hasDisplayValueContent = nodes.some((node) => {
18972
- if (node.nodeType === Node.TEXT_NODE) {
18973
- return node.textContent.trim().length > 0;
18974
- }
18975
- if (node.nodeType === Node.ELEMENT_NODE) {
18976
- return node.textContent.trim().length > 0 ||
18977
- node.children.length > 0 ||
18978
- node.shadowRoot !== null;
18979
- }
18980
- return false;
18981
- });
18912
+ this.hasDisplayValueContent = nodes.length > 0;
18982
18913
  }
18983
18914
 
18984
18915
  firstUpdated() {
@@ -19805,7 +19736,7 @@ class AuroBibtemplate extends i$3 {
19805
19736
  }
19806
19737
  }
19807
19738
 
19808
- var formkitVersion = '202607160654';
19739
+ var formkitVersion = '202607152222';
19809
19740
 
19810
19741
  var styleCss$3 = i$6`.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}`;
19811
19742
 
@@ -20842,36 +20773,14 @@ class AuroCombobox extends AuroElement {
20842
20773
  const displayValueEl = this.menu.optionSelected.querySelector("[slot='displayValue']");
20843
20774
  if (displayValueEl) {
20844
20775
  this.input.appendChild(displayValueEl.cloneNode(true));
20845
- }
20846
-
20847
- // auro-input's hasDisplayValueContent is non-reactive; nudge it to
20848
- // re-evaluate the slot and re-render so the displayValue wrapper
20849
- // gets its hasContent class. Without this, the apple/icon stays
20850
- // hidden when input.value is set in the same tick as the append.
20851
- if (typeof this.input.checkDisplayValueSlotChange === 'function') {
20852
- this.input.checkDisplayValueSlotChange();
20853
- this.input.requestUpdate();
20854
- }
20855
- } else if (this.value) {
20856
- // No optionSelected yet (e.g. setMenuValue was called but the menu's
20857
- // auroMenu-selectedOption event hasn't fired yet, or we're on remount
20858
- // with no options loaded). Synthesize a displayValue from the value so
20859
- // the overlay isn't blank.
20860
- //
20861
- // NOTE: This renders the raw machine value (e.g. "SEA"), not the
20862
- // human-readable label (e.g. "Seattle, WA"). For consumers where
20863
- // value ≠ label, this produces a brief flash of the raw value until
20864
- // the option elements load and updateTriggerTextDisplay re-runs with
20865
- // the correct label. This is intentionally preferred over a blank
20866
- // state — the displayValueInTrigger.remove() cleanup above ensures
20867
- // this placeholder is replaced once the real option is available.
20868
- const syntheticDV = document.createElement('span');
20869
- syntheticDV.setAttribute('slot', 'displayValue');
20870
- syntheticDV.textContent = this.value;
20871
- this.input.appendChild(syntheticDV);
20872
- if (typeof this.input.checkDisplayValueSlotChange === 'function') {
20873
- this.input.checkDisplayValueSlotChange();
20874
- this.input.requestUpdate();
20776
+ // auro-input's hasDisplayValueContent is non-reactive; nudge it to
20777
+ // re-evaluate the slot and re-render so the displayValue wrapper
20778
+ // gets its hasContent class. Without this, the apple/icon stays
20779
+ // hidden when input.value is set in the same tick as the append.
20780
+ if (typeof this.input.checkDisplayValueSlotChange === 'function') {
20781
+ this.input.checkDisplayValueSlotChange();
20782
+ this.input.requestUpdate();
20783
+ }
20875
20784
  }
20876
20785
  }
20877
20786
 
@@ -21117,11 +21026,7 @@ class AuroCombobox extends AuroElement {
21117
21026
  // after the dropdown layout settles.
21118
21027
 
21119
21028
  doubleRaf(() => {
21120
- // Guard: skip if the dropdown closed before this rAF fired
21121
- // (e.g. user selected an option immediately after the bib opened).
21122
- if (this.dropdownOpen) {
21123
- this.setInputFocus();
21124
- }
21029
+ this.setInputFocus();
21125
21030
  if (this._inFullscreenTransition) {
21126
21031
  this._inFullscreenTransition = false;
21127
21032
  }
@@ -21168,9 +21073,7 @@ class AuroCombobox extends AuroElement {
21168
21073
  }
21169
21074
 
21170
21075
  this._scheduleTimer(() => {
21171
- if (this.dropdown.isPopoverVisible) {
21172
- this.setInputFocus();
21173
- }
21076
+ this.setInputFocus();
21174
21077
  }, 0);
21175
21078
  });
21176
21079
  }
@@ -21179,19 +21082,14 @@ class AuroCombobox extends AuroElement {
21179
21082
  * @private
21180
21083
  */
21181
21084
  setClearBtnFocus() {
21182
- doubleRaf(() => {
21183
- // First establish focus inside the input's shadow root.
21184
- // Without this, clearBtn.focus() silently fails when focus is on
21185
- // document.body (e.g. after a click selection closes the bib dialog).
21186
- // delegatesFocus on BaseInput routes this to the native <input>.
21187
- this.input.focus();
21188
-
21189
- // Now move focus to the clear button within the same shadow root.
21190
- const clearBtn = this.input.shadowRoot.querySelector('.clearBtn');
21191
- if (clearBtn) {
21085
+ const clearBtn = this.input.shadowRoot.querySelector('.clearBtn');
21086
+ if (clearBtn) {
21087
+ // Wait for the element to fully render across
21088
+ // multiple Lit update cycles before moving focus
21089
+ doubleRaf(() => {
21192
21090
  clearBtn.focus();
21193
- }
21194
- });
21091
+ });
21092
+ }
21195
21093
  }
21196
21094
 
21197
21095
  /**
@@ -21402,9 +21300,6 @@ class AuroCombobox extends AuroElement {
21402
21300
  // only — fresh user selections take the existing hideBib path.
21403
21301
  if (isEcho && this.menu.optionSelected) {
21404
21302
  this._programmaticFilterRefresh = true;
21405
- this.updateComplete.then(() => {
21406
- this._programmaticFilterRefresh = false;
21407
- });
21408
21303
  }
21409
21304
  });
21410
21305
 
@@ -21657,6 +21552,10 @@ class AuroCombobox extends AuroElement {
21657
21552
  if (this.dropdown.isBibFullscreen && this.input.value && this.input.value.length > 0 && this.dropdown.isPopoverVisible) {
21658
21553
  this.setInputFocus();
21659
21554
  }
21555
+
21556
+ if (this._programmaticFilterRefresh) {
21557
+ this._programmaticFilterRefresh = false;
21558
+ }
21660
21559
  }
21661
21560
 
21662
21561
  /**
@@ -21670,12 +21569,10 @@ class AuroCombobox extends AuroElement {
21670
21569
  inputResolver: (comp, ctx) => (ctx.isModal && comp.inputInBib ? comp.inputInBib : comp.input),
21671
21570
  });
21672
21571
 
21673
- this.addEventListener('focusin', (event) => {
21572
+ this.addEventListener('focusin', () => {
21674
21573
  this.touched = true;
21675
21574
 
21676
- if (event.composedPath()[0] === this) {
21677
- this.focus();
21678
- }
21575
+ this.focus();
21679
21576
  });
21680
21577
 
21681
21578
  this.addEventListener('auroFormElement-validated', (evt) => {
@@ -21855,12 +21752,6 @@ class AuroCombobox extends AuroElement {
21855
21752
  // setting the flag unconditionally here masks the user-typed open path.
21856
21753
  if (!this._userTyped) {
21857
21754
  this._programmaticFilterRefresh = true;
21858
- // Self-clear after this update cycle completes. This collapses
21859
- // the previous scattered clear-points into one and prevents the
21860
- // flag from surviving into the next user interaction.
21861
- this.updateComplete.then(() => {
21862
- this._programmaticFilterRefresh = false;
21863
- });
21864
21755
  }
21865
21756
 
21866
21757
  if (this.input.value !== this.value) {
@@ -21950,6 +21841,10 @@ class AuroCombobox extends AuroElement {
21950
21841
  } else if (!this.dropdown.isBibFullscreen) {
21951
21842
  this.hideBib();
21952
21843
  }
21844
+
21845
+ if (this._programmaticFilterRefresh) {
21846
+ this._programmaticFilterRefresh = false;
21847
+ }
21953
21848
  }
21954
21849
 
21955
21850
  if (changedProperties.has('error')) {
@@ -22131,7 +22026,7 @@ class AuroCombobox extends AuroElement {
22131
22026
  <slot @slotchange="${this.handleSlotChange}"></slot>
22132
22027
  <${this.inputTag}
22133
22028
  id="inputInBib"
22134
- ?autofocus="${this.dropdownOpen && this.dropdown?.isBibFullscreen}"
22029
+ autofocus
22135
22030
  @input="${this.handleInputValueChange}"
22136
22031
  .a11yActivedescendant="${this.dropdownOpen && this.optionActive ? this.optionActive.id : undefined}"
22137
22032
  .a11yControls=${`${this.dropdownId}-floater-bib`}