@aurodesignsystem-dev/auro-formkit 0.0.0-pr1554.1 → 0.0.0-pr1554.11

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 +121 -50
  7. package/components/combobox/demo/getting-started.min.js +121 -50
  8. package/components/combobox/demo/index.min.js +121 -50
  9. package/components/combobox/dist/index.js +121 -50
  10. package/components/combobox/dist/registered.js +121 -50
  11. package/components/counter/demo/customize.min.js +48 -7
  12. package/components/counter/demo/index.min.js +48 -7
  13. package/components/counter/dist/index.js +48 -7
  14. package/components/counter/dist/registered.js +48 -7
  15. package/components/datepicker/demo/customize.min.js +83 -23
  16. package/components/datepicker/demo/index.min.js +83 -23
  17. package/components/datepicker/dist/index.js +83 -23
  18. package/components/datepicker/dist/registered.js +83 -23
  19. package/components/dropdown/demo/customize.min.js +47 -6
  20. package/components/dropdown/demo/getting-started.min.js +47 -6
  21. package/components/dropdown/demo/index.min.js +47 -6
  22. package/components/dropdown/dist/auro-dropdown.d.ts +8 -1
  23. package/components/dropdown/dist/index.js +47 -6
  24. package/components/dropdown/dist/registered.js +47 -6
  25. package/components/form/demo/customize.min.js +337 -105
  26. package/components/form/demo/getting-started.min.js +337 -105
  27. package/components/form/demo/index.min.js +337 -105
  28. package/components/form/demo/registerDemoDeps.min.js +337 -105
  29. package/components/input/demo/customize.min.js +35 -16
  30. package/components/input/demo/getting-started.min.js +35 -16
  31. package/components/input/demo/index.min.js +35 -16
  32. package/components/input/dist/index.js +35 -16
  33. package/components/input/dist/registered.js +35 -16
  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 +48 -7
  40. package/components/select/demo/getting-started.min.js +48 -7
  41. package/components/select/demo/index.min.js +48 -7
  42. package/components/select/dist/index.js +48 -7
  43. package/components/select/dist/registered.js +48 -7
  44. package/custom-elements.json +6 -0
  45. package/package.json +1 -1
@@ -1275,7 +1275,7 @@ class AuroHelpText extends i$2 {
1275
1275
  }
1276
1276
  }
1277
1277
 
1278
- var formkitVersion = '202607152206';
1278
+ var formkitVersion = '202607160709';
1279
1279
 
1280
1280
  // Copyright (c) 2026 Alaska Airlines. All rights reserved. Licensed under the Apache-2.0 license
1281
1281
  // See LICENSE in the project root for license information.
@@ -1275,7 +1275,7 @@ class AuroHelpText extends i$2 {
1275
1275
  }
1276
1276
  }
1277
1277
 
1278
- var formkitVersion = '202607152206';
1278
+ var formkitVersion = '202607160709';
1279
1279
 
1280
1280
  // Copyright (c) 2026 Alaska Airlines. All rights reserved. Licensed under the Apache-2.0 license
1281
1281
  // See LICENSE in the project root for license information.
@@ -1275,7 +1275,7 @@ class AuroHelpText extends i$2 {
1275
1275
  }
1276
1276
  }
1277
1277
 
1278
- var formkitVersion = '202607152206';
1278
+ var formkitVersion = '202607160709';
1279
1279
 
1280
1280
  // Copyright (c) 2026 Alaska Airlines. All rights reserved. Licensed under the Apache-2.0 license
1281
1281
  // See LICENSE in the project root for license information.
@@ -1228,7 +1228,7 @@ class AuroHelpText extends LitElement {
1228
1228
  }
1229
1229
  }
1230
1230
 
1231
- var formkitVersion = '202607152206';
1231
+ var formkitVersion = '202607160709';
1232
1232
 
1233
1233
  // Copyright (c) 2026 Alaska Airlines. All rights reserved. Licensed under the Apache-2.0 license
1234
1234
  // See LICENSE in the project root for license information.
@@ -1228,7 +1228,7 @@ class AuroHelpText extends LitElement {
1228
1228
  }
