@aurodesignsystem-dev/auro-formkit 0.0.0-pr1430.0 → 0.0.0-pr1431.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 (54) hide show
  1. package/components/checkbox/demo/api.min.js +3 -3
  2. package/components/checkbox/demo/index.min.js +3 -3
  3. package/components/checkbox/dist/index.js +3 -3
  4. package/components/checkbox/dist/registered.js +3 -3
  5. package/components/combobox/demo/api.html +1 -0
  6. package/components/combobox/demo/api.js +3 -1
  7. package/components/combobox/demo/api.md +75 -0
  8. package/components/combobox/demo/api.min.js +34 -124
  9. package/components/combobox/demo/index.min.js +21 -123
  10. package/components/combobox/dist/comboboxKeyboardStrategy.d.ts +1 -1
  11. package/components/combobox/dist/index.js +21 -123
  12. package/components/combobox/dist/registered.js +21 -123
  13. package/components/counter/demo/api.html +3 -0
  14. package/components/counter/demo/api.js +4 -0
  15. package/components/counter/demo/api.md +130 -0
  16. package/components/counter/demo/api.min.js +63 -132
  17. package/components/counter/demo/index.min.js +43 -132
  18. package/components/counter/dist/counterGroupKeyboardStrategy.d.ts +3 -0
  19. package/components/counter/dist/index.js +43 -132
  20. package/components/counter/dist/registered.js +43 -132
  21. package/components/datepicker/demo/api.html +1 -0
  22. package/components/datepicker/demo/api.js +2 -0
  23. package/components/datepicker/demo/api.md +57 -0
  24. package/components/datepicker/demo/api.min.js +106 -123
  25. package/components/datepicker/demo/index.min.js +94 -123
  26. package/components/datepicker/dist/datepickerKeyboardStrategy.d.ts +3 -1
  27. package/components/datepicker/dist/index.js +94 -123
  28. package/components/datepicker/dist/registered.js +94 -123
  29. package/components/dropdown/demo/api.html +1 -0
  30. package/components/dropdown/demo/api.js +2 -0
  31. package/components/dropdown/demo/api.md +95 -0
  32. package/components/dropdown/demo/api.min.js +25 -116
  33. package/components/dropdown/demo/index.min.js +5 -116
  34. package/components/dropdown/dist/index.js +5 -116
  35. package/components/dropdown/dist/registered.js +5 -116
  36. package/components/form/demo/api.min.js +220 -547
  37. package/components/form/demo/index.min.js +220 -547
  38. package/components/input/demo/api.min.js +1 -1
  39. package/components/input/demo/index.min.js +1 -1
  40. package/components/input/dist/index.js +1 -1
  41. package/components/input/dist/registered.js +1 -1
  42. package/components/radio/demo/api.min.js +2 -2
  43. package/components/radio/demo/index.min.js +2 -2
  44. package/components/radio/dist/index.js +2 -2
  45. package/components/radio/dist/registered.js +2 -2
  46. package/components/select/demo/api.html +1 -0
  47. package/components/select/demo/api.js +2 -0
  48. package/components/select/demo/api.md +76 -0
  49. package/components/select/demo/api.min.js +35 -129
  50. package/components/select/demo/index.min.js +22 -129
  51. package/components/select/dist/index.js +18 -125
  52. package/components/select/dist/registered.js +18 -125
  53. package/custom-elements.json +1451 -1427
  54. package/package.json +3 -2
