@aurodesignsystem-dev/auro-formkit 0.0.0-pr1555.1 → 0.0.0-pr1556.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 (47) 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 +46 -172
  7. package/components/combobox/demo/getting-started.min.js +46 -172
  8. package/components/combobox/demo/index.min.js +46 -172
  9. package/components/combobox/dist/index.js +46 -172
  10. package/components/combobox/dist/registered.js +46 -172
  11. package/components/counter/demo/customize.min.js +7 -59
  12. package/components/counter/demo/index.min.js +7 -59
  13. package/components/counter/dist/index.js +7 -59
  14. package/components/counter/dist/registered.js +7 -59
  15. package/components/datepicker/demo/customize.min.js +21 -109
  16. package/components/datepicker/demo/index.min.js +21 -109
  17. package/components/datepicker/dist/index.js +21 -109
  18. package/components/datepicker/dist/registered.js +21 -109
  19. package/components/dropdown/demo/customize.min.js +6 -58
  20. package/components/dropdown/demo/getting-started.min.js +6 -58
  21. package/components/dropdown/demo/index.min.js +6 -58
  22. package/components/dropdown/dist/auro-dropdown.d.ts +1 -16
  23. package/components/dropdown/dist/index.js +6 -58
  24. package/components/dropdown/dist/registered.js +6 -58
  25. package/components/form/demo/customize.min.js +106 -452
  26. package/components/form/demo/getting-started.min.js +106 -452
  27. package/components/form/demo/index.min.js +106 -452
  28. package/components/form/demo/registerDemoDeps.min.js +94 -448
  29. package/components/form/dist/index.js +12 -4
  30. package/components/form/dist/registered.js +12 -4
  31. package/components/input/demo/customize.min.js +11 -47
  32. package/components/input/demo/getting-started.min.js +11 -47
  33. package/components/input/demo/index.min.js +11 -47
  34. package/components/input/dist/index.js +11 -47
  35. package/components/input/dist/registered.js +11 -47
  36. package/components/radio/demo/customize.min.js +1 -1
  37. package/components/radio/demo/getting-started.min.js +1 -1
  38. package/components/radio/demo/index.min.js +1 -1
  39. package/components/radio/dist/index.js +1 -1
  40. package/components/radio/dist/registered.js +1 -1
  41. package/components/select/demo/customize.min.js +7 -59
  42. package/components/select/demo/getting-started.min.js +7 -59
  43. package/components/select/demo/index.min.js +7 -59
  44. package/components/select/dist/index.js +7 -59
  45. package/components/select/dist/registered.js +7 -59
  46. package/custom-elements.json +1484 -1500
  47. 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 = '202607162024';
4989
+ var formkitVersion$2 = '202607152340';
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
 
