@aurodesignsystem-dev/auro-formkit 0.0.0-pr624.4 → 0.0.0-pr624.40

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 (114) hide show
  1. package/components/bibtemplate/dist/auro-bibtemplate.d.ts +13 -2
  2. package/components/bibtemplate/dist/buttonVersion.d.ts +2 -0
  3. package/components/bibtemplate/dist/iconVersion.d.ts +1 -1
  4. package/components/bibtemplate/dist/index.js +1292 -79
  5. package/components/bibtemplate/dist/registered.js +1292 -79
  6. package/components/checkbox/README.md +1 -1
  7. package/components/checkbox/demo/api.md +47 -14
  8. package/components/checkbox/demo/api.min.js +44 -31
  9. package/components/checkbox/demo/index.md +2 -2
  10. package/components/checkbox/demo/index.min.js +44 -31
  11. package/components/checkbox/demo/readme.md +1 -1
  12. package/components/checkbox/dist/auro-checkbox-group.d.ts +1 -1
  13. package/components/checkbox/dist/auro-checkbox.d.ts +3 -3
  14. package/components/checkbox/dist/index.js +44 -31
  15. package/components/checkbox/dist/registered.js +44 -31
  16. package/components/combobox/demo/api.md +100 -2
  17. package/components/combobox/demo/api.min.js +3202 -759
  18. package/components/combobox/demo/index.md +6 -30
  19. package/components/combobox/demo/index.min.js +3202 -759
  20. package/components/combobox/dist/auro-combobox.d.ts +37 -16
  21. package/components/combobox/dist/index.js +3091 -789
  22. package/components/combobox/dist/registered.js +3091 -789
  23. package/components/counter/demo/api.html +1 -0
  24. package/components/counter/demo/api.md +21 -19
  25. package/components/counter/demo/api.min.js +3324 -614
  26. package/components/counter/demo/index.html +1 -0
  27. package/components/counter/demo/index.md +103 -34
  28. package/components/counter/demo/index.min.js +3324 -614
  29. package/components/counter/dist/auro-counter-button.d.ts +2 -0
  30. package/components/counter/dist/auro-counter-group.d.ts +89 -6
  31. package/components/counter/dist/auro-counter.d.ts +6 -0
  32. package/components/counter/dist/helptextVersion.d.ts +2 -0
  33. package/components/counter/dist/iconVersion.d.ts +1 -1
  34. package/components/counter/dist/index.js +3324 -614
  35. package/components/counter/dist/registered.js +3324 -614
  36. package/components/datepicker/demo/api.md +36 -19
  37. package/components/datepicker/demo/api.min.js +11976 -8000
  38. package/components/datepicker/demo/index.md +80 -0
  39. package/components/datepicker/demo/index.min.js +11976 -8000
  40. package/components/datepicker/dist/auro-datepicker.d.ts +71 -3
  41. package/components/datepicker/dist/buttonVersion.d.ts +1 -1
  42. package/components/datepicker/dist/iconVersion.d.ts +2 -0
  43. package/components/datepicker/dist/index.js +12238 -8262
  44. package/components/datepicker/dist/popoverVersion.d.ts +1 -1
  45. package/components/datepicker/dist/registered.js +12238 -8262
  46. package/components/dropdown/demo/api.md +8 -9
  47. package/components/dropdown/demo/api.min.js +551 -147
  48. package/components/dropdown/demo/index.md +57 -9
  49. package/components/dropdown/demo/index.min.js +551 -147
  50. package/components/dropdown/dist/auro-dropdown.d.ts +28 -9
  51. package/components/dropdown/dist/auro-dropdownBib.d.ts +22 -0
  52. package/components/dropdown/dist/index.js +551 -147
  53. package/components/dropdown/dist/registered.js +551 -147
  54. package/components/form/demo/api.min.js +1 -1
  55. package/components/form/demo/index.min.js +1 -1
  56. package/components/form/dist/index.js +1 -1
  57. package/components/form/dist/registered.js +1 -1
  58. package/components/helptext/dist/index.js +2 -2
  59. package/components/helptext/dist/registered.js +2 -2
  60. package/components/input/README.md +5 -2
  61. package/components/input/demo/api.md +271 -176
  62. package/components/input/demo/api.min.js +956 -270
  63. package/components/input/demo/index.md +48 -32
  64. package/components/input/demo/index.min.js +955 -269
  65. package/components/input/demo/readme.md +5 -2
  66. package/components/input/dist/auro-input.d.ts +23 -15
  67. package/components/input/dist/base-input.d.ts +32 -8
  68. package/components/input/dist/buttonVersion.d.ts +1 -1
  69. package/components/input/dist/iconVersion.d.ts +1 -1
  70. package/components/input/dist/index.js +955 -269
  71. package/components/input/dist/registered.js +955 -269
  72. package/components/layoutElement/dist/index.js +13 -10
  73. package/components/menu/demo/api.html +38 -0
  74. package/components/menu/demo/api.md +68 -7
  75. package/components/menu/demo/api.min.js +278 -42
  76. package/components/menu/demo/index.min.js +278 -42
  77. package/components/menu/dist/auro-menu.d.ts +28 -5
  78. package/components/menu/dist/auro-menuoption.d.ts +15 -3
  79. package/components/menu/dist/iconVersion.d.ts +1 -1
  80. package/components/menu/dist/index.js +278 -42
  81. package/components/menu/dist/registered.js +278 -42
  82. package/components/menu/dist/styles/default/color-menuoption-css.d.ts +2 -0
  83. package/components/menu/dist/styles/default/style-menu-css.d.ts +2 -0
  84. package/components/menu/dist/styles/default/style-menuoption-css.d.ts +2 -0
  85. package/components/menu/dist/styles/default/tokens-css.d.ts +2 -0
  86. package/components/radio/demo/api.md +7 -8
  87. package/components/radio/demo/api.min.js +68 -80
  88. package/components/radio/demo/index.min.js +68 -80
  89. package/components/radio/dist/auro-radio-group.d.ts +1 -1
  90. package/components/radio/dist/auro-radio.d.ts +9 -12
  91. package/components/radio/dist/index.js +68 -80
  92. package/components/radio/dist/registered.js +68 -80
  93. package/components/select/demo/api.md +123 -13
  94. package/components/select/demo/api.min.js +3045 -456
  95. package/components/select/demo/index.html +1 -0
  96. package/components/select/demo/index.md +323 -763
  97. package/components/select/demo/index.min.js +3045 -456
  98. package/components/select/dist/auro-select.d.ts +112 -11
  99. package/components/select/dist/helptextVersion.d.ts +2 -0
  100. package/components/select/dist/index.js +2925 -477
  101. package/components/select/dist/registered.js +2925 -477
  102. package/components/select/dist/styles/shapeSize-css.d.ts +2 -0
  103. package/components/select/dist/styles/tokens-css.d.ts +2 -0
  104. package/package.json +6 -4
  105. /package/components/{dropdown/dist/styles/default/bibColors-css.d.ts → counter/dist/styles/shapeSize-css.d.ts} +0 -0
  106. /package/components/{dropdown → datepicker}/dist/styles/default/color-css.d.ts +0 -0
  107. /package/components/{dropdown/dist/styles/default/bibStyles-css.d.ts → datepicker/dist/styles/shapeSize-css.d.ts} +0 -0
  108. /package/components/{dropdown/dist/styles/default/style-css.d.ts → datepicker/dist/styles/snowflake/color-css.d.ts} +0 -0
  109. /package/components/{dropdown/dist/styles → datepicker/dist/styles/snowflake}/style-css.d.ts +0 -0
  110. /package/components/{menu/dist/styles/color-menu-css.d.ts → dropdown/dist/styles/classic/bibColors-css.d.ts} +0 -0
  111. /package/components/{menu/dist/styles/color-menuoption-css.d.ts → dropdown/dist/styles/classic/bibStyles-css.d.ts} +0 -0
  112. /package/components/{menu/dist/styles/style-menu-css.d.ts → dropdown/dist/styles/classic/color-css.d.ts} +0 -0
  113. /package/components/{menu/dist/styles/style-menuoption-css.d.ts → dropdown/dist/styles/classic/style-css.d.ts} +0 -0
  114. /package/components/menu/dist/styles/{tokens-css.d.ts → default/color-menu-css.d.ts} +0 -0
