@aurodesignsystem-dev/auro-formkit 0.0.0-pr1452.0 → 0.0.0-pr1456.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 (88) hide show
  1. package/components/checkbox/demo/api.min.js +3 -2
  2. package/components/checkbox/demo/index.min.js +3 -2
  3. package/components/checkbox/dist/auro-checkbox-group.d.ts +6 -6
  4. package/components/checkbox/dist/auro-checkbox.d.ts +9 -8
  5. package/components/checkbox/dist/index.js +3 -2
  6. package/components/checkbox/dist/registered.js +3 -2
  7. package/components/combobox/demo/api.min.js +1436 -1434
  8. package/components/combobox/demo/index.min.js +1436 -1434
  9. package/components/combobox/dist/auro-combobox.d.ts +35 -35
  10. package/components/combobox/dist/index.js +8 -6
  11. package/components/combobox/dist/registered.js +8 -6
  12. package/components/counter/demo/api.min.js +2 -2
  13. package/components/counter/demo/index.min.js +2 -2
  14. package/components/counter/dist/auro-counter-group.d.ts +2 -2
  15. package/components/counter/dist/auro-counter.d.ts +10 -10
  16. package/components/counter/dist/index.js +2 -2
  17. package/components/counter/dist/registered.js +2 -2
  18. package/components/datepicker/demo/api.min.js +6 -6
  19. package/components/datepicker/demo/index.min.js +6 -6
  20. package/components/datepicker/dist/{src/auro-calendar-cell.d.ts → auro-calendar-cell.d.ts} +2 -2
  21. package/components/datepicker/dist/{src/auro-datepicker.d.ts → auro-datepicker.d.ts} +13 -13
  22. package/components/datepicker/dist/index.js +6 -6
  23. package/components/datepicker/dist/registered.js +6 -6
  24. package/components/datepicker/dist/{src/utilities.d.ts → utilities.d.ts} +4 -4
  25. package/components/datepicker/dist/{src/utilitiesCalendar.d.ts → utilitiesCalendar.d.ts} +3 -3
  26. package/components/datepicker/dist/{src/vendor → vendor}/wc-range-datepicker/range-datepicker-calendar.d.ts +2 -2
  27. package/components/datepicker/dist/{src/vendor → vendor}/wc-range-datepicker/range-datepicker.d.ts +1 -1
  28. package/components/dropdown/demo/api.min.js +1 -1
  29. package/components/dropdown/demo/index.min.js +1 -1
  30. package/components/dropdown/dist/auro-dropdown.d.ts +22 -22
  31. package/components/dropdown/dist/auro-dropdownBib.d.ts +3 -3
  32. package/components/dropdown/dist/dropdownBibKeyboardStrategy.d.ts +1 -1
  33. package/components/dropdown/dist/index.js +1 -1
  34. package/components/dropdown/dist/registered.js +1 -1
  35. package/components/form/demo/api.min.js +1527 -1524
  36. package/components/form/demo/index.min.js +1527 -1524
  37. package/components/input/demo/api.min.js +4 -4
  38. package/components/input/demo/index.min.js +4 -4
  39. package/components/input/dist/auro-input.d.ts +1 -1
  40. package/components/input/dist/base-input.d.ts +30 -29
  41. package/components/input/dist/index.js +4 -4
  42. package/components/input/dist/registered.js +4 -4
  43. package/components/menu/demo/api.md +2 -2
  44. package/components/menu/demo/api.min.js +1536 -1536
  45. package/components/menu/demo/index.min.js +1536 -1536
  46. package/components/menu/dist/auro-menu-utils.d.ts +1 -1
  47. package/components/menu/dist/auro-menu.context.d.ts +4 -3
  48. package/components/menu/dist/auro-menu.d.ts +4 -4
  49. package/components/menu/dist/auro-menuoption.d.ts +6 -6
  50. package/components/menu/dist/index.js +1565 -1565
  51. package/components/menu/dist/registered.js +1521 -1521
  52. package/components/radio/demo/api.min.js +1 -1
  53. package/components/radio/demo/index.min.js +1 -1
  54. package/components/radio/dist/auro-radio-group.d.ts +9 -9
  55. package/components/radio/dist/auro-radio.d.ts +8 -8
  56. package/components/radio/dist/index.js +1 -1
  57. package/components/radio/dist/registered.js +1 -1
  58. package/components/select/demo/api.min.js +1433 -1433
  59. package/components/select/demo/index.min.js +1433 -1433
  60. package/components/select/dist/auro-select.d.ts +11 -11
  61. package/components/select/dist/index.js +2 -2
  62. package/components/select/dist/registered.js +2 -2
  63. package/custom-elements.json +5 -2
  64. package/package.json +27 -41
  65. /package/components/datepicker/dist/{src/auro-calendar-month.d.ts → auro-calendar-month.d.ts} +0 -0
  66. /package/components/datepicker/dist/{src/auro-calendar.d.ts → auro-calendar.d.ts} +0 -0
  67. /package/components/datepicker/dist/{src/buttonVersion.d.ts → buttonVersion.d.ts} +0 -0
  68. /package/components/datepicker/dist/{src/datepickerKeyboardStrategy.d.ts → datepickerKeyboardStrategy.d.ts} +0 -0
  69. /package/components/datepicker/dist/{src/iconVersion.d.ts → iconVersion.d.ts} +0 -0
  70. /package/components/datepicker/dist/{src/index.d.ts → index.d.ts} +0 -0
  71. /package/components/datepicker/dist/{src/popoverVersion.d.ts → popoverVersion.d.ts} +0 -0
  72. /package/components/datepicker/dist/{src/styles → styles}/classic/color-css.d.ts +0 -0
  73. /package/components/datepicker/dist/{src/styles → styles}/classic/style-css.d.ts +0 -0
  74. /package/components/datepicker/dist/{src/styles → styles}/color-calendar-css.d.ts +0 -0
  75. /package/components/datepicker/dist/{src/styles → styles}/color-cell-css.d.ts +0 -0
  76. /package/components/datepicker/dist/{src/styles → styles}/color-css.d.ts +0 -0
  77. /package/components/datepicker/dist/{src/styles → styles}/color-month-css.d.ts +0 -0
  78. /package/components/datepicker/dist/{src/styles → styles}/shapeSize-css.d.ts +0 -0
  79. /package/components/datepicker/dist/{src/styles → styles}/snowflake/color-css.d.ts +0 -0
  80. /package/components/datepicker/dist/{src/styles → styles}/snowflake/style-css.d.ts +0 -0
  81. /package/components/datepicker/dist/{src/styles → styles}/style-auro-calendar-cell-css.d.ts +0 -0
  82. /package/components/datepicker/dist/{src/styles → styles}/style-auro-calendar-css.d.ts +0 -0
  83. /package/components/datepicker/dist/{src/styles → styles}/style-auro-calendar-month-css.d.ts +0 -0
  84. /package/components/datepicker/dist/{src/styles → styles}/style-css.d.ts +0 -0
  85. /package/components/datepicker/dist/{src/styles → styles}/tokens-css.d.ts +0 -0
  86. /package/components/datepicker/dist/{src/utilitiesCalendarRender.d.ts → utilitiesCalendarRender.d.ts} +0 -0
  87. /package/components/datepicker/dist/{src/vendor → vendor}/wc-range-datepicker/day.d.ts +0 -0
  88. /package/components/datepicker/dist/{src/vendor → vendor}/wc-range-datepicker/range-datepicker-cell.d.ts +0 -0
