@aurodesignsystem-dev/auro-formkit 0.0.0-pr624.2 → 0.0.0-pr624.21

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 (108) hide show
  1. package/components/bibtemplate/dist/auro-bibtemplate.d.ts +13 -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 +1292 -79
  5. package/components/bibtemplate/dist/registered.js +1292 -79
  6. package/components/checkbox/README.md +1 -1
  7. package/components/checkbox/demo/api.md +8 -9
  8. package/components/checkbox/demo/api.min.js +30 -24
  9. package/components/checkbox/demo/index.md +2 -2
  10. package/components/checkbox/demo/index.min.js +30 -24
  11. package/components/checkbox/demo/readme.md +1 -1
  12. package/components/checkbox/dist/auro-checkbox.d.ts +3 -3
  13. package/components/checkbox/dist/index.js +30 -24
  14. package/components/checkbox/dist/registered.js +30 -24
  15. package/components/combobox/demo/api.md +53 -0
  16. package/components/combobox/demo/api.min.js +2898 -753
  17. package/components/combobox/demo/index.md +6 -0
  18. package/components/combobox/demo/index.min.js +2898 -753
  19. package/components/combobox/dist/auro-combobox.d.ts +12 -12
  20. package/components/combobox/dist/index.js +2646 -642
  21. package/components/combobox/dist/registered.js +2646 -642
  22. package/components/counter/demo/api.md +21 -19
  23. package/components/counter/demo/api.min.js +3648 -929
  24. package/components/counter/demo/index.md +99 -34
  25. package/components/counter/demo/index.min.js +3648 -929
  26. package/components/counter/dist/auro-counter-button.d.ts +2 -0
  27. package/components/counter/dist/auro-counter-group.d.ts +105 -6
  28. package/components/counter/dist/auro-counter.d.ts +6 -0
  29. package/components/counter/dist/helptextVersion.d.ts +2 -0
  30. package/components/counter/dist/iconVersion.d.ts +1 -1
  31. package/components/counter/dist/index.js +3648 -929
  32. package/components/counter/dist/registered.js +3648 -929
  33. package/components/datepicker/demo/api.md +36 -19
  34. package/components/datepicker/demo/api.min.js +11437 -7744
  35. package/components/datepicker/demo/index.md +80 -0
  36. package/components/datepicker/demo/index.min.js +11437 -7744
  37. package/components/datepicker/dist/auro-datepicker.d.ts +71 -3
  38. package/components/datepicker/dist/buttonVersion.d.ts +1 -1
  39. package/components/datepicker/dist/iconVersion.d.ts +2 -0
  40. package/components/datepicker/dist/index.js +13847 -10154
  41. package/components/datepicker/dist/popoverVersion.d.ts +1 -1
  42. package/components/datepicker/dist/registered.js +13847 -10154
  43. package/components/dropdown/demo/api.md +6 -7
  44. package/components/dropdown/demo/api.min.js +238 -144
  45. package/components/dropdown/demo/index.md +57 -9
  46. package/components/dropdown/demo/index.min.js +238 -144
  47. package/components/dropdown/dist/auro-dropdown.d.ts +10 -9
  48. package/components/dropdown/dist/auro-dropdownBib.d.ts +22 -0
  49. package/components/dropdown/dist/index.js +238 -144
  50. package/components/dropdown/dist/registered.js +238 -144
  51. package/components/form/demo/api.min.js +1 -1
  52. package/components/form/demo/index.min.js +1 -1
  53. package/components/form/dist/index.js +1 -1
  54. package/components/form/dist/registered.js +1 -1
  55. package/components/helptext/dist/index.js +2 -2
  56. package/components/helptext/dist/registered.js +2 -2
  57. package/components/input/demo/api.md +63 -56
  58. package/components/input/demo/api.min.js +983 -269
  59. package/components/input/demo/index.min.js +982 -268
  60. package/components/input/dist/auro-input.d.ts +202 -14
  61. package/components/input/dist/base-input.d.ts +30 -7
  62. package/components/input/dist/buttonVersion.d.ts +1 -1
  63. package/components/input/dist/iconVersion.d.ts +1 -1
  64. package/components/input/dist/index.js +982 -268
  65. package/components/input/dist/registered.js +982 -268
  66. package/components/layoutElement/dist/index.js +13 -10
  67. package/components/menu/demo/api.html +38 -0
  68. package/components/menu/demo/api.md +68 -7
  69. package/components/menu/demo/api.min.js +278 -42
  70. package/components/menu/demo/index.min.js +278 -42
  71. package/components/menu/dist/auro-menu.d.ts +28 -5
  72. package/components/menu/dist/auro-menuoption.d.ts +15 -3
  73. package/components/menu/dist/iconVersion.d.ts +1 -1
  74. package/components/menu/dist/index.js +278 -42
  75. package/components/menu/dist/registered.js +278 -42
  76. package/components/menu/dist/styles/default/color-menuoption-css.d.ts +2 -0
  77. package/components/menu/dist/styles/default/style-menu-css.d.ts +2 -0
  78. package/components/menu/dist/styles/default/style-menuoption-css.d.ts +2 -0
  79. package/components/menu/dist/styles/default/tokens-css.d.ts +2 -0
  80. package/components/radio/demo/api.md +2 -2
  81. package/components/radio/demo/api.min.js +10 -7
  82. package/components/radio/demo/index.min.js +10 -7
  83. package/components/radio/dist/auro-radio.d.ts +1 -1
  84. package/components/radio/dist/index.js +10 -7
  85. package/components/radio/dist/registered.js +10 -7
  86. package/components/select/demo/api.js +2 -0
  87. package/components/select/demo/api.md +78 -12
  88. package/components/select/demo/api.min.js +2797 -538
  89. package/components/select/demo/index.html +1 -0
  90. package/components/select/demo/index.md +325 -763
  91. package/components/select/demo/index.min.js +2790 -543
  92. package/components/select/dist/auro-select.d.ts +111 -11
  93. package/components/select/dist/helptextVersion.d.ts +2 -0
  94. package/components/select/dist/index.js +2533 -427
  95. package/components/select/dist/registered.js +2533 -427
  96. package/components/select/dist/styles/shapeSize-css.d.ts +2 -0
  97. package/components/select/dist/styles/tokens-css.d.ts +2 -0
  98. package/package.json +6 -4
  99. /package/components/{dropdown/dist/styles/default/bibColors-css.d.ts → counter/dist/styles/shapeSize-css.d.ts} +0 -0
  100. /package/components/{dropdown → datepicker}/dist/styles/default/color-css.d.ts +0 -0
  101. /package/components/{dropdown/dist/styles/default/bibStyles-css.d.ts → datepicker/dist/styles/shapeSize-css.d.ts} +0 -0
  102. /package/components/{dropdown/dist/styles/default/style-css.d.ts → datepicker/dist/styles/snowflake/color-css.d.ts} +0 -0
  103. /package/components/{dropdown/dist/styles → datepicker/dist/styles/snowflake}/style-css.d.ts +0 -0
  104. /package/components/{menu/dist/styles/color-menu-css.d.ts → dropdown/dist/styles/classic/bibColors-css.d.ts} +0 -0
  105. /package/components/{menu/dist/styles/color-menuoption-css.d.ts → dropdown/dist/styles/classic/bibStyles-css.d.ts} +0 -0
  106. /package/components/{menu/dist/styles/style-menu-css.d.ts → dropdown/dist/styles/classic/color-css.d.ts} +0 -0
  107. /package/components/{menu/dist/styles/style-menuoption-css.d.ts → dropdown/dist/styles/classic/style-css.d.ts} +0 -0
  108. /package/components/menu/dist/styles/{tokens-css.d.ts → default/color-menu-css.d.ts} +0 -0