@@ -10,7 +10,7 @@ import { ifDefined } from 'lit/directives/if-defined.js';
10
10
 
11
11
  /* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
12
12
 
13
- let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
13
+ let AuroLibraryRuntimeUtils$2 = class AuroLibraryRuntimeUtils {
14
14
 
15
15
  /* eslint-disable jsdoc/require-param */
16
16
 
@@ -593,10 +593,11 @@ const flip$1 = function (options) {
593
593
  const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
594
594
  const nextPlacement = placements[nextIndex];
595
595
  if (nextPlacement) {
596
- var _overflowsData$;
597
596
  const ignoreCrossAxisOverflow = checkCrossAxis === 'alignment' ? initialSideAxis !== getSideAxis(nextPlacement) : false;
598
- const hasInitialMainAxisOverflow = ((_overflowsData$ = overflowsData[0]) == null ? void 0 : _overflowsData$.overflows[0]) > 0;
599
- if (!ignoreCrossAxisOverflow || hasInitialMainAxisOverflow) {
597
+ if (!ignoreCrossAxisOverflow ||
598
+ // We leave the current main axis only if every placement on that axis
599
+ // overflows the main axis.
600
+ overflowsData.every(d => d.overflows[0] > 0 && getSideAxis(d.placement) === initialSideAxis)) {
600
601
  // Try next placement and re-run the lifecycle.
601
602
  return {
602
603
  data: {
@@ -1617,8 +1618,28 @@ class AuroFloatingUI {
1617
1618
  if (!AuroFloatingUI.isMousePressHandlerInitialized && window && window.addEventListener) {
1618
1619
  AuroFloatingUI.isMousePressHandlerInitialized = true;
1619
1620
 
1621
+ // Track timeout for isMousePressed reset to avoid race conditions
1622
+ if (!AuroFloatingUI._mousePressedTimeout) {
1623
+ AuroFloatingUI._mousePressedTimeout = null;
1624
+ }
1620
1625
  const mouseEventGlobalHandler = (event) => {
1621
- AuroFloatingUI.isMousePressed = event.type === 'mousedown';
1626
+ const isPressed = event.type === 'mousedown';
1627
+ if (isPressed) {
1628
+ // Clear any pending timeout to prevent race condition
1629
+ if (AuroFloatingUI._mousePressedTimeout !== null) {
1630
+ clearTimeout(AuroFloatingUI._mousePressedTimeout);
1631
+ AuroFloatingUI._mousePressedTimeout = null;
1632
+ }
1633
+ if (!AuroFloatingUI.isMousePressed) {
1634
+ AuroFloatingUI.isMousePressed = true;
1635
+ }
1636
+ } else if (AuroFloatingUI.isMousePressed && !isPressed) {
1637
+ // Schedule reset and track timeout ID
1638
+ AuroFloatingUI._mousePressedTimeout = setTimeout(() => {
1639
+ AuroFloatingUI.isMousePressed = false;
1640
+ AuroFloatingUI._mousePressedTimeout = null;
1641
+ }, 0);
1642
+ }
1622
1643
  };
1623
1644
 
1624
1645
  window.addEventListener('mousedown', mouseEventGlobalHandler);
@@ -1745,6 +1766,7 @@ class AuroFloatingUI {
1745
1766
 
1746
1767
  // Compute the position of the bib
1747
1768
  computePosition(this.element.trigger, this.element.bib, {
1769
+ strategy: this.element.floaterConfig?.strategy || 'fixed',
1748
1770
  placement: this.element.floaterConfig?.placement,
1749
1771
  middleware: middleware || []
1750
1772
  }).then(({ x, y }) => { // eslint-disable-line id-length
@@ -1879,8 +1901,9 @@ class AuroFloatingUI {
1879
1901
  if (this.element.contains(activeElement) || this.element.bib?.contains(activeElement)) {
1880
1902
  return;
1881
1903
  }
1882
- // if fullscreen bib is still open and the focus is missing, do not close
1883
- if (this.element.bib.hasAttribute('isfullscreen') && activeElement === document.body) {
1904
+
1905
+ // if fullscreen bib is in fullscreen mode, do not close
1906
+ if (this.element.bib.hasAttribute('isfullscreen')) {
1884
1907
  return;
1885
1908
  }
1886
1909
 
@@ -2062,10 +2085,11 @@ class AuroFloatingUI {
2062
2085
  // Space is included as it's expected behavior for interactive elements
2063
2086
 
2064
2087
  const origin = event.composedPath()[0];
2065
- if (event.key === 'Enter' || ((!origin || origin.tagName !== "INPUT") && event.key === ' ')) {
2066
- event.preventDefault(); // Prevent page scroll on space
2088
+ if (event.key === 'Enter' || event.key === ' ' && (!origin || origin.tagName !== "INPUT")) {
2089
+
2090
+ event.preventDefault();
2067
2091
  this.handleClick();
2068
- }
2092
+ }
2069
2093
  break;
2070
2094
  case 'mouseenter':
2071
2095
  if (this.element.hoverToggle) {
@@ -2181,8 +2205,6 @@ class AuroFloatingUI {
2181
2205
  this.element.hoverToggle = this.element.floaterConfig.hoverToggle;
2182
2206
  }
2183
2207
 
2184
- document.body.append(this.element.bib);
2185
-
2186
2208
  this.regenerateBibId();
2187
2209
  this.handleTriggerTabIndex();
2188
2210
 
@@ -2219,6 +2241,267 @@ class AuroFloatingUI {
2219
2241
  }
2220
2242
  }
2221
2243
 
2244
+ // Selectors for focusable elements
2245
+ const FOCUSABLE_SELECTORS = [
2246
+ 'a[href]',
2247
+ 'button:not([disabled])',
2248
+ 'textarea:not([disabled])',
2249
+ 'input:not([disabled])',
2250
+ 'select:not([disabled])',
2251
+ '[role="tab"]:not([disabled])',
2252
+ '[role="link"]:not([disabled])',
2253
+ '[role="button"]:not([disabled])',
2254
+ '[tabindex]:not([tabindex="-1"])',
2255
+ '[contenteditable]:not([contenteditable="false"])'
2256
+ ];
2257
+
2258
+ // List of custom components that are known to be focusable
2259
+ const FOCUSABLE_COMPONENTS = [
2260
+ 'auro-checkbox',
2261
+ 'auro-radio',
2262
+ 'auro-dropdown',
2263
+ 'auro-button',
2264
+ 'auro-combobox',
2265
+ 'auro-input',
2266
+ 'auro-counter',
2267
+ 'auro-menu',
2268
+ 'auro-select',
2269
+ 'auro-datepicker',
2270
+ 'auro-hyperlink',
2271
+ 'auro-accordion',
2272
+ ];
2273
+
2274
+ /**
2275
+ * Determines if a given element is a custom focusable component.
2276
+ * Returns true if the element matches a known focusable component and is not disabled.
2277
+ *
2278
+ * @param {HTMLElement} element The element to check for focusability.
2279
+ * @returns {boolean} True if the element is a focusable custom component, false otherwise.
2280
+ */
2281
+ function isFocusableComponent(element) {
2282
+ const componentName = element.tagName.toLowerCase();
2283
+
2284
+ // Guard Clause: Element is a focusable component
2285
+ if (!FOCUSABLE_COMPONENTS.some((name) => element.hasAttribute(name) || componentName === name)) return false;
2286
+
2287
+ // Guard Clause: Element is not disabled
2288
+ if (element.hasAttribute('disabled')) return false;
2289
+
2290
+ // Guard Clause: The element is a hyperlink and has no href attribute
2291
+ if (componentName.match("hyperlink") && !element.hasAttribute('href')) return false;
2292
+
2293
+ // If all guard clauses pass, the element is a focusable component
2294
+ return true;
2295
+ }
2296
+
2297
+ /**
2298
+ * Retrieves all focusable elements within the container in DOM order, including those in shadow DOM and slots.
2299
+ * Returns a unique, ordered array of elements that can receive focus.
2300
+ *
2301
+ * @param {HTMLElement} container The container to search within
2302
+ * @returns {Array<HTMLElement>} An array of focusable elements within the container.
2303
+ */
2304
+ function getFocusableElements(container) {
2305
+ // Get elements in DOM order by walking the tree
2306
+ const orderedFocusableElements = [];
2307
+
2308
+ // Define a recursive function to collect focusable elements in DOM order
2309
+ const collectFocusableElements = (root) => {
2310
+ // Check if current element is focusable
2311
+ if (root.nodeType === Node.ELEMENT_NODE) {
2312
+ // Check if this is a custom component that is focusable
2313
+ const isComponentFocusable = isFocusableComponent(root);
2314
+
2315
+ if (isComponentFocusable) {
2316
+ // Add the component itself as a focusable element and don't traverse its shadow DOM
2317
+ orderedFocusableElements.push(root);
2318
+ return; // Skip traversing inside this component
2319
+ }
2320
+
2321
+ // Check if the element itself matches any selector
2322
+ for (const selector of FOCUSABLE_SELECTORS) {
2323
+ if (root.matches?.(selector)) {
2324
+ orderedFocusableElements.push(root);
2325
+ break; // Once we know it's focusable, no need to check other selectors
2326
+ }
2327
+ }
2328
+
2329
+ // Process shadow DOM only for non-Auro components
2330
+ if (root.shadowRoot) {
2331
+ // Process shadow DOM children in order
2332
+ if (root.shadowRoot.children) {
2333
+ Array.from(root.shadowRoot.children).forEach(child => {
2334
+ collectFocusableElements(child);
2335
+ });
2336
+ }
2337
+ }
2338
+
2339
+ // Process slots and their assigned nodes in order
2340
+ if (root.tagName === 'SLOT') {
2341
+ const assignedNodes = root.assignedNodes({ flatten: true });
2342
+ for (const node of assignedNodes) {
2343
+ collectFocusableElements(node);
2344
+ }
2345
+ } else {
2346
+ // Process light DOM children in order
2347
+ if (root.children) {
2348
+ Array.from(root.children).forEach(child => {
2349
+ collectFocusableElements(child);
2350
+ });
2351
+ }
2352
+ }
2353
+ }
2354
+ };
2355
+
2356
+ // Start the traversal from the container
2357
+ collectFocusableElements(container);
2358
+
2359
+ // Remove duplicates that might have been collected through different paths
2360
+ // while preserving order
2361
+ const uniqueElements = [];
2362
+ const seen = new Set();
2363
+
2364
+ for (const element of orderedFocusableElements) {
2365
+ if (!seen.has(element)) {
2366
+ seen.add(element);
2367
+ uniqueElements.push(element);
2368
+ }
2369
+ }
2370
+
2371
+ return uniqueElements;
2372
+ }
2373
+
2374
+ /**
2375
+ * FocusTrap manages keyboard focus within a specified container element, ensuring that focus does not leave the container when tabbing.
2376
+ * It is commonly used for modal dialogs or overlays to improve accessibility by trapping focus within interactive UI components.
2377
+ */
2378
+ class FocusTrap {
2379
+ /**
2380
+ * Creates a new FocusTrap instance for the given container element.
2381
+ * Initializes event listeners and prepares the container for focus management.
2382
+ *
2383
+ * @param {HTMLElement} container The DOM element to trap focus within.
2384
+ * @throws {Error} If the provided container is not a valid HTMLElement.
2385
+ */
2386
+ constructor(container) {
2387
+ if (!container || !(container instanceof HTMLElement)) {
2388
+ throw new Error("FocusTrap requires a valid HTMLElement.");
2389
+ }
2390
+
2391
+ this.container = container;
2392
+ this.tabDirection = 'forward'; // or 'backward'
2393
+
2394
+ this._init();
2395
+ }
2396
+
2397
+ /**
2398
+ * Initializes the focus trap by setting up event listeners and attributes on the container.
2399
+ * Prepares the container for focus management, including support for shadow DOM and inert attributes.
2400
+ *
2401
+ * @private
2402
+ */
2403
+ _init() {
2404
+
2405
+ // Add inert attribute to prevent focusing programmatically as well (if supported)
2406
+ if ('inert' in HTMLElement.prototype) {
2407
+ this.container.inert = false; // Ensure the container isn't inert
2408
+ this.container.setAttribute('data-focus-trap-container', true); // Mark for identification
2409
+ }
2410
+
2411
+ // Track tab direction
2412
+ this.container.addEventListener('keydown', this._onKeydown);
2413
+ }
2414
+
2415
+ /**
2416
+ * Handles keydown events to manage tab navigation within the container.
2417
+ * Ensures that focus wraps around when reaching the first or last focusable element.
2418
+ *
2419
+ * @param {KeyboardEvent} e The keyboard event triggered by user interaction.
2420
+ * @private
2421
+ */
2422
+ _onKeydown = (e) => {
2423
+
2424
+ if (e.key === 'Tab') {
2425
+
2426
+ // Set the tab direction based on the key pressed
2427
+ this.tabDirection = e.shiftKey ? 'backward' : 'forward';
2428
+
2429
+ // Get the active element(s) in the document and shadow root
2430
+ // This will include the active element in the shadow DOM if it exists
2431
+ // Active element may be inside the shadow DOM depending on delegatesFocus, so we need to check both
2432
+ let activeElement = document.activeElement;
2433
+ const actives = [activeElement];
2434
+ while (activeElement?.shadowRoot?.activeElement) {
2435
+ actives.push(activeElement.shadowRoot.activeElement);
2436
+ activeElement = activeElement.shadowRoot.activeElement;
2437
+ }
2438
+
2439
+ // Update the focusable elements
2440
+ const focusables = this._getFocusableElements();
2441
+
2442
+ // If we're at either end of the focusable elements, wrap around to the other end
2443
+ const focusIndex =
2444
+ (actives.includes(focusables[0]) || actives.includes(this.container)) && this.tabDirection === 'backward'
2445
+ ? focusables.length - 1
2446
+ : actives.includes(focusables[focusables.length - 1]) && this.tabDirection === 'forward'
2447
+ ? 0
2448
+ : null;
2449
+
2450
+ if (focusIndex !== null) {
2451
+ focusables[focusIndex].focus();
2452
+ e.preventDefault(); // Prevent default tab behavior
2453
+ e.stopPropagation(); // Stop the event from bubbling up
2454
+ }
2455
+ }
2456
+ };
2457
+
2458
+ /**
2459
+ * Retrieves all focusable elements within the container in DOM order, including those in shadow DOM and slots.
2460
+ * Returns a unique, ordered array of elements that can receive focus.
2461
+ *
2462
+ * @returns {Array<HTMLElement>} An array of focusable elements within the container.
2463
+ * @private
2464
+ */
2465
+ _getFocusableElements() {
2466
+ // Use the imported utility function to get focusable elements
2467
+ const elements = getFocusableElements(this.container);
2468
+
2469
+ // Filter out any elements with the 'focus-bookend' class
2470
+ return elements;
2471
+ }
2472
+
2473
+ /**
2474
+ * Moves focus to the first focusable element within the container.
2475
+ * Useful for setting initial focus when activating the focus trap.
2476
+ */
2477
+ focusFirstElement() {
2478
+ const focusables = this._getFocusableElements();
2479
+ if (focusables.length) focusables[0].focus();
2480
+ }
2481
+
2482
+ /**
2483
+ * Moves focus to the last focusable element within the container.
2484
+ * Useful for setting focus when deactivating or cycling focus in reverse.
2485
+ */
2486
+ focusLastElement() {
2487
+ const focusables = this._getFocusableElements();
2488
+ if (focusables.length) focusables[focusables.length - 1].focus();
2489
+ }
2490
+
2491
+ /**
2492
+ * Removes event listeners and attributes added by the focus trap.
2493
+ * Call this method to clean up when the focus trap is no longer needed.
2494
+ */
2495
+ disconnect() {
2496
+
2497
+ if (this.container.hasAttribute('data-focus-trap-container')) {
2498
+ this.container.removeAttribute('data-focus-trap-container');
2499
+ }
2500
+
2501
+ this.container.removeEventListener('keydown', this._onKeydown);
2502
+ }
2503
+ }
2504
+
2222
2505
  // Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
2223
2506
  // See LICENSE in the project root for license information.
2224
2507
 
@@ -2413,6 +2696,76 @@ var tokensCss$2 = css`:host{--ds-auro-icon-color:var(--ds-basic-color-texticon-d
2413
2696
 
2414
2697
  var colorCss$3 = css`: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)}`;
2415
2698
 
2699
+ // Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
2700
+ // See LICENSE in the project root for license information.
2701
+
2702
+ // ---------------------------------------------------------------------
2703
+
2704
+ /* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
2705
+
2706
+ let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
2707
+
2708
+ /* eslint-disable jsdoc/require-param */
2709
+
2710
+ /**
2711
+ * This will register a new custom element with the browser.
2712
+ * @param {String} name - The name of the custom element.
2713
+ * @param {Object} componentClass - The class to register as a custom element.
2714
+ * @returns {void}
2715
+ */
2716
+ registerComponent(name, componentClass) {
2717
+ if (!customElements.get(name)) {
2718
+ customElements.define(name, class extends componentClass {});
2719
+ }
2720
+ }
2721
+
2722
+ /**
2723
+ * Finds and returns the closest HTML Element based on a selector.
2724
+ * @returns {void}
2725
+ */
2726
+ closestElement(
2727
+ selector, // selector like in .closest()
2728
+ base = this, // extra functionality to skip a parent
2729
+ __Closest = (el, found = el && el.closest(selector)) =>
2730
+ !el || el === document || el === window
2731
+ ? null // standard .closest() returns null for non-found selectors also
2732
+ : found
2733
+ ? found // found a selector INside this element
2734
+ : __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
2735
+ ) {
2736
+ return __Closest(base);
2737
+ }
2738
+ /* eslint-enable jsdoc/require-param */
2739
+
2740
+ /**
2741
+ * If the element passed is registered with a different tag name than what is passed in, the tag name is added as an attribute to the element.
2742
+ * @param {Object} elem - The element to check.
2743
+ * @param {String} tagName - The name of the Auro component to check for or add as an attribute.
2744
+ * @returns {void}
2745
+ */
2746
+ handleComponentTagRename(elem, tagName) {
2747
+ const tag = tagName.toLowerCase();
2748
+ const elemTag = elem.tagName.toLowerCase();
2749
+
2750
+ if (elemTag !== tag) {
2751
+ elem.setAttribute(tag, true);
2752
+ }
2753
+ }
2754
+
2755
+ /**
2756
+ * Validates if an element is a specific Auro component.
2757
+ * @param {Object} elem - The element to validate.
2758
+ * @param {String} tagName - The name of the Auro component to check against.
2759
+ * @returns {Boolean} - Returns true if the element is the specified Auro component.
2760
+ */
2761
+ elementMatch(elem, tagName) {
2762
+ const tag = tagName.toLowerCase();
2763
+ const elemTag = elem.tagName.toLowerCase();
2764
+
2765
+ return elemTag === tag || elem.hasAttribute(tag);
2766
+ }
2767
+ };
2768
+
2416
2769
  // Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
2417
2770
  // See LICENSE in the project root for license information.
2418
2771
 
@@ -2535,8 +2888,12 @@ class AuroIcon extends BaseIcon {
2535
2888
  async firstUpdated() {
2536
2889
  await super.firstUpdated();
2537
2890
 
2538
- // Removes the SVG description for screenreader if ariaHidden is set to true
2539
- if (!this.hasAttribute('ariaHidden') && this.svg) {
2891
+ /**
2892
+ * icons provide a description for screen readers. Icon only instances Auro-button
2893
+ * depend on this description to provide context for the user using a screen reader.
2894
+ * Removes the SVG description for screen reader if ariaHidden is set to true.
2895
+ */
2896
+ if (this.hasAttribute('ariaHidden') && this.svg) {
2540
2897
  const svgDesc = this.svg.querySelector('desc');
2541
2898
 
2542
2899
  if (svgDesc) {
@@ -2582,17 +2939,16 @@ class AuroIcon extends BaseIcon {
2582
2939
 
2583
2940
  var iconVersion = '6.1.2';
2584
2941
 
2585
- var styleCss$1 = css`:host{position:absolute;z-index:var(--depth-tooltip, 400);display:none}.container{display:inline-block;overflow:auto;box-sizing:border-box;margin:var(--ds-size-50, 0.25rem) 0}: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}`;
2942
+ var styleCss$1 = css`: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}`;
2586
2943
 
2587
2944
  var colorCss$2 = css`.container{background-color:var(--ds-auro-dropdownbib-container-color);box-shadow:var(--ds-auro-dropdownbib-boxshadow-color);color:var(--ds-auro-dropdownbib-text-color)}`;
2588
2945
 
2589
- var tokensCss$1 = css`: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: transparent;--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: transparent;--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)}`;
2946
+ var tokensCss$1 = css`: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)}`;
2590
2947
 
2591
2948
  // Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
2592
2949
  // See LICENSE in the project root for license information.
2593
2950
 
2594
2951
 
2595
-
2596
2952
  const DESIGN_TOKEN_BREAKPOINT_PREFIX = '--ds-grid-breakpoint-';
2597
2953
  const DESIGN_TOKEN_BREAKPOINT_OPTIONS = [
2598
2954
  'xl',
@@ -2608,7 +2964,7 @@ const DESIGN_TOKEN_BREAKPOINT_OPTIONS = [
2608
2964
  */
2609
2965
 
2610
2966
  class AuroDropdownBib extends LitElement {
2611
-
2967
+ // not extending AuroElement because Bib needs only `shape` prop
2612
2968
  constructor() {
2613
2969
  super();
2614
2970
 
@@ -2617,7 +2973,10 @@ class AuroDropdownBib extends LitElement {
2617
2973
  */
2618
2974
  this._mobileBreakpointValue = undefined;
2619
2975
 
2620
- AuroLibraryRuntimeUtils$1.prototype.handleComponentTagRename(this, 'auro-dropdownbib');
2976
+ AuroLibraryRuntimeUtils$2.prototype.handleComponentTagRename(this, 'auro-dropdownbib');
2977
+
2978
+ this.shape = "rounded";
2979
+ this.matchWidth = false;
2621
2980
  }
2622
2981
 
2623
2982
  static get styles() {
@@ -2655,6 +3014,15 @@ class AuroDropdownBib extends LitElement {
2655
3014
  reflect: true
2656
3015
  },
2657
3016
 
3017
+ /**
3018
+ * If declared, the bib width will match the trigger width.
3019
+ * @private
3020
+ */
3021
+ matchWidth: {
3022
+ type: Boolean,
3023
+ reflect: true
3024
+ },
3025
+
2658
3026
  /**
2659
3027
  * If declared, will apply border-radius to the bib.
2660
3028
  */
@@ -2662,6 +3030,18 @@ class AuroDropdownBib extends LitElement {
2662
3030
  type: Boolean,
2663
3031
  reflect: true
2664
3032
  },
3033
+
3034
+ /**
3035
+ * A reference to the associated bib template element.
3036
+ */
3037
+ bibTemplate: {
3038
+ type: Object
3039
+ },
3040
+
3041
+ shape: {
3042
+ type: String,
3043
+ reflect: true
3044
+ }
2665
3045
  };
2666
3046
  }
2667
3047
 
@@ -2694,13 +3074,62 @@ class AuroDropdownBib extends LitElement {
2694
3074
  }
2695
3075
  }
2696
3076
  });
3077
+
3078
+ if (this.bibTemplate) {
3079
+ // If the bib template is found, set the fullscreen attribute
3080
+ if (this.isFullscreen) {
3081
+ this.bibTemplate.setAttribute('isFullscreen', 'true');
3082
+ } else {
3083
+ this.bibTemplate.removeAttribute('isFullscreen');
3084
+ }
3085
+ }
2697
3086
  }
2698
3087
  }
2699
3088
 
3089
+ connectedCallback() {
3090
+ super.connectedCallback();
3091
+
3092
+ // Listen for the auro-bibtemplate-connected event to set the fullscreen attribute
3093
+ this.addEventListener('auro-bibtemplate-connected', (event) => {
3094
+ const bibTemplate = event.detail.element;
3095
+ this.bibTemplate = bibTemplate;
3096
+
3097
+ if (bibTemplate) {
3098
+ // If the bib template is found, set the fullscreen attribute
3099
+ if (this.isFullscreen) {
3100
+ bibTemplate.setAttribute('isFullscreen', 'true');
3101
+ } else {
3102
+ bibTemplate.removeAttribute('isFullscreen');
3103
+ }
3104
+ }
3105
+ });
3106
+ }
3107
+
3108
+ firstUpdated(changedProperties) {
3109
+ super.firstUpdated(changedProperties);
3110
+
3111
+ // Dispatch a custom event when the component is connected
3112
+ this.dispatchEvent(new CustomEvent('auro-dropdownbib-connected', {
3113
+ bubbles: true,
3114
+ composed: true,
3115
+ detail: {
3116
+ element: this
3117
+ }
3118
+ }));
3119
+ }
3120
+
2700
3121
  // function that renders the HTML and CSS into the scope of the component
2701
3122
  render() {
3123
+ const classes = {
3124
+ container: true
3125
+ };
3126
+
3127
+ // Since this class does not inherit from AuroElement, we apply the shape-related class within the `render` function,
3128
+ // mimicking the class naming convention used in AuroElement.resetShapeClasses.
3129
+ classes[`shape-${this.shape}`] = true;
3130
+
2702
3131
  return html$1`
2703
- <div class="container" part="bibContainer">
3132
+ <div class="${classMap(classes)}" part="bibContainer">
2704
3133
  <slot></slot>
2705
3134
  </div>
2706
3135
  `;
@@ -2709,21 +3138,21 @@ class AuroDropdownBib extends LitElement {
2709
3138
 
2710
3139
  var dropdownVersion = '3.0.0';
2711
3140
 
2712
- var shapeSizeCss = css`.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:0;min-height:60px;max-height:60px;background-color:unset}.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:0;min-height:60px;max-height:60px;background-color:unset}.shape-box-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent}.shape-box-xl.simple{border-width:0;min-height:72px;max-height:72px;background-color:unset}.shape-rounded-lg{min-height:52px;max-height:52px;border-style:solid;border-width:2px;border-color:transparent;border-radius:6px}.shape-rounded-lg.simple{border-width:0;min-height:72px;max-height:72px;background-color:unset}.shape-pill-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent;border-radius:34px}.shape-pill-xl.simple{border-width:0;min-height:72px;max-height:72px;background-color:unset}.shape-pill-left-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent;border-radius:34px 0 0 34px}.shape-pill-left-xl.simple{border-width:0;min-height:72px;max-height:72px;background-color:unset}.shape-pill-right-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent;border-radius:0 34px 34px 0}.shape-pill-right-xl.simple{border-width:0;min-height:72px;max-height:72px;background-color:unset}.shape-pill-md{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent;border-radius:34px}.shape-pill-md.simple{border-width:0;min-height:72px;max-height:72px;background-color:unset}.shape-pill-left-md{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent;border-radius:34px 0 0 34px}.shape-pill-left-md.simple{border-width:0;min-height:72px;max-height:72px;background-color:unset}.shape-pill-right-md{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent;border-radius:0 34px 34px 0}.shape-pill-right-md.simple{border-width:0;min-height:72px;max-height:72px;background-color:unset}`;
3141
+ var shapeSizeCss = css`.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}`;
2713
3142
 
2714
- var colorCss$1 = css`: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-advanced-color-state-error-inverse, #f9a4a8)}.helpText{color:var(--ds-auro-dropdown-helptext-text-color)}`;
3143
+ var colorCss$1 = css`: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)}`;
2715
3144
 
