@aurodesignsystem-dev/auro-formkit 0.0.0-pr740.9 → 0.0.0-pr750.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (94) hide show
  1. package/components/bibtemplate/dist/auro-bibtemplate.d.ts +6 -0
  2. package/components/bibtemplate/dist/index.js +25 -1
  3. package/components/bibtemplate/dist/registered.js +25 -1
  4. package/components/checkbox/demo/api.html +16 -10
  5. package/components/checkbox/demo/api.min.js +23 -16
  6. package/components/checkbox/demo/index.html +16 -10
  7. package/components/checkbox/demo/index.min.js +23 -16
  8. package/components/checkbox/demo/readme.html +16 -9
  9. package/components/checkbox/dist/index.js +23 -16
  10. package/components/checkbox/dist/registered.js +23 -16
  11. package/components/combobox/demo/api.html +16 -10
  12. package/components/combobox/demo/api.md +12 -6
  13. package/components/combobox/demo/api.min.js +442 -148
  14. package/components/combobox/demo/index.html +16 -10
  15. package/components/combobox/demo/index.min.js +442 -148
  16. package/components/combobox/demo/readme.html +16 -9
  17. package/components/combobox/dist/index.js +405 -136
  18. package/components/combobox/dist/registered.js +405 -136
  19. package/components/counter/demo/api.html +17 -10
  20. package/components/counter/demo/api.md +140 -7
  21. package/components/counter/demo/api.min.js +1171 -1016
  22. package/components/counter/demo/index.html +17 -10
  23. package/components/counter/demo/index.md +86 -0
  24. package/components/counter/demo/index.min.js +1171 -1016
  25. package/components/counter/demo/readme.html +16 -9
  26. package/components/counter/dist/auro-counter-group.d.ts +64 -23
  27. package/components/counter/dist/auro-counter.d.ts +10 -0
  28. package/components/counter/dist/index.js +1171 -1016
  29. package/components/counter/dist/registered.js +1171 -1016
  30. package/components/datepicker/demo/api.html +16 -10
  31. package/components/datepicker/demo/api.min.js +403 -123
  32. package/components/datepicker/demo/index.html +16 -10
  33. package/components/datepicker/demo/index.min.js +403 -123
  34. package/components/datepicker/demo/readme.html +16 -9
  35. package/components/datepicker/dist/auro-datepicker.d.ts +6 -0
  36. package/components/datepicker/dist/index.js +403 -123
  37. package/components/datepicker/dist/registered.js +403 -123
  38. package/components/dropdown/demo/api.html +16 -10
  39. package/components/dropdown/demo/api.md +77 -269
  40. package/components/dropdown/demo/api.min.js +336 -96
  41. package/components/dropdown/demo/index.html +16 -10
  42. package/components/dropdown/demo/index.md +45 -363
  43. package/components/dropdown/demo/index.min.js +336 -96
  44. package/components/dropdown/demo/readme.html +16 -9
  45. package/components/dropdown/dist/auro-dropdown.d.ts +35 -67
  46. package/components/dropdown/dist/auro-dropdownBib.d.ts +0 -6
  47. package/components/dropdown/dist/index.js +336 -96
  48. package/components/dropdown/dist/registered.js +336 -96
  49. package/components/form/demo/api.html +16 -9
  50. package/components/form/demo/autocomplete.html +19 -3
  51. package/components/form/demo/index.html +16 -9
  52. package/components/form/demo/readme.html +16 -9
  53. package/components/form/demo/working.html +19 -13
  54. package/components/helptext/dist/index.js +1 -1
  55. package/components/helptext/dist/registered.js +1 -1
  56. package/components/input/demo/api.html +16 -10
  57. package/components/input/demo/api.md +1 -1
  58. package/components/input/demo/api.min.js +14 -14
  59. package/components/input/demo/index.html +16 -10
  60. package/components/input/demo/index.min.js +14 -14
  61. package/components/input/demo/readme.html +16 -9
  62. package/components/input/dist/base-input.d.ts +1 -1
  63. package/components/input/dist/index.js +14 -14
  64. package/components/input/dist/registered.js +14 -14
  65. package/components/menu/demo/api.html +16 -32
  66. package/components/menu/demo/api.md +1 -1
  67. package/components/menu/demo/api.min.js +37 -12
  68. package/components/menu/demo/index.html +16 -10
  69. package/components/menu/demo/index.min.js +37 -12
  70. package/components/menu/demo/readme.html +16 -9
  71. package/components/menu/dist/auro-menu.d.ts +13 -2
  72. package/components/menu/dist/index.js +37 -12
  73. package/components/menu/dist/registered.js +37 -12
  74. package/components/radio/demo/api.html +16 -10
  75. package/components/radio/demo/api.md +0 -1
  76. package/components/radio/demo/api.min.js +61 -76
  77. package/components/radio/demo/index.html +16 -10
  78. package/components/radio/demo/index.min.js +61 -76
  79. package/components/radio/demo/readme.html +16 -9
  80. package/components/radio/dist/auro-radio.d.ts +8 -11
  81. package/components/radio/dist/index.js +61 -76
  82. package/components/radio/dist/registered.js +61 -76
  83. package/components/select/demo/api.html +16 -10
  84. package/components/select/demo/api.js +0 -2
  85. package/components/select/demo/api.md +53 -51
  86. package/components/select/demo/api.min.js +520 -358
  87. package/components/select/demo/index.html +16 -11
  88. package/components/select/demo/index.md +6 -158
  89. package/components/select/demo/index.min.js +520 -346
  90. package/components/select/demo/readme.html +16 -9
  91. package/components/select/dist/auro-select.d.ts +33 -8
  92. package/components/select/dist/index.js +483 -334
  93. package/components/select/dist/registered.js +483 -334
  94. package/package.json +26 -25
@@ -90,17 +90,6 @@ function auroMenuLoadingExample() {
90
90
  });
91
91
  }
92
92
 