@@ -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.
@@ -37,7 +132,7 @@ var tokensCss$1 = i$5`:host{--ds-auro-menu-divider-color: var(--ds-basic-color-b
37
132
 
38
133
  /* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
39
134
 
40
- class AuroLibraryRuntimeUtils {
135
+ let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
41
136
 
42
137
  /* eslint-disable jsdoc/require-param */
43
138
 
@@ -98,7 +193,7 @@ class AuroLibraryRuntimeUtils {
98
193
 
99
194
  return elemTag === tag || elem.hasAttribute(tag);
100
195
  }
101
- }
196
+ };
102
197
 
103
198
  // Copyright (c) 2021 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
104
199
  // See LICENSE in the project root for license information.
@@ -164,14 +259,17 @@ function dispatchMenuEvent(element, eventName, detail = null) {
164
259
  * @slot - Slot for insertion of menu options.
165
260
  */
166
261
 
167
- /* eslint-disable no-magic-numbers, max-lines, no-extra-parens */
262
+ /* eslint-disable no-magic-numbers, max-lines, no-extra-parens, no-inline-comments, line-comment-position */
168
263
 
169
- class AuroMenu extends i$2 {
264
+ class AuroMenu extends AuroElement$1 {
170
265
  constructor() {
171
266
  super();
172
267
 
173
268
  // State properties (reactive)
174
269
 
270
+ this.shape = ""; // box, rounded, pill
271
+ this.size = ""; // md, lg, xl
272
+
175
273
  // Value of the selected options
176
274
  this.value = undefined;
177
275
  // Currently selected option
@@ -230,6 +328,7 @@ class AuroMenu extends i$2 {
230
328
 
231
329
  static get properties() {
232
330
  return {
331
+ ...super.properties,
233
332
  noCheckmark: {
234
333
  type: Boolean,
235
334
  reflect: true,
@@ -263,6 +362,16 @@ class AuroMenu extends i$2 {
263
362
  value: {
264
363
  // Allow string, string[] arrays and undefined
265
364
  type: Object
365
+ },
366
+
367
+ /**
368
+ * Indent level for submenus.
369
+ * @private
370
+ */
371
+ level: {
372
+ type: Number,
373
+ reflect: false,
374
+ attribute: false
266
375
  }
267
376
  };
268
377
  }
@@ -284,7 +393,7 @@ class AuroMenu extends i$2 {
284
393
  *
285
394
  */
286
395
  static register(name = "auro-menu") {
287
- AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroMenu);
396
+ AuroLibraryRuntimeUtils$1.prototype.registerComponent(name, AuroMenu);
288
397
  }
289
398
 
290
399
  // Lifecycle Methods
@@ -296,6 +405,7 @@ class AuroMenu extends i$2 {
296
405
  this.addEventListener('mousedown', this.handleMouseSelect);
297
406
  this.addEventListener('auroMenuOption-mouseover', this.handleOptionHover);
298
407
  this.addEventListener('slotchange', this.handleSlotChange);
408
+ this.setTagAttribute("auro-menu");
299
409
  }
300
410
 
301
411
  disconnectedCallback() {
@@ -308,19 +418,33 @@ class AuroMenu extends i$2 {
308
418
  }
309
419
 
310
420
  firstUpdated() {
311
- AuroLibraryRuntimeUtils.prototype.handleComponentTagRename(this, 'auro-menu');
421
+ AuroLibraryRuntimeUtils$1.prototype.handleComponentTagRename(this, 'auro-menu');
312
422
 
313
423
  this.loadingSlots = this.querySelectorAll("[slot='loadingText'], [slot='loadingIcon']");
314
424
  this.initializeMenu();
315
425
  }
316
426
 
427
+ /**
428
+ * Sets an attribute that matches the default tag name if the tag name is not the default.
429
+ * @param {string} tagName - The tag name to set as an attribute.
430
+ * @private
431
+ */
432
+ setTagAttribute(tagName) {
433
+ if (this.tagName.toLowerCase() !== tagName) {
434
+ this.setAttribute(tagName, true);
435
+ }
436
+ }
437
+
317
438
  updated(changedProperties) {
439
+ super.updated(changedProperties);
440
+
318
441
  if (changedProperties.has('multiSelect')) {
319
442
  // Reset selection if multiSelect mode changes
320
443
  this.clearSelection();
321
444
  }
322
445
 
323
- if (changedProperties.has('value')) {
446
+
447
+ if (changedProperties.has("value")) {
324
448
  // Handle null/undefined case
325
449
  if (this.value === undefined || this.value === null) {
326
450
  this.optionSelected = undefined;
@@ -388,6 +512,19 @@ class AuroMenu extends i$2 {
388
512
  this.querySelectorAll('auro-menu, [auro-menu], auro-menuoption, [auro-menuoption]').forEach((element) => element.setAttribute('noCheckmark', ''));
389
513
  }
390
514
 
515
+ // Handle layout propagation to all menus and options
516
+ const propagationTargets = this.querySelectorAll('auro-menu, [auro-menu], auro-menuoption, [auro-menuoption]');
517
+ [
518
+ 'size',
519
+ 'shape'
520
+ ].forEach((prop) => {
521
+ if (changedProperties.has(prop)) {
522
+ propagationTargets.forEach((el) => {
523
+ el.setAttribute(prop, this[prop]);
524
+ });
525
+ }
526
+ });
527
+
391
528
  // Regex for matchWord if needed
392
529
  let regexWord = null;
393
530
 
@@ -584,21 +721,20 @@ class AuroMenu extends i$2 {
584
721
  * @param {HTMLElement} menu - Root menu element.
585
722
  */
586
723
  handleNestedMenus(menu) {
587
- const nestedMenus = menu.querySelectorAll('auro-menu, [auro-menu]');
724
+ menu.level = menu.parentElement.level >= 0 ? menu.parentElement.level + 1 : 0;
588
725
 
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');
726
+ if (menu.level > 0) {
727
+ menu.setAttribute('role', 'group');
728
+ menu.removeAttribute("root");
729
+ if (!menu.hasAttribute('aria-label')) {
730
+ menu.setAttribute('aria-label', 'submenu');
594
731
  }
732
+ }
595
733
 
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);
734
+ const options = menu.querySelectorAll(':scope > auro-menuoption, :scope > [auro-menuoption]');
735
+ options.forEach((option) => {
736
+ const regex = new RegExp(this.nestingSpacer, "gu");
737
+ option.innerHTML = this.nestingSpacer.repeat(menu.level) + option.innerHTML.replace(regex, '');
602
738
  });
603
739
  }
604
740
 
@@ -840,22 +976,33 @@ class AuroMenu extends i$2 {
840
976
  }
841
977
 
842
978
  /**
843
- * Renders the component.
844
- * @returns {boolean} - True if loading slots are present and non-empty.
979
+ * Logic to determine the layout of the component.
980
+ * @protected
981
+ * @returns {void}
845
982
  */
846
- render() {
983
+ renderLayout() {
847
984
  if (this.loading) {
848
985
  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>
986
+ <div class="wrapper">
987
+ <auro-menuoption
988
+ disabled
989
+ loadingplaceholder
990
+ class="${this.hasLoadingPlaceholder ? "" : "empty"}"
991
+ >
992
+ <div>
993
+ <slot name="loadingIcon"></slot>
994
+ <slot name="loadingText"></slot>
995
+ </div>
996
+ </auro-menuoption>
997
+ </div>
855
998
  `;