2716
- var classicColorCss = css`:host([layout*=classic]) .label{color:var(--ds-auro-dropdown-label-text-color)}:host([layout*=classic]) .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);outline-color:var(--ds-auro-dropdown-trigger-outline-color)}:host([layout*=classic]) .trigger:focus-within,:host([layout*=classic]) .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]{--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)}:host([layout*=classic])[common],:host([layout*=classic])[bordered]{--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-border-bold, #585e67)}:host([layout*=classic])[common] .trigger:active,:host([layout*=classic])[common] .trigger:focus-within,:host([layout*=classic])[bordered] .trigger:active,:host([layout*=classic])[bordered] .trigger:focus-within{--ds-auro-dropdown-trigger-border-color: var(--ds-advanced-color-state-focused, #01426a)}:host([layout*=classic])[error]{--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-status-error, #e31f26)}:host([layout*=classic])[error] .trigger{outline:solid 1px var(--ds-auro-dropdown-trigger-border-color)}:host([layout*=classic])[error] .trigger:focus-within,:host([layout*=classic])[error] .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][common],:host([layout*=classic])[disabled][bordered]{--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-border-subtle, #dddddd)}:host([layout*=classic])[onDark]{--ds-auro-dropdown-label-text-color: var(--ds-basic-color-texticon-inverse-muted, #ccd2db);--ds-auro-dropdown-trigger-container-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-dropdown-trigger-text-color: var(--ds-basic-color-texticon-inverse, #ffffff)}:host([layout*=classic])[onDark]:focus-within,:host([layout*=classic])[onDark]: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)}:host([layout*=classic])[onDark][common],:host([layout*=classic])[onDark][bordered]{--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-border-inverse, #ffffff)}:host([layout*=classic])[onDark][common] .trigger:focus-within,:host([layout*=classic])[onDark][common] .trigger:active,:host([layout*=classic])[onDark][bordered] .trigger:focus-within,:host([layout*=classic])[onDark][bordered] .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][error]{--ds-auro-dropdown-trigger-border-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8)}:host([layout*=classic])[onDark][error] .trigger{outline:solid 1px var(--ds-auro-dropdown-trigger-border-color)}: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)}:host([layout*=classic])[onDark][disabled][common],:host([layout*=classic])[onDark][disabled][bordered]{--ds-auro-dropdown-trigger-container-color: var(--ds-advanced-color-shared-background-inverse-disabled, rgba(255, 255, 255, 0.1))}`;
3145
+ var classicColorCss = css``;
2717
3146
 
