@aurodesignsystem-dev/auro-formkit 0.0.0-pr624.11 → 0.0.0-pr624.111

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 (148) hide show
  1. package/components/bibtemplate/dist/auro-bibtemplate.d.ts +12 -2
  2. package/components/bibtemplate/dist/buttonVersion.d.ts +2 -0
  3. package/components/bibtemplate/dist/headerVersion.d.ts +1 -1
  4. package/components/bibtemplate/dist/iconVersion.d.ts +1 -1
  5. package/components/bibtemplate/dist/index.js +1244 -95
  6. package/components/bibtemplate/dist/registered.js +1244 -95
  7. package/components/checkbox/README.md +1 -1
  8. package/components/checkbox/demo/api.html +16 -10
  9. package/components/checkbox/demo/api.md +54 -19
  10. package/components/checkbox/demo/api.min.js +70 -45
  11. package/components/checkbox/demo/index.html +16 -10
  12. package/components/checkbox/demo/index.md +2 -2
  13. package/components/checkbox/demo/index.min.js +70 -45
  14. package/components/checkbox/demo/readme.html +16 -9
  15. package/components/checkbox/demo/readme.md +1 -1
  16. package/components/checkbox/dist/auro-checkbox-group.d.ts +1 -1
  17. package/components/checkbox/dist/auro-checkbox.d.ts +6 -3
  18. package/components/checkbox/dist/index.js +69 -44
  19. package/components/checkbox/dist/registered.js +69 -44
  20. package/components/combobox/README.md +2 -0
  21. package/components/combobox/demo/api.html +16 -10
  22. package/components/combobox/demo/api.md +121 -8
  23. package/components/combobox/demo/api.min.js +3283 -963
  24. package/components/combobox/demo/index.html +16 -10
  25. package/components/combobox/demo/index.md +20 -34
  26. package/components/combobox/demo/index.min.js +3283 -963
  27. package/components/combobox/demo/readme.html +16 -9
  28. package/components/combobox/demo/readme.md +2 -0
  29. package/components/combobox/dist/auro-combobox.d.ts +59 -14
  30. package/components/combobox/dist/index.js +3024 -848
  31. package/components/combobox/dist/registered.js +3024 -848
  32. package/components/counter/demo/api.html +17 -10
  33. package/components/counter/demo/api.md +167 -21
  34. package/components/counter/demo/api.min.js +3428 -777
  35. package/components/counter/demo/index.html +17 -10
  36. package/components/counter/demo/index.md +191 -34
  37. package/components/counter/demo/index.min.js +3428 -777
  38. package/components/counter/demo/readme.html +16 -9
  39. package/components/counter/dist/auro-counter-button.d.ts +2 -0
  40. package/components/counter/dist/auro-counter-group.d.ts +162 -11
  41. package/components/counter/dist/auro-counter.d.ts +16 -0
  42. package/components/counter/dist/helptextVersion.d.ts +2 -0
  43. package/components/counter/dist/iconVersion.d.ts +1 -1
  44. package/components/counter/dist/index.js +3427 -776
  45. package/components/counter/dist/registered.js +3427 -776
  46. package/components/datepicker/README.md +2 -1
  47. package/components/datepicker/demo/api.html +16 -10
  48. package/components/datepicker/demo/api.md +70 -28
  49. package/components/datepicker/demo/api.min.js +7082 -3165
  50. package/components/datepicker/demo/index.html +16 -10
  51. package/components/datepicker/demo/index.md +87 -8
  52. package/components/datepicker/demo/index.min.js +7082 -3165
  53. package/components/datepicker/demo/readme.html +16 -9
  54. package/components/datepicker/demo/readme.md +2 -1
  55. package/components/datepicker/dist/auro-datepicker.d.ts +152 -12
  56. package/components/datepicker/dist/buttonVersion.d.ts +1 -1
  57. package/components/datepicker/dist/iconVersion.d.ts +2 -0
  58. package/components/datepicker/dist/index.js +14635 -10718
  59. package/components/datepicker/dist/popoverVersion.d.ts +1 -1
  60. package/components/datepicker/dist/registered.js +14635 -10718
  61. package/components/dropdown/demo/api.html +16 -10
  62. package/components/dropdown/demo/api.md +89 -281
  63. package/components/dropdown/demo/api.min.js +452 -271
  64. package/components/dropdown/demo/index.html +16 -10
  65. package/components/dropdown/demo/index.md +92 -362
  66. package/components/dropdown/demo/index.min.js +452 -271
  67. package/components/dropdown/demo/readme.html +16 -9
  68. package/components/dropdown/dist/auro-dropdown.d.ts +43 -82
  69. package/components/dropdown/dist/auro-dropdownBib.d.ts +14 -0
  70. package/components/dropdown/dist/index.js +451 -270
  71. package/components/dropdown/dist/registered.js +451 -270
  72. package/components/form/demo/api.html +16 -9
  73. package/components/form/demo/api.md +1 -1
  74. package/components/form/demo/api.min.js +3 -3
  75. package/components/form/demo/autocomplete.html +19 -3
  76. package/components/form/demo/index.html +16 -9
  77. package/components/form/demo/index.min.js +3 -3
  78. package/components/form/demo/readme.html +16 -9
  79. package/components/form/demo/working.html +19 -13
  80. package/components/form/dist/auro-form.d.ts +1 -1
  81. package/components/form/dist/index.js +2 -2
  82. package/components/form/dist/registered.js +2 -2
  83. package/components/helptext/dist/auro-helptext.d.ts +0 -2
  84. package/components/helptext/dist/index.js +2 -4
  85. package/components/helptext/dist/registered.js +2 -4
  86. package/components/input/README.md +6 -2
  87. package/components/input/demo/api.html +16 -10
  88. package/components/input/demo/api.md +234 -136
  89. package/components/input/demo/api.min.js +1057 -299
  90. package/components/input/demo/index.html +16 -10
  91. package/components/input/demo/index.md +55 -32
  92. package/components/input/demo/index.min.js +1071 -313
  93. package/components/input/demo/readme.html +16 -9
  94. package/components/input/demo/readme.md +6 -2
  95. package/components/input/dist/auro-input.d.ts +36 -2
  96. package/components/input/dist/base-input.d.ts +47 -11
  97. package/components/input/dist/buttonVersion.d.ts +1 -1
  98. package/components/input/dist/iconVersion.d.ts +1 -1
  99. package/components/input/dist/index.js +1070 -312
  100. package/components/input/dist/registered.js +1070 -312
  101. package/components/layoutElement/dist/index.js +11 -8
  102. package/components/layoutElement/dist/registered.js +97 -0
  103. package/components/menu/demo/api.html +17 -10
  104. package/components/menu/demo/api.md +65 -8
  105. package/components/menu/demo/api.min.js +303 -64
  106. package/components/menu/demo/index.html +16 -10
  107. package/components/menu/demo/index.min.js +303 -64
  108. package/components/menu/demo/readme.html +16 -9
  109. package/components/menu/dist/auro-menu.d.ts +53 -7
  110. package/components/menu/dist/auro-menuoption.d.ts +21 -3
  111. package/components/menu/dist/iconVersion.d.ts +1 -1
  112. package/components/menu/dist/index.js +288 -49
  113. package/components/menu/dist/registered.js +288 -49
  114. package/components/menu/dist/styles/default/tokens-css.d.ts +2 -0
  115. package/components/radio/demo/api.html +16 -10
  116. package/components/radio/demo/api.md +41 -9
  117. package/components/radio/demo/api.min.js +93 -95
  118. package/components/radio/demo/index.html +16 -10
  119. package/components/radio/demo/index.min.js +93 -95
  120. package/components/radio/demo/readme.html +16 -9
  121. package/components/radio/dist/auro-radio-group.d.ts +1 -1
  122. package/components/radio/dist/auro-radio.d.ts +11 -12
  123. package/components/radio/dist/index.js +92 -94
  124. package/components/radio/dist/registered.js +92 -94
  125. package/components/select/README.md +1 -0
  126. package/components/select/demo/api.html +16 -10
  127. package/components/select/demo/api.js +0 -2
  128. package/components/select/demo/api.md +159 -125
  129. package/components/select/demo/api.min.js +2284 -729
  130. package/components/select/demo/index.html +17 -11
  131. package/components/select/demo/index.md +1074 -259
  132. package/components/select/demo/index.min.js +2286 -719
  133. package/components/select/demo/readme.html +16 -9
  134. package/components/select/demo/readme.md +1 -0
  135. package/components/select/dist/auro-select.d.ts +86 -25
  136. package/components/select/dist/index.js +2178 -755
  137. package/components/select/dist/registered.js +2178 -755
  138. package/package.json +31 -28
  139. /package/components/{datepicker/dist/styles/default/color-css.d.ts → counter/dist/styles/shapeSize-css.d.ts} +0 -0
  140. /package/components/datepicker/dist/styles/{emphasized/style-css.d.ts → classic/color-css.d.ts} +0 -0
  141. /package/components/{input/dist/styles/default/input-css.d.ts → datepicker/dist/styles/classic/style-css.d.ts} +0 -0
  142. /package/components/{input/dist/styles/default/label-css.d.ts → datepicker/dist/styles/snowflake/color-css.d.ts} +0 -0
  143. /package/components/{input/dist/styles/input-css.d.ts → datepicker/dist/styles/snowflake/style-css.d.ts} +0 -0
  144. /package/components/{menu/dist/styles/color-menu-css.d.ts → dropdown/dist/styles/style-css.d.ts} +0 -0
  145. /package/components/menu/dist/styles/{color-menuoption-css.d.ts → default/color-menu-css.d.ts} +0 -0
  146. /package/components/menu/dist/styles/{style-menu-css.d.ts → default/color-menuoption-css.d.ts} +0 -0
  147. /package/components/menu/dist/styles/{style-menuoption-css.d.ts → default/style-menu-css.d.ts} +0 -0
  148. /package/components/menu/dist/styles/{tokens-css.d.ts → default/style-menuoption-css.d.ts} +0 -0