@@ -6178,7 +6178,8 @@ let BaseInput$2 = class BaseInput extends AuroElement$6 {
6178
6178
  * The id global attribute defines an identifier (ID) which must be unique in the whole document.
6179
6179
  */
6180
6180
  id: {
6181
- type: String
6181
+ type: String,
6182
+ reflect: true,
6182
6183
  },
6183
6184
 
6184
6185
  /**
@@ -6715,11 +6716,10 @@ let BaseInput$2 = class BaseInput extends AuroElement$6 {
6715
6716
  */
6716
6717
  handleClickClear() {
6717
6718
  this.inputElement.value = "";
6718
- this.value = "";
6719
6719
  this.labelElement.classList.remove('inputElement-label--sticky');
6720
+ this.validation.reset(this);
6720
6721
  this.notifyValueChanged();
6721
6722
  this.focus();
6722
- this.validation.validate(this);
6723
6723
  }
6724
6724
 
6725
6725
  /**
@@ -7458,7 +7458,7 @@ let AuroHelpText$8 = class AuroHelpText extends i$4 {
7458
7458
  }
7459
7459
  };
7460
7460
 
7461
- var formkitVersion$8 = '202604242248';
7461
+ var formkitVersion$8 = '202605011613';
7462
7462
 
7463
7463
  // Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
7464
7464
  // See LICENSE in the project root for license information.
@@ -17378,7 +17378,7 @@ let AuroBibtemplate$3 = class AuroBibtemplate extends i$4 {
17378
17378
  }
17379
17379
  };
17380
17380
 
17381
- var formkitVersion$2$1 = '202604242248';
17381
+ var formkitVersion$2$1 = '202605011613';
17382
17382
 
17383
17383
  let l$1$2 = class l{generateElementName(t,e){let o=t;return o+="-",o+=e.replace(/[.]/g,"_"),o}generateTag(o,s,a){const r=this.generateElementName(o,s),i=i$3`${s$6(r)}`;return customElements.get(r)||customElements.define(r,class extends a{}),i}};let d$1$2 = class d{registerComponent(t,e){customElements.get(t)||customElements.define(t,class extends e{});}closestElement(t,e=this,o=(e,s=e&&e.closest(t))=>e&&e!==document&&e!==window?s||o(e.getRootNode().host):null){return o(e)}handleComponentTagRename(t,e){const o=e.toLowerCase();t.tagName.toLowerCase()!==o&&t.setAttribute(o,true);}elementMatch(t,e){const o=e.toLowerCase();return t.tagName.toLowerCase()===o||t.hasAttribute(o)}getSlotText(t,e){const o=t.shadowRoot?.querySelector(`slot[name="${e}"]`),s=(o?.assignedNodes({flatten:true})||[]).map(t=>t.textContent?.trim()).join(" ").trim();return s||null}};let h$1$2 = class h{registerComponent(t,e){customElements.get(t)||customElements.define(t,class extends e{});}closestElement(t,e=this,o=(e,s=e&&e.closest(t))=>e&&e!==document&&e!==window?s||o(e.getRootNode().host):null){return o(e)}handleComponentTagRename(t,e){const o=e.toLowerCase();t.tagName.toLowerCase()!==o&&t.setAttribute(o,true);}elementMatch(t,e){const o=e.toLowerCase();return t.tagName.toLowerCase()===o||t.hasAttribute(o)}};var c$1$3=i$7`:host{color:var(--ds-auro-loader-color)}:host>span{background-color:var(--ds-auro-loader-background-color);border-color:var(--ds-auro-loader-border-color)}:host([onlight]),:host([appearance=brand]){--ds-auro-loader-color: var(--ds-basic-color-brand-primary, #01426a)}:host([ondark]),:host([appearance=inverse]){--ds-auro-loader-color: var(--ds-basic-color-texticon-inverse, #ffffff)}:host([orbit])>span{--ds-auro-loader-background-color: transparent}:host([orbit])>span:nth-child(1){--ds-auro-loader-border-color: currentcolor;opacity:.25}:host([orbit])>span:nth-child(2){--ds-auro-loader-border-color: currentcolor;border-right-color:transparent;border-bottom-color:transparent;border-left-color:transparent}
17384
17384
  `,u$4$2=i$7`.body-default{font-size:var(--wcss-body-default-font-size, 1rem);line-height:var(--wcss-body-default-line-height, 1.5rem)}.body-default,.body-lg{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-lg{font-size:var(--wcss-body-lg-font-size, 1.125rem);line-height:var(--wcss-body-lg-line-height, 1.625rem)}.body-sm{font-size:var(--wcss-body-sm-font-size, .875rem);line-height:var(--wcss-body-sm-line-height, 1.25rem)}.body-sm,.body-xs{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-xs{font-size:var(--wcss-body-xs-font-size, .75rem);line-height:var(--wcss-body-xs-line-height, 1rem)}.body-2xs{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-size:var(--wcss-body-2xs-font-size, .625rem);font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0);line-height:var(--wcss-body-2xs-line-height, .875rem)}.display-2xl{font-family:var(--wcss-display-2xl-family, "AS Circular"),var(--wcss-display-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-2xl-font-size, clamp(3.5rem, 6vw, 5.375rem));font-weight:var(--wcss-display-2xl-weight, 300);letter-spacing:var(--wcss-display-2xl-letter-spacing, 0);line-height:var(--wcss-display-2xl-line-height, 1.3)}.display-xl{font-family:var(--wcss-display-xl-family, "AS Circular"),var(--wcss-display-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xl-font-size, clamp(3rem, 5.3333333333vw, 4.5rem));font-weight:var(--wcss-display-xl-weight, 300);letter-spacing:var(--wcss-display-xl-letter-spacing, 0);line-height:var(--wcss-display-xl-line-height, 1.3)}.display-lg{font-family:var(--wcss-display-lg-family, "AS Circular"),var(--wcss-display-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-lg-font-size, clamp(2.75rem, 4.6666666667vw, 4rem));font-weight:var(--wcss-display-lg-weight, 300);letter-spacing:var(--wcss-display-lg-letter-spacing, 0);line-height:var(--wcss-display-lg-line-height, 1.3)}.display-md{font-family:var(--wcss-display-md-family, "AS Circular"),var(--wcss-display-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-md-font-size, clamp(2.5rem, 4vw, 3.5rem));font-weight:var(--wcss-display-md-weight, 300);letter-spacing:var(--wcss-display-md-letter-spacing, 0);line-height:var(--wcss-display-md-line-height, 1.3)}.display-sm{font-family:var(--wcss-display-sm-family, "AS Circular"),var(--wcss-display-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-sm-font-size, clamp(2rem, 3.6666666667vw, 3rem));font-weight:var(--wcss-display-sm-weight, 300);letter-spacing:var(--wcss-display-sm-letter-spacing, 0);line-height:var(--wcss-display-sm-line-height, 1.3)}.display-xs{font-family:var(--wcss-display-xs-family, "AS Circular"),var(--wcss-display-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xs-font-size, clamp(1.75rem, 3vw, 2.375rem));font-weight:var(--wcss-display-xs-weight, 300);letter-spacing:var(--wcss-display-xs-letter-spacing, 0);line-height:var(--wcss-display-xs-line-height, 1.3)}.heading-xl{font-family:var(--wcss-heading-xl-family, "AS Circular"),var(--wcss-heading-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xl-font-size, clamp(2rem, 3vw, 2.5rem));font-weight:var(--wcss-heading-xl-weight, 300);letter-spacing:var(--wcss-heading-xl-letter-spacing, 0);line-height:var(--wcss-heading-xl-line-height, 1.3)}.heading-lg{font-family:var(--wcss-heading-lg-family, "AS Circular"),var(--wcss-heading-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-lg-font-size, clamp(1.75rem, 2.6666666667vw, 2.25rem));font-weight:var(--wcss-heading-lg-weight, 300);letter-spacing:var(--wcss-heading-lg-letter-spacing, 0);line-height:var(--wcss-heading-lg-line-height, 1.3)}.heading-md{font-family:var(--wcss-heading-md-family, "AS Circular"),var(--wcss-heading-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-md-font-size, clamp(1.625rem, 2.3333333333vw, 1.75rem));font-weight:var(--wcss-heading-md-weight, 300);letter-spacing:var(--wcss-heading-md-letter-spacing, 0);line-height:var(--wcss-heading-md-line-height, 1.3)}.heading-sm{font-family:var(--wcss-heading-sm-family, "AS Circular"),var(--wcss-heading-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-sm-font-size, clamp(1.375rem, 2vw, 1.5rem));font-weight:var(--wcss-heading-sm-weight, 300);letter-spacing:var(--wcss-heading-sm-letter-spacing, 0);line-height:var(--wcss-heading-sm-line-height, 1.3)}.heading-xs{font-family:var(--wcss-heading-xs-family, "AS Circular"),var(--wcss-heading-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xs-font-size, clamp(1.25rem, 1.6666666667vw, 1.25rem));font-weight:var(--wcss-heading-xs-weight, 450);letter-spacing:var(--wcss-heading-xs-letter-spacing, 0);line-height:var(--wcss-heading-xs-line-height, 1.3)}.heading-2xs{font-family:var(--wcss-heading-2xs-family, "AS Circular"),var(--wcss-heading-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-2xs-font-size, clamp(1.125rem, 1.5vw, 1.125rem));font-weight:var(--wcss-heading-2xs-weight, 450);letter-spacing:var(--wcss-heading-2xs-letter-spacing, 0);line-height:var(--wcss-heading-2xs-line-height, 1.3)}.accent-2xl{font-family:var(--wcss-accent-2xl-family, "Good OT"),var(--wcss-accent-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xl-font-size, clamp(2rem, 3.1666666667vw, 2.375rem));font-weight:var(--wcss-accent-2xl-weight, 450);letter-spacing:var(--wcss-accent-2xl-letter-spacing, .05em);line-height:var(--wcss-accent-2xl-line-height, 1)}.accent-2xl,.accent-xl{text-transform:uppercase}.accent-xl{font-family:var(--wcss-accent-xl-family, "Good OT"),var(--wcss-accent-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xl-font-size, clamp(1.625rem, 2.3333333333vw, 2rem));font-weight:var(--wcss-accent-xl-weight, 450);letter-spacing:var(--wcss-accent-xl-letter-spacing, .05em);line-height:var(--wcss-accent-xl-line-height, 1.3)}.accent-lg{font-family:var(--wcss-accent-lg-family, "Good OT"),var(--wcss-accent-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-lg-font-size, clamp(1.5rem, 2.1666666667vw, 1.75rem));font-weight:var(--wcss-accent-lg-weight, 450);letter-spacing:var(--wcss-accent-lg-letter-spacing, .05em);line-height:var(--wcss-accent-lg-line-height, 1.3)}.accent-lg,.accent-md{text-transform:uppercase}.accent-md{font-family:var(--wcss-accent-md-family, "Good OT"),var(--wcss-accent-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-md-font-size, clamp(1.375rem, 1.8333333333vw, 1.5rem));font-weight:var(--wcss-accent-md-weight, 500);letter-spacing:var(--wcss-accent-md-letter-spacing, .05em);line-height:var(--wcss-accent-md-line-height, 1.3)}.accent-sm{font-family:var(--wcss-accent-sm-family, "Good OT"),var(--wcss-accent-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-sm-font-size, clamp(1.125rem, 1.5vw, 1.25rem));font-weight:var(--wcss-accent-sm-weight, 500);letter-spacing:var(--wcss-accent-sm-letter-spacing, .05em);line-height:var(--wcss-accent-sm-line-height, 1.3)}.accent-sm,.accent-xs{text-transform:uppercase}.accent-xs{font-family:var(--wcss-accent-xs-family, "Good OT"),var(--wcss-accent-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xs-font-size, clamp(1rem, 1.3333333333vw, 1rem));font-weight:var(--wcss-accent-xs-weight, 500);letter-spacing:var(--wcss-accent-xs-letter-spacing, .1em);line-height:var(--wcss-accent-xs-line-height, 1.3)}.accent-2xs{font-family:var(--wcss-accent-2xs-family, "Good OT"),var(--wcss-accent-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xs-font-size, clamp(.875rem, 1.1666666667vw, .875rem));font-weight:var(--wcss-accent-2xs-weight, 450);letter-spacing:var(--wcss-accent-2xs-letter-spacing, .1em);line-height:var(--wcss-accent-2xs-line-height, 1.3);text-transform:uppercase}:focus:not(:focus-visible){outline:3px solid transparent}:host,:host>span{position:relative}:host{width:2rem;height:2rem;display:inline-block;font-size:0}:host>span{position:absolute;display:inline-block;float:none;top:0;left:0;width:2rem;height:2rem;border-radius:100%;border-style:solid;border-width:0;box-sizing:border-box}:host([xs]),:host([xs])>span{width:1.2rem;height:1.2rem}:host([sm]),:host([sm])>span{width:3rem;height:3rem}:host([md]),:host([md])>span{width:5rem;height:5rem}:host([lg]),:host([lg])>span{width:8rem;height:8rem}:host{--margin: .375rem;--margin-xs: .2rem;--margin-sm: .5rem;--margin-md: .75rem;--margin-lg: 1rem}:host([pulse]),:host([pulse])>span{position:relative}:host([pulse]){width:calc(3rem + var(--margin) * 6);height:calc(1rem + var(--margin) * 2)}:host([pulse])>span{width:1rem;height:1rem;margin:var(--margin);animation:pulse 1.5s ease infinite}:host([pulse][xs]){width:calc(1.95rem + var(--margin-xs) * 6);height:calc(.65rem + var(--margin-xs) * 2)}:host([pulse][xs])>span{margin:var(--margin-xs);width:.65rem;height:.65rem}:host([pulse][sm]){width:calc(6rem + var(--margin-sm) * 6);height:calc(2rem + var(--margin-sm) * 2)}:host([pulse][sm])>span{margin:var(--margin-sm);width:2rem;height:2rem}:host([pulse][md]){width:calc(9rem + var(--margin-md) * 6);height:calc(3rem + var(--margin-md) * 2)}:host([pulse][md])>span{margin:var(--margin-md);width:3rem;height:3rem}:host([pulse][lg]){width:calc(15rem + var(--margin-lg) * 6);height:calc(5rem + var(--margin-lg) * 2)}:host([pulse][lg])>span{margin:var(--margin-lg);width:5rem;height:5rem}:host([pulse])>span:nth-child(1){animation-delay:-.4s}:host([pulse])>span:nth-child(2){animation-delay:-.2s}:host([pulse])>span:nth-child(3){animation-delay:0ms}@keyframes pulse{0%,to{opacity:.1;transform:scale(.9)}50%{opacity:1;transform:scale(1.1)}}:host([orbit]),:host([orbit])>span{opacity:1}:host([orbit])>span{border-width:5px}:host([orbit])>span:nth-child(2){animation:orbit 2s linear infinite}:host([orbit][sm])>span{border-width:8px}:host([orbit][md])>span{border-width:13px}:host([orbit][lg])>span{border-width:21px}@keyframes orbit{0%{transform:rotate(0)}to{transform:rotate(360deg)}}:host([ringworm])>svg{animation:rotate 2s linear infinite;height:100%;width:100%;stroke:currentcolor;stroke-width:8}:host([ringworm]) .path{stroke-dashoffset:0;animation:ringworm 1.5s ease-in-out infinite;stroke-linecap:round}@keyframes rotate{to{transform:rotate(360deg)}}@keyframes ringworm{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:89,200;stroke-dashoffset:-35px}to{stroke-dasharray:89,200;stroke-dashoffset:-124px}}:host([laser]){position:static;width:100%;display:block;height:0;overflow:hidden;font-size:unset}:host([laser])>span{position:fixed;width:100%;height:.25rem;border-radius:0;z-index:100}:host([laser])>span:nth-child(1){border-color:currentcolor;opacity:.25}:host([laser])>span:nth-child(2){border-color:currentcolor;animation:laser 2s linear infinite;opacity:1;width:50%}:host([laser][sm])>span:nth-child(2){width:20%}:host([laser][md])>span:nth-child(2){width:30%}:host([laser][lg])>span:nth-child(2){width:50%;animation-duration:1.5s}:host([laser][xl])>span:nth-child(2){width:80%;animation-duration:1.5s}@keyframes laser{0%{left:-100%}to{left:110%}}:host>.no-animation{display:none}@media (prefers-reduced-motion: reduce){:host{display:flex;align-items:center;justify-content:center}:host>span{opacity:1}:host>.loader{display:none}:host>svg{display:none}:host>.no-animation{display:block}}
@@ -21584,7 +21584,7 @@ let AuroHelpText$2$1 = class AuroHelpText extends i$4 {
21584
21584
  }
21585
21585
  };
21586
21586
 
21587
- var formkitVersion$1$3 = '202604242248';
21587
+ var formkitVersion$1$3 = '202605011613';
21588
21588
 
21589
21589
  let AuroElement$2$2 = class AuroElement extends i$4 {
21590
21590
  static get properties() {
@@ -28049,7 +28049,8 @@ let BaseInput$1 = class BaseInput extends AuroElement$1$3 {
28049
28049
  * The id global attribute defines an identifier (ID) which must be unique in the whole document.
28050
28050
  */
28051
28051
  id: {
28052
- type: String
28052
+ type: String,
28053
+ reflect: true,
28053
28054
  },
28054
28055
 
28055
28056
  /**
@@ -28586,11 +28587,10 @@ let BaseInput$1 = class BaseInput extends AuroElement$1$3 {
28586
28587
  */
28587
28588
  handleClickClear() {
28588
28589
  this.inputElement.value = "";
28589
- this.value = "";
28590
28590
  this.labelElement.classList.remove('inputElement-label--sticky');
28591
+ this.validation.reset(this);
28591
28592
  this.notifyValueChanged();
28592
28593
  this.focus();
28593
- this.validation.validate(this);
28594
28594
  }
28595
28595
 
28596
28596
  /**
@@ -29329,7 +29329,7 @@ let AuroHelpText$1$3 = class AuroHelpText extends i$4 {
29329
29329
  }
29330
29330
  };
29331
29331
 
29332
- var formkitVersion$7 = '202604242248';
29332
+ var formkitVersion$7 = '202605011613';
29333
29333
 
29334
29334
  // Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
29335
29335
  // See LICENSE in the project root for license information.
@@ -33997,7 +33997,7 @@ let AuroHelpText$1$2 = class AuroHelpText extends i$4 {
33997
33997
  }
33998
33998
  };
33999
33999
 
34000
- var formkitVersion$1$2 = '202604242248';
34000
+ var formkitVersion$1$2 = '202605011613';
34001
34001
 
34002
34002
  // Copyright (c) 2026 Alaska Airlines. All rights reserved. Licensed under the Apache-2.0 license
34003
34003
  // See LICENSE in the project root for license information.
@@ -38187,7 +38187,7 @@ let AuroHelpText$6 = class AuroHelpText extends i$4 {
38187
38187
  }
38188
38188
  };
38189
38189
 
38190
- var formkitVersion$6 = '202604242248';
38190
+ var formkitVersion$6 = '202605011613';
38191
38191
 
38192
38192
  let AuroElement$1$2 = class AuroElement extends i$4 {
38193
38193
  static get properties() {
@@ -42279,7 +42279,7 @@ let AuroHelpText$5 = class AuroHelpText extends i$4 {
42279
42279
  }
42280
42280
  };
42281
42281
 
42282
- var formkitVersion$5 = '202604242248';
42282
+ var formkitVersion$5 = '202605011613';
42283
42283
 
42284
42284
  // Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
42285
42285
  // See LICENSE in the project root for license information.
@@ -43006,7 +43006,8 @@ class AuroCheckbox extends i$4 {
43006
43006
  * The id global attribute defines an identifier (ID) which must be unique in the whole document.
43007
43007
  */
43008
43008
  id: {
43009
- type: String
43009
+ type: String,
43010
+ reflect: true
43010
43011
  },
43011
43012
 
43012
43013
  /**
@@ -44450,7 +44451,7 @@ let AuroHelpText$4 = class AuroHelpText extends i$4 {
44450
44451
  }
44451
44452
  };
44452
44453
 
44453
- var formkitVersion$4 = '202604242248';
44454
+ var formkitVersion$4 = '202605011613';
44454
44455
 
44455
44456
  // Copyright (c) 2026 Alaska Airlines. All rights reserved. Licensed under the Apache-2.0 license
44456
44457
  // See LICENSE in the project root for license information.
@@ -49932,7 +49933,7 @@ let AuroHelpText$2 = class AuroHelpText extends i$4 {
49932
49933
  }
49933
49934
  };
49934
49935
 
49935
- var formkitVersion$2 = '202604242248';
49936
+ var formkitVersion$2 = '202605011613';
49936
49937
 
49937
49938
  let AuroElement$2$1 = class AuroElement extends i$4 {
49938
49939
  static get properties() {
@@ -56397,7 +56398,8 @@ class BaseInput extends AuroElement$1$1 {
56397
56398
  * The id global attribute defines an identifier (ID) which must be unique in the whole document.
56398
56399
  */
56399
56400
  id: {
56400
- type: String
56401
+ type: String,
56402
+ reflect: true,
56401
56403
  },
56402
56404
 
56403
56405
  /**
@@ -56934,11 +56936,10 @@ class BaseInput extends AuroElement$1$1 {
56934
56936
  */
56935
56937
  handleClickClear() {
56936
56938
  this.inputElement.value = "";
56937
- this.value = "";
56938
56939
  this.labelElement.classList.remove('inputElement-label--sticky');
56940
+ this.validation.reset(this);
56939
56941
  this.notifyValueChanged();
56940
56942
  this.focus();
56941
- this.validation.validate(this);
56942
56943
  }
56943
56944
 
56944
56945
  /**
@@ -57677,7 +57678,7 @@ let AuroHelpText$1$1 = class AuroHelpText extends i$4 {
57677
57678
  }
57678
57679
  };
57679
57680
 
57680
- var formkitVersion$1$1 = '202604242248';
57681
+ var formkitVersion$1$1 = '202605011613';
57681
57682
 
57682
57683
  // Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
57683
57684
  // See LICENSE in the project root for license information.
@@ -58742,7 +58743,7 @@ let AuroBibtemplate$1 = class AuroBibtemplate extends i$4 {
58742
58743
  }
58743
58744
  };
58744
58745
 
58745
- var formkitVersion$3 = '202604242248';
58746
+ var formkitVersion$3 = '202605011613';
58746
58747
 
58747
58748
  var styleCss$1$3 = i$7`.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}`;
58748
58749
 
@@ -59788,6 +59789,8 @@ class AuroCombobox extends AuroElement$3 {
59788
59789
  * @returns {void}
59789
59790
  */
59790
59791
  showBib() {
59792
+ // for fullscreen bib, with `noFilter` showBib() gets called again as availableOptions gets updated
59793
+ // to prevent closing bib in that case, adding guard not to hide bib for empty input on fullscreen bib
59791
59794
  if (!this.input.value && !this.dropdown.isBibFullscreen) {
59792
59795
  this.dropdown.hide();
59793
59796
  return;
@@ -60869,1644 +60872,1503 @@ let AuroElement$2 = class AuroElement extends i$4 {
60869
60872
  }
60870
60873
  };
60871
60874
 
60872
- /* eslint-disable */
60875
+ var styleCss$4 = i$7`.body-default{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-default-font-size, 1rem);line-height:var(--wcss-body-default-line-height, 1.5rem)}.body-lg{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-lg-font-size, 1.125rem);line-height:var(--wcss-body-lg-line-height, 1.625rem)}.body-sm{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-sm-font-size, 0.875rem);line-height:var(--wcss-body-sm-line-height, 1.25rem)}.body-xs{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-xs-font-size, 0.75rem);line-height:var(--wcss-body-xs-line-height, 1rem)}.body-2xs{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-2xs-font-size, 0.625rem);line-height:var(--wcss-body-2xs-line-height, 0.875rem)}.display-2xl{font-family:var(--wcss-display-2xl-family, "AS Circular"),var(--wcss-display-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-display-2xl-letter-spacing, 0);font-weight:var(--wcss-display-2xl-weight, 300);line-height:var(--wcss-display-2xl-line-height, 1.3);font-size:var(--wcss-display-2xl-font-size, clamp(3.5rem, 6vw, 5.375rem))}.display-xl{font-family:var(--wcss-display-xl-family, "AS Circular"),var(--wcss-display-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-display-xl-letter-spacing, 0);font-weight:var(--wcss-display-xl-weight, 300);line-height:var(--wcss-display-xl-line-height, 1.3);font-size:var(--wcss-display-xl-font-size, clamp(3rem, 5.3333333333vw, 4.5rem))}.display-lg{font-family:var(--wcss-display-lg-family, "AS Circular"),var(--wcss-display-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-display-lg-letter-spacing, 0);font-weight:var(--wcss-display-lg-weight, 300);line-height:var(--wcss-display-lg-line-height, 1.3);font-size:var(--wcss-display-lg-font-size, clamp(2.75rem, 4.6666666667vw, 4rem))}.display-md{font-family:var(--wcss-display-md-family, "AS Circular"),var(--wcss-display-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-display-md-letter-spacing, 0);font-weight:var(--wcss-display-md-weight, 300);line-height:var(--wcss-display-md-line-height, 1.3);font-size:var(--wcss-display-md-font-size, clamp(2.5rem, 4vw, 3.5rem))}.display-sm{font-family:var(--wcss-display-sm-family, "AS Circular"),var(--wcss-display-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-display-sm-letter-spacing, 0);font-weight:var(--wcss-display-sm-weight, 300);line-height:var(--wcss-display-sm-line-height, 1.3);font-size:var(--wcss-display-sm-font-size, clamp(2rem, 3.6666666667vw, 3rem))}.display-xs{font-family:var(--wcss-display-xs-family, "AS Circular"),var(--wcss-display-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-display-xs-letter-spacing, 0);font-weight:var(--wcss-display-xs-weight, 300);line-height:var(--wcss-display-xs-line-height, 1.3);font-size:var(--wcss-display-xs-font-size, clamp(1.75rem, 3vw, 2.375rem))}.heading-xl{font-family:var(--wcss-heading-xl-family, "AS Circular"),var(--wcss-heading-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-heading-xl-letter-spacing, 0);font-weight:var(--wcss-heading-xl-weight, 300);line-height:var(--wcss-heading-xl-line-height, 1.3);font-size:var(--wcss-heading-xl-font-size, clamp(2rem, 3vw, 2.5rem))}.heading-lg{font-family:var(--wcss-heading-lg-family, "AS Circular"),var(--wcss-heading-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-heading-lg-letter-spacing, 0);font-weight:var(--wcss-heading-lg-weight, 300);line-height:var(--wcss-heading-lg-line-height, 1.3);font-size:var(--wcss-heading-lg-font-size, clamp(1.75rem, 2.6666666667vw, 2.25rem))}.heading-md{font-family:var(--wcss-heading-md-family, "AS Circular"),var(--wcss-heading-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-heading-md-letter-spacing, 0);font-weight:var(--wcss-heading-md-weight, 300);line-height:var(--wcss-heading-md-line-height, 1.3);font-size:var(--wcss-heading-md-font-size, clamp(1.625rem, 2.3333333333vw, 1.75rem))}.heading-sm{font-family:var(--wcss-heading-sm-family, "AS Circular"),var(--wcss-heading-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-heading-sm-letter-spacing, 0);font-weight:var(--wcss-heading-sm-weight, 300);line-height:var(--wcss-heading-sm-line-height, 1.3);font-size:var(--wcss-heading-sm-font-size, clamp(1.375rem, 2vw, 1.5rem))}.heading-xs{font-family:var(--wcss-heading-xs-family, "AS Circular"),var(--wcss-heading-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-heading-xs-letter-spacing, 0);font-weight:var(--wcss-heading-xs-weight, 450);line-height:var(--wcss-heading-xs-line-height, 1.3);font-size:var(--wcss-heading-xs-font-size, clamp(1.25rem, 1.6666666667vw, 1.25rem))}.heading-2xs{font-family:var(--wcss-heading-2xs-family, "AS Circular"),var(--wcss-heading-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-heading-2xs-letter-spacing, 0);font-weight:var(--wcss-heading-2xs-weight, 450);line-height:var(--wcss-heading-2xs-line-height, 1.3);font-size:var(--wcss-heading-2xs-font-size, clamp(1.125rem, 1.5vw, 1.125rem))}.accent-2xl{font-family:var(--wcss-accent-2xl-family, "Good OT"),var(--wcss-accent-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-accent-2xl-letter-spacing, 0.05em);font-weight:var(--wcss-accent-2xl-weight, 450);line-height:var(--wcss-accent-2xl-line-height, 1);font-size:var(--wcss-accent-2xl-font-size, clamp(2rem, 3.1666666667vw, 2.375rem));text-transform:uppercase}.accent-xl{font-family:var(--wcss-accent-xl-family, "Good OT"),var(--wcss-accent-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-accent-xl-letter-spacing, 0.05em);font-weight:var(--wcss-accent-xl-weight, 450);line-height:var(--wcss-accent-xl-line-height, 1.3);font-size:var(--wcss-accent-xl-font-size, clamp(1.625rem, 2.3333333333vw, 2rem));text-transform:uppercase}.accent-lg{font-family:var(--wcss-accent-lg-family, "Good OT"),var(--wcss-accent-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-accent-lg-letter-spacing, 0.05em);font-weight:var(--wcss-accent-lg-weight, 450);line-height:var(--wcss-accent-lg-line-height, 1.3);font-size:var(--wcss-accent-lg-font-size, clamp(1.5rem, 2.1666666667vw, 1.75rem));text-transform:uppercase}.accent-md{font-family:var(--wcss-accent-md-family, "Good OT"),var(--wcss-accent-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-accent-md-letter-spacing, 0.05em);font-weight:var(--wcss-accent-md-weight, 500);line-height:var(--wcss-accent-md-line-height, 1.3);font-size:var(--wcss-accent-md-font-size, clamp(1.375rem, 1.8333333333vw, 1.5rem));text-transform:uppercase}.accent-sm{font-family:var(--wcss-accent-sm-family, "Good OT"),var(--wcss-accent-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-accent-sm-letter-spacing, 0.05em);font-weight:var(--wcss-accent-sm-weight, 500);line-height:var(--wcss-accent-sm-line-height, 1.3);font-size:var(--wcss-accent-sm-font-size, clamp(1.125rem, 1.5vw, 1.25rem));text-transform:uppercase}.accent-xs{font-family:var(--wcss-accent-xs-family, "Good OT"),var(--wcss-accent-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-accent-xs-letter-spacing, 0.1em);font-weight:var(--wcss-accent-xs-weight, 500);line-height:var(--wcss-accent-xs-line-height, 1.3);font-size:var(--wcss-accent-xs-font-size, clamp(1rem, 1.3333333333vw, 1rem));text-transform:uppercase}.accent-2xs{font-family:var(--wcss-accent-2xs-family, "Good OT"),var(--wcss-accent-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-accent-2xs-letter-spacing, 0.1em);font-weight:var(--wcss-accent-2xs-weight, 450);line-height:var(--wcss-accent-2xs-line-height, 1.3);font-size:var(--wcss-accent-2xs-font-size, clamp(0.875rem, 1.1666666667vw, 0.875rem));text-transform:uppercase}:host{cursor:pointer;user-select:none;text-overflow:ellipsis;max-width:100dvw}:host .wrapper{display:flex;align-items:center;height:var(--ds-size-400, 2rem);padding-right:var(--ds-size-200, 1rem);padding-left:calc(var(--ds-size-150, 0.75rem) + var(--ds-size-300, 1.5rem) + var(--ds-size-100, 0.5rem));border-radius:var(--ds-size-100, 0.5rem);-webkit-tap-highlight-color:transparent}:host .wrapper[class*=shape-box]{border-radius:unset}:host .wrapper[class*=shape-snowflake]{border-radius:unset;line-height:24px}:host .wrapper[class*=shape-pill]{border-radius:30px}:host .wrapper[class*=-lg]{padding-top:var(--ds-size-75, 0.375rem);padding-bottom:var(--ds-size-75, 0.375rem);padding-right:var(--ds-size-150, 0.75rem);line-height:26px}:host .wrapper[class*=-xl]{padding-top:var(--ds-size-100, 0.5rem);padding-bottom:var(--ds-size-100, 0.5rem);padding-right:var(--ds-size-200, 1rem);line-height:26px}:host slot{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}:host [auro-icon]{--ds-auro-icon-size: var(--ds-size-300, 1.5rem);margin-right:var(--ds-size-150, 0.75rem);margin-left:var(--ds-size-100, 0.5rem)}:host ::slotted(.nestingSpacer){display:inline-block;width:var(--ds-size-300, 1.5rem)}[slot=displayValue]{display:none}:host([loadingplaceholder]) .wrapper{padding-left:calc(var(--ds-size-150, 0.75rem) + var(--ds-size-300, 1.5rem) + var(--ds-size-100, 0.5rem))}:host([selected]) .wrapper{padding-left:0}:host([nocheckmark]) .wrapper{padding-left:var(--ds-size-150, 0.75rem)}:host([nocheckmark]) .wrapper[class*=-lg]{padding-left:var(--ds-size-150, 0.75rem)}:host([nocheckmark]) .wrapper[class*=-xl]{padding-left:var(--ds-size-200, 1rem)}:host([hidden]){display:none}:host([static]){pointer-events:none}:host([disabled]:hover){cursor:auto}:host([disabled]){user-select:none;pointer-events:none}`;
60873
60876
 
60874
- class MenuService {
60877
+ var colorCss$4 = i$7`:host .wrapper{background-color:var(--ds-auro-menuoption-container-color, transparent);box-shadow:inset 0 0 0 1px var(--ds-auro-menuoption-container-border-color, transparent);color:var(--ds-auro-menuoption-text-color)}:host svg{fill:var(--ds-auro-menuoption-icon-color)}:host([disabled]){--ds-auro-menuoption-container-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-menuoption-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0);--ds-auro-menuoption-icon-color: var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host(.active){--ds-auro-menuoption-container-color: var(--ds-basic-color-surface-accent1-muted, #ebfafd)}@media(hover: hover){:host(:hover){--ds-auro-menuoption-container-color: var(--ds-basic-color-surface-accent1-muted, #ebfafd)}}:host(:focus){--ds-auro-menuoption-container-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-menuoption-container-border-color: var(--ds-basic-color-border-brand, #00274a)}:host([selected]){--ds-auro-menuoption-container-color: var(--ds-basic-color-surface-accent1-subtle, #b4eff9);--ds-auro-menuoption-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-menuoption-icon-color: var(--ds-basic-color-texticon-default, #2a2a2a)}:host([selected].active){--ds-auro-menuoption-container-color: var(--ds-basic-color-surface-accent1-muted, #ebfafd)}@media(hover: hover){:host([selected]:hover){--ds-auro-menuoption-container-color: var(--ds-basic-color-surface-accent1-muted, #ebfafd)}}:host([selected]:focus){--ds-auro-menuoption-container-color: var(--ds-basic-color-surface-accent1-subtle, #b4eff9);--ds-auro-menuoption-container-border-color: var(--ds-basic-color-border-brand, #00274a)}:host(:focus.active){--ds-auro-menuoption-container-color: var(--ds-basic-color-surface-accent1-muted, #ebfafd);--ds-auro-menuoption-container-border-color: var(--ds-basic-color-border-brand, #00274a)}@media(hover: hover){:host(:focus:hover){--ds-auro-menuoption-container-color: var(--ds-basic-color-surface-accent1-muted, #ebfafd);--ds-auro-menuoption-container-border-color: var(--ds-basic-color-border-brand, #00274a)}}:host([selected]:focus.active){--ds-auro-menuoption-container-color: var(--ds-basic-color-surface-accent1-muted, #ebfafd);--ds-auro-menuoption-container-border-color: var(--ds-basic-color-border-brand, #00274a)}@media(hover: hover){:host([selected]:focus:hover){--ds-auro-menuoption-container-color: var(--ds-basic-color-surface-accent1-muted, #ebfafd);--ds-auro-menuoption-container-border-color: var(--ds-basic-color-border-brand, #00274a)}}`;
60875
60878
 
60876
- /**
60877
- * PROPERTIES AND GETTERS
60878
- */
60879
+ // Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
60880
+ // See LICENSE in the project root for license information.
60879
60881
 
60880
- /**
60881
- * Gets the list of registered menu options.
60882
- * @returns {AuroMenuOption[]}
60883
- */
60884
- get menuOptions() {
60885
- return this._menuOptions;
60886
- }
60882
+ // ---------------------------------------------------------------------
60887
60883
 
60888
- /**
60889
- * Gets the currently highlighted option.
60890
- * @returns {AuroMenuOption|null}
60891
- */
60892
- get highlightedOption() {
60893
- return this._menuOptions[this.highlightedIndex] || null;
60894
- }
60884
+ /* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
60895
60885
 
60896
- /**
60897
- * Gets the current value(s) of the selected option(s).
60898
- * @returns {string|string[]|undefined}
60899
- */
60900
- get currentValue() {
60901
- const values = (this.selectedOptions || []).map(option => option.value);
60902
- return this.multiSelect ? values : values[0];
60903
- }
60886
+ let AuroLibraryRuntimeUtils$4 = class AuroLibraryRuntimeUtils {
60904
60887
 
60905
- /**
60906
- * Gets the label(s) of the currently selected option(s).
60907
- * @returns {string}
60908
- */
60909
- get currentLabel() {
60910
- const labels = (this.selectedOptions || []).map(option => option.textContent);
60911
- return this.multiSelect ? labels.join(", ") : labels[0] || '';
60912
- }
60888
+ /* eslint-disable jsdoc/require-param */
60913
60889
 
60914
60890
  /**
60915
- * Gets the string representation of the current value(s).
60916
- * For multi-select, this is a JSON stringified array.
60917
- * @returns {string|undefined}
60891
+ * This will register a new custom element with the browser.
60892
+ * @param {String} name - The name of the custom element.
60893
+ * @param {Object} componentClass - The class to register as a custom element.
60894
+ * @returns {void}
60918
60895
  */
60919
- get stringValue() {
60920
- const { currentValue } = this;
60921
-
60922
- if (Array.isArray(currentValue)) {
60923
- if (currentValue.length > 0) {
60924
- return JSON.stringify(currentValue);
60925
- }
60926
- return undefined;
60927
- }
60928
-
60929
- if (typeof currentValue === 'string') {
60930
- if (currentValue.length > 0) {
60931
- return currentValue;
60932
- }
60933
- return undefined;
60896
+ registerComponent(name, componentClass) {
60897
+ if (!customElements.get(name)) {
60898
+ customElements.define(name, class extends componentClass {});
60934
60899
  }
60935
-
60936
- // Future: handle other types here (e.g., number, object, etc.)
60937
- return undefined;
60938
60900
  }
60939
60901
 
60940
60902
  /**
60941
- * Gets the key(s) of the currently selected option(s).
60942
- * @returns {string|string[]|undefined}
60903
+ * Finds and returns the closest HTML Element based on a selector.
60904
+ * @returns {void}
60943
60905
  */
60944
- get currentKeys() {
60945
- const keys = (this.selectedOptions || []).map(option => option.key);
60946
- return this.multiSelect ? keys : keys[0];
60906
+ closestElement(
60907
+ selector, // selector like in .closest()
60908
+ base = this, // extra functionality to skip a parent
60909
+ __Closest = (el, found = el && el.closest(selector)) =>
60910
+ !el || el === document || el === window
60911
+ ? null // standard .closest() returns null for non-found selectors also
60912
+ : found
60913
+ ? found // found a selector INside this element
60914
+ : __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
60915
+ ) {
60916
+ return __Closest(base);
60947
60917
  }
60918
+ /* eslint-enable jsdoc/require-param */
60948
60919
 
60949
60920
  /**
60950
- * CONSTRUCTOR
60951
- */
60952
-
60953
- /**
60954
- * Creates a new MenuService instance.
60955
- * @param {Object} options - The options object.
60956
- * @param {AuroMenu} options.host - The host element that this service will control. Required.
60957
- * @throws {Error} If the host is not provided.
60921
+ * 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.
60922
+ * @param {Object} elem - The element to check.
60923
+ * @param {String} tagName - The name of the Auro component to check for or add as an attribute.
60924
+ * @returns {void}
60958
60925
  */
60959
- constructor({ host } = {}) {
60926
+ handleComponentTagRename(elem, tagName) {
60927
+ const tag = tagName.toLowerCase();
60928
+ const elemTag = elem.tagName.toLowerCase();
60960
60929
 
60961
- // Ensure a host was passed
60962
- if (!host) {
60963
- throw new Error("MenuService requires a host element.");
60930
+ if (elemTag !== tag) {
60931
+ elem.setAttribute(tag, true);
60964
60932
  }
60965
-
60966
- // Attach the service to the host
60967
- this.host = host;
60968
- this.host.addController(this);
60969
-
60970
- // Set default properties
60971
- this.size = undefined;
60972
- this.shape = undefined;
60973
- this.noCheckmark = undefined;
60974
- this.disabled = undefined;
60975
- this.matchWord = undefined;
60976
- this.multiSelect = undefined;
60977
- this.allowDeselect = undefined;
60978
- this.selectAllMatchingOptions = undefined;
60979
-
60980
- this.highlightedIndex = -1;
60981
-
60982
- this._menuOptions = [];
60983
- this._subscribers = [];
60984
- this.internalUpdateInProgress = false;
60985
- this.selectedOptions = [];
60986
- this._pendingValue = null;
60987
- this._pendingRetryScheduled = false;
60988
- this._pendingRetryCount = 0;
60989
60933
  }
60990
60934
 
60991
60935
  /**
60992
- * PROPERTY SYNCING
60993
- */
60994
-
60995
- /**
60996
- * Handles host updates.
60997
- * This is a lit reactive lifecycle method.
60998
- * This comes from the Lit controller interface provided by adding this service as a controller to the host.
60999
- * See constructor for `this.host.addController(this)`
61000
- * You can read more about Lit reactive controllers here: https://lit.dev/docs/composition/controllers/
60936
+ * Validates if an element is a specific Auro component.
60937
+ * @param {Object} elem - The element to validate.
60938
+ * @param {String} tagName - The name of the Auro component to check against.
60939
+ * @returns {Boolean} - Returns true if the element is the specified Auro component.
61001
60940
  */
61002
- hostUpdated() {
61003
-
61004
- // Reset selection if multiSelect mode changes
61005
- if (this.host.multiSelect !== this.multiSelect) {
61006
- this.selectedOptions = [];
61007
- }
60941
+ elementMatch(elem, tagName) {
60942
+ const tag = tagName.toLowerCase();
60943
+ const elemTag = elem.tagName.toLowerCase();
61008
60944
 
61009
- // Update properties on host update
61010
- this.setProperties({
61011
- size: this.host.size,
61012
- shape: this.host.shape,
61013
- noCheckmark: this.host.noCheckmark,
61014
- disabled: this.host.disabled,
61015
- matchWord: this.host.matchWord,
61016
- multiSelect: this.host.multiSelect,
61017
- allowDeselect: this.host.allowDeselect,
61018
- selectAllMatchingOptions: this.host.selectAllMatchingOptions
61019
- });
60945
+ return elemTag === tag || elem.hasAttribute(tag);
61020
60946
  }
61021
60947
 
61022
60948
  /**
61023
- * Handles host disconnection and memory cleanup.
60949
+ * Gets the text content of a named slot.
60950
+ * @returns {String}
60951
+ * @private
61024
60952
  */
61025
- hostDisconnected() {
61026
- this._subscribers = [];
61027
- this._menuOptions = [];
61028
- this._pendingValue = null;
61029
- this._pendingRetryScheduled = false;
61030
- this._pendingRetryCount = 0;
61031
- }
60953
+ getSlotText(elem, name) {
60954
+ const slot = elem.shadowRoot?.querySelector(`slot[name="${name}"]`);
60955
+ const nodes = slot?.assignedNodes({ flatten: true }) || [];
60956
+ const text = nodes.map(n => n.textContent?.trim()).join(' ').trim();
61032
60957
 
61033
- /**
61034
- * Sets a property value if it exists on the instance and the value has changed.
61035
- * @param {string} property
61036
- * @param {any} value
61037
- */
61038
- setProperty(property, value) {
60958
+ return text || null;
60959
+ }
60960
+ };
61039
60961
 
61040
- // Only update if we are tracking the property in this service
61041
- if (this.hasOwnProperty(property)) {
60962
+ // Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
60963
+ // See LICENSE in the project root for license information.
61042
60964
 
61043
- // Check if the value has changed
61044
- const valueChanged = this[property] !== value;
61045
60965
 
61046
- // Update and notify if changed
61047
- if (valueChanged) {
61048
- this[property] = value;
61049
- this.notify({ property, value });
61050
- }
61051
- }
61052
- }
60966
+ let AuroDependencyVersioning$3 = class AuroDependencyVersioning {
61053
60967
 
61054
60968
  /**
61055
- * Sets multiple properties on the instance.
61056
- * @param {Object} properties - Key-value pairs of properties to set.
60969
+ * Generates a unique string to be used for child auro element naming.
60970
+ * @private
60971
+ * @param {string} baseName - Defines the first part of the unique element name.
60972
+ * @param {string} version - Version of the component that will be appended to the baseName.
60973
+ * @returns {string} - Unique string to be used for naming.
61057
60974
  */
61058
- setProperties(properties) {
61059
- for (const [key, value] of Object.entries(properties)) {
61060
- this.setProperty(key, value);
61061
- }
61062
- }
60975
+ generateElementName(baseName, version) {
60976
+ let result = baseName;
61063
60977
 
61064
- /**
61065
- * MENU OPTION HIGHLIGHTING
61066
- */
60978
+ result += '-';
60979
+ result += version.replace(/[.]/g, '_');
61067
60980
 
61068
- /**
61069
- * Highlights the next active option in the menu.
61070
- */
61071
- highlightNext() {
61072
- this.moveHighlightedOption("next");
60981
+ return result;
61073
60982
  }
61074
60983
 
61075
60984
  /**
61076
- * Highlights the previous active option in the menu.
60985
+ * Generates a unique string to be used for child auro element naming.
60986
+ * @param {string} baseName - Defines the first part of the unique element name.
60987
+ * @param {string} version - Version of the component that will be appended to the baseName.
60988
+ * @returns {string} - Unique string to be used for naming.
61077
60989
  */
61078
- highlightPrevious() {
61079
- this.moveHighlightedOption("previous");
60990
+ generateTag(baseName, version, tagClass) {
60991
+ const elementName = this.generateElementName(baseName, version);
60992
+ const tag = i$3`${s$6(elementName)}`;
60993
+
60994
+ if (!customElements.get(elementName)) {
60995
+ customElements.define(elementName, class extends tagClass {});
60996
+ }
60997
+
60998
+ return tag;
61080
60999
  }
61000
+ };
61081
61001
 
61082
- /**
61083
- * Moves the highlighted option in the specified direction.
61084
- * @param {string} direction - The direction to move the highlight ("next" or "previous").
61085
- */
61086
- moveHighlightedOption(direction) {
61002
+ let p$3 = class p{registerComponent(t,a){customElements.get(t)||customElements.define(t,class extends a{});}closestElement(t,a=this,e=(a,s=a&&a.closest(t))=>a&&a!==document&&a!==window?s||e(a.getRootNode().host):null){return e(a)}handleComponentTagRename(t,a){const e=a.toLowerCase();t.tagName.toLowerCase()!==e&&t.setAttribute(e,true);}elementMatch(t,a){const e=a.toLowerCase();return t.tagName.toLowerCase()===e||t.hasAttribute(e)}getSlotText(t,a){const e=t.shadowRoot?.querySelector(`slot[name="${a}"]`);return (e?.assignedNodes({flatten:true})||[]).map(t=>t.textContent?.trim()).join(" ").trim()||null}};var u$3='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-labelledby="error__desc" class="ico_squareLarge" data-deprecated="true" role="img" style="min-width:var(--auro-size-lg, var(--ds-size-300, 1.5rem));height:var(--auro-size-lg, var(--ds-size-300, 1.5rem));fill:currentColor" viewBox="0 0 24 24" part="svg"><title/><desc id="error__desc">Error alert indicator.</desc><path d="m13.047 5.599 6.786 11.586A1.207 1.207 0 0 1 18.786 19H5.214a1.207 1.207 0 0 1-1.047-1.815l6.786-11.586a1.214 1.214 0 0 1 2.094 0m-1.165.87a.23.23 0 0 0-.085.085L5.419 17.442a.232.232 0 0 0 .203.35h12.756a.234.234 0 0 0 .203-.35L12.203 6.554a.236.236 0 0 0-.321-.084M12 15.5a.75.75 0 1 1 0 1.5.75.75 0 0 1 0-1.5m-.024-6.22c.325 0 .589.261.589.583v4.434a.586.586 0 0 1-.589.583.586.586 0 0 1-.588-.583V9.863c0-.322.264-.583.588-.583"/></svg>';let m$3 = class m extends i$4{static get properties(){return {hidden:{type:Boolean,reflect:true},hiddenVisually:{type:Boolean,reflect:true},hiddenAudible:{type:Boolean,reflect:true}}}hideAudible(t){return t?"true":"false"}};const g$3=new Map,f$3=(t,a={})=>{const e=a.responseParser||(t=>t.text());return g$3.has(t)||g$3.set(t,fetch(t).then(e)),g$3.get(t)};var w$3=i$7`:focus:not(:focus-visible){outline:3px solid transparent}.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock,:host{display:block}.util_displayFlex{display:flex}.util_displayHidden,:host([hidden]:not(:focus):not(:active)){display:none}.util_displayHiddenVisually,:host([hiddenVisually]:not(:focus):not(:active)){position:absolute;overflow:hidden;clip:rect(1px,1px,1px,1px);width:1px;height:1px;padding:0;border:0}.ico_squareLarge{fill:currentColor;height:var(--auro-size-lg, var(--ds-size-300, 1.5rem))}.ico_squareSmall{fill:currentColor;height:.6rem}.ico_squareMed{fill:currentColor;height:var(--auro-size-md, var(--ds-size-200, 1rem))}.ico_squareSml{fill:currentColor;height:var(--auro-size-sm, var(--ds-size-150, .75rem))}:host{color:currentColor;vertical-align:middle;display:inline-block}svg{min-width:var(--ds-auro-icon-size, 1.5rem)!important;width:var(--ds-auro-icon-size, 1.5rem)!important;height:var(--ds-auro-icon-size, 1.5rem)!important}.componentWrapper{display:flex;line-height:var(--ds-auro-icon-size)}.svgWrapper{height:var(--ds-auro-icon-size);width:var(--ds-auro-icon-size)}.svgWrapper [part=svg]{display:flex}.labelWrapper{margin-left:var(--ds-size-50, .25rem)}.labelWrapper ::slotted(*){line-height:inherit!important}
61003
+ `;let z$3 = class z extends m$3{constructor(){super(),this._initializeDefaults();}_initializeDefaults(){this.onDark=false,this.appearance="default";}static get properties(){return {...m$3.properties,onDark:{type:Boolean,reflect:true},appearance:{type:String,reflect:true},svg:{attribute:false,reflect:true}}}static get styles(){return w$3}async fetchIcon(t,a){let e="";e="logos"===t?await f$3(`${this.uri}/${t}/${a}.svg`):await f$3(`${this.uri}/icons/${t}/${a}.svg`);return (new DOMParser).parseFromString(e,"text/html").body.querySelector("svg")}async firstUpdated(){try{if(!this.customSvg){const t=await this.fetchIcon(this.category,this.name);if(t)this.svg=t;else if(!t){const t=(new DOMParser).parseFromString(u$3,"text/html");this.svg=t.body.firstChild;}}}catch(t){this.svg=void 0;}}};i$7`.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock,:host{display:block}.util_displayFlex{display:flex}.util_displayHidden,:host([hidden]:not(:focus):not(:active)){display:none}.util_displayHiddenVisually,:host([hiddenVisually]:not(:focus):not(:active)){position:absolute;overflow:hidden;clip:rect(1px,1px,1px,1px);width:1px;height:1px;padding:0;border:0}:host{display:inline-block;--ds-auro-icon-size: 100%;width:100%;height:100%}:host .logo{color:var(--ds-auro-alaska-color)}:host([onDark]),:host([appearance=inverse]){--ds-auro-alaska-color: #FFF}
61004
+ `;var y$3=i$7`:host{--ds-auro-icon-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-alaska-color: #02426D;--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}
61005
+ `;var x$3=i$7`:host{color:var(--ds-auro-icon-color)}:host([customColor]){color:inherit}:host(:not([onDark])[variant=accent1]),:host(:not([appearance=inverse])[variant=accent1]){--ds-auro-icon-color: var(--ds-basic-color-texticon-accent1, #265688)}:host(:not([onDark])[variant=disabled]),:host(:not([appearance=inverse])[variant=disabled]){--ds-auro-icon-color: var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host(:not([onDark])[variant=muted]),:host(:not([appearance=inverse])[variant=muted]){--ds-auro-icon-color: var(--ds-basic-color-texticon-muted, #676767)}:host(:not([onDark])[variant=statusDefault]),:host(:not([appearance=inverse])[variant=statusDefault]){--ds-auro-icon-color: var(--ds-basic-color-status-default, #afb9c6)}:host(:not([onDark])[variant=statusInfo]),:host(:not([appearance=inverse])[variant=statusInfo]){--ds-auro-icon-color: var(--ds-basic-color-status-info, #01426a)}:host(:not([onDark])[variant=statusSuccess]),:host(:not([appearance=inverse])[variant=statusSuccess]){--ds-auro-icon-color: var(--ds-basic-color-status-success, #447a1f)}:host(:not([onDark])[variant=statusWarning]),:host(:not([appearance=inverse])[variant=statusWarning]){--ds-auro-icon-color: var(--ds-basic-color-status-warning, #fac200)}:host(:not([onDark])[variant=statusError]),:host(:not([appearance=inverse])[variant=statusError]){--ds-auro-icon-color: var(--ds-basic-color-status-error, #e31f26)}:host(:not([onDark])[variant=statusInfoSubtle]),:host(:not([appearance=inverse])[variant=statusInfoSubtle]){--ds-auro-icon-color: var(--ds-basic-color-status-info-subtle, #ebf3f9)}:host(:not([onDark])[variant=statusSuccessSubtle]),:host(:not([appearance=inverse])[variant=statusSuccessSubtle]){--ds-auro-icon-color: var(--ds-basic-color-status-success-subtle, #d6eac7)}:host(:not([onDark])[variant=statusWarningSubtle]),:host(:not([appearance=inverse])[variant=statusWarningSubtle]){--ds-auro-icon-color: var(--ds-basic-color-status-warning-subtle, #fff0b2)}:host(:not([onDark])[variant=statusErrorSubtle]),:host(:not([appearance=inverse])[variant=statusErrorSubtle]){--ds-auro-icon-color: var(--ds-basic-color-status-error-subtle, #fbc6c6)}:host(:not([onDark])[variant=fareBasicEconomy]),:host(:not([appearance=inverse])[variant=fareBasicEconomy]){--ds-auro-icon-color: var(--ds-basic-color-fare-basiceconomy, #97eaf8)}:host(:not([onDark])[variant=fareBusiness]),:host(:not([appearance=inverse])[variant=fareBusiness]){--ds-auro-icon-color: var(--ds-basic-color-fare-business, #01426a)}:host(:not([onDark])[variant=fareEconomy]),:host(:not([appearance=inverse])[variant=fareEconomy]){--ds-auro-icon-color: var(--ds-basic-color-fare-economy, #0074ca)}:host(:not([onDark])[variant=fareFirst]),:host(:not([appearance=inverse])[variant=fareFirst]){--ds-auro-icon-color: var(--ds-basic-color-fare-first, #00274a)}:host(:not([onDark])[variant=farePremiumEconomy]),:host(:not([appearance=inverse])[variant=farePremiumEconomy]){--ds-auro-icon-color: var(--ds-basic-color-fare-premiumeconomy, #005154)}:host(:not([onDark])[variant=tierOneWorldEmerald]),:host(:not([appearance=inverse])[variant=tierOneWorldEmerald]){--ds-auro-icon-color: var(--ds-basic-color-tier-program-oneworld-emerald, #139142)}:host(:not([onDark])[variant=tierOneWorldSapphire]),:host(:not([appearance=inverse])[variant=tierOneWorldSapphire]){--ds-auro-icon-color: var(--ds-basic-color-tier-program-oneworld-sapphire, #015daa)}:host(:not([onDark])[variant=tierOneWorldRuby]),:host(:not([appearance=inverse])[variant=tierOneWorldRuby]){--ds-auro-icon-color: var(--ds-basic-color-tier-program-oneworld-ruby, #a41d4a)}:host([onDark]),:host([appearance=inverse]){--ds-auro-icon-color: var(--ds-basic-color-texticon-inverse, #ffffff)}:host([onDark][variant=disabled]),:host([appearance=inverse][variant=disabled]){--ds-auro-icon-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}:host([onDark][variant=muted]),:host([appearance=inverse][variant=muted]){--ds-auro-icon-color: var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([onDark][variant=statusError]),:host([appearance=inverse][variant=statusError]){--ds-auro-icon-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8)}
61006
+ `;let _$2 = class _ extends z$3{constructor(){super(),this._initializeDefaults();}_initializeDefaults(){this.variant=void 0,this.uri="https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist",this.runtimeUtils=new p$3;}static get properties(){return {...z$3.properties,ariaHidden:{type:String,reflect:true},category:{type:String,reflect:true},customColor:{type:Boolean,reflect:true},customSvg:{type:Boolean},label:{type:Boolean,reflect:true},name:{type:String,reflect:true},variant:{type:String,reflect:true}}}static get styles(){return [z$3.styles,y$3,w$3,x$3]}static register(t="auro-icon"){p$3.prototype.registerComponent(t,_);}connectedCallback(){super.connectedCallback(),this.runtimeUtils.handleComponentTagRename(this,"auro-icon");}exposeCssParts(){this.setAttribute("exportparts","svg:iconSvg");}async firstUpdated(){if(await super.firstUpdated(),this.hasAttribute("ariaHidden")&&this.svg){const t=this.svg.querySelector("desc");t&&(t.remove(),this.svg.removeAttribute("aria-labelledby"));}}render(){const t={labelWrapper:true,util_displayHiddenVisually:!this.label};return b$7`
61007
+ <div class="componentWrapper">
61008
+ <div
61009
+ class="${e$3({svgWrapper:true})}"
61010
+ title="${o$4(this.title||void 0)}">
61011
+ <span aria-hidden="${o$4(this.ariaHidden||true)}" part="svg">
61012
+ ${this.customSvg?b$7`
61013
+ <slot name="svg"></slot>
61014
+ `:b$7`
61015
+ ${this.svg}
61016
+ `}
61017
+ </span>
61018
+ </div>
61087
61019
 
61088
- // Get the active options
61089
- const activeOptions = this._menuOptions.filter(option => option.isActive);
61020
+ <div class="${e$3(t)}" part="label">
61021
+ <slot></slot>
61022
+ </div>
61023
+ </div>
61024
+ `}};
61090
61025
 
61091
- // Get the currently active option
61092
- const currentActiveOption = activeOptions[activeOptions.indexOf(this.highlightedOption)];
61026
+ var iconVersion$2 = '9.1.2';
61093
61027
 
61094
- // Determine the new index based on the currently active option and direction
61095
- let newIndex = currentActiveOption
61096
- ? direction === "previous"
61097
- ? activeOptions.indexOf(currentActiveOption) - 1
61098
- : activeOptions.indexOf(currentActiveOption) + 1
61099
- : direction === "previous"
61100
- ? activeOptions.length - 1
61101
- : 0;
61028
+ var checkmarkIcon = {"svg":"<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" aria-labelledby=\"checkmark-sm__desc\" class=\"ico_squareLarge\" role=\"img\" style=\"min-width:var(--auro-size-lg, var(--ds-size-300, 1.5rem));height:var(--auro-size-lg, var(--ds-size-300, 1.5rem));fill:currentColor\" viewBox=\"0 0 24 24\" part=\"svg\"><title/><desc id=\"checkmark-sm__desc\">a small check mark.</desc><path d=\"M8.461 11.84a.625.625 0 1 0-.922.844l2.504 2.738c.247.27.674.27.922 0l5.496-6a.625.625 0 1 0-.922-.844l-5.035 5.496z\"/></svg>"};
61102
61029
 
61103
- // Wrap around the index if needed
61104
- newIndex = newIndex < 0 ? activeOptions.length - 1 : newIndex >= activeOptions.length ? 0 : newIndex;
61030
+ /**
61031
+ * Helper method to dispatch custom events.
61032
+ * @param {HTMLElement} element - Element to dispatch event from.
61033
+ * @param {string} eventName - Name of the event to dispatch.
61034
+ * @param {Object} [detail] - Optional detail object to include with the event.
61035
+ */
61036
+ function dispatchMenuEvent(element, eventName, detail = null) {
61037
+ const eventConfig = {
61038
+ bubbles: true,
61039
+ cancelable: false,
61040
+ composed: true
61041
+ };
61105
61042
 
61106
- // Get the new active option and set it as highlighted
61107
- const newActiveOption = activeOptions[newIndex];
61108
- this.setHighlightedOption(newActiveOption);
61043
+ if (detail !== null) {
61044
+ eventConfig.detail = detail;
61109
61045
  }
61110
61046
 
61111
- /**
61112
- * Sets the highlighted index to the specified option.
61113
- * @param {AuroMenuOption} option - The option to highlight.
61114
- */
61115
- setHighlightedOption(option) {
61116
-
61117
- if (!option) return;
61047
+ element.dispatchEvent(new CustomEvent(eventName, eventConfig));
61048
+ }
61118
61049
 
61119
- // Get the index of the option to highlight
61120
- const index = this._menuOptions.indexOf(option);
61050
+ // Copyright (c) 2021 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
61051
+ // See LICENSE in the project root for license information.
61121
61052
 
61122
- // Update highlighted index
61123
- this.highlightedIndex = index;
61124
61053
 
61125
- // Notify subscribers of highlight change
61126
- this.notify({ type: 'highlightChange', option, index: this.highlightedIndex });
61054
+ let menuOptionIdCounter = 0;
61127
61055
 
61128
- // Dispatch the change event
61129
- this.dispatchChangeEvent('auroMenu-activatedOption', option);
61130
- }
61056
+ /**
61057
+ * The `auro-menuoption` element provides users a way to define a menu option.
61058
+ * @customElement auro-menuoption
61059
+ *
61060
+ * @slot default - The default slot for the menu option text.
61061
+ *
61062
+ * @event auroMenuOption-mouseover - Notifies that this option has been hovered over.
61063
+ */
61064
+ class AuroMenuOption extends AuroElement$2 {
61131
61065
 
61132
61066
  /**
61133
- * Sets the highlighted option to the option at the specified index if it exists.
61134
- * @param {number} index
61067
+ * This will register this element with the browser.
61068
+ * @param {string} [name="auro-menuoption"] - The name of the element that you want to register.
61069
+ *
61070
+ * @example
61071
+ * AuroMenuOption.register("custom-menuoption") // this will register this element to <custom-menuoption/>
61072
+ *
61135
61073
  */
61136
- setHighlightedIndex(index) {
61137
- const option = this._menuOptions[index] || null;
61138
- this.setHighlightedOption(option);
61074
+ static register(name = "auro-menuoption") {
61075
+ AuroLibraryRuntimeUtils$4.prototype.registerComponent(name, AuroMenuOption);
61139
61076
  }
61140
61077
 
61141
61078
  /**
61142
- * Selects the currently highlighted option.
61079
+ * Returns whether the menu option is currently active and selectable.
61080
+ * An option is considered active if it is not hidden, not disabled, and not static.
61081
+ * @returns {boolean} True if the option is active, false otherwise.
61143
61082
  */
61144
- selectHighlightedOption() {
61145
- if (this.highlightedOption) {
61146
- this.toggleOption(this.highlightedOption);
61147
- }
61083
+ get isActive() {
61084
+ return !this.hasAttribute('hidden') &&
61085
+ !this.disabled &&
61086
+ !this.hasAttribute('static');
61148
61087
  }
61149
61088
 
61150
- /**
61151
- * SELECTION AND DESELECTION METHODS
61152
- */
61089
+ constructor() {
61090
+ super();
61153
61091
 
61154
- /**
61155
- * Selects one or more options in a batch operation
61156
- * @param {AuroMenuOption|AuroMenuOption[]} options - Single option or array of options to select
61157
- */
61158
- selectOptions(options) {
61159
- let optionsToSelect = Array.isArray(options) ? options : [options];
61092
+ this.bindEvents();
61160
61093
 
61161
- // Filter out options that are inactive
61162
- optionsToSelect = optionsToSelect.filter(option => option.isActive);
61094
+ /**
61095
+ * @private
61096
+ */
61097
+ this.shape = undefined;
61163
61098
 
61164
- if (!optionsToSelect.length) return;
61099
+ /**
61100
+ * @private
61101
+ */
61102
+ this.size = undefined;
61165
61103
 
61166
- if (this.multiSelect) {
61167
- this.selectedOptions = [...(this.selectedOptions || []), ...optionsToSelect];
61168
- } else {
61169
- // In single select mode, only take the last option
61170
- this.selectedOptions = [optionsToSelect[optionsToSelect.length - 1]];
61171
- }
61104
+ /**
61105
+ * Generate unique names for dependency components.
61106
+ */
61107
+ const versioning = new AuroDependencyVersioning$3();
61108
+ this.iconTag = versioning.generateTag('auro-formkit-menuoption-icon', iconVersion$2, _$2);
61172
61109
 
61173
- this.stageUpdate();
61174
- }
61110
+ this.selected = false;
61111
+ this.noCheckmark = false;
61112
+ this.disabled = false;
61113
+ this.noMatch = false;
61175
61114
 
61176
- /**
61177
- * Deselects one or more options in a batch operation
61178
- * @param {AuroMenuOption|AuroMenuOption[]} options - Single option or array of options to deselect
61179
- */
61180
- deselectOptions(options) {
61181
- const optionsToDeselect = Array.isArray(options) ? options : [options];
61115
+ /**
61116
+ * @private
61117
+ */
61118
+ this.runtimeUtils = new AuroLibraryRuntimeUtils$4();
61182
61119
 
61183
- if (!optionsToDeselect.length) return;
61120
+ // Initialize context-related properties
61121
+ this.menuService = null;
61122
+ this.unsubscribe = null;
61184
61123
 
61185
- // Check if deselection should be prevented
61186
- const shouldPreventDeselect = !this.allowDeselect && !this.multiSelect;
61187
- const isOnlySelectedOption = this.selectedOptions.length === 1 && optionsToDeselect.includes(this.selectedOptions[0]);
61124
+ /**
61125
+ * @private
61126
+ */
61127
+ this.handleMenuChange = this.handleMenuChange.bind(this);
61128
+ }
61188
61129
 
61189
- // Prevent deselecting the only selected option if not allowed
61190
- if (shouldPreventDeselect && isOnlySelectedOption) {
61191
- optionsToDeselect.forEach(option => {
61192
- option.selected = true;
61193
- });
61194
- this.dispatchChangeEvent('auroMenu-deselectPrevented', {
61195
- values: optionsToDeselect
61196
- });
61197
- return;
61198
- }
61130
+ static get properties() {
61131
+ return {
61132
+ ...super.properties,
61199
61133
 
61200
- const optionsSet = new Set(optionsToDeselect);
61201
- this.selectedOptions = (this.selectedOptions || [])
61202
- .filter(opt => !optionsSet.has(opt));
61134
+ /**
61135
+ * When true, disables the menu option.
61136
+ */
61137
+ disabled: {
61138
+ type: Boolean,
61139
+ reflect: true
61140
+ },
61203
61141
 
61204
- this.stageUpdate();
61205
- }
61142
+ /**
61143
+ * @private
61144
+ */
61145
+ event: {
61146
+ type: String,
61147
+ reflect: true
61148
+ },
61206
61149
 
61207
- /**
61208
- * Selects a single option.
61209
- * @param {AuroMenuOption} option
61210
- */
61211
- selectOption(option) {
61212
- this.selectOptions(option);
61213
- }
61150
+ /**
61151
+ * @private
61152
+ */
61153
+ layout: {
61154
+ type: String
61155
+ },
61214
61156
 
61215
- /**
61216
- * Deselects a single option.
61217
- * @param {AuroMenuOption} option
61218
- */
61219
- deselectOption(option) {
61220
- this.deselectOptions(option);
61221
- }
61157
+ /**
61158
+ * Allows users to set a unique key for the menu option for specified option selection. If no key is provided, the value property will be used.
61159
+ */
61160
+ key: {
61161
+ type: String,
61162
+ reflect: true
61163
+ },
61222
61164
 
61223
- /**
61224
- * Toggles the selection state of a single option.
61225
- * @param {AuroMenuOption} option
61226
- */
61227
- toggleOption(option) {
61228
- if (option.selected) {
61229
- this.deselectOption(option);
61230
- } else {
61231
- this.selectOption(option);
61232
- }
61165
+ /**
61166
+ * @private
61167
+ */
61168
+ menuService: {
61169
+ type: Object,
61170
+ state: true
61171
+ },
61172
+
61173
+ /**
61174
+ * @private
61175
+ */
61176
+ matchWord: {
61177
+ type: String,
61178
+ state: true
61179
+ },
61180
+
61181
+ /**
61182
+ * @private
61183
+ */
61184
+ noCheckmark: {
61185
+ type: Boolean,
61186
+ reflect: true
61187
+ },
61188
+
61189
+ /**
61190
+ * When true, marks this option as the "no matching results" placeholder shown by combobox when the user's input does not match any available options. Enables distinct styling and prevents the option from being treated as a selectable match.
61191
+ */
61192
+ noMatch: {
61193
+ type: Boolean,
61194
+ reflect: true,
61195
+ attribute: 'nomatch'
61196
+ },
61197
+
61198
+ /**
61199
+ * Specifies that an option is selected.
61200
+ */
61201
+ selected: {
61202
+ type: Boolean,
61203
+ reflect: true
61204
+ },
61205
+
61206
+ /**
61207
+ * Specifies the tab index of the menu option.
61208
+ */
61209
+ tabIndex: {
61210
+ type: Number,
61211
+ reflect: true
61212
+ },
61213
+
61214
+ /**
61215
+ * Specifies the value to be sent to a server.
61216
+ */
61217
+ value: {
61218
+ type: String,
61219
+ reflect: true
61220
+ },
61221
+ };
61233
61222
  }
61234
61223
 
61235
- /**
61236
- * Selects options based on their value(s) when compared to a passed value or values.
61237
- * Value or values are normalized to an array of strings that can be matched to option keys.
61238
- * @param {string|number|Array<string|number>} value - The value(s) to select.
61239
- */
61240
- selectByValue(value) {
61241
- const isEmptyValue = value === undefined ||
61242
- value === null ||
61243
- (Array.isArray(value) && value.length === 0) ||
61244
- (typeof value === 'string' && value.trim() === '');
61224
+ static get styles() {
61225
+ return [
61226
+ styleCss$4,
61227
+ colorCss$4,
61228
+ tokensCss$4
61229
+ ];
61230
+ }
61245
61231
 
61246
- // Early exit for invalid/empty values
61247
- if (isEmptyValue) {
61248
- this.selectedOptions.forEach(opt => opt.selected = false);
61249
- this.selectedOptions = [];
61250
- return;
61251
- }
61232
+ connectedCallback() {
61233
+ super.connectedCallback();
61252
61234
 
61253
- // If an internal update cycle is still in progress, defer value application
61254
- // rather than dropping it.
61255
- if (this.internalUpdateInProgress || this.host.internalUpdateInProgress) {
61256
- this.queuePendingValue(value);
61257
- return;
61258
- }
61235
+ // Add the tag name as an attribute if it is different than the component name
61236
+ // Add this step soon as this node gets attached to the DOM to avoid racing condition with menu's value setting logic.
61237
+ this.runtimeUtils.handleComponentTagRename(this, 'auro-menuoption');
61259
61238
 
61260
- // Normalize values to array of strings
61261
- const normalizedValues = this._getNormalizedValues(value);
61239
+ // Set up context consumption in connectedCallback
61240
+ this._contextConsumer = new s$1(this, {
61241
+ context: MenuContext,
61242
+ callback: this.attachTo.bind(this),
61243
+ subscribe: true
61244
+ });
61262
61245
 
61263
- // Validate for single-select mode
61264
- let validatedValues = normalizedValues;
61265
- if (normalizedValues.length > 1 && !this.multiSelect) {
61266
- console.warn("MenuService - Multiple values provided for single-select menu. Only the first value will be selected.");
61267
- validatedValues = [normalizedValues[0]];
61246
+ // Establish the key property as early as possible.
61247
+ // When a framework (e.g. Svelte) inserts the element into the DOM before
61248
+ // setting its `value` property, both `getAttribute('value')` and
61249
+ // `getAttribute('key')` return null here. Setting `this.key = null`
61250
+ // would block the fallback in `updated()` that assigns key from the
61251
+ // value property (the guard checked `=== undefined`). Only assign key
61252
+ // if at least one source attribute is actually present so that the
61253
+ // `updated()` fallback can run when the value property arrives later.
61254
+ const valueAttr = this.getAttribute('value');
61255
+ const keyAttr = this.getAttribute('key');
61256
+ const resolvedKey = keyAttr !== null ? keyAttr : valueAttr;
61257
+ if (resolvedKey !== null) {
61258
+ this.key = resolvedKey;
61268
61259
  }
61260
+ }
61269
61261
 
61270
- if (this._menuOptions.length === 0) {
61271
- this.queuePendingValue(value);
61272
- return;
61273
- }
61262
+ firstUpdated() {
61263
+ // Add the tag name as an attribute if it is different than the component name
61264
+ this.runtimeUtils.handleComponentTagRename(this, 'auro-menuoption');
61274
61265
 
61275
- // Find matching options by comparing available options to validated values
61276
- const trackedKeys = new Set();
61277
- const optionsToSelect = this._menuOptions.filter(option => {
61278
- const passesFilter = validatedValues.includes(option.key);
61279
- const alreadyTracked = trackedKeys.has(option.key);
61280
- const isActive = option.isActive;
61266
+ // Generate unique ID if not already set (required for aria-activedescendant)
61267
+ if (!this.id) {
61268
+ menuOptionIdCounter += 1;
61269
+ this.id = `menuoption-${menuOptionIdCounter}`;
61270
+ }
61281
61271
 
61282
- trackedKeys.add(option.key);
61272
+ this.setAttribute('role', 'option');
61273
+ this.setAttribute('aria-selected', 'false');
61283
61274
 
61284
- // Include the option in the options to be selected if it passes the filter check and
61285
- // either hasn't been tracked yet or selectAllMatchingOptions is true
61286
- return isActive && passesFilter && (!alreadyTracked || (alreadyTracked && this.selectAllMatchingOptions));
61275
+ this.addEventListener('mouseover', () => {
61276
+ this.dispatchEvent(new CustomEvent('auroMenuOption-mouseover', {
61277
+ bubbles: true,
61278
+ cancelable: false,
61279
+ composed: true,
61280
+ detail: this
61281
+ }));
61287
61282
  });
61283
+ }
61288
61284
 
61289
- // Handle no matches: clear existing selection, but do not dispatch an intermediate
61290
- // undefined value that can overwrite the host value in parent components.
61291
- if (!optionsToSelect.length) {
61292
- const hasUnresolvedKeys = this._menuOptions.some((option) => option.isActive && option.key == null);
61285
+ updated(changedProperties) {
61286
+ super.updated(changedProperties);
61293
61287
 
61294
- if (hasUnresolvedKeys) {
61295
- this.queuePendingValue(value);
61296
- return;
61297
- }
61288
+ // Update aria-selected attribute if selected changed
61289
+ if (changedProperties.has('selected')) {
61298
61290
 
61299
- this.clearPendingValue();
61291
+ // Update aria-selected attribute
61292
+ this.setAttribute('aria-selected', this.selected.toString());
61300
61293
 
61301
- if (this.selectedOptions.length > 0) {
61302
- this.selectedOptions = [];
61294
+ // Update menu service selection state if this isn't an internal update
61295
+ if (this.internalUpdateInProgress !== true) {
61296
+ this.menuService[this.selected ? 'selectOption' : 'deselectOption'](this);
61303
61297
  }
61298
+ }
61304
61299
 
61305
- // Always notify so the host resets any stale invalid value, even when
61306
- // selectedOptions was already empty (e.g. double-clicking set-invalid).
61307
- this.stageUpdate({ reason: 'no-match' });
61308
-
61309
- // Dispatch failure event if no matches found
61310
- if (validatedValues.length) {
61311
- this.dispatchChangeEvent('auroMenu-selectValueFailure', {
61312
- message: 'No matching options found for the provided value(s).',
61313
- values: validatedValues
61314
- });
61300
+ if (changedProperties.has('disabled')) {
61301
+ if (this.disabled) {
61302
+ this.setAttribute('aria-disabled', 'true');
61303
+ } else {
61304
+ this.removeAttribute('aria-disabled');
61315
61305
  }
61316
-
61317
- return;
61318
61306
  }
61319
61307
 
61320
- this.clearPendingValue();
61308
+ if (changedProperties.has('active')) {
61309
+ this.updateActiveClasses();
61310
+ }
61321
61311
 
61322
- if (this.optionsArraysMatch(optionsToSelect, this.selectedOptions)) {
61323
- return;
61312
+ // Update text highlight if matchWord changed
61313
+ if (changedProperties.has('matchWord')) {
61314
+ this.updateTextHighlight();
61324
61315
  }
61325
61316
 
61326
- // Apply programmatic selection as a single transaction and emit one final state.
61327
- this.selectedOptions = optionsToSelect;
61328
- this.stageUpdate();
61317
+ // Set the key to be the passed value if no key is provided.
61318
+ // Loose equality (== null) is intentional: it catches both null AND
61319
+ // undefined. When a framework (e.g. Svelte, React) inserts the element
61320
+ // before setting its value property, connectedCallback skips key
61321
+ // assignment because both attributes are null at that point. The Lit
61322
+ // property default for `key` is undefined (not null), so strict
61323
+ // === null would miss the case and the fallback would never run.
61324
+ if (changedProperties.has('value') && this.key == null) { // eslint-disable-line eqeqeq, no-eq-null
61325
+ this.key = this.value;
61326
+ }
61329
61327
  }
61330
61328
 
61331
- /**
61332
- * Queues a pending value and schedules a bounded retry.
61333
- * @param {string|number|Array<string|number>} value - The value to retry.
61334
- */
61335
- queuePendingValue(value) {
61336
- this._pendingValue = value;
61337
-
61338
- if (this._pendingRetryScheduled || this._pendingRetryCount >= 5) {
61339
- return;
61329
+ disconnectedCallback() {
61330
+ if (this.menuService) {
61331
+ this.menuService.unsubscribe(this.handleMenuChange);
61332
+ this.menuService.removeMenuOption(this);
61340
61333
  }
61341
-
61342
- this._pendingRetryScheduled = true;
61343
- this._pendingRetryCount += 1;
61344
-
61345
- setTimeout(() => {
61346
- this._pendingRetryScheduled = false;
61347
-
61348
- if (this._pendingValue == null) {
61349
- return;
61350
- }
61351
-
61352
- const pendingValue = this._pendingValue;
61353
- this.selectByValue(pendingValue);
61354
- }, 0);
61355
61334
  }
61356
61335
 
61357
61336
  /**
61358
- * Clears pending retry state.
61337
+ * Sets up event listeners for user interaction with the menu option.
61338
+ * This function enables click and mouse enter events to trigger selection and highlighting logic.
61359
61339
  */
61360
- clearPendingValue() {
61361
- this._pendingValue = null;
61362
- this._pendingRetryScheduled = false;
61363
- this._pendingRetryCount = 0;
61340
+ bindEvents() {
61341
+ this.addEventListener('click', this.handleClick.bind(this));
61342
+ this.addEventListener('mouseenter', this.handleMouseEnter.bind(this));
61364
61343
  }
61365
61344
 
61366
61345
  /**
61367
- * Resets the selected options to an empty array.
61346
+ * Attaches this menu option to a menu service and subscribes to its events.
61347
+ * This method enables the option to participate in menu selection and highlighting logic.
61348
+ * @param {Object} service - The menu service instance to attach to.
61368
61349
  */
61369
- reset() {
61370
- const previousOptions = [...this.selectedOptions];
61371
- previousOptions.forEach(opt => opt.selected = false);
61372
- this.selectedOptions = [];
61373
-
61374
- // Single update after clearing all
61375
- if (previousOptions.length) {
61376
- this.stageUpdate();
61350
+ attachTo(service) {
61351
+ if (!service) {
61352
+ return;
61377
61353
  }
61354
+ this.menuService = service;
61355
+ this.menuService.addMenuOption(this);
61356
+ this.menuService.subscribe(this.handleMenuChange);
61378
61357
  }
61379
61358
 
61380
61359
  /**
61381
- * SUBSCRIPTION, NOTIFICATION AND EVENT DISPATCH METHODS
61360
+ * Handles changes from the menu service and updates the option's state.
61361
+ * This function synchronizes the option's properties and selection/highlight state with menu events.
61362
+ * @param {Object} event - The event object from the menu service.
61382
61363
  */
61364
+ handleMenuChange(event) {
61383
61365
 
61384
- /**
61385
- * Subscribes a callback to menu service events.
61386
- * @param {Function} callback - The callback to invoke on events.
61387
- */
61388
- subscribe(callback) {
61389
- this._subscribers.push(callback);
61366
+ // Ignore events without a type or property
61367
+ if (!event || (!event.type && !event.property)) {
61368
+ return;
61369
+ }
61370
+
61371
+ // Update reactive properties based on event type
61372
+ if (event.property && Object.keys(AuroMenuOption.properties).includes(event.property)) {
61373
+ this[event.property] = event.value;
61374
+ }
61375
+
61376
+ // Handle highlight changes
61377
+ if (event.type === 'highlightChange') {
61378
+ const isActive = event.option === this;
61379
+ this.active = isActive;
61380
+ this.updateActiveClasses();
61381
+ }
61382
+
61383
+ if (event.type === 'stateChange') {
61384
+ const isSelected = event.selectedOptions.includes(this);
61385
+ this.setInternalSelected(isSelected);
61386
+ }
61390
61387
  }
61391
61388
 
61392
61389
  /**
61393
- * Remove a previously subscribed callback from menu service events.
61394
- * @param {Function} callback
61390
+ * Updates the internal selected state of the menu option bypassing 'updated' and triggers custom events if selected.
61391
+ * This function ensures the option's selection state is synchronized with menu logic and notifies listeners.
61392
+ * @param {boolean} isSelected - Whether the option should be marked as selected.
61395
61393
  */
61396
- unsubscribe(callback) {
61397
- this._subscribers = this._subscribers.filter(cb => cb !== callback);
61394
+ setInternalSelected(isSelected) {
61395
+ this.internalUpdateInProgress = true;
61396
+ this.selected = isSelected;
61397
+
61398
+ // Fire custom event if selected
61399
+ if (isSelected) {
61400
+ this.handleCustomEvent();
61401
+ }
61402
+
61403
+ setTimeout(() => {
61404
+ this.internalUpdateInProgress = false;
61405
+ }, 0);
61398
61406
  }
61399
61407
 
61400
61408
  /**
61401
- * Stages an update to notify subscribers of state and value changes.
61409
+ * Sets the selected state of the menu option.
61410
+ * This function updates whether the option is currently selected.
61411
+ * @param {boolean} isSelected - Whether the option should be marked as selected.
61412
+ * @deprecated Simply modify the `selected` property directly instead.
61402
61413
  */
61403
- stageUpdate(meta = {}) {
61404
- this.notifyStateChange(meta);
61405
- this.notifyValueChange(meta);
61414
+ setSelected(isSelected) {
61415
+ this.selected = isSelected;
61406
61416
  }
61407
61417
 
61408
61418
  /**
61409
- * Notifies subscribers of a menu service event.
61410
- * All notifications are sent to all subscribers.
61411
- * @param {string} event - The event to send to subscribers.
61419
+ * Updates the active state and visual highlighting of the menu option.
61420
+ * This function toggles the option's active status and applies or removes the active CSS class.
61421
+ * @param {boolean} isActive - Whether the option should be marked as active.
61422
+ * @deprecated Simply modify the `active` property directly instead.
61412
61423
  */
61413
- notify(event) {
61414
- this._subscribers.forEach(callback => callback(event));
61424
+ updateActive(isActive) {
61425
+
61426
+ // Set active state
61427
+ this.active = isActive;
61428
+ this.updateActiveClasses();
61415
61429
  }
61416
61430
 
61417
61431
  /**
61418
- * Notifies subscribers of a state change (selected options has changed).
61432
+ * Updates the CSS class for the menu option based on its active state.
61433
+ * This function adds or removes the 'active' class to visually indicate the option's active status.
61434
+ * @private
61419
61435
  */
61420
- notifyStateChange(meta = {}) {
61421
- this.notify({
61422
- type: 'stateChange',
61423
- selectedOptions: this.selectedOptions,
61424
- ...meta
61425
- });
61436
+ updateActiveClasses() {
61437
+ // Update class based on active state
61438
+ if (this.active) this.classList.add('active');
61439
+ else this.classList.remove('active');
61426
61440
  }
61427
61441
 
61442
+
61428
61443
  /**
61429
- * Notifies subscribers of a value change (current value has changed).
61444
+ * Updates the visual highlighting of text within the menu option based on the current match word.
61445
+ * This function highlights matching text segments and manages nested spacers for display formatting.
61446
+ * @private
61430
61447
  */
61431
- notifyValueChange(meta = {}) {
61448
+ updateTextHighlight() {
61432
61449
 
61433
- // Prepare details for the event
61434
- const details = {
61435
- value: this.currentValue,
61436
- stringValue: this.stringValue,
61437
- keys: this.currentKeys,
61438
- options: this.selectedOptions,
61439
- label: this.currentLabel
61440
- };
61450
+ // Regex for matchWord if needed
61451
+ let regexWord = null;
61441
61452
 
61442
- // If only one option is selected, include its index
61443
- if (this.selectedOptions.length === 1) details.index = this._menuOptions.indexOf(this.selectedOptions[0]);
61453
+ if (this.matchWord && this.matchWord.length) {
61454
+ const escapedWord = this.matchWord.replace(/[.*+?^${}()|[\]\\]/gu, '\\$&');
61455
+ regexWord = new RegExp(escapedWord, 'giu');
61456
+ }
61444
61457
 
61445
- this.notify({
61446
- type: 'valueChange',
61447
- ...meta,
61448
- ...details
61449
- });
61450
- }
61458
+ // Update text highlighting if matchWord changed
61459
+ if (regexWord &&
61460
+ this.isActive && !this.hasAttribute('persistent')) {
61461
+ const nested = this.querySelectorAll('.nestingSpacer');
61451
61462
 
61452
- /**
61453
- * Dispatches a custom event from the host element.
61454
- * @param {string} eventName
61455
- * @param {any} detail
61456
- */
61457
- dispatchChangeEvent(eventName, detail) {
61458
- this.host.dispatchEvent(new CustomEvent(eventName, {
61459
- bubbles: true,
61460
- cancelable: false,
61461
- composed: true,
61462
- detail
61463
- }));
61463
+ const displayValueEl = this.querySelector('[slot="displayValue"]');
61464
+ if (displayValueEl) {
61465
+ this.removeChild(displayValueEl);
61466
+ }
61467
+
61468
+ // Create nested spacers
61469
+ const nestingSpacerBundle = [...nested].map(() => this.nestingSpacer).join('');
61470
+
61471
+ // Update with spacers and matchWord
61472
+ this.innerHTML = nestingSpacerBundle +
61473
+ this.textContent.replace(
61474
+ regexWord,
61475
+ (match) => `<strong>${match}</strong>`
61476
+ );
61477
+ if (displayValueEl) {
61478
+ this.append(displayValueEl);
61479
+ }
61480
+ }
61464
61481
  }
61465
61482
 
61466
61483
  /**
61467
- * MENU OPTION MANAGEMENT METHODS
61484
+ * Handles click events on the menu option, toggling its selected state.
61485
+ * This function dispatches a click event and updates selection if the option is not disabled.
61486
+ * @private
61468
61487
  */
61488
+ handleClick() {
61489
+ if (!this.disabled) {
61490
+ this.dispatchClickEvent();
61491
+ this.selected = !this.selected;
61492
+ }
61493
+ }
61469
61494
 
61470
61495
  /**
61471
- * Adds a menu option to the service's list.
61472
- * @param {AuroMenuOption} option - the option to track
61496
+ * Handles mouse enter events to highlight the menu option.
61497
+ * This function updates the menu service to set this option as the currently highlighted item if not disabled.
61498
+ * @private
61473
61499
  */
61474
- addMenuOption(option) {
61475
- this._menuOptions.push(option);
61476
- this.notify({ type: 'optionsChange', options: this._menuOptions });
61477
-
61478
- if (this._pendingValue != null) {
61479
- this.queuePendingValue(this._pendingValue);
61500
+ handleMouseEnter() {
61501
+ if (!this.disabled) {
61502
+ this.menuService.setHighlightedOption(this);
61480
61503
  }
61481
61504
  }
61482
61505
 
61483
61506
  /**
61484
- * Removes a menu option from the service's list.
61485
- * @param {AuroMenuOption} option - the option to remove
61507
+ * Dispatches custom events defined for this menu option.
61508
+ * This function notifies listeners when a custom event is triggered by the option.
61509
+ * @private
61486
61510
  */
61487
- removeMenuOption(option) {
61488
- this._menuOptions = this._menuOptions.filter(opt => opt !== option);
61489
- this.notify({ type: 'optionsChange', options: this._menuOptions });
61490
-
61491
- if (this._menuOptions.length === 0) {
61492
- this.clearPendingValue();
61511
+ handleCustomEvent() {
61512
+ if (this.event) {
61513
+ dispatchMenuEvent(this, this.event, { option: this });
61514
+ dispatchMenuEvent(this, 'auroMenu-customEventFired', { option: this });
61493
61515
  }
61494
61516
  }
61495
61517
 
61496
61518
  /**
61497
- * UTILITIES
61519
+ * Dispatches a click event for this menu option.
61520
+ * This function notifies listeners that the option has been clicked.
61521
+ * @private
61498
61522
  */
61523
+ dispatchClickEvent() {
61524
+ this.dispatchEvent(new CustomEvent('auroMenuOption-click', {
61525
+ bubbles: true,
61526
+ cancelable: false,
61527
+ composed: true,
61528
+ detail: this
61529
+ }));
61530
+ }
61499
61531
 
61500
61532
  /**
61501
- * Normalizes a value or array of values into an array of strings for option selection.
61502
- * This function ensures that input values are consistently formatted for matching menu options.
61533
+ * Generates an HTML element containing an SVG icon based on the provided `svgContent`.
61503
61534
  *
61504
- * @param {string|number|Array<string|number>} value - The value(s) to normalize.
61505
- * @returns {Array<string>} An array of string values suitable for option matching.
61506
- * @throws {Error} If any value is not a string or number.
61535
+ * @private
61536
+ * @param {string} svgContent - The SVG content to be embedded.
61537
+ * @returns {Element} The HTML element containing the SVG icon.
61507
61538
  */
61508
- _getNormalizedValues(value) {
61509
- let values = value;
61510
-
61511
- // Handle JSON string and single value string input
61512
- if (!Array.isArray(values) && typeof values === 'string') {
61513
-
61514
- // Attempt to parse as JSON array
61515
- try {
61516
-
61517
- // Normalize single quotes to double quotes for JSON parsing
61518
- // This will not handle complex cases but will cover basic usage
61519
- const parseValue = values.replace(/'([^']*?)'/g, '"$1"');
61520
-
61521
- // Attempt parse
61522
- const parsed = JSON.parse(parseValue);
61523
-
61524
- // Ensure parsed value is an array
61525
- if (!Array.isArray(parsed)) throw new Error('Not an array');
61526
-
61527
- // Set values to parsed array
61528
- values = parsed;
61529
- } catch (err) {
61530
-
61531
- // If parsing fails, treat as single value
61532
- values = [value];
61533
- }
61534
- }
61535
-
61536
- // Handle a single number being passed
61537
- if (typeof values === 'number') {
61538
- values = [String(values)];
61539
- }
61540
-
61541
- // Coerce each value to string and validate types
61542
- values.forEach((val, index) => {
61543
-
61544
- // Throw an error for invalid value types
61545
- if (typeof val !== 'string' && typeof val !== 'number') {
61546
- throw new Error('Value contains invalid value type. Supported types are string and number.');
61547
- }
61539
+ generateIconHtml(svgContent) {
61540
+ const dom = new DOMParser().parseFromString(svgContent, 'text/html');
61541
+ const svg = dom.body.firstChild;
61548
61542
 
61549
- // Convert numbers to strings for consistency
61550
- if (typeof val === 'number') {
61551
- values[index] = String(val);
61552
- }
61553
- });
61543
+ svg.setAttribute('slot', 'svg');
61554
61544
 
61555
- // Return the resulting array of string values
61556
- return values;
61545
+ return u$c`<${this.iconTag} customColor customSvg>${svg}</${this.iconTag}>`;
61557
61546
  }
61558
61547
 
61559
61548
  /**
61560
- * Returns whether two arrays of options contain the same elements.
61561
- * @param {AuroMenuOption[]} arr1 - First array of options.
61562
- * @param {AuroMenuOption[]} arr2 - Second array of options.
61563
- * @returns {boolean} True if arrays match, false otherwise.
61549
+ * Logic to determine the layout of the component.
61550
+ * @protected
61551
+ * @returns {void}
61564
61552
  */
61565
- optionsArraysMatch(arr1, arr2) {
61566
- if (arr1.length !== arr2.length) return false;
61553
+ renderLayout() {
61567
61554
 
61568
- const set1 = new Set(arr1);
61569
- const set2 = new Set(arr2);
61555
+ const fontClassMap = {
61556
+ xs: 'body-sm',
61557
+ sm: 'body-default',
61558
+ md: 'body-default',
61559
+ lg: 'body-lg',
61560
+ xl: 'body-lg'
61561
+ };
61570
61562
 
61571
- for (let item of set1) {
61572
- if (!set2.has(item)) {
61573
- return false;
61574
- }
61575
- }
61563
+ const classes = e$3({
61564
+ 'wrapper': true,
61565
+ [this.size ? fontClassMap[this.size] : 'body-sm']: true,
61566
+ });
61576
61567
 
61577
- return true;
61568
+ return u$c`
61569
+ <div class="${classes}">
61570
+ ${this.selected && !this.noCheckmark
61571
+ ? this.generateIconHtml(checkmarkIcon.svg)
61572
+ : undefined}
61573
+ <slot></slot>
61574
+ </div>
61575
+ `;
61578
61576
  }
61579
61577
  }
61580
61578
 
61581
- const MenuContext = n$1('menu-context');
61582
-
61583
- // Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
61584
- // See LICENSE in the project root for license information.
61585
-
61586
- // ---------------------------------------------------------------------
61587
-
61588
- /* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
61579
+ /* eslint-disable */
61589
61580
 
61590
- let AuroLibraryRuntimeUtils$4 = class AuroLibraryRuntimeUtils {
61581
+ class MenuService {
61591
61582
 
61592
- /* eslint-disable jsdoc/require-param */
61583
+ /**
61584
+ * PROPERTIES AND GETTERS
61585
+ */
61593
61586
 
61594
61587
  /**
61595
- * This will register a new custom element with the browser.
61596
- * @param {String} name - The name of the custom element.
61597
- * @param {Object} componentClass - The class to register as a custom element.
61598
- * @returns {void}
61588
+ * Gets the list of registered menu options.
61589
+ * @returns {AuroMenuOption[]}
61599
61590
  */
61600
- registerComponent(name, componentClass) {
61601
- if (!customElements.get(name)) {
61602
- customElements.define(name, class extends componentClass {});
61603
- }
61591
+ get menuOptions() {
61592
+ return this._menuOptions;
61604
61593
  }
61605
61594
 
61606
61595
  /**
61607
- * Finds and returns the closest HTML Element based on a selector.
61608
- * @returns {void}
61596
+ * Gets the currently highlighted option.
61597
+ * @returns {AuroMenuOption|null}
61609
61598
  */
61610
- closestElement(
61611
- selector, // selector like in .closest()
61612
- base = this, // extra functionality to skip a parent
61613
- __Closest = (el, found = el && el.closest(selector)) =>
61614
- !el || el === document || el === window
61615
- ? null // standard .closest() returns null for non-found selectors also
61616
- : found
61617
- ? found // found a selector INside this element
61618
- : __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
61619
- ) {
61620
- return __Closest(base);
61599
+ get highlightedOption() {
61600
+ return this._menuOptions[this.highlightedIndex] || null;
61621
61601
  }
61622
- /* eslint-enable jsdoc/require-param */
61623
61602
 
61624
61603
  /**
61625
- * 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.
61626
- * @param {Object} elem - The element to check.
61627
- * @param {String} tagName - The name of the Auro component to check for or add as an attribute.
61628
- * @returns {void}
61604
+ * Gets the current value(s) of the selected option(s).
61605
+ * @returns {string|string[]|undefined}
61629
61606
  */
61630
- handleComponentTagRename(elem, tagName) {
61631
- const tag = tagName.toLowerCase();
61632
- const elemTag = elem.tagName.toLowerCase();
61633
-
61634
- if (elemTag !== tag) {
61635
- elem.setAttribute(tag, true);
61636
- }
61607
+ get currentValue() {
61608
+ const values = (this.selectedOptions || []).map(option => option.value);
61609
+ return this.multiSelect ? values : values[0];
61637
61610
  }
61638
61611
 
61639
61612
  /**
61640
- * Validates if an element is a specific Auro component.
61641
- * @param {Object} elem - The element to validate.
61642
- * @param {String} tagName - The name of the Auro component to check against.
61643
- * @returns {Boolean} - Returns true if the element is the specified Auro component.
61613
+ * Gets the label(s) of the currently selected option(s).
61614
+ * @returns {string}
61644
61615
  */
61645
- elementMatch(elem, tagName) {
61646
- const tag = tagName.toLowerCase();
61647
- const elemTag = elem.tagName.toLowerCase();
61648
-
61649
- return elemTag === tag || elem.hasAttribute(tag);
61616
+ get currentLabel() {
61617
+ const labels = (this.selectedOptions || []).map(option => option.textContent);
61618
+ return this.multiSelect ? labels.join(", ") : labels[0] || '';
61650
61619
  }
61651
61620
 
61652
61621
  /**
61653
- * Gets the text content of a named slot.
61654
- * @returns {String}
61655
- * @private
61622
+ * Gets the string representation of the current value(s).
61623
+ * For multi-select, this is a JSON stringified array.
61624
+ * @returns {string|undefined}
61656
61625
  */
61657
- getSlotText(elem, name) {
61658
- const slot = elem.shadowRoot?.querySelector(`slot[name="${name}"]`);
61659
- const nodes = slot?.assignedNodes({ flatten: true }) || [];
61660
- const text = nodes.map(n => n.textContent?.trim()).join(' ').trim();
61626
+ get stringValue() {
61627
+ const { currentValue } = this;
61661
61628
 
61662
- return text || null;
61663
- }
61664
- };
61629
+ if (Array.isArray(currentValue)) {
61630
+ if (currentValue.length > 0) {
61631
+ return JSON.stringify(currentValue);
61632
+ }
61633
+ return undefined;
61634
+ }
61665
61635
 
61666
- /**
61667
- * Helper method to dispatch custom events.
61668
- * @param {HTMLElement} element - Element to dispatch event from.
61669
- * @param {string} eventName - Name of the event to dispatch.
61670
- * @param {Object} [detail] - Optional detail object to include with the event.
61671
- */
61672
- function dispatchMenuEvent(element, eventName, detail = null) {
61673
- const eventConfig = {
61674
- bubbles: true,
61675
- cancelable: false,
61676
- composed: true
61677
- };
61636
+ if (typeof currentValue === 'string') {
61637
+ if (currentValue.length > 0) {
61638
+ return currentValue;
61639
+ }
61640
+ return undefined;
61641
+ }
61678
61642
 
61679
- if (detail !== null) {
61680
- eventConfig.detail = detail;
61643
+ // Future: handle other types here (e.g., number, object, etc.)
61644
+ return undefined;
61681
61645
  }
61682
61646
 
61683
- element.dispatchEvent(new CustomEvent(eventName, eventConfig));
61684
- }
61685
-
61686
- /* eslint-disable no-underscore-dangle */
61687
- // Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
61688
- // See LICENSE in the project root for license information.
61689
-
61690
-
61691
-
61692
- /**
61693
- * The `auro-menu` element provides users a way to select from a list of options.
61694
- * @customElement auro-menu
61695
- *
61696
- * @event {CustomEvent<Element>} auroMenu-activatedOption - Notifies that a menuoption has been made `active`.
61697
- * @event {CustomEvent<any>} auroMenu-customEventFired - Notifies that a custom event has been fired.
61698
- * @event {CustomEvent<{ loading: boolean; hasLoadingPlaceholder: boolean; }>} auroMenu-loadingChange - Notifies when the loading attribute is changed.
61699
- * @event {CustomEvent<any>} auroMenu-selectValueFailure - Notifies that an attempt to select a menuoption by matching a value has failed.
61700
- * @event {CustomEvent<{ values: HTMLElement[] }>} auroMenu-deselectPrevented - Notifies that deselection was prevented and includes the affected options in `detail.values`.
61701
- * @event {CustomEvent<any>} auroMenu-selectValueReset - Notifies that the component value has been reset.
61702
- * @event {CustomEvent<any>} auroMenu-selectedOption - Notifies that a new menuoption selection has been made.
61703
- * @slot loadingText - Text to show while loading attribute is set
61704
- * @slot loadingIcon - Icon to show while loading attribute is set
61705
- * @slot - Slot for insertion of menu options.
61706
- */
61707
-
61708
- /* eslint-disable max-lines */
61709
-
61710
- class AuroMenu extends AuroElement$2 {
61647
+ /**
61648
+ * Gets the key(s) of the currently selected option(s).
61649
+ * @returns {string|string[]|undefined}
61650
+ */
61651
+ get currentKeys() {
61652
+ const keys = (this.selectedOptions || []).map(option => option.key);
61653
+ return this.multiSelect ? keys : keys[0];
61654
+ }
61711
61655
 
61712
- constructor() {
61713
- super();
61656
+ /**
61657
+ * CONSTRUCTOR
61658
+ */
61714
61659
 
61715
- // State properties (reactive)
61660
+ /**
61661
+ * Creates a new MenuService instance.
61662
+ * @param {Object} options - The options object.
61663
+ * @param {AuroMenu} options.host - The host element that this service will control. Required.
61664
+ * @throws {Error} If the host is not provided.
61665
+ */
61666
+ constructor({ host } = {}) {
61716
61667
 
61717
- /**
61718
- * @private
61719
- */
61720
- this.shape = "box";
61668
+ // Ensure a host was passed
61669
+ if (!host) {
61670
+ throw new Error("MenuService requires a host element.");
61671
+ }
61721
61672
 
61722
- /**
61723
- * @private
61724
- */
61725
- this.size = "sm";
61673
+ // Attach the service to the host
61674
+ this.host = host;
61675
+ this.host.addController(this);
61726
61676
 
61727
- // Value of the selected options
61728
- this.value = undefined;
61729
- // Currently selected option
61730
- this.optionSelected = undefined;
61731
- // String used for highlighting/filtering
61677
+ // Set default properties
61678
+ this.size = undefined;
61679
+ this.shape = undefined;
61680
+ this.noCheckmark = undefined;
61681
+ this.disabled = undefined;
61732
61682
  this.matchWord = undefined;
61733
- // Hide the checkmark icon on selected options
61734
- this.noCheckmark = false;
61735
- // Currently active option
61736
- this.optionActive = undefined;
61737
- // Loading state
61738
- this.loading = false;
61739
- // Multi-select mode
61740
- this.multiSelect = false;
61741
- // Allow deselecting of menu options
61742
- this.allowDeselect = false;
61743
- // Select all matching options when setting value in multi-select mode
61744
- this.selectAllMatchingOptions = false;
61745
-
61746
- // Event Bindings
61747
-
61748
- /**
61749
- * @private
61750
- */
61751
- this.handleSlotChange = this.handleSlotChange.bind(this);
61683
+ this.multiSelect = undefined;
61684
+ this.allowDeselect = undefined;
61685
+ this.selectAllMatchingOptions = undefined;
61752
61686
 
61753
- // Instance properties (non-reactive)
61687
+ this.highlightedIndex = -1;
61754
61688
 
61755
- /**
61756
- * @private
61757
- */
61758
- Object.assign(this, {
61759
- // Root-level menu (true) or a nested submenu (false)
61760
- rootMenu: true,
61761
- // Currently focused/active menu item index
61762
- _index: -1,
61763
- // Nested menu spacer
61764
- nestingSpacer: '<span class="nestingSpacer"></span>',
61765
- // Loading indicator for slot elements
61766
- loadingSlots: null,
61767
- });
61689
+ this._menuOptions = [];
61690
+ this._subscribers = [];
61691
+ this.internalUpdateInProgress = false;
61692
+ this.selectedOptions = [];
61693
+ this._pendingValue = null;
61694
+ this._pendingRetryScheduled = false;
61695
+ this._pendingRetryCount = 0;
61768
61696
  }
61769
61697
 
61770
- static get properties() {
61771
- return {
61772
- ...super.properties,
61773
-
61774
- /**
61775
- * Allows deselecting an already selected option when clicked again in single-select mode.
61776
- */
61777
- allowDeselect: {
61778
- type: Boolean,
61779
- reflect: true,
61780
- },
61781
-
61782
- /**
61783
- * When true, the entire menu and all options are disabled.
61784
- */
61785
- disabled: {
61786
- type: Boolean,
61787
- reflect: true
61788
- },
61789
-
61790
- /**
61791
- * Indicates whether the menu has a loadingIcon or loadingText to render when in a loading state.
61792
- */
61793
- hasLoadingPlaceholder: {
61794
- type: Boolean
61795
- },
61796
-
61797
- /**
61798
- * @private
61799
- */
61800
- layout: {
61801
- type: String
61802
- },
61803
-
61804
- /**
61805
- * Indent level for submenus.
61806
- * @private
61807
- */
61808
- level: {
61809
- type: Number,
61810
- reflect: false,
61811
- attribute: false
61812
- },
61813
-
61814
- /**
61815
- * When true, displays a loading state using the loadingIcon and loadingText slots if provided.
61816
- */
61817
- loading: {
61818
- type: Boolean,
61819
- reflect: true
61820
- },
61821
-
61822
- /**
61823
- * Specifies a string used to highlight matched string parts in options.
61824
- */
61825
- matchWord: {
61826
- type: String,
61827
- attribute: 'matchword'
61828
- },
61829
-
61830
- /**
61831
- * When true, the selected option can be multiple options.
61832
- */
61833
- multiSelect: {
61834
- type: Boolean,
61835
- reflect: true,
61836
- attribute: 'multiselect'
61837
- },
61698
+ /**
61699
+ * PROPERTY SYNCING
61700
+ */
61838
61701
 
61839
- /**
61840
- * When true, selected option will not show the checkmark.
61841
- */
61842
- noCheckmark: {
61843
- type: Boolean,
61844
- reflect: true,
61845
- attribute: 'nocheckmark'
61846
- },
61702
+ /**
61703
+ * Handles host updates.
61704
+ * This is a lit reactive lifecycle method.
61705
+ * This comes from the Lit controller interface provided by adding this service as a controller to the host.
61706
+ * See constructor for `this.host.addController(this)`
61707
+ * You can read more about Lit reactive controllers here: https://lit.dev/docs/composition/controllers/
61708
+ */
61709
+ hostUpdated() {
61847
61710
 
61848
- /**
61849
- * Specifies the current active menuOption.
61850
- */
61851
- optionActive: {
61852
- type: Object,
61853
- attribute: 'optionactive'
61854
- },
61711
+ // Reset selection if multiSelect mode changes
61712
+ if (this.host.multiSelect !== this.multiSelect) {
61713
+ this.selectedOptions = [];
61714
+ }
61855
61715
 
61856
- /**
61857
- * An array of currently selected menu options, type `HTMLElement` by default. In multi-select mode, `optionSelected` is an array of HTML elements.
61858
- */
61859
- optionSelected: {
61860
- // Allow HTMLElement, HTMLElement[] arrays and undefined
61861
- type: Object
61862
- },
61716
+ // Update properties on host update
61717
+ this.setProperties({
61718
+ size: this.host.size,
61719
+ shape: this.host.shape,
61720
+ noCheckmark: this.host.noCheckmark,
61721
+ disabled: this.host.disabled,
61722
+ matchWord: this.host.matchWord,
61723
+ multiSelect: this.host.multiSelect,
61724
+ allowDeselect: this.host.allowDeselect,
61725
+ selectAllMatchingOptions: this.host.selectAllMatchingOptions
61726
+ });
61727
+ }
61863
61728
 
61864
- /**
61865
- * Available menu options.
61866
- * @readonly
61867
- */
61868
- options: {
61869
- type: Array,
61870
- reflect: false,
61871
- attribute: false
61872
- },
61729
+ /**
61730
+ * Handles host disconnection and memory cleanup.
61731
+ */
61732
+ hostDisconnected() {
61733
+ this._subscribers = [];
61734
+ this._menuOptions = [];
61735
+ this._pendingValue = null;
61736
+ this._pendingRetryScheduled = false;
61737
+ this._pendingRetryCount = 0;
61738
+ }
61873
61739
 
61874
- /**
61875
- * Sets the size of the menu.
61876
- * @type {'sm' | 'md'}
61877
- * @default 'sm'
61878
- */
61879
- size: {
61880
- type: String,
61881
- reflect: true
61882
- },
61740
+ /**
61741
+ * Sets a property value if it exists on the instance and the value has changed.
61742
+ * @param {string} property
61743
+ * @param {any} value
61744
+ */
61745
+ setProperty(property, value) {
61883
61746
 
61884
- /**
61885
- * When true, selects all options that match the provided value/key when setting value and multiselect is enabled.
61886
- */
61887
- selectAllMatchingOptions: {
61888
- type: Boolean,
61889
- reflect: true,
61890
- },
61747
+ // Only update if we are tracking the property in this service
61748
+ if (this.hasOwnProperty(property)) {
61891
61749
 
61892
- /**
61893
- * Sets the shape of the menu.
61894
- * @type {'box' | 'round'}
61895
- * @default 'box'
61896
- */
61897
- shape: {
61898
- type: String,
61899
- reflect: true
61900
- },
61750
+ // Check if the value has changed
61751
+ const valueChanged = this[property] !== value;
61901
61752
 
61902
- /**
61903
- * The value of the selected option. In multi-select mode, this is a JSON stringified array of selected option values.
61904
- */
61905
- value: {
61906
- type: String,
61907
- reflect: true,
61908
- attribute: 'value'
61753
+ // Update and notify if changed
61754
+ if (valueChanged) {
61755
+ this[property] = value;
61756
+ this.notify({ property, value });
61909
61757
  }
61910
- };
61911
- }
61912
-
61913
- static get styles() {
61914
- return [
61915
- styleCss$1$2,
61916
- colorCss$1$2,
61917
- tokensCss$4
61918
- ];
61758
+ }
61919
61759
  }
61920
61760
 
61921
61761
  /**
61922
- * @readonly
61923
- * @returns {string} - Returns the label of the currently selected option(s).
61762
+ * Sets multiple properties on the instance.
61763
+ * @param {Object} properties - Key-value pairs of properties to set.
61924
61764
  */
61925
- get currentLabel() {
61926
- return this.menuService.currentLabel;
61927
- };
61765
+ setProperties(properties) {
61766
+ for (const [key, value] of Object.entries(properties)) {
61767
+ this.setProperty(key, value);
61768
+ }
61769
+ }
61928
61770
 
61929
61771
  /**
61930
- * @readonly
61931
- * @returns {Array<HTMLElement>} - Returns the array of available menu options.
61932
- * @deprecated Use `options` property instead.
61772
+ * MENU OPTION HIGHLIGHTING
61933
61773
  */
61934
- get items() {
61935
- return this.options;
61936
- }
61937
61774
 
61938
61775
  /**
61939
- * @returns {number} - Returns the index of the currently active option.
61776
+ * Highlights the next active option in the menu.
61940
61777
  */
61941
- get index() {
61942
- return this._index;
61778
+ highlightNext() {
61779
+ this.moveHighlightedOption("next");
61943
61780
  }
61944
61781
 
61945
61782
  /**
61946
- * @param {number} value - Sets the index of the currently active option.
61783
+ * Highlights the previous active option in the menu.
61947
61784
  */
61948
- set index(value) {
61949
- this.menuService.setHighlightedIndex(value);
61785
+ highlightPrevious() {
61786
+ this.moveHighlightedOption("previous");
61950
61787
  }
61951
61788
 
61952
61789
  /**
61953
- * This will register this element with the browser.
61954
- * @param {string} [name="auro-menu"] - The name of the element that you want to register.
61955
- *
61956
- * @example
61957
- * AuroMenu.register("custom-menu") // this will register this element to <custom-menu/>
61958
- *
61790
+ * Moves the highlighted option in the specified direction.
61791
+ * @param {string} direction - The direction to move the highlight ("next" or "previous").
61959
61792
  */
61960
- static register(name = "auro-menu") {
61961
- AuroLibraryRuntimeUtils$4.prototype.registerComponent(name, AuroMenu);
61793
+ moveHighlightedOption(direction) {
61794
+
61795
+ // Get the active options
61796
+ const activeOptions = this._menuOptions.filter(option => option.isActive);
61797
+
61798
+ // Get the currently active option
61799
+ const currentActiveOption = activeOptions[activeOptions.indexOf(this.highlightedOption)];
61800
+
61801
+ // Determine the new index based on the currently active option and direction
61802
+ let newIndex = currentActiveOption
61803
+ ? direction === "previous"
61804
+ ? activeOptions.indexOf(currentActiveOption) - 1
61805
+ : activeOptions.indexOf(currentActiveOption) + 1
61806
+ : direction === "previous"
61807
+ ? activeOptions.length - 1
61808
+ : 0;
61809
+
61810
+ // Wrap around the index if needed
61811
+ newIndex = newIndex < 0 ? activeOptions.length - 1 : newIndex >= activeOptions.length ? 0 : newIndex;
61812
+
61813
+ // Get the new active option and set it as highlighted
61814
+ const newActiveOption = activeOptions[newIndex];
61815
+ this.setHighlightedOption(newActiveOption);
61962
61816
  }
61963
61817
 
61964
61818
  /**
61965
- * Formatted value based on `multiSelect` state.
61966
- * Default type is `String`, changing to `Array<String>` when `multiSelect` is true.
61967
- * @private
61968
- * @returns {String|Array<String>}
61819
+ * Sets the highlighted index to the specified option.
61820
+ * @param {AuroMenuOption} option - The option to highlight.
61969
61821
  */
61970
- get formattedValue() {
61971
- return this.menuService.currentValue;
61822
+ setHighlightedOption(option) {
61823
+
61824
+ if (!option) return;
61825
+
61826
+ // Get the index of the option to highlight
61827
+ const index = this._menuOptions.indexOf(option);
61828
+
61829
+ // Update highlighted index
61830
+ this.highlightedIndex = index;
61831
+
61832
+ // Notify subscribers of highlight change
61833
+ this.notify({ type: 'highlightChange', option, index: this.highlightedIndex });
61834
+
61835
+ // Dispatch the change event
61836
+ this.dispatchChangeEvent('auroMenu-activatedOption', option);
61972
61837
  }
61973
61838
 
61974
61839
  /**
61975
- * Gets the current property values for the menu service.
61976
- * @private
61977
- * @returns {Object}
61840
+ * Sets the highlighted option to the option at the specified index if it exists.
61841
+ * @param {number} index
61978
61842
  */
61979
- get propertyValues() {
61980
- return {
61981
- size: this.size,
61982
- shape: this.shape,
61983
- noCheckmark: this.nocheckmark,
61984
- disabled: this.disabled
61985
- };
61843
+ setHighlightedIndex(index) {
61844
+ const option = this._menuOptions[index] || null;
61845
+ this.setHighlightedOption(option);
61986
61846
  }
61987
61847
 
61988
61848
  /**
61989
- * Provides the menu context to child components.
61990
- * Initializes the MenuService and subscribes to menu changes.
61991
- * @protected
61849
+ * Selects the currently highlighted option.
61992
61850
  */
61993
- provideContext() {
61994
- if (this.parentElement && this.parentElement.closest('auro-menu, [auro-menu]')) {
61995
- this.rootMenu = false;
61996
- this.menuService = this.parentElement.menuService;
61997
- this._contextProvider = this.parentElement._contextProvider;
61998
- return;
61851
+ selectHighlightedOption() {
61852
+ if (this.highlightedOption) {
61853
+ this.toggleOption(this.highlightedOption);
61999
61854
  }
62000
-
62001
- this.menuService = new MenuService({host: this});
62002
- this.menuService.setProperties(this.propertyValues);
62003
- this.menuService.subscribe(this.handleMenuChange.bind(this));
62004
- this._contextProvider = new i(this, {
62005
- context: MenuContext,
62006
- initialValue: this.menuService
62007
- });
62008
61855
  }
62009
61856
 
62010
61857
  /**
62011
- * Updates the currently active option in the menu.
62012
- * @param {HTMLElement} option - The option to set as active.
61858
+ * SELECTION AND DESELECTION METHODS
62013
61859
  */
62014
- updateActiveOption(option) {
62015
- this.menuService.setHighlightedOption(option);
62016
- }
62017
61860
 
62018
61861
  /**
62019
- * Sets the internal value and manages update state.
62020
- * @param {String|Array<String>} value - The value to set.
62021
- * @protected
61862
+ * Selects one or more options in a batch operation
61863
+ * @param {AuroMenuOption|AuroMenuOption[]} options - Single option or array of options to select
62022
61864
  */
62023
- setInternalValue(value) {
62024
- if (this.value !== value) {
62025
- this.internalUpdateInProgress = true;
62026
- this.value = value;
61865
+ selectOptions(options) {
61866
+ let optionsToSelect = Array.isArray(options) ? options : [options];
62027
61867
 
62028
- setTimeout(() => {
62029
- this.internalUpdateInProgress = false;
62030
- });
61868
+ // Filter out options that are inactive
61869
+ optionsToSelect = optionsToSelect.filter(option => option.isActive);
61870
+
61871
+ if (!optionsToSelect.length) return;
61872
+
61873
+ if (this.multiSelect) {
61874
+ this.selectedOptions = [...(this.selectedOptions || []), ...optionsToSelect];
61875
+ } else {
61876
+ // In single select mode, only take the last option
61877
+ this.selectedOptions = [optionsToSelect[optionsToSelect.length - 1]];
62031
61878
  }
61879
+
61880
+ this.stageUpdate();
62032
61881
  }
62033
61882
 
62034
61883
  /**
62035
- * Handles changes from the menu service and updates component state.
62036
- * @param {Object} event - The event object from the menu service.
62037
- * @protected
61884
+ * Deselects one or more options in a batch operation
61885
+ * @param {AuroMenuOption|AuroMenuOption[]} options - Single option or array of options to deselect
62038
61886
  */
62039
- handleMenuChange(event) {
62040
- if (event.type === 'valueChange') {
61887
+ deselectOptions(options) {
61888
+ const optionsToDeselect = Array.isArray(options) ? options : [options];
62041
61889
 
62042
- // New option is array value or first option with fallback to undefined for empty array in all cases
62043
- const newOption = this.multiSelect && event.options.length ? event.options : event.options[0] || undefined;
62044
- const newValue = event.stringValue;
61890
+ if (!optionsToDeselect.length) return;
62045
61891
 
62046
- // Check if the option or value has actually changed
62047
- if (this.optionSelected !== newOption || this.stringValue !== newValue) {
62048
- this.optionSelected = newOption;
62049
- this.setInternalValue(newValue);
62050
- }
61892
+ // Check if deselection should be prevented
61893
+ const shouldPreventDeselect = !this.allowDeselect && !this.multiSelect;
61894
+ const isOnlySelectedOption = this.selectedOptions.length === 1 && optionsToDeselect.includes(this.selectedOptions[0]);
62051
61895
 
62052
- // Notify components of selection change
62053
- this.notifySelectionChange(event);
61896
+ // Prevent deselecting the only selected option if not allowed
61897
+ if (shouldPreventDeselect && isOnlySelectedOption) {
61898
+ optionsToDeselect.forEach(option => {
61899
+ option.selected = true;
61900
+ });
61901
+ this.dispatchChangeEvent('auroMenu-deselectPrevented', {
61902
+ values: optionsToDeselect
61903
+ });
61904
+ return;
62054
61905
  }
62055
61906
 
62056
- if (event.type === 'highlightChange') {
62057
- this.optionActive = event.option;
62058
- this._index = event.index;
62059
- }
61907
+ const optionsSet = new Set(optionsToDeselect);
61908
+ this.selectedOptions = (this.selectedOptions || [])
61909
+ .filter(opt => !optionsSet.has(opt));
62060
61910
 
62061
- if (event.type === 'optionsChange') {
62062
- this.options = event.options;
62063
- this.dispatchEvent(new CustomEvent('auroMenu-optionsChange', {
62064
- detail: {
62065
- options: event.options
62066
- }
62067
- }));
62068
- }
61911
+ this.stageUpdate();
62069
61912
  }
62070
61913
 
62071
61914
  /**
62072
- * Gets the currently selected options.
62073
- * @returns {Array<HTMLElement>}
61915
+ * Selects a single option.
61916
+ * @param {AuroMenuOption} option
62074
61917
  */
62075
- get selectedOptions() {
62076
- return this.menuService ? this.menuService.selectedOptions : [];
61918
+ selectOption(option) {
61919
+ this.selectOptions(option);
62077
61920
  }
62078
61921
 
62079
61922
  /**
62080
- * Gets the first selected option, or null if none.
62081
- * @returns {HTMLElement|null}
61923
+ * Deselects a single option.
61924
+ * @param {AuroMenuOption} option
62082
61925
  */
62083
- get selectedOption() {
62084
- return this.menuService ? this.menuService.selectedOptions[0] : null;
61926
+ deselectOption(option) {
61927
+ this.deselectOptions(option);
62085
61928
  }
62086
61929
 
62087
- // Lifecycle Methods
61930
+ /**
61931
+ * Toggles the selection state of a single option.
61932
+ * @param {AuroMenuOption} option
61933
+ */
61934
+ toggleOption(option) {
61935
+ if (option.selected) {
61936
+ this.deselectOption(option);
61937
+ } else {
61938
+ this.selectOption(option);
61939
+ }
61940
+ }
62088
61941
 
62089
- connectedCallback() {
62090
- super.connectedCallback();
61942
+ /**
61943
+ * Selects options based on their value(s) when compared to a passed value or values.
61944
+ * Value or values are normalized to an array of strings that can be matched to option keys.
61945
+ * @param {string|number|Array<string|number>} value - The value(s) to select.
61946
+ */
61947
+ selectByValue(value) {
61948
+ const isEmptyValue = value === undefined ||
61949
+ value === null ||
61950
+ (Array.isArray(value) && value.length === 0) ||
61951
+ (typeof value === 'string' && value.trim() === '');
62091
61952
 
62092
- this.provideContext();
61953
+ // Early exit for invalid/empty values
61954
+ if (isEmptyValue) {
61955
+ this.selectedOptions.forEach(opt => opt.selected = false);
61956
+ this.selectedOptions = [];
61957
+ return;
61958
+ }
62093
61959
 
62094
- // this.addEventListener('keydown', this.handleKeyDown);
62095
- this.addEventListener('auroMenuOption-click', this.handleMouseSelect);
62096
- this.addEventListener('auroMenuOption-mouseover', this.handleOptionHover);
62097
- this.addEventListener('slotchange', this.handleSlotChange);
62098
- this.setTagAttribute("auro-menu");
62099
- }
61960
+ // If an internal update cycle is still in progress, defer value application
61961
+ // rather than dropping it.
61962
+ if (this.internalUpdateInProgress || this.host.internalUpdateInProgress) {
61963
+ this.queuePendingValue(value);
61964
+ return;
61965
+ }
62100
61966
 
62101
- disconnectedCallback() {
62102
- // this.removeEventListener('keydown', this.handleKeyDown);
62103
- this.removeEventListener('auroMenuOption-click', this.handleMouseSelect);
62104
- this.removeEventListener('auroMenuOption-mouseover', this.handleOptionHover);
62105
- this.removeEventListener('slotchange', this.handleSlotChange);
61967
+ // Normalize values to array of strings
61968
+ const normalizedValues = this._getNormalizedValues(value);
62106
61969
 
62107
- super.disconnectedCallback();
62108
- }
61970
+ // Validate for single-select mode
61971
+ let validatedValues = normalizedValues;
61972
+ if (normalizedValues.length > 1 && !this.multiSelect) {
61973
+ console.warn("MenuService - Multiple values provided for single-select menu. Only the first value will be selected.");
61974
+ validatedValues = [normalizedValues[0]];
61975
+ }
62109
61976
 
62110
- firstUpdated() {
62111
- AuroLibraryRuntimeUtils$4.prototype.handleComponentTagRename(this, 'auro-menu');
61977
+ if (this._menuOptions.length === 0) {
61978
+ this.queuePendingValue(value);
61979
+ return;
61980
+ }
62112
61981
 
62113
- this.loadingSlots = this.querySelectorAll("[slot='loadingText'], [slot='loadingIcon']");
62114
- this.initializeMenu();
62115
- }
61982
+ // Find matching options by comparing available options to validated values
61983
+ const trackedKeys = new Set();
61984
+ const optionsToSelect = this._menuOptions.filter(option => {
61985
+ const passesFilter = validatedValues.includes(option.key);
61986
+ const alreadyTracked = trackedKeys.has(option.key);
61987
+ const isActive = option.isActive;
62116
61988
 
61989
+ trackedKeys.add(option.key);
62117
61990
 
62118
- updated(changedProperties) {
62119
- super.updated(changedProperties);
61991
+ // Include the option in the options to be selected if it passes the filter check and
61992
+ // either hasn't been tracked yet or selectAllMatchingOptions is true
61993
+ return isActive && passesFilter && (!alreadyTracked || (alreadyTracked && this.selectAllMatchingOptions));
61994
+ });
62120
61995
 
62121
- // Apply value selection synchronously so that static-HTML fixtures
62122
- // resolve within a single update cycle. The refactored selectByValue
62123
- // no longer calls reset() first, so the destructive intermediate-event
62124
- // cascade that originally required deferral is eliminated. If option
62125
- // keys are not yet resolved (framework mount-order race), selectByValue
62126
- // queues a bounded retry automatically via queuePendingValue.
62127
- if (changedProperties.has('value') && !this.internalUpdateInProgress) {
62128
- this.menuService.selectByValue(this.value);
62129
- }
61996
+ // Handle no matches: clear existing selection, but do not dispatch an intermediate
61997
+ // undefined value that can overwrite the host value in parent components.
61998
+ if (!optionsToSelect.length) {
61999
+ const hasUnresolvedKeys = this._menuOptions.some((option) => option.isActive && option.key == null);
62130
62000
 
62131
- // Handle loading state changes
62132
- if (changedProperties.has('loading')) {
62133
- this.setLoadingState(this.loading);
62134
- }
62001
+ if (hasUnresolvedKeys) {
62002
+ this.queuePendingValue(value);
62003
+ return;
62004
+ }
62135
62005
 
62136
- if (changedProperties.has('multiSelect') && this.rootMenu) {
62137
- if (this.multiSelect) {
62138
- this.setAttribute('aria-multiselectable', 'true');
62139
- } else {
62140
- this.removeAttribute('aria-multiselectable');
62006
+ this.clearPendingValue();
62007
+
62008
+ if (this.selectedOptions.length > 0) {
62009
+ this.selectedOptions = [];
62141
62010
  }
62011
+
62012
+ // Always notify so the host resets any stale invalid value, even when
62013
+ // selectedOptions was already empty (e.g. double-clicking set-invalid).
62014
+ this.stageUpdate({ reason: 'no-match' });
62015
+
62016
+ // Dispatch failure event if no matches found
62017
+ if (validatedValues.length) {
62018
+ this.dispatchChangeEvent('auroMenu-selectValueFailure', {
62019
+ message: 'No matching options found for the provided value(s).',
62020
+ values: validatedValues
62021
+ });
62022
+ }
62023
+
62024
+ return;
62025
+ }
62026
+
62027
+ this.clearPendingValue();
62028
+
62029
+ if (this.optionsArraysMatch(optionsToSelect, this.selectedOptions)) {
62030
+ return;
62142
62031
  }
62032
+
62033
+ // Apply programmatic selection as a single transaction and emit one final state.
62034
+ this.selectedOptions = optionsToSelect;
62035
+ this.stageUpdate();
62143
62036
  }
62144
62037
 
62145
62038
  /**
62146
- * Sets an attribute that matches the default tag name if the tag name is not the default.
62147
- * @param {string} tagName - The tag name to set as an attribute.
62148
- * @private
62039
+ * Queues a pending value and schedules a bounded retry.
62040
+ * @param {string|number|Array<string|number>} value - The value to retry.
62149
62041
  */
62150
- setTagAttribute(tagName) {
62151
- if (this.tagName.toLowerCase() !== tagName) {
62152
- this.setAttribute(tagName, true);
62042
+ queuePendingValue(value) {
62043
+ this._pendingValue = value;
62044
+
62045
+ if (this._pendingRetryScheduled || this._pendingRetryCount >= 5) {
62046
+ return;
62153
62047
  }
62048
+
62049
+ this._pendingRetryScheduled = true;
62050
+ this._pendingRetryCount += 1;
62051
+
62052
+ setTimeout(() => {
62053
+ this._pendingRetryScheduled = false;
62054
+
62055
+ if (this._pendingValue == null) {
62056
+ return;
62057
+ }
62058
+
62059
+ const pendingValue = this._pendingValue;
62060
+ this.selectByValue(pendingValue);
62061
+ }, 0);
62154
62062
  }
62155
62063
 
62156
62064
  /**
62157
- * Sets the loading state and dispatches a loading change event.
62158
- * @param {boolean} isLoading - Whether the menu is loading.
62159
- * @protected
62065
+ * Clears pending retry state.
62160
62066
  */
62161
- setLoadingState(isLoading) {
62162
- this.setAttribute("aria-busy", isLoading);
62163
- dispatchMenuEvent(this, "auroMenu-loadingChange", {
62164
- loading: isLoading,
62165
- hasLoadingPlaceholder: this.hasLoadingPlaceholder
62166
- });
62067
+ clearPendingValue() {
62068
+ this._pendingValue = null;
62069
+ this._pendingRetryScheduled = false;
62070
+ this._pendingRetryCount = 0;
62167
62071
  }
62168
62072
 
62169
- // Init Methods
62170
-
62171
62073
  /**
62172
- * Initializes the menu's state and structure.
62173
- * @private
62074
+ * Resets the selected options to an empty array.
62174
62075
  */
62175
- initializeMenu() {
62176
- if (this.rootMenu) {
62177
- this.setAttribute('role', 'listbox');
62178
- this.setAttribute('root', '');
62076
+ reset() {
62077
+ const previousOptions = [...this.selectedOptions];
62078
+ previousOptions.forEach(opt => opt.selected = false);
62079
+ this.selectedOptions = [];
62179
62080
 
62180
- if (this.multiSelect) {
62181
- this.setAttribute('aria-multiselectable', 'true');
62182
- }
62081
+ // Single update after clearing all
62082
+ if (previousOptions.length) {
62083
+ this.stageUpdate();
62183
62084
  }
62184
-
62185
- this.handleNestedMenus(this);
62186
62085
  }
62187
62086
 
62188
62087
  /**
62189
- * Selects the currently highlighted option.
62190
- * @protected
62088
+ * SUBSCRIPTION, NOTIFICATION AND EVENT DISPATCH METHODS
62191
62089
  */
62192
- makeSelection() {
62193
- this.menuService.selectHighlightedOption();
62194
- }
62195
62090
 
62196
62091
  /**
62197
- * Resets all options to their default state.
62198
- * @private
62092
+ * Subscribes a callback to menu service events.
62093
+ * @param {Function} callback - The callback to invoke on events.
62199
62094
  */
62200
- clearSelection() {
62201
- this.optionSelected = undefined;
62202
- this.value = undefined;
62203
- this._index = -1;
62095
+ subscribe(callback) {
62096
+ this._subscribers.push(callback);
62204
62097
  }
62205
62098
 
62206
62099
  /**
62207
- * Resets the menu to its initial state.
62208
- * This is the only way to return value to undefined.
62209
- * @public
62100
+ * Remove a previously subscribed callback from menu service events.
62101
+ * @param {Function} callback
62210
62102
  */
62211
- reset() {
62212
- this.menuService.reset();
62213
-
62214
- // Dispatch reset event
62215
- dispatchMenuEvent(this, 'auroMenu-selectValueReset');
62103
+ unsubscribe(callback) {
62104
+ this._subscribers = this._subscribers.filter(cb => cb !== callback);
62216
62105
  }
62217
62106
 
62218
62107
  /**
62219
- * Handles nested menu structure.
62220
- * @private
62221
- * @param {HTMLElement} menu - Root menu element.
62108
+ * Stages an update to notify subscribers of state and value changes.
62222
62109
  */
62223
- handleNestedMenus(menu) {
62224
- menu.level = menu.parentElement.level >= 0 ? menu.parentElement.level + 1 : 0;
62225
-
62226
- if (menu.level > 0) {
62227
- menu.setAttribute('role', 'group');
62228
- menu.removeAttribute("root");
62229
- if (!menu.hasAttribute('aria-label')) {
62230
- menu.setAttribute('aria-label', 'submenu');
62231
- }
62232
- }
62110
+ stageUpdate(meta = {}) {
62111
+ this.notifyStateChange(meta);
62112
+ this.notifyValueChange(meta);
62113
+ }
62233
62114
 
62234
- const options = menu.querySelectorAll(':scope > auro-menuoption, :scope > [auro-menuoption]');
62235
- options.forEach((option) => {
62236
- const regex = new RegExp(this.nestingSpacer, "gu");
62237
- option.innerHTML = this.nestingSpacer.repeat(menu.level) + option.innerHTML.replace(regex, '');
62238
- });
62115
+ /**
62116
+ * Notifies subscribers of a menu service event.
62117
+ * All notifications are sent to all subscribers.
62118
+ * @param {string} event - The event to send to subscribers.
62119
+ */
62120
+ notify(event) {
62121
+ this._subscribers.forEach(callback => callback(event));
62239
62122
  }
62240
62123
 
62241
62124
  /**
62242
- * Navigates the menu options in the specified direction.
62243
- * @param {'up'|'down'} direction - The direction to navigate.
62244
- * @protected
62125
+ * Notifies subscribers of a state change (selected options has changed).
62245
62126
  */
62246
- navigateOptions(direction) {
62247
- if (direction === 'up') {
62248
- this.menuService.highlightPrevious();
62249
- } else if (direction === 'down') {
62250
- this.menuService.highlightNext();
62251
- }
62127
+ notifyStateChange(meta = {}) {
62128
+ this.notify({
62129
+ type: 'stateChange',
62130
+ selectedOptions: this.selectedOptions,
62131
+ ...meta
62132
+ });
62252
62133
  }
62253
62134
 
62254
62135
  /**
62255
- * Handles slot change events.
62256
- * @private
62136
+ * Notifies subscribers of a value change (current value has changed).
62257
62137
  */
62258
- handleSlotChange() {
62259
- if (this.rootMenu) {
62260
- this.initializeMenu();
62261
- }
62138
+ notifyValueChange(meta = {}) {
62139
+
62140
+ // Prepare details for the event
62141
+ const details = {
62142
+ value: this.currentValue,
62143
+ stringValue: this.stringValue,
62144
+ keys: this.currentKeys,
62145
+ options: this.selectedOptions,
62146
+ label: this.currentLabel
62147
+ };
62148
+
62149
+ // If only one option is selected, include its index
62150
+ if (this.selectedOptions.length === 1) details.index = this._menuOptions.indexOf(this.selectedOptions[0]);
62151
+
62152
+ this.notify({
62153
+ type: 'valueChange',
62154
+ ...meta,
62155
+ ...details
62156
+ });
62262
62157
  }
62263
62158
 
62264
62159
  /**
62265
- * Handles custom events defined on options.
62266
- * @private
62267
- * @param {HTMLElement} option - Option with custom event.
62160
+ * Dispatches a custom event from the host element.
62161
+ * @param {string} eventName
62162
+ * @param {any} detail
62268
62163
  */
62269
- handleCustomEvent(option) {
62270
- const eventName = option.getAttribute('event');
62271
- dispatchMenuEvent(this, eventName);
62272
- dispatchMenuEvent(this, 'auroMenu-customEventFired');
62164
+ dispatchChangeEvent(eventName, detail) {
62165
+ this.host.dispatchEvent(new CustomEvent(eventName, {
62166
+ bubbles: true,
62167
+ cancelable: false,
62168
+ composed: true,
62169
+ detail
62170
+ }));
62273
62171
  }
62274
62172
 
62275
62173
  /**
62276
- * Notifies selection change to parent components.
62277
- * @param {any} source - The source that triggers this event.
62278
- * @private
62174
+ * MENU OPTION MANAGEMENT METHODS
62279
62175
  */
62280
- notifySelectionChange({value, stringValue, keys, options, reason} = {}) {
62281
- dispatchMenuEvent(this, 'auroMenu-selectedOption', {
62282
- value,
62283
- stringValue,
62284
- keys,
62285
- options,
62286
- reason
62287
- });
62288
- }
62289
62176
 
62290
62177
  /**
62291
- * Checks if an option is currently selected.
62292
- * @private
62293
- * @param {HTMLElement} option - The option to check.
62294
- * @returns {boolean}
62178
+ * Adds a menu option to the service's list.
62179
+ * @param {AuroMenuOption} option - the option to track
62295
62180
  */
62296
- isOptionSelected(option) {
62297
- if (!this.optionSelected) {
62298
- return false;
62299
- }
62181
+ addMenuOption(option) {
62182
+ this._menuOptions.push(option);
62183
+ this.notify({ type: 'optionsChange', options: this._menuOptions });
62300
62184
 
62301
- if (this.multiSelect) {
62302
- // In multi-select mode, check if the option is in the selected array
62303
- return Array.isArray(this.optionSelected) && this.optionSelected.some((selectedOption) => selectedOption === option);
62185
+ if (this._pendingValue != null) {
62186
+ this.queuePendingValue(this._pendingValue);
62304
62187
  }
62305
-
62306
- return this.optionSelected === option;
62307
62188
  }
62308
62189
 
62309
62190
  /**
62310
- * Getter for loading placeholder state.
62311
- * @returns {boolean} - True if loading slots are present and non-empty.
62191
+ * Removes a menu option from the service's list.
62192
+ * @param {AuroMenuOption} option - the option to remove
62312
62193
  */
62313
- get hasLoadingPlaceholder() {
62314
- return this.loadingSlots && this.loadingSlots.length > 0;
62194
+ removeMenuOption(option) {
62195
+ this._menuOptions = this._menuOptions.filter(opt => opt !== option);
62196
+ this.notify({ type: 'optionsChange', options: this._menuOptions });
62197
+
62198
+ if (this._menuOptions.length === 0) {
62199
+ this.clearPendingValue();
62200
+ }
62315
62201
  }
62316
62202
 
62317
62203
  /**
62318
- * Getter for wrapper classes based on size.
62319
- * @returns {Object} - Class map for the wrapper element.
62320
- * @private
62204
+ * UTILITIES
62321
62205
  */
62322
- get wrapperClasses() {
62323
- return e$3({
62324
- 'menuWrapper': true,
62325
- [this.size]: true,
62326
- });
62327
- }
62328
62206
 
62329
62207
  /**
62330
- * Logic to determine the layout of the component.
62331
- * @protected
62332
- * @returns {void}
62208
+ * Normalizes a value or array of values into an array of strings for option selection.
62209
+ * This function ensures that input values are consistently formatted for matching menu options.
62210
+ *
62211
+ * @param {string|number|Array<string|number>} value - The value(s) to normalize.
62212
+ * @returns {Array<string>} An array of string values suitable for option matching.
62213
+ * @throws {Error} If any value is not a string or number.
62333
62214
  */
62334
- renderLayout() {
62335
- if (this.loading) {
62336
- return b$7`
62337
- <div class="${this.wrapperClasses}">
62338
- <auro-menuoption
62339
- disabled
62340
- loadingplaceholder
62341
- class="${this.hasLoadingPlaceholder ? "" : "empty"}"
62342
- >
62343
- <div>
62344
- <slot name="loadingIcon" class="body-lg"></slot>
62345
- <slot name="loadingText"></slot>
62346
- </div>
62347
- </auro-menuoption>
62348
- </div>
62349
- `;
62350
- }
62215
+ _getNormalizedValues(value) {
62216
+ let values = value;
62351
62217
 
62352
- return b$7`
62353
- <div class="${this.wrapperClasses}">
62354
- <slot @slotchange=${this.handleSlotChange}></slot>
62355
- </div>
62356
- `;
62357
- }
62358
- }
62218
+ // Handle JSON string and single value string input
62219
+ if (!Array.isArray(values) && typeof values === 'string') {
62359
62220
 
62360
- var styleCss$4 = i$7`.body-default{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-default-font-size, 1rem);line-height:var(--wcss-body-default-line-height, 1.5rem)}.body-lg{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-lg-font-size, 1.125rem);line-height:var(--wcss-body-lg-line-height, 1.625rem)}.body-sm{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-sm-font-size, 0.875rem);line-height:var(--wcss-body-sm-line-height, 1.25rem)}.body-xs{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-xs-font-size, 0.75rem);line-height:var(--wcss-body-xs-line-height, 1rem)}.body-2xs{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0);font-size:var(--wcss-body-2xs-font-size, 0.625rem);line-height:var(--wcss-body-2xs-line-height, 0.875rem)}.display-2xl{font-family:var(--wcss-display-2xl-family, "AS Circular"),var(--wcss-display-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-display-2xl-letter-spacing, 0);font-weight:var(--wcss-display-2xl-weight, 300);line-height:var(--wcss-display-2xl-line-height, 1.3);font-size:var(--wcss-display-2xl-font-size, clamp(3.5rem, 6vw, 5.375rem))}.display-xl{font-family:var(--wcss-display-xl-family, "AS Circular"),var(--wcss-display-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-display-xl-letter-spacing, 0);font-weight:var(--wcss-display-xl-weight, 300);line-height:var(--wcss-display-xl-line-height, 1.3);font-size:var(--wcss-display-xl-font-size, clamp(3rem, 5.3333333333vw, 4.5rem))}.display-lg{font-family:var(--wcss-display-lg-family, "AS Circular"),var(--wcss-display-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-display-lg-letter-spacing, 0);font-weight:var(--wcss-display-lg-weight, 300);line-height:var(--wcss-display-lg-line-height, 1.3);font-size:var(--wcss-display-lg-font-size, clamp(2.75rem, 4.6666666667vw, 4rem))}.display-md{font-family:var(--wcss-display-md-family, "AS Circular"),var(--wcss-display-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-display-md-letter-spacing, 0);font-weight:var(--wcss-display-md-weight, 300);line-height:var(--wcss-display-md-line-height, 1.3);font-size:var(--wcss-display-md-font-size, clamp(2.5rem, 4vw, 3.5rem))}.display-sm{font-family:var(--wcss-display-sm-family, "AS Circular"),var(--wcss-display-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-display-sm-letter-spacing, 0);font-weight:var(--wcss-display-sm-weight, 300);line-height:var(--wcss-display-sm-line-height, 1.3);font-size:var(--wcss-display-sm-font-size, clamp(2rem, 3.6666666667vw, 3rem))}.display-xs{font-family:var(--wcss-display-xs-family, "AS Circular"),var(--wcss-display-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-display-xs-letter-spacing, 0);font-weight:var(--wcss-display-xs-weight, 300);line-height:var(--wcss-display-xs-line-height, 1.3);font-size:var(--wcss-display-xs-font-size, clamp(1.75rem, 3vw, 2.375rem))}.heading-xl{font-family:var(--wcss-heading-xl-family, "AS Circular"),var(--wcss-heading-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-heading-xl-letter-spacing, 0);font-weight:var(--wcss-heading-xl-weight, 300);line-height:var(--wcss-heading-xl-line-height, 1.3);font-size:var(--wcss-heading-xl-font-size, clamp(2rem, 3vw, 2.5rem))}.heading-lg{font-family:var(--wcss-heading-lg-family, "AS Circular"),var(--wcss-heading-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-heading-lg-letter-spacing, 0);font-weight:var(--wcss-heading-lg-weight, 300);line-height:var(--wcss-heading-lg-line-height, 1.3);font-size:var(--wcss-heading-lg-font-size, clamp(1.75rem, 2.6666666667vw, 2.25rem))}.heading-md{font-family:var(--wcss-heading-md-family, "AS Circular"),var(--wcss-heading-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-heading-md-letter-spacing, 0);font-weight:var(--wcss-heading-md-weight, 300);line-height:var(--wcss-heading-md-line-height, 1.3);font-size:var(--wcss-heading-md-font-size, clamp(1.625rem, 2.3333333333vw, 1.75rem))}.heading-sm{font-family:var(--wcss-heading-sm-family, "AS Circular"),var(--wcss-heading-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-heading-sm-letter-spacing, 0);font-weight:var(--wcss-heading-sm-weight, 300);line-height:var(--wcss-heading-sm-line-height, 1.3);font-size:var(--wcss-heading-sm-font-size, clamp(1.375rem, 2vw, 1.5rem))}.heading-xs{font-family:var(--wcss-heading-xs-family, "AS Circular"),var(--wcss-heading-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-heading-xs-letter-spacing, 0);font-weight:var(--wcss-heading-xs-weight, 450);line-height:var(--wcss-heading-xs-line-height, 1.3);font-size:var(--wcss-heading-xs-font-size, clamp(1.25rem, 1.6666666667vw, 1.25rem))}.heading-2xs{font-family:var(--wcss-heading-2xs-family, "AS Circular"),var(--wcss-heading-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-heading-2xs-letter-spacing, 0);font-weight:var(--wcss-heading-2xs-weight, 450);line-height:var(--wcss-heading-2xs-line-height, 1.3);font-size:var(--wcss-heading-2xs-font-size, clamp(1.125rem, 1.5vw, 1.125rem))}.accent-2xl{font-family:var(--wcss-accent-2xl-family, "Good OT"),var(--wcss-accent-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-accent-2xl-letter-spacing, 0.05em);font-weight:var(--wcss-accent-2xl-weight, 450);line-height:var(--wcss-accent-2xl-line-height, 1);font-size:var(--wcss-accent-2xl-font-size, clamp(2rem, 3.1666666667vw, 2.375rem));text-transform:uppercase}.accent-xl{font-family:var(--wcss-accent-xl-family, "Good OT"),var(--wcss-accent-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-accent-xl-letter-spacing, 0.05em);font-weight:var(--wcss-accent-xl-weight, 450);line-height:var(--wcss-accent-xl-line-height, 1.3);font-size:var(--wcss-accent-xl-font-size, clamp(1.625rem, 2.3333333333vw, 2rem));text-transform:uppercase}.accent-lg{font-family:var(--wcss-accent-lg-family, "Good OT"),var(--wcss-accent-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-accent-lg-letter-spacing, 0.05em);font-weight:var(--wcss-accent-lg-weight, 450);line-height:var(--wcss-accent-lg-line-height, 1.3);font-size:var(--wcss-accent-lg-font-size, clamp(1.5rem, 2.1666666667vw, 1.75rem));text-transform:uppercase}.accent-md{font-family:var(--wcss-accent-md-family, "Good OT"),var(--wcss-accent-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-accent-md-letter-spacing, 0.05em);font-weight:var(--wcss-accent-md-weight, 500);line-height:var(--wcss-accent-md-line-height, 1.3);font-size:var(--wcss-accent-md-font-size, clamp(1.375rem, 1.8333333333vw, 1.5rem));text-transform:uppercase}.accent-sm{font-family:var(--wcss-accent-sm-family, "Good OT"),var(--wcss-accent-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-accent-sm-letter-spacing, 0.05em);font-weight:var(--wcss-accent-sm-weight, 500);line-height:var(--wcss-accent-sm-line-height, 1.3);font-size:var(--wcss-accent-sm-font-size, clamp(1.125rem, 1.5vw, 1.25rem));text-transform:uppercase}.accent-xs{font-family:var(--wcss-accent-xs-family, "Good OT"),var(--wcss-accent-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-accent-xs-letter-spacing, 0.1em);font-weight:var(--wcss-accent-xs-weight, 500);line-height:var(--wcss-accent-xs-line-height, 1.3);font-size:var(--wcss-accent-xs-font-size, clamp(1rem, 1.3333333333vw, 1rem));text-transform:uppercase}.accent-2xs{font-family:var(--wcss-accent-2xs-family, "Good OT"),var(--wcss-accent-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);letter-spacing:var(--wcss-accent-2xs-letter-spacing, 0.1em);font-weight:var(--wcss-accent-2xs-weight, 450);line-height:var(--wcss-accent-2xs-line-height, 1.3);font-size:var(--wcss-accent-2xs-font-size, clamp(0.875rem, 1.1666666667vw, 0.875rem));text-transform:uppercase}:host{cursor:pointer;user-select:none;text-overflow:ellipsis;max-width:100dvw}:host .wrapper{display:flex;align-items:center;height:var(--ds-size-400, 2rem);padding-right:var(--ds-size-200, 1rem);padding-left:calc(var(--ds-size-150, 0.75rem) + var(--ds-size-300, 1.5rem) + var(--ds-size-100, 0.5rem));border-radius:var(--ds-size-100, 0.5rem);-webkit-tap-highlight-color:transparent}:host .wrapper[class*=shape-box]{border-radius:unset}:host .wrapper[class*=shape-snowflake]{border-radius:unset;line-height:24px}:host .wrapper[class*=shape-pill]{border-radius:30px}:host .wrapper[class*=-lg]{padding-top:var(--ds-size-75, 0.375rem);padding-bottom:var(--ds-size-75, 0.375rem);padding-right:var(--ds-size-150, 0.75rem);line-height:26px}:host .wrapper[class*=-xl]{padding-top:var(--ds-size-100, 0.5rem);padding-bottom:var(--ds-size-100, 0.5rem);padding-right:var(--ds-size-200, 1rem);line-height:26px}:host slot{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}:host [auro-icon]{--ds-auro-icon-size: var(--ds-size-300, 1.5rem);margin-right:var(--ds-size-150, 0.75rem);margin-left:var(--ds-size-100, 0.5rem)}:host ::slotted(.nestingSpacer){display:inline-block;width:var(--ds-size-300, 1.5rem)}[slot=displayValue]{display:none}:host([loadingplaceholder]) .wrapper{padding-left:calc(var(--ds-size-150, 0.75rem) + var(--ds-size-300, 1.5rem) + var(--ds-size-100, 0.5rem))}:host([selected]) .wrapper{padding-left:0}:host([nocheckmark]) .wrapper{padding-left:var(--ds-size-150, 0.75rem)}:host([nocheckmark]) .wrapper[class*=-lg]{padding-left:var(--ds-size-150, 0.75rem)}:host([nocheckmark]) .wrapper[class*=-xl]{padding-left:var(--ds-size-200, 1rem)}:host([hidden]){display:none}:host([static]){pointer-events:none}:host([disabled]:hover){cursor:auto}:host([disabled]){user-select:none;pointer-events:none}`;
62221
+ // Attempt to parse as JSON array
62222
+ try {
62361
62223
 
62362
- var colorCss$4 = i$7`:host .wrapper{background-color:var(--ds-auro-menuoption-container-color, transparent);box-shadow:inset 0 0 0 1px var(--ds-auro-menuoption-container-border-color, transparent);color:var(--ds-auro-menuoption-text-color)}:host svg{fill:var(--ds-auro-menuoption-icon-color)}:host([disabled]){--ds-auro-menuoption-container-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-menuoption-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0);--ds-auro-menuoption-icon-color: var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host(.active){--ds-auro-menuoption-container-color: var(--ds-basic-color-surface-accent1-muted, #ebfafd)}@media(hover: hover){:host(:hover){--ds-auro-menuoption-container-color: var(--ds-basic-color-surface-accent1-muted, #ebfafd)}}:host(:focus){--ds-auro-menuoption-container-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-menuoption-container-border-color: var(--ds-basic-color-border-brand, #00274a)}:host([selected]){--ds-auro-menuoption-container-color: var(--ds-basic-color-surface-accent1-subtle, #b4eff9);--ds-auro-menuoption-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-menuoption-icon-color: var(--ds-basic-color-texticon-default, #2a2a2a)}:host([selected].active){--ds-auro-menuoption-container-color: var(--ds-basic-color-surface-accent1-muted, #ebfafd)}@media(hover: hover){:host([selected]:hover){--ds-auro-menuoption-container-color: var(--ds-basic-color-surface-accent1-muted, #ebfafd)}}:host([selected]:focus){--ds-auro-menuoption-container-color: var(--ds-basic-color-surface-accent1-subtle, #b4eff9);--ds-auro-menuoption-container-border-color: var(--ds-basic-color-border-brand, #00274a)}:host(:focus.active){--ds-auro-menuoption-container-color: var(--ds-basic-color-surface-accent1-muted, #ebfafd);--ds-auro-menuoption-container-border-color: var(--ds-basic-color-border-brand, #00274a)}@media(hover: hover){:host(:focus:hover){--ds-auro-menuoption-container-color: var(--ds-basic-color-surface-accent1-muted, #ebfafd);--ds-auro-menuoption-container-border-color: var(--ds-basic-color-border-brand, #00274a)}}:host([selected]:focus.active){--ds-auro-menuoption-container-color: var(--ds-basic-color-surface-accent1-muted, #ebfafd);--ds-auro-menuoption-container-border-color: var(--ds-basic-color-border-brand, #00274a)}@media(hover: hover){:host([selected]:focus:hover){--ds-auro-menuoption-container-color: var(--ds-basic-color-surface-accent1-muted, #ebfafd);--ds-auro-menuoption-container-border-color: var(--ds-basic-color-border-brand, #00274a)}}`;
62224
+ // Normalize single quotes to double quotes for JSON parsing
62225
+ // This will not handle complex cases but will cover basic usage
62226
+ const parseValue = values.replace(/'([^']*?)'/g, '"$1"');
62363
62227
 
62364
- // Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
62365
- // See LICENSE in the project root for license information.
62228
+ // Attempt parse
62229
+ const parsed = JSON.parse(parseValue);
62366
62230
 
62231
+ // Ensure parsed value is an array
62232
+ if (!Array.isArray(parsed)) throw new Error('Not an array');
62367
62233
 
62368
- let AuroDependencyVersioning$3 = class AuroDependencyVersioning {
62234
+ // Set values to parsed array
62235
+ values = parsed;
62236
+ } catch (err) {
62369
62237
 
62370
- /**
62371
- * Generates a unique string to be used for child auro element naming.
62372
- * @private
62373
- * @param {string} baseName - Defines the first part of the unique element name.
62374
- * @param {string} version - Version of the component that will be appended to the baseName.
62375
- * @returns {string} - Unique string to be used for naming.
62376
- */
62377
- generateElementName(baseName, version) {
62378
- let result = baseName;
62238
+ // If parsing fails, treat as single value
62239
+ values = [value];
62240
+ }
62241
+ }
62379
62242
 
62380
- result += '-';
62381
- result += version.replace(/[.]/g, '_');
62243
+ // Handle a single number being passed
62244
+ if (typeof values === 'number') {
62245
+ values = [String(values)];
62246
+ }
62382
62247
 
62383
- return result;
62248
+ // Coerce each value to string and validate types
62249
+ values.forEach((val, index) => {
62250
+
62251
+ // Throw an error for invalid value types
62252
+ if (typeof val !== 'string' && typeof val !== 'number') {
62253
+ throw new Error('Value contains invalid value type. Supported types are string and number.');
62254
+ }
62255
+
62256
+ // Convert numbers to strings for consistency
62257
+ if (typeof val === 'number') {
62258
+ values[index] = String(val);
62259
+ }
62260
+ });
62261
+
62262
+ // Return the resulting array of string values
62263
+ return values;
62384
62264
  }
62385
62265
 
62386
62266
  /**
62387
- * Generates a unique string to be used for child auro element naming.
62388
- * @param {string} baseName - Defines the first part of the unique element name.
62389
- * @param {string} version - Version of the component that will be appended to the baseName.
62390
- * @returns {string} - Unique string to be used for naming.
62267
+ * Returns whether two arrays of options contain the same elements.
62268
+ * @param {AuroMenuOption[]} arr1 - First array of options.
62269
+ * @param {AuroMenuOption[]} arr2 - Second array of options.
62270
+ * @returns {boolean} True if arrays match, false otherwise.
62391
62271
  */
62392
- generateTag(baseName, version, tagClass) {
62393
- const elementName = this.generateElementName(baseName, version);
62394
- const tag = i$3`${s$6(elementName)}`;
62272
+ optionsArraysMatch(arr1, arr2) {
62273
+ if (arr1.length !== arr2.length) return false;
62395
62274
 
62396
- if (!customElements.get(elementName)) {
62397
- customElements.define(elementName, class extends tagClass {});
62275
+ const set1 = new Set(arr1);
62276
+ const set2 = new Set(arr2);
62277
+
62278
+ for (let item of set1) {
62279
+ if (!set2.has(item)) {
62280
+ return false;
62281
+ }
62398
62282
  }
62399
62283
 
62400
- return tag;
62284
+ return true;
62401
62285
  }
62402
- };
62403
-
62404
- let p$3 = class p{registerComponent(t,a){customElements.get(t)||customElements.define(t,class extends a{});}closestElement(t,a=this,e=(a,s=a&&a.closest(t))=>a&&a!==document&&a!==window?s||e(a.getRootNode().host):null){return e(a)}handleComponentTagRename(t,a){const e=a.toLowerCase();t.tagName.toLowerCase()!==e&&t.setAttribute(e,true);}elementMatch(t,a){const e=a.toLowerCase();return t.tagName.toLowerCase()===e||t.hasAttribute(e)}getSlotText(t,a){const e=t.shadowRoot?.querySelector(`slot[name="${a}"]`);return (e?.assignedNodes({flatten:true})||[]).map(t=>t.textContent?.trim()).join(" ").trim()||null}};var u$3='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-labelledby="error__desc" class="ico_squareLarge" data-deprecated="true" role="img" style="min-width:var(--auro-size-lg, var(--ds-size-300, 1.5rem));height:var(--auro-size-lg, var(--ds-size-300, 1.5rem));fill:currentColor" viewBox="0 0 24 24" part="svg"><title/><desc id="error__desc">Error alert indicator.</desc><path d="m13.047 5.599 6.786 11.586A1.207 1.207 0 0 1 18.786 19H5.214a1.207 1.207 0 0 1-1.047-1.815l6.786-11.586a1.214 1.214 0 0 1 2.094 0m-1.165.87a.23.23 0 0 0-.085.085L5.419 17.442a.232.232 0 0 0 .203.35h12.756a.234.234 0 0 0 .203-.35L12.203 6.554a.236.236 0 0 0-.321-.084M12 15.5a.75.75 0 1 1 0 1.5.75.75 0 0 1 0-1.5m-.024-6.22c.325 0 .589.261.589.583v4.434a.586.586 0 0 1-.589.583.586.586 0 0 1-.588-.583V9.863c0-.322.264-.583.588-.583"/></svg>';let m$3 = class m extends i$4{static get properties(){return {hidden:{type:Boolean,reflect:true},hiddenVisually:{type:Boolean,reflect:true},hiddenAudible:{type:Boolean,reflect:true}}}hideAudible(t){return t?"true":"false"}};const g$3=new Map,f$3=(t,a={})=>{const e=a.responseParser||(t=>t.text());return g$3.has(t)||g$3.set(t,fetch(t).then(e)),g$3.get(t)};var w$3=i$7`:focus:not(:focus-visible){outline:3px solid transparent}.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock,:host{display:block}.util_displayFlex{display:flex}.util_displayHidden,:host([hidden]:not(:focus):not(:active)){display:none}.util_displayHiddenVisually,:host([hiddenVisually]:not(:focus):not(:active)){position:absolute;overflow:hidden;clip:rect(1px,1px,1px,1px);width:1px;height:1px;padding:0;border:0}.ico_squareLarge{fill:currentColor;height:var(--auro-size-lg, var(--ds-size-300, 1.5rem))}.ico_squareSmall{fill:currentColor;height:.6rem}.ico_squareMed{fill:currentColor;height:var(--auro-size-md, var(--ds-size-200, 1rem))}.ico_squareSml{fill:currentColor;height:var(--auro-size-sm, var(--ds-size-150, .75rem))}:host{color:currentColor;vertical-align:middle;display:inline-block}svg{min-width:var(--ds-auro-icon-size, 1.5rem)!important;width:var(--ds-auro-icon-size, 1.5rem)!important;height:var(--ds-auro-icon-size, 1.5rem)!important}.componentWrapper{display:flex;line-height:var(--ds-auro-icon-size)}.svgWrapper{height:var(--ds-auro-icon-size);width:var(--ds-auro-icon-size)}.svgWrapper [part=svg]{display:flex}.labelWrapper{margin-left:var(--ds-size-50, .25rem)}.labelWrapper ::slotted(*){line-height:inherit!important}
62405
- `;let z$3 = class z extends m$3{constructor(){super(),this._initializeDefaults();}_initializeDefaults(){this.onDark=false,this.appearance="default";}static get properties(){return {...m$3.properties,onDark:{type:Boolean,reflect:true},appearance:{type:String,reflect:true},svg:{attribute:false,reflect:true}}}static get styles(){return w$3}async fetchIcon(t,a){let e="";e="logos"===t?await f$3(`${this.uri}/${t}/${a}.svg`):await f$3(`${this.uri}/icons/${t}/${a}.svg`);return (new DOMParser).parseFromString(e,"text/html").body.querySelector("svg")}async firstUpdated(){try{if(!this.customSvg){const t=await this.fetchIcon(this.category,this.name);if(t)this.svg=t;else if(!t){const t=(new DOMParser).parseFromString(u$3,"text/html");this.svg=t.body.firstChild;}}}catch(t){this.svg=void 0;}}};i$7`.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock,:host{display:block}.util_displayFlex{display:flex}.util_displayHidden,:host([hidden]:not(:focus):not(:active)){display:none}.util_displayHiddenVisually,:host([hiddenVisually]:not(:focus):not(:active)){position:absolute;overflow:hidden;clip:rect(1px,1px,1px,1px);width:1px;height:1px;padding:0;border:0}:host{display:inline-block;--ds-auro-icon-size: 100%;width:100%;height:100%}:host .logo{color:var(--ds-auro-alaska-color)}:host([onDark]),:host([appearance=inverse]){--ds-auro-alaska-color: #FFF}
62406
- `;var y$3=i$7`:host{--ds-auro-icon-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-alaska-color: #02426D;--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}
62407
- `;var x$3=i$7`:host{color:var(--ds-auro-icon-color)}:host([customColor]){color:inherit}:host(:not([onDark])[variant=accent1]),:host(:not([appearance=inverse])[variant=accent1]){--ds-auro-icon-color: var(--ds-basic-color-texticon-accent1, #265688)}:host(:not([onDark])[variant=disabled]),:host(:not([appearance=inverse])[variant=disabled]){--ds-auro-icon-color: var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host(:not([onDark])[variant=muted]),:host(:not([appearance=inverse])[variant=muted]){--ds-auro-icon-color: var(--ds-basic-color-texticon-muted, #676767)}:host(:not([onDark])[variant=statusDefault]),:host(:not([appearance=inverse])[variant=statusDefault]){--ds-auro-icon-color: var(--ds-basic-color-status-default, #afb9c6)}:host(:not([onDark])[variant=statusInfo]),:host(:not([appearance=inverse])[variant=statusInfo]){--ds-auro-icon-color: var(--ds-basic-color-status-info, #01426a)}:host(:not([onDark])[variant=statusSuccess]),:host(:not([appearance=inverse])[variant=statusSuccess]){--ds-auro-icon-color: var(--ds-basic-color-status-success, #447a1f)}:host(:not([onDark])[variant=statusWarning]),:host(:not([appearance=inverse])[variant=statusWarning]){--ds-auro-icon-color: var(--ds-basic-color-status-warning, #fac200)}:host(:not([onDark])[variant=statusError]),:host(:not([appearance=inverse])[variant=statusError]){--ds-auro-icon-color: var(--ds-basic-color-status-error, #e31f26)}:host(:not([onDark])[variant=statusInfoSubtle]),:host(:not([appearance=inverse])[variant=statusInfoSubtle]){--ds-auro-icon-color: var(--ds-basic-color-status-info-subtle, #ebf3f9)}:host(:not([onDark])[variant=statusSuccessSubtle]),:host(:not([appearance=inverse])[variant=statusSuccessSubtle]){--ds-auro-icon-color: var(--ds-basic-color-status-success-subtle, #d6eac7)}:host(:not([onDark])[variant=statusWarningSubtle]),:host(:not([appearance=inverse])[variant=statusWarningSubtle]){--ds-auro-icon-color: var(--ds-basic-color-status-warning-subtle, #fff0b2)}:host(:not([onDark])[variant=statusErrorSubtle]),:host(:not([appearance=inverse])[variant=statusErrorSubtle]){--ds-auro-icon-color: var(--ds-basic-color-status-error-subtle, #fbc6c6)}:host(:not([onDark])[variant=fareBasicEconomy]),:host(:not([appearance=inverse])[variant=fareBasicEconomy]){--ds-auro-icon-color: var(--ds-basic-color-fare-basiceconomy, #97eaf8)}:host(:not([onDark])[variant=fareBusiness]),:host(:not([appearance=inverse])[variant=fareBusiness]){--ds-auro-icon-color: var(--ds-basic-color-fare-business, #01426a)}:host(:not([onDark])[variant=fareEconomy]),:host(:not([appearance=inverse])[variant=fareEconomy]){--ds-auro-icon-color: var(--ds-basic-color-fare-economy, #0074ca)}:host(:not([onDark])[variant=fareFirst]),:host(:not([appearance=inverse])[variant=fareFirst]){--ds-auro-icon-color: var(--ds-basic-color-fare-first, #00274a)}:host(:not([onDark])[variant=farePremiumEconomy]),:host(:not([appearance=inverse])[variant=farePremiumEconomy]){--ds-auro-icon-color: var(--ds-basic-color-fare-premiumeconomy, #005154)}:host(:not([onDark])[variant=tierOneWorldEmerald]),:host(:not([appearance=inverse])[variant=tierOneWorldEmerald]){--ds-auro-icon-color: var(--ds-basic-color-tier-program-oneworld-emerald, #139142)}:host(:not([onDark])[variant=tierOneWorldSapphire]),:host(:not([appearance=inverse])[variant=tierOneWorldSapphire]){--ds-auro-icon-color: var(--ds-basic-color-tier-program-oneworld-sapphire, #015daa)}:host(:not([onDark])[variant=tierOneWorldRuby]),:host(:not([appearance=inverse])[variant=tierOneWorldRuby]){--ds-auro-icon-color: var(--ds-basic-color-tier-program-oneworld-ruby, #a41d4a)}:host([onDark]),:host([appearance=inverse]){--ds-auro-icon-color: var(--ds-basic-color-texticon-inverse, #ffffff)}:host([onDark][variant=disabled]),:host([appearance=inverse][variant=disabled]){--ds-auro-icon-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}:host([onDark][variant=muted]),:host([appearance=inverse][variant=muted]){--ds-auro-icon-color: var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([onDark][variant=statusError]),:host([appearance=inverse][variant=statusError]){--ds-auro-icon-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8)}
62408
- `;let _$2 = class _ extends z$3{constructor(){super(),this._initializeDefaults();}_initializeDefaults(){this.variant=void 0,this.uri="https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist",this.runtimeUtils=new p$3;}static get properties(){return {...z$3.properties,ariaHidden:{type:String,reflect:true},category:{type:String,reflect:true},customColor:{type:Boolean,reflect:true},customSvg:{type:Boolean},label:{type:Boolean,reflect:true},name:{type:String,reflect:true},variant:{type:String,reflect:true}}}static get styles(){return [z$3.styles,y$3,w$3,x$3]}static register(t="auro-icon"){p$3.prototype.registerComponent(t,_);}connectedCallback(){super.connectedCallback(),this.runtimeUtils.handleComponentTagRename(this,"auro-icon");}exposeCssParts(){this.setAttribute("exportparts","svg:iconSvg");}async firstUpdated(){if(await super.firstUpdated(),this.hasAttribute("ariaHidden")&&this.svg){const t=this.svg.querySelector("desc");t&&(t.remove(),this.svg.removeAttribute("aria-labelledby"));}}render(){const t={labelWrapper:true,util_displayHiddenVisually:!this.label};return b$7`
62409
- <div class="componentWrapper">
62410
- <div
62411
- class="${e$3({svgWrapper:true})}"
62412
- title="${o$4(this.title||void 0)}">
62413
- <span aria-hidden="${o$4(this.ariaHidden||true)}" part="svg">
62414
- ${this.customSvg?b$7`
62415
- <slot name="svg"></slot>
62416
- `:b$7`
62417
- ${this.svg}
62418
- `}
62419
- </span>
62420
- </div>
62421
-
62422
- <div class="${e$3(t)}" part="label">
62423
- <slot></slot>
62424
- </div>
62425
- </div>
62426
- `}};
62427
-
62428
- var iconVersion$2 = '9.1.2';
62286
+ }
62429
62287
 
62430
- var checkmarkIcon = {"svg":"<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" aria-labelledby=\"checkmark-sm__desc\" class=\"ico_squareLarge\" role=\"img\" style=\"min-width:var(--auro-size-lg, var(--ds-size-300, 1.5rem));height:var(--auro-size-lg, var(--ds-size-300, 1.5rem));fill:currentColor\" viewBox=\"0 0 24 24\" part=\"svg\"><title/><desc id=\"checkmark-sm__desc\">a small check mark.</desc><path d=\"M8.461 11.84a.625.625 0 1 0-.922.844l2.504 2.738c.247.27.674.27.922 0l5.496-6a.625.625 0 1 0-.922-.844l-5.035 5.496z\"/></svg>"};
62288
+ const MenuContext = n$1('menu-context');
62431
62289
 
62432
- // Copyright (c) 2021 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
62290
+ /* eslint-disable no-underscore-dangle */
62291
+ // Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
62433
62292
  // See LICENSE in the project root for license information.
62434
62293
 
62435
62294
 
62436
- let menuOptionIdCounter = 0;
62437
62295
 
62438
62296
  /**
62439
- * The `auro-menuoption` element provides users a way to define a menu option.
62440
- * @customElement auro-menuoption
62441
- *
62442
- * @slot default - The default slot for the menu option text.
62297
+ * The `auro-menu` element provides users a way to select from a list of options.
62298
+ * @customElement auro-menu
62443
62299
  *
62444
- * @event auroMenuOption-mouseover - Notifies that this option has been hovered over.
62300
+ * @event {CustomEvent<Element>} auroMenu-activatedOption - Notifies that a menuoption has been made `active`.
62301
+ * @event {CustomEvent<any>} auroMenu-customEventFired - Notifies that a custom event has been fired.
62302
+ * @event {CustomEvent<{ loading: boolean; hasLoadingPlaceholder: boolean; }>} auroMenu-loadingChange - Notifies when the loading attribute is changed.
62303
+ * @event {CustomEvent<any>} auroMenu-selectValueFailure - Notifies that an attempt to select a menuoption by matching a value has failed.
62304
+ * @event {CustomEvent<{ values: HTMLElement[] }>} auroMenu-deselectPrevented - Notifies that deselection was prevented and includes the affected options in `detail.values`.
62305
+ * @event {CustomEvent<any>} auroMenu-selectValueReset - Notifies that the component value has been reset.
62306
+ * @event {CustomEvent<any>} auroMenu-selectedOption - Notifies that a new menuoption selection has been made.
62307
+ * @slot loadingText - Text to show while loading attribute is set
62308
+ * @slot loadingIcon - Icon to show while loading attribute is set
62309
+ * @slot - Slot for insertion of menu options.
62445
62310
  */
62446
- class AuroMenuOption extends AuroElement$2 {
62447
62311
 
62448
- /**
62449
- * This will register this element with the browser.
62450
- * @param {string} [name="auro-menuoption"] - The name of the element that you want to register.
62451
- *
62452
- * @example
62453
- * AuroMenuOption.register("custom-menuoption") // this will register this element to <custom-menuoption/>
62454
- *
62455
- */
62456
- static register(name = "auro-menuoption") {
62457
- AuroLibraryRuntimeUtils$4.prototype.registerComponent(name, AuroMenuOption);
62458
- }
62312
+ /* eslint-disable max-lines */
62459
62313
 
62460
- /**
62461
- * Returns whether the menu option is currently active and selectable.
62462
- * An option is considered active if it is not hidden, not disabled, and not static.
62463
- * @returns {boolean} True if the option is active, false otherwise.
62464
- */
62465
- get isActive() {
62466
- return !this.hasAttribute('hidden') &&
62467
- !this.disabled &&
62468
- !this.hasAttribute('static');
62469
- }
62314
+ class AuroMenu extends AuroElement$2 {
62470
62315
 
62471
62316
  constructor() {
62472
62317
  super();
62473
62318
 
62474
- this.bindEvents();
62319
+ // State properties (reactive)
62475
62320
 
62476
62321
  /**
62477
62322
  * @private
62478
62323
  */
62479
- this.shape = undefined;
62324
+ this.shape = "box";
62480
62325
 
62481
62326
  /**
62482
62327
  * @private
62483
62328
  */
62484
- this.size = undefined;
62485
-
62486
- /**
62487
- * Generate unique names for dependency components.
62488
- */
62489
- const versioning = new AuroDependencyVersioning$3();
62490
- this.iconTag = versioning.generateTag('auro-formkit-menuoption-icon', iconVersion$2, _$2);
62329
+ this.size = "sm";
62491
62330
 
62492
- this.selected = false;
62331
+ // Value of the selected options
62332
+ this.value = undefined;
62333
+ // Currently selected option
62334
+ this.optionSelected = undefined;
62335
+ // String used for highlighting/filtering
62336
+ this.matchWord = undefined;
62337
+ // Hide the checkmark icon on selected options
62493
62338
  this.noCheckmark = false;
62494
- this.disabled = false;
62495
- this.noMatch = false;
62339
+ // Currently active option
62340
+ this.optionActive = undefined;
62341
+ // Loading state
62342
+ this.loading = false;
62343
+ // Multi-select mode
62344
+ this.multiSelect = false;
62345
+ // Allow deselecting of menu options
62346
+ this.allowDeselect = false;
62347
+ // Select all matching options when setting value in multi-select mode
62348
+ this.selectAllMatchingOptions = false;
62349
+
62350
+ // Event Bindings
62496
62351
 
62497
62352
  /**
62498
62353
  * @private
62499
62354
  */
62500
- this.runtimeUtils = new AuroLibraryRuntimeUtils$4();
62355
+ this.handleSlotChange = this.handleSlotChange.bind(this);
62501
62356
 
62502
- // Initialize context-related properties
62503
- this.menuService = null;
62504
- this.unsubscribe = null;
62357
+ // Instance properties (non-reactive)
62505
62358
 
62506
62359
  /**
62507
62360
  * @private
62508
62361
  */
62509
- this.handleMenuChange = this.handleMenuChange.bind(this);
62362
+ Object.assign(this, {
62363
+ // Root-level menu (true) or a nested submenu (false)
62364
+ rootMenu: true,
62365
+ // Currently focused/active menu item index
62366
+ _index: -1,
62367
+ // Nested menu spacer
62368
+ nestingSpacer: '<span class="nestingSpacer"></span>',
62369
+ // Loading indicator for slot elements
62370
+ loadingSlots: null,
62371
+ });
62510
62372
  }
62511
62373
 
62512
62374
  static get properties() {
@@ -62514,7 +62376,15 @@ class AuroMenuOption extends AuroElement$2 {
62514
62376
  ...super.properties,
62515
62377
 
62516
62378
  /**
62517
- * When true, disables the menu option.
62379
+ * Allows deselecting an already selected option when clicked again in single-select mode.
62380
+ */
62381
+ allowDeselect: {
62382
+ type: Boolean,
62383
+ reflect: true,
62384
+ },
62385
+
62386
+ /**
62387
+ * When true, the entire menu and all options are disabled.
62518
62388
  */
62519
62389
  disabled: {
62520
62390
  type: Boolean,
@@ -62522,11 +62392,10 @@ class AuroMenuOption extends AuroElement$2 {
62522
62392
  },
62523
62393
 
62524
62394
  /**
62525
- * @private
62395
+ * Indicates whether the menu has a loadingIcon or loadingText to render when in a loading state.
62526
62396
  */
62527
- event: {
62528
- type: String,
62529
- reflect: true
62397
+ hasLoadingPlaceholder: {
62398
+ type: Boolean
62530
62399
  },
62531
62400
 
62532
62401
  /**
@@ -62537,394 +62406,528 @@ class AuroMenuOption extends AuroElement$2 {
62537
62406
  },
62538
62407
 
62539
62408
  /**
62540
- * Allows users to set a unique key for the menu option for specified option selection. If no key is provided, the value property will be used.
62409
+ * Indent level for submenus.
62410
+ * @private
62541
62411
  */
62542
- key: {
62543
- type: String,
62544
- reflect: true
62412
+ level: {
62413
+ type: Number,
62414
+ reflect: false,
62415
+ attribute: false
62545
62416
  },
62546
62417
 
62547
62418
  /**
62548
- * @private
62419
+ * When true, displays a loading state using the loadingIcon and loadingText slots if provided.
62549
62420
  */
62550
- menuService: {
62551
- type: Object,
62552
- state: true
62421
+ loading: {
62422
+ type: Boolean,
62423
+ reflect: true
62553
62424
  },
62554
62425
 
62555
62426
  /**
62556
- * @private
62427
+ * Specifies a string used to highlight matched string parts in options.
62557
62428
  */
62558
62429
  matchWord: {
62559
62430
  type: String,
62560
- state: true
62431
+ attribute: 'matchword'
62561
62432
  },
62562
62433
 
62563
62434
  /**
62564
- * @private
62435
+ * When true, the selected option can be multiple options.
62565
62436
  */
62566
- noCheckmark: {
62437
+ multiSelect: {
62567
62438
  type: Boolean,
62568
- reflect: true
62439
+ reflect: true,
62440
+ attribute: 'multiselect'
62569
62441
  },
62570
62442
 
62571
62443
  /**
62572
- * When true, marks this option as the "no matching results" placeholder shown by combobox when the user's input does not match any available options. Enables distinct styling and prevents the option from being treated as a selectable match.
62444
+ * When true, selected option will not show the checkmark.
62573
62445
  */
62574
- noMatch: {
62446
+ noCheckmark: {
62575
62447
  type: Boolean,
62576
62448
  reflect: true,
62577
- attribute: 'nomatch'
62449
+ attribute: 'nocheckmark'
62578
62450
  },
62579
62451
 
62580
62452
  /**
62581
- * Specifies that an option is selected.
62453
+ * Specifies the current active menuOption.
62582
62454
  */
62583
- selected: {
62584
- type: Boolean,
62585
- reflect: true
62455
+ optionActive: {
62456
+ type: Object,
62457
+ attribute: 'optionactive'
62586
62458
  },
62587
62459
 
62588
62460
  /**
62589
- * Specifies the tab index of the menu option.
62461
+ * An array of currently selected menu options, type `HTMLElement` by default. In multi-select mode, `optionSelected` is an array of HTML elements.
62590
62462
  */
62591
- tabIndex: {
62592
- type: Number,
62463
+ optionSelected: {
62464
+ // Allow HTMLElement, HTMLElement[] arrays and undefined
62465
+ type: Object
62466
+ },
62467
+
62468
+ /**
62469
+ * Available menu options.
62470
+ * @readonly
62471
+ */
62472
+ options: {
62473
+ type: Array,
62474
+ reflect: false,
62475
+ attribute: false
62476
+ },
62477
+
62478
+ /**
62479
+ * Sets the size of the menu.
62480
+ * @type {'sm' | 'md'}
62481
+ * @default 'sm'
62482
+ */
62483
+ size: {
62484
+ type: String,
62593
62485
  reflect: true
62594
62486
  },
62595
62487
 
62596
62488
  /**
62597
- * Specifies the value to be sent to a server.
62489
+ * When true, selects all options that match the provided value/key when setting value and multiselect is enabled.
62598
62490
  */
62599
- value: {
62491
+ selectAllMatchingOptions: {
62492
+ type: Boolean,
62493
+ reflect: true,
62494
+ },
62495
+
62496
+ /**
62497
+ * Sets the shape of the menu.
62498
+ * @type {'box' | 'round'}
62499
+ * @default 'box'
62500
+ */
62501
+ shape: {
62600
62502
  type: String,
62601
62503
  reflect: true
62602
62504
  },
62505
+
62506
+ /**
62507
+ * The value of the selected option. In multi-select mode, this is a JSON stringified array of selected option values.
62508
+ */
62509
+ value: {
62510
+ type: String,
62511
+ reflect: true,
62512
+ attribute: 'value'
62513
+ }
62603
62514
  };
62604
62515
  }
62605
62516
 
62606
62517
  static get styles() {
62607
62518
  return [
62608
- styleCss$4,
62609
- colorCss$4,
62519
+ styleCss$1$2,
62520
+ colorCss$1$2,
62610
62521
  tokensCss$4
62611
62522
  ];
62612
62523
  }
62613
62524
 
62614
- connectedCallback() {
62615
- super.connectedCallback();
62616
-
62617
- // Add the tag name as an attribute if it is different than the component name
62618
- // Add this step soon as this node gets attached to the DOM to avoid racing condition with menu's value setting logic.
62619
- this.runtimeUtils.handleComponentTagRename(this, 'auro-menuoption');
62525
+ /**
62526
+ * @readonly
62527
+ * @returns {string} - Returns the label of the currently selected option(s).
62528
+ */
62529
+ get currentLabel() {
62530
+ return this.menuService.currentLabel;
62531
+ };
62532
+
62533
+ /**
62534
+ * @readonly
62535
+ * @returns {Array<HTMLElement>} - Returns the array of available menu options.
62536
+ * @deprecated Use `options` property instead.
62537
+ */
62538
+ get items() {
62539
+ return this.options;
62540
+ }
62541
+
62542
+ /**
62543
+ * @returns {number} - Returns the index of the currently active option.
62544
+ */
62545
+ get index() {
62546
+ return this._index;
62547
+ }
62548
+
62549
+ /**
62550
+ * @param {number} value - Sets the index of the currently active option.
62551
+ */
62552
+ set index(value) {
62553
+ this.menuService.setHighlightedIndex(value);
62554
+ }
62555
+
62556
+ /**
62557
+ * This will register this element with the browser.
62558
+ * @param {string} [name="auro-menu"] - The name of the element that you want to register.
62559
+ *
62560
+ * @example
62561
+ * AuroMenu.register("custom-menu") // this will register this element to <custom-menu/>
62562
+ *
62563
+ */
62564
+ static register(name = "auro-menu") {
62565
+ AuroLibraryRuntimeUtils$4.prototype.registerComponent(name, AuroMenu);
62566
+ }
62567
+
62568
+ /**
62569
+ * Formatted value based on `multiSelect` state.
62570
+ * Default type is `String`, changing to `Array<String>` when `multiSelect` is true.
62571
+ * @private
62572
+ * @returns {String|Array<String>}
62573
+ */
62574
+ get formattedValue() {
62575
+ return this.menuService.currentValue;
62576
+ }
62577
+
62578
+ /**
62579
+ * Gets the current property values for the menu service.
62580
+ * @private
62581
+ * @returns {Object}
62582
+ */
62583
+ get propertyValues() {
62584
+ return {
62585
+ size: this.size,
62586
+ shape: this.shape,
62587
+ noCheckmark: this.nocheckmark,
62588
+ disabled: this.disabled
62589
+ };
62590
+ }
62591
+
62592
+ /**
62593
+ * Provides the menu context to child components.
62594
+ * Initializes the MenuService and subscribes to menu changes.
62595
+ * @protected
62596
+ */
62597
+ provideContext() {
62598
+ if (this.parentElement && this.parentElement.closest('auro-menu, [auro-menu]')) {
62599
+ this.rootMenu = false;
62600
+ this.menuService = this.parentElement.menuService;
62601
+ this._contextProvider = this.parentElement._contextProvider;
62602
+ return;
62603
+ }
62620
62604
 
62621
- // Set up context consumption in connectedCallback
62622
- this._contextConsumer = new s$1(this, {
62605
+ this.menuService = new MenuService({host: this});
62606
+ this.menuService.setProperties(this.propertyValues);
62607
+ this.menuService.subscribe(this.handleMenuChange.bind(this));
62608
+ this._contextProvider = new i(this, {
62623
62609
  context: MenuContext,
62624
- callback: this.attachTo.bind(this),
62625
- subscribe: true
62610
+ initialValue: this.menuService
62626
62611
  });
62612
+ }
62627
62613
 
62628
- // Establish the key property as early as possible.
62629
- // When a framework (e.g. Svelte) inserts the element into the DOM before
62630
- // setting its `value` property, both `getAttribute('value')` and
62631
- // `getAttribute('key')` return null here. Setting `this.key = null`
62632
- // would block the fallback in `updated()` that assigns key from the
62633
- // value property (the guard checked `=== undefined`). Only assign key
62634
- // if at least one source attribute is actually present so that the
62635
- // `updated()` fallback can run when the value property arrives later.
62636
- const valueAttr = this.getAttribute('value');
62637
- const keyAttr = this.getAttribute('key');
62638
- const resolvedKey = keyAttr !== null ? keyAttr : valueAttr;
62639
- if (resolvedKey !== null) {
62640
- this.key = resolvedKey;
62641
- }
62614
+ /**
62615
+ * Updates the currently active option in the menu.
62616
+ * @param {HTMLElement} option - The option to set as active.
62617
+ */
62618
+ updateActiveOption(option) {
62619
+ this.menuService.setHighlightedOption(option);
62642
62620
  }
62643
62621
 
62644
- firstUpdated() {
62645
- // Add the tag name as an attribute if it is different than the component name
62646
- this.runtimeUtils.handleComponentTagRename(this, 'auro-menuoption');
62622
+ /**
62623
+ * Sets the internal value and manages update state.
62624
+ * @param {String|Array<String>} value - The value to set.
62625
+ * @protected
62626
+ */
62627
+ setInternalValue(value) {
62628
+ if (this.value !== value) {
62629
+ this.internalUpdateInProgress = true;
62630
+ this.value = value;
62647
62631
 
62648
- // Generate unique ID if not already set (required for aria-activedescendant)
62649
- if (!this.id) {
62650
- menuOptionIdCounter += 1;
62651
- this.id = `menuoption-${menuOptionIdCounter}`;
62632
+ setTimeout(() => {
62633
+ this.internalUpdateInProgress = false;
62634
+ });
62652
62635
  }
62653
-
62654
- this.setAttribute('role', 'option');
62655
- this.setAttribute('aria-selected', 'false');
62656
-
62657
- this.addEventListener('mouseover', () => {
62658
- this.dispatchEvent(new CustomEvent('auroMenuOption-mouseover', {
62659
- bubbles: true,
62660
- cancelable: false,
62661
- composed: true,
62662
- detail: this
62663
- }));
62664
- });
62665
62636
  }
62666
62637
 
62667
- updated(changedProperties) {
62668
- super.updated(changedProperties);
62669
-
62670
- // Update aria-selected attribute if selected changed
62671
- if (changedProperties.has('selected')) {
62672
-
62673
- // Update aria-selected attribute
62674
- this.setAttribute('aria-selected', this.selected.toString());
62638
+ /**
62639
+ * Handles changes from the menu service and updates component state.
62640
+ * @param {Object} event - The event object from the menu service.
62641
+ * @protected
62642
+ */
62643
+ handleMenuChange(event) {
62644
+ if (event.type === 'valueChange') {
62675
62645
 
62676
- // Update menu service selection state if this isn't an internal update
62677
- if (this.internalUpdateInProgress !== true) {
62678
- this.menuService[this.selected ? 'selectOption' : 'deselectOption'](this);
62679
- }
62680
- }
62646
+ // New option is array value or first option with fallback to undefined for empty array in all cases
62647
+ const newOption = this.multiSelect && event.options.length ? event.options : event.options[0] || undefined;
62648
+ const newValue = event.stringValue;
62681
62649
 
62682
- if (changedProperties.has('disabled')) {
62683
- if (this.disabled) {
62684
- this.setAttribute('aria-disabled', 'true');
62685
- } else {
62686
- this.removeAttribute('aria-disabled');
62650
+ // Check if the option or value has actually changed
62651
+ if (this.optionSelected !== newOption || this.stringValue !== newValue) {
62652
+ this.optionSelected = newOption;
62653
+ this.setInternalValue(newValue);
62687
62654
  }
62688
- }
62689
-
62690
- if (changedProperties.has('active')) {
62691
- this.updateActiveClasses();
62692
- }
62693
62655
 
62694
- // Update text highlight if matchWord changed
62695
- if (changedProperties.has('matchWord')) {
62696
- this.updateTextHighlight();
62656
+ // Notify components of selection change
62657
+ this.notifySelectionChange(event);
62697
62658
  }
62698
62659
 
62699
- // Set the key to be the passed value if no key is provided.
62700
- // Loose equality (== null) is intentional: it catches both null AND
62701
- // undefined. When a framework (e.g. Svelte, React) inserts the element
62702
- // before setting its value property, connectedCallback skips key
62703
- // assignment because both attributes are null at that point. The Lit
62704
- // property default for `key` is undefined (not null), so strict
62705
- // === null would miss the case and the fallback would never run.
62706
- if (changedProperties.has('value') && this.key == null) { // eslint-disable-line eqeqeq, no-eq-null
62707
- this.key = this.value;
62660
+ if (event.type === 'highlightChange') {
62661
+ this.optionActive = event.option;
62662
+ this._index = event.index;
62708
62663
  }
62709
- }
62710
62664
 
62711
- disconnectedCallback() {
62712
- if (this.menuService) {
62713
- this.menuService.unsubscribe(this.handleMenuChange);
62714
- this.menuService.removeMenuOption(this);
62665
+ if (event.type === 'optionsChange') {
62666
+ this.options = event.options;
62667
+ this.dispatchEvent(new CustomEvent('auroMenu-optionsChange', {
62668
+ detail: {
62669
+ options: event.options
62670
+ }
62671
+ }));
62715
62672
  }
62716
62673
  }
62717
62674
 
62718
62675
  /**
62719
- * Sets up event listeners for user interaction with the menu option.
62720
- * This function enables click and mouse enter events to trigger selection and highlighting logic.
62676
+ * Gets the currently selected options.
62677
+ * @returns {Array<HTMLElement>}
62721
62678
  */
62722
- bindEvents() {
62723
- this.addEventListener('click', this.handleClick.bind(this));
62724
- this.addEventListener('mouseenter', this.handleMouseEnter.bind(this));
62679
+ get selectedOptions() {
62680
+ return this.menuService ? this.menuService.selectedOptions : [];
62725
62681
  }
62726
62682
 
62727
62683
  /**
62728
- * Attaches this menu option to a menu service and subscribes to its events.
62729
- * This method enables the option to participate in menu selection and highlighting logic.
62730
- * @param {Object} service - The menu service instance to attach to.
62684
+ * Gets the first selected option, or null if none.
62685
+ * @returns {HTMLElement|null}
62731
62686
  */
62732
- attachTo(service) {
62733
- if (!service) {
62734
- return;
62735
- }
62736
- this.menuService = service;
62737
- this.menuService.addMenuOption(this);
62738
- this.menuService.subscribe(this.handleMenuChange);
62687
+ get selectedOption() {
62688
+ return this.menuService ? this.menuService.selectedOptions[0] : null;
62739
62689
  }
62740
62690
 
62741
- /**
62742
- * Handles changes from the menu service and updates the option's state.
62743
- * This function synchronizes the option's properties and selection/highlight state with menu events.
62744
- * @param {Object} event - The event object from the menu service.
62745
- */
62746
- handleMenuChange(event) {
62691
+ // Lifecycle Methods
62747
62692
 
62748
- // Ignore events without a type or property
62749
- if (!event || (!event.type && !event.property)) {
62750
- return;
62751
- }
62693
+ connectedCallback() {
62694
+ super.connectedCallback();
62752
62695
 
62753
- // Update reactive properties based on event type
62754
- if (event.property && Object.keys(AuroMenuOption.properties).includes(event.property)) {
62755
- this[event.property] = event.value;
62696
+ this.provideContext();
62697
+
62698
+ // this.addEventListener('keydown', this.handleKeyDown);
62699
+ this.addEventListener('auroMenuOption-click', this.handleMouseSelect);
62700
+ this.addEventListener('auroMenuOption-mouseover', this.handleOptionHover);
62701
+ this.addEventListener('slotchange', this.handleSlotChange);
62702
+ this.setTagAttribute("auro-menu");
62703
+ }
62704
+
62705
+ disconnectedCallback() {
62706
+ // this.removeEventListener('keydown', this.handleKeyDown);
62707
+ this.removeEventListener('auroMenuOption-click', this.handleMouseSelect);
62708
+ this.removeEventListener('auroMenuOption-mouseover', this.handleOptionHover);
62709
+ this.removeEventListener('slotchange', this.handleSlotChange);
62710
+
62711
+ super.disconnectedCallback();
62712
+ }
62713
+
62714
+ firstUpdated() {
62715
+ AuroLibraryRuntimeUtils$4.prototype.handleComponentTagRename(this, 'auro-menu');
62716
+
62717
+ this.loadingSlots = this.querySelectorAll("[slot='loadingText'], [slot='loadingIcon']");
62718
+ this.initializeMenu();
62719
+ }
62720
+
62721
+
62722
+ updated(changedProperties) {
62723
+ super.updated(changedProperties);
62724
+
62725
+ // Apply value selection synchronously so that static-HTML fixtures
62726
+ // resolve within a single update cycle. The refactored selectByValue
62727
+ // no longer calls reset() first, so the destructive intermediate-event
62728
+ // cascade that originally required deferral is eliminated. If option
62729
+ // keys are not yet resolved (framework mount-order race), selectByValue
62730
+ // queues a bounded retry automatically via queuePendingValue.
62731
+ if (changedProperties.has('value') && !this.internalUpdateInProgress) {
62732
+ this.menuService.selectByValue(this.value);
62756
62733
  }
62757
62734
 
62758
- // Handle highlight changes
62759
- if (event.type === 'highlightChange') {
62760
- const isActive = event.option === this;
62761
- this.active = isActive;
62762
- this.updateActiveClasses();
62735
+ // Handle loading state changes
62736
+ if (changedProperties.has('loading')) {
62737
+ this.setLoadingState(this.loading);
62763
62738
  }
62764
62739
 
62765
- if (event.type === 'stateChange') {
62766
- const isSelected = event.selectedOptions.includes(this);
62767
- this.setInternalSelected(isSelected);
62740
+ if (changedProperties.has('multiSelect') && this.rootMenu) {
62741
+ if (this.multiSelect) {
62742
+ this.setAttribute('aria-multiselectable', 'true');
62743
+ } else {
62744
+ this.removeAttribute('aria-multiselectable');
62745
+ }
62768
62746
  }
62769
62747
  }
62770
62748
 
62771
62749
  /**
62772
- * Updates the internal selected state of the menu option bypassing 'updated' and triggers custom events if selected.
62773
- * This function ensures the option's selection state is synchronized with menu logic and notifies listeners.
62774
- * @param {boolean} isSelected - Whether the option should be marked as selected.
62750
+ * Sets an attribute that matches the default tag name if the tag name is not the default.
62751
+ * @param {string} tagName - The tag name to set as an attribute.
62752
+ * @private
62775
62753
  */
62776
- setInternalSelected(isSelected) {
62777
- this.internalUpdateInProgress = true;
62778
- this.selected = isSelected;
62779
-
62780
- // Fire custom event if selected
62781
- if (isSelected) {
62782
- this.handleCustomEvent();
62754
+ setTagAttribute(tagName) {
62755
+ if (this.tagName.toLowerCase() !== tagName) {
62756
+ this.setAttribute(tagName, true);
62783
62757
  }
62784
-
62785
- setTimeout(() => {
62786
- this.internalUpdateInProgress = false;
62787
- }, 0);
62788
62758
  }
62789
62759
 
62790
62760
  /**
62791
- * Sets the selected state of the menu option.
62792
- * This function updates whether the option is currently selected.
62793
- * @param {boolean} isSelected - Whether the option should be marked as selected.
62794
- * @deprecated Simply modify the `selected` property directly instead.
62761
+ * Sets the loading state and dispatches a loading change event.
62762
+ * @param {boolean} isLoading - Whether the menu is loading.
62763
+ * @protected
62795
62764
  */
62796
- setSelected(isSelected) {
62797
- this.selected = isSelected;
62765
+ setLoadingState(isLoading) {
62766
+ this.setAttribute("aria-busy", isLoading);
62767
+ dispatchMenuEvent(this, "auroMenu-loadingChange", {
62768
+ loading: isLoading,
62769
+ hasLoadingPlaceholder: this.hasLoadingPlaceholder
62770
+ });
62798
62771
  }
62799
62772
 
62773
+ // Init Methods
62774
+
62800
62775
  /**
62801
- * Updates the active state and visual highlighting of the menu option.
62802
- * This function toggles the option's active status and applies or removes the active CSS class.
62803
- * @param {boolean} isActive - Whether the option should be marked as active.
62804
- * @deprecated Simply modify the `active` property directly instead.
62776
+ * Initializes the menu's state and structure.
62777
+ * @private
62805
62778
  */
62806
- updateActive(isActive) {
62779
+ initializeMenu() {
62780
+ if (this.rootMenu) {
62781
+ this.setAttribute('role', 'listbox');
62782
+ this.setAttribute('root', '');
62807
62783
 
62808
- // Set active state
62809
- this.active = isActive;
62810
- this.updateActiveClasses();
62784
+ if (this.multiSelect) {
62785
+ this.setAttribute('aria-multiselectable', 'true');
62786
+ }
62787
+ }
62788
+
62789
+ this.handleNestedMenus(this);
62811
62790
  }
62812
62791
 
62813
62792
  /**
62814
- * Updates the CSS class for the menu option based on its active state.
62815
- * This function adds or removes the 'active' class to visually indicate the option's active status.
62816
- * @private
62793
+ * Selects the currently highlighted option.
62794
+ * @protected
62817
62795
  */
62818
- updateActiveClasses() {
62819
- // Update class based on active state
62820
- if (this.active) this.classList.add('active');
62821
- else this.classList.remove('active');
62796
+ makeSelection() {
62797
+ this.menuService.selectHighlightedOption();
62822
62798
  }
62823
62799
 
62824
-
62825
62800
  /**
62826
- * Updates the visual highlighting of text within the menu option based on the current match word.
62827
- * This function highlights matching text segments and manages nested spacers for display formatting.
62801
+ * Resets all options to their default state.
62828
62802
  * @private
62829
62803
  */
62830
- updateTextHighlight() {
62831
-
62832
- // Regex for matchWord if needed
62833
- let regexWord = null;
62834
-
62835
- if (this.matchWord && this.matchWord.length) {
62836
- const escapedWord = this.matchWord.replace(/[.*+?^${}()|[\]\\]/gu, '\\$&');
62837
- regexWord = new RegExp(escapedWord, 'giu');
62838
- }
62804
+ clearSelection() {
62805
+ this.optionSelected = undefined;
62806
+ this.value = undefined;
62807
+ this._index = -1;
62808
+ }
62839
62809
 
62840
- // Update text highlighting if matchWord changed
62841
- if (regexWord &&
62842
- this.isActive && !this.hasAttribute('persistent')) {
62843
- const nested = this.querySelectorAll('.nestingSpacer');
62810
+ /**
62811
+ * Resets the menu to its initial state.
62812
+ * This is the only way to return value to undefined.
62813
+ * @public
62814
+ */
62815
+ reset() {
62816
+ this.menuService.reset();
62844
62817
 
62845
- const displayValueEl = this.querySelector('[slot="displayValue"]');
62846
- if (displayValueEl) {
62847
- this.removeChild(displayValueEl);
62848
- }
62818
+ // Dispatch reset event
62819
+ dispatchMenuEvent(this, 'auroMenu-selectValueReset');
62820
+ }
62849
62821
 
62850
- // Create nested spacers
62851
- const nestingSpacerBundle = [...nested].map(() => this.nestingSpacer).join('');
62822
+ /**
62823
+ * Handles nested menu structure.
62824
+ * @private
62825
+ * @param {HTMLElement} menu - Root menu element.
62826
+ */
62827
+ handleNestedMenus(menu) {
62828
+ menu.level = menu.parentElement.level >= 0 ? menu.parentElement.level + 1 : 0;
62852
62829
 
62853
- // Update with spacers and matchWord
62854
- this.innerHTML = nestingSpacerBundle +
62855
- this.textContent.replace(
62856
- regexWord,
62857
- (match) => `<strong>${match}</strong>`
62858
- );
62859
- if (displayValueEl) {
62860
- this.append(displayValueEl);
62830
+ if (menu.level > 0) {
62831
+ menu.setAttribute('role', 'group');
62832
+ menu.removeAttribute("root");
62833
+ if (!menu.hasAttribute('aria-label')) {
62834
+ menu.setAttribute('aria-label', 'submenu');
62861
62835
  }
62862
62836
  }
62837
+
62838
+ const options = menu.querySelectorAll(':scope > auro-menuoption, :scope > [auro-menuoption]');
62839
+ options.forEach((option) => {
62840
+ const regex = new RegExp(this.nestingSpacer, "gu");
62841
+ option.innerHTML = this.nestingSpacer.repeat(menu.level) + option.innerHTML.replace(regex, '');
62842
+ });
62863
62843
  }
62864
62844
 
62865
62845
  /**
62866
- * Handles click events on the menu option, toggling its selected state.
62867
- * This function dispatches a click event and updates selection if the option is not disabled.
62868
- * @private
62846
+ * Navigates the menu options in the specified direction.
62847
+ * @param {'up'|'down'} direction - The direction to navigate.
62848
+ * @protected
62869
62849
  */
62870
- handleClick() {
62871
- if (!this.disabled) {
62872
- this.dispatchClickEvent();
62873
- this.selected = !this.selected;
62850
+ navigateOptions(direction) {
62851
+ if (direction === 'up') {
62852
+ this.menuService.highlightPrevious();
62853
+ } else if (direction === 'down') {
62854
+ this.menuService.highlightNext();
62874
62855
  }
62875
62856
  }
62876
62857
 
62877
62858
  /**
62878
- * Handles mouse enter events to highlight the menu option.
62879
- * This function updates the menu service to set this option as the currently highlighted item if not disabled.
62859
+ * Handles slot change events.
62880
62860
  * @private
62881
62861
  */
62882
- handleMouseEnter() {
62883
- if (!this.disabled) {
62884
- this.menuService.setHighlightedOption(this);
62862
+ handleSlotChange() {
62863
+ if (this.rootMenu) {
62864
+ this.initializeMenu();
62885
62865
  }
62886
62866
  }
62887
62867
 
62888
62868
  /**
62889
- * Dispatches custom events defined for this menu option.
62890
- * This function notifies listeners when a custom event is triggered by the option.
62869
+ * Handles custom events defined on options.
62891
62870
  * @private
62871
+ * @param {HTMLElement} option - Option with custom event.
62892
62872
  */
62893
- handleCustomEvent() {
62894
- if (this.event) {
62895
- dispatchMenuEvent(this, this.event, { option: this });
62896
- dispatchMenuEvent(this, 'auroMenu-customEventFired', { option: this });
62897
- }
62873
+ handleCustomEvent(option) {
62874
+ const eventName = option.getAttribute('event');
62875
+ dispatchMenuEvent(this, eventName);
62876
+ dispatchMenuEvent(this, 'auroMenu-customEventFired');
62898
62877
  }
62899
62878
 
62900
62879
  /**
62901
- * Dispatches a click event for this menu option.
62902
- * This function notifies listeners that the option has been clicked.
62880
+ * Notifies selection change to parent components.
62881
+ * @param {any} source - The source that triggers this event.
62903
62882
  * @private
62904
62883
  */
62905
- dispatchClickEvent() {
62906
- this.dispatchEvent(new CustomEvent('auroMenuOption-click', {
62907
- bubbles: true,
62908
- cancelable: false,
62909
- composed: true,
62910
- detail: this
62911
- }));
62884
+ notifySelectionChange({value, stringValue, keys, options, reason} = {}) {
62885
+ dispatchMenuEvent(this, 'auroMenu-selectedOption', {
62886
+ value,
62887
+ stringValue,
62888
+ keys,
62889
+ options,
62890
+ reason
62891
+ });
62912
62892
  }
62913
62893
 
62914
62894
  /**
62915
- * Generates an HTML element containing an SVG icon based on the provided `svgContent`.
62916
- *
62895
+ * Checks if an option is currently selected.
62917
62896
  * @private
62918
- * @param {string} svgContent - The SVG content to be embedded.
62919
- * @returns {Element} The HTML element containing the SVG icon.
62897
+ * @param {HTMLElement} option - The option to check.
62898
+ * @returns {boolean}
62920
62899
  */
62921
- generateIconHtml(svgContent) {
62922
- const dom = new DOMParser().parseFromString(svgContent, 'text/html');
62923
- const svg = dom.body.firstChild;
62900
+ isOptionSelected(option) {
62901
+ if (!this.optionSelected) {
62902
+ return false;
62903
+ }
62924
62904
 
62925
- svg.setAttribute('slot', 'svg');
62905
+ if (this.multiSelect) {
62906
+ // In multi-select mode, check if the option is in the selected array
62907
+ return Array.isArray(this.optionSelected) && this.optionSelected.some((selectedOption) => selectedOption === option);
62908
+ }
62926
62909
 
62927
- return u$c`<${this.iconTag} customColor customSvg>${svg}</${this.iconTag}>`;
62910
+ return this.optionSelected === option;
62911
+ }
62912
+
62913
+ /**
62914
+ * Getter for loading placeholder state.
62915
+ * @returns {boolean} - True if loading slots are present and non-empty.
62916
+ */
62917
+ get hasLoadingPlaceholder() {
62918
+ return this.loadingSlots && this.loadingSlots.length > 0;
62919
+ }
62920
+
62921
+ /**
62922
+ * Getter for wrapper classes based on size.
62923
+ * @returns {Object} - Class map for the wrapper element.
62924
+ * @private
62925
+ */
62926
+ get wrapperClasses() {
62927
+ return e$3({
62928
+ 'menuWrapper': true,
62929
+ [this.size]: true,
62930
+ });
62928
62931
  }
62929
62932
 
62930
62933
  /**
@@ -62933,26 +62936,26 @@ class AuroMenuOption extends AuroElement$2 {
62933
62936
  * @returns {void}
62934
62937
  */
62935
62938
  renderLayout() {
62939
+ if (this.loading) {
62940
+ return b$7`
62941
+ <div class="${this.wrapperClasses}">
62942
+ <auro-menuoption
62943
+ disabled
62944
+ loadingplaceholder
62945
+ class="${this.hasLoadingPlaceholder ? "" : "empty"}"
62946
+ >
62947
+ <div>
62948
+ <slot name="loadingIcon" class="body-lg"></slot>
62949
+ <slot name="loadingText"></slot>
62950
+ </div>
62951
+ </auro-menuoption>
62952
+ </div>
62953
+ `;
62954
+ }
62936
62955
 
62937
- const fontClassMap = {
62938
- xs: 'body-sm',
62939
- sm: 'body-default',
62940
- md: 'body-default',
62941
- lg: 'body-lg',
62942
- xl: 'body-lg'
62943
- };
62944
-
62945
- const classes = e$3({
62946
- 'wrapper': true,
62947
- [this.size ? fontClassMap[this.size] : 'body-sm']: true,
62948
- });
62949
-
62950
- return u$c`
62951
- <div class="${classes}">
62952
- ${this.selected && !this.noCheckmark
62953
- ? this.generateIconHtml(checkmarkIcon.svg)
62954
- : undefined}
62955
- <slot></slot>
62956
+ return b$7`
62957
+ <div class="${this.wrapperClasses}">
62958
+ <slot @slotchange=${this.handleSlotChange}></slot>
62956
62959
  </div>
62957
62960
  `;
62958
62961
  }
@@ -68079,7 +68082,7 @@ let AuroHelpText$1 = class AuroHelpText extends i$4 {
68079
68082
  }
68080
68083
  };
68081
68084
 
68082
- var formkitVersion$1 = '202604242248';
68085
+ var formkitVersion$1 = '202605011613';
68083
68086
 
68084
68087
  class AuroElement extends i$4 {
68085
68088
  static get properties() {
@@ -69832,7 +69835,7 @@ class AuroHelpText extends i$4 {
69832
69835
  }
69833
69836
  }
69834
69837
 
69835
- var formkitVersion = '202604242248';
69838
+ var formkitVersion = '202605011613';
69836
69839
 
69837
69840
  var styleCss = i$7`.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}.body-default{font-size:var(--wcss-body-default-font-size, 1rem);line-height:var(--wcss-body-default-line-height, 1.5rem)}.body-default,.body-lg{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-lg{font-size:var(--wcss-body-lg-font-size, 1.125rem);line-height:var(--wcss-body-lg-line-height, 1.625rem)}.body-sm{font-size:var(--wcss-body-sm-font-size, 0.875rem);line-height:var(--wcss-body-sm-line-height, 1.25rem)}.body-sm,.body-xs{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-xs{font-size:var(--wcss-body-xs-font-size, 0.75rem);line-height:var(--wcss-body-xs-line-height, 1rem)}.body-2xs{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-size:var(--wcss-body-2xs-font-size, 0.625rem);font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0);line-height:var(--wcss-body-2xs-line-height, 0.875rem)}.display-2xl{font-family:var(--wcss-display-2xl-family, "AS Circular"),var(--wcss-display-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-2xl-font-size, clamp(3.5rem, 6vw, 5.375rem));font-weight:var(--wcss-display-2xl-weight, 300);letter-spacing:var(--wcss-display-2xl-letter-spacing, 0);line-height:var(--wcss-display-2xl-line-height, 1.3)}.display-xl{font-family:var(--wcss-display-xl-family, "AS Circular"),var(--wcss-display-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xl-font-size, clamp(3rem, 5.3333333333vw, 4.5rem));font-weight:var(--wcss-display-xl-weight, 300);letter-spacing:var(--wcss-display-xl-letter-spacing, 0);line-height:var(--wcss-display-xl-line-height, 1.3)}.display-lg{font-family:var(--wcss-display-lg-family, "AS Circular"),var(--wcss-display-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-lg-font-size, clamp(2.75rem, 4.6666666667vw, 4rem));font-weight:var(--wcss-display-lg-weight, 300);letter-spacing:var(--wcss-display-lg-letter-spacing, 0);line-height:var(--wcss-display-lg-line-height, 1.3)}.display-md{font-family:var(--wcss-display-md-family, "AS Circular"),var(--wcss-display-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-md-font-size, clamp(2.5rem, 4vw, 3.5rem));font-weight:var(--wcss-display-md-weight, 300);letter-spacing:var(--wcss-display-md-letter-spacing, 0);line-height:var(--wcss-display-md-line-height, 1.3)}.display-sm{font-family:var(--wcss-display-sm-family, "AS Circular"),var(--wcss-display-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-sm-font-size, clamp(2rem, 3.6666666667vw, 3rem));font-weight:var(--wcss-display-sm-weight, 300);letter-spacing:var(--wcss-display-sm-letter-spacing, 0);line-height:var(--wcss-display-sm-line-height, 1.3)}.display-xs{font-family:var(--wcss-display-xs-family, "AS Circular"),var(--wcss-display-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xs-font-size, clamp(1.75rem, 3vw, 2.375rem));font-weight:var(--wcss-display-xs-weight, 300);letter-spacing:var(--wcss-display-xs-letter-spacing, 0);line-height:var(--wcss-display-xs-line-height, 1.3)}.heading-xl{font-family:var(--wcss-heading-xl-family, "AS Circular"),var(--wcss-heading-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xl-font-size, clamp(2rem, 3vw, 2.5rem));font-weight:var(--wcss-heading-xl-weight, 300);letter-spacing:var(--wcss-heading-xl-letter-spacing, 0);line-height:var(--wcss-heading-xl-line-height, 1.3)}.heading-lg{font-family:var(--wcss-heading-lg-family, "AS Circular"),var(--wcss-heading-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-lg-font-size, clamp(1.75rem, 2.6666666667vw, 2.25rem));font-weight:var(--wcss-heading-lg-weight, 300);letter-spacing:var(--wcss-heading-lg-letter-spacing, 0);line-height:var(--wcss-heading-lg-line-height, 1.3)}.heading-md{font-family:var(--wcss-heading-md-family, "AS Circular"),var(--wcss-heading-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-md-font-size, clamp(1.625rem, 2.3333333333vw, 1.75rem));font-weight:var(--wcss-heading-md-weight, 300);letter-spacing:var(--wcss-heading-md-letter-spacing, 0);line-height:var(--wcss-heading-md-line-height, 1.3)}.heading-sm{font-family:var(--wcss-heading-sm-family, "AS Circular"),var(--wcss-heading-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-sm-font-size, clamp(1.375rem, 2vw, 1.5rem));font-weight:var(--wcss-heading-sm-weight, 300);letter-spacing:var(--wcss-heading-sm-letter-spacing, 0);line-height:var(--wcss-heading-sm-line-height, 1.3)}.heading-xs{font-family:var(--wcss-heading-xs-family, "AS Circular"),var(--wcss-heading-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xs-font-size, clamp(1.25rem, 1.6666666667vw, 1.25rem));font-weight:var(--wcss-heading-xs-weight, 450);letter-spacing:var(--wcss-heading-xs-letter-spacing, 0);line-height:var(--wcss-heading-xs-line-height, 1.3)}.heading-2xs{font-family:var(--wcss-heading-2xs-family, "AS Circular"),var(--wcss-heading-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-2xs-font-size, clamp(1.125rem, 1.5vw, 1.125rem));font-weight:var(--wcss-heading-2xs-weight, 450);letter-spacing:var(--wcss-heading-2xs-letter-spacing, 0);line-height:var(--wcss-heading-2xs-line-height, 1.3)}.accent-2xl{font-family:var(--wcss-accent-2xl-family, "Good OT"),var(--wcss-accent-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xl-font-size, clamp(2rem, 3.1666666667vw, 2.375rem));font-weight:var(--wcss-accent-2xl-weight, 450);letter-spacing:var(--wcss-accent-2xl-letter-spacing, 0.05em);line-height:var(--wcss-accent-2xl-line-height, 1)}.accent-2xl,.accent-xl{text-transform:uppercase}.accent-xl{font-family:var(--wcss-accent-xl-family, "Good OT"),var(--wcss-accent-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xl-font-size, clamp(1.625rem, 2.3333333333vw, 2rem));font-weight:var(--wcss-accent-xl-weight, 450);letter-spacing:var(--wcss-accent-xl-letter-spacing, 0.05em);line-height:var(--wcss-accent-xl-line-height, 1.3)}.accent-lg{font-family:var(--wcss-accent-lg-family, "Good OT"),var(--wcss-accent-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-lg-font-size, clamp(1.5rem, 2.1666666667vw, 1.75rem));font-weight:var(--wcss-accent-lg-weight, 450);letter-spacing:var(--wcss-accent-lg-letter-spacing, 0.05em);line-height:var(--wcss-accent-lg-line-height, 1.3)}.accent-lg,.accent-md{text-transform:uppercase}.accent-md{font-family:var(--wcss-accent-md-family, "Good OT"),var(--wcss-accent-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-md-font-size, clamp(1.375rem, 1.8333333333vw, 1.5rem));font-weight:var(--wcss-accent-md-weight, 500);letter-spacing:var(--wcss-accent-md-letter-spacing, 0.05em);line-height:var(--wcss-accent-md-line-height, 1.3)}.accent-sm{font-family:var(--wcss-accent-sm-family, "Good OT"),var(--wcss-accent-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-sm-font-size, clamp(1.125rem, 1.5vw, 1.25rem));font-weight:var(--wcss-accent-sm-weight, 500);letter-spacing:var(--wcss-accent-sm-letter-spacing, 0.05em);line-height:var(--wcss-accent-sm-line-height, 1.3)}.accent-sm,.accent-xs{text-transform:uppercase}.accent-xs{font-family:var(--wcss-accent-xs-family, "Good OT"),var(--wcss-accent-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xs-font-size, clamp(1rem, 1.3333333333vw, 1rem));font-weight:var(--wcss-accent-xs-weight, 500);letter-spacing:var(--wcss-accent-xs-letter-spacing, 0.1em);line-height:var(--wcss-accent-xs-line-height, 1.3)}.accent-2xs{font-family:var(--wcss-accent-2xs-family, "Good OT"),var(--wcss-accent-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xs-font-size, clamp(0.875rem, 1.1666666667vw, 0.875rem));font-weight:var(--wcss-accent-2xs-weight, 450);letter-spacing:var(--wcss-accent-2xs-letter-spacing, 0.1em);line-height:var(--wcss-accent-2xs-line-height, 1.3);text-transform:uppercase}[auro-dropdown]{--ds-auro-dropdown-trigger-border-color: var(--ds-auro-select-border-color);--ds-auro-dropdown-trigger-background-color: var(--ds-auro-select-background-color);--ds-auro-dropdown-trigger-container-color: var(--ds-auro-select-background-color);--ds-auro-dropdown-trigger-outline-color: var(--ds-auro-select-outline-color)}:host{display:inline-block;text-align:left;vertical-align:top}:host([layout*=emphasized]) [auro-dropdown],:host([layout*=snowflake]) [auro-dropdown]{--ds-auro-select-border-color: transparent}:host([layout*=emphasized]) .mainContent,:host([layout*=snowflake]) .mainContent{text-align:center}.mainContent{position:relative;display:flex;overflow:hidden;flex:1;flex-direction:column;align-items:center;justify-content:center}.valueContainer [slot=displayValue]{display:none}.accents{display:flex;flex-direction:row;align-items:center;justify-content:center}::slotted([slot=typeIcon]){margin-right:var(--ds-size-100, 0.5rem)}.displayValue{display:block}.displayValue:not(.force){display:none}.displayValue:not(.force).hasContent:is(.withValue):not(.hasFocus){display:block}.triggerContent{display:flex;width:100%;align-items:center;justify-content:center}:host([layout*=emphasized]) .triggerContent{padding:0 var(--ds-size-100, 0.5rem) 0 var(--ds-size-300, 1.5rem)}:host([layout*=snowflake]) .triggerContent{padding:0 var(--ds-size-100, 0.5rem) 0 var(--ds-size-200, 1rem)}:host([layout*=snowflake]) label{padding-block:var(--ds-size-25, 0.125rem)}:host([layout*=classic]) .triggerContent{padding:0 var(--ds-size-100, 0.5rem)}:host([layout*=classic]) .mainContent{align-items:start}:host([layout*=classic]) label{overflow:hidden;cursor:text;text-overflow:ellipsis;white-space:nowrap}:host([layout*=classic]) .value{height:auto}label{color:var(--ds-auro-select-label-text-color)}:host(:is([validity]:not([validity=valid]))) [auro-dropdown]{--ds-auro-select-border-color: var(--ds-basic-color-status-error, #e31f26);--ds-auro-select-outline-color: var(--ds-basic-color-status-error, #e31f26);--ds-auro-dropdown-helptext-text-color: var(--ds-basic-color-texticon-default, #2a2a2a)}:host([ondark]:is([validity]:not([validity=valid]))) [auro-dropdown],:host([appearance=inverse]:is([validity]:not([validity=valid]))) [auro-dropdown]{--ds-auro-select-border-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8);--ds-auro-select-outline-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8);--ds-auro-dropdown-helptext-text-color: var(--ds-basic-color-texticon-inverse, #ffffff)}#slotHolder{display:none}:host([fluid]){width:100%}:host([disabled]){pointer-events:none;user-select:none}:host([disabled]:not([ondark])) [auro-dropdown],:host([disabled]:not([appearance=inverse])) [auro-dropdown]{--ds-auro-select-border-color: var(--ds-basic-color-border-subtle, #dddddd)}:host(:not([layout*=classic])[disabled][ondark]) [auro-dropdown],:host(:not([layout*=classic])[disabled][appearance=inverse]) [auro-dropdown]{--ds-auro-select-border-color: transparent}`;
69838
69841