2718
- var classicLayoutCss = css`: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}@media(hover: hover){:host([layout*=classic]) .trigger:hover{cursor:pointer}}:host([layout*=classic]) .triggerContentWrapper{overflow:hidden;flex:1;text-overflow:ellipsis;white-space:nowrap}:host([layout*=classic]) #showStateIcon{display:flex;overflow:hidden;height:100%;align-items:center;margin-left:var(--ds-size-100, 0.5rem)}: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][fluid]){display:block}:host([layout*=classic][matchwidth]) #bibSizer{width:100%}:host([layout*=classic][disabled]){pointer-events:none}:host([layout*=classic][inset]) .trigger{padding:var(--ds-size-150, 0.75rem) var(--ds-size-200, 1rem)}:host([layout*=classic][common]) .trigger,:host([layout*=classic][inset][bordered]) .trigger{padding:var(--ds-size-200, 1rem) var(--ds-size-150, 0.75rem)}:host([layout*=classic][inset][bordered][labeled]) .trigger{padding:var(--ds-size-100, 0.5rem) var(--ds-size-150, 0.75rem)}:host([layout*=classic][common]) .trigger,:host([layout*=classic][rounded]) .trigger{border-radius:var(--ds-border-radius, 0.375rem)}`;
3147
+ var classicLayoutCss = css`: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([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}`;
2719
3148
 