@@ -1689,7 +1689,7 @@ class AuroFloatingUI {
1689
1689
  */
1690
1690
  mirrorSize() {
1691
1691
  // mirror the boxsize from bibSizer
1692
- if (this.element.bibSizer) {
1692
+ if (this.element.bibSizer && this.element.matchWidth) {
1693
1693
  const sizerStyle = window.getComputedStyle(this.element.bibSizer);
1694
1694
  const bibContent = this.element.bib.shadowRoot.querySelector(".container");
1695
1695
  if (sizerStyle.width !== '0px') {
@@ -1825,6 +1825,7 @@ class AuroFloatingUI {
1825
1825
  this.element.bib.style.left = "0px";
1826
1826
  this.element.bib.style.width = '';
1827
1827
  this.element.bib.style.height = '';
1828
+ this.element.style.contain = '';
1828
1829
 
1829
1830
  // reset the size that was mirroring `size` css-part
1830
1831
  const bibContent = this.element.bib.shadowRoot.querySelector(".container");
@@ -1849,6 +1850,7 @@ class AuroFloatingUI {
1849
1850
  this.element.bib.style.position = '';
1850
1851
  this.element.bib.removeAttribute('isfullscreen');
1851
1852
  this.element.isBibFullscreen = false;
1853
+ this.element.style.contain = 'layout';
1852
1854
  }
1853
1855
 
1854
1856
  const isChanged = this.strategy && this.strategy !== value;
@@ -1901,22 +1903,16 @@ class AuroFloatingUI {
1901
1903
  if (this.element.contains(activeElement) || this.element.bib?.contains(activeElement)) {
1902
1904
  return;
1903
1905
  }
1904
-
1906
+
1905
1907
  // if fullscreen bib is in fullscreen mode, do not close
1906
1908
  if (this.element.bib.hasAttribute('isfullscreen')) {
1907
1909
  return;
1908
1910
  }
1909
1911
 
1910
- this.hideBib();
1912
+ this.hideBib("keydown");
1911
1913
  }
1912
1914
 
1913
1915
  setupHideHandlers() {
1914
- this.preventFocusLoseOnBibClick = (event) => {
1915
- event.preventDefault();
1916
- event.stopPropagation();
1917
- };
1918
- this.element.bib.addEventListener('mousedown', this.preventFocusLoseOnBibClick);
1919
-
1920
1916
  // Define handlers & store references
1921
1917
  this.focusHandler = () => this.handleFocusLoss();
1922
1918
 
@@ -1932,7 +1928,7 @@ class AuroFloatingUI {
1932
1928
  document.expandedAuroFormkitDropdown = null;
1933
1929
  document.expandedAuroFloater = this;
1934
1930
  } else {
1935
- this.hideBib();
1931
+ this.hideBib("click");
1936
1932
  }
1937
1933
  }
1938
1934
  };
@@ -1945,7 +1941,7 @@ class AuroFloatingUI {
1945
1941
  // if something else is open, let it handle itself
1946
1942
  return;
1947
1943
  }
1948
- this.hideBib();
1944
+ this.hideBib("keydown");
1949
1945
  }
1950
1946
  };
1951
1947
 
@@ -1966,11 +1962,6 @@ class AuroFloatingUI {
1966
1962
  cleanupHideHandlers() {
1967
1963
  // Remove event listeners if they exist
1968
1964
 
1969
- if (this.preventFocusLoseOnBibClick) {
1970
- this.element.bib.removeEventListener('mousedown', this.preventFocusLoseOnBibClick);
1971
- delete this.preventFocusLoseOnBibClick;
1972
- }
1973
-
1974
1965
  if (this.focusHandler) {
1975
1966
  document.removeEventListener('focusin', this.focusHandler);
1976
1967
  this.focusHandler = null;
@@ -2028,7 +2019,11 @@ class AuroFloatingUI {
2028
2019
  }
2029
2020
  }
2030
2021
 
2031
- hideBib() {
2022
+ /**
2023
+ * Hides the floating UI element.
2024
+ * @param {String} eventType - The event type that triggered the hiding action.
2025
+ */
2026
+ hideBib(eventType = "unknown") {
2032
2027
  if (!this.element.disabled && !this.element.noToggle) {
2033
2028
  this.lockScroll(false);
2034
2029
  this.element.triggerChevron?.removeAttribute('data-expanded');
@@ -2039,7 +2034,7 @@ class AuroFloatingUI {
2039
2034
  if (this.showing) {
2040
2035
  this.cleanupHideHandlers();
2041
2036
  this.showing = false;
2042
- this.dispatchEventDropdownToggle();
2037
+ this.dispatchEventDropdownToggle(eventType);
2043
2038
  }
2044
2039
  }
2045
2040
  document.expandedAuroFloater = null;
@@ -2048,11 +2043,13 @@ class AuroFloatingUI {
2048
2043
  /**
2049
2044
  * @private
2050
2045
  * @returns {void} Dispatches event with an object showing the state of the dropdown.
2046
+ * @param {String} eventType - The event type that triggered the toggle action.
2051
2047
  */
2052
- dispatchEventDropdownToggle() {
2048
+ dispatchEventDropdownToggle(eventType) {
2053
2049
  const event = new CustomEvent(this.eventPrefix ? `${this.eventPrefix}-toggled` : 'toggled', {
2054
2050
  detail: {
2055
2051
  expanded: this.showing,
2052
+ eventType: eventType || "unknown",
2056
2053
  },
2057
2054
  composed: true
2058
2055
  });
@@ -2062,7 +2059,7 @@ class AuroFloatingUI {
2062
2059
 
2063
2060
  handleClick() {
2064
2061
  if (this.element.isPopoverVisible) {
2065
- this.hideBib();
2062
+ this.hideBib("click");
2066
2063
  } else {
2067
2064
  this.showBib();
2068
2065
  }
@@ -2085,8 +2082,9 @@ class AuroFloatingUI {
2085
2082
  // Space is included as it's expected behavior for interactive elements
2086
2083
 
2087
2084
  const origin = event.composedPath()[0];
2088
- if (event.key === 'Enter' || ((!origin || origin.tagName !== "INPUT") && event.key === ' ')) {
2089
- event.preventDefault(); // Prevent page scroll on space
2085
+ if (event.key === 'Enter' || event.key === ' ' && (!origin || origin.tagName !== "INPUT")) {
2086
+
2087
+ event.preventDefault();
2090
2088
  this.handleClick();
2091
2089
  }
2092
2090
  break;
@@ -2097,7 +2095,7 @@ class AuroFloatingUI {
2097
2095
  break;
2098
2096
  case 'mouseleave':
2099
2097
  if (this.element.hoverToggle) {
2100
- this.hideBib();
2098
+ this.hideBib("mouseleave");
2101
2099
  }
2102
2100
  break;
2103
2101
  case 'focus':
@@ -2240,6 +2238,267 @@ class AuroFloatingUI {
2240
2238
  }
2241
2239
  }
2242
2240
 
2241
+ // Selectors for focusable elements
2242
+ const FOCUSABLE_SELECTORS = [
2243
+ 'a[href]',
2244
+ 'button:not([disabled])',
2245
+ 'textarea:not([disabled])',
2246
+ 'input:not([disabled])',
2247
+ 'select:not([disabled])',
2248
+ '[role="tab"]:not([disabled])',
2249
+ '[role="link"]:not([disabled])',
2250
+ '[role="button"]:not([disabled])',
2251
+ '[tabindex]:not([tabindex="-1"])',
2252
+ '[contenteditable]:not([contenteditable="false"])'
2253
+ ];
2254
+
2255
+ // List of custom components that are known to be focusable
2256
+ const FOCUSABLE_COMPONENTS = [
2257
+ 'auro-checkbox',
2258
+ 'auro-radio',
2259
+ 'auro-dropdown',
2260
+ 'auro-button',
2261
+ 'auro-combobox',
2262
+ 'auro-input',
2263
+ 'auro-counter',
2264
+ 'auro-menu',
2265
+ 'auro-select',
2266
+ 'auro-datepicker',
2267
+ 'auro-hyperlink',
2268
+ 'auro-accordion',
2269
+ ];
2270
+
2271
+ /**
2272
+ * Determines if a given element is a custom focusable component.
2273
+ * Returns true if the element matches a known focusable component and is not disabled.
2274
+ *
2275
+ * @param {HTMLElement} element The element to check for focusability.
2276
+ * @returns {boolean} True if the element is a focusable custom component, false otherwise.
2277
+ */
2278
+ function isFocusableComponent(element) {
2279
+ const componentName = element.tagName.toLowerCase();
2280
+
2281
+ // Guard Clause: Element is a focusable component
2282
+ if (!FOCUSABLE_COMPONENTS.some((name) => element.hasAttribute(name) || componentName === name)) return false;
2283
+
2284
+ // Guard Clause: Element is not disabled
2285
+ if (element.hasAttribute('disabled')) return false;
2286
+
2287
+ // Guard Clause: The element is a hyperlink and has no href attribute
2288
+ if (componentName.match("hyperlink") && !element.hasAttribute('href')) return false;
2289
+
2290
+ // If all guard clauses pass, the element is a focusable component
2291
+ return true;
2292
+ }
2293
+
2294
+ /**
2295
+ * Retrieves all focusable elements within the container in DOM order, including those in shadow DOM and slots.
2296
+ * Returns a unique, ordered array of elements that can receive focus.
2297
+ *
2298
+ * @param {HTMLElement} container The container to search within
2299
+ * @returns {Array<HTMLElement>} An array of focusable elements within the container.
2300
+ */
2301
+ function getFocusableElements(container) {
2302
+ // Get elements in DOM order by walking the tree
2303
+ const orderedFocusableElements = [];
2304
+
2305
+ // Define a recursive function to collect focusable elements in DOM order
2306
+ const collectFocusableElements = (root) => {
2307
+ // Check if current element is focusable
2308
+ if (root.nodeType === Node.ELEMENT_NODE) {
2309
+ // Check if this is a custom component that is focusable
2310
+ const isComponentFocusable = isFocusableComponent(root);
2311
+
2312
+ if (isComponentFocusable) {
2313
+ // Add the component itself as a focusable element and don't traverse its shadow DOM
2314
+ orderedFocusableElements.push(root);
2315
+ return; // Skip traversing inside this component
2316
+ }
2317
+
2318
+ // Check if the element itself matches any selector
2319
+ for (const selector of FOCUSABLE_SELECTORS) {
2320
+ if (root.matches?.(selector)) {
2321
+ orderedFocusableElements.push(root);
2322
+ break; // Once we know it's focusable, no need to check other selectors
2323
+ }
2324
+ }
2325
+
2326
+ // Process shadow DOM only for non-Auro components
2327
+ if (root.shadowRoot) {
2328
+ // Process shadow DOM children in order
2329
+ if (root.shadowRoot.children) {
2330
+ Array.from(root.shadowRoot.children).forEach(child => {
2331
+ collectFocusableElements(child);
2332
+ });
2333
+ }
2334
+ }
2335
+
2336
+ // Process slots and their assigned nodes in order
2337
+ if (root.tagName === 'SLOT') {
2338
+ const assignedNodes = root.assignedNodes({ flatten: true });
2339
+ for (const node of assignedNodes) {
2340
+ collectFocusableElements(node);
2341
+ }
2342
+ } else {
2343
+ // Process light DOM children in order
2344
+ if (root.children) {
2345
+ Array.from(root.children).forEach(child => {
2346
+ collectFocusableElements(child);
2347
+ });
2348
+ }
2349
+ }
2350
+ }
2351
+ };
2352
+
2353
+ // Start the traversal from the container
2354
+ collectFocusableElements(container);
2355
+
2356
+ // Remove duplicates that might have been collected through different paths
2357
+ // while preserving order
2358
+ const uniqueElements = [];
2359
+ const seen = new Set();
2360
+
2361
+ for (const element of orderedFocusableElements) {
2362
+ if (!seen.has(element)) {
2363
+ seen.add(element);
2364
+ uniqueElements.push(element);
2365
+ }
2366
+ }
2367
+
2368
+ return uniqueElements;
2369
+ }
2370
+
2371
+ /**
2372
+ * FocusTrap manages keyboard focus within a specified container element, ensuring that focus does not leave the container when tabbing.
2373
+ * It is commonly used for modal dialogs or overlays to improve accessibility by trapping focus within interactive UI components.
2374
+ */
2375
+ class FocusTrap {
2376
+ /**
2377
+ * Creates a new FocusTrap instance for the given container element.
2378
+ * Initializes event listeners and prepares the container for focus management.
2379
+ *
2380
+ * @param {HTMLElement} container The DOM element to trap focus within.
2381
+ * @throws {Error} If the provided container is not a valid HTMLElement.
2382
+ */
2383
+ constructor(container) {
2384
+ if (!container || !(container instanceof HTMLElement)) {
2385
+ throw new Error("FocusTrap requires a valid HTMLElement.");
2386
+ }
2387
+
2388
+ this.container = container;
2389
+ this.tabDirection = 'forward'; // or 'backward'
2390
+
2391
+ this._init();
2392
+ }
2393
+
2394
+ /**
2395
+ * Initializes the focus trap by setting up event listeners and attributes on the container.
2396
+ * Prepares the container for focus management, including support for shadow DOM and inert attributes.
2397
+ *
2398
+ * @private
2399
+ */
2400
+ _init() {
2401
+
2402
+ // Add inert attribute to prevent focusing programmatically as well (if supported)
2403
+ if ('inert' in HTMLElement.prototype) {
2404
+ this.container.inert = false; // Ensure the container isn't inert
2405
+ this.container.setAttribute('data-focus-trap-container', true); // Mark for identification
2406
+ }
2407
+
2408
+ // Track tab direction
2409
+ this.container.addEventListener('keydown', this._onKeydown);
2410
+ }
2411
+
2412
+ /**
2413
+ * Handles keydown events to manage tab navigation within the container.
2414
+ * Ensures that focus wraps around when reaching the first or last focusable element.
2415
+ *
2416
+ * @param {KeyboardEvent} e The keyboard event triggered by user interaction.
2417
+ * @private
2418
+ */
2419
+ _onKeydown = (e) => {
2420
+
2421
+ if (e.key === 'Tab') {
2422
+
2423
+ // Set the tab direction based on the key pressed
2424
+ this.tabDirection = e.shiftKey ? 'backward' : 'forward';
2425
+
2426
+ // Get the active element(s) in the document and shadow root
2427
+ // This will include the active element in the shadow DOM if it exists
2428
+ // Active element may be inside the shadow DOM depending on delegatesFocus, so we need to check both
2429
+ let activeElement = document.activeElement;
2430
+ const actives = [activeElement];
2431
+ while (activeElement?.shadowRoot?.activeElement) {
2432
+ actives.push(activeElement.shadowRoot.activeElement);
2433
+ activeElement = activeElement.shadowRoot.activeElement;
2434
+ }
2435
+
2436
+ // Update the focusable elements
2437
+ const focusables = this._getFocusableElements();
2438
+
2439
+ // If we're at either end of the focusable elements, wrap around to the other end
2440
+ const focusIndex =
2441
+ (actives.includes(focusables[0]) || actives.includes(this.container)) && this.tabDirection === 'backward'
2442
+ ? focusables.length - 1
2443
+ : actives.includes(focusables[focusables.length - 1]) && this.tabDirection === 'forward'
2444
+ ? 0
2445
+ : null;
2446
+
2447
+ if (focusIndex !== null) {
2448
+ focusables[focusIndex].focus();
2449
+ e.preventDefault(); // Prevent default tab behavior
2450
+ e.stopPropagation(); // Stop the event from bubbling up
2451
+ }
2452
+ }
2453
+ };
2454
+
2455
+ /**
2456
+ * Retrieves all focusable elements within the container in DOM order, including those in shadow DOM and slots.
2457
+ * Returns a unique, ordered array of elements that can receive focus.
2458
+ *
2459
+ * @returns {Array<HTMLElement>} An array of focusable elements within the container.
2460
+ * @private
2461
+ */
2462
+ _getFocusableElements() {
2463
+ // Use the imported utility function to get focusable elements
2464
+ const elements = getFocusableElements(this.container);
2465
+
2466
+ // Filter out any elements with the 'focus-bookend' class
2467
+ return elements;
2468
+ }
2469
+
2470
+ /**
2471
+ * Moves focus to the first focusable element within the container.
2472
+ * Useful for setting initial focus when activating the focus trap.
2473
+ */
2474
+ focusFirstElement() {
2475
+ const focusables = this._getFocusableElements();
2476
+ if (focusables.length) focusables[0].focus();
2477
+ }
2478
+
2479
+ /**
2480
+ * Moves focus to the last focusable element within the container.
2481
+ * Useful for setting focus when deactivating or cycling focus in reverse.
2482
+ */
2483
+ focusLastElement() {
2484
+ const focusables = this._getFocusableElements();
2485
+ if (focusables.length) focusables[focusables.length - 1].focus();
2486
+ }
2487
+
2488
+ /**
2489
+ * Removes event listeners and attributes added by the focus trap.
2490
+ * Call this method to clean up when the focus trap is no longer needed.
2491
+ */
2492
+ disconnect() {
2493
+
2494
+ if (this.container.hasAttribute('data-focus-trap-container')) {
2495
+ this.container.removeAttribute('data-focus-trap-container');
2496
+ }
2497
+
2498
+ this.container.removeEventListener('keydown', this._onKeydown);
2499
+ }
2500
+ }
2501
+
2243
2502
  // Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
2244
2503
  // See LICENSE in the project root for license information.
2245
2504
 
@@ -2346,7 +2605,7 @@ const cacheFetch = (uri, options = {}) => {
2346
2605
  return _fetchMap.get(uri);
2347
2606
  };
2348
2607
 
2349
- var styleCss$2 = css`: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}`;
2608
+ var styleCss$3 = css`: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}`;
2350
2609
 
2351
2610
  // Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
2352
2611
  // See LICENSE in the project root for license information.
@@ -2389,7 +2648,7 @@ class BaseIcon extends AuroElement$1 {
2389
2648
 
2390
2649
  static get styles() {
2391
2650
  return css`
2392
- ${styleCss$2}
2651
+ ${styleCss$3}
2393
2652
  `;
2394
2653
  }
2395
2654
 
@@ -2551,7 +2810,8 @@ class AuroIcon extends BaseIcon {
2551
2810
  * Allows custom color to be set.
2552
2811
  */
2553
2812
  customColor: {
2554
- type: Boolean
2813
+ type: Boolean,
2814
+ reflect: true
2555
2815
  },
2556
2816
 
2557
2817
  /**
@@ -2591,7 +2851,7 @@ class AuroIcon extends BaseIcon {
2591
2851
  return [
2592
2852
  super.styles,
2593
2853
  css`${tokensCss$2}`,
2594
- css`${styleCss$2}`,
2854
+ css`${styleCss$3}`,
2595
2855
  css`${colorCss$3}`
2596
2856
  ];
2597
2857
  }
@@ -2626,8 +2886,12 @@ class AuroIcon extends BaseIcon {
2626
2886
  async firstUpdated() {
2627
2887
  await super.firstUpdated();
2628
2888
 
2629
- // Removes the SVG description for screenreader if ariaHidden is set to true
2630
- if (!this.hasAttribute('ariaHidden') && this.svg) {
2889
+ /**
2890
+ * icons provide a description for screen readers. Icon only instances Auro-button
2891
+ * depend on this description to provide context for the user using a screen reader.
2892
+ * Removes the SVG description for screen reader if ariaHidden is set to true.
2893
+ */
2894
+ if (this.hasAttribute('ariaHidden') && this.svg) {
2631
2895
  const svgDesc = this.svg.querySelector('desc');
2632
2896
 
2633
2897
  if (svgDesc) {
@@ -2673,11 +2937,11 @@ class AuroIcon extends BaseIcon {
2673
2937
 
2674
2938
  var iconVersion = '6.1.2';
2675
2939
 
2676
- var styleCss$1 = css`:host{position:fixed;z-index:var(--depth-tooltip, 400);display:none;isolation:isolate}.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}`;
2940
+ var styleCss$2 = 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}`;
2677
2941
 
2678
2942
  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)}`;
2679
2943
 
2680
- 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)}`;
2944
+ 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)}`;
2681
2945
 
2682
2946
  // Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
2683
2947
  // See LICENSE in the project root for license information.
@@ -2698,7 +2962,7 @@ const DESIGN_TOKEN_BREAKPOINT_OPTIONS = [
2698
2962
  */
2699
2963
 
2700
2964
  class AuroDropdownBib extends LitElement {
2701
-
2965
+ // not extending AuroElement because Bib needs only `shape` prop
2702
2966
  constructor() {
2703
2967
  super();
2704
2968
 
@@ -2708,11 +2972,14 @@ class AuroDropdownBib extends LitElement {
2708
2972
  this._mobileBreakpointValue = undefined;
2709
2973
 
2710
2974
  AuroLibraryRuntimeUtils$2.prototype.handleComponentTagRename(this, 'auro-dropdownbib');
2975
+
2976
+ this.shape = "rounded";
2977
+ this.matchWidth = false;
2711
2978
  }
2712
2979
 
2713
2980
  static get styles() {
2714
2981
  return [
2715
- styleCss$1,
2982
+ styleCss$2,
2716
2983
  colorCss$2,
2717
2984
  tokensCss$1
2718
2985
  ];
@@ -2745,6 +3012,15 @@ class AuroDropdownBib extends LitElement {
2745
3012
  reflect: true
2746
3013
  },
2747
3014
 
3015
+ /**
3016
+ * If declared, the bib width will match the trigger width.
3017
+ * @private
3018
+ */
3019
+ matchWidth: {
3020
+ type: Boolean,
3021
+ reflect: true
3022
+ },
3023
+
2748
3024
  /**
2749
3025
  * If declared, will apply border-radius to the bib.
2750
3026
  */
@@ -2758,6 +3034,11 @@ class AuroDropdownBib extends LitElement {
2758
3034
  */
2759
3035
  bibTemplate: {
2760
3036
  type: Object
3037
+ },
3038
+
3039
+ shape: {
3040
+ type: String,
3041
+ reflect: true
2761
3042
  }
2762
3043
  };
2763
3044
  }
@@ -2837,8 +3118,16 @@ class AuroDropdownBib extends LitElement {
2837
3118
 
2838
3119
  // function that renders the HTML and CSS into the scope of the component
2839
3120
  render() {
3121
+ const classes = {
3122
+ container: true
3123
+ };
3124
+
3125
+ // Since this class does not inherit from AuroElement, we apply the shape-related class within the `render` function,
3126
+ // mimicking the class naming convention used in AuroElement.resetShapeClasses.
3127
+ classes[`shape-${this.shape}`] = true;
3128
+
2840
3129
  return html$1`
2841
- <div class="container" part="bibContainer">
3130
+ <div class="${classMap(classes)}" part="bibContainer">
2842
3131
  <slot></slot>
2843
3132
  </div>
2844
3133
  `;
@@ -2847,21 +3136,23 @@ class AuroDropdownBib extends LitElement {
2847
3136
 
2848
3137
  var dropdownVersion = '3.0.0';
2849
3138
 
2850
- 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}.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;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}.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;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}.shape-box-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-box-xl.parentBorder{border:0;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}.shape-rounded-lg.thin{border-width:1px;min-height:54px;max-height:54px;background-color:unset}.shape-rounded-lg.parentBorder{border:0;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}.shape-pill-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-xl.parentBorder{border:0;min-height:68px;max-height:68px}.shape-pill-left-xl{min-height:72px;max-height:72px;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}.shape-pill-left-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-left-xl.parentBorder{border:0;min-height:68px;max-height:68px}.shape-pill-right-xl{min-height:72px;max-height:72px;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}.shape-pill-right-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-right-xl.parentBorder{border:0;min-height:68px;max-height:68px}.shape-pill-md{min-height:72px;max-height:72px;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}.shape-pill-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-md.parentBorder{border:0;min-height:44px;max-height:44px}.shape-pill-left-md{min-height:72px;max-height:72px;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}.shape-pill-left-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-left-md.parentBorder{border:0;min-height:44px;max-height:44px}.shape-pill-right-md{min-height:72px;max-height:72px;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}.shape-pill-right-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-right-md.parentBorder{border:0;min-height:44px;max-height:44px}`;
3139
+ var shapeSizeCss = css`.wrapper{overflow:hidden}.shape-classic-xl,.shape-classic-lg,.shape-classic-md,.shape-classic-sm,.shape-classic-xs{min-height:56px;max-height:56px;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:58px;max-height:58px;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:56px;max-height:56px;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:54px;max-height:54px}.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-box-lg{min-height:52px;max-height:52px;border-style:solid;border-width:2px;border-color:transparent}.shape-box-lg.simple{border-width:0px;min-height:56px;max-height:56px;background-color:unset;box-shadow:none}.shape-box-lg.thin{border-width:1px;min-height:54px;max-height:54px;background-color:unset}.shape-box-lg.parentBorder{border:0;box-shadow:unset;min-height:52px;max-height:52px}.shape-box-md{min-height:44px;max-height:44px;border-style:solid;border-width:2px;border-color:transparent}.shape-box-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset;box-shadow:none}.shape-box-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-box-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}.shape-box-sm{min-height:32px;max-height:32px;border-style:solid;border-width:2px;border-color:transparent}.shape-box-sm.simple{border-width:0px;min-height:36px;max-height:36px;background-color:unset;box-shadow:none}.shape-box-sm.thin{border-width:1px;min-height:34px;max-height:34px;background-color:unset}.shape-box-sm.parentBorder{border:0;box-shadow:unset;min-height:32px;max-height:32px}.shape-box-xs{min-height:20px;max-height:20px;border-style:solid;border-width:2px;border-color:transparent}.shape-box-xs.simple{border-width:0px;min-height:24px;max-height:24px;background-color:unset;box-shadow:none}.shape-box-xs.thin{border-width:1px;min-height:22px;max-height:22px;background-color:unset}.shape-box-xs.parentBorder{border:0;box-shadow:unset;min-height:20px;max-height:20px}.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}`;
3140
+
3141
+ var colorCss$1 = css`: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,:host([onDark]) .helpText{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-advanced-color-state-error-inverse, #f9a4a8)}`;
2851
3142
 
2852
- 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 styleCss$1 = css`:host{position:relative;display:block}:host([open]){z-index:var(--depth-tooltip, 400)}.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([matchwidth]) #bibSizer{width:100%}`;
2853
3144
 
2854
- 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``;
2855
3146
 
2856
- 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{transition:font-size .3s cubic-bezier(0.215, 0.61, 0.355, 1);white-space:normal}: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)}:host([layout*=classic]) #showStateIcon[data-expanded=true] [auro-icon]{transform:rotate(-180deg)}`;
2857
3148
 
2858
- 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-direction:row}.trigger{display:flex;flex:1;align-items:center;justify-content:center;outline:none}.triggerContentWrapper{display:flex;width:100%;flex:1;align-items:center;justify-content:center}.triggerContent{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)}`;
3149
+ var styleEmphasizedCss = css`.layout-emphasized .chevron,.layout-emphasized-left .chevron,.layout-emphasized-right .chevron{margin-right:var(--ds-size-300, 1.5rem)}: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)}`;
2859
3150
 
2860
- var styleSnowflakeCss = css`: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;width:100%;flex:1;align-items:center;justify-content:center}.triggerContent{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)}`;
3151
+ var styleSnowflakeCss = css`: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)}:host([layout*=snowflake]) .trigger,:host([layout*=snowflake]) .helpText{text-align:center}.layout-snowflake .chevron,.layout-snowflake-left .chevron,.layout-snowflake-right .chevron{margin-right:var(--ds-size-300, 1.5rem)}`;
2861
3152
 
2862
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-advanced-color-state-error-inverse, #f9a4a8)}.helptext-wrapper{color:var(--ds-auro-helptext-color)}`;
2863
3154
 
2864
- 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`.body-default{font-size:var(--wcss-body-default-font-size, 1rem);line-height:var(--wcss-body-default-line-height, 1.5)}.body-default,.body-lg{font-family:var(--wcss-body-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-lg{font-size:var(--wcss-body-lg-font-size, 1.125rem);line-height:var(--wcss-body-lg-line-height, 1.63)}.body-sm{font-size:var(--wcss-body-sm-font-size, 0.875rem);line-height:var(--wcss-body-sm-line-height, 1.25)}.body-sm,.body-xs{font-family:var(--wcss-body-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-xs{font-size:var(--wcss-body-xs-font-size, 0.75rem);line-height:var(--wcss-body-xs-line-height, 1)}.body-2xs{font-family:var(--wcss-body-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-body-2xs-font-size, 0.625rem);font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0);line-height:var(--wcss-body-2xs-line-height, 0.88)}.display-2xl{font-family:var(--wcss-display-2xl-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-2xl-font-size, clamp(3.5rem, 6vw, 5.375rem));font-weight:var(--wcss-display-2xl-weight, 300);letter-spacing:var(--wcss-display-2xl-letter-spacing, 0);line-height:var(--wcss-display-2xl-line-height, 1.3)}.display-xl{font-family:var(--wcss-display-xl-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xl-font-size, clamp(3rem, 5.3333333333vw, 4.5rem));font-weight:var(--wcss-display-xl-weight, 300);letter-spacing:var(--wcss-display-xl-letter-spacing, 0);line-height:var(--wcss-display-xl-line-height, 1.3)}.display-lg{font-family:var(--wcss-display-lg-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-lg-font-size, clamp(2.75rem, 4.6666666667vw, 4rem));font-weight:var(--wcss-display-lg-weight, 300);letter-spacing:var(--wcss-display-lg-letter-spacing, 0);line-height:var(--wcss-display-lg-line-height, 1.3)}.display-md{font-family:var(--wcss-display-md-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-md-font-size, clamp(2.5rem, 4vw, 3.5rem));font-weight:var(--wcss-display-md-weight, 300);letter-spacing:var(--wcss-display-md-letter-spacing, 0);line-height:var(--wcss-display-md-line-height, 1.3)}.display-sm{font-family:var(--wcss-display-sm-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-sm-font-size, clamp(2rem, 3.6666666667vw, 3rem));font-weight:var(--wcss-display-sm-weight, 300);letter-spacing:var(--wcss-display-sm-letter-spacing, 0);line-height:var(--wcss-display-sm-line-height, 1.3)}.display-xs{font-family:var(--wcss-display-xs-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xs-font-size, clamp(1.75rem, 3vw, 2.375rem));font-weight:var(--wcss-display-xs-weight, 300);letter-spacing:var(--wcss-display-xs-letter-spacing, 0);line-height:var(--wcss-display-xs-line-height, 1.3)}.heading-xl{font-family:var(--wcss-heading-xl-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xl-font-size, clamp(2rem, 3vw, 2.5rem));font-weight:var(--wcss-heading-xl-weight, 300);letter-spacing:var(--wcss-heading-xl-letter-spacing, 0);line-height:var(--wcss-heading-xl-line-height, 1.3)}.heading-lg{font-family:var(--wcss-heading-lg-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-lg-font-size, clamp(1.75rem, 2.6666666667vw, 2.25rem));font-weight:var(--wcss-heading-lg-weight, 300);letter-spacing:var(--wcss-heading-lg-letter-spacing, 0);line-height:var(--wcss-heading-lg-line-height, 1.3)}.heading-md{font-family:var(--wcss-heading-md-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-md-font-size, clamp(1.625rem, 2.3333333333vw, 1.75rem));font-weight:var(--wcss-heading-md-weight, 300);letter-spacing:var(--wcss-heading-md-letter-spacing, 0);line-height:var(--wcss-heading-md-line-height, 1.3)}.heading-sm{font-family:var(--wcss-heading-sm-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-sm-font-size, clamp(1.375rem, 2vw, 1.5rem));font-weight:var(--wcss-heading-sm-weight, 300);letter-spacing:var(--wcss-heading-sm-letter-spacing, 0);line-height:var(--wcss-heading-sm-line-height, 1.3)}.heading-xs{font-family:var(--wcss-heading-xs-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xs-font-size, clamp(1.25rem, 1.6666666667vw, 1.25rem));font-weight:var(--wcss-heading-xs-weight, 450);letter-spacing:var(--wcss-heading-xs-letter-spacing, 0);line-height:var(--wcss-heading-xs-line-height, 1.3)}.heading-2xs{font-family:var(--wcss-heading-2xs-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-2xs-font-size, clamp(1.125rem, 1.5vw, 1.125rem));font-weight:var(--wcss-heading-2xs-weight, 450);letter-spacing:var(--wcss-heading-2xs-letter-spacing, 0);line-height:var(--wcss-heading-2xs-line-height, 1.3)}.accent-2xl{font-family:var(--wcss-accent-2xl-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xl-font-size, clamp(2rem, 3.1666666667vw, 2.375rem));font-weight:var(--wcss-accent-2xl-weight, 450);letter-spacing:var(--wcss-accent-2xl-letter-spacing, 0.05em);line-height:var(--wcss-accent-2xl-line-height, 1)}.accent-2xl,.accent-xl{text-transform:uppercase}.accent-xl{font-family:var(--wcss-accent-xl-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xl-font-size, clamp(1.625rem, 2.3333333333vw, 2rem));font-weight:var(--wcss-accent-xl-weight, 450);letter-spacing:var(--wcss-accent-xl-letter-spacing, 0.05em);line-height:var(--wcss-accent-xl-line-height, 1.3)}.accent-lg{font-family:var(--wcss-accent-lg-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-lg-font-size, clamp(1.5rem, 2.1666666667vw, 1.75rem));font-weight:var(--wcss-accent-lg-weight, 450);letter-spacing:var(--wcss-accent-lg-letter-spacing, 0.05em);line-height:var(--wcss-accent-lg-line-height, 1.3)}.accent-lg,.accent-md{text-transform:uppercase}.accent-md{font-family:var(--wcss-accent-md-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-md-font-size, clamp(1.375rem, 1.8333333333vw, 1.5rem));font-weight:var(--wcss-accent-md-weight, 500);letter-spacing:var(--wcss-accent-md-letter-spacing, 0.05em);line-height:var(--wcss-accent-md-line-height, 1.3)}.accent-sm{font-family:var(--wcss-accent-sm-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-sm-font-size, clamp(1.125rem, 1.5vw, 1.25rem));font-weight:var(--wcss-accent-sm-weight, 500);letter-spacing:var(--wcss-accent-sm-letter-spacing, 0.05em);line-height:var(--wcss-accent-sm-line-height, 1.3)}.accent-sm,.accent-xs{text-transform:uppercase}.accent-xs{font-family:var(--wcss-accent-xs-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xs-font-size, clamp(1rem, 1.3333333333vw, 1rem));font-weight:var(--wcss-accent-xs-weight, 500);letter-spacing:var(--wcss-accent-xs-letter-spacing, 0.1em);line-height:var(--wcss-accent-xs-line-height, 1.3)}.accent-2xs{font-family:var(--wcss-accent-2xs-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xs-font-size, clamp(0.875rem, 1.1666666667vw, 0.875rem));font-weight:var(--wcss-accent-2xs-weight, 450);letter-spacing:var(--wcss-accent-2xs-letter-spacing, 0.1em);line-height:var(--wcss-accent-2xs-line-height, 1.3);text-transform:uppercase}:host{position:relative;display:block}.helptext-wrapper{display:none}.helptext-wrapper[visible]{display:block}::slotted(*:not(:empty)){margin-top:var(--ds-size-50, 0.25rem);margin-bottom:0}::slotted(p){margin-block:0}`;
2865
3156
 
2866
3157
  var tokensCss = css`:host{--ds-auro-helptext-color: var(--ds-basic-color-texticon-muted, #676767)}`;
2867
3158
 
@@ -2941,8 +3232,6 @@ class AuroLibraryRuntimeUtils {
2941
3232
 
2942
3233
  /**
2943
3234
  * Displays help text or error messages within form elements - Internal Use Only.
2944
- *
2945
- * @attr { Boolean } large - If declared, make font-size to 1rem(16px).
2946
3235
  */
2947
3236
  class AuroHelpText extends LitElement {
2948
3237
 
@@ -3058,7 +3347,7 @@ class AuroHelpText extends LitElement {
3058
3347
  // function that renders the HTML and CSS into the scope of the component
3059
3348
  render() {
3060
3349
  return html`
3061
- <div class="helptext-wrapper" ?visible="${this.hasTextContent}">
3350
+ <div class="helptext-wrapper body-xs" ?visible="${this.hasTextContent}">
3062
3351
  <slot @slotchange=${this.handleSlotChange}></slot>
3063
3352
  </div>
3064
3353
  `;
@@ -3102,19 +3391,22 @@ class AuroElement extends LitElement {
3102
3391
  }
3103
3392
 
3104
3393
  resetShapeClasses() {
3105
- if (this.shape && this.size) {
3106
- const wrapper = this.shadowRoot.querySelector('.wrapper');
3394
+ const wrapper = this.shadowRoot.querySelector('.wrapper');
3107
3395
 
3108
- if (wrapper) {
3109
- wrapper.classList.forEach((className) => {
3110
- if (className.startsWith('shape-')) {
3111
- wrapper.classList.remove(className);
3112
- }
3113
- });
3396
+ if (wrapper) {
3397
+ wrapper.classList.forEach((className) => {
3398
+ if (className.startsWith('shape-')) {
3399
+ wrapper.classList.remove(className);
3400
+ }
3401
+ });
3114
3402
 
3403
+ if (this.shape && this.size) {
3115
3404
  wrapper.classList.add(`shape-${this.shape.toLowerCase()}-${this.size.toLowerCase()}`);
3405
+ } else {
3406
+ wrapper.classList.add('shape-none');
3116
3407
  }
3117
3408
  }
3409
+
3118
3410
  }
3119
3411
 
3120
3412
  resetLayoutClasses() {
@@ -3163,14 +3455,14 @@ class AuroElement extends LitElement {
3163
3455
  // See LICENSE in the project root for license information.
3164
3456
 
3165
3457
 
3166
- /**
3167
- * @attr { Boolean } disableEventShow - If declared, the dropdown will only show by calling the API .show() public method.
3458
+
3459
+ /*
3168
3460
  * @slot - Default slot for the popover content.
3169
- * @slot label - Defines the content of the label.
3170
3461
  * @slot helpText - Defines the content of the helpText.
3171
3462
  * @slot trigger - Defines the content of the trigger.
3172
3463
  * @csspart trigger - The trigger content container.
3173
3464
  * @csspart chevron - The collapsed/expanded state icon container.
3465
+ * @csspart size - The size of the dropdown bib. (height, width, maxHeight, maxWidth only)
3174
3466
  * @csspart helpText - The helpText content container.
3175
3467
  * @event auroDropdown-triggerClick - Notifies that the trigger has been clicked.
3176
3468
  * @event auroDropdown-toggled - Notifies that the visibility of the dropdown bib has changed.
@@ -3185,23 +3477,25 @@ class AuroDropdown extends AuroElement {
3185
3477
  this.matchWidth = false;
3186
3478
  this.noHideOnThisFocusLoss = false;
3187
3479
 
3188
- this.errorMessage = ''; // TODO - check with Doug if there is still more to do here
3480
+ this.errorMessage = undefined; // TODO - check with Doug if there is still more to do here
3189
3481
 
3190
3482
  // Layout Config
3191
- this.layout = 'classic';
3192
- this.shape = 'rounded';
3193
- this.size = 'xl';
3483
+ this.layout = undefined;
3484
+ this.shape = undefined;
3485
+ this.size = undefined;
3486
+
3194
3487
  this.parentBorder = false;
3195
3488
 
3196
- this.privateDefaults();
3197
- }
3489
+ /** @private */
3490
+ this.handleDropdownToggle = this.handleDropdownToggle.bind(this);
3198
3491
 
3199
- get commonLabelClasses() {
3200
- return {
3201
- // 'withValue': this.value && this.value.length > 0
3202
- };
3492
+ this.privateDefaults();
3203
3493
  }
3204
3494
 
3495
+ /**
3496
+ * @private
3497
+ * @returns {object} Class definition for the wrapper element.
3498
+ */
3205
3499
  get commonWrapperClasses() {
3206
3500
  return {
3207
3501
  'trigger': true,
@@ -3219,13 +3513,10 @@ class AuroDropdown extends AuroElement {
3219
3513
  privateDefaults() {
3220
3514
  this.chevron = false;
3221
3515
  this.disabled = false;
3516
+ this.disableFocusTrap = false;
3222
3517
  this.error = false;
3223
- this.inset = false;
3224
- this.rounded = false;
3225
3518
  this.tabIndex = 0;
3226
3519
  this.noToggle = false;
3227
- this.a11yAutocomplete = 'none';
3228
- this.labeled = true;
3229
3520
  this.a11yRole = 'button';
3230
3521
  this.onDark = false;
3231
3522
  this.showTriggerBorders = true;
@@ -3321,6 +3612,18 @@ class AuroDropdown extends AuroElement {
3321
3612
  this.floater.showBib();
3322
3613
  }
3323
3614
 
3615
+ /**
3616
+ * When bib is open, focus on the first element inside of bib.
3617
+ * If not, trigger element will get focus.
3618
+ */
3619
+ focus() {
3620
+ if (this.isPopoverVisible && this.focusTrap) {
3621
+ this.focusTrap.focusFirstElement();
3622
+ } else {
3623
+ this.trigger.focus();
3624
+ }
3625
+ }
3626
+
3324
3627
  // function to define props used within the scope of this component
3325
3628
  static get properties() {
3326
3629
  return {
@@ -3334,6 +3637,15 @@ class AuroDropdown extends AuroElement {
3334
3637
  reflect: true
3335
3638
  },
3336
3639
 
3640
+ /**
3641
+ * If declared, the dropdown will only show by calling the API .show() public method.
3642
+ * @default false
3643
+ */
3644
+ disableEventShow: {
3645
+ type: Boolean,
3646
+ reflect: true
3647
+ },
3648
+
3337
3649
  /**
3338
3650
  * If declared, applies a border around the trigger slot.
3339
3651
  */
@@ -3352,17 +3664,17 @@ class AuroDropdown extends AuroElement {
3352
3664
  },
3353
3665
 
3354
3666
  /**
3355
- * If declared, the dropdown will be styled with the common theme.
3667
+ * If declared, the dropdown is not interactive.
3356
3668
  */
3357
- common: {
3669
+ disabled: {
3358
3670
  type: Boolean,
3359
3671
  reflect: true
3360
3672
  },
3361
3673
 
3362
3674
  /**
3363
- * If declared, the dropdown is not interactive.
3675
+ * If declared, the focus trap inside of bib will be turned off.
3364
3676
  */
3365
- disabled: {
3677
+ disableFocusTrap: {
3366
3678
  type: Boolean,
3367
3679
  reflect: true
3368
3680
  },
@@ -3407,27 +3719,13 @@ class AuroDropdown extends AuroElement {
3407
3719
  reflect: true
3408
3720
  },
3409
3721
 
3410
- /**
3411
- * Makes the trigger to be full width of its parent container.
3412
- */
3413
- fluid: {
3414
- type: Boolean,
3415
- reflect: true
3416
- },
3417
-
3418
- /**
3419
- * If declared, will apply padding around trigger slot content.
3420
- */
3421
- inset: {
3422
- type: Boolean,
3423
- reflect: true
3424
- },
3425
-
3426
3722
  /**
3427
3723
  * If true, the dropdown bib is displayed.
3428
3724
  */
3429
3725
  isPopoverVisible: {
3430
- type: Boolean
3726
+ type: Boolean,
3727
+ reflect: true,
3728
+ attribute: 'open'
3431
3729
  },
3432
3730
 
3433
3731
  /**
@@ -3466,15 +3764,6 @@ class AuroDropdown extends AuroElement {
3466
3764
  reflect: true
3467
3765
  },
3468
3766
 
3469
- /**
3470
- * Defines if there is a label preset.
3471
- * @private
3472
- */
3473
- labeled: {
3474
- type: Boolean,
3475
- reflect: true
3476
- },
3477
-
3478
3767
  /**
3479
3768
  * Defines if the trigger should size based on the parent element providing the border UI.
3480
3769
  * @private
@@ -3535,6 +3824,9 @@ class AuroDropdown extends AuroElement {
3535
3824
  reflect: true
3536
3825
  },
3537
3826
 
3827
+ /**
3828
+ * If declared, and a function is set, that function will execute when the slot content is updated.
3829
+ */
3538
3830
  onSlotChange: {
3539
3831
  type: Function,
3540
3832
  reflect: false
@@ -3549,14 +3841,6 @@ class AuroDropdown extends AuroElement {
3549
3841
  reflect: true
3550
3842
  },
3551
3843
 
3552
- /**
3553
- * If declared, will apply border-radius to trigger and default slots.
3554
- */
3555
- rounded: {
3556
- type: Boolean,
3557
- reflect: true
3558
- },
3559
-
3560
3844
  /**
3561
3845
  * @private
3562
3846
  */
@@ -3571,22 +3855,15 @@ class AuroDropdown extends AuroElement {
3571
3855
  type: String || undefined,
3572
3856
  attribute: false,
3573
3857
  reflect: false
3574
- },
3575
-
3576
- /**
3577
- * The value for the aria-autocomplete attribute of the trigger element.
3578
- */
3579
- a11yAutocomplete: {
3580
- type: String,
3581
- attribute: false,
3582
3858
  }
3583
3859
  };
3584
3860
  }
3585
3861
 
3586
3862
  static get styles() {
3587
3863
  return [
3588
- colorCss$1,
3864
+ styleCss$1,
3589
3865
  tokensCss$1,
3866
+ colorCss$1,
3590
3867
 
3591
3868
  // default layout
3592
3869
  classicColorCss,
@@ -3648,13 +3925,27 @@ class AuroDropdown extends AuroElement {
3648
3925
  if (changedProperties.size === 0 || changedProperties.has('isPopoverVisible')) {
3649
3926
  this.handleTriggerContentSlotChange();
3650
3927
  }
3928
+ }
3651
3929
 
3930
+ /**
3931
+ * Handles the custom event `auroDropdown-toggled` to update the visibility of the dropdown bib.
3932
+ * @private
3933
+ * @param {CustomEvent} event - The custom event that contains the dropdown toggle information.
3934
+ */
3935
+ handleDropdownToggle(event) {
3936
+ this.updateFocusTrap();
3937
+ this.isPopoverVisible = event.detail.expanded;
3938
+ const eventType = event.detail.eventType || "unknown";
3939
+ if (!this.isPopoverVisible && this.hasFocus && eventType === "keydown") {
3940
+ this.trigger.focus();
3941
+ }
3652
3942
  }
3653
3943
 
3654
3944
  firstUpdated() {
3655
3945
 
3656
3946
  // Configure the floater to, this will generate the ID for the bib
3657
3947
  this.floater.configure(this, 'auroDropdown');
3948
+ this.addEventListener('auroDropdown-toggled', this.handleDropdownToggle);
3658
3949
 
3659
3950
  /**
3660
3951
  * @description Let subscribers know that the dropdown ID ha been generated and added.
@@ -3672,6 +3963,13 @@ class AuroDropdown extends AuroElement {
3672
3963
 
3673
3964
  // Add the tag name as an attribute if it is different than the component name
3674
3965
  this.runtimeUtils.handleComponentTagRename(this, 'auro-dropdown');
3966
+
3967
+ this.trigger.addEventListener('click', () => {
3968
+ this.dispatchEvent(new CustomEvent('auroDropdown-triggerClick', {
3969
+ bubbles: true,
3970
+ composed: true
3971
+ }));
3972
+ });
3675
3973
  }
3676
3974
 
3677
3975
  /**
@@ -3715,70 +4013,33 @@ class AuroDropdown extends AuroElement {
3715
4013
  }
3716
4014
 
3717
4015
  /**
3718
- * Function to support @focusout event.
3719
4016
  * @private
3720
- * @return {void}
3721
4017
  */
3722
- handleFocusout() {
3723
- this.hasFocus = false;
4018
+ updateFocusTrap() {
4019
+ // If the dropdown is open, create a focus trap and focus the first element
4020
+ if (this.isPopoverVisible && !this.disableFocusTrap) {
4021
+ this.focusTrap = new FocusTrap(this.bibContent);
4022
+ this.focusTrap.focusFirstElement();
4023
+ return;
4024
+ }
4025
+
4026
+ // Guard Clause: Ensure there is a focus trap currently active before continuing
4027
+ if (!this.focusTrap) {
4028
+ return;
4029
+ }
4030
+
4031
+ // If the dropdown is not open, disconnect the focus trap if it exists
4032
+ this.focusTrap.disconnect();
4033
+ this.focusTrap = undefined;
3724
4034
  }
3725
4035
 
3726
4036
  /**
3727
- * Determines if the element or any children are focusable.
4037
+ * Function to support @focusout event.
3728
4038
  * @private
3729
- * @param {HTMLElement} element - Element to check.
3730
- * @returns {Boolean} - True if the element or any children are focusable.
4039
+ * @return {void}
3731
4040
  */
3732
- containsFocusableElement(element) {
3733
- this.showTriggerBorders = true;
3734
-
3735
- const nodes = [
3736
- element,
3737
- ...element.children
3738
- ];
3739
-
3740
- const focusableElements = [
3741
- 'a',
3742
- 'auro-hyperlink',
3743
- 'button',
3744
- 'auro-button',
3745
- 'input',
3746
- 'auro-input',
3747
- ];
3748
-
3749
- const focusableElementsThatNeedBorders = ['auro-input'];
3750
-
3751
- const result = nodes.some((node) => {
3752
- const tagName = node.tagName.toLowerCase();
3753
-
3754
- if (node.tabIndex > -1) {
3755
- return true;
3756
- }
3757
-
3758
- if (focusableElements.includes(tagName)) {
3759
- if ((tagName === 'a' || tagName === 'auro-hyperlink' || node.hasAttribute('auro-hyperlink')) && node.hasAttribute('href')) {
3760
- return true;
3761
- }
3762
- if (!node.hasAttribute('disabled')) {
3763
- return true;
3764
- }
3765
- }
3766
-
3767
- if (focusableElements.some((focusableElement) => focusableElement.startsWith('auro-') && (focusableElement === tagName || node.hasAttribute(focusableElement)))) {
3768
- return true;
3769
- }
3770
-
3771
- return false;
3772
- });
3773
-
3774
- if (result) {
3775
- this.showTriggerBorders = !nodes.some((node) => {
3776
- const tagName = node.tagName.toLowerCase();
3777
- return focusableElements.includes(tagName) && !focusableElementsThatNeedBorders.includes(tagName);
3778
- });
3779
- }
3780
-
3781
- return result;
4041
+ handleFocusout() {
4042
+ this.hasFocus = false;
3782
4043
  }
3783
4044
 
3784
4045
  /**
@@ -3874,14 +4135,13 @@ class AuroDropdown extends AuroElement {
3874
4135
  * @returns {void}
3875
4136
  */
3876
4137
  handleTriggerContentSlotChange(event) {
3877
-
3878
4138
  this.floater.handleTriggerTabIndex();
3879
4139
 
3880
4140
  // Get the trigger
3881
4141
  const trigger = this.shadowRoot.querySelector('#trigger');
3882
4142
 
3883
4143
  // Get the trigger slot
3884
- const triggerSlot = this.shadowRoot.querySelector('.triggerContent slot');
4144
+ const triggerSlot = this.shadowRoot.querySelector('.triggerContentWrapper slot');
3885
4145
 
3886
4146
  // If there's a trigger slot
3887
4147
  if (triggerSlot) {
@@ -3893,7 +4153,7 @@ class AuroDropdown extends AuroElement {
3893
4153
  if (triggerContentNodes) {
3894
4154
 
3895
4155
  // See if any of them are focusable elements
3896
- this.triggerContentFocusable = triggerContentNodes.some((node) => this.containsFocusableElement(node));
4156
+ this.triggerContentFocusable = triggerContentNodes.some((node) => getFocusableElements(node).length > 0);
3897
4157
 
3898
4158
  // If any of them are focusable elements
3899
4159
  if (this.triggerContentFocusable) {
@@ -3953,29 +4213,6 @@ class AuroDropdown extends AuroElement {
3953
4213
  }
3954
4214
  }
3955
4215
 
3956
- /**
3957
- * @private
3958
- * @method handleLabelSlotChange
3959
- * @param {event} event - The event object representing the slot change.
3960
- * @description Handles the slot change event for the label slot.
3961
- */
3962
- handleLabelSlotChange (event) {
3963
-
3964
- // Get the nodes from the event
3965
- const nodes = event.target.assignedNodes();
3966
-
3967
- // Guard clause for no nodes
3968
- if (!nodes) {
3969
- return;
3970
- }
3971
-
3972
- // Convert the nodes to a measurable array so we can get the length
3973
- const nodesArr = Array.from(nodes);
3974
-
3975
- // If the nodes array has a length, the dropdown is labeled
3976
- this.labeled = nodesArr.length > 0;
3977
- }
3978
-
3979
4216
  /**
3980
4217
  * Returns HTML for the common portion of the layouts.
3981
4218
  * @private
@@ -3988,24 +4225,19 @@ class AuroDropdown extends AuroElement {
3988
4225
  <div
3989
4226
  id="trigger"
3990
4227
  class="${classMap(this.commonWrapperClasses)}" part="wrapper"
3991
- tabindex="${this.tabIndex}"
4228
+ tabindex="${ifDefined(this.triggerContentFocusable ? undefined : this.tabIndex)}"
3992
4229
  role="${ifDefined(this.triggerContentFocusable ? undefined : this.a11yRole)}"
3993
- aria-expanded="${ifDefined(this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
3994
- aria-controls="${ifDefined(this.triggerContentFocusable ? undefined : this.dropdownId)}"
4230
+ aria-expanded="${ifDefined(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
4231
+ aria-controls="${ifDefined(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.dropdownId)}"
3995
4232
  aria-labelledby="${ifDefined(this.triggerContentFocusable ? undefined : 'triggerLabel')}"
3996
4233
  @focusin="${this.handleFocusin}"
3997
4234
  @blur="${this.handleFocusOut}">
3998
- <div class="triggerContentWrapper">
3999
- <label class="label" id="triggerLabel" hasTrigger=${this.hasTriggerContent}>
4000
- <slot name="label" @slotchange="${this.handleLabelSlotChange}"></slot>
4001
- </label>
4002
- <div class="triggerContent">
4003
- <slot
4004
- name="trigger"
4005
- @slotchange="${this.handleTriggerContentSlotChange}"></slot>
4006
- </div>
4235
+ <div class="triggerContentWrapper" id="triggerLabel">
4236
+ <slot
4237
+ name="trigger"
4238
+ @slotchange="${this.handleTriggerContentSlotChange}"></slot>
4007
4239
  </div>
4008
- ${this.chevron || this.common ? html$1`
4240
+ ${this.chevron ? html$1`
4009
4241
  <div
4010
4242
  id="showStateIcon"
4011
4243
  class="chevron"
@@ -4026,11 +4258,9 @@ class AuroDropdown extends AuroElement {
4026
4258
  <div id="bibSizer" part="size"></div>
4027
4259
  <${this.dropdownBibTag}
4028
4260
  id="bib"
4261
+ shape="${this.shape}"
4029
4262
  ?data-show="${this.isPopoverVisible}"
4030
- ?isfullscreen="${this.isBibFullscreen}"
4031
- ?common="${this.common}"
4032
- ?rounded="${this.common || this.rounded}"
4033
- ?inset="${this.common || this.inset}">
4263
+ ?isfullscreen="${this.isBibFullscreen}">
4034
4264
  <div class="slotContent">
4035
4265
  <slot @slotchange="${this.handleDefaultSlot}"></slot>
4036
4266
  </div>
@@ -4045,62 +4275,13 @@ class AuroDropdown extends AuroElement {
4045
4275
  * @returns {html} - Returns HTML for the classic layout.
4046
4276
  */
4047
4277
  renderLayoutClassic() {
4278
+ // TODO: check with Doug why this was never used?
4279
+ const helpTextClasses = {
4280
+ 'helpText': true
4281
+ };
4048
4282
 
4049
4283
  return html$1`
4050
- <div>
4051
- <div
4052
- id="trigger"
4053
- class="trigger"
4054
- part="trigger"
4055
- tabindex="${this.tabIndex}"
4056
- ?showBorder="${this.showTriggerBorders}"
4057
- role="${ifDefined(this.triggerContentFocusable ? undefined : this.a11yRole)}"
4058
- aria-expanded="${ifDefined(this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
4059
- aria-controls="${ifDefined(this.triggerContentFocusable ? undefined : this.dropdownId)}"
4060
- aria-labelledby="${ifDefined(this.triggerContentFocusable ? undefined : 'triggerLabel')}"
4061
- >
4062
- <div class="triggerContentWrapper">
4063
- <label class="label" id="triggerLabel" hasTrigger=${this.hasTriggerContent}>
4064
- <slot name="label" @slotchange="${this.handleLabelSlotChange}"></slot>
4065
- </label>
4066
- <div class="triggerContent">
4067
- <slot
4068
- name="trigger"
4069
- @slotchange="${this.handleTriggerContentSlotChange}"></slot>
4070
- </div>
4071
- </div>
4072
- ${this.chevron || this.common ? html$1`
4073
- <div
4074
- id="showStateIcon"
4075
- part="chevron">
4076
- <${this.iconTag}
4077
- category="interface"
4078
- name="chevron-down"
4079
- ?onDark="${this.onDark}"
4080
- variant="${this.disabled ? 'disabled' : 'muted'}">
4081
- >
4082
- </${this.iconTag}>
4083
- </div>
4084
- ` : undefined }
4085
- </div>
4086
- <${this.helpTextTag} part="helpText" ?onDark=${this.onDark} ?error="${this.error}">
4087
- <slot name="helpText"></slot>
4088
- </${this.helpTextTag}>
4089
-
4090
- <div id="bibSizer" part="size"></div>
4091
- <${this.dropdownBibTag}
4092
- id="bib"
4093
- ?data-show="${this.isPopoverVisible}"
4094
- ?isfullscreen="${this.isBibFullscreen}"
4095
- ?common="${this.common}"
4096
- ?rounded="${this.common || this.rounded}"
4097
- ?inset="${this.common || this.inset}"
4098
- >
4099
- <div class="slotContent">
4100
- <slot @slotchange="${this.handleDefaultSlot}"></slot>
4101
- </div>
4102
- </${this.dropdownBibTag}>
4103
- </div>
4284
+ ${this.renderBasicHtml(helpTextClasses)}
4104
4285
  `;
4105
4286
  }
4106
4287