@@ -5126,15 +5127,6 @@ class AuroDropdown extends AuroElement$2 {
5126
5127
  this.matchWidth = false;
5127
5128
  this.noHideOnThisFocusLoss = false;
5128
5129
 
5129
- /**
5130
- * When true, the dropdown skips its generic focus restoration on close.
5131
- * Set by consumers (e.g. combobox) that manage their own focus routing
5132
- * via setClearBtnFocus / setInputFocus / keyboard strategy.
5133
- * Separate from noHideOnThisFocusLoss (which controls auto-close behavior).
5134
- * @private
5135
- */
5136
- this.noFocusRestoreOnClose = false;
5137
-
5138
5130
  this.errorMessage = undefined; // TODO - check with Doug if there is still more to do here
5139
5131
 
5140
5132
  // Layout Config
@@ -5290,49 +5282,7 @@ class AuroDropdown extends AuroElement$2 {
5290
5282
  focusables[0].focus();
5291
5283
  }
5292
5284
  } else {
5293
- this.focusTrigger();
5294
- }
5295
- }
5296
-
5297
- /**
5298
- * Focus the trigger content. When the trigger wrapper itself is focusable
5299
- * (has tabindex), focus it directly. Otherwise, focus the first focusable
5300
- * element slotted into the trigger slot (e.g. the auro-input).
5301
- * @private
5302
- */
5303
- focusTrigger() {
5304
- if (this.trigger.hasAttribute('tabindex')) {
5305
5285
  this.trigger.focus();
5306
- } else {
5307
- // Slotted content isn't a DOM child of the trigger div, so
5308
- // getFocusableElements can't find it. Query assigned nodes directly.
5309
- const slot = this.trigger.querySelector('slot[name="trigger"]');
5310
- if (slot) {
5311
- const assigned = slot.assignedElements();
5312
- for (const el of assigned) {
5313
- if (el.hasAttribute('disabled')) {
5314
- continue; // eslint-disable-line no-continue
5315
- }
5316
- // Try finding a focusable descendant first (handles non-focusable
5317
- // wrappers like <div> containing a <button>). If none found, try
5318
- // focusing the element directly (works for custom elements like
5319
- // auro-input that have delegatesFocus or a custom focus() method).
5320
- const descendants = getFocusableElements(el);
5321
- if (descendants.length > 0) {
5322
- descendants[0].focus();
5323
- return;
5324
- }
5325
- el.focus();
5326
- if (document.activeElement === el) {
5327
- return;
5328
- }
5329
- }
5330
- }
5331
- // Fallback: try DOM children (non-slotted content)
5332
- const focusables = getFocusableElements(this.trigger);
5333
- if (focusables.length > 0) {
5334
- focusables[0].focus();
5335
- }
5336
5286
  }
5337
5287
  }
5338
5288
 
@@ -5785,17 +5735,15 @@ class AuroDropdown extends AuroElement$2 {
5785
5735
  }
5786
5736
 
5787
5737
  const eventType = event.detail.eventType || "unknown";
