@aurodesignsystem-dev/auro-formkit 0.0.0-pr624.8 → 0.0.0-pr624.80

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 (143) hide show
  1. package/components/bibtemplate/dist/auro-bibtemplate.d.ts +12 -2
  2. package/components/bibtemplate/dist/buttonVersion.d.ts +2 -0
  3. package/components/bibtemplate/dist/iconVersion.d.ts +1 -1
  4. package/components/bibtemplate/dist/index.js +1262 -81
  5. package/components/bibtemplate/dist/registered.js +1262 -81
  6. package/components/checkbox/README.md +1 -1
  7. package/components/checkbox/demo/api.html +16 -10
  8. package/components/checkbox/demo/api.md +49 -15
  9. package/components/checkbox/demo/api.min.js +73 -43
  10. package/components/checkbox/demo/index.html +16 -10
  11. package/components/checkbox/demo/index.md +2 -2
  12. package/components/checkbox/demo/index.min.js +73 -43
  13. package/components/checkbox/demo/readme.html +16 -9
  14. package/components/checkbox/demo/readme.md +1 -1
  15. package/components/checkbox/dist/auro-checkbox-group.d.ts +1 -1
  16. package/components/checkbox/dist/auro-checkbox.d.ts +3 -3
  17. package/components/checkbox/dist/index.js +72 -42
  18. package/components/checkbox/dist/registered.js +72 -42
  19. package/components/combobox/demo/api.html +16 -10
  20. package/components/combobox/demo/api.md +115 -8
  21. package/components/combobox/demo/api.min.js +3102 -921
  22. package/components/combobox/demo/index.html +16 -10
  23. package/components/combobox/demo/index.md +6 -30
  24. package/components/combobox/demo/index.min.js +3102 -921
  25. package/components/combobox/demo/readme.html +16 -9
  26. package/components/combobox/dist/auro-combobox.d.ts +44 -12
  27. package/components/combobox/dist/index.js +3080 -995
  28. package/components/combobox/dist/registered.js +3080 -995
  29. package/components/counter/demo/api.html +17 -10
  30. package/components/counter/demo/api.md +158 -21
  31. package/components/counter/demo/api.min.js +3416 -728
  32. package/components/counter/demo/index.html +17 -10
  33. package/components/counter/demo/index.md +185 -34
  34. package/components/counter/demo/index.min.js +3416 -728
  35. package/components/counter/demo/readme.html +16 -9
  36. package/components/counter/dist/auro-counter-button.d.ts +2 -0
  37. package/components/counter/dist/auro-counter-group.d.ts +161 -11
  38. package/components/counter/dist/auro-counter.d.ts +16 -0
  39. package/components/counter/dist/helptextVersion.d.ts +2 -0
  40. package/components/counter/dist/iconVersion.d.ts +1 -1
  41. package/components/counter/dist/index.js +3416 -728
  42. package/components/counter/dist/registered.js +3416 -728
  43. package/components/datepicker/README.md +1 -1
  44. package/components/datepicker/demo/api.html +16 -10
  45. package/components/datepicker/demo/api.md +59 -28
  46. package/components/datepicker/demo/api.min.js +8486 -4644
  47. package/components/datepicker/demo/index.html +16 -10
  48. package/components/datepicker/demo/index.md +75 -8
  49. package/components/datepicker/demo/index.min.js +8486 -4644
  50. package/components/datepicker/demo/readme.html +16 -9
  51. package/components/datepicker/demo/readme.md +1 -1
  52. package/components/datepicker/dist/auro-datepicker.d.ts +151 -12
  53. package/components/datepicker/dist/buttonVersion.d.ts +1 -1
  54. package/components/datepicker/dist/iconVersion.d.ts +2 -0
  55. package/components/datepicker/dist/index.js +7033 -3191
  56. package/components/datepicker/dist/popoverVersion.d.ts +1 -1
  57. package/components/datepicker/dist/registered.js +7033 -3191
  58. package/components/dropdown/demo/api.html +16 -10
  59. package/components/dropdown/demo/api.md +82 -275
  60. package/components/dropdown/demo/api.min.js +451 -260
  61. package/components/dropdown/demo/index.html +16 -10
  62. package/components/dropdown/demo/index.md +92 -362
  63. package/components/dropdown/demo/index.min.js +451 -260
  64. package/components/dropdown/demo/readme.html +16 -9
  65. package/components/dropdown/dist/auro-dropdown.d.ts +43 -83
  66. package/components/dropdown/dist/auro-dropdownBib.d.ts +14 -0
  67. package/components/dropdown/dist/index.js +450 -259
  68. package/components/dropdown/dist/registered.js +450 -259
  69. package/components/form/demo/api.html +16 -9
  70. package/components/form/demo/api.min.js +2 -2
  71. package/components/form/demo/autocomplete.html +19 -3
  72. package/components/form/demo/index.html +16 -9
  73. package/components/form/demo/index.min.js +2 -2
  74. package/components/form/demo/readme.html +16 -9
  75. package/components/form/demo/working.html +19 -13
  76. package/components/form/dist/index.js +1 -1
  77. package/components/form/dist/registered.js +1 -1
  78. package/components/helptext/dist/index.js +2 -2
  79. package/components/helptext/dist/registered.js +2 -2
  80. package/components/input/README.md +5 -2
  81. package/components/input/demo/api.html +16 -10
  82. package/components/input/demo/api.md +228 -130
  83. package/components/input/demo/api.min.js +909 -247
  84. package/components/input/demo/index.html +16 -10
  85. package/components/input/demo/index.md +48 -32
  86. package/components/input/demo/index.min.js +909 -247
  87. package/components/input/demo/readme.html +16 -9
  88. package/components/input/demo/readme.md +5 -2
  89. package/components/input/dist/auro-input.d.ts +3 -3
  90. package/components/input/dist/base-input.d.ts +38 -10
  91. package/components/input/dist/buttonVersion.d.ts +1 -1
  92. package/components/input/dist/iconVersion.d.ts +1 -1
  93. package/components/input/dist/index.js +908 -246
  94. package/components/input/dist/registered.js +908 -246
  95. package/components/layoutElement/dist/index.js +13 -10
  96. package/components/menu/demo/api.html +32 -10
  97. package/components/menu/demo/api.md +69 -8
  98. package/components/menu/demo/api.min.js +239 -48
  99. package/components/menu/demo/index.html +16 -10
  100. package/components/menu/demo/index.min.js +239 -48
  101. package/components/menu/demo/readme.html +16 -9
  102. package/components/menu/dist/auro-menu.d.ts +41 -7
  103. package/components/menu/dist/auro-menuoption.d.ts +15 -3
  104. package/components/menu/dist/iconVersion.d.ts +1 -1
  105. package/components/menu/dist/index.js +238 -47
  106. package/components/menu/dist/registered.js +238 -47
  107. package/components/menu/dist/styles/default/color-menuoption-css.d.ts +2 -0
  108. package/components/menu/dist/styles/default/style-menu-css.d.ts +2 -0
  109. package/components/menu/dist/styles/default/style-menuoption-css.d.ts +2 -0
  110. package/components/menu/dist/styles/default/tokens-css.d.ts +2 -0
  111. package/components/radio/demo/api.html +16 -10
  112. package/components/radio/demo/api.md +39 -9
  113. package/components/radio/demo/api.min.js +91 -93
  114. package/components/radio/demo/index.html +16 -10
  115. package/components/radio/demo/index.min.js +91 -93
  116. package/components/radio/demo/readme.html +16 -9
  117. package/components/radio/dist/auro-radio-group.d.ts +1 -1
  118. package/components/radio/dist/auro-radio.d.ts +9 -12
  119. package/components/radio/dist/index.js +90 -92
  120. package/components/radio/dist/registered.js +90 -92
  121. package/components/select/demo/api.html +16 -10
  122. package/components/select/demo/api.js +0 -2
  123. package/components/select/demo/api.md +150 -121
  124. package/components/select/demo/api.min.js +2184 -704
  125. package/components/select/demo/index.html +17 -11
  126. package/components/select/demo/index.md +1066 -259
  127. package/components/select/demo/index.min.js +2186 -694
  128. package/components/select/demo/readme.html +16 -9
  129. package/components/select/dist/auro-select.d.ts +59 -21
  130. package/components/select/dist/index.js +2107 -711
  131. package/components/select/dist/registered.js +2107 -711
  132. package/package.json +31 -28
  133. /package/components/{datepicker/dist/styles/default/color-css.d.ts → counter/dist/styles/shapeSize-css.d.ts} +0 -0
  134. /package/components/{dropdown/dist/styles/default → datepicker/dist/styles/classic}/color-css.d.ts +0 -0
  135. /package/components/datepicker/dist/styles/{emphasized → classic}/style-css.d.ts +0 -0
  136. /package/components/{dropdown/dist/styles/default/bibColors-css.d.ts → datepicker/dist/styles/snowflake/color-css.d.ts} +0 -0
  137. /package/components/{dropdown/dist/styles/default → datepicker/dist/styles/snowflake}/style-css.d.ts +0 -0
  138. /package/components/dropdown/dist/styles/{default/bibStyles-css.d.ts → classic/bibColors-css.d.ts} +0 -0
  139. /package/components/{menu/dist/styles/color-menu-css.d.ts → dropdown/dist/styles/classic/bibStyles-css.d.ts} +0 -0
  140. /package/components/{menu/dist/styles/color-menuoption-css.d.ts → dropdown/dist/styles/classic/color-css.d.ts} +0 -0
  141. /package/components/{menu/dist/styles/style-menu-css.d.ts → dropdown/dist/styles/classic/style-css.d.ts} +0 -0
  142. /package/components/{menu/dist/styles/style-menuoption-css.d.ts → dropdown/dist/styles/style-css.d.ts} +0 -0
  143. /package/components/menu/dist/styles/{tokens-css.d.ts → default/color-menu-css.d.ts} +0 -0