93
- function valueTextExample() {
94
- const onValueTextSelectInput = (e) => {
95
- const valueText = e.target.querySelector("[slot=valueText]");
96
-
97
- valueText.textContent = e.detail.optionSelected.dataset.display;
98
- };
99
-
100
- const select = document.querySelector("#valueTextExample");
101
- select.addEventListener('input', onValueTextSelectInput);
102
- }
103
-
104
93
  /**
105
94
  * @license
106
95
  * Copyright 2019 Google LLC
@@ -792,19 +781,19 @@ class AuroFormValidation {
792
781
  {
793
782
  check: (e) => e.value?.length > 0 && e.value?.length < e.minLength,
794
783
  validity: 'tooShort',
795
- message: e => e.setCustomValidityTooShort || e.setCustomValidity || ''
784
+ message: e => e.getAttribute('setCustomValidityTooShort') || e.setCustomValidity || ''
796
785
  },
797
786
  {
798
787
  check: (e) => e.value?.length > e.maxLength,
799
788
  validity: 'tooLong',
800
- message: e => e.setCustomValidityTooLong || e.setCustomValidity || ''
789
+ message: e => e.getAttribute('setCustomValidityTooLong') || e.setCustomValidity || ''
801
790
  }
802
791
  ],
803
792
  pattern: [
804
793
  {
805
794
  check: (e) => e.pattern && !new RegExp(`^${e.pattern}$`, 'u').test(e.value),
806
795
  validity: 'patternMismatch',
807
- message: e => e.setCustomValidityPatternMismatch || e.setCustomValidity || ''
796
+ message: e => e.getAttribute('setCustomValidityPatternMismatch') || e.setCustomValidity || ''
808
797
  }
809
798
  ]
810
799
  },
@@ -999,10 +988,10 @@ class AuroFormValidation {
999
988
  if (!hasValue && elem.required && elem.touched) {
1000
989
  elem.validity = 'valueMissing';
1001
990
  elem.errorMessage = elem.setCustomValidityValueMissing || elem.setCustomValidity || '';
1002
- } else if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
991
+ } else if (hasValue && this.runtimeUtils.elementMatch(elem, 'auro-input')) {
1003
992
  this.validateType(elem);
1004
993
  this.validateElementAttributes(elem);
1005
- } else if (this.runtimeUtils.elementMatch(elem, 'auro-counter') || this.runtimeUtils.elementMatch(elem, 'auro-counter-group')) {
994
+ } else if (hasValue && (this.runtimeUtils.elementMatch(elem, 'auro-counter') || this.runtimeUtils.elementMatch(elem, 'auro-counter-group'))) {
1006
995
  this.validateElementAttributes(elem);
1007
996
  }
1008
997
  }
@@ -3377,6 +3366,267 @@ class AuroFloatingUI {
3377
3366
  }
3378
3367
  }
3379
3368
 
3369
+ // Selectors for focusable elements
3370
+ const FOCUSABLE_SELECTORS = [
3371
+ 'a[href]',
3372
+ 'button:not([disabled])',
3373
+ 'textarea:not([disabled])',
3374
+ 'input:not([disabled])',
3375
+ 'select:not([disabled])',
3376
+ '[role="tab"]:not([disabled])',
3377
+ '[role="link"]:not([disabled])',
3378
+ '[role="button"]:not([disabled])',
3379
+ '[tabindex]:not([tabindex="-1"])',
3380
+ '[contenteditable]:not([contenteditable="false"])'
3381
+ ];
3382
+
3383
+ // List of custom components that are known to be focusable
3384
+ const FOCUSABLE_COMPONENTS = [
3385
+ 'auro-checkbox',
3386
+ 'auro-radio',
3387
+ 'auro-dropdown',
3388
+ 'auro-button',
3389
+ 'auro-combobox',
3390
+ 'auro-input',
3391
+ 'auro-counter',
3392
+ 'auro-menu',
3393
+ 'auro-select',
3394
+ 'auro-datepicker',
3395
+ 'auro-hyperlink',
3396
+ 'auro-accordion',
3397
+ ];
3398
+
3399
+ /**
3400
+ * Determines if a given element is a custom focusable component.
3401
+ * Returns true if the element matches a known focusable component and is not disabled.
3402
+ *
3403
+ * @param {HTMLElement} element The element to check for focusability.
3404
+ * @returns {boolean} True if the element is a focusable custom component, false otherwise.
3405
+ */
3406
+ function isFocusableComponent(element) {
3407
+ const componentName = element.tagName.toLowerCase();
3408
+
3409
+ // Guard Clause: Element is a focusable component
3410
+ if (!FOCUSABLE_COMPONENTS.some((name) => element.hasAttribute(name) || componentName === name)) return false;
3411
+
3412
+ // Guard Clause: Element is not disabled
3413
+ if (element.hasAttribute('disabled')) return false;
3414
+
3415
+ // Guard Clause: The element is a hyperlink and has no href attribute
3416
+ if (componentName.match("hyperlink") && !element.hasAttribute('href')) return false;
3417
+
3418
+ // If all guard clauses pass, the element is a focusable component
3419
+ return true;
3420
+ }
3421
+
3422
+ /**
3423
+ * Retrieves all focusable elements within the container in DOM order, including those in shadow DOM and slots.
3424
+ * Returns a unique, ordered array of elements that can receive focus.
3425
+ *
3426
+ * @param {HTMLElement} container The container to search within
3427
+ * @returns {Array<HTMLElement>} An array of focusable elements within the container.
3428
+ */
3429
+ function getFocusableElements(container) {
3430
+ // Get elements in DOM order by walking the tree
3431
+ const orderedFocusableElements = [];
3432
+
3433
+ // Define a recursive function to collect focusable elements in DOM order
3434
+ const collectFocusableElements = (root) => {
3435
+ // Check if current element is focusable
3436
+ if (root.nodeType === Node.ELEMENT_NODE) {
3437
+ // Check if this is a custom component that is focusable
3438
+ const isComponentFocusable = isFocusableComponent(root);
3439
+
3440
+ if (isComponentFocusable) {
3441
+ // Add the component itself as a focusable element and don't traverse its shadow DOM
3442
+ orderedFocusableElements.push(root);
3443
+ return; // Skip traversing inside this component
3444
+ }
3445
+
3446
+ // Check if the element itself matches any selector
3447
+ for (const selector of FOCUSABLE_SELECTORS) {
3448
+ if (root.matches?.(selector)) {
3449
+ orderedFocusableElements.push(root);
3450
+ break; // Once we know it's focusable, no need to check other selectors
3451
+ }
3452
+ }
3453
+
3454
+ // Process shadow DOM only for non-Auro components
3455
+ if (root.shadowRoot) {
3456
+ // Process shadow DOM children in order
3457
+ if (root.shadowRoot.children) {
3458
+ Array.from(root.shadowRoot.children).forEach(child => {
3459
+ collectFocusableElements(child);
3460
+ });
3461
+ }
3462
+ }
3463
+
3464
+ // Process slots and their assigned nodes in order
3465
+ if (root.tagName === 'SLOT') {
3466
+ const assignedNodes = root.assignedNodes({ flatten: true });
3467
+ for (const node of assignedNodes) {
3468
+ collectFocusableElements(node);
3469
+ }
3470
+ } else {
3471
+ // Process light DOM children in order
3472
+ if (root.children) {
3473
+ Array.from(root.children).forEach(child => {
3474
+ collectFocusableElements(child);
3475
+ });
3476
+ }
3477
+ }
3478
+ }
3479
+ };
3480
+
3481
+ // Start the traversal from the container
3482
+ collectFocusableElements(container);
3483
+
3484
+ // Remove duplicates that might have been collected through different paths
3485
+ // while preserving order
3486
+ const uniqueElements = [];
3487
+ const seen = new Set();
3488
+
3489
+ for (const element of orderedFocusableElements) {
3490
+ if (!seen.has(element)) {
3491
+ seen.add(element);
3492
+ uniqueElements.push(element);
3493
+ }
3494
+ }
3495
+
3496
+ return uniqueElements;
3497
+ }
3498
+
3499
+ /**
3500
+ * FocusTrap manages keyboard focus within a specified container element, ensuring that focus does not leave the container when tabbing.
3501
+ * It is commonly used for modal dialogs or overlays to improve accessibility by trapping focus within interactive UI components.
3502
+ */
3503
+ class FocusTrap {
3504
+ /**
3505
+ * Creates a new FocusTrap instance for the given container element.
3506
+ * Initializes event listeners and prepares the container for focus management.
3507
+ *
3508
+ * @param {HTMLElement} container The DOM element to trap focus within.
3509
+ * @throws {Error} If the provided container is not a valid HTMLElement.
3510
+ */
3511
+ constructor(container) {
3512
+ if (!container || !(container instanceof HTMLElement)) {
3513
+ throw new Error("FocusTrap requires a valid HTMLElement.");
3514
+ }
3515
+
3516
+ this.container = container;
3517
+ this.tabDirection = 'forward'; // or 'backward'
3518
+
3519
+ this._init();
3520
+ }
3521
+
3522
+ /**
3523
+ * Initializes the focus trap by setting up event listeners and attributes on the container.
3524
+ * Prepares the container for focus management, including support for shadow DOM and inert attributes.
3525
+ *
3526
+ * @private
3527
+ */
3528
+ _init() {
3529
+
3530
+ // Add inert attribute to prevent focusing programmatically as well (if supported)
3531
+ if ('inert' in HTMLElement.prototype) {
3532
+ this.container.inert = false; // Ensure the container isn't inert
3533
+ this.container.setAttribute('data-focus-trap-container', true); // Mark for identification
3534
+ }
3535
+
3536
+ // Track tab direction
3537
+ this.container.addEventListener('keydown', this._onKeydown);
3538
+ }
3539
+
3540
+ /**
3541
+ * Handles keydown events to manage tab navigation within the container.
3542
+ * Ensures that focus wraps around when reaching the first or last focusable element.
3543
+ *
3544
+ * @param {KeyboardEvent} e The keyboard event triggered by user interaction.
3545
+ * @private
3546
+ */
3547
+ _onKeydown = (e) => {
3548
+
3549
+ if (e.key === 'Tab') {
3550
+
3551
+ // Set the tab direction based on the key pressed
3552
+ this.tabDirection = e.shiftKey ? 'backward' : 'forward';
3553
+
3554
+ // Get the active element(s) in the document and shadow root
3555
+ // This will include the active element in the shadow DOM if it exists
3556
+ // Active element may be inside the shadow DOM depending on delegatesFocus, so we need to check both
3557
+ let activeElement = document.activeElement;
3558
+ const actives = [activeElement];
3559
+ while (activeElement?.shadowRoot?.activeElement) {
3560
+ actives.push(activeElement.shadowRoot.activeElement);
3561
+ activeElement = activeElement.shadowRoot.activeElement;
3562
+ }
3563
+
3564
+ // Update the focusable elements
3565
+ const focusables = this._getFocusableElements();
3566
+
3567
+ // If we're at either end of the focusable elements, wrap around to the other end
3568
+ const focusIndex =
3569
+ (actives.includes(focusables[0]) || actives.includes(this.container)) && this.tabDirection === 'backward'
3570
+ ? focusables.length - 1
3571
+ : actives.includes(focusables[focusables.length - 1]) && this.tabDirection === 'forward'
3572
+ ? 0
3573
+ : null;
3574
+
3575
+ if (focusIndex !== null) {
3576
+ focusables[focusIndex].focus();
3577
+ e.preventDefault(); // Prevent default tab behavior
3578
+ e.stopPropagation(); // Stop the event from bubbling up
3579
+ }
3580
+ }
3581
+ };
3582
+
3583
+ /**
3584
+ * Retrieves all focusable elements within the container in DOM order, including those in shadow DOM and slots.
3585
+ * Returns a unique, ordered array of elements that can receive focus.
3586
+ *
3587
+ * @returns {Array<HTMLElement>} An array of focusable elements within the container.
3588
+ * @private
3589
+ */
3590
+ _getFocusableElements() {
3591
+ // Use the imported utility function to get focusable elements
3592
+ const elements = getFocusableElements(this.container);
3593
+
3594
+ // Filter out any elements with the 'focus-bookend' class
3595
+ return elements;
3596
+ }
3597
+
3598
+ /**
3599
+ * Moves focus to the first focusable element within the container.
3600
+ * Useful for setting initial focus when activating the focus trap.
3601
+ */
3602
+ focusFirstElement() {
3603
+ const focusables = this._getFocusableElements();
3604
+ if (focusables.length) focusables[0].focus();
3605
+ }
3606
+
3607
+ /**
3608
+ * Moves focus to the last focusable element within the container.
3609
+ * Useful for setting focus when deactivating or cycling focus in reverse.
3610
+ */
3611
+ focusLastElement() {
3612
+ const focusables = this._getFocusableElements();
3613
+ if (focusables.length) focusables[focusables.length - 1].focus();
3614
+ }
3615
+
3616
+ /**
3617
+ * Removes event listeners and attributes added by the focus trap.
3618
+ * Call this method to clean up when the focus trap is no longer needed.
3619
+ */
3620
+ disconnect() {
3621
+
3622
+ if (this.container.hasAttribute('data-focus-trap-container')) {
3623
+ this.container.removeAttribute('data-focus-trap-container');
3624
+ }
3625
+
3626
+ this.container.removeEventListener('keydown', this._onKeydown);
3627
+ }
3628
+ }
3629
+
3380
3630
  // Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
3381
3631
  // See LICENSE in the project root for license information.
3382
3632
 
@@ -3814,11 +4064,11 @@ let AuroIcon$2 = class AuroIcon extends BaseIcon$2 {
3814
4064
 
3815
4065
  var iconVersion$2 = '6.1.2';
3816
4066
 
3817
- var styleCss$1$2 = i$5`:host{position:fixed;z-index:var(--depth-tooltip, 400);display:none}:host(:not([matchWidth])) .container{min-width:fit-content}:host([isfullscreen]){top:0;left:0;width:100dvw;height:100dvh}:host([isfullscreen]) .container{width:100%;max-width:none;height:100%;max-height:none;border-radius:unset;margin-top:0;box-shadow:unset;overscroll-behavior:contain}:host([data-show]){display:flex}:host([common]:not([isfullscreen])) .container,:host([rounded]:not([isfullscreen])) .container{border-radius:var(--ds-border-radius, 0.375rem)}:host([common][isfullscreen]) .container,:host([rounded][isfullscreen]) .container{border-radius:unset;box-shadow:unset}:host(:not([isfullscreen])) .container.shape-box{border-radius:unset}:host(:not([isfullscreen])) .container[class*=shape-pill],:host(:not([isfullscreen])) .container[class*=shape-snowflake]{border-radius:30px}.container{display:inline-block;overflow:auto;box-sizing:border-box;border-radius:var(--ds-border-radius, 0.375rem);margin:var(--ds-size-50, 0.25rem) 0}`;
4067
+ var styleCss$1$2 = i$5`:host{position:fixed;z-index:var(--depth-tooltip, 400);display:none;isolation:isolate}:host(:not([matchWidth])) .container{min-width:fit-content}:host([isfullscreen]){position:fixed;top:0;left:0}:host([isfullscreen]) .container{width:100dvw;max-width:none;height:100dvh;max-height:none;border-radius:unset;margin-top:0;box-shadow:unset;overscroll-behavior:contain}:host([data-show]){display:flex}:host([common]:not([isfullscreen])) .container,:host([rounded]:not([isfullscreen])) .container{border-radius:var(--ds-border-radius, 0.375rem)}:host([common][isfullscreen]) .container,:host([rounded][isfullscreen]) .container{border-radius:unset;box-shadow:unset}:host(:not([isfullscreen])) .container.shape-box{border-radius:unset}:host(:not([isfullscreen])) .container[class*=shape-pill],:host(:not([isfullscreen])) .container[class*=shape-snowflake]{border-radius:30px}.container{display:inline-block;overflow:auto;box-sizing:border-box;border-radius:var(--ds-border-radius, 0.375rem);margin:var(--ds-size-50, 0.25rem) 0}`;
3818
4068
 
3819
4069
  var colorCss$2$2 = i$5`.container{background-color:var(--ds-auro-dropdownbib-container-color);box-shadow:var(--ds-auro-dropdownbib-boxshadow-color);color:var(--ds-auro-dropdownbib-text-color)}`;
3820
4070
 
3821
- var tokensCss$1$2 = i$5`:host(:not([ondark])){--ds-auro-dropdown-label-text-color: var(--ds-basic-color-texticon-muted, #676767);--ds-auro-dropdown-trigger-background-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-dropdown-trigger-container-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-border-bold, #585e67);--ds-auro-dropdown-trigger-outline-color: transparent;--ds-auro-dropdown-trigger-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-dropdown-helptext-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-dropdownbib-boxshadow-color: var(--ds-elevation-200, 0px 0px 10px rgba(0, 0, 0, 0.15));--ds-auro-dropdownbib-background-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-dropdownbib-container-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-dropdownbib-text-color: var(--ds-basic-color-texticon-default, #2a2a2a)}:host([ondark]){--ds-auro-dropdown-label-text-color: var(--ds-basic-color-texticon-inverse-muted, #ccd2db);--ds-auro-dropdown-trigger-background-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-dropdown-trigger-container-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-border-inverse, #ffffff);--ds-auro-dropdown-trigger-outline-color: transparent;--ds-auro-dropdown-trigger-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-dropdown-helptext-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-dropdownbib-boxshadow-color: var(--ds-elevation-200, 0px 0px 10px rgba(0, 0, 0, 0.15));--ds-auro-dropdownbib-background-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-dropdownbib-container-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-dropdownbib-text-color: var(--ds-basic-color-texticon-inverse, #ffffff)}`;
4071
+ var tokensCss$1$2 = i$5`:host(:not([ondark])){--ds-auro-dropdown-label-text-color: var(--ds-basic-color-texticon-muted, #676767);--ds-auro-dropdown-trigger-background-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-dropdown-trigger-container-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-border-bold, #585e67);--ds-auro-dropdown-trigger-outline-color: transparent;--ds-auro-dropdown-trigger-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-dropdownbib-boxshadow-color: var(--ds-elevation-200, 0px 0px 10px rgba(0, 0, 0, 0.15));--ds-auro-dropdownbib-background-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-dropdownbib-container-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-dropdownbib-text-color: var(--ds-basic-color-texticon-default, #2a2a2a)}:host([ondark]){--ds-auro-dropdown-label-text-color: var(--ds-basic-color-texticon-inverse-muted, #ccd2db);--ds-auro-dropdown-trigger-background-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-dropdown-trigger-container-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-border-inverse, #ffffff);--ds-auro-dropdown-trigger-outline-color: transparent;--ds-auro-dropdown-trigger-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-dropdownbib-boxshadow-color: var(--ds-elevation-200, 0px 0px 10px rgba(0, 0, 0, 0.15));--ds-auro-dropdownbib-background-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-dropdownbib-container-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-dropdownbib-text-color: var(--ds-basic-color-texticon-inverse, #ffffff)}`;
3822
4072
 
3823
4073
  // Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
3824
4074
  // See LICENSE in the project root for license information.
@@ -3978,17 +4228,6 @@ class AuroDropdownBib extends i$2 {
3978
4228
  }
3979
4229
  }