1229
1229
  }
1230
1230
 
1231
- var formkitVersion = '202607152206';
1231
+ var formkitVersion = '202607160709';
1232
1232
 
1233
1233
  // Copyright (c) 2026 Alaska Airlines. All rights reserved. Licensed under the Apache-2.0 license
1234
1234
  // See LICENSE in the project root for license information.
@@ -4971,7 +4971,7 @@ let AuroHelpText$2 = class AuroHelpText extends i$3 {
4971
4971
  }
4972
4972
  };
4973
4973
 
4974
- var formkitVersion$2 = '202607152206';
4974
+ var formkitVersion$2 = '202607160709';
4975
4975
 
4976
4976
  let AuroElement$2 = class AuroElement extends i$3 {
4977
4977
  static get properties() {
@@ -5100,7 +5100,6 @@ class AuroDropdown extends AuroElement$2 {
5100
5100
  static get shadowRootOptions() {
5101
5101
  return {
5102
5102
  ...AuroElement$2.shadowRootOptions,
5103
- delegatesFocus: true,
5104
5103
  };
5105
5104
  }
5106
5105
 
@@ -5267,7 +5266,47 @@ class AuroDropdown extends AuroElement$2 {
5267
5266
  focusables[0].focus();
5268
5267
  }
5269
5268
  } else {
5269
+ this.focusTrigger();
5270
+ }
5271
+ }
5272
+
5273
+ /**
5274
+ * Focus the trigger content. When the trigger wrapper itself is focusable
5275
+ * (has tabindex), focus it directly. Otherwise, focus the first focusable
5276
+ * element slotted into the trigger slot (e.g. the auro-input).
5277
+ * @private
5278
+ */
5279
+ focusTrigger() {
5280
+ if (this.trigger.hasAttribute('tabindex')) {
5270
5281
  this.trigger.focus();
5282
+ } else {
5283
+ // Slotted content isn't a DOM child of the trigger div, so
5284
+ // getFocusableElements can't find it. Query assigned nodes directly.
5285
+ const slot = this.trigger.querySelector('slot[name="trigger"]');
5286
+ if (slot) {
5287
+ const assigned = slot.assignedElements();
5288
+ for (const el of assigned) {
5289
+ if (el.hasAttribute('disabled')) {
5290
+ continue;
5291
+ }
5292
+ // Try finding a focusable descendant first (handles non-focusable
5293
+ // wrappers like <div> containing a <button>). If none found, try
5294
+ // focusing the element directly (works for custom elements like
5295
+ // auro-input that have delegatesFocus or a custom focus() method).
5296
+ const descendants = getFocusableElements(el);
5297
+ if (descendants.length > 0) {
5298
+ descendants[0].focus();
5299
+ return;
5300
+ }
5301
+ el.focus();
5302
+ return;
5303
+ }
5304
+ }
5305
+ // Fallback: try DOM children (non-slotted content)
5306
+ const focusables = getFocusableElements(this.trigger);
5307
+ if (focusables.length > 0) {
5308
+ focusables[0].focus();
5309
+ }
5271
5310
  }
5272
5311
  }
5273
5312
 
@@ -5720,15 +5759,17 @@ class AuroDropdown extends AuroElement$2 {
5720
5759
  }
5721
5760
 
5722
5761
  const eventType = event.detail.eventType || "unknown";
5723
- if (!this.isPopoverVisible && this.hasFocus && eventType === "keydown") {
5724
- this.trigger.focus();
5762
+ if (!this.isPopoverVisible && this.hasFocus && eventType === "keydown" && !this.noHideOnThisFocusLoss) {
5763
+ this.focusTrigger();
5725
5764
  }
5726
5765
 
5727
5766
 
5728
5767
  // On Tab-driven close (eventType "focusloss"), let focus advance naturally
5729
5768
  // — restoring to the trigger would trap the user on this dropdown, forcing
5730
5769
  // an extra Tab to move on. Escape and outside-click still restore.
5731
- if (!this.isPopoverVisible && eventType !== "focusloss") {
5770
+ // When noHideOnThisFocusLoss is true, the consumer (e.g. combobox) manages
5771
+ // its own focus restoration — skip the generic trigger focus to avoid races.
5772
+ if (!this.isPopoverVisible && eventType !== "focusloss" && !this.noHideOnThisFocusLoss) {
5732
5773
  // wait til the bib gets fully closed and rendered
5733
5774
  setTimeout(() => {
5734
5775
  // Skip if the bib re-opened, or if focus moved intentionally outside the dropdown (not to body).
@@ -5740,7 +5781,7 @@ class AuroDropdown extends AuroElement$2 {
5740
5781
  return;
5741
5782
  }
5742
5783
  // Restore focus to the trigger.
5743
- this.trigger.focus();
5784
+ this.focusTrigger();
5744
5785
  });
5745
5786
  }
5746
5787
  }
@@ -16921,9 +16962,10 @@ class DomHandler {
16921
16962
  class BaseInput extends AuroElement$1 {
16922
16963
 
16923
16964
  // Delegate focus to the native <input> inside the shadow root so that
16924
- // showModal()'s dialog focusing steps reach the input element.
16925
- // This keeps the mobile virtual keyboard open when the fullscreen dialog
16926
- // opens, because the browser sees an input-to-input focus transfer.
16965
+ // clicking anywhere on the input wrapper focuses the native input, and
16966
+ // programmatic .focus() calls on elements in the shadow DOM work correctly.
16967
+ // The initial-load focus theft was caused by the static `autofocus`
16968
+ // attribute on the bib input (now conditional), not by delegatesFocus.
16927
16969
  static get shadowRootOptions() {
16928
16970
  return {
16929
16971
  ...AuroElement$1.shadowRootOptions,
@@ -18600,7 +18642,7 @@ let AuroHelpText$1 = class AuroHelpText extends i$3 {
18600
18642
  }
18601
18643
  };
18602
18644
 
18603
- var formkitVersion$1 = '202607152206';
18645
+ var formkitVersion$1 = '202607160709';
18604
18646
 
18605
18647
  // Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
18606
18648
  // See LICENSE in the project root for license information.
@@ -18886,24 +18928,42 @@ class AuroInput extends BaseInput {
18886
18928
  * @returns {void}
18887
18929
  */
18888
18930
  checkDisplayValueSlotChange() {
18889
- // flatten:true resolves through auro-combobox's forwarding slot
18890
- // (<slot name="displayValue" slot="displayValue">) so a clone appended
18891
- // directly to auro-input's light DOM alongside the forwarder still
18892
- // counts as content. The prior nodes[0].tagName === 'SLOT' recursion
18893
- // discarded any siblings past the forwarder.
18894
18931
  const slot = this.shadowRoot?.querySelector('slot[name="displayValue"]');
18895
18932
  if (!slot) {
18896
- // Shadow root not yet rendered — fall back to checking light-DOM
18897
- // children so hasDisplayValueContent isn't stuck false after an
18898
- // early call from auro-combobox during mount.
18899
- this.hasDisplayValueContent = Boolean(
18900
- this.querySelector('[slot="displayValue"]:not(slot)')
18901
- );
18933
+ // Shadow slot not yet rendered — fall back to checking light-DOM
18934
+ // children so hasDisplayValueContent isn't stuck false when called
18935
+ // before firstUpdated (e.g. from auro-combobox during mount).
18936
+ // Check for any element (including custom elements like <auro-icon>
18937
+ // that render via shadow DOM with no text content).
18938
+ const lightDomContent = this.querySelector('[slot="displayValue"]:not(slot)');
18939
+ this.hasDisplayValueContent = Boolean(lightDomContent && (
18940
+ lightDomContent.textContent.trim().length > 0 ||
18941
+ lightDomContent.children.length > 0 ||
18942
+ lightDomContent.shadowRoot !== null
18943
+ ));
18902
18944
  return;
18903
18945
  }
18904
18946
  const nodes = slot.assignedNodes({ flatten: true });
18905
18947
 
18906
- this.hasDisplayValueContent = nodes.length > 0;
18948
+ // Check for actual visible content, not just node existence.
18949
+ // An empty <span slot="displayValue"></span> forwarded from the
18950
+ // consumer should not be treated as "has content" — it causes the
18951
+ // displayValue wrapper to render (with hasContent class) but show
18952
+ // nothing, blocking the combobox's synthetic displayValue from
18953
+ // being visible on preset/deeplink load.
18954
+ // Custom elements (e.g. <auro-icon>) that render via shadow DOM are
18955
+ // treated as content even when they have no text or light-DOM children.
18956
+ this.hasDisplayValueContent = nodes.some((node) => {
18957
+ if (node.nodeType === Node.TEXT_NODE) {
18958
+ return node.textContent.trim().length > 0;
18959
+ }
18960
+ if (node.nodeType === Node.ELEMENT_NODE) {
18961
+ return node.textContent.trim().length > 0 ||
18962
+ node.children.length > 0 ||
18963
+ node.shadowRoot !== null;
18964
+ }
18965
+ return false;
18966
+ });
18907
18967
  }
18908
18968
 
18909
18969
  firstUpdated() {
@@ -19730,7 +19790,7 @@ class AuroBibtemplate extends i$3 {
19730
19790
  }
19731
19791
  }
19732
19792
 
19733
- var formkitVersion = '202607152206';
19793
+ var formkitVersion = '202607160709';
19734
19794
 
19735
19795
  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}`;
19736
19796
 
@@ -20782,6 +20842,14 @@ class AuroCombobox extends AuroElement {
20782
20842
  // auroMenu-selectedOption event hasn't fired yet, or we're on remount
20783
20843
  // with no options loaded). Synthesize a displayValue from the value so
20784
20844
  // the overlay isn't blank.
20845
+ //
20846
+ // NOTE: This renders the raw machine value (e.g. "SEA"), not the
20847
+ // human-readable label (e.g. "Seattle, WA"). For consumers where
20848
+ // value ≠ label, this produces a brief flash of the raw value until
20849
+ // the option elements load and updateTriggerTextDisplay re-runs with
20850
+ // the correct label. This is intentionally preferred over a blank
20851
+ // state — the displayValueInTrigger.remove() cleanup above ensures
20852
+ // this placeholder is replaced once the real option is available.
20785
20853
  const syntheticDV = document.createElement('span');
20786
20854
  syntheticDV.setAttribute('slot', 'displayValue');
20787
20855
  syntheticDV.textContent = this.value;
@@ -21034,7 +21102,11 @@ class AuroCombobox extends AuroElement {
21034
21102
  // after the dropdown layout settles.
21035
21103
 
21036
21104
  doubleRaf(() => {
21037
- this.setInputFocus();
21105
+ // Guard: skip if the dropdown closed before this rAF fired
21106
+ // (e.g. user selected an option immediately after the bib opened).
21107
+ if (this.dropdownOpen) {
21108
+ this.setInputFocus();
21109
+ }
21038
21110
  if (this._inFullscreenTransition) {
21039
21111
  this._inFullscreenTransition = false;
21040
21112
  }
@@ -21081,7 +21153,9 @@ class AuroCombobox extends AuroElement {
21081
21153
  }
21082
21154
 
21083
21155
  this._scheduleTimer(() => {
21084
- this.setInputFocus();
21156
+ if (this.dropdown.isPopoverVisible) {
21157
+ this.setInputFocus();
21158
+ }
21085
21159
  }, 0);
21086
21160
  });
21087
21161
  }
@@ -21090,14 +21164,19 @@ class AuroCombobox extends AuroElement {
21090
21164
  * @private
21091
21165
  */
21092
21166
  setClearBtnFocus() {
21093
- const clearBtn = this.input.shadowRoot.querySelector('.clearBtn');
21094
- if (clearBtn) {
21095
- // Wait for the element to fully render across
21096
- // multiple Lit update cycles before moving focus
21097
- doubleRaf(() => {
21167
+ doubleRaf(() => {
21168
+ // First establish focus inside the input's shadow root.
21169
+ // Without this, clearBtn.focus() silently fails when focus is on
21170
+ // document.body (e.g. after a click selection closes the bib dialog).
21171
+ // delegatesFocus on BaseInput routes this to the native <input>.
21172
+ this.input.focus();
21173
+
21174
+ // Now move focus to the clear button within the same shadow root.
21175
+ const clearBtn = this.input.shadowRoot.querySelector('.clearBtn');
21176
+ if (clearBtn) {
21098
21177
  clearBtn.focus();
21099
- });
21100
- }
21178
+ }
21179
+ });
21101
21180
  }
21102
21181
 
21103
21182
  /**
@@ -21308,6 +21387,9 @@ class AuroCombobox extends AuroElement {
21308
21387
  // only — fresh user selections take the existing hideBib path.
21309
21388
  if (isEcho && this.menu.optionSelected) {
21310
21389
  this._programmaticFilterRefresh = true;
21390
+ this.updateComplete.then(() => {
21391
+ this._programmaticFilterRefresh = false;
21392
+ });
21311
21393
  }
21312
21394
  });
21313
21395
 
@@ -21538,15 +21620,6 @@ class AuroCombobox extends AuroElement {
21538
21620
  * @returns {void}
21539
21621
  */
21540
21622
  handleTriggerInputValueChange(event) {
21541
- // Clear a stale _programmaticFilterRefresh when the user is genuinely
21542
- // interacting. On mount, updated('value') sets the flag, but the early
21543
- // return at `this.value === this.input.value` exits before clearing it.
21544
- // Without this, the first keystroke after mount fails to set _userTyped
21545
- // and the bib doesn't open.
21546
- if (this._programmaticFilterRefresh && this.componentHasFocus) {
21547
- this._programmaticFilterRefresh = false;
21548
- }
21549
-
21550
21623
  // 'input' fires for every user-initiated value change — typing, paste,
21551
21624
  // IME composition end, dead-key composition, drag-drop. Flip _userTyped
21552
21625
  // here so updated('availableOptions') auto-opens the bib for sources
@@ -21569,10 +21642,6 @@ class AuroCombobox extends AuroElement {
21569
21642
  if (this.dropdown.isBibFullscreen && this.input.value && this.input.value.length > 0 && this.dropdown.isPopoverVisible) {
21570
21643
  this.setInputFocus();
21571
21644
  }
21572
-
21573
- if (this._programmaticFilterRefresh) {
21574
- this._programmaticFilterRefresh = false;
21575
- }
21576
21645
  }
21577
21646
 
21578
21647
  /**
@@ -21771,6 +21840,12 @@ class AuroCombobox extends AuroElement {
21771
21840
  // setting the flag unconditionally here masks the user-typed open path.
21772
21841
  if (!this._userTyped) {
21773
21842
  this._programmaticFilterRefresh = true;
21843
+ // Self-clear after this update cycle completes. This collapses
21844
+ // the previous scattered clear-points into one and prevents the
21845
+ // flag from surviving into the next user interaction.
21846
+ this.updateComplete.then(() => {
21847
+ this._programmaticFilterRefresh = false;
21848
+ });
21774
21849
  }
21775
21850
 
21776
21851
  if (this.input.value !== this.value) {
@@ -21860,10 +21935,6 @@ class AuroCombobox extends AuroElement {
21860
21935
  } else if (!this.dropdown.isBibFullscreen) {
21861
21936
  this.hideBib();
21862
21937
  }
21863
-
21864
- if (this._programmaticFilterRefresh) {
21865
- this._programmaticFilterRefresh = false;
21866
- }
21867
21938
  }
21868
21939
 
21869
21940
  if (changedProperties.has('error')) {
@@ -22045,7 +22116,7 @@ class AuroCombobox extends AuroElement {
22045
22116
  <slot @slotchange="${this.handleSlotChange}"></slot>
22046
22117
  <${this.inputTag}
22047
22118
  id="inputInBib"
22048
- autofocus
22119
+ ?autofocus="${this.dropdownOpen && this.dropdown?.isBibFullscreen}"
22049
22120
  @input="${this.handleInputValueChange}"
22050
22121
  .a11yActivedescendant="${this.dropdownOpen && this.optionActive ? this.optionActive.id : undefined}"
22051
22122
  .a11yControls=${`${this.dropdownId}-floater-bib`}