2720
- var styleEmphasizedCss = css`:host{display:block}.wrapper{display:flex;flex-direction:column}.trigger{flex:1;display:flex;align-items:center;justify-content:center;outline:none}.triggerContentWrapper{flex:1;display:flex;align-items:center;justify-content:center;width:100%}.triggerContent{overflow:hidden;flex:1;display:flex;align-items:center;justify-content:center;text-overflow:ellipsis;white-space:nowrap;width:100%}:host([layout*=emphasized][shape*=pill]:not([layout*=right])) .leftIndent{margin-left:24px;width:calc(100% - 24px)}:host([layout*=emphasized][shape*=pill]:not([layout*=left])) .rightIndent{margin-right:24px;width:calc(100% - 24px)}:host([layout*=emphasized][shape*=pill]:not([layout*=left]):not([layout*=right])) .rightIndent{margin-right:24px;width:calc(100% - 48px)}`;
3149
+ var styleEmphasizedCss = css`: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)}`;
2721
3150
 
2722
- var styleSnowflakeCss = css`:host{display:block}.wrapper{display:flex;flex-direction:column}.trigger{flex:1;display:flex;align-items:center;justify-content:center;outline:none}.triggerContentWrapper{flex:1;display:flex;align-items:center;justify-content:center;width:100%}.triggerContent{overflow:hidden;flex:1;display:flex;align-items:center;justify-content:center;text-overflow:ellipsis;white-space:nowrap;width:100%}:host([layout*=snowflake]) .leftIndent{margin-left:24px;width:calc(100% - 48px)}:host([layout*=snowflake]) .rightIndent{margin-right:24px;width:calc(100% - 48px)}`;
3151
+ var styleSnowflakeCss = css`: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)}`;
2723
3152
 