@@ -120,7 +120,7 @@ let l$1 = class l{generateElementName(t,e){let o=t;return o+="-",o+=e.replace(/[
120
120
 
121
121
  /* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
122
122
 
123
- let AuroLibraryRuntimeUtils$5 = class AuroLibraryRuntimeUtils {
123
+ let AuroLibraryRuntimeUtils$4 = class AuroLibraryRuntimeUtils {
124
124
 
125
125
  /* eslint-disable jsdoc/require-param */
126
126
 
@@ -196,7 +196,7 @@ let AuroLibraryRuntimeUtils$5 = class AuroLibraryRuntimeUtils {
196
196
  }
197
197
  };
198
198
 
199
- // Copyright (c) 2026 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
199
+ // Copyright (c) 2026 Alaska Airlines. All rights reserved. Licensed under the Apache-2.0 license
200
200
  // See LICENSE in the project root for license information.
201
201
 
202
202
 
@@ -226,7 +226,7 @@ class AuroCounterButton extends T$1 {
226
226
  *
227
227
  */
228
228
  static register(name = "auro-counter-button") {
229
- AuroLibraryRuntimeUtils$5.prototype.registerComponent(name, AuroCounterButton);
229
+ AuroLibraryRuntimeUtils$4.prototype.registerComponent(name, AuroCounterButton);
230
230
  }
231
231
  }
232
232
 
@@ -718,7 +718,7 @@ const {
718
718
  class AuroFormValidation {
719
719
 
720
720
  constructor() {
721
- this.runtimeUtils = new AuroLibraryRuntimeUtils$5();
721
+ this.runtimeUtils = new AuroLibraryRuntimeUtils$4();
722
722
  }
723
723
 
724
724
  /**
@@ -1306,7 +1306,7 @@ var tokensCss$2 = i$5`:host{--ds-auro-helptext-color: var(--ds-basic-color-texti
1306
1306
 
1307
1307
  /* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
1308
1308
 
1309
- let AuroLibraryRuntimeUtils$4 = class AuroLibraryRuntimeUtils {
1309
+ let AuroLibraryRuntimeUtils$3 = class AuroLibraryRuntimeUtils {
1310
1310
 
1311
1311
  /* eslint-disable jsdoc/require-param */
1312
1312
 
@@ -1399,7 +1399,7 @@ let AuroHelpText$1 = class AuroHelpText extends i$2 {
1399
1399
  this.onDark = false;
1400
1400
  this.hasTextContent = false;
1401
1401
 
1402
- AuroLibraryRuntimeUtils$4.prototype.handleComponentTagRename(this, 'auro-helptext');
1402
+ AuroLibraryRuntimeUtils$3.prototype.handleComponentTagRename(this, 'auro-helptext');
1403
1403
  }
1404
1404
 
1405
1405
  static get styles() {
@@ -1465,7 +1465,7 @@ let AuroHelpText$1 = class AuroHelpText extends i$2 {
1465
1465
  *
1466
1466
  */
1467
1467
  static register(name = "auro-helptext") {
1468
- AuroLibraryRuntimeUtils$4.prototype.registerComponent(name, AuroHelpText);
1468
+ AuroLibraryRuntimeUtils$3.prototype.registerComponent(name, AuroHelpText);
1469
1469
  }
1470
1470
 
1471
1471
  updated() {
@@ -1521,9 +1521,9 @@ let AuroHelpText$1 = class AuroHelpText extends i$2 {
1521
1521
  }
1522
1522
  };
1523
1523
 
1524
- var formkitVersion$1 = '202604082129';
1524
+ var formkitVersion$1 = '202604091424';
1525
1525
 
1526
- // Copyright (c) 2026 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
1526
+ // Copyright (c) 2026 Alaska Airlines. All rights reserved. Licensed under the Apache-2.0 license
1527
1527
  // See LICENSE in the project root for license information.
1528
1528
 
1529
1529
  const keyboardStrategy = {
@@ -1612,7 +1612,7 @@ class AuroCounter extends i$2 {
1612
1612
  /**
1613
1613
  * @private
1614
1614
  */
1615
- this.runtimeUtils = new AuroLibraryRuntimeUtils$5();
1615
+ this.runtimeUtils = new AuroLibraryRuntimeUtils$4();
1616
1616
 
1617
1617
  }
1618
1618
 
@@ -1754,7 +1754,7 @@ class AuroCounter extends i$2 {
1754
1754
  * AuroCounter.register("custom-counter") // registers <custom-counter/>
1755
1755
  */
1756
1756
  static register(name = "auro-counter") {
1757
- AuroLibraryRuntimeUtils$5.prototype.registerComponent(name, AuroCounter);
1757
+ AuroLibraryRuntimeUtils$4.prototype.registerComponent(name, AuroCounter);
1758
1758
  }
1759
1759
 
1760
1760
  static get styles() {
@@ -2010,7 +2010,7 @@ var shapeSizeCss$1 = i$5`.shape-classic-xl,.shape-classic-lg,.shape-classic-md,.
2010
2010
 
2011
2011
  /* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
2012
2012
 
2013
- let AuroLibraryRuntimeUtils$2 = class AuroLibraryRuntimeUtils {
2013
+ let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
2014
2014
 
2015
2015
  /* eslint-disable jsdoc/require-param */
2016
2016
 
@@ -3799,7 +3799,6 @@ class AuroFloatingUI {
3799
3799
  this.focusHandler = null;
3800
3800
  this.clickHandler = null;
3801
3801
  this.keyDownHandler = null;
3802
- this.touchHandler = null;
3803
3802
 
3804
3803
  /**
3805
3804
  * @private
@@ -4217,28 +4216,6 @@ class AuroFloatingUI {
4217
4216
  setTimeout(() => {
4218
4217
  window.addEventListener("click", this.clickHandler);
4219
4218
  }, 0);
4220
-
4221
- // iOS Safari does not fire `click` on non-interactive elements, so
4222
- // tapping an inert backdrop never reaches the click handler above.
4223
- // Mirror the same outside-tap logic with a passive touchstart listener.
4224
- this.touchHandler = (evt) => {
4225
- const element = this.element;
4226
- if (!element?.bib) {
4227
- return;
4228
- }
4229
-
4230
- // fullscreen (modal) dialog handles its own dismissal
4231
- if (element.bib.hasAttribute("isfullscreen")) {
4232
- return;
4233
- }
4234
-
4235
- const path = evt.composedPath();
4236
- if (!path.includes(element.trigger) && !path.includes(element.bib)) {
4237
- this.hideBib("click");
4238
- }
4239
- };
4240
-
4241
- window.addEventListener("touchstart", this.touchHandler, { passive: true });
4242
4219
  }
4243
4220
 
4244
4221
  cleanupHideHandlers() {
@@ -4254,11 +4231,6 @@ class AuroFloatingUI {
4254
4231
  this.clickHandler = null;
4255
4232
  }
4256
4233
 
4257
- if (this.touchHandler) {
4258
- window.removeEventListener("touchstart", this.touchHandler);
4259
- this.touchHandler = null;
4260
- }
4261
-
4262
4234
  if (this.keyDownHandler) {
4263
4235
  document.removeEventListener("keydown", this.keyDownHandler);
4264
4236
  this.keyDownHandler = null;
@@ -5051,89 +5023,6 @@ let p$2 = class p{registerComponent(t,a){customElements.get(t)||customElements.d
5051
5023
 
5052
5024
  var iconVersion$1 = '9.1.2';
5053
5025
 
5054
- // Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
5055
- // See LICENSE in the project root for license information.
5056
-
5057
- // ---------------------------------------------------------------------
5058
-
5059
- /* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
5060
-
5061
- let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
5062
-
5063
- /* eslint-disable jsdoc/require-param */
5064
-
5065
- /**
5066
- * This will register a new custom element with the browser.
5067
- * @param {String} name - The name of the custom element.
5068
- * @param {Object} componentClass - The class to register as a custom element.
5069
- * @returns {void}
5070
- */
5071
- registerComponent(name, componentClass) {
5072
- if (!customElements.get(name)) {
5073
- customElements.define(name, class extends componentClass {});
5074
- }
5075
- }
5076
-
5077
- /**
5078
- * Finds and returns the closest HTML Element based on a selector.
5079
- * @returns {void}
5080
- */
5081
- closestElement(
5082
- selector, // selector like in .closest()
5083
- base = this, // extra functionality to skip a parent
5084
- __Closest = (el, found = el && el.closest(selector)) =>
5085
- !el || el === document || el === window
5086
- ? null // standard .closest() returns null for non-found selectors also
5087
- : found
5088
- ? found // found a selector INside this element
5089
- : __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
5090
- ) {
5091
- return __Closest(base);
5092
- }
5093
- /* eslint-enable jsdoc/require-param */
5094
-
5095
- /**
5096
- * If the element passed is registered with a different tag name than what is passed in, the tag name is added as an attribute to the element.
5097
- * @param {Object} elem - The element to check.
5098
- * @param {String} tagName - The name of the Auro component to check for or add as an attribute.
5099
- * @returns {void}
5100
- */
5101
- handleComponentTagRename(elem, tagName) {
5102
- const tag = tagName.toLowerCase();
5103
- const elemTag = elem.tagName.toLowerCase();
5104
-
5105
- if (elemTag !== tag) {
5106
- elem.setAttribute(tag, true);
5107
- }
5108
- }
5109
-
5110
- /**
5111
- * Validates if an element is a specific Auro component.
5112
- * @param {Object} elem - The element to validate.
5113
- * @param {String} tagName - The name of the Auro component to check against.
5114
- * @returns {Boolean} - Returns true if the element is the specified Auro component.
5115
- */
5116
- elementMatch(elem, tagName) {
5117
- const tag = tagName.toLowerCase();
5118
- const elemTag = elem.tagName.toLowerCase();
5119
-
5120
- return elemTag === tag || elem.hasAttribute(tag);
5121
- }
5122
-
5123
- /**
5124
- * Gets the text content of a named slot.
5125
- * @returns {String}
5126
- * @private
5127
- */
5128
- getSlotText(elem, name) {
5129
- const slot = elem.shadowRoot?.querySelector(`slot[name="${name}"]`);
5130
- const nodes = slot?.assignedNodes({ flatten: true }) || [];
5131
- const text = nodes.map(n => n.textContent?.trim()).join(' ').trim();
5132
-
5133
- return text || null;
5134
- }
5135
- };
5136
-
5137
5026
  /**
5138
5027
  * Computes display state once per keydown event.
5139
5028
  * Centralizes null-safety checks and makes the shared/modal/popover branching explicit.
@@ -5601,7 +5490,7 @@ var tokensCss = i$5`:host{--ds-auro-helptext-color: var(--ds-basic-color-textico
5601
5490
 
5602
5491
  /* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
5603
5492
 
5604
- let AuroLibraryRuntimeUtils$3 = class AuroLibraryRuntimeUtils {
5493
+ let AuroLibraryRuntimeUtils$2 = class AuroLibraryRuntimeUtils {
5605
5494
 
5606
5495
  /* eslint-disable jsdoc/require-param */
5607
5496
 
@@ -5694,7 +5583,7 @@ class AuroHelpText extends i$2 {
5694
5583
  this.onDark = false;
5695
5584
  this.hasTextContent = false;
5696
5585
 
5697
- AuroLibraryRuntimeUtils$3.prototype.handleComponentTagRename(this, 'auro-helptext');
5586
+ AuroLibraryRuntimeUtils$2.prototype.handleComponentTagRename(this, 'auro-helptext');
5698
5587
  }
5699
5588
 
5700
5589
  static get styles() {
@@ -5760,7 +5649,7 @@ class AuroHelpText extends i$2 {
5760
5649
  *
5761
5650
  */
5762
5651
  static register(name = "auro-helptext") {
5763
- AuroLibraryRuntimeUtils$3.prototype.registerComponent(name, AuroHelpText);
5652
+ AuroLibraryRuntimeUtils$2.prototype.registerComponent(name, AuroHelpText);
5764
5653
  }
5765
5654
 
5766
5655
  updated() {
@@ -5816,7 +5705,7 @@ class AuroHelpText extends i$2 {
5816
5705
  }
5817
5706
  }
5818
5707
 
5819
- var formkitVersion = '202604082129';
5708
+ var formkitVersion = '202604091424';
5820
5709
 
5821
5710
  let AuroElement$1 = class AuroElement extends i$2 {
5822
5711
  static get properties() {
@@ -5922,7 +5811,7 @@ let AuroElement$1 = class AuroElement extends i$2 {
5922
5811
  }
5923
5812
  };
5924
5813
 
5925
- // Copyright (c) 2026 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
5814
+ // Copyright (c) 2026 Alaska Airlines. All rights reserved. Licensed under the Apache-2.0 license
5926
5815
  // See LICENSE in the project root for license information.
5927
5816
 
5928
5817
 
@@ -6027,7 +5916,7 @@ class AuroDropdown extends AuroElement$1 {
6027
5916
  /**
6028
5917
  * @private
6029
5918
  */
6030
- this.runtimeUtils = new AuroLibraryRuntimeUtils$2();
5919
+ this.runtimeUtils = new AuroLibraryRuntimeUtils$1();
6031
5920
 
6032
5921
  /**
6033
5922
  * @private
@@ -6445,7 +6334,7 @@ class AuroDropdown extends AuroElement$1 {
6445
6334
  *
6446
6335
  */
6447
6336
  static register(name = "auro-dropdown") {
6448
- AuroLibraryRuntimeUtils$2.prototype.registerComponent(name, AuroDropdown);
6337
+ AuroLibraryRuntimeUtils$1.prototype.registerComponent(name, AuroDropdown);
6449
6338
  }
6450
6339
 
6451
6340
  /**
@@ -7371,7 +7260,7 @@ class AuroCounterWrapper extends i$2 {
7371
7260
  * AuroCounterWrapper.register("custom-counter-wrapper") // registers <custom-counter-wrapper/>
7372
7261
  */
7373
7262
  static register(name = "auro-counter-wrapper") {
7374
- AuroLibraryRuntimeUtils$5.prototype.registerComponent(name, AuroCounterWrapper);
7263
+ AuroLibraryRuntimeUtils$4.prototype.registerComponent(name, AuroCounterWrapper);
7375
7264
  }
7376
7265
 
7377
7266
  // function that renders the HTML and CSS into the scope of the component
@@ -7490,6 +7379,24 @@ class AuroElement extends i$2 {
7490
7379
  }
7491
7380
  }
7492
7381
 
7382
+ // Copyright (c) 2026 Alaska Airlines. All rights reserved. Licensed under the Apache-2.0 license
7383
+ // See LICENSE in the project root for license information.
7384
+
7385
+ const counterGroupKeyboardStrategy = {
7386
+ Escape(component, evt) {
7387
+ if (!component.dropdown || !component.dropdown.isPopoverVisible) {
7388
+ return;
7389
+ }
7390
+
7391
+ // Prevent the Escape key from bubbling up and closing any parent dialogs / drawers / popups.
7392
+ // Because stopPropagation prevents the document-level floatingUI keydown handler from
7393
+ // seeing this event, we must also close the dropdown explicitly.
7394
+ evt.stopPropagation();
7395
+
7396
+ component.dropdown.hide();
7397
+ },
7398
+ };
7399
+
7493
7400
  /* eslint-disable lit/no-invalid-html, lit/binding-positions, max-lines, no-underscore-dangle, arrow-parens, no-confusing-arrow, curly, dot-location, no-inline-comments, line-comment-position,
7494
7401
  */
7495
7402
 
@@ -8090,6 +7997,10 @@ class AuroCounterGroup extends AuroElement {
8090
7997
  super.firstUpdated();
8091
7998
  this.updateValue();
8092
7999
  this.updateValueText();
8000
+
8001
+ if (this.isDropdown) {
8002
+ applyKeyboardStrategy$1(this, counterGroupKeyboardStrategy);
8003
+ }
8093
8004
  }
8094
8005
 
8095
8006
  /**
@@ -8099,7 +8010,7 @@ class AuroCounterGroup extends AuroElement {
8099
8010
  * AuroCounterGroup.register("custom-counter-group") // registers <custom-counter-group/>
8100
8011
  */
8101
8012
  static register(name = "auro-counter-group") {
8102
- AuroLibraryRuntimeUtils$5.prototype.registerComponent(name, AuroCounterGroup);
8013
+ AuroLibraryRuntimeUtils$4.prototype.registerComponent(name, AuroCounterGroup);
8103
8014
  }
8104
8015
 
8105
8016
  /**
@@ -8327,6 +8238,24 @@ function eventCounterExample() {
8327
8238
  });
8328
8239
  }
8329
8240
 
8241
+ function inDialogExample() {
8242
+ document.querySelector("#counter-dialog-opener").addEventListener("click", () => {
8243
+ const dialog = document.querySelector("#counter-dialog");
8244
+ dialog.open = true;
8245
+ });
8246
+ }
8247
+
8248
+ function inDrawerExample() {
8249
+ document.querySelector("#counter-drawer-opener").addEventListener("click", () => {
8250
+ const drawer = document.querySelector("#counter-drawer");
8251
+ if (drawer.hasAttribute('open')) {
8252
+ drawer.removeAttribute('open');
8253
+ } else {
8254
+ drawer.setAttribute('open', true);
8255
+ }
8256
+ });
8257
+ }
8258
+
8330
8259
  /* eslint-disable jsdoc/require-jsdoc, no-magic-numbers */
8331
8260
 
8332
8261
  function initExamples(initialCount = 0) {
@@ -8334,6 +8263,8 @@ function initExamples(initialCount = 0) {
8334
8263
  // javascript example function calls to be added here upon creation to test examples
8335
8264
  // dropdownCounterExample();
8336
8265
  eventCounterExample();
8266
+ inDialogExample();
8267
+ inDrawerExample();
8337
8268
 
8338
8269
  } catch (err) {
8339
8270
  if (initialCount <= 20) {