@@ -9,7 +9,7 @@ const t$2=globalThis,e$4=t$2.ShadowRoot&&(void 0===t$2.ShadyCSS||t$2.ShadyCSS.na
9
9
  * @license
10
10
  * Copyright 2017 Google LLC
11
11
  * SPDX-License-Identifier: BSD-3-Clause
12
- */const{is:i$4,defineProperty:e$3,getOwnPropertyDescriptor:h$1,getOwnPropertyNames:r$1,getOwnPropertySymbols:o$4,getPrototypeOf:n$2}=Object,a$2=globalThis,c$1=a$2.trustedTypes,l$2=c$1?c$1.emptyScript:"",p$1=a$2.reactiveElementPolyfillSupport,d$1=(t,s)=>t,u$2={toAttribute(t,s){switch(s){case Boolean:t=t?l$2:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t);}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t);}catch(t){i=null;}}return i}},f$1=(t,s)=>!i$4(t,s),b={attribute:true,type:String,converter:u$2,reflect:false,useDefault:false,hasChanged:f$1};Symbol.metadata??=Symbol("metadata"),a$2.litPropertyMetadata??=new WeakMap;let y$1 = class y extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t);}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=b){if(s.state&&(s.attribute=false),this._$Ei(),this.prototype.hasOwnProperty(t)&&((s=Object.create(s)).wrapped=true),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),h=this.getPropertyDescriptor(t,i,s);void 0!==h&&e$3(this.prototype,t,h);}}static getPropertyDescriptor(t,s,i){const{get:e,set:r}=h$1(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t;}};return {get:e,set(s){const h=e?.call(this);r?.call(this,s),this.requestUpdate(t,h,i);},configurable:true,enumerable:true}}static getPropertyOptions(t){return this.elementProperties.get(t)??b}static _$Ei(){if(this.hasOwnProperty(d$1("elementProperties")))return;const t=n$2(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties);}static finalize(){if(this.hasOwnProperty(d$1("finalized")))return;if(this.finalized=true,this._$Ei(),this.hasOwnProperty(d$1("properties"))){const t=this.properties,s=[...r$1(t),...o$4(t)];for(const i of s)this.createProperty(i,t[i]);}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,i]of s)this.elementProperties.set(t,i);}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);void 0!==i&&this._$Eh.set(i,t);}this.elementStyles=this.finalizeStyles(this.styles);}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(c$2(s));}else void 0!==s&&i.push(c$2(s));return i}static _$Eu(t,s){const i=s.attribute;return false===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=false,this.hasUpdated=false,this._$Em=null,this._$Ev();}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)));}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.();}removeController(t){this._$EO?.delete(t);}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t);}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return S$1(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(true),this._$EO?.forEach((t=>t.hostConnected?.()));}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()));}attributeChangedCallback(t,s,i){this._$AK(t,i);}_$ET(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&true===i.reflect){const h=(void 0!==i.converter?.toAttribute?i.converter:u$2).toAttribute(s,i.type);this._$Em=t,null==h?this.removeAttribute(e):this.setAttribute(e,h),this._$Em=null;}}_$AK(t,s){const i=this.constructor,e=i._$Eh.get(t);if(void 0!==e&&this._$Em!==e){const t=i.getPropertyOptions(e),h="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:u$2;this._$Em=e,this[e]=h.fromAttribute(s,t.type)??this._$Ej?.get(e)??null,this._$Em=null;}}requestUpdate(t,s,i){if(void 0!==t){const e=this.constructor,h=this[t];if(i??=e.getPropertyOptions(t),!((i.hasChanged??f$1)(h,s)||i.useDefault&&i.reflect&&h===this._$Ej?.get(t)&&!this.hasAttribute(e._$Eu(t,i))))return;this.C(t,s,i);} false===this.isUpdatePending&&(this._$ES=this._$EP());}C(t,s,{useDefault:i,reflect:e,wrapped:h},r){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,r??s??this[t]),true!==h||void 0!==r)||(this._$AL.has(t)||(this.hasUpdated||i||(s=void 0),this._$AL.set(t,s)),true===e&&this._$Em!==t&&(this._$Eq??=new Set).add(t));}async _$EP(){this.isUpdatePending=true;try{await this._$ES;}catch(t){Promise.reject(t);}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,s]of this._$Ep)this[t]=s;this._$Ep=void 0;}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,i]of t){const{wrapped:t}=i,e=this[s];true!==t||this._$AL.has(s)||void 0===e||this.C(s,void 0,i,e);}}let t=false;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(s)):this._$EM();}catch(s){throw t=false,this._$EM(),s}t&&this._$AE(s);}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=true,this.firstUpdated(t)),this.updated(t);}_$EM(){this._$AL=new Map,this.isUpdatePending=false;}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return true}update(t){this._$Eq&&=this._$Eq.forEach((t=>this._$ET(t,this[t]))),this._$EM();}updated(t){}firstUpdated(t){}};y$1.elementStyles=[],y$1.shadowRootOptions={mode:"open"},y$1[d$1("elementProperties")]=new Map,y$1[d$1("finalized")]=new Map,p$1?.({ReactiveElement:y$1}),(a$2.reactiveElementVersions??=[]).push("2.1.0");
12
+ */const{is:i$4,defineProperty:e$3,getOwnPropertyDescriptor:h$1,getOwnPropertyNames:r$1,getOwnPropertySymbols:o$4,getPrototypeOf:n$2}=Object,a$2=globalThis,c$1=a$2.trustedTypes,l$2=c$1?c$1.emptyScript:"",p$1=a$2.reactiveElementPolyfillSupport,d$1=(t,s)=>t,u$2={toAttribute(t,s){switch(s){case Boolean:t=t?l$2:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t);}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t);}catch(t){i=null;}}return i}},f$1=(t,s)=>!i$4(t,s),b={attribute:true,type:String,converter:u$2,reflect:false,useDefault:false,hasChanged:f$1};Symbol.metadata??=Symbol("metadata"),a$2.litPropertyMetadata??=new WeakMap;let y$1 = class y extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t);}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=b){if(s.state&&(s.attribute=false),this._$Ei(),this.prototype.hasOwnProperty(t)&&((s=Object.create(s)).wrapped=true),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),h=this.getPropertyDescriptor(t,i,s);void 0!==h&&e$3(this.prototype,t,h);}}static getPropertyDescriptor(t,s,i){const{get:e,set:r}=h$1(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t;}};return {get:e,set(s){const h=e?.call(this);r?.call(this,s),this.requestUpdate(t,h,i);},configurable:true,enumerable:true}}static getPropertyOptions(t){return this.elementProperties.get(t)??b}static _$Ei(){if(this.hasOwnProperty(d$1("elementProperties")))return;const t=n$2(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties);}static finalize(){if(this.hasOwnProperty(d$1("finalized")))return;if(this.finalized=true,this._$Ei(),this.hasOwnProperty(d$1("properties"))){const t=this.properties,s=[...r$1(t),...o$4(t)];for(const i of s)this.createProperty(i,t[i]);}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,i]of s)this.elementProperties.set(t,i);}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);void 0!==i&&this._$Eh.set(i,t);}this.elementStyles=this.finalizeStyles(this.styles);}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(c$2(s));}else void 0!==s&&i.push(c$2(s));return i}static _$Eu(t,s){const i=s.attribute;return false===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=false,this.hasUpdated=false,this._$Em=null,this._$Ev();}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)));}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.();}removeController(t){this._$EO?.delete(t);}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t);}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return S$1(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(true),this._$EO?.forEach((t=>t.hostConnected?.()));}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()));}attributeChangedCallback(t,s,i){this._$AK(t,i);}_$ET(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&true===i.reflect){const h=(void 0!==i.converter?.toAttribute?i.converter:u$2).toAttribute(s,i.type);this._$Em=t,null==h?this.removeAttribute(e):this.setAttribute(e,h),this._$Em=null;}}_$AK(t,s){const i=this.constructor,e=i._$Eh.get(t);if(void 0!==e&&this._$Em!==e){const t=i.getPropertyOptions(e),h="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:u$2;this._$Em=e;const r=h.fromAttribute(s,t.type);this[e]=r??this._$Ej?.get(e)??r,this._$Em=null;}}requestUpdate(t,s,i){if(void 0!==t){const e=this.constructor,h=this[t];if(i??=e.getPropertyOptions(t),!((i.hasChanged??f$1)(h,s)||i.useDefault&&i.reflect&&h===this._$Ej?.get(t)&&!this.hasAttribute(e._$Eu(t,i))))return;this.C(t,s,i);} false===this.isUpdatePending&&(this._$ES=this._$EP());}C(t,s,{useDefault:i,reflect:e,wrapped:h},r){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,r??s??this[t]),true!==h||void 0!==r)||(this._$AL.has(t)||(this.hasUpdated||i||(s=void 0),this._$AL.set(t,s)),true===e&&this._$Em!==t&&(this._$Eq??=new Set).add(t));}async _$EP(){this.isUpdatePending=true;try{await this._$ES;}catch(t){Promise.reject(t);}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,s]of this._$Ep)this[t]=s;this._$Ep=void 0;}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,i]of t){const{wrapped:t}=i,e=this[s];true!==t||this._$AL.has(s)||void 0===e||this.C(s,void 0,i,e);}}let t=false;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(s)):this._$EM();}catch(s){throw t=false,this._$EM(),s}t&&this._$AE(s);}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=true,this.firstUpdated(t)),this.updated(t);}_$EM(){this._$AL=new Map,this.isUpdatePending=false;}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return true}update(t){this._$Eq&&=this._$Eq.forEach((t=>this._$ET(t,this[t]))),this._$EM();}updated(t){}firstUpdated(t){}};y$1.elementStyles=[],y$1.shadowRootOptions={mode:"open"},y$1[d$1("elementProperties")]=new Map,y$1[d$1("finalized")]=new Map,p$1?.({ReactiveElement:y$1}),(a$2.reactiveElementVersions??=[]).push("2.1.1");
13
13
 
14
14
  /**
15
15
  * @license
@@ -24,11 +24,106 @@ const t$1=globalThis,i$3=t$1.trustedTypes,s$2=i$3?i$3.createPolicy("lit-html",{c
24
24
  * SPDX-License-Identifier: BSD-3-Clause
25
25
  */const s$1=globalThis;let i$2 = class i extends y$1{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0;}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const r=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=B(r,this.renderRoot,this.renderOptions);}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(true);}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(false);}render(){return T}};i$2._$litElement$=true,i$2["finalized"]=true,s$1.litElementHydrateSupport?.({LitElement:i$2});const o$2=s$1.litElementPolyfillSupport;o$2?.({LitElement:i$2});(s$1.litElementVersions??=[]).push("4.2.0");