3980
4230
  });
3981
-
3982
- this.preventBodyScroll = this.preventBodyScroll.bind(this);
3983
- this.addEventListener('touchmove', this.preventBodyScroll, { passive: false });
3984
- this.addEventListener('touchstart', this.preventBodyScroll, { passive: false });
3985
- }
3986
-
3987
- disconnectedCallback() {
3988
- super.disconnectedCallback();
3989
-
3990
- this.removeEventListener('touchmove', this.preventBodyScroll, { passive: false });
3991
- this.removeEventListener('touchstart', this.preventBodyScroll, { passive: false });
3992
4231
  }
3993
4232
 
3994
4233
  firstUpdated(changedProperties) {
@@ -4004,19 +4243,6 @@ class AuroDropdownBib extends i$2 {
4004
4243
  }));
4005
4244
  }
4006
4245
 
4007
- /**
4008
- * Prevents scrolling of the body when touching empty areas of the component.
4009
- * @param {Event} event - The touchmove event.
4010
- * @returns {void}
4011
- */
4012
- preventBodyScroll(event) {
4013
- // when touchmove/touchstart on empty space
4014
- if (event.target === this) {
4015
- event.preventDefault();
4016
- event.stopImmediatePropagation();
4017
- }
4018
- }
4019
-
4020
4246
  // function that renders the HTML and CSS into the scope of the component