856
999
  }
857
1000
 
858
- return x`<slot @slotchange=${this.handleSlotChange}></slot>`;
1001
+ return x`
1002
+ <div class="wrapper">
1003
+ <slot @slotchange=${this.handleSlotChange}></slot>
1004
+ </div>
1005
+ `;
859
1006
  }
860
1007
  }
861
1008
 
@@ -866,9 +1013,9 @@ class AuroMenu extends i$2 {
866
1013
  */
867
1014
  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
1015
 
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}`;
1016
+ 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) + 24px + 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);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);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) + 24px + 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
1017
 
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)}`;
1018
+ 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
1019
 
873
1020
  // Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
874
1021
  // See LICENSE in the project root for license information.
@@ -1083,6 +1230,76 @@ var tokensCss = i$5`:host{--ds-auro-icon-color:var(--ds-basic-color-texticon-def
1083
1230
 
1084
1231
  var colorCss = i$5`:host{color:var(--ds-auro-icon-color)}:host([customColor]){color:inherit}:host(:not([onDark])[variant=accent1]){--ds-auro-icon-color:var(--ds-basic-color-texticon-accent1, #265688)}:host(:not([onDark])[variant=disabled]){--ds-auro-icon-color:var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host(:not([onDark])[variant=muted]){--ds-auro-icon-color:var(--ds-basic-color-texticon-muted, #676767)}:host(:not([onDark])[variant=statusDefault]){--ds-auro-icon-color:var(--ds-basic-color-status-default, #afb9c6)}:host(:not([onDark])[variant=statusInfo]){--ds-auro-icon-color:var(--ds-basic-color-status-info, #01426a)}:host(:not([onDark])[variant=statusSuccess]){--ds-auro-icon-color:var(--ds-basic-color-status-success, #447a1f)}:host(:not([onDark])[variant=statusWarning]){--ds-auro-icon-color:var(--ds-basic-color-status-warning, #fac200)}:host(:not([onDark])[variant=statusError]){--ds-auro-icon-color:var(--ds-basic-color-status-error, #e31f26)}:host(:not([onDark])[variant=statusInfoSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-info-subtle, #ebf3f9)}:host(:not([onDark])[variant=statusSuccessSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-success-subtle, #d6eac7)}:host(:not([onDark])[variant=statusWarningSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-warning-subtle, #fff0b2)}:host(:not([onDark])[variant=statusErrorSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-error-subtle, #fbc6c6)}:host(:not([onDark])[variant=fareBasicEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-basiceconomy, #97eaf8)}:host(:not([onDark])[variant=fareBusiness]){--ds-auro-icon-color:var(--ds-basic-color-fare-business, #01426a)}:host(:not([onDark])[variant=fareEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-economy, #0074ca)}:host(:not([onDark])[variant=fareFirst]){--ds-auro-icon-color:var(--ds-basic-color-fare-first, #00274a)}:host(:not([onDark])[variant=farePremiumEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-premiumeconomy, #005154)}:host(:not([onDark])[variant=tierOneWorldEmerald]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-emerald, #139142)}:host(:not([onDark])[variant=tierOneWorldSapphire]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-sapphire, #015daa)}:host(:not([onDark])[variant=tierOneWorldRuby]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-ruby, #a41d4a)}:host([onDark]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse, #ffffff)}:host([onDark][variant=disabled]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}:host([onDark][variant=muted]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([onDark][variant=statusError]){--ds-auro-icon-color:var(--ds-advanced-color-state-error-inverse, #f9a4a8)}`;
1085
1232
 
1233
+ // Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
1234
+ // See LICENSE in the project root for license information.
1235
+
1236
+ // ---------------------------------------------------------------------
1237
+
1238
+ /* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
1239
+
1240
+ class AuroLibraryRuntimeUtils {
1241
+
1242
+ /* eslint-disable jsdoc/require-param */
1243
+
1244
+ /**
1245
+ * This will register a new custom element with the browser.
1246
+ * @param {String} name - The name of the custom element.
1247
+ * @param {Object} componentClass - The class to register as a custom element.
1248
+ * @returns {void}
1249
+ */
1250
+ registerComponent(name, componentClass) {
1251
+ if (!customElements.get(name)) {
1252
+ customElements.define(name, class extends componentClass {});
1253
+ }
1254
+ }
1255
+
1256
+ /**
1257
+ * Finds and returns the closest HTML Element based on a selector.
1258
+ * @returns {void}
1259
+ */
1260
+ closestElement(
1261
+ selector, // selector like in .closest()
1262
+ base = this, // extra functionality to skip a parent
1263
+ __Closest = (el, found = el && el.closest(selector)) =>
1264
+ !el || el === document || el === window
1265
+ ? null // standard .closest() returns null for non-found selectors also
1266
+ : found
1267
+ ? found // found a selector INside this element
1268
+ : __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
1269
+ ) {
1270
+ return __Closest(base);
1271
+ }
1272
+ /* eslint-enable jsdoc/require-param */
1273
+
1274
+ /**
1275
+ * 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.
1276
+ * @param {Object} elem - The element to check.
1277
+ * @param {String} tagName - The name of the Auro component to check for or add as an attribute.
1278
+ * @returns {void}
1279
+ */
1280
+ handleComponentTagRename(elem, tagName) {
1281
+ const tag = tagName.toLowerCase();
1282
+ const elemTag = elem.tagName.toLowerCase();
1283
+
1284
+ if (elemTag !== tag) {
1285
+ elem.setAttribute(tag, true);
1286
+ }
1287
+ }
1288
+
1289
+ /**
1290
+ * Validates if an element is a specific Auro component.
1291
+ * @param {Object} elem - The element to validate.
1292
+ * @param {String} tagName - The name of the Auro component to check against.
1293
+ * @returns {Boolean} - Returns true if the element is the specified Auro component.
1294
+ */
1295
+ elementMatch(elem, tagName) {
1296
+ const tag = tagName.toLowerCase();
1297
+ const elemTag = elem.tagName.toLowerCase();
1298
+
1299
+ return elemTag === tag || elem.hasAttribute(tag);
1300
+ }
1301
+ }
1302
+
1086
1303
  // Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
1087
1304
  // See LICENSE in the project root for license information.
1088
1305
 
@@ -1205,8 +1422,12 @@ class AuroIcon extends BaseIcon {
1205
1422
  async firstUpdated() {
1206
1423
  await super.firstUpdated();
1207
1424
 
1208
- // Removes the SVG description for screenreader if ariaHidden is set to true
1209
- if (!this.hasAttribute('ariaHidden') && this.svg) {
1425
+ /**
1426
+ * icons provide a description for screen readers. Icon only instances Auro-button
1427
+ * depend on this description to provide context for the user using a screen reader.
1428
+ * Removes the SVG description for screen reader if ariaHidden is set to true.
1429
+ */
1430
+ if (this.hasAttribute('ariaHidden') && this.svg) {
1210
1431
  const svgDesc = this.svg.querySelector('desc');
1211
1432
 
1212
1433
  if (svgDesc) {
@@ -1250,7 +1471,7 @@ class AuroIcon extends BaseIcon {
1250
1471
  }
1251
1472
  }
1252
1473
 
1253
- var iconVersion = '8.0.3';
1474
+ var iconVersion = '8.0.4';
1254
1475
 
1255
1476
  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>"};
1256
1477
 
@@ -1268,10 +1489,13 @@ var checkmarkIcon = {"svg":"<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlin
1268
1489
  * @event auroMenuOption-mouseover - Notifies that this option has been hovered over.
1269
1490
  * @slot - Specifies text for an option, but is not the value.
1270
1491
  */
1271
- class AuroMenuOption extends i$2 {
1492
+ class AuroMenuOption extends AuroElement$1 {
1272
1493
  constructor() {
1273
1494
  super();
1274
1495
 
1496
+ this.size = ""; // md, lg, xl
1497
+ this.shape = ""; // box, rounded, pill
1498
+
1275
1499
  /**
1276
1500
  * Generate unique names for dependency components.
1277
1501
  */
@@ -1290,11 +1514,12 @@ class AuroMenuOption extends i$2 {
1290
1514
  /**
1291
1515
  * @private
1292
1516
  */
1293
- this.runtimeUtils = new AuroLibraryRuntimeUtils();
1517
+ this.runtimeUtils = new AuroLibraryRuntimeUtils$1();
1294
1518
  }
1295
1519
 
1296
1520
  static get properties() {
1297
1521
  return {
1522
+ ...super.properties,
1298
1523
  nocheckmark: {
1299
1524
  type: Boolean,
1300
1525
  reflect: true
@@ -1334,7 +1559,7 @@ class AuroMenuOption extends i$2 {
1334
1559
  *
1335
1560
  */
1336
1561
  static register(name = "auro-menuoption") {
1337
- AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroMenuOption);
1562
+ AuroLibraryRuntimeUtils$1.prototype.registerComponent(name, AuroMenuOption);
1338
1563
  }
1339
1564
 
1340
1565
  firstUpdated() {
@@ -1356,6 +1581,8 @@ class AuroMenuOption extends i$2 {
1356
1581
 
1357
1582
  // observer for selected property changes
1358
1583
  updated(changedProperties) {
1584
+ super.updated(changedProperties);
1585
+
1359
1586
  if (changedProperties.has('selected')) {
1360
1587
  this.setAttribute('aria-selected', this.selected.toString());
1361
1588
  }
@@ -1377,10 +1604,19 @@ class AuroMenuOption extends i$2 {
1377
1604
  return u`<${this.iconTag} customColor customSvg slot="icon">${svg}</${this.iconTag}>`;
1378
1605
  }
1379
1606
 
1380
- render() {
1607
+ /**
1608
+ * Logic to determine the layout of the component.
1609
+ * @protected
1610
+ * @returns {void}
1611
+ */
1612
+ renderLayout() {
1381
1613
  return u`
1382
- ${this.selected && !this.nocheckmark ? this.generateIconHtml(checkmarkIcon.svg) : undefined}
1383
- <slot></slot>
1614
+ <div class="wrapper">
1615
+ ${this.selected && !this.nocheckmark
1616
+ ? this.generateIconHtml(checkmarkIcon.svg)
1617
+ : undefined}
1618
+ <slot></slot>
1619
+ </div>
1384
1620
  `;
1385
1621
  }
1386
1622
  }
@@ -19,7 +19,7 @@
19
19
  * @slot loadingIcon - Icon to show while loading attribute is set
20
20
  * @slot - Slot for insertion of menu options.
21
21
  */
22
- export class AuroMenu extends LitElement {
22
+ export class AuroMenu extends AuroElement {
23
23
  static get properties(): {
24
24
  noCheckmark: {
25
25
  type: BooleanConstructor;
@@ -53,6 +53,20 @@ export class AuroMenu extends LitElement {
53
53
  value: {
54
54
  type: ObjectConstructor;
55
55
  };
56
+ /**
57
+ * Indent level for submenus.
58
+ * @private
59
+ */
60
+ level: {
61
+ type: NumberConstructor;
62
+ reflect: boolean;
63
+ attribute: boolean;
64
+ };
65
+ layout: {
66
+ type: StringConstructor;
67
+ attribute: string;
68
+ reflect: boolean;
69
+ };
56
70
  };
57
71
  static get styles(): import("lit").CSSResult[];
58
72
  /**
@@ -64,6 +78,8 @@ export class AuroMenu extends LitElement {
64
78
  *
65
79
  */
66
80
  static register(name?: string): void;
81
+ shape: string;
82
+ size: string;
67
83
  value: any;
68
84
  optionSelected: any;
69
85
  matchWord: any;
@@ -96,6 +112,12 @@ export class AuroMenu extends LitElement {
96
112
  private handleSlotChange;
97
113
  firstUpdated(): void;
98
114
  loadingSlots: NodeListOf<Element>;
115
+ /**
116
+ * Sets an attribute that matches the default tag name if the tag name is not the default.
117
+ * @param {string} tagName - The tag name to set as an attribute.
118
+ * @private
119
+ */
120
+ private setTagAttribute;
99
121
  updated(changedProperties: any): void;
100
122
  index: any;
101
123
  /**
@@ -192,9 +214,10 @@ export class AuroMenu extends LitElement {
192
214
  */
193
215
  get hasLoadingPlaceholder(): boolean;
194
216
  /**
195
- * Renders the component.
196
- * @returns {boolean} - True if loading slots are present and non-empty.
217
+ * Logic to determine the layout of the component.
218
+ * @protected
219
+ * @returns {void}
197
220
  */
198
- render(): boolean;
221
+ protected renderLayout(): void;
199
222
  }
200
- import { LitElement } from "lit";
223
+ import { AuroElement } from "../../layoutElement/src/auroElement.js";
@@ -8,7 +8,7 @@
8
8
  * @event auroMenuOption-mouseover - Notifies that this option has been hovered over.
9
9
  * @slot - Specifies text for an option, but is not the value.
10
10
  */
11
- export class AuroMenuOption extends LitElement {
11
+ export class AuroMenuOption extends AuroElement {
12
12
  static get properties(): {
13
13
  nocheckmark: {
14
14
  type: BooleanConstructor;
@@ -29,6 +29,11 @@ export class AuroMenuOption extends LitElement {
29
29
  type: NumberConstructor;
30
30
  reflect: boolean;
31
31
  };
32
+ layout: {
33
+ type: StringConstructor;
34
+ attribute: string;
35
+ reflect: boolean;
36
+ };
32
37
  };
33
38
  static get styles(): import("lit").CSSResult[];
34
39
  /**
@@ -40,6 +45,8 @@ export class AuroMenuOption extends LitElement {
40
45
  *
41
46
  */
42
47
  static register(name?: string): void;
48
+ size: string;
49
+ shape: string;
43
50
  iconTag: any;
44
51
  selected: boolean;
45
52
  nocheckmark: boolean;
@@ -58,6 +65,11 @@ export class AuroMenuOption extends LitElement {
58
65
  * @returns {Element} The HTML element containing the SVG icon.
59
66
  */
60
67
  private generateIconHtml;
61
- render(): import("lit-html").TemplateResult;
68
+ /**
69
+ * Logic to determine the layout of the component.
70
+ * @protected
71
+ * @returns {void}
72
+ */
73
+ protected renderLayout(): void;
62
74
  }
63
- import { LitElement } from "lit";
75
+ import { AuroElement } from "../../layoutElement/src/auroElement.js";
@@ -1,2 +1,2 @@
1
- declare const _default: "8.0.3";
1
+ declare const _default: "8.0.4";
2
2
  export default _default;