26
26
 
27
- var styleCss$2 = i$5`:focus:not(:focus-visible){outline:3px solid transparent}:host{display:inline-block;width:100%;margin:0;padding:0;vertical-align:middle}:host ::slotted(auro-menuoption),:host ::slotted([auro-menuoption]),:host auro-menuoption[loadingplaceholder]{padding-left:calc(var(--ds-size-150, 0.75rem) + 24px + var(--ds-size-100, 0.5rem))}:host ::slotted([selected]){padding-left:0}:host ::slotted(hr){box-sizing:content-box !important;height:0 !important;overflow:visible !important;margin:var(--ds-size-100, 0.5rem) 0 !important;border-width:0 !important;border-top-width:1px !important;border-top-style:solid !important}:host([nocheckmark]) ::slotted(auro-menuoption),:host([nocheckmark]) auro-menuoption[loadingplaceholder]{padding-left:var(--ds-size-200, 1rem)}:host([root]){overflow-y:auto}[loadingplaceholder].empty{opacity:0;position:absolute}[loadingplaceholder] slot[name=loadingIcon]{vertical-align:middle;line-height:1;display:inline-block}[loadingplaceholder] slot[name=loadingIcon]::slotted(*){margin-right:var(--ds-size-150, 0.75rem)}`;
27
+ var styleCss$2 = i$5`:focus:not(:focus-visible){outline:3px solid transparent}:host{display:block;vertical-align:middle}:host .wrapper{box-sizing:border-box;display:inline-block;width:100%;margin:0;padding:0}:host ::slotted(hr){box-sizing:content-box !important;height:0 !important;overflow:visible !important;margin:var(--ds-size-100, 0.5rem) 0 !important;border-width:0 !important;border-top-width:1px !important;border-top-style:solid !important}:host [loadingplaceholder].empty{opacity:0;position:absolute}:host [loadingplaceholder] slot[name=loadingIcon]{vertical-align:middle;line-height:1;display:inline-block}:host [loadingplaceholder] slot[name=loadingIcon]::slotted(*){margin-right:var(--ds-size-150, 0.75rem)}:host([root]){overflow-y:auto}:host([root]) .wrapper[class*=-lg]{padding:var(--ds-size-150, 0.75rem)}:host([root]) .wrapper[class*=-xl]{padding:var(--ds-size-200, 1rem)}`;
28
28
 