4021
4247
  render() {
4022
4248
  const classes = {
@@ -4039,19 +4265,19 @@ var dropdownVersion$1 = '3.0.0';
4039
4265
 
4040
4266
  var shapeSizeCss = i$5`.wrapper{overflow:hidden}.shape-classic-xl,.shape-classic-lg,.shape-classic-md,.shape-classic-sm,.shape-classic-xs{min-height:58px;max-height:58px;border-style:solid;border-width:1px;border-radius:var(--ds-border-radius, 0.375rem)}.shape-classic-xl.simple,.shape-classic-lg.simple,.shape-classic-md.simple,.shape-classic-sm.simple,.shape-classic-xs.simple{border-width:0px;min-height:60px;max-height:60px;background-color:unset;box-shadow:none}.shape-classic-xl.thin,.shape-classic-lg.thin,.shape-classic-md.thin,.shape-classic-sm.thin,.shape-classic-xs.thin{border-width:1px;min-height:58px;max-height:58px;background-color:unset}.shape-classic-xl.parentBorder,.shape-classic-lg.parentBorder,.shape-classic-md.parentBorder,.shape-classic-sm.parentBorder,.shape-classic-xs.parentBorder{border:0;box-shadow:unset;min-height:56px;max-height:56px}.shape-snowflake-xl,.shape-snowflake-lg,.shape-snowflake-md,.shape-snowflake-sm,.shape-snowflake-xs{min-height:56px;max-height:56px;border-style:solid;border-width:2px;border-color:transparent;border-radius:30px}.shape-snowflake-xl.simple,.shape-snowflake-lg.simple,.shape-snowflake-md.simple,.shape-snowflake-sm.simple,.shape-snowflake-xs.simple{border-width:0px;min-height:60px;max-height:60px;background-color:unset;box-shadow:none}.shape-snowflake-xl.thin,.shape-snowflake-lg.thin,.shape-snowflake-md.thin,.shape-snowflake-sm.thin,.shape-snowflake-xs.thin{border-width:1px;min-height:58px;max-height:58px;background-color:unset}.shape-snowflake-xl.parentBorder,.shape-snowflake-lg.parentBorder,.shape-snowflake-md.parentBorder,.shape-snowflake-sm.parentBorder,.shape-snowflake-xs.parentBorder{border:0;box-shadow:unset;min-height:56px;max-height:56px}.shape-box-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent}.shape-box-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-box-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-box-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-rounded-lg{min-height:56px;max-height:56px;border-style:solid;border-width:2px;border-color:transparent;border-radius:6px}.shape-rounded-lg.simple{border-width:0px;min-height:56px;max-height:56px;background-color:unset;box-shadow:none}.shape-rounded-lg.thin{border-width:1px;min-height:54px;max-height:54px;background-color:unset}.shape-rounded-lg.parentBorder{border:0;box-shadow:unset;min-height:52px;max-height:52px}.shape-pill-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px}.shape-pill-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-pill-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-pill-left-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px 0 0 36px}.shape-pill-left-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-pill-left-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-left-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-pill-right-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent;border-radius:0 36px 36px 0}.shape-pill-right-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-pill-right-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-right-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-pill-md{min-height:44px;max-height:44px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px}.shape-pill-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset;box-shadow:none}.shape-pill-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}.shape-pill-left-md{min-height:44px;max-height:44px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px 0 0 36px}.shape-pill-left-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset;box-shadow:none}.shape-pill-left-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-left-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}.shape-pill-right-md{min-height:44px;max-height:44px;border-style:solid;border-width:2px;border-color:transparent;border-radius:0 36px 36px 0}.shape-pill-right-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset;box-shadow:none}.shape-pill-right-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-right-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}`;
4041
4267
 
4042
- var colorCss$1$2 = i$5`:host .wrapper{border-color:var(--ds-auro-dropdown-trigger-border-color);background-color:var(--ds-auro-dropdown-trigger-background-color);color:var(--ds-auro-dropdown-trigger-text-color)}:host(:not([ondark])) .wrapper:focus,:host(:not([ondark])) .wrapper:focus-within{--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-border-brand, #00274a)}:host([ondark]) .wrapper:focus,:host([ondark]) .wrapper:focus-within{--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-border-inverse, #ffffff)}:host([error]:not([ondark])){--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-status-error, #e31f26)}:host([error][ondark]){--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-status-error-subtle, #fbc6c6)}.helpText{color:var(--ds-auro-dropdown-helptext-text-color)}`;
4268
+ var colorCss$1$2 = i$5`:host(:not([layout*=classic])){--ds-auro-dropdown-trigger-border-color: transparent}:host(:not([ondark])) .wrapper{border-color:var(--ds-auro-dropdown-trigger-border-color);background-color:var(--ds-auro-dropdown-trigger-background-color);color:var(--ds-auro-dropdown-trigger-text-color)}:host(:not([ondark])) .wrapper:focus-within,:host(:not([ondark])) .wrapper:active{--ds-auro-dropdown-trigger-border-color: var(--ds-advanced-color-state-focused, #01426a);--ds-auro-dropdown-trigger-outline-color: var(--ds-advanced-color-state-focused, #01426a)}:host(:not([onDark])[disabled]){--ds-auro-dropdown-trigger-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0);--ds-auro-dropdown-label-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0);--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-border-subtle, #dddddd)}:host(:not([ondark])[error]){--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-status-error, #e31f26)}:host([onDark]) .label{color:var(--ds-auro-dropdown-label-text-color)}:host([onDark]) .wrapper{border-color:var(--ds-auro-dropdown-trigger-border-color);background-color:var(--ds-auro-dropdown-trigger-background-color);color:var(--ds-auro-dropdown-trigger-text-color)}:host([onDark]) .wrapper:focus-within,:host([onDark]) .wrapper:active{--ds-auro-dropdown-trigger-border-color: var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-dropdown-trigger-outline-color: var(--ds-advanced-color-state-focused-inverse, #ffffff)}:host([onDark][disabled]){--ds-auro-dropdown-trigger-text-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894);--ds-auro-dropdown-label-text-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894);--ds-auro-dropdown-trigger-container-color: var(--ds-advanced-color-shared-background-inverse-disabled, rgba(255, 255, 255, 0.1))}:host([ondark][error]){--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-status-error-subtle, #fbc6c6)}`;
4043
4269
 
4044
- var classicColorCss = i$5`:host([layout*=classic]:not([onDark])) .label{color:var(--ds-auro-dropdown-label-text-color)}:host([layout*=classic]:not([onDark])) .trigger{border-color:var(--ds-auro-dropdown-trigger-border-color);background-color:var(--ds-auro-dropdown-trigger-container-color);color:var(--ds-auro-dropdown-trigger-text-color)}:host([layout*=classic]:not([onDark])) .trigger:focus-within,:host([layout*=classic]:not([onDark])) .trigger:active{--ds-auro-dropdown-trigger-border-color: var(--ds-advanced-color-state-focused, #01426a);--ds-auro-dropdown-trigger-outline-color: var(--ds-advanced-color-state-focused, #01426a)}:host([layout*=classic][disabled]:not([onDark])){--ds-auro-dropdown-trigger-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0);--ds-auro-dropdown-label-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0);--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-border-subtle, #dddddd)}:host([layout*=classic][error]:not([onDark])){--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-status-error, #e31f26)}:host([layout*=classic][error]:not([onDark])) .trigger:focus-within,:host([layout*=classic][error]:not([onDark])) .trigger:active{--ds-auro-dropdown-trigger-border-color: var(--ds-advanced-color-state-focused, #01426a);--ds-auro-dropdown-trigger-outline-color: var(--ds-advanced-color-state-focused, #01426a)}:host([layout*=classic][onDark]) .label{color:var(--ds-auro-dropdown-label-text-color)}:host([layout*=classic][onDark]) .trigger{border-color:var(--ds-auro-dropdown-trigger-border-color);background-color:var(--ds-auro-dropdown-trigger-container-color);color:var(--ds-auro-dropdown-trigger-text-color)}:host([layout*=classic][onDark]) .trigger:focus-within,:host([layout*=classic][onDark]) .trigger:active{--ds-auro-dropdown-trigger-border-color: var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-dropdown-trigger-outline-color: var(--ds-advanced-color-state-focused-inverse, #ffffff)}:host([layout*=classic][onDark][disabled]){--ds-auro-dropdown-trigger-text-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894);--ds-auro-dropdown-label-text-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894);--ds-auro-dropdown-trigger-container-color: var(--ds-advanced-color-shared-background-inverse-disabled, rgba(255, 255, 255, 0.1))}:host([layout*=classic][onDark][error]){--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-status-error-subtle, #fbc6c6)}:host([layout*=classic][onDark][error]) .trigger:focus-within,:host([layout*=classic][onDark][error]) .trigger:active{--ds-auro-dropdown-trigger-border-color: var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-dropdown-trigger-outline-color: var(--ds-advanced-color-state-focused-inverse, #ffffff)}`;
4270
+ var classicColorCss = i$5``;
4045
4271
 
4046
- var classicLayoutCss = i$5`:host([layout*=classic]){position:relative;max-width:100%}:host([layout*=classic]) #bibSizer{position:absolute;z-index:-1;opacity:0;pointer-events:none}:host([layout*=classic]) .label{font-size:var(--ds-text-body-size-xs, 0.75rem);line-height:var(--ds-text-body-size-default, 1rem);transition:font-size .3s cubic-bezier(0.215, 0.61, 0.355, 1);white-space:normal}:host([layout*=classic]) .label[hasTrigger=false]{font-size:var(--ds-text-body-size-default, 1rem)}:host([layout*=classic]) .trigger{display:flex;flex-direction:row;box-shadow:inset 0 0 0 1px var(--ds-auro-dropdown-trigger-outline-color)}@media(hover: hover){:host([layout*=classic]) .trigger:hover{cursor:pointer}}:host([layout*=classic]) .triggerContentWrapper{overflow:hidden;flex:1;justify-content:start;text-overflow:ellipsis;white-space:nowrap}:host([layout*=classic]) #showStateIcon{display:flex;overflow:hidden;height:100%;align-items:center;padding-right:var(--ds-size-150, 0.75rem)}:host([layout*=classic]) #showStateIcon [auro-icon]{height:var(--ds-size-300, 1.5rem);line-height:var(--ds-size-300, 1.5rem)}:host([layout*=classic]) #showStateIcon[data-expanded=true] [auro-icon]{transform:rotate(-180deg)}:host([layout*=classic]:not([simple])) .triggerContentWrapper{padding-left:var(--ds-size-150, 0.75rem)}:host([layout*=classic][matchwidth]) #bibSizer{width:100%}:host([layout*=classic][disabled]){pointer-events:none}`;
4272
+ var classicLayoutCss = i$5`:host([layout*=classic]){position:relative;max-width:100%}:host([layout*=classic]) #bibSizer{position:absolute;z-index:-1;opacity:0;pointer-events:none}:host([layout*=classic]) .label{font-size:var(--ds-text-body-size-xs, 0.75rem);line-height:var(--ds-text-body-size-default, 1rem);transition:font-size .3s cubic-bezier(0.215, 0.61, 0.355, 1);white-space:normal}:host([layout*=classic]) .label[hasTrigger=false]{font-size:var(--ds-text-body-size-default, 1rem)}:host([layout*=classic]) .wrapper{display:flex;flex-direction:row;box-shadow:inset 0 0 0 1px var(--ds-auro-dropdown-trigger-outline-color)}@media(hover: hover){:host([layout*=classic]) .wrapper:hover{cursor:pointer}}:host([layout*=classic]) .triggerContentWrapper{overflow:hidden;flex:1;justify-content:start;text-overflow:ellipsis;white-space:nowrap}:host([layout*=classic]) #showStateIcon{display:flex;overflow:hidden;height:100%;align-items:center;padding-right:var(--ds-size-150, 0.75rem)}:host([layout*=classic]) #showStateIcon [auro-icon]{height:var(--ds-size-300, 1.5rem);line-height:var(--ds-size-300, 1.5rem)}:host([layout*=classic]) #showStateIcon[data-expanded=true] [auro-icon]{transform:rotate(-180deg)}:host([matchwidth]) #bibSizer{width:100%}`;
4047
4273
 
4048
- var styleEmphasizedCss = i$5`:host{display:block}.layout-emphasized .chevron,.layout-emphasized-left .chevron,.layout-emphasized-right .chevron{margin-right:var(--ds-size-300, 1.5rem)}.wrapper{display:flex;flex-direction:row}.trigger{display:flex;flex:1;align-items:center;justify-content:center;outline:none}.triggerContentWrapper{display:flex;overflow:hidden;width:100%;flex:1;align-items:center;justify-content:center;text-overflow:ellipsis;white-space:nowrap}:host([layout*=emphasized][shape*=pill]:not([layout*=right])) .leftIndent{width:calc(100% - var(--ds-size-300, 1.5rem));margin-left:var(--ds-size-300, 1.5rem)}:host([layout*=emphasized][shape*=pill]:not([layout*=left])) .rightIndent{width:calc(100% - var(--ds-size-300, 1.5rem));margin-right:var(--ds-size-300, 1.5rem)}:host([layout*=emphasized][shape*=pill]:not([layout*=left]):not([layout*=right])) .rightIndent{width:calc(100% - var(--ds-size-600, 3rem));margin-right:var(--ds-size-300, 1.5rem)}`;
4274
+ var styleEmphasizedCss = i$5`:host{display:block}.layout-emphasized .chevron,.layout-emphasized-left .chevron,.layout-emphasized-right .chevron{margin-right:var(--ds-size-300, 1.5rem)}.wrapper{display:flex;flex:1;flex-direction:row;align-items:center;justify-content:center;outline:none}.triggerContentWrapper{display:flex;overflow:hidden;width:100%;flex:1;align-items:center;justify-content:center;text-overflow:ellipsis;white-space:nowrap}:host([layout*=emphasized][shape*=pill]:not([layout*=right])) .leftIndent{width:calc(100% - var(--ds-size-300, 1.5rem));margin-left:var(--ds-size-300, 1.5rem)}:host([layout*=emphasized][shape*=pill]:not([layout*=left])) .rightIndent{width:calc(100% - var(--ds-size-300, 1.5rem));margin-right:var(--ds-size-300, 1.5rem)}:host([layout*=emphasized][shape*=pill]:not([layout*=left]):not([layout*=right])) .rightIndent{width:calc(100% - var(--ds-size-600, 3rem));margin-right:var(--ds-size-300, 1.5rem)}`;
4049
4275
 
4050
- var styleSnowflakeCss = i$5`:host{display:block}.wrapper{display:flex;flex-direction:row}.trigger{display:flex;flex:1;align-items:center;justify-content:center;outline:none}.triggerContentWrapper{display:flex;overflow:hidden;width:100%;flex:1;align-items:center;justify-content:center;text-overflow:ellipsis;white-space:nowrap}:host([layout*=snowflake]) .leftIndent{width:calc(100% - var(--ds-size-600, 3rem));margin-left:var(--ds-size-300, 1.5rem)}:host([layout*=snowflake]) .rightIndent{width:calc(100% - var(--ds-size-600, 3rem));margin-right:var(--ds-size-300, 1.5rem)}.layout-snowflake .chevron,.layout-snowflake-left .chevron,.layout-snowflake-right .chevron{margin-right:var(--ds-size-300, 1.5rem)}`;
4276
+ var styleSnowflakeCss = i$5`:host{display:block}.wrapper{display:flex;flex:1;flex-direction:row;align-items:center;justify-content:center;outline:none}.triggerContentWrapper{display:flex;overflow:hidden;width:100%;flex:1;align-items:center;justify-content:center;text-overflow:ellipsis;white-space:nowrap}:host([layout*=snowflake]) .leftIndent{width:calc(100% - var(--ds-size-600, 3rem));margin-left:var(--ds-size-300, 1.5rem)}:host([layout*=snowflake]) .rightIndent{width:calc(100% - var(--ds-size-600, 3rem));margin-right:var(--ds-size-300, 1.5rem)}.layout-snowflake .chevron,.layout-snowflake-left .chevron,.layout-snowflake-right .chevron{margin-right:var(--ds-size-300, 1.5rem)}`;
4051
4277
 
4052
4278
  var colorCss$5 = i$5`:host([error]){--ds-auro-helptext-color: var(--ds-basic-color-status-error, #e31f26)}:host([onDark]){--ds-auro-helptext-color: var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([onDark][error]){--ds-auro-helptext-color: var(--ds-basic-color-status-error-subtle, #fbc6c6)}.helptext-wrapper{color:var(--ds-auro-helptext-color)}`;
4053
4279
 
4054
- var styleCss$6 = i$5`.helptext-wrapper{display:none;font-size:12px;font-weight:450;letter-spacing:0;line-height:16px}:host([large]) .helptext-wrapper{font-size:16px;font-weight:450;letter-spacing:0;line-height:24px}.helptext-wrapper[visible]{display:block}::slotted(*:not(:empty)){margin-top:var(--ds-size-50, 0.25rem);margin-bottom:0}::slotted(p){margin-block:0}`;
4280
+ var styleCss$6 = i$5`:host{position:relative;display:block}.helptext-wrapper{display:none;font-size:12px;font-weight:450;letter-spacing:0;line-height:16px}:host([large]) .helptext-wrapper{font-size:16px;font-weight:450;letter-spacing:0;line-height:24px}.helptext-wrapper[visible]{display:block}::slotted(*:not(:empty)){margin-top:var(--ds-size-50, 0.25rem);margin-bottom:0}::slotted(p){margin-block:0}`;
4055
4281
 
4056
4282
  var tokensCss$4 = i$5`:host{--ds-auro-helptext-color: var(--ds-basic-color-texticon-muted, #676767)}`;
4057
4283
 
@@ -4356,10 +4582,8 @@ let AuroElement$3 = class AuroElement extends i$2 {
4356
4582
  // See LICENSE in the project root for license information.
4357
4583
 
4358
4584
 
4359
- /**
4360
- * @attr { Boolean } disableEventShow - If declared, the dropdown will only show by calling the API .show() public method.
4585
+ /*
4361
4586
  * @slot - Default slot for the popover content.
4362
- * @slot label - Defines the content of the label.
4363
4587
  * @slot helpText - Defines the content of the helpText.
4364
4588
  * @slot trigger - Defines the content of the trigger.
4365
4589
  * @csspart trigger - The trigger content container.
@@ -4378,18 +4602,22 @@ class AuroDropdown extends AuroElement$3 {
4378
4602
  this.matchWidth = false;
4379
4603
  this.noHideOnThisFocusLoss = false;
4380
4604
 
4381
- this.errorMessage = ''; // TODO - check with Doug if there is still more to do here
4605
+ this.errorMessage = undefined; // TODO - check with Doug if there is still more to do here
4382
4606
 
4383
4607
  // Layout Config
4384
- this.layout = 'classic';
4385
- this.shape = 'classic';
4386
- this.size = 'xl';
4608
+ this.layout = undefined;
4609
+ this.shape = undefined;
4610
+ this.size = undefined;
4387
4611
 
4388
4612
  this.parentBorder = false;
4389
4613
 
4390
4614
  this.privateDefaults();
4391
4615
  }
4392
4616
 
4617
+ /**
4618
+ * @private
4619
+ * @returns {object} Class definition for the wrapper element.
4620
+ */
4393
4621
  get commonWrapperClasses() {
4394
4622
  return {
4395
4623
  'trigger': true,
@@ -4407,13 +4635,10 @@ class AuroDropdown extends AuroElement$3 {
4407
4635
  privateDefaults() {
4408
4636
  this.chevron = false;
4409
4637
  this.disabled = false;
4638
+ this.disableFocusTrap = false;
4410
4639
  this.error = false;
4411
- this.inset = false;
4412
- this.rounded = false;
4413
4640
  this.tabIndex = 0;
4414
4641
  this.noToggle = false;
4415
- this.a11yAutocomplete = 'none';
4416
- this.labeled = true;
4417
4642
  this.a11yRole = 'button';
4418
4643
  this.onDark = false;
4419
4644
  this.showTriggerBorders = true;
@@ -4509,6 +4734,18 @@ class AuroDropdown extends AuroElement$3 {
4509
4734
  this.floater.showBib();
4510
4735
  }
4511
4736
 
4737
+ /**
4738
+ * When bib is open, focus on the first element inside of bib.
4739
+ * If not, trigger element will get focus.
4740
+ */
4741
+ focus() {
4742
+ if (this.isPopoverVisible && this.focusTrap) {
4743
+ this.focusTrap.focusFirstElement();
4744
+ } else {
4745
+ this.trigger.focus();
4746
+ }
4747
+ }
4748
+
4512
4749
  // function to define props used within the scope of this component
4513
4750
  static get properties() {
4514
4751
  return {
@@ -4522,6 +4759,15 @@ class AuroDropdown extends AuroElement$3 {
4522
4759
  reflect: true
4523
4760
  },
4524
4761
 
4762
+ /**
4763
+ * If declared, the dropdown will only show by calling the API .show() public method.
4764
+ * @default false
4765
+ */
4766
+ disableEventShow: {
4767
+ type: Boolean,
4768
+ reflect: true
4769
+ },
4770
+
4525
4771
  /**
4526
4772
  * If declared, applies a border around the trigger slot.
4527
4773
  */
@@ -4540,17 +4786,17 @@ class AuroDropdown extends AuroElement$3 {
4540
4786
  },
4541
4787
 
4542
4788
  /**
4543
- * If declared, the dropdown will be styled with the common theme.
4789
+ * If declared, the dropdown is not interactive.
4544
4790
  */
4545
- common: {
4791
+ disabled: {
4546
4792
  type: Boolean,
4547
4793
  reflect: true
4548
4794
  },
4549
4795
 
4550
4796
  /**
4551
- * If declared, the dropdown is not interactive.
4797
+ * If declared, the focus trap inside of bib will be turned off.
4552
4798
  */
4553
- disabled: {
4799
+ disableFocusTrap: {
4554
4800
  type: Boolean,
4555
4801
  reflect: true
4556
4802
  },
@@ -4595,22 +4841,6 @@ class AuroDropdown extends AuroElement$3 {
4595
4841
  reflect: true
4596
4842
  },
4597
4843
 
4598
- /**
4599
- * Makes the trigger to be full width of its parent container.
4600
- */
4601
- fluid: {
4602
- type: Boolean,
4603
- reflect: true
4604
- },
4605
-
4606
- /**
4607
- * If declared, will apply padding around trigger slot content.
4608
- */
4609
- inset: {
4610
- type: Boolean,
4611
- reflect: true
4612
- },
4613
-
4614
4844
  /**
4615
4845
  * If true, the dropdown bib is displayed.
4616
4846
  */
@@ -4654,15 +4884,6 @@ class AuroDropdown extends AuroElement$3 {
4654
4884
  reflect: true
4655
4885
  },
4656
4886
 
4657
- /**
4658
- * Defines if there is a label preset.
4659
- * @private
4660
- */
4661
- labeled: {
4662
- type: Boolean,
4663
- reflect: true
4664
- },
4665
-
4666
4887
  /**
4667
4888
  * Defines if the trigger should size based on the parent element providing the border UI.
4668
4889
  * @private
@@ -4723,6 +4944,9 @@ class AuroDropdown extends AuroElement$3 {
4723
4944
  reflect: true
4724
4945
  },
4725
4946
 
4947
+ /**
4948
+ * If declared, and a function is set, that function will execute when the slot content is updated.
4949
+ */
4726
4950
  onSlotChange: {
4727
4951
  type: Function,
4728
4952
  reflect: false
@@ -4737,14 +4961,6 @@ class AuroDropdown extends AuroElement$3 {
4737
4961
  reflect: true
4738
4962
  },
4739
4963
 
4740
- /**
4741
- * If declared, will apply border-radius to trigger and default slots.
4742
- */
4743
- rounded: {
4744
- type: Boolean,
4745
- reflect: true
4746
- },
4747
-
4748
4964
  /**
4749
4965
  * @private
4750
4966
  */
@@ -4759,22 +4975,14 @@ class AuroDropdown extends AuroElement$3 {
4759
4975
  type: String || undefined,
4760
4976
  attribute: false,
4761
4977
  reflect: false
4762
- },
4763
-
4764
- /**
4765
- * The value for the aria-autocomplete attribute of the trigger element.
4766
- */
4767
- a11yAutocomplete: {
4768
- type: String,
4769
- attribute: false,
4770
4978
  }
4771
4979
  };
4772
4980
  }
4773
4981
 
4774
4982
  static get styles() {
4775
4983
  return [
4776
- colorCss$1$2,
4777
4984
  tokensCss$1$2,
4985
+ colorCss$1$2,
4778
4986
 
4779
4987
  // default layout
4780
4988
  classicColorCss,
@@ -4837,6 +5045,12 @@ class AuroDropdown extends AuroElement$3 {
4837
5045
  this.handleTriggerContentSlotChange();
4838
5046
  }
4839
5047
 
5048
+ if (changedProperties.has('isPopoverVisible')) {
5049
+ this.updateFocusTrap();
5050
+ if (!this.isPopoverVisible && this.hasFocus) {
5051
+ this.trigger.focus();
5052
+ }
5053
+ }
4840
5054
  }
4841
5055
 
4842
5056
  firstUpdated() {
@@ -4857,9 +5071,6 @@ class AuroDropdown extends AuroElement$3 {
4857
5071
  }
4858
5072
 
4859
5073
  this.bibContent = this.floater.element.bib;
4860
- this.bibContent.setAttribute('role', 'dialog');
4861
- this.bibContent.setAttribute('aria-modal', 'true');
4862
- this.bibContent.setAttribute('aria-labelledby', 'triggerLabel');
4863
5074
 
4864
5075
  // Add the tag name as an attribute if it is different than the component name
4865
5076
  this.runtimeUtils.handleComponentTagRename(this, 'auro-dropdown');
@@ -4905,6 +5116,27 @@ class AuroDropdown extends AuroElement$3 {
4905
5116
  this.hasFocus = true;
4906
5117
  }
4907
5118
 
5119
+ /**
5120
+ * @private
5121
+ */
5122
+ updateFocusTrap() {
5123
+ // If the dropdown is open, create a focus trap and focus the first element
5124
+ if (this.isPopoverVisible && !this.disableFocusTrap) {
5125
+ this.focusTrap = new FocusTrap(this.bibContent);
5126
+ this.focusTrap.focusFirstElement();
5127
+ return;
5128
+ }
5129
+
5130
+ // Guard Clause: Ensure there is a focus trap currently active before continuing
5131
+ if (!this.focusTrap) {
5132
+ return;
5133
+ }
5134
+
5135
+ // If the dropdown is not open, disconnect the focus trap if it exists
5136
+ this.focusTrap.disconnect();
5137
+ this.focusTrap = undefined;
5138
+ }
5139
+
4908
5140
  /**
4909
5141
  * Function to support @focusout event.
4910
5142
  * @private
@@ -5190,10 +5422,7 @@ class AuroDropdown extends AuroElement$3 {
5190
5422
  id="bib"
5191
5423
  shape="${this.shape}"
5192
5424
  ?data-show="${this.isPopoverVisible}"
5193
- ?isfullscreen="${this.isBibFullscreen}"
5194
- ?common="${this.common}"
5195
- ?rounded="${this.common || this.rounded}"
5196
- ?inset="${this.common || this.inset}">
5425
+ ?isfullscreen="${this.isBibFullscreen}">
5197
5426
  <div class="slotContent">
5198
5427
  <slot @slotchange="${this.handleDefaultSlot}"></slot>
5199
5428
  </div>
@@ -7119,6 +7348,30 @@ class AuroBibtemplate extends i$2 {
7119
7348
  AuroLibraryRuntimeUtils$3.prototype.registerComponent(name, AuroBibtemplate);
7120
7349
  }
7121
7350
 
7351
+ /**
7352
+ * Prevents scrolling of the body when touching empty areas of the component.
7353
+ * @param {Event} event - The touchmove event.
7354
+ * @returns {void}
7355
+ */
7356
+ preventBodyScroll(event) {
7357
+ if (event.target === this) {
7358
+ event.preventDefault();
7359
+ }
7360
+ }
7361
+
7362
+ connectedCallback() {
7363
+ super.connectedCallback();
7364
+
7365
+ this.preventBodyScroll = this.preventBodyScroll.bind(this);
7366
+ this.addEventListener('touchmove', this.preventBodyScroll, { passive: false });
7367
+ }
7368
+
7369
+ disconnectedCallback() {
7370
+ super.disconnectedCallback();
7371
+
7372
+ this.removeEventListener('touchmove', this.preventBodyScroll, { passive: false });
7373
+ }
7374
+
7122
7375
  onCloseButtonClick() {
7123
7376
  this.dispatchEvent(new Event("close-click", { bubbles: true,
7124
7377
  composed: true }));
@@ -7150,7 +7403,7 @@ class AuroBibtemplate extends i$2 {
7150
7403
  <div id="bibTemplate" part="bibtemplate">
7151
7404
  ${this.isFullscreen ? u`
7152
7405
  <div id="headerContainer">
7153
- <${this.buttonTag} id="closeButton" variant="ghost" shape="circle" size="sm" @click="${this.onCloseButtonClick}">
7406
+ <${this.buttonTag} id="closeButton" aria-label="Close" variant="ghost" shape="circle" size="sm" @click="${this.onCloseButtonClick}">
7154
7407
  <${this.iconTag} category="interface" name="x-lg"></${this.iconTag}>
7155
7408
  </${this.buttonTag}>
7156
7409
  <${this.headerTag} display="${this.large ? 'display' : '600'}" level="3" size="none" id="header" no-margin-block>
@@ -7178,7 +7431,7 @@ var bibTemplateVersion = '1.0.0';
7178
7431
 
7179
7432
  var colorCss$3 = i$5`:host([error]){--ds-auro-helptext-color: var(--ds-basic-color-status-error, #e31f26)}:host([onDark]){--ds-auro-helptext-color: var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([onDark][error]){--ds-auro-helptext-color: var(--ds-basic-color-status-error-subtle, #fbc6c6)}.helptext-wrapper{color:var(--ds-auro-helptext-color)}`;
7180
7433
 
7181
- var styleCss$4 = i$5`.helptext-wrapper{display:none;font-size:12px;font-weight:450;letter-spacing:0;line-height:16px}:host([large]) .helptext-wrapper{font-size:16px;font-weight:450;letter-spacing:0;line-height:24px}.helptext-wrapper[visible]{display:block}::slotted(*:not(:empty)){margin-top:var(--ds-size-50, 0.25rem);margin-bottom:0}::slotted(p){margin-block:0}`;
7434
+ var styleCss$4 = i$5`:host{position:relative;display:block}.helptext-wrapper{display:none;font-size:12px;font-weight:450;letter-spacing:0;line-height:16px}:host([large]) .helptext-wrapper{font-size:16px;font-weight:450;letter-spacing:0;line-height:24px}.helptext-wrapper[visible]{display:block}::slotted(*:not(:empty)){margin-top:var(--ds-size-50, 0.25rem);margin-bottom:0}::slotted(p){margin-block:0}`;
7182
7435
 
7183
7436
  var tokensCss$2 = i$5`:host{--ds-auro-helptext-color: var(--ds-basic-color-texticon-muted, #676767)}`;
7184
7437
 
@@ -7384,68 +7637,7 @@ class AuroHelpText extends i$2 {
7384
7637
 
7385
7638
  var helpTextVersion = '1.0.0';
7386
7639
 
7387
- 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)}`;
7388
-
7389
- 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)}`;
7390
-
7391
- 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)}`;
7392
-
7393
- // Copyright (c) 2021 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
7394
- // See LICENSE in the project root for license information.
7395
-
7396
- // ---------------------------------------------------------------------
7397
-
7398
- /**
7399
- * Converts value to an array.
7400
- * If the value is a JSON string representing an array, it will be parsed.
7401
- * If the value is already an array, it is returned.
7402
- * If the value is undefined, it returns undefined.
7403
- * @private
7404
- * @param {any} value - The value to be converted. Can be a string, array, or undefined.
7405
- * @returns {Array|undefined} - The converted array or undefined.
7406
- * @throws {Error} - Throws an error if the value is not an array, undefined,
7407
- * or if the value cannot be parsed into an array from a JSON string.
7408
- */
7409
- function arrayConverter(value) {
7410
- // Allow undefined
7411
- if (value === undefined) {
7412
- return undefined;
7413
- }
7414
-
7415
- // Return the value if it is already an array
7416
- if (Array.isArray(value)) {
7417
- return value;
7418
- }
7419
-
7420
- try {
7421
- // If value is a JSON string, parse it
7422
- const parsed = typeof value === 'string' ? JSON.parse(value) : value;
7423
-
7424
- // Check if the parsed value is an array
7425
- if (Array.isArray(parsed)) {
7426
- return parsed;
7427
- }
7428
- } catch (error) {
7429
- // If JSON parsing fails, continue to throw an error below
7430
- /* eslint-disable no-console */
7431
- console.error('JSON parsing failed:', error);
7432
- }
7433
-
7434
- // Throw error if the input is not an array or undefined
7435
- throw new Error('Invalid value: Input must be an array or undefined');
7436
- }
7437
-
7438
- 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)}: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) + 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}`;
7439
-
7440
- 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)}`;
7441
-
7442
- i$5`:focus:not(:focus-visible){outline:3px solid transparent}.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock,:host{display:block}.util_displayFlex{display:flex}.util_displayHidden,:host([hidden]:not(:focus):not(:active)){display:none}.util_displayHiddenVisually,:host([hiddenVisually]:not(:focus):not(:active)){position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}.ico_squareLarge{fill:currentColor;height:var(--auro-size-lg, var(--ds-size-300, 1.5rem))}.ico_squareSmall{fill:currentColor;height:.6rem}.ico_squareMed{fill:currentColor;height:var(--auro-size-md, var(--ds-size-200, 1rem))}.ico_squareSml{fill:currentColor;height:var(--auro-size-sm, var(--ds-size-150, 0.75rem))}:host{color:currentColor;vertical-align:middle;line-height:1;display:inline-block}svg{min-width:var(--ds-auro-icon-size, 1.5rem) !important;width:var(--ds-auro-icon-size, 1.5rem) !important;height:var(--ds-auro-icon-size, 1.5rem) !important}.componentWrapper{display:flex}.svgWrapper{height:var(--ds-auro-icon-size);width:var(--ds-auro-icon-size)}.labelWrapper{margin-left:var(--ds-size-50, 0.25rem);line-height:1.8}`;
7443
-
7444
- i$5`:host{--ds-auro-icon-color:var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-alaska-color:#02426D;--ds-auro-icon-size:var(--ds-size-300, 1.5rem)}`;
7445
-
7446
- 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)}`;
7447
-
7448
- var styleCss$3 = i$5`.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock{display:block}.util_displayFlex{display:flex}.util_displayHidden{display:none}.util_displayHiddenVisually{position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}[auro-dropdown]{--ds-auro-dropdown-trigger-border-color: var(--ds-auro-select-border-color);--ds-auro-dropdown-trigger-background-color: var(--ds-auro-select-background-color);--ds-auro-dropdown-trigger-container-color: var(--ds-auro-select-background-color)}.mainContent{position:relative;display:flex;flex:1;flex-direction:column;align-items:center;justify-content:center}.valueContainer [slot=displayValue]{display:none}.accents{display:flex;flex-direction:row;align-items:center;justify-content:center}::slotted([slot=typeIcon]){margin-right:8px}.displayValue{display:block}.displayValue:not(.force){display:none}.displayValue:not(.force).hasContent:is(.withValue):not(.hasFocus){display:block}.triggerContent{display:flex;width:100%;align-items:center;justify-content:center}:host([layout*=emphasized]) .triggerContent,:host([layout*=snowflake]) .triggerContent{padding:0 8px 0 24px}:host([layout*=classic]) .triggerContent{padding:0 8px}:host([layout*=classic]) .mainContent{align-items:start}:host([layout*=classic]) label{cursor:text;font-size:16px;font-weight:450;letter-spacing:0;line-height:24px}:host([layout*=classic]) label.withValue{font-size:12px;font-weight:450;letter-spacing:0;line-height:16px}:host([layout*=classic]) .value{height:auto;font-size:16px;font-weight:450;letter-spacing:0;line-height:24px}:host(:is([validity]:not([validity=valid]))) [auro-dropdown]{--ds-auro-select-border-color: var(--ds-basic-color-status-error, #e31f26);--ds-auro-dropdown-helptext-text-color: var(--ds-basic-color-texticon-default, #2a2a2a)}:host([ondark]:is([validity]:not([validity=valid]))) [auro-dropdown]{--ds-auro-select-border-color: var(--ds-basic-color-status-error-subtle, #fbc6c6);--ds-auro-dropdown-helptext-text-color: var(--ds-basic-color-texticon-inverse, #ffffff)}#slotHolder{display:none}:host([disabled]) *{user-select:none}`;
7640
+ var styleCss$3 = i$5`.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock{display:block}.util_displayFlex{display:flex}.util_displayHidden{display:none}.util_displayHiddenVisually{position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}[auro-dropdown]{--ds-auro-dropdown-trigger-border-color: var(--ds-auro-select-border-color);--ds-auro-dropdown-trigger-background-color: var(--ds-auro-select-background-color);--ds-auro-dropdown-trigger-container-color: var(--ds-auro-select-background-color)}:host([layout*=emphasized]) [auro-dropdown],:host([layout*=snowflake]) [auro-dropdown]{--ds-auro-select-border-color: transparent}.mainContent{position:relative;display:flex;flex:1;flex-direction:column;align-items:center;justify-content:center}.valueContainer [slot=displayValue]{display:none}.accents{display:flex;flex-direction:row;align-items:center;justify-content:center}::slotted([slot=typeIcon]){margin-right:var(--ds-size-50, 0.25rem)}.displayValue{display:block}.displayValue:not(.force){display:none}.displayValue:not(.force).hasContent:is(.withValue):not(.hasFocus){display:block}.triggerContent{display:flex;width:100%;align-items:center;justify-content:center}:host([layout*=emphasized]) .triggerContent,:host([layout*=snowflake]) .triggerContent{padding:0 var(--ds-size-50, 0.25rem) 0 var(--ds-size-150, 0.75rem)}:host([layout*=snowflake]) [auro-dropdown] label.withValue{font-size:var(--ds-text-body-size-xs);line-height:20px}:host([layout*=emphasized]) [auro-dropdown] label.withValue{font-size:var(--ds-text-body-size-xs);line-height:20px}:host([layout*=classic]) .triggerContent{padding:0 var(--ds-size-50, 0.25rem)}:host([layout*=classic]) .mainContent{align-items:start}:host([layout*=classic]) label{cursor:text;font-size:16px;font-weight:450;letter-spacing:0;line-height:24px}:host([layout*=classic]) label.withValue{font-size:12px;font-weight:450;letter-spacing:0;line-height:16px}:host([layout*=classic]) .value{height:auto;font-size:16px;font-weight:450;letter-spacing:0;line-height:24px}:host(:is([validity]:not([validity=valid]))) [auro-dropdown]{--ds-auro-select-border-color: var(--ds-basic-color-status-error, #e31f26);--ds-auro-dropdown-helptext-text-color: var(--ds-basic-color-texticon-default, #2a2a2a)}:host([ondark]:is([validity]:not([validity=valid]))) [auro-dropdown]{--ds-auro-select-border-color: var(--ds-basic-color-status-error-subtle, #fbc6c6);--ds-auro-dropdown-helptext-text-color: var(--ds-basic-color-texticon-inverse, #ffffff)}#slotHolder{display:none}:host([disabled]){pointer-events:none;user-select:none}:host([disabled]:not([ondark])) [auro-dropdown]{--ds-auro-select-border-color: var(--ds-basic-color-border-subtle, #dddddd)}:host(:not([layout*=classic])[disabled][ondark]) [auro-dropdown]{--ds-auro-select-border-color: transparent}`;
7449
7641
 
7450
7642
  // Copyright (c) 2021 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
7451
7643
  // See LICENSE in the project root for license information.
@@ -7460,7 +7652,6 @@ var styleCss$3 = i$5`.util_displayInline{display:inline}.util_displayInlineBlock
7460
7652
  * @slot label - Defines the content of the label.
7461
7653
  * @slot {HTMLSlotElement} optionalLabel - Allows overriding the optional display text "(optional)", which appears next to the label.
7462
7654
  * @slot helpText - Defines the content of the helpText.
7463
- * @slot placeholder - Defines the content of the placeholder to be shown when there is no value
7464
7655
  * @slot valueText - Dropdown value text display.
7465
7656
  * @slot displayValue - Allows custom HTML content to display the selected value when select is not focused.
7466
7657
  * @event auroSelect-valueSet - Notifies that the component has a new value set.
@@ -7730,6 +7921,14 @@ class AuroSelect extends AuroElement$4 {
7730
7921
  reflect: true
7731
7922
  },
7732
7923
 
7924
+ /**
7925
+ * Define custom placeholder text.
7926
+ */
7927
+ placeholder: {
7928
+ type: String,
7929
+ reflect: true
7930
+ },
7931
+
7733
7932
  /**
7734
7933
  * Populates the `required` attribute on the element. Used for client-side validation.
7735
7934
  */
@@ -7776,11 +7975,12 @@ class AuroSelect extends AuroElement$4 {
7776
7975
  },
7777
7976
 
7778
7977
  /**
7779
- * Value selected for the component. Default type is `String`, changing to `Array<String>` when `multiSelect` is true.
7780
- * @type {String|Array<String>}
7978
+ * Value selected for the component.
7781
7979
  */
7782
7980
  value: {
7783
- type: Object
7981
+ type: String,
7982
+ reflect: true,
7983
+ attribute: 'value'
7784
7984
  },
7785
7985
 
7786
7986
  /**
@@ -7832,6 +8032,25 @@ class AuroSelect extends AuroElement$4 {
7832
8032
  ];
7833
8033
  }
7834
8034
 
8035
+ /**
8036
+ * Formatted value based on `multiSelect` state.
8037
+ * Default type is `String`, changing to `Array<String>` when `multiSelect` is true.
8038
+ * @private
8039
+ * @returns {String|Array<String>}
8040
+ */
8041
+ get formattedValue() {
8042
+ if (this.multiSelect) {
8043
+ if (!this.value) {
8044
+ return undefined;
8045
+ }
8046
+ if (this.value.startsWith("[")) {
8047
+ return JSON.parse(this.value);
8048
+ }
8049
+ return [this.value];
8050
+ }
8051
+ return this.value;
8052
+ }
8053
+
7835
8054
  /**
7836
8055
  * Returns classmap configuration for html5 input labels in all layouts.
7837
8056
  * @private
@@ -7840,7 +8059,7 @@ class AuroSelect extends AuroElement$4 {
7840
8059
  get commonLabelClasses() {
7841
8060
  return {
7842
8061
  'is-disabled': this.disabled,
7843
- 'withValue': this.value && this.value.length > 0,
8062
+ 'withValue': this.placeholder || (this.value && this.value.length > 0), // eslint-disable-line no-extra-parens
7844
8063
  'util_displayHiddenVisually': this.hasDisplayValueContent && !this.hasFocus && this.value && this.value.length > 0
7845
8064
  };
7846
8065
  }
@@ -7866,6 +8085,21 @@ class AuroSelect extends AuroElement$4 {
7866
8085
 
7867
8086
  this.dropdown.addEventListener('auroDropdown-toggled', () => {
7868
8087
  this.isPopoverVisible = this.dropdown.isPopoverVisible;
8088
+
8089
+ if (this.dropdown.isPopoverVisible) {
8090
+ // wait til the bib gets fully rendered
8091
+ setTimeout(() => {
8092
+ if (this.dropdown.isBibFullscreen) {
8093
+ // trigger holds the focus since menu is not a focusable element.
8094
+ this.dropdown.trigger.focus();
8095
+
8096
+ // default focus indicator on the first menu option
8097
+ if (this.menu.index < 0) {
8098
+ this.menu.navigateOptions('down');
8099
+ }
8100
+ }
8101
+ });
8102
+ }
7869
8103
  });
7870
8104
 
7871
8105
  // setting up bibtemplate
@@ -8016,46 +8250,58 @@ class AuroSelect extends AuroElement$4 {
8016
8250
  configureSelect() {
8017
8251
 
8018
8252
  this.addEventListener('keydown', (evt) => {
8019
- if (evt.key === 'ArrowUp') {
8020
- evt.preventDefault();
8253
+ // when the focus is on trigger not on close button
8254
+ if (this.dropdown.shadowRoot.activeElement === this.dropdown.trigger) {
8255
+ if (evt.key === 'ArrowUp') {
8256
+ evt.preventDefault();
8021
8257
 
8022
- this.dropdown.show();
8258
+ this.dropdown.show();
8259
+
8260
+ if (this.dropdown.isPopoverVisible) {
8261
+ this.menu.navigateOptions('up');
8262
+ }
8023
8263
 
8024
- if (this.dropdown.isPopoverVisible) {
8025
- this.menu.navigateOptions('up');
8264
+ return;
8026
8265
  }
8027
8266
 
8028
- return;
8029
- }
8267
+ if (evt.key === 'ArrowDown') {
8268
+ evt.preventDefault();
8030
8269
 
8031
- if (evt.key === 'ArrowDown') {
8032
- evt.preventDefault();
8270
+ this.dropdown.show();
8033
8271
 
8034
- this.dropdown.show();
8272
+ if (this.dropdown.isPopoverVisible) {
8273
+ this.menu.navigateOptions('down');
8274
+ }
8035
8275
 
8036
- if (this.dropdown.isPopoverVisible) {
8037
- this.menu.navigateOptions('down');
8276
+ return;
8038
8277
  }
8039
8278
 
8040
- return;
8041
- }
8279
+ if (evt.key === 'Enter') {
8280
+ if (!this.dropdown.isPopoverVisible) {
8281
+ evt.preventDefault();
8282
+ this.menu.makeSelection();
8283
+ }
8042
8284
 
8043
- if (evt.key === 'Enter') {
8044
- if (!this.dropdown.isPopoverVisible) {
8045
- evt.preventDefault();
8046
- this.menu.makeSelection();
8285
+ return;
8047
8286
  }
8048
-
8049
- return;
8050
8287
  }
8051
8288
 
8052
- if (evt.key === 'Tab') {
8289
+ if (evt.key === 'Tab' && this.dropdown.isPopoverVisible) {
8053
8290
  if (this.dropdown.isBibFullscreen) {
8054
8291
  evt.preventDefault();
8292
+
8293
+ // when the focus is on trigger not on close button
8294
+ if (this.dropdown.shadowRoot.activeElement === this.dropdown.trigger) {
8295
+ // `dropdown.focus` will move focus to the first focusable element in bib when it's open,
8296
+ // when bib it not open, it will focus onto trigger.
8297
+ this.dropdown.focus();
8298
+ } else {
8299
+ // when close button has the focus, move focus back to the trigger
8300
+ this.dropdown.trigger.focus();
8301
+ }
8055
8302
  } else {
8056
8303
  this.dropdown.hide();
8057
8304
  }
8058
-
8059
8305
  return;
8060
8306
  }
8061
8307
 
@@ -8223,38 +8469,29 @@ class AuroSelect extends AuroElement$4 {
8223
8469
  this.configureDropdown();
8224
8470
  this.configureMenu();
8225
8471
  this.configureSelect();
8226
-
8227
- // Set the initial value in auro-menu if defined
8228
- if (this.hasAttribute('value') && this.getAttribute('value').length > 0) {
8229
- this.value = this.multiSelect ? arrayConverter(this.getAttribute('value')) : this.getAttribute('value');
8230
- if (this.menu) {
8231
- this.menu.value = this.value;
8232
- }
8233
- }
8234
8472
  }
8235
8473
 
8236
8474
  /**
8237
8475
  * Update the menu value. With checks for menu existence. Awaits value update.
8238
8476
  * @param {string} value - The value to set in the menu.
8239
- * @returns void
8477
+ * @returns {void}
8240
8478
  * @private
8241
8479
  */
8242
8480
  async updateMenuValue(value) {
8243
8481
  if (!this.menu) return;
8244
8482
 
8483
+ this.menu.setAttribute('value', value);
8245
8484
  this.menu.value = value;
8246
8485
  await this.menu.updateComplete;
8247
8486
  }
8248
8487
 
8249
8488
  async updated(changedProperties) {
8250
- if (changedProperties.has('multiSelect')) {
8489
+ if (changedProperties.has('multiSelect') && !changedProperties.has('value')) {
8251
8490
  this.clearSelection();
8252
8491
  }
8253
8492
 
8254
8493
  if (changedProperties.has('value')) {
8255
8494
  if (this.value) {
8256
- this.value = this.multiSelect ? arrayConverter(this.value) : this.value;
8257
-
8258
8495
  await this.updateMenuValue(this.value);
8259
8496
 
8260
8497
  if (this.menu) {
@@ -8280,7 +8517,7 @@ class AuroSelect extends AuroElement$4 {
8280
8517
  composed: true,
8281
8518
  detail: {
8282
8519
  optionSelected: this.optionSelected,
8283
- value: this.value
8520
+ value: this.formattedValue
8284
8521
  }
8285
8522
  }));
8286
8523
  }
@@ -8339,13 +8576,13 @@ class AuroSelect extends AuroElement$4 {
8339
8576
  const selectedValue = selectedOption.value;
8340
8577
 
8341
8578
  if (this.multiSelect) {
8342
- const currentArray = Array.isArray(this.value) ? this.value : [];
8579
+ const currentArray = this.formattedValue;
8343
8580
 
8344
8581
  if (!currentArray.includes(selectedValue)) {
8345
- this.value = [
8582
+ this.value = JSON.stringify([
8346
8583
  ...currentArray,
8347
8584
  selectedValue
8348
- ];
8585
+ ]);
8349
8586
  }
8350
8587
  } else {
8351
8588
  const currentValue = this.value;
@@ -8368,12 +8605,17 @@ class AuroSelect extends AuroElement$4 {
8368
8605
  }
8369
8606
 
8370
8607
  if (this.multiSelect) {
8371
- nativeSelect.value = this.value ? this.value[0] : '';
8608
+ nativeSelect.value = this.multiSelect ? this.multiSelect[0] : '';
8372
8609
  } else {
8373
8610
  nativeSelect.value = this.value || '';
8374
8611
  }
8375
8612
  }
8376
8613
 
8614
+ /**
8615
+ * Returns HTML for the hidden a11y screen reader content.
8616
+ * @private
8617
+ * @returns {html} - Returns HTML for the hidden a11y screen reader content.
8618
+ */
8377
8619
  renderAriaHtml() {
8378
8620
  return u`
8379
8621
  <div aria-live="polite" class="util_displayHiddenVisually">
@@ -8394,6 +8636,11 @@ class AuroSelect extends AuroElement$4 {
8394
8636
  `;
8395
8637
  }
8396
8638
 
8639
+ /**
8640
+ * Returns HTML for the hidden HTML5 select.
8641
+ * @private
8642
+ * @returns {html} - Returns HTML for the hidden HTML5 select.
8643
+ */
8397
8644
  renderNativeSelect() {
8398
8645
  return u`
8399
8646
  <div class="nativeSelectWrapper util_displayHidden">
@@ -8440,7 +8687,7 @@ class AuroSelect extends AuroElement$4 {
8440
8687
  : u`
8441
8688
  <${this.helpTextTag} error ?onDark="${this.onDark}">
8442
8689
  <p id="${this.uniqueId}" role="alert" aria-live="assertive" part="helpText">
8443
- ERROR MESSAGE ${this.errorMessage}
8690
+ ${this.errorMessage}
8444
8691
  </p>
8445
8692
  </${this.helpTextTag}>
8446
8693
  `
@@ -8455,14 +8702,14 @@ class AuroSelect extends AuroElement$4 {
8455
8702
  */
8456
8703
  renderLayoutEmphasized() {
8457
8704
  const placeholderClass = {
8458
- hidden: this.value,
8705
+ 'util_displayHidden': this.value
8459
8706
  };
8460
8707
 
8461
8708
  const displayValueClasses = {
8462
8709
  'displayValue': true,
8463
8710
  'hasContent': this.hasDisplayValueContent,
8464
8711
  'hasFocus': this.isPopoverVisible,
8465
- 'withValue': this.value && this.value.length > 0,
8712
+ 'withValue': this.placeholder || (this.value && this.value.length > 0), // eslint-disable-line no-extra-parens
8466
8713
  'force': this.forceDisplayValue,
8467
8714
  };
8468
8715
 
@@ -8489,7 +8736,6 @@ class AuroSelect extends AuroElement$4 {
8489
8736
  .offset="${this.offset}"
8490
8737
  .placement="${this.placement}"
8491
8738
  chevron
8492
- fluid
8493
8739
  for="selectMenu"
8494
8740
  layout="${this.layout}"
8495
8741
  part="dropdown"
@@ -8506,11 +8752,9 @@ class AuroSelect extends AuroElement$4 {
8506
8752
  ${this.required ? undefined : u`<slot name="optionalLabel"> (optional)</slot>`}
8507
8753
  </label>
8508
8754
  <div class="value" id="value"></div>
8509
- ${this.value ? undefined : u`
8510
- <div id="placeholder" class="${e(placeholderClass)}">
8511
- <slot name="placeholder"></slot>
8512
- </div>
8513
- `}
8755
+ <div id="placeholder" class="${e(placeholderClass)}">
8756
+ ${this.placeholder}
8757
+ </div>
8514
8758
  </div>
8515
8759
  <div class="${e(displayValueClasses)}" aria-hidden="true" part="displayValue">
8516
8760
  <slot name="displayValue"></slot>
@@ -8537,14 +8781,14 @@ class AuroSelect extends AuroElement$4 {
8537
8781
  */
8538
8782
  renderLayoutSnowflake() {
8539
8783
  const placeholderClass = {
8540
- hidden: this.value,
8784
+ 'util_displayHidden': this.value
8541
8785
  };
8542
8786
 
8543
8787
  const displayValueClasses = {
8544
8788
  'displayValue': true,
8545
8789
  'hasContent': this.hasDisplayValueContent,
8546
8790
  'hasFocus': this.isPopoverVisible,
8547
- 'withValue': this.value && this.value.length > 0,
8791
+ 'withValue': this.placeholder || (this.value && this.value.length > 0), // eslint-disable-line no-extra-parens
8548
8792
  'force': this.forceDisplayValue,
8549
8793
  };
8550
8794
 
@@ -8570,7 +8814,6 @@ class AuroSelect extends AuroElement$4 {
8570
8814
  .offset="${this.offset}"
8571
8815
  .placement="${this.placement}"
8572
8816
  chevron
8573
- fluid
8574
8817
  for="selectMenu"
8575
8818
  layout="${this.layout}"
8576
8819
  part="dropdown"
@@ -8587,11 +8830,9 @@ class AuroSelect extends AuroElement$4 {
8587
8830
  ${this.required ? undefined : u`<slot name="optionalLabel"> (optional)</slot>`}
8588
8831
  </label>
8589
8832
  <div class="value" id="value"></div>
8590
- ${this.value ? undefined : u`
8591
- <div id="placeholder" class="${e(placeholderClass)}">
8592
- <slot name="placeholder"></slot>
8593
- </div>
8594
- `}
8833
+ <div id="placeholder" class="${e(placeholderClass)}">
8834
+ ${this.placeholder}
8835
+ </div>
8595
8836
  </div>
8596
8837
  <div class="${e(displayValueClasses)}" aria-hidden="true" part="displayValue">
8597
8838
  <slot name="displayValue"></slot>
@@ -8619,14 +8860,14 @@ class AuroSelect extends AuroElement$4 {
8619
8860
  */
8620
8861
  renderLayoutClassic() {
8621
8862
  const placeholderClass = {
8622
- hidden: this.value,
8863
+ 'util_displayHidden': this.value
8623
8864
  };
8624
8865
 
8625
8866
  const displayValueClasses = {
8626
8867
  'displayValue': true,
8627
8868
  'hasContent': this.hasDisplayValueContent,
8628
8869
  'hasFocus': this.isPopoverVisible,
8629
- 'withValue': this.value && this.value.length > 0,
8870
+ 'withValue': this.placeholder || (this.value && this.value.length > 0), // eslint-disable-line no-extra-parens
8630
8871
  'force': this.forceDisplayValue,
8631
8872
  };
8632
8873
 
@@ -8652,7 +8893,6 @@ class AuroSelect extends AuroElement$4 {
8652
8893
  .offset="${this.offset}"
8653
8894
  .placement="${this.placement}"
8654
8895
  chevron
8655
- fluid
8656
8896
  for="selectMenu"
8657
8897
  layout="${this.layout}"
8658
8898
  part="dropdown"
@@ -8669,11 +8909,9 @@ class AuroSelect extends AuroElement$4 {
8669
8909
  ${this.required ? undefined : u`<slot name="optionalLabel"> (optional)</slot>`}
8670
8910
  </label>
8671
8911
  <div class="value" id="value"></div>
8672
- ${this.value ? undefined : u`
8673
- <div id="placeholder" class="${e(placeholderClass)}">
8674
- <slot name="placeholder"></slot>
8675
- </div>
8676
- `}
8912
+ <div id="placeholder" class="${e(placeholderClass)}">
8913
+ ${this.placeholder}
8914
+ </div>
8677
8915
  </div>
8678
8916
  <div class="${e(displayValueClasses)}" aria-hidden="true" part="displayValue">
8679
8917
  <slot name="displayValue"></slot>
@@ -8723,106 +8961,6 @@ class AuroSelect extends AuroElement$4 {
8723
8961
 
8724
8962
  // When using auroElement, use the following attribute and function when hiding content from screen readers.
8725
8963
  // aria-hidden="${this.hideAudible(this.hiddenAudible)}"
8726
-
8727
- // function that renders the HTML and CSS into the scope of the component
8728
- renderBACKUP() {
8729
- const placeholderClass = {
8730
- hidden: this.value,
8731
- };
8732
-
8733
- return u`
8734
- <div class="outerWrapper">
8735
- <div aria-live="polite" class="util_displayHiddenVisually">
8736
- ${this.optionActive && this.options.length > 0
8737
- ? u`
8738
- ${`${this.optionActive.innerText}, option ${this.options.indexOf(this.optionActive) + 1} of ${this.options.length}`}
8739
- `
8740
- : undefined
8741
- };
8742
-
8743
- ${this.optionSelected && this.options.length > 0
8744
- ? u`
8745
- ${`${this.optionSelected.innerText} selected`}
8746
- `
8747
- : undefined
8748
- };
8749
- </div>
8750
- <div id="slotHolder" aria-hidden="true">
8751
- <slot name="bib.fullscreen.headline" @slotchange="${this.handleSlotChange}"></slot>
8752
- </div>
8753
- <${this.dropdownTag}
8754
- ?autoPlacement="${this.autoPlacement}"
8755
- ?disabled="${this.disabled}"
8756
- ?error="${this.validity !== undefined && this.validity !== 'valid'}"
8757
- ?matchWidth="${this.matchWidth}"
8758
- ?noFlip="${this.noFlip}"
8759
- ?onDark="${this.onDark}"
8760
- .fullscreenBreakpoint="${this.fullscreenBreakpoint}"
8761
- .offset="${this.offset}"
8762
- .placement="${this.placement}"
8763
- chevron
8764
- fluid
8765
- for="selectMenu"
8766
- layout="${this.layout}"
8767
- part="dropdown"
8768
- shape="${this.shape}"
8769
- size="${this.size}">
8770
- <span slot="trigger" aria-haspopup="true" id="triggerFocus">
8771
- <span id="placeholder"
8772
- class="${e(placeholderClass)}"
8773
- ?aria-hidden="${this.optionSelected && this.optionSelected.length ? 'true' : false}"
8774
- >
8775
- <slot name="placeholder"></slot>
8776
- </span>
8777
- <slot name="valueText" id="valueText"></slot>
8778
- </span>
8779
-
8780
- <${this.bibtemplateTag} ?large="${this.largeFullscreenHeadline}" @close-click="${this.hideBib}">
8781
- <slot></slot>
8782
- </${this.bibtemplateTag}>
8783
- <slot name="label" slot="label"></slot>
8784
- ${this.required ? undefined : u`<slot name="optionalLabel"> (optional)</slot>`}
8785
- <p slot="helpText">
8786
- ${!this.validity || this.validity === undefined || this.validity === 'valid'
8787
- ? u`
8788
- <span id="${this.uniqueId}" part="helpText">
8789
- <slot name="helpText"></slot>
8790
- </span>`
8791
- : u`
8792
- <span id="${this.uniqueId}" role="alert" aria-live="assertive" part="helpText">
8793
- ${this.errorMessage}
8794
- </span>`
8795
- }
8796
- </p>
8797
- </${this.dropdownTag}>
8798
- <div class="nativeSelectWrapper">
8799
- <select
8800
- tabindex="-1"
8801
- id="${`native-select-${this.id || this.uniqueId}`}"
8802
- name="${this.name || ''}"
8803
- ?disabled="${this.disabled}"
8804
- ?required="${this.required}"
8805
- aria-hidden="true"
8806
- autocomplete="${o(this.autocomplete)}"
8807
- @change="${this._handleNativeSelectChange}">
8808
- <option value="" ?selected="${!this.value}"></option>
8809
- ${this.options.map((option) => {
8810
- const optionValue = option.value || option.textContent;
8811
- return u`
8812
- <option
8813
- value="${optionValue}"
8814
- ?selected="${this.value === optionValue}">
8815
- ${option.textContent}
8816
- </option>
8817
- `;
8818
- })}
8819
- </select>
8820
- </div>
8821
- <!-- Help text and error message template -->
8822
- ${this.renderHtmlHelpText()}
8823
- </div>
8824
- `;
8825
- }
8826
8964
  }
8827
8965
 
8828
8966
  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)}`;
@@ -8882,7 +9020,6 @@ function dispatchMenuEvent(element, eventName, detail = null) {
8882
9020
  * @attr {boolean} nocheckmark - When true, selected option will not show the checkmark.
8883
9021
  * @attr {boolean} loading - When true, displays a loading state using the loadingIcon and loadingText slots if provided.
8884
9022
  * @attr {boolean} multiselect - When true, the selected option can be multiple options.
8885
- * @attr {String|Array<string>} value - Value selected for the menu, type `string` by default. In multi-select mode, `value` is an array of strings.
8886
9023
  * @prop {boolean} hasLoadingPlaceholder - Indicates whether the menu has a loadingIcon or loadingText to render when in a loading state.
8887
9024
  * @event {CustomEvent<Element>} auroMenu-activatedOption - Notifies that a menuoption has been made `active`.
8888
9025
  * @event {CustomEvent<any>} auroMenu-customEventFired - Notifies that a custom event has been fired.
@@ -8995,9 +9132,14 @@ class AuroMenu extends AuroElement$4 {
8995
9132
  reflect: true,
8996
9133
  attribute: 'multiselect'
8997
9134
  },
9135
+
9136
+ /**
9137
+ * Value selected for the component.
9138
+ */
8998
9139
  value: {
8999
- // Allow string, string[] arrays and undefined
9000
- type: Object
9140
+ type: String,
9141
+ reflect: true,
9142
+ attribute: 'value'
9001
9143
  },
9002
9144
 
9003
9145
  /**
@@ -9032,6 +9174,25 @@ class AuroMenu extends AuroElement$4 {
9032
9174
  AuroLibraryRuntimeUtils$6.prototype.registerComponent(name, AuroMenu);
9033
9175
  }
9034
9176
 
9177
+ /**
9178
+ * Formatted value based on `multiSelect` state.
9179
+ * Default type is `String`, changing to `Array<String>` when `multiSelect` is true.
9180
+ * @private
9181
+ * @returns {String|Array<String>}
9182
+ */
9183
+ get formattedValue() {
9184
+ if (this.multiSelect) {
9185
+ if (!this.value) {
9186
+ return undefined;
9187
+ }
9188
+ if (this.value.startsWith("[")) {
9189
+ return JSON.parse(this.value);
9190
+ }
9191
+ return [this.value];
9192
+ }
9193
+ return this.value;
9194
+ }
9195
+
9035
9196
  // Lifecycle Methods
9036
9197
 
9037
9198
  connectedCallback() {
@@ -9074,7 +9235,7 @@ class AuroMenu extends AuroElement$4 {
9074
9235
  updated(changedProperties) {
9075
9236
  super.updated(changedProperties);
9076
9237
 
9077
- if (changedProperties.has('multiSelect')) {
9238
+ if (changedProperties.has('multiSelect') && !changedProperties.has("value")) {
9078
9239
  // Reset selection if multiSelect mode changes
9079
9240
  this.clearSelection();
9080
9241
  }
@@ -9088,7 +9249,7 @@ class AuroMenu extends AuroElement$4 {
9088
9249
  } else {
9089
9250
  if (this.multiSelect) {
9090
9251
  // In multiselect mode, this.value should be an array of strings
9091
- const valueArray = Array.isArray(this.value) ? this.value : [this.value];
9252
+ const valueArray = this.formattedValue;
9092
9253
  const matchingOptions = this.items.filter((item) => valueArray.includes(item.value));
9093
9254
 
9094
9255
  this.optionSelected = matchingOptions.length > 0 ? matchingOptions : undefined;
@@ -9255,14 +9416,14 @@ class AuroMenu extends AuroElement$4 {
9255
9416
  */
9256
9417
  handleSelectState(option) {
9257
9418
  if (this.multiSelect) {
9258
- const currentValue = this.value || [];
9419
+ const currentValue = this.formattedValue || [];
9259
9420
  const currentSelected = this.optionSelected || [];
9260
9421
 
9261
9422
  if (!currentValue.includes(option.value)) {
9262
- this.value = [
9423
+ this.value = JSON.stringify([
9263
9424
  ...currentValue,
9264
9425
  option.value
9265
- ];
9426
+ ]);
9266
9427
  }
9267
9428
  if (!currentSelected.includes(option)) {
9268
9429
  this.optionSelected = [
@@ -9285,13 +9446,15 @@ class AuroMenu extends AuroElement$4 {
9285
9446
  * @param {HTMLElement} option - The menuoption to be deselected.
9286
9447
  */
9287
9448
  handleDeselectState(option) {
9288
- if (this.multiSelect && Array.isArray(this.value)) {
9449
+ if (this.multiSelect) {
9289
9450
  // Remove this option from array
9290
- this.value = this.value.filter((val) => val !== option.value);
9451
+ const newFormattedValue = (this.formattedValue || []).filter((val) => val !== option.value);
9291
9452
 
9292
9453
  // If array is empty after removal, set back to undefined
9293
- if (this.value.length === 0) {
9454
+ if (newFormattedValue && newFormattedValue.length === 0) {
9294
9455
  this.value = undefined;
9456
+ } else {
9457
+ this.value = JSON.stringify(newFormattedValue);
9295
9458
  }
9296
9459
 
9297
9460
  this.optionSelected = this.optionSelected.filter((val) => val !== option);
@@ -9642,7 +9805,7 @@ class AuroMenu extends AuroElement$4 {
9642
9805
  }
9643
9806
  }
9644
9807
 
9645
- 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)}: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) + 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}`;
9808
+ 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-150, 0.75rem) + 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-150, 0.75rem) + 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}`;
9646
9809
 
9647
9810
  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)}`;
9648
9811
 
@@ -10208,7 +10371,6 @@ function initExamples(initCount) {
10208
10371
  inDialogExample();
10209
10372
  resetStateExample();
10210
10373
  auroMenuLoadingExample();
10211
- valueTextExample();
10212
10374
  } catch (err) {
10213
10375
  if (initCount <= 20) {
10214
10376
  // setTimeout handles issue where content is sometimes loaded after the functions get called