5788
- if (!this.isPopoverVisible && this.hasFocus && eventType === "keydown" && !this.noFocusRestoreOnClose) {
5789
- this.focusTrigger();
5738
+ if (!this.isPopoverVisible && this.hasFocus && eventType === "keydown") {
5739
+ this.trigger.focus();
5790
5740
  }
5791
5741
 
5792
5742
 
5793
5743
  // On Tab-driven close (eventType "focusloss"), let focus advance naturally
5794
5744
  // — restoring to the trigger would trap the user on this dropdown, forcing
5795
5745
  // an extra Tab to move on. Escape and outside-click still restore.
5796
- // When noFocusRestoreOnClose is true, the consumer (e.g. combobox) manages
5797
- // its own focus restoration — skip the generic trigger focus to avoid races.
5798
- if (!this.isPopoverVisible && eventType !== "focusloss" && !this.noFocusRestoreOnClose) {
5746
+ if (!this.isPopoverVisible && eventType !== "focusloss") {
5799
5747
  // wait til the bib gets fully closed and rendered
5800
5748
  setTimeout(() => {
5801
5749
  // Skip if the bib re-opened, or if focus moved intentionally outside the dropdown (not to body).
@@ -5807,7 +5755,7 @@ class AuroDropdown extends AuroElement$2 {
5807
5755
  return;
5808
5756
  }
5809
5757
  // Restore focus to the trigger.
5810
- this.focusTrigger();
5758
+ this.trigger.focus();
5811
5759
  });
5812
5760
  }
5813
5761
  }
@@ -16988,10 +16936,9 @@ class DomHandler {
16988
16936
  class BaseInput extends AuroElement$1 {
16989
16937
 
16990
16938
  // Delegate focus to the native <input> inside the shadow root so that
16991
- // clicking anywhere on the input wrapper focuses the native input, and
16992
- // programmatic .focus() calls on elements in the shadow DOM work correctly.
16993
- // The initial-load focus theft was caused by the static `autofocus`
16994
- // 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.
16995
16942
  static get shadowRootOptions() {
16996
16943
  return {
16997
16944
  ...AuroElement$1.shadowRootOptions,
@@ -18668,7 +18615,7 @@ let AuroHelpText$1 = class AuroHelpText extends i$3 {
18668
18615
  }
18669
18616
  };
18670
18617
 
18671
- var formkitVersion$1 = '202607162024';
18618
+ var formkitVersion$1 = '202607152340';
18672
18619
 
18673
18620
  // Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
18674
18621
  // See LICENSE in the project root for license information.
@@ -18954,50 +18901,15 @@ class AuroInput extends BaseInput {
18954
18901
  * @returns {void}
18955
18902
  */
18956
18903
  checkDisplayValueSlotChange() {
18957
- const slot = this.shadowRoot?.querySelector('slot[name="displayValue"]');
18958
- if (!slot) {
18959
- // Shadow slot not yet rendered — fall back to checking light-DOM
18960
- // children so hasDisplayValueContent isn't stuck false when called
18961
- // before firstUpdated (e.g. from auro-combobox during mount).
18962
- // Check for any element (including custom elements like <auro-icon>
18963
- // that render via shadow DOM with no text content).
18964
- const lightDomNodes = Array.from(this.querySelectorAll('[slot="displayValue"]:not(slot)'));
18965
- const hasContent = lightDomNodes.some((node) => (
18966
- node.textContent.trim().length > 0 ||
18967
- node.children.length > 0 ||
18968
- node.shadowRoot !== null
18969
- ));
18970
- if (this.hasDisplayValueContent !== hasContent) {
18971
- this.hasDisplayValueContent = hasContent;
18972
- this.requestUpdate();
18973
- }
18974
- return;
18975
- }
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"]');
18976
18910
  const nodes = slot.assignedNodes({ flatten: true });
18977
18911
 
18978
- // Check for actual visible content, not just node existence.
18979
- // An empty <span slot="displayValue"></span> forwarded from the
18980
- // consumer should not be treated as "has content" — it causes the
18981
- // displayValue wrapper to render (with hasContent class) but show
18982
- // nothing, blocking the combobox's synthetic displayValue from
18983
- // being visible on preset/deeplink load.
18984
- // Custom elements (e.g. <auro-icon>) that render via shadow DOM are
18985
- // treated as content even when they have no text or light-DOM children.
18986
- const hasContent = nodes.some((node) => {
18987
- if (node.nodeType === Node.TEXT_NODE) {
18988
- return node.textContent.trim().length > 0;
18989
- }
18990
- if (node.nodeType === Node.ELEMENT_NODE) {
18991
- return node.textContent.trim().length > 0 ||
18992
- node.children.length > 0 ||
18993
- node.shadowRoot !== null;
18994
- }
18995
- return false;
18996
- });
18997
- if (this.hasDisplayValueContent !== hasContent) {
18998
- this.hasDisplayValueContent = hasContent;
18999
- this.requestUpdate();
19000
- }
18912
+ this.hasDisplayValueContent = nodes.length > 0;
19001
18913
  }
19002
18914
 
19003
18915
  firstUpdated() {
@@ -19824,7 +19736,7 @@ class AuroBibtemplate extends i$3 {
19824
19736
  }
19825
19737
  }
19826
19738
 
19827
- var formkitVersion = '202607162024';
19739
+ var formkitVersion = '202607152340';
19828
19740
 
19829
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}`;
19830
19742
 
@@ -20861,34 +20773,14 @@ class AuroCombobox extends AuroElement {
20861
20773
  const displayValueEl = this.menu.optionSelected.querySelector("[slot='displayValue']");
20862
20774
  if (displayValueEl) {
20863
20775
  this.input.appendChild(displayValueEl.cloneNode(true));
20864
- }
20865
-
20866
- // auro-input's hasDisplayValueContent is non-reactive; nudge it to
20867
- // re-evaluate the slot and re-render so the displayValue wrapper
20868
- // gets its hasContent class. Without this, the apple/icon stays
20869
- // hidden when input.value is set in the same tick as the append.
20870
- if (typeof this.input.checkDisplayValueSlotChange === 'function') {
20871
- this.input.checkDisplayValueSlotChange();
20872
- }
20873
- } else if (this.value) {
20874
- // No optionSelected yet (e.g. setMenuValue was called but the menu's
20875
- // auroMenu-selectedOption event hasn't fired yet, or we're on remount
20876
- // with no options loaded). Synthesize a displayValue from the value so
20877
- // the overlay isn't blank.
20878
- //
20879
- // NOTE: This renders the raw machine value (e.g. "SEA"), not the
20880
- // human-readable label (e.g. "Seattle, WA"). For consumers where
20881
- // value ≠ label, this produces a brief flash of the raw value until
20882
- // the option elements load and updateTriggerTextDisplay re-runs with
20883
- // the correct label. This is intentionally preferred over a blank
20884
- // state — the displayValueInTrigger.remove() cleanup above ensures
20885
- // this placeholder is replaced once the real option is available.
20886
- const syntheticDV = document.createElement('span');
20887
- syntheticDV.setAttribute('slot', 'displayValue');
20888
- syntheticDV.textContent = this.value;
20889
- this.input.appendChild(syntheticDV);
20890
- if (typeof this.input.checkDisplayValueSlotChange === 'function') {
20891
- this.input.checkDisplayValueSlotChange();
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
+ }
20892
20784
  }
20893
20785
  }
20894
20786
 
@@ -21061,10 +20953,6 @@ class AuroCombobox extends AuroElement {
21061
20953
  // from combobox's light DOM and won't be detected by dropdown's contains() check.
21062
20954
  this.dropdown.noHideOnThisFocusLoss = true;
21063
20955
 
21064
- // Suppress the dropdown's generic focus restoration on close — the combobox
21065
- // manages its own focus via setClearBtnFocus / setInputFocus / keyboard strategy.
21066
- this.dropdown.noFocusRestoreOnClose = true;
21067
-
21068
20956
  // Listen for the ID to be added to the dropdown so we can capture it and use it for accessibility.
21069
20957
  this.dropdown.addEventListener('auroDropdown-idAdded', (event) => {
21070
20958
  this.dropdownId = event.detail.id;
@@ -21138,11 +21026,7 @@ class AuroCombobox extends AuroElement {
21138
21026
  // after the dropdown layout settles.
21139
21027
 
21140
21028
  doubleRaf(() => {
21141
- // Guard: skip if the dropdown closed before this rAF fired
21142
- // (e.g. user selected an option immediately after the bib opened).
21143
- if (this.dropdownOpen) {
21144
- this.setInputFocus();
21145
- }
21029
+ this.setInputFocus();
21146
21030
  if (this._inFullscreenTransition) {
21147
21031
  this._inFullscreenTransition = false;
21148
21032
  }
@@ -21189,9 +21073,7 @@ class AuroCombobox extends AuroElement {
21189
21073
  }
21190
21074
 
21191
21075
  this._scheduleTimer(() => {
21192
- if (this.dropdown.isPopoverVisible) {
21193
- this.setInputFocus();
21194
- }
21076
+ this.setInputFocus();
21195
21077
  }, 0);
21196
21078
  });
21197
21079
  }
@@ -21200,19 +21082,14 @@ class AuroCombobox extends AuroElement {
21200
21082
  * @private
21201
21083
  */
21202
21084
  setClearBtnFocus() {
21203
- doubleRaf(() => {
21204
- // First establish focus inside the input's shadow root.
21205
- // Without this, clearBtn.focus() silently fails when focus is on
21206
- // document.body (e.g. after a click selection closes the bib dialog).
21207
- // delegatesFocus on BaseInput routes this to the native <input>.
21208
- this.input.focus();
21209
-
21210
- // Now move focus to the clear button within the same shadow root.
21211
- const clearBtn = this.input.shadowRoot.querySelector('.clearBtn');
21212
- 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(() => {
21213
21090
  clearBtn.focus();
21214
- }
21215
- });
21091
+ });
21092
+ }
21216
21093
  }
21217
21094
 
21218
21095
  /**
@@ -21423,9 +21300,6 @@ class AuroCombobox extends AuroElement {
21423
21300
  // only — fresh user selections take the existing hideBib path.
21424
21301
  if (isEcho && this.menu.optionSelected) {
21425
21302
  this._programmaticFilterRefresh = true;
21426
- this.updateComplete.then(() => {
21427
- this._programmaticFilterRefresh = false;
21428
- });
21429
21303
  }
21430
21304
  });
21431
21305
 
@@ -21678,6 +21552,10 @@ class AuroCombobox extends AuroElement {
21678
21552
  if (this.dropdown.isBibFullscreen && this.input.value && this.input.value.length > 0 && this.dropdown.isPopoverVisible) {
21679
21553
  this.setInputFocus();
21680
21554
  }
21555
+
21556
+ if (this._programmaticFilterRefresh) {
21557
+ this._programmaticFilterRefresh = false;
21558
+ }
21681
21559
  }
21682
21560
 
21683
21561
  /**
@@ -21691,12 +21569,10 @@ class AuroCombobox extends AuroElement {
21691
21569
  inputResolver: (comp, ctx) => (ctx.isModal && comp.inputInBib ? comp.inputInBib : comp.input),
21692
21570
  });
21693
21571
 
21694
- this.addEventListener('focusin', (event) => {
21572
+ this.addEventListener('focusin', () => {
21695
21573
  this.touched = true;
21696
21574
 
21697
- if (event.composedPath()[0] === this) {
21698
- this.focus();
21699
- }
21575
+ this.focus();
21700
21576
  });
21701
21577
 
21702
21578
  this.addEventListener('auroFormElement-validated', (evt) => {
@@ -21876,12 +21752,6 @@ class AuroCombobox extends AuroElement {
21876
21752
  // setting the flag unconditionally here masks the user-typed open path.
21877
21753
  if (!this._userTyped) {
21878
21754
  this._programmaticFilterRefresh = true;
21879
- // Self-clear after this update cycle completes. This collapses
21880
- // the previous scattered clear-points into one and prevents the
21881
- // flag from surviving into the next user interaction.
21882
- this.updateComplete.then(() => {
21883
- this._programmaticFilterRefresh = false;
21884
- });
21885
21755
  }
21886
21756
 
21887
21757
  if (this.input.value !== this.value) {
@@ -21971,6 +21841,10 @@ class AuroCombobox extends AuroElement {
21971
21841
  } else if (!this.dropdown.isBibFullscreen) {
21972
21842
  this.hideBib();
21973
21843
  }
21844
+
21845
+ if (this._programmaticFilterRefresh) {
21846
+ this._programmaticFilterRefresh = false;
21847
+ }
21974
21848
  }
21975
21849
 
21976
21850
  if (changedProperties.has('error')) {
@@ -22152,7 +22026,7 @@ class AuroCombobox extends AuroElement {
22152
22026
  <slot @slotchange="${this.handleSlotChange}"></slot>
22153
22027
  <${this.inputTag}
22154
22028
  id="inputInBib"
22155
- ?autofocus="${this.dropdownOpen && this.dropdown?.isBibFullscreen}"
22029
+ autofocus
22156
22030
  @input="${this.handleInputValueChange}"
22157
22031
  .a11yActivedescendant="${this.dropdownOpen && this.optionActive ? this.optionActive.id : undefined}"
22158
22032
  .a11yControls=${`${this.dropdownId}-floater-bib`}