29
29
  var colorCss$2 = i$5`:host ::slotted(hr){border-top-color:var(--ds-auro-menu-divider-color)}[loadingplaceholder] slot[name=loadingIcon]{color:var(--ds-auro-menu-loader-color)}[loadingplaceholder] slot[name=loadingText]{color:var(--ds-auro-menu-loader-text-color)}`;
30
30
 
31
- var tokensCss$1 = i$5`:host{--ds-auro-menu-divider-color: var(--ds-basic-color-border-divider, rgba(0, 0, 0, 0.15));--ds-auro-menu-loader-color: var(--ds-basic-color-brand-primary, #01426a);--ds-auro-menu-loader-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-menuoption-container-color: transparent;--ds-auro-menuoption-icon-color: transparent;--ds-auro-menuoption-text-color: var(--ds-basic-color-texticon-default, #2a2a2a)}`;
31
+ var tokensCss$1 = i$5`:host{--ds-auro-menu-divider-color: var(--ds-basic-color-border-divider, rgba(0, 0, 0, 0.15));--ds-auro-menu-loader-color: var(--ds-basic-color-brand-primary, #01426a);--ds-auro-menu-loader-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-menuoption-container-color: transparent;--ds-auro-menuoption-container-border-color: var(--ds-auro-menuoption-container-color);--ds-auro-menuoption-icon-color: transparent;--ds-auro-menuoption-text-color: var(--ds-basic-color-texticon-default, #2a2a2a)}`;
32
+
33
+ let AuroElement$1 = class AuroElement extends i$2 {
34
+ static get properties() {
35
+ return {
36
+
37
+ /**
38
+ * Defines the language of an element.
39
+ * @default {'default'}
40
+ */
41
+ layout: {
42
+ type: String,
43
+ attribute: "layout",
44
+ reflect: true
45
+ },
46
+
47
+ shape: {
48
+ type: String,
49
+ attribute: "shape",
50
+ reflect: true
51
+ },
52
+
53
+ size: {
54
+ type: String,
55
+ attribute: "size",
56
+ reflect: true
57
+ },
58
+
59
+ onDark: {
60
+ type: Boolean,
61
+ attribute: "ondark",
62
+ reflect: true
63
+ }
64
+ };
65
+ }
66
+
67
+ resetShapeClasses() {
68
+ const wrapper = this.shadowRoot.querySelector('.wrapper');
69
+
70
+ if (wrapper) {
71
+ wrapper.classList.forEach((className) => {
72
+ if (className.startsWith('shape-')) {
73
+ wrapper.classList.remove(className);
74
+ }
75
+ });
76
+
77
+ }
78
+
79
+ if (this.shape && this.size) {
80
+ wrapper.classList.add(`shape-${this.shape.toLowerCase()}-${this.size.toLowerCase()}`);
81
+ } else {
82
+ wrapper.classList.add('shape-none');
83
+ }
84
+ }
85
+
86
+ resetLayoutClasses() {
87
+ if (this.layout) {
88
+ const wrapper = this.shadowRoot.querySelector('.wrapper');
89
+
90
+ if (wrapper) {
91
+ wrapper.classList.forEach((className) => {
92
+ if (className.startsWith('layout-')) {
93
+ wrapper.classList.remove(className);
94
+ }
95
+ });
96
+
97
+ wrapper.classList.add(`layout-${this.layout.toLowerCase()}`);
98
+ }
99
+ }
100
+ }
101
+
102
+ updateComponentArchitecture() {
103
+ this.resetLayoutClasses();
104
+ this.resetShapeClasses();
105
+ }
106
+
107
+ updated(changedProperties) {
108
+ if (changedProperties.has('layout') || changedProperties.has('shape') || changedProperties.has('size')) {
109
+ this.updateComponentArchitecture();
110
+ }
111
+ }
112
+
113
+ // Try to render the defined `this.layout` layout. If that fails, fall back to the default layout.
114
+ // This will catch if an invalid layout value is passed in and render the default layout if so.
115
+ render() {
116
+ try {
117
+ return this.renderLayout();
118
+ } catch (error) {
119
+ // failed to get the defined layout
120
+ console.error('Failed to get the defined layout - using the default layout', error); // eslint-disable-line no-console
121
+
122
+ // fallback to the default layout
123
+ return this.getLayout('default');
124
+ }
125
+ }
126
+ };
32
127
 
