@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
@@ -1301,10 +1301,19 @@ const comboboxKeyboardStrategy = {
1301
1301
  }
1302
1302
  },
1303
1303
 
1304
- Escape(component, _evt, ctx) {
1305
- if (ctx.isExpanded && ctx.isModal) {
1304
+ Escape(component, evt, ctx) {
1305
+ if (!ctx.isExpanded) {
1306
+ return;
1307
+ }
1308
+
1309
+ // Prevent the Escape key from bubbling up and closing any parent dialogs / drawers / popups
1310
+ evt.stopPropagation();
1311
+
1312
+ if (ctx.isModal) {
1306
1313
  component.setTriggerInputFocus();
1307
1314
  }
1315
+
1316
+ component.hideBib();
1308
1317
  },
1309
1318
 
1310
1319
  Home(component, evt, ctx) {
@@ -1341,7 +1350,7 @@ const comboboxKeyboardStrategy = {
1341
1350
 
1342
1351
  /* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
1343
1352
 
1344
- let AuroLibraryRuntimeUtils$2$1 = class AuroLibraryRuntimeUtils {
1353
+ let AuroLibraryRuntimeUtils$1$2 = class AuroLibraryRuntimeUtils {
1345
1354
 
1346
1355
  /* eslint-disable jsdoc/require-param */
1347
1356
 
@@ -3130,7 +3139,6 @@ class AuroFloatingUI {
3130
3139
  this.focusHandler = null;
3131
3140
  this.clickHandler = null;
3132
3141
  this.keyDownHandler = null;
3133
- this.touchHandler = null;
3134
3142
 
3135
3143
  /**
3136
3144
  * @private
@@ -3548,28 +3556,6 @@ class AuroFloatingUI {
3548
3556
  setTimeout(() => {
3549
3557
  window.addEventListener("click", this.clickHandler);
3550
3558
  }, 0);
3551
-
3552
- // iOS Safari does not fire `click` on non-interactive elements, so
3553
- // tapping an inert backdrop never reaches the click handler above.
3554
- // Mirror the same outside-tap logic with a passive touchstart listener.
3555
- this.touchHandler = (evt) => {
3556
- const element = this.element;
3557
- if (!element?.bib) {
3558
- return;
3559
- }
3560
-
3561
- // fullscreen (modal) dialog handles its own dismissal
3562
- if (element.bib.hasAttribute("isfullscreen")) {
3563
- return;
3564
- }
3565
-
3566
- const path = evt.composedPath();
3567
- if (!path.includes(element.trigger) && !path.includes(element.bib)) {
3568
- this.hideBib("click");
3569
- }
3570
- };
3571
-
3572
- window.addEventListener("touchstart", this.touchHandler, { passive: true });
3573
3559
  }
3574
3560
 
3575
3561
  cleanupHideHandlers() {
@@ -3585,11 +3571,6 @@ class AuroFloatingUI {
3585
3571
  this.clickHandler = null;
3586
3572
  }
3587
3573
 
3588
- if (this.touchHandler) {
3589
- window.removeEventListener("touchstart", this.touchHandler);
3590
- this.touchHandler = null;
3591
- }
3592
-
3593
3574
  if (this.keyDownHandler) {
3594
3575
  document.removeEventListener("keydown", this.keyDownHandler);
3595
3576
  this.keyDownHandler = null;
@@ -4382,89 +4363,6 @@ let p$3 = class p{registerComponent(t,a){customElements.get(t)||customElements.d
4382
4363
 
4383
4364
  var iconVersion$2 = '9.1.2';
4384
4365
 
4385
- // Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
4386
- // See LICENSE in the project root for license information.
4387
-
4388
- // ---------------------------------------------------------------------
4389
-
4390
- /* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
4391
-
4392
- let AuroLibraryRuntimeUtils$1$2 = class AuroLibraryRuntimeUtils {
4393
-
4394
- /* eslint-disable jsdoc/require-param */
4395
-
4396
- /**
4397
- * This will register a new custom element with the browser.
4398
- * @param {String} name - The name of the custom element.
4399
- * @param {Object} componentClass - The class to register as a custom element.
4400
- * @returns {void}
4401
- */
4402
- registerComponent(name, componentClass) {
4403
- if (!customElements.get(name)) {
4404
- customElements.define(name, class extends componentClass {});
4405
- }
4406
- }
4407
-
4408
- /**
4409
- * Finds and returns the closest HTML Element based on a selector.
4410
- * @returns {void}
4411
- */
4412
- closestElement(
4413
- selector, // selector like in .closest()
4414
- base = this, // extra functionality to skip a parent
4415
- __Closest = (el, found = el && el.closest(selector)) =>
4416
- !el || el === document || el === window
4417
- ? null // standard .closest() returns null for non-found selectors also
4418
- : found
4419
- ? found // found a selector INside this element
4420
- : __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
4421
- ) {
4422
- return __Closest(base);
4423
- }
4424
- /* eslint-enable jsdoc/require-param */
4425
-
4426
- /**
4427
- * 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.
4428
- * @param {Object} elem - The element to check.
4429
- * @param {String} tagName - The name of the Auro component to check for or add as an attribute.
4430
- * @returns {void}
4431
- */
4432
- handleComponentTagRename(elem, tagName) {
4433
- const tag = tagName.toLowerCase();
4434
- const elemTag = elem.tagName.toLowerCase();
4435
-
4436
- if (elemTag !== tag) {
4437
- elem.setAttribute(tag, true);
4438
- }
4439
- }
4440
-
4441
- /**
4442
- * Validates if an element is a specific Auro component.
4443
- * @param {Object} elem - The element to validate.
4444
- * @param {String} tagName - The name of the Auro component to check against.
4445
- * @returns {Boolean} - Returns true if the element is the specified Auro component.
4446
- */
4447
- elementMatch(elem, tagName) {
4448
- const tag = tagName.toLowerCase();
4449
- const elemTag = elem.tagName.toLowerCase();
4450
-
4451
- return elemTag === tag || elem.hasAttribute(tag);
4452
- }
4453
-
4454
- /**
4455
- * Gets the text content of a named slot.
4456
- * @returns {String}
4457
- * @private
4458
- */
4459
- getSlotText(elem, name) {
4460
- const slot = elem.shadowRoot?.querySelector(`slot[name="${name}"]`);
4461
- const nodes = slot?.assignedNodes({ flatten: true }) || [];
4462
- const text = nodes.map(n => n.textContent?.trim()).join(' ').trim();
4463
-
4464
- return text || null;
4465
- }
4466
- };
4467
-
4468
4366
  /**
4469
4367
  * Computes display state once per keydown event.
4470
4368
  * Centralizes null-safety checks and makes the shared/modal/popover branching explicit.
@@ -5147,7 +5045,7 @@ let AuroHelpText$2 = class AuroHelpText extends LitElement {
5147
5045
  }
5148
5046
  };
5149
5047
 
5150
- var formkitVersion$2 = '202604082129';
5048
+ var formkitVersion$2 = '202604091424';
5151
5049
 
5152
5050
  let AuroElement$2 = class AuroElement extends LitElement {
5153
5051
  static get properties() {
@@ -5253,7 +5151,7 @@ let AuroElement$2 = class AuroElement extends LitElement {
5253
5151
  }
5254
5152
  };
5255
5153
 
5256
- // Copyright (c) 2026 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
5154
+ // Copyright (c) 2026 Alaska Airlines. All rights reserved. Licensed under the Apache-2.0 license
5257
5155
  // See LICENSE in the project root for license information.
5258
5156
 
5259
5157
 
@@ -5358,7 +5256,7 @@ class AuroDropdown extends AuroElement$2 {
5358
5256
  /**
5359
5257
  * @private
5360
5258
  */
5361
- this.runtimeUtils = new AuroLibraryRuntimeUtils$2$1();
5259
+ this.runtimeUtils = new AuroLibraryRuntimeUtils$1$2();
5362
5260
 
5363
5261
  /**
5364
5262
  * @private
@@ -5776,7 +5674,7 @@ class AuroDropdown extends AuroElement$2 {
5776
5674
  *
5777
5675
  */
5778
5676
  static register(name = "auro-dropdown") {
5779
- AuroLibraryRuntimeUtils$2$1.prototype.registerComponent(name, AuroDropdown);
5677
+ AuroLibraryRuntimeUtils$1$2.prototype.registerComponent(name, AuroDropdown);
5780
5678
  }
5781
5679
 
5782
5680
  /**
@@ -12904,7 +12802,7 @@ let AuroHelpText$1 = class AuroHelpText extends LitElement {
12904
12802
  }
12905
12803
  };
12906
12804
 
12907
- var formkitVersion$1 = '202604082129';
12805
+ var formkitVersion$1 = '202604091424';
12908
12806
 
12909
12807
  // Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
12910
12808
  // See LICENSE in the project root for license information.
@@ -13969,7 +13867,7 @@ class AuroBibtemplate extends LitElement {
13969
13867
  }
13970
13868
  }
13971
13869
 
13972
- var formkitVersion = '202604082129';
13870
+ var formkitVersion = '202604091424';
13973
13871
 
13974
13872
  var styleCss$1 = css`.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}`;
13975
13873
 
@@ -14309,7 +14207,7 @@ class AuroHelpText extends LitElement {
14309
14207
  }
14310
14208
  }
14311
14209
 
14312
- // Copyright (c) 2026 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
14210
+ // Copyright (c) 2026 Alaska Airlines. All rights reserved. Licensed under the Apache-2.0 license
14313
14211
  // See LICENSE in the project root for license information.
14314
14212
 
14315
14213
 
@@ -14832,7 +14730,7 @@ class AuroCombobox extends AuroElement {
14832
14730
  * @returns {void}
14833
14731
  */
14834
14732
  activateFirstEnabledAvailableOption() {
14835
- const firstEnabledOptionIndex = this.availableOptions.findIndex((opt) => !opt.disabled);
14733
+ const firstEnabledOptionIndex = this.availableOptions.findIndex((opt) => !opt.disabled && !opt.noMatch);
14836
14734
  this.updateActiveOption(firstEnabledOptionIndex);
14837
14735
  }
14838
14736
 
@@ -14846,7 +14744,7 @@ class AuroCombobox extends AuroElement {
14846
14744
 
14847
14745
  // Work backwards through the available options array to find the last enabled option
14848
14746
  for (let index = this.availableOptions.length - 1; index >= 0; index -= 1) {
14849
- if (!this.availableOptions[index].disabled) {
14747
+ if (!this.availableOptions[index].disabled && !this.availableOptions[index].noMatch) {
14850
14748
  lastEnabledOptionIndex = index;
14851
14749
  break;
14852
14750
  }
@@ -56,5 +56,8 @@
56
56
 
57
57
  <!-- If additional elements are needed for the demo, add them here. -->
58
58
  <script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-accordion@latest/+esm" type="module"></script>
59
+ <script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-button@latest/+esm" type="module"></script>
60
+ <script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-dialog@latest/+esm" type="module"></script>
61
+ <script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-drawer@latest/+esm" type="module"></script>
59
62
  </body>
60
63
  </html>
@@ -2,12 +2,16 @@
2
2
  import '../src/registered.js';
3
3
  // import { dropdownCounterExample } from "../apiExamples/dropdown-mobile-properties.js";
4
4
  import { eventCounterExample } from "../apiExamples/events.js";
5
+ import { inDialogExample } from "../apiExamples/in-dialog.js";
6
+ import { inDrawerExample } from "../apiExamples/in-drawer.js";
5
7
 
6
8
  export function initExamples(initialCount = 0) {
7
9
  try {
8
10
  // javascript example function calls to be added here upon creation to test examples
9
11
  // dropdownCounterExample();
10
12
  eventCounterExample();
13
+ inDialogExample();
14
+ inDrawerExample();
11
15
 
12
16
  } catch (err) {
13
17
  if (initialCount <= 20) {
@@ -1232,6 +1232,136 @@ All available slots for both components.
1232
1232
  <!-- AURO-GENERATED-CONTENT:END -->
1233
1233
  </auro-accordion>
1234
1234
 
1235
+ ### Counter Group in Dialog
1236
+
1237
+ The element used within an `auro-dialog`.
1238
+
1239
+ <div class="exampleWrapper">
1240
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/in-dialog.html) -->
1241
+ <!-- The below content is automatically added from ./../apiExamples/in-dialog.html -->
1242
+ <div>
1243
+ <auro-button id="counter-dialog-opener">Counter Group in Dialog</auro-button>
1244
+ <auro-dialog id="counter-dialog">
1245
+ <span slot="header">Counter Group in Dialog</span>
1246
+ <div slot="content">
1247
+ <auro-counter-group isDropdown>
1248
+ <span slot="ariaLabel.bib.close">Close Popup</span>
1249
+ <div slot="bib.fullscreen.headline">Group fullscreen label</div>
1250
+ <div slot="label">Counter Group</div>
1251
+ <div slot="helpText">Select a value</div>
1252
+ <auro-counter>Counter 1</auro-counter>
1253
+ <auro-counter>Counter 2</auro-counter>
1254
+ </auro-counter-group>
1255
+ </div>
1256
+ </auro-dialog>
1257
+ </div>
1258
+ <!-- AURO-GENERATED-CONTENT:END -->
1259
+ </div>
1260
+ <auro-accordion alignRight>
1261
+ <span slot="trigger">See code</span>
1262
+ <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/in-dialog.html) -->
1263
+ <!-- The below code snippet is automatically added from ./../apiExamples/in-dialog.html -->
1264
+
1265
+ ```html
1266
+ <div>
1267
+ <auro-button id="counter-dialog-opener">Counter Group in Dialog</auro-button>
1268
+ <auro-dialog id="counter-dialog">
1269
+ <span slot="header">Counter Group in Dialog</span>
1270
+ <div slot="content">
1271
+ <auro-counter-group isDropdown>
1272
+ <span slot="ariaLabel.bib.close">Close Popup</span>
1273
+ <div slot="bib.fullscreen.headline">Group fullscreen label</div>
1274
+ <div slot="label">Counter Group</div>
1275
+ <div slot="helpText">Select a value</div>
1276
+ <auro-counter>Counter 1</auro-counter>
1277
+ <auro-counter>Counter 2</auro-counter>
1278
+ </auro-counter-group>
1279
+ </div>
1280
+ </auro-dialog>
1281
+ </div>
1282
+ ```
1283
+ <!-- AURO-GENERATED-CONTENT:END -->
1284
+ <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/in-dialog.js) -->
1285
+ <!-- The below code snippet is automatically added from ./../apiExamples/in-dialog.js -->
1286
+
1287
+ ```js
1288
+ export function inDialogExample() {
1289
+ document.querySelector("#counter-dialog-opener").addEventListener("click", () => {
1290
+ const dialog = document.querySelector("#counter-dialog");
1291
+ dialog.open = true;
1292
+ });
1293
+ };
1294
+ ```
1295
+ <!-- AURO-GENERATED-CONTENT:END -->
1296
+ </auro-accordion>
1297
+
1298
+ ### Counter Group in Drawer
1299
+
1300
+ The element used within an `auro-drawer`.
1301
+
1302
+ <div class="exampleWrapper">
1303
+ <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/in-drawer.html) -->
1304
+ <!-- The below content is automatically added from ./../apiExamples/in-drawer.html -->
1305
+ <div>
1306
+ <auro-button id="counter-drawer-opener">Counter Group in Drawer</auro-button>
1307
+ <auro-drawer id="counter-drawer">
1308
+ <span slot="header">Counter Group in Drawer</span>
1309
+ <div slot="content">
1310
+ <auro-counter-group isDropdown>
1311
+ <span slot="ariaLabel.bib.close">Close Popup</span>
1312
+ <div slot="bib.fullscreen.headline">Group fullscreen label</div>
1313
+ <div slot="label">Counter Group</div>
1314
+ <div slot="helpText">Select a value</div>
1315
+ <auro-counter>Counter 1</auro-counter>
1316
+ <auro-counter>Counter 2</auro-counter>
1317
+ </auro-counter-group>
1318
+ </div>
1319
+ </auro-drawer>
1320
+ </div>
1321
+ <!-- AURO-GENERATED-CONTENT:END -->
1322
+ </div>
1323
+ <auro-accordion alignRight>
1324
+ <span slot="trigger">See code</span>
1325
+ <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/in-drawer.html) -->
1326
+ <!-- The below code snippet is automatically added from ./../apiExamples/in-drawer.html -->
1327
+
1328
+ ```html
1329
+ <div>
1330
+ <auro-button id="counter-drawer-opener">Counter Group in Drawer</auro-button>
1331
+ <auro-drawer id="counter-drawer">
1332
+ <span slot="header">Counter Group in Drawer</span>
1333
+ <div slot="content">
1334
+ <auro-counter-group isDropdown>
1335
+ <span slot="ariaLabel.bib.close">Close Popup</span>
1336
+ <div slot="bib.fullscreen.headline">Group fullscreen label</div>
1337
+ <div slot="label">Counter Group</div>
1338
+ <div slot="helpText">Select a value</div>
1339
+ <auro-counter>Counter 1</auro-counter>
1340
+ <auro-counter>Counter 2</auro-counter>
1341
+ </auro-counter-group>
1342
+ </div>
1343
+ </auro-drawer>
1344
+ </div>
1345
+ ```
1346
+ <!-- AURO-GENERATED-CONTENT:END -->
1347
+ <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/in-drawer.js) -->
1348
+ <!-- The below code snippet is automatically added from ./../apiExamples/in-drawer.js -->
1349
+
1350
+ ```js
1351
+ export function inDrawerExample() {
1352
+ document.querySelector("#counter-drawer-opener").addEventListener("click", () => {
1353
+ const drawer = document.querySelector("#counter-drawer");
1354
+ if (drawer.hasAttribute('open')) {
1355
+ drawer.removeAttribute('open');
1356
+ } else {
1357
+ drawer.setAttribute('open', true);
1358
+ }
1359
+ });
1360
+ };
1361
+ ```
1362
+ <!-- AURO-GENERATED-CONTENT:END -->
1363
+ </auro-accordion>
1364
+
1235
1365
  ## Restyle Component with CSS Variables
1236
1366
 
1237
1367
  The component may be restyled by changing the values of the following token(s).