2724
- var colorCss = css`: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-advanced-color-state-error-inverse, #f9a4a8)}.helptext-wrapper{color:var(--ds-auro-helptext-color)}`;
3153
+ var colorCss = css`: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)}`;
2725
3154
 
2726
- var styleCss = css`.helptext-wrapper{display:none;font-size:var(--ds-basic-text-body-xs-font-size, 12px);font-weight:var(--ds-basic-text-body-xs-font-weight, 450);letter-spacing:var(--ds-basic-text-body-xs-letter-spacing, 0);line-height:var(--ds-basic-text-body-xs-line-height, 16px)}:host([large]) .helptext-wrapper{font-size:var(--ds-basic-text-body-default-font-size, 16px);font-weight:var(--ds-basic-text-body-default-font-weight, 450);letter-spacing:var(--ds-basic-text-body-default-letter-spacing, 0);line-height:var(--ds-basic-text-body-default-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}`;
3155
+ var styleCss = css`.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}`;
2727
3156
 
2728
3157
  var tokensCss = css`:host{--ds-auro-helptext-color: var(--ds-basic-color-texticon-muted, #676767)}`;
2729
3158
 
@@ -2964,18 +3393,21 @@ class AuroElement extends LitElement {
2964
3393
  }
2965
3394
 
2966
3395
  resetShapeClasses() {
2967
- if (this.shape && this.size) {
2968
- const wrapper = this.shadowRoot.querySelector('.wrapper');
3396
+ const wrapper = this.shadowRoot.querySelector('.wrapper');
2969
3397
 
2970
- if (wrapper) {
2971
- wrapper.classList.forEach((className) => {
2972
- if (className.startsWith('shape-')) {
2973
- wrapper.classList.remove(className);
2974
- }
2975
- });
3398
+ if (wrapper) {
3399
+ wrapper.classList.forEach((className) => {
3400
+ if (className.startsWith('shape-')) {
3401
+ wrapper.classList.remove(className);
3402
+ }
3403
+ });
2976
3404
 
2977
- wrapper.classList.add(`shape-${this.shape.toLowerCase()}-${this.size.toLowerCase()}`);
2978
- }
3405
+ }
3406
+
3407
+ if (this.shape && this.size) {
3408
+ wrapper.classList.add(`shape-${this.shape.toLowerCase()}-${this.size.toLowerCase()}`);
3409
+ } else {
3410
+ wrapper.classList.add('shape-none');
2979
3411
  }
2980
3412
  }
2981
3413
 
@@ -3047,20 +3479,16 @@ class AuroDropdown extends AuroElement {
3047
3479
  this.matchWidth = false;
3048
3480
  this.noHideOnThisFocusLoss = false;
3049
3481
 
3050
- this.errorMessage = ''; // TODO!
3482
+ this.errorMessage = ''; // TODO - check with Doug if there is still more to do here
3051
3483
 
3052
3484
  // Layout Config
3053
3485
  this.layout = 'classic';
3054
- this.shape = 'rounded';
3486
+ this.shape = 'classic';
3055
3487
  this.size = 'xl';
3056
3488
 
3057
- this.privateDefaults();
3058
- }
3489
+ this.parentBorder = false;
3059
3490
 
3060
- get commonLabelClasses() {
3061
- return {
3062
- // 'withValue': this.value && this.value.length > 0
3063
- };
3491
+ this.privateDefaults();
3064
3492
  }
3065
3493
 
3066
3494
  get commonWrapperClasses() {
@@ -3068,7 +3496,8 @@ class AuroDropdown extends AuroElement {
3068
3496
  'trigger': true,
3069
3497
  'wrapper': true,
3070
3498
  'hasFocus': this.hasFocus,
3071
- 'simple': this.simple
3499
+ 'simple': this.simple,
3500
+ 'parentBorder': this.parentBorder
3072
3501
  };
3073
3502
  }
3074
3503
 
@@ -3079,6 +3508,7 @@ class AuroDropdown extends AuroElement {
3079
3508
  privateDefaults() {
3080
3509
  this.chevron = false;
3081
3510
  this.disabled = false;
3511
+ this.disableFocusTrap = false;
3082
3512
  this.error = false;
3083
3513
  this.inset = false;
3084
3514
  this.rounded = false;
@@ -3120,7 +3550,7 @@ class AuroDropdown extends AuroElement {
3120
3550
  /**
3121
3551
  * @private
3122
3552
  */
3123
- this.runtimeUtils = new AuroLibraryRuntimeUtils$1();
3553
+ this.runtimeUtils = new AuroLibraryRuntimeUtils$2();
3124
3554
 
3125
3555
  /**
3126
3556
  * @private
@@ -3181,6 +3611,18 @@ class AuroDropdown extends AuroElement {
3181
3611
  this.floater.showBib();
3182
3612
  }
3183
3613
 
3614
+ /**
3615
+ * When bib is open, focus on the first element inside of bib.
3616
+ * If not, trigger element will get focus.
3617
+ */
3618
+ focus() {
3619
+ if (this.isPopoverVisible && this.focusTrap) {
3620
+ this.focusTrap.focusFirstElement();
3621
+ } else {
3622
+ this.trigger.focus();
3623
+ }
3624
+ }
3625
+
3184
3626
  // function to define props used within the scope of this component
3185
3627
  static get properties() {
3186
3628
  return {
@@ -3227,6 +3669,14 @@ class AuroDropdown extends AuroElement {
3227
3669
  reflect: true
3228
3670
  },
3229
3671
 
3672
+ /**
3673
+ * If declare, the focus trap inside of bib will be turned off.
3674
+ */
3675
+ disableFocusTrap: {
3676
+ type: Boolean,
3677
+ reflect: true
3678
+ },
3679
+
3230
3680
  /**
3231
3681
  * @private
3232
3682
  */
@@ -3335,6 +3785,15 @@ class AuroDropdown extends AuroElement {
3335
3785
  reflect: true
3336
3786
  },
3337
3787
 
3788
+ /**
3789
+ * Defines if the trigger should size based on the parent element providing the border UI.
3790
+ * @private
3791
+ */
3792
+ parentBorder: {
3793
+ type: Boolean,
3794
+ reflect: true
3795
+ },
3796
+
3338
3797
  /**
3339
3798
  * If declared, the popover and trigger will be set to the same width.
3340
3799
  */
@@ -3462,7 +3921,7 @@ class AuroDropdown extends AuroElement {
3462
3921
  *
3463
3922
  */
3464
3923
  static register(name = "auro-dropdown") {
3465
- AuroLibraryRuntimeUtils$1.prototype.registerComponent(name, AuroDropdown);
3924
+ AuroLibraryRuntimeUtils$2.prototype.registerComponent(name, AuroDropdown);
3466
3925
  }
3467
3926
 
3468
3927
  /**
@@ -3500,6 +3959,12 @@ class AuroDropdown extends AuroElement {
3500
3959
  this.handleTriggerContentSlotChange();
3501
3960
  }
3502
3961
 
3962
+ if (changedProperties.has('isPopoverVisible')) {
3963
+ this.updateFocusTrap();
3964
+ if (!this.isPopoverVisible && this.hasFocus) {
3965
+ this.trigger.focus();
3966
+ }
3967
+ }
3503
3968
  }
3504
3969
 
3505
3970
  firstUpdated() {
@@ -3565,6 +4030,27 @@ class AuroDropdown extends AuroElement {
3565
4030
  this.hasFocus = true;
3566
4031
  }
3567
4032
 
4033
+ /**
4034
+ * @private
4035
+ */
4036
+ updateFocusTrap() {
4037
+ // If the dropdown is open, create a focus trap and focus the first element
4038
+ if (this.isPopoverVisible && !this.disableFocusTrap) {
4039
+ this.focusTrap = new FocusTrap(this.bibContent);
4040
+ this.focusTrap.focusFirstElement();
4041
+ return;
4042
+ }
4043
+
4044
+ // Guard Clause: Ensure there is a focus trap currently active before continuing
4045
+ if (!this.focusTrap) {
4046
+ return;
4047
+ }
4048
+
4049
+ // If the dropdown is not open, disconnect the focus trap if it exists
4050
+ this.focusTrap.disconnect();
4051
+ this.focusTrap = undefined;
4052
+ }
4053
+
3568
4054
  /**
3569
4055
  * Function to support @focusout event.
3570
4056
  * @private
@@ -3725,14 +4211,13 @@ class AuroDropdown extends AuroElement {
3725
4211
  * @returns {void}
3726
4212
  */
3727
4213
  handleTriggerContentSlotChange(event) {
3728
-
3729
4214
  this.floater.handleTriggerTabIndex();
3730
4215
 
3731
4216
  // Get the trigger
3732
4217
  const trigger = this.shadowRoot.querySelector('#trigger');
3733
4218
 
3734
4219
  // Get the trigger slot
3735
- const triggerSlot = this.shadowRoot.querySelector('.triggerContent slot');
4220
+ const triggerSlot = this.shadowRoot.querySelector('.triggerContentWrapper slot');
3736
4221
 
3737
4222
  // If there's a trigger slot
3738
4223
  if (triggerSlot) {
@@ -3795,40 +4280,15 @@ class AuroDropdown extends AuroElement {
3795
4280
  *
3796
4281
  * @private
3797
4282
  * @method handleDefaultSlot
3798
- * @param {Event} event - The event object representing the slot change.
3799
4283
  * @fires Function#onSlotChange - Optional callback invoked when the slot content changes.
3800
4284
  */
3801
- handleDefaultSlot(event) {
3802
- [...event.target.assignedNodes()].forEach((node) => this.bibContent.append(node));
4285
+ handleDefaultSlot() {
3803
4286
 
3804
4287
  if (this.onSlotChange) {
3805
4288
  this.onSlotChange();
3806
4289
  }
3807
4290
  }
3808
4291
 
3809
- /**
3810
- * @private
3811
- * @method handleLabelSlotChange
3812
- * @param {event} event - The event object representing the slot change.
3813
- * @description Handles the slot change event for the label slot.
3814
- */
3815
- handleLabelSlotChange (event) {
3816
-
3817
- // Get the nodes from the event
3818
- const nodes = event.target.assignedNodes();
3819
-
3820
- // Guard clause for no nodes
3821
- if (!nodes) {
3822
- return;
3823
- }
3824
-
3825
- // Convert the nodes to a measurable array so we can get the length
3826
- const nodesArr = Array.from(nodes);
3827
-
3828
- // If the nodes array has a length, the dropdown is labeled
3829
- this.labeled = nodesArr.length > 0;
3830
- }
3831
-
3832
4292
  /**
3833
4293
  * Returns HTML for the common portion of the layouts.
3834
4294
  * @private
@@ -3843,24 +4303,20 @@ class AuroDropdown extends AuroElement {
3843
4303
  class="${classMap(this.commonWrapperClasses)}" part="wrapper"
3844
4304
  tabindex="${this.tabIndex}"
3845
4305
  role="${ifDefined(this.triggerContentFocusable ? undefined : this.a11yRole)}"
3846
- aria-expanded="${ifDefined(this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
3847
- aria-controls="${ifDefined(this.triggerContentFocusable ? undefined : this.dropdownId)}"
4306
+ aria-expanded="${ifDefined(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
4307
+ aria-controls="${ifDefined(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.dropdownId)}"
3848
4308
  aria-labelledby="${ifDefined(this.triggerContentFocusable ? undefined : 'triggerLabel')}"
3849
4309
  @focusin="${this.handleFocusin}"
3850
4310
  @blur="${this.handleFocusOut}">
3851
- <div class="triggerContentWrapper">
3852
- <label class="label" id="triggerLabel" hasTrigger=${this.hasTriggerContent}>
3853
- <slot name="label" @slotchange="${this.handleLabelSlotChange}"></slot>
3854
- </label>
3855
- <div class="triggerContent">
3856
- <slot
3857
- name="trigger"
3858
- @slotchange="${this.handleTriggerContentSlotChange}"></slot>
3859
- </div>
4311
+ <div class="triggerContentWrapper" id="triggerLabel">
4312
+ <slot
4313
+ name="trigger"
4314
+ @slotchange="${this.handleTriggerContentSlotChange}"></slot>
3860
4315
  </div>
3861
- ${this.chevron || this.common ? html$1`
4316
+ ${this.chevron ? html$1`
3862
4317
  <div
3863
4318
  id="showStateIcon"
4319
+ class="chevron"
3864
4320
  part="chevron">
3865
4321
  <${this.iconTag}
3866
4322
  category="interface"
@@ -3875,17 +4331,18 @@ class AuroDropdown extends AuroElement {
3875
4331
  <div class="${classMap(helpTextClasses)}">
3876
4332
  <slot name="helpText"></slot>
3877
4333
  </div>
3878
- <div class="slotContent">
3879
- <slot @slotchange="${this.handleDefaultSlot}"></slot>
3880
- </div>
3881
4334
  <div id="bibSizer" part="size"></div>
3882
4335
  <${this.dropdownBibTag}
3883
4336
  id="bib"
4337
+ shape="${this.shape}"
3884
4338
  ?data-show="${this.isPopoverVisible}"
3885
4339
  ?isfullscreen="${this.isBibFullscreen}"
3886
4340
  ?common="${this.common}"
3887
4341
  ?rounded="${this.common || this.rounded}"
3888
4342
  ?inset="${this.common || this.inset}">
4343
+ <div class="slotContent">
4344
+ <slot @slotchange="${this.handleDefaultSlot}"></slot>
4345
+ </div>
3889
4346
  </${this.dropdownBibTag}>
3890
4347
  </div>
3891
4348
  `;
@@ -3897,67 +4354,14 @@ class AuroDropdown extends AuroElement {
3897
4354
  * @returns {html} - Returns HTML for the classic layout.
3898
4355
  */
3899
4356
  renderLayoutClassic() {
4357
+ // TODO: check with Doug why this was never used?
3900
4358
  const helpTextClasses = {
3901
- 'helpText': true,
3902
- 'leftIndent': false,
3903
- 'rightIndent': false
4359
+ 'helpText': true
3904
4360
  };
3905
4361
 
3906
4362
  return html$1`
3907
4363
  ${this.renderBasicHtml(helpTextClasses)}
3908
4364
  `;
3909
- // return html`
3910
- // <div>
3911
- // <div
3912
- // id="trigger"
3913
- // class="trigger"
3914
- // part="trigger"
3915
- // tabindex="${this.tabIndex}"
3916
- // ?showBorder="${this.showTriggerBorders}"
3917
- // role="${ifDefined(this.triggerContentFocusable ? undefined : this.a11yRole)}"
3918
- // aria-expanded="${ifDefined(this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
3919
- // aria-controls="${ifDefined(this.triggerContentFocusable ? undefined : this.dropdownId)}"
3920
- // aria-labelledby="${ifDefined(this.triggerContentFocusable ? undefined : 'triggerLabel')}"
3921
- // >
3922
- // <div class="triggerContentWrapper">
3923
- // <label class="label" id="triggerLabel" hasTrigger=${this.hasTriggerContent}>
3924
- // <slot name="label" @slotchange="${this.handleLabelSlotChange}"></slot>
3925
- // </label>
3926
- // <div class="triggerContent">
3927
- // <slot
3928
- // name="trigger"
3929
- // @slotchange="${this.handleTriggerContentSlotChange}"></slot>
3930
- // </div>
3931
- // </div>
3932
- // ${this.chevron || this.common ? html`
3933
- // <div
3934
- // id="showStateIcon"
3935
- // part="chevron">
3936
- // <${this.iconTag}
3937
- // category="interface"
3938
- // name="chevron-down"
3939
- // ?onDark="${this.onDark}"
3940
- // variant="${this.disabled ? 'disabled' : 'muted'}">
3941
- // >
3942
- // </${this.iconTag}>
3943
- // </div>
3944
- // ` : undefined }
3945
- // </div>
3946
- // <div class="slotContent">
3947
- // <slot @slotchange="${this.handleDefaultSlot}"></slot>
3948
- // </div>
3949
- // <div id="bibSizer" part="size"></div>
3950
- // <${this.dropdownBibTag}
3951
- // id="bib"
3952
- // ?data-show="${this.isPopoverVisible}"
3953
- // ?isfullscreen="${this.isBibFullscreen}"
3954
- // ?common="${this.common}"
3955
- // ?rounded="${this.common || this.rounded}"
3956
- // ?inset="${this.common || this.inset}"
3957
- // >
3958
- // </${this.dropdownBibTag}>
3959
- // </div>
3960
- // `;
3961
4365
  }
3962
4366
 
3963
4367
  /**