33
128
  // Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
34
129
  // See LICENSE in the project root for license information.
@@ -151,7 +246,6 @@ function dispatchMenuEvent(element, eventName, detail = null) {
151
246
  * @attr {boolean} nocheckmark - When true, selected option will not show the checkmark.
152
247
  * @attr {boolean} loading - When true, displays a loading state using the loadingIcon and loadingText slots if provided.
153
248
  * @attr {boolean} multiselect - When true, the selected option can be multiple options.
154
- * @attr {String|Array<string>} value - Value selected for the menu, type `string` by default. In multi-select mode, `value` is an array of strings.
155
249
  * @prop {boolean} hasLoadingPlaceholder - Indicates whether the menu has a loadingIcon or loadingText to render when in a loading state.
156
250
  * @event {CustomEvent<Element>} auroMenu-activatedOption - Notifies that a menuoption has been made `active`.
157
251
  * @event {CustomEvent<any>} auroMenu-customEventFired - Notifies that a custom event has been fired.
@@ -164,14 +258,17 @@ function dispatchMenuEvent(element, eventName, detail = null) {
164
258
  * @slot - Slot for insertion of menu options.
165
259
  */
166
260
 
167
- /* eslint-disable no-magic-numbers, max-lines, no-extra-parens */
261
+ /* eslint-disable no-magic-numbers, max-lines, no-extra-parens, no-inline-comments, line-comment-position */
168
262
 
169
- class AuroMenu extends i$2 {
263
+ class AuroMenu extends AuroElement$1 {
170
264
  constructor() {
171
265
  super();
172
266
 
173
267
  // State properties (reactive)
174
268
 
269
+ this.shape = ""; // box, rounded, pill
270
+ this.size = ""; // md, lg, xl
271
+
175
272
  // Value of the selected options
176
273
  this.value = undefined;
177
274
  // Currently selected option
@@ -230,6 +327,7 @@ class AuroMenu extends i$2 {
230
327
 
231
328
  static get properties() {
232
329
  return {
330
+ ...super.properties,
233
331
  noCheckmark: {
234
332
  type: Boolean,
235
333
  reflect: true,
@@ -260,9 +358,24 @@ class AuroMenu extends i$2 {
260
358
  reflect: true,
261
359
  attribute: 'multiselect'
262
360
  },
361
+
362
+ /**
363
+ * Value selected for the component.
364
+ */
263
365
  value: {
264
- // Allow string, string[] arrays and undefined
265
- type: Object
366
+ type: String,
367
+ reflect: true,
368
+ attribute: 'value'
369
+ },
370
+
371
+ /**
372
+ * Indent level for submenus.
373
+ * @private
374
+ */
375
+ level: {
376
+ type: Number,
377
+ reflect: false,
378
+ attribute: false
266
379
  }
267
380
  };
268
381
  }
@@ -287,6 +400,25 @@ class AuroMenu extends i$2 {
287
400
  AuroLibraryRuntimeUtils$1.prototype.registerComponent(name, AuroMenu);
288
401
  }
289
402
 
403
+ /**
404
+ * Formatted value based on `multiSelect` state.
405
+ * Default type is `String`, changing to `Array<String>` when `multiSelect` is true.
406
+ * @private
407
+ * @returns {String|Array<String>}
408
+ */
409
+ get formattedValue() {
410
+ if (this.multiSelect) {
411
+ if (!this.value) {
412
+ return undefined;
413
+ }
414
+ if (this.value.startsWith("[")) {
415
+ return JSON.parse(this.value);
416
+ }
417
+ return [this.value];
418
+ }
419
+ return this.value;
420
+ }
421
+
290
422
  // Lifecycle Methods
291
423
 
292
424
  connectedCallback() {
@@ -296,6 +428,7 @@ class AuroMenu extends i$2 {
296
428
  this.addEventListener('mousedown', this.handleMouseSelect);
297
429
  this.addEventListener('auroMenuOption-mouseover', this.handleOptionHover);
298
430
  this.addEventListener('slotchange', this.handleSlotChange);
431
+ this.setTagAttribute("auro-menu");
299
432
  }
300
433
 
301
434
  disconnectedCallback() {
@@ -314,13 +447,27 @@ class AuroMenu extends i$2 {
314
447
  this.initializeMenu();
315
448
  }
316
449
 
450
+ /**
451
+ * Sets an attribute that matches the default tag name if the tag name is not the default.
452
+ * @param {string} tagName - The tag name to set as an attribute.
453
+ * @private
454
+ */
455
+ setTagAttribute(tagName) {
456
+ if (this.tagName.toLowerCase() !== tagName) {
457
+ this.setAttribute(tagName, true);
458
+ }
459
+ }
460
+
317
461
  updated(changedProperties) {
318
- if (changedProperties.has('multiSelect')) {
462
+ super.updated(changedProperties);
463
+
464
+ if (changedProperties.has('multiSelect') && !changedProperties.has("value")) {
319
465
  // Reset selection if multiSelect mode changes
320
466
  this.clearSelection();
321
467
  }
322
468
 
323
- if (changedProperties.has('value')) {
469
+
470
+ if (changedProperties.has("value")) {
324
471
  // Handle null/undefined case
325
472
  if (this.value === undefined || this.value === null) {
326
473
  this.optionSelected = undefined;
@@ -328,7 +475,7 @@ class AuroMenu extends i$2 {
328
475
  } else {
329
476
  if (this.multiSelect) {
330
477
  // In multiselect mode, this.value should be an array of strings
331
- const valueArray = Array.isArray(this.value) ? this.value : [this.value];
478
+ const valueArray = this.formattedValue;
332
479
  const matchingOptions = this.items.filter((item) => valueArray.includes(item.value));
333
480
 
334
481
  this.optionSelected = matchingOptions.length > 0 ? matchingOptions : undefined;
@@ -388,6 +535,19 @@ class AuroMenu extends i$2 {
388
535
  this.querySelectorAll('auro-menu, [auro-menu], auro-menuoption, [auro-menuoption]').forEach((element) => element.setAttribute('noCheckmark', ''));
389
536
  }
390
537
 
538
+ // Handle layout propagation to all menus and options
539
+ const propagationTargets = this.querySelectorAll('auro-menu, [auro-menu], auro-menuoption, [auro-menuoption]');
540
+ [
541
+ 'size',
542
+ 'shape'
543
+ ].forEach((prop) => {
544
+ if (changedProperties.has(prop)) {
545
+ propagationTargets.forEach((el) => {
546
+ el.setAttribute(prop, this[prop]);
547
+ });
548
+ }
549
+ });
550
+
391
551
  // Regex for matchWord if needed
392
552
  let regexWord = null;
393
553
 
@@ -482,14 +642,14 @@ class AuroMenu extends i$2 {
482
642
  */
483
643
  handleSelectState(option) {
484
644
  if (this.multiSelect) {
485
- const currentValue = this.value || [];
645
+ const currentValue = this.formattedValue || [];
486
646
  const currentSelected = this.optionSelected || [];
487
647
 
488
648
  if (!currentValue.includes(option.value)) {
489
- this.value = [
649
+ this.value = JSON.stringify([
490
650
  ...currentValue,
491
651
  option.value
492
- ];
652
+ ]);
493
653
  }
494
654
  if (!currentSelected.includes(option)) {
495
655
  this.optionSelected = [
@@ -512,13 +672,15 @@ class AuroMenu extends i$2 {
512
672
  * @param {HTMLElement} option - The menuoption to be deselected.
513
673
  */
514
674
  handleDeselectState(option) {
515
- if (this.multiSelect && Array.isArray(this.value)) {
675
+ if (this.multiSelect) {
516
676
  // Remove this option from array
517
- this.value = this.value.filter((val) => val !== option.value);
677
+ const newFormattedValue = (this.formattedValue || []).filter((val) => val !== option.value);
518
678
 
519
679
  // If array is empty after removal, set back to undefined
520
- if (this.value.length === 0) {
680
+ if (newFormattedValue && newFormattedValue.length === 0) {
521
681
  this.value = undefined;
682
+ } else {
683
+ this.value = JSON.stringify(newFormattedValue);
522
684
  }
523
685
 
524
686
  this.optionSelected = this.optionSelected.filter((val) => val !== option);
@@ -584,21 +746,20 @@ class AuroMenu extends i$2 {
584
746
  * @param {HTMLElement} menu - Root menu element.
585
747
  */
586
748
  handleNestedMenus(menu) {
587
- const nestedMenus = menu.querySelectorAll('auro-menu, [auro-menu]');
749
+ menu.level = menu.parentElement.level >= 0 ? menu.parentElement.level + 1 : 0;
588
750
 
589
- nestedMenus.forEach((nestedMenu) => {
590
- // role="listbox" only allows "role=group" for children.
591
- nestedMenu.setAttribute('role', 'group');
592
- if (!nestedMenu.hasAttribute('aria-label')) {
593
- nestedMenu.setAttribute('aria-label', 'submenu');
751
+ if (menu.level > 0) {
752
+ menu.setAttribute('role', 'group');
753
+ menu.removeAttribute("root");
754
+ if (!menu.hasAttribute('aria-label')) {
755
+ menu.setAttribute('aria-label', 'submenu');
594
756
  }
757
+ }
595
758
 
596
- const options = nestedMenu.querySelectorAll(':scope > auro-menuoption, :scope > [auro-menuoption]');
597
- options.forEach((option) => {
598
- option.innerHTML = this.nestingSpacer + option.innerHTML;
599
- });
600
-
601
- this.handleNestedMenus(nestedMenu);
759
+ const options = menu.querySelectorAll(':scope > auro-menuoption, :scope > [auro-menuoption]');
760
+ options.forEach((option) => {
761
+ const regex = new RegExp(this.nestingSpacer, "gu");
762
+ option.innerHTML = this.nestingSpacer.repeat(menu.level) + option.innerHTML.replace(regex, '');
602
763
  });
603
764
  }
604
765
 
@@ -840,22 +1001,33 @@ class AuroMenu extends i$2 {
840
1001
  }
841
1002
 
842
1003
  /**
843
- * Renders the component.
844
- * @returns {boolean} - True if loading slots are present and non-empty.
1004
+ * Logic to determine the layout of the component.
1005
+ * @protected
1006
+ * @returns {void}
845
1007
  */
846
- render() {
1008
+ renderLayout() {
847
1009
  if (this.loading) {
848
1010
  return x`
849
- <auro-menuoption disabled loadingplaceholder class="${this.hasLoadingPlaceholder ? '' : 'empty'}">
850
- <div>
851
- <slot name="loadingIcon"></slot>
852
- <slot name="loadingText"></slot>
853
- </div>
854
- </auro-menuoption>
1011
+ <div class="wrapper">
1012
+ <auro-menuoption
1013
+ disabled
1014
+ loadingplaceholder
1015
+ class="${this.hasLoadingPlaceholder ? "" : "empty"}"
1016
+ >
1017
+ <div>
1018
+ <slot name="loadingIcon"></slot>
1019
+ <slot name="loadingText"></slot>
1020
+ </div>
1021
+ </auro-menuoption>
1022
+ </div>
855
1023
  `;
856
1024
  }
857
1025
 
858
- return x`<slot @slotchange=${this.handleSlotChange}></slot>`;
1026
+ return x`
1027
+ <div class="wrapper">
1028
+ <slot @slotchange=${this.handleSlotChange}></slot>
1029
+ </div>
1030
+ `;
859
1031
  }
860
1032
  }
861
1033
 
@@ -866,9 +1038,9 @@ class AuroMenu extends i$2 {
866
1038
  */
867
1039
  const a=Symbol.for(""),o$1=t=>{if(t?.r===a)return t?._$litStatic$},s=t=>({_$litStatic$:t,r:a}),i$1=(t,...r)=>({_$litStatic$:r.reduce(((r,e,a)=>r+(t=>{if(void 0!==t._$litStatic$)return t._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${t}. Use 'unsafeStatic' to pass non-literal values, but\n take care to ensure page security.`)})(e)+t[a+1]),t[0]),r:a}),l=new Map,n=t=>(r,...e)=>{const a=e.length;let s,i;const n=[],u=[];let c,$=0,f=false;for(;$<a;){for(c=r[$];$<a&&void 0!==(i=e[$],s=o$1(i));)c+=s+r[++$],f=true;$!==a&&u.push(i),n.push(c),$++;}if($===a&&n.push(r[a]),f){const t=n.join("$$lit$$");void 0===(r=l.get(t))&&(n.raw=n,l.set(t,r=n)),e=u;}return t(r,...e)},u=n(x);
868
1040
 
869
- var styleCss$1 = i$5`:host{display:flex;align-items:center;padding:var(--ds-size-50, 0.25rem) var(--ds-size-200, 1rem) var(--ds-size-50, 0.25rem) 0;cursor:pointer;user-select:none;-webkit-tap-highlight-color:transparent}: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)}:host ::slotted(strong){font-weight:700}:host([hidden]){display:none}:host([static]){pointer-events:none}:host([disabled]:hover){cursor:auto}:host([disabled]){user-select:none;pointer-events:none}`;
1041
+ var styleCss$1 = i$5`:host{cursor:pointer;user-select:none}:host .wrapper{display:flex;align-items:center;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));padding-top:var(--ds-size-50, 0.25rem);padding-bottom:var(--ds-size-50, 0.25rem);-webkit-tap-highlight-color:transparent}:host .wrapper[class*=shape-box],:host .wrapper[class*=shape-snowflake]{border-radius:unset}:host .wrapper[class*=shape-pill]{border-radius:30px}:host .wrapper[class*=-lg]{font-size:var(--ds-text-body-size-lg, 1.125rem);line-height:var(--ds-text-body-height-lg, 1.625rem);padding-top:var(--ds-size-75, 0.375rem);padding-bottom:var(--ds-size-75, 0.375rem);padding-right:var(--ds-size-150, 0.75rem)}:host .wrapper[class*=-lg]:not(:last-child){margin-bottom:var(--ds-size-50, 0.25rem)}:host .wrapper[class*=-xl]{font-size:var(--ds-text-body-size-lg, 1.125rem);line-height:var(--ds-text-body-height-lg, 1.625rem);padding-top:var(--ds-size-100, 0.5rem);padding-bottom:var(--ds-size-100, 0.5rem);padding-right:var(--ds-size-200, 1rem)}:host .wrapper[class*=-xl]:not(:last-child){margin-bottom:var(--ds-size-100, 0.5rem)}: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)}:host ::slotted(strong){font-weight:700}: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}`;
870
1042
 
871
- var colorCss$1 = i$5`:host{background-color:var(--ds-auro-menuoption-container-color);color:var(--ds-auro-menuoption-text-color)}:host svg{fill:var(--ds-auro-menuoption-icon-color)}:host([disabled]){--ds-auro-menuoption-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host(:hover),:host(.active){--ds-auro-menuoption-container-color: var(--ds-basic-color-surface-neutral-subtle, #f7f7f7)}:host([selected]){--ds-auro-menuoption-container-color: var(--ds-advanced-color-state-selected, #01426a);--ds-auro-menuoption-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-menuoption-icon-color: var(--ds-basic-color-texticon-inverse, #ffffff)}:host([selected]):host(:hover),:host([selected]):host(.active){--ds-auro-menuoption-container-color: var(--ds-advanced-color-state-selected-hover, #00274a)}`;
1043
+ var colorCss$1 = i$5`:host .wrapper{border:1px solid var(--ds-auro-menuoption-container-border-color);background-color:var(--ds-auro-menuoption-container-color);color:var(--ds-auro-menuoption-text-color)}:host svg{fill:var(--ds-auro-menuoption-icon-color)}:host([disabled]){--ds-auro-menuoption-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host(:hover),:host(.active){--ds-auro-menuoption-container-color: var(--ds-basic-color-surface-neutral-subtle, #f7f7f7)}:host([selected]){--ds-auro-menuoption-container-color: var(--ds-advanced-color-state-selected, #01426a);--ds-auro-menuoption-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-menuoption-icon-color: var(--ds-basic-color-texticon-inverse, #ffffff)}:host([selected]):host(:hover),:host([selected]):host(.active){--ds-auro-menuoption-container-color: var(--ds-advanced-color-state-selected-hover, #00274a)}`;
872
1044
 
873
1045
  // Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
874
1046
  // See LICENSE in the project root for license information.
@@ -1275,8 +1447,12 @@ class AuroIcon extends BaseIcon {
1275
1447
  async firstUpdated() {
1276
1448
  await super.firstUpdated();
1277
1449
 
1278
- // Removes the SVG description for screenreader if ariaHidden is set to true
1279
- if (!this.hasAttribute('ariaHidden') && this.svg) {
1450
+ /**
1451
+ * icons provide a description for screen readers. Icon only instances Auro-button
1452
+ * depend on this description to provide context for the user using a screen reader.
1453
+ * Removes the SVG description for screen reader if ariaHidden is set to true.
1454
+ */
1455
+ if (this.hasAttribute('ariaHidden') && this.svg) {
1280
1456
  const svgDesc = this.svg.querySelector('desc');
1281
1457
 
1282
1458
  if (svgDesc) {
@@ -1320,7 +1496,7 @@ class AuroIcon extends BaseIcon {
1320
1496
  }
1321
1497
  }
1322
1498
 
1323
- var iconVersion = '8.0.3';
1499
+ var iconVersion = '8.0.4';
1324
1500
 
1325
1501
  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>"};
1326
1502
 
@@ -1338,10 +1514,13 @@ var checkmarkIcon = {"svg":"<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlin
1338
1514
  * @event auroMenuOption-mouseover - Notifies that this option has been hovered over.
1339
1515
  * @slot - Specifies text for an option, but is not the value.
1340
1516
  */
1341
- class AuroMenuOption extends i$2 {
1517
+ class AuroMenuOption extends AuroElement$1 {
1342
1518
  constructor() {
1343
1519
  super();
1344
1520
 
1521
+ this.size = ""; // md, lg, xl
1522
+ this.shape = ""; // box, rounded, pill
1523
+
1345
1524
  /**
1346
1525
  * Generate unique names for dependency components.
1347
1526
  */
@@ -1365,6 +1544,7 @@ class AuroMenuOption extends i$2 {
1365
1544
 
1366
1545
  static get properties() {
1367
1546
  return {
1547
+ ...super.properties,
1368
1548
  nocheckmark: {
1369
1549
  type: Boolean,
1370
1550
  reflect: true
@@ -1426,6 +1606,8 @@ class AuroMenuOption extends i$2 {
1426
1606
 
1427
1607
  // observer for selected property changes
1428
1608
  updated(changedProperties) {
1609
+ super.updated(changedProperties);
1610
+
1429
1611
  if (changedProperties.has('selected')) {
1430
1612
  this.setAttribute('aria-selected', this.selected.toString());
1431
1613
  }
@@ -1447,10 +1629,19 @@ class AuroMenuOption extends i$2 {
1447
1629
  return u`<${this.iconTag} customColor customSvg slot="icon">${svg}</${this.iconTag}>`;
1448
1630
  }
1449
1631
 
1450
- render() {
1632
+ /**
1633
+ * Logic to determine the layout of the component.
1634
+ * @protected
1635
+ * @returns {void}
1636
+ */
1637
+ renderLayout() {
1451
1638
  return u`
1452
- ${this.selected && !this.nocheckmark ? this.generateIconHtml(checkmarkIcon.svg) : undefined}
1453
- <slot></slot>
1639
+ <div class="wrapper">
1640
+ ${this.selected && !this.nocheckmark
1641
+ ? this.generateIconHtml(checkmarkIcon.svg)
1642
+ : undefined}
1643
+ <slot></slot>
1644
+ </div>
1454
1645
  `;
1455
1646
  }
1456
1647
  }
@@ -16,17 +16,24 @@
16
16
  <head>
17
17
  <meta charset="UTF-8" />
18
18
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
19
- <title>Auro Web Component Generator | auro-menu custom element</title>
20
- <link
21
- rel="stylesheet"
22
- type="text/css"
23
- href="https://cdn.jsdelivr.net/npm/prismjs@1.24.1/themes/prism.css"
24
- />
25
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@latest/dist/auro-classic/CSSCustomProperties.css">
26
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@latest/dist/alaska/CSSCustomProperties--alaska.css">
19
+ <title>Auro Web Component Demo | auro-menu</title>
20
+
21
+ <!-- Prism.js Stylesheet -->
22
+ <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/prismjs@1.24.1/themes/prism.css"/>
23
+
24
+ <!-- Legacy reference is still needed to support auro-menu's use of legacy token values at this time -->
25
+ <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@latest/dist/legacy/auro-classic/CSSCustomProperties.css"/>
26
+
27
+ <!-- Design Token Alaska Theme -->
28
+ <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@latest/dist/themes/alaska/CSSCustomProperties--alaska.min.css"/>
29
+
30
+ <!-- Webcore Stylesheet Alaska Theme -->
31
+ <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/bundled/themes/alaska.global.min.css" />
32
+
33
+ <!-- Demo Specific Styles -->
27
34
  <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/demoWrapper.css" />
28
35
  <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/elementDemoStyles.css" />
29
- </head>
36
+ </head>
30
37
  <body class="auro-markdown">
31
38
  <main></main>
32
39
 
@@ -7,7 +7,6 @@
7
7
  * @attr {boolean} nocheckmark - When true, selected option will not show the checkmark.
8
8
  * @attr {boolean} loading - When true, displays a loading state using the loadingIcon and loadingText slots if provided.
9
9
  * @attr {boolean} multiselect - When true, the selected option can be multiple options.
10
- * @attr {String|Array<string>} value - Value selected for the menu, type `string` by default. In multi-select mode, `value` is an array of strings.
11
10
  * @prop {boolean} hasLoadingPlaceholder - Indicates whether the menu has a loadingIcon or loadingText to render when in a loading state.
12
11
  * @event {CustomEvent<Element>} auroMenu-activatedOption - Notifies that a menuoption has been made `active`.
13
12
  * @event {CustomEvent<any>} auroMenu-customEventFired - Notifies that a custom event has been fired.
@@ -19,7 +18,7 @@
19
18
  * @slot loadingIcon - Icon to show while loading attribute is set
20
19
  * @slot - Slot for insertion of menu options.
21
20
  */
22
- export class AuroMenu extends LitElement {
21
+ export class AuroMenu extends AuroElement {
23
22
  static get properties(): {
24
23
  noCheckmark: {
25
24
  type: BooleanConstructor;
@@ -50,8 +49,27 @@ export class AuroMenu extends LitElement {
50
49
  reflect: boolean;
51
50
  attribute: string;
52
51
  };
52
+ /**
53
+ * Value selected for the component.
54
+ */
53
55
  value: {
54
- type: ObjectConstructor;
56
+ type: StringConstructor;
57
+ reflect: boolean;
58
+ attribute: string;
59
+ };
60
+ /**
61
+ * Indent level for submenus.
62
+ * @private
63
+ */
64
+ level: {
65
+ type: NumberConstructor;
66
+ reflect: boolean;
67
+ attribute: boolean;
68
+ };
69
+ layout: {
70
+ type: StringConstructor;
71
+ attribute: string;
72
+ reflect: boolean;
55
73
  };
56
74
  };
57
75
  static get styles(): import("lit").CSSResult[];
@@ -64,6 +82,8 @@ export class AuroMenu extends LitElement {
64
82
  *
65
83
  */
66
84
  static register(name?: string): void;
85
+ shape: string;
86
+ size: string;
67
87
  value: any;
68
88
  optionSelected: any;
69
89
  matchWord: any;
@@ -94,8 +114,21 @@ export class AuroMenu extends LitElement {
94
114
  * @private
95
115
  */
96
116
  private handleSlotChange;
117
+ /**
118
+ * Formatted value based on `multiSelect` state.
119
+ * Default type is `String`, changing to `Array<String>` when `multiSelect` is true.
120
+ * @private
121
+ * @returns {String|Array<String>}
122
+ */
123
+ private get formattedValue();
97
124
  firstUpdated(): void;
98
125
  loadingSlots: NodeListOf<Element>;
126
+ /**
127
+ * Sets an attribute that matches the default tag name if the tag name is not the default.
128
+ * @param {string} tagName - The tag name to set as an attribute.
129
+ * @private
130
+ */
131
+ private setTagAttribute;
99
132
  updated(changedProperties: any): void;
100
133
  index: any;
101
134
  /**
@@ -192,9 +225,10 @@ export class AuroMenu extends LitElement {
192
225
  */
193
226
  get hasLoadingPlaceholder(): boolean;
194
227
  /**
195
- * Renders the component.
196
- * @returns {boolean} - True if loading slots are present and non-empty.
228
+ * Logic to determine the layout of the component.
229
+ * @protected
230
+ * @returns {void}
197
231
  */
198
- render(): boolean;
232
+ protected renderLayout(): void;
199
233
  }
200
- import { LitElement } from "lit";
234
+ import { AuroElement } from "../../layoutElement/src/auroElement.js";