@aurodesignsystem/auro-formkit 5.2.2 → 5.2.3

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 (34) hide show
  1. package/CHANGELOG.md +10 -3
  2. package/components/combobox/demo/api.md +2 -2
  3. package/components/combobox/demo/api.min.js +151 -75
  4. package/components/combobox/demo/index.min.js +149 -73
  5. package/components/combobox/dist/auro-combobox.d.ts +9 -0
  6. package/components/combobox/dist/index.js +83 -24
  7. package/components/combobox/dist/registered.js +83 -24
  8. package/components/counter/demo/api.min.js +99 -67
  9. package/components/counter/demo/index.min.js +99 -67
  10. package/components/counter/dist/index.js +18 -3
  11. package/components/counter/dist/registered.js +18 -3
  12. package/components/datepicker/demo/api.min.js +197 -171
  13. package/components/datepicker/demo/index.min.js +197 -171
  14. package/components/datepicker/dist/index.js +18 -3
  15. package/components/datepicker/dist/registered.js +18 -3
  16. package/components/dropdown/demo/api.min.js +48 -16
  17. package/components/dropdown/demo/index.min.js +48 -16
  18. package/components/dropdown/dist/auro-dropdown.d.ts +2 -0
  19. package/components/dropdown/dist/index.js +18 -3
  20. package/components/dropdown/dist/registered.js +18 -3
  21. package/components/menu/demo/api.min.js +8 -2
  22. package/components/menu/demo/index.min.js +8 -2
  23. package/components/menu/dist/index.js +8 -2
  24. package/components/menu/dist/registered.js +8 -2
  25. package/components/radio/demo/api.min.js +4 -4
  26. package/components/radio/demo/index.min.js +4 -4
  27. package/components/radio/dist/index.js +4 -4
  28. package/components/radio/dist/registered.js +4 -4
  29. package/components/select/demo/api.min.js +109 -50
  30. package/components/select/demo/index.min.js +109 -50
  31. package/components/select/dist/auro-select.d.ts +2 -0
  32. package/components/select/dist/index.js +46 -10
  33. package/components/select/dist/registered.js +46 -10
  34. package/package.json +1 -1
@@ -376,6 +376,14 @@ export class AuroCombobox extends AuroElement {
376
376
  * @returns {void}
377
377
  */
378
378
  showBib(): void;
379
+ /**
380
+ * Forces focus to the internal input element and positions the cursor at the end of the text.
381
+ * This is used when clicking anywhere within the Combobox to ensure the input receives focus
382
+ * and the cursor is positioned at the end for better user experience.
383
+ * @private
384
+ * @returns {void}
385
+ */
386
+ private forceFocusToInputEnd;
379
387
  /**
380
388
  * Binds all behavior needed to the dropdown after rendering.
381
389
  * @private
@@ -404,6 +412,7 @@ export class AuroCombobox extends AuroElement {
404
412
  */
405
413
  private configureMenu;
406
414
  menu: Element;
415
+ defaultMenuShape: string;
407
416
  /**
408
417
  * Binds all behavior needed to the input after rendering.
409
418
  * @private
@@ -1,6 +1,7 @@
1
1
  import { css, LitElement, html as html$1 } from 'lit';
2
2
  import { unsafeStatic, literal, html } from 'lit/static-html.js';
3
3
  import { classMap } from 'lit/directives/class-map.js';
4
+ import { createRef, ref } from 'lit/directives/ref.js';
4
5
  import { ifDefined } from 'lit/directives/if-defined.js';
5
6
  import { repeat } from 'lit/directives/repeat.js';
6
7
 
@@ -3852,7 +3853,7 @@ let AuroIcon$2 = class AuroIcon extends BaseIcon$2 {
3852
3853
 
3853
3854
  var iconVersion$2 = '8.1.2';
3854
3855
 
3855
- var styleCss$2$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}`;
3856
+ var styleCss$2$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}:host(:not([isfullscreen])) .container[class*=shape-rounded]{border-radius:16px}.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}`;
3856
3857
 
3857
3858
  var colorCss$2$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)}`;
3858
3859
 
@@ -4055,7 +4056,7 @@ var shapeSizeCss$1 = css`.wrapper{overflow:hidden}.shape-classic-xl,.shape-class
4055
4056
 
4056
4057
  var colorCss$1$2 = 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])) .wrapper:hover{--ds-auro-dropdown-trigger-background-color: var(--ds-auro-dropdown-trigger-hover-background-color)}: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]) .wrapper:hover{--ds-auro-dropdown-trigger-background-color: var(--ds-auro-dropdown-trigger-hover-background-color)}: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)}`;
4057
4058
 
4058
- var styleCss$1$3 = css`:host{position:relative;display:block;text-align:left;transform:translateZ(0)}:host([open]){z-index:var(--depth-tooltip, 400)}:host([open][isbibfullscreen]){position:fixed;top:0;left:0}.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%}`;
4059
+ var styleCss$1$3 = css`:host{position:relative;display:block;text-align:left}[popover=manual]{overflow:visible;padding:0;border:inherit;margin:0;background:inherit;outline:inherit}: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%}`;
4059
4060
 
4060
4061
  var classicColorCss$1 = css``;
4061
4062
 
@@ -4413,6 +4414,9 @@ class AuroDropdown extends AuroElement$4 {
4413
4414
  /** @private */
4414
4415
  this.handleDropdownToggle = this.handleDropdownToggle.bind(this);
4415
4416
 
4417
+ /** @private */
4418
+ this.bibElement = createRef();
4419
+
4416
4420
  this.privateDefaults();
4417
4421
  }
4418
4422
 
@@ -4849,6 +4853,14 @@ class AuroDropdown extends AuroElement$4 {
4849
4853
  if (changedProperties.size === 0 || changedProperties.has('isPopoverVisible')) {
4850
4854
  this.handleTriggerContentSlotChange();
4851
4855
  }
4856
+
4857
+ if (changedProperties.has('isPopoverVisible') && this.bibElement.value) {
4858
+ if (this.isPopoverVisible) {
4859
+ this.bibElement.value.showPopover();
4860
+ } else {
4861
+ this.bibElement.value.hidePopover();
4862
+ }
4863
+ }
4852
4864
  }
4853
4865
 
4854
4866
  /**
@@ -5189,7 +5201,10 @@ class AuroDropdown extends AuroElement$4 {
5189
5201
  id="bib"
5190
5202
  shape="${this.shape}"
5191
5203
  ?data-show="${this.isPopoverVisible}"
5192
- ?isfullscreen="${this.isBibFullscreen}">
5204
+ ?isfullscreen="${this.isBibFullscreen}"
5205
+ ${ref(this.bibElement)}
5206
+ popover="manual"
5207
+ >
5193
5208
  <div class="slotContent">
5194
5209
  <slot @slotchange="${this.handleDefaultSlot}"></slot>
5195
5210
  </div>
@@ -16458,7 +16473,7 @@ class AuroCombobox extends AuroElement {
16458
16473
  if (this.availableOptions.length === 0) {
16459
16474
  if (this.noMatchOption) {
16460
16475
  this.noMatchOption.removeAttribute('hidden');
16461
- } else {
16476
+ } else if (!this.menu.loading || this.isHiddenWhileLoading) {
16462
16477
  this.hideBib();
16463
16478
  }
16464
16479
  } else if (this.noMatchOption) {
@@ -16574,7 +16589,6 @@ class AuroCombobox extends AuroElement {
16574
16589
  this.dropdown.hide();
16575
16590
  return;
16576
16591
  }
16577
-
16578
16592
  if (!this.dropdown.isPopoverVisible && this.input.value && this.input.value.length > 0) {
16579
16593
  if (this.menu.getAttribute('loading') || (this.availableOptions && this.availableOptions.length > 0) || this.noMatchOption !== undefined) { // eslint-disable-line no-extra-parens
16580
16594
  if (this.menu.hasAttribute('loading') && !this.menu.hasLoadingPlaceholder) {
@@ -16586,6 +16600,29 @@ class AuroCombobox extends AuroElement {
16586
16600
  }
16587
16601
  }
16588
16602
 
16603
+ /**
16604
+ * Forces focus to the internal input element and positions the cursor at the end of the text.
16605
+ * This is used when clicking anywhere within the Combobox to ensure the input receives focus
16606
+ * and the cursor is positioned at the end for better user experience.
16607
+ * @private
16608
+ * @returns {void}
16609
+ */
16610
+ forceFocusToInputEnd() {
16611
+ // Set up input ref
16612
+ let inputElement = null;
16613
+
16614
+ if (this.input.shadowRoot) {
16615
+ inputElement = this.input.shadowRoot.querySelector('input');
16616
+ }
16617
+
16618
+ if (inputElement) {
16619
+ // Force focus and set cursor position to end of text to ensure visibility
16620
+ inputElement.focus();
16621
+ const textLength = inputElement.value ? inputElement.value.length : 0;
16622
+ inputElement.setSelectionRange(textLength, textLength);
16623
+ }
16624
+ }
16625
+
16589
16626
  /**
16590
16627
  * Binds all behavior needed to the dropdown after rendering.
16591
16628
  * @private
@@ -16614,6 +16651,9 @@ class AuroCombobox extends AuroElement {
16614
16651
 
16615
16652
  this.dropdown.addEventListener('auroDropdown-triggerClick', () => {
16616
16653
  this.showBib();
16654
+
16655
+ // Fixes Chromium-specific issue where clicking outside input but within Combobox doesn't return focus
16656
+ this.forceFocusToInputEnd();
16617
16657
  });
16618
16658
 
16619
16659
  // setting up bibtemplate
@@ -16676,13 +16716,21 @@ class AuroCombobox extends AuroElement {
16676
16716
  this.menu.setAttribute('size', 'md');
16677
16717
  this.menu.setAttribute('shape', 'box');
16678
16718
  } else {
16679
- // set menu's default size if there it's not specified.
16680
- if (!this.menu.getAttribute('size')) {
16681
- this.menu.setAttribute('size', this.layout !== 'emphasized' ? 'md' : this.size);
16682
- }
16719
+ this.menu.setAttribute('size', this.layout === 'emphasized' ? 'lg' : 'md');
16683
16720
 
16684
- if (!this.getAttribute('shape')) {
16685
- this.menu.setAttribute('shape', this.layout === 'classic' ? 'box' : this.shape);
16721
+ switch (this.layout) {
16722
+ case 'classic':
16723
+ this.menu.setAttribute('shape', 'box');
16724
+ break;
16725
+ case 'emphasized':
16726
+ if (this.dropdown && this.dropdown.bib) {
16727
+ this.dropdown.bib.shape = 'rounded';
16728
+ }
16729
+ this.menu.setAttribute('shape', 'rounded');
16730
+ break;
16731
+ default:
16732
+ this.menu.setAttribute('shape', this.defaultMenuShape || this.shape);
16733
+ break;
16686
16734
  }
16687
16735
  }
16688
16736
  }
@@ -16694,6 +16742,7 @@ class AuroCombobox extends AuroElement {
16694
16742
  */
16695
16743
  configureMenu() {
16696
16744
  this.menu = this.querySelector('auro-menu, [auro-menu]');
16745
+ this.defaultMenuShape = this.menu.getAttribute('shape');
16697
16746
 
16698
16747
  this.menu.value = this.value;
16699
16748
 
@@ -16786,10 +16835,6 @@ class AuroCombobox extends AuroElement {
16786
16835
  this.validate();
16787
16836
  }
16788
16837
  });
16789
-
16790
- this.input.addEventListener('input', () => {
16791
- this.dispatchEvent(new CustomEvent('inputValue', { detail: { value: this.inputValue} }));
16792
- });
16793
16838
  }
16794
16839
 
16795
16840
  /**
@@ -16842,15 +16887,18 @@ class AuroCombobox extends AuroElement {
16842
16887
  this.validate();
16843
16888
  }
16844
16889
 
16845
- // Hide menu if value is empty, otherwise show if there are available suggestions
16846
16890
  if (this.input.value && this.input.value.length === 0) {
16891
+ // Hide menu if value is empty, otherwise show if there are available suggestions
16847
16892
  this.hideBib();
16848
- }
16849
-
16850
- // Force dropdown bib to hide if input value has no matching suggestions
16851
- if ((!this.availableOptions || this.availableOptions.length === 0) && !this.dropdown.isBibFullscreen) {
16893
+ } else if (this.menu.loading) {
16894
+ // if input has value but menu is loading, show bib immediately
16895
+ this.showBib();
16896
+ } else if ((!this.availableOptions || this.availableOptions.length === 0) && !this.dropdown.isBibFullscreen) {
16897
+ // Force dropdown bib to hide if input value has no matching suggestions
16852
16898
  this.hideBib();
16853
16899
  }
16900
+
16901
+ this.dispatchEvent(new CustomEvent('inputValue', { detail: { value: this.inputValue} }));
16854
16902
  }
16855
16903
 
16856
16904
  /**
@@ -17025,7 +17073,7 @@ class AuroCombobox extends AuroElement {
17025
17073
  if (this.value) {
17026
17074
  // If the value got set programmatically make sure we hide the bib
17027
17075
  // when input is not taking the focus (input can be in dropdown.trigger or in bibtemplate)
17028
- if (!this.contains(document.activeElement) && !this.bibtemplate.contains(document.activeElement)) {
17076
+ if (!this.componentHasFocus) {
17029
17077
  this.hideBib();
17030
17078
  }
17031
17079
  } else {
@@ -17050,7 +17098,8 @@ class AuroCombobox extends AuroElement {
17050
17098
  }
17051
17099
 
17052
17100
  if (changedProperties.has('availableOptions')) {
17053
- if (this.availableOptions && this.availableOptions.length > 0 && this.componentHasFocus) {
17101
+ // eslint-disable-next-line no-extra-parens
17102
+ if ((this.availableOptions && this.availableOptions.length > 0 && this.componentHasFocus) || this.menu.loading) {
17054
17103
  this.showBib();
17055
17104
  } else {
17056
17105
  this.hideBib();
@@ -17063,11 +17112,21 @@ class AuroCombobox extends AuroElement {
17063
17112
  }
17064
17113
 
17065
17114
  if (changedProperties.has('shape') && this.menu) {
17066
- this.menu.setAttribute('shape', this.layout === 'classic' ? 'box' : this.shape);
17115
+ switch (this.layout) {
17116
+ case 'classic':
17117
+ this.menu.setAttribute('shape', 'box');
17118
+ break;
17119
+ case 'emphasized':
17120
+ this.menu.setAttribute('shape', 'rounded');
17121
+ break;
17122
+ default:
17123
+ this.menu.setAttribute('shape', this.defaultMenuShape || this.shape);
17124
+ break;
17125
+ }
17067
17126
  }
17068
17127
 
17069
17128
  if (changedProperties.has('size') && this.menu) {
17070
- this.menu.setAttribute('size', this.layout !== 'emphasized' ? 'md' : this.size);
17129
+ this.menu.setAttribute('size', this.layout === 'emphasized' ? 'lg' : 'md');
17071
17130
  }
17072
17131
  }
17073
17132
 
@@ -1,6 +1,7 @@
1
1
  import { css, LitElement, html as html$1 } from 'lit';
2
2
  import { unsafeStatic, literal, html } from 'lit/static-html.js';
3
3
  import { classMap } from 'lit/directives/class-map.js';
4
+ import { createRef, ref } from 'lit/directives/ref.js';
4
5
  import { ifDefined } from 'lit/directives/if-defined.js';
5
6
  import { repeat } from 'lit/directives/repeat.js';
6
7
 
@@ -3852,7 +3853,7 @@ let AuroIcon$2 = class AuroIcon extends BaseIcon$2 {
3852
3853
 
3853
3854
  var iconVersion$2 = '8.1.2';
3854
3855
 
3855
- var styleCss$2$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}`;
3856
+ var styleCss$2$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}:host(:not([isfullscreen])) .container[class*=shape-rounded]{border-radius:16px}.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}`;
3856
3857
 
3857
3858
  var colorCss$2$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)}`;
3858
3859
 
@@ -4055,7 +4056,7 @@ var shapeSizeCss$1 = css`.wrapper{overflow:hidden}.shape-classic-xl,.shape-class
4055
4056
 
4056
4057
  var colorCss$1$2 = 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])) .wrapper:hover{--ds-auro-dropdown-trigger-background-color: var(--ds-auro-dropdown-trigger-hover-background-color)}: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]) .wrapper:hover{--ds-auro-dropdown-trigger-background-color: var(--ds-auro-dropdown-trigger-hover-background-color)}: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)}`;
4057
4058
 
4058
- var styleCss$1$3 = css`:host{position:relative;display:block;text-align:left;transform:translateZ(0)}:host([open]){z-index:var(--depth-tooltip, 400)}:host([open][isbibfullscreen]){position:fixed;top:0;left:0}.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%}`;
4059
+ var styleCss$1$3 = css`:host{position:relative;display:block;text-align:left}[popover=manual]{overflow:visible;padding:0;border:inherit;margin:0;background:inherit;outline:inherit}: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%}`;
4059
4060
 
4060
4061
  var classicColorCss$1 = css``;
4061
4062
 
@@ -4413,6 +4414,9 @@ class AuroDropdown extends AuroElement$4 {
4413
4414
  /** @private */
4414
4415
  this.handleDropdownToggle = this.handleDropdownToggle.bind(this);
4415
4416
 
4417
+ /** @private */
4418
+ this.bibElement = createRef();
4419
+
4416
4420
  this.privateDefaults();
4417
4421
  }
4418
4422
 
@@ -4849,6 +4853,14 @@ class AuroDropdown extends AuroElement$4 {
4849
4853
  if (changedProperties.size === 0 || changedProperties.has('isPopoverVisible')) {
4850
4854
  this.handleTriggerContentSlotChange();
4851
4855
  }
4856
+
4857
+ if (changedProperties.has('isPopoverVisible') && this.bibElement.value) {
4858
+ if (this.isPopoverVisible) {
4859
+ this.bibElement.value.showPopover();
4860
+ } else {
4861
+ this.bibElement.value.hidePopover();
4862
+ }
4863
+ }
4852
4864
  }
4853
4865
 
4854
4866
  /**
@@ -5189,7 +5201,10 @@ class AuroDropdown extends AuroElement$4 {
5189
5201
  id="bib"
5190
5202
  shape="${this.shape}"
5191
5203
  ?data-show="${this.isPopoverVisible}"
5192
- ?isfullscreen="${this.isBibFullscreen}">
5204
+ ?isfullscreen="${this.isBibFullscreen}"
5205
+ ${ref(this.bibElement)}
5206
+ popover="manual"
5207
+ >
5193
5208
  <div class="slotContent">
5194
5209
  <slot @slotchange="${this.handleDefaultSlot}"></slot>
5195
5210
  </div>
@@ -16458,7 +16473,7 @@ class AuroCombobox extends AuroElement {
16458
16473
  if (this.availableOptions.length === 0) {
16459
16474
  if (this.noMatchOption) {
16460
16475
  this.noMatchOption.removeAttribute('hidden');
16461
- } else {
16476
+ } else if (!this.menu.loading || this.isHiddenWhileLoading) {
16462
16477
  this.hideBib();
16463
16478
  }
16464
16479
  } else if (this.noMatchOption) {
@@ -16574,7 +16589,6 @@ class AuroCombobox extends AuroElement {
16574
16589
  this.dropdown.hide();
16575
16590
  return;
16576
16591
  }
16577
-
16578
16592
  if (!this.dropdown.isPopoverVisible && this.input.value && this.input.value.length > 0) {
16579
16593
  if (this.menu.getAttribute('loading') || (this.availableOptions && this.availableOptions.length > 0) || this.noMatchOption !== undefined) { // eslint-disable-line no-extra-parens
16580
16594
  if (this.menu.hasAttribute('loading') && !this.menu.hasLoadingPlaceholder) {
@@ -16586,6 +16600,29 @@ class AuroCombobox extends AuroElement {
16586
16600
  }
16587
16601
  }
16588
16602
 
16603
+ /**
16604
+ * Forces focus to the internal input element and positions the cursor at the end of the text.
16605
+ * This is used when clicking anywhere within the Combobox to ensure the input receives focus
16606
+ * and the cursor is positioned at the end for better user experience.
16607
+ * @private
16608
+ * @returns {void}
16609
+ */
16610
+ forceFocusToInputEnd() {
16611
+ // Set up input ref
16612
+ let inputElement = null;
16613
+
16614
+ if (this.input.shadowRoot) {
16615
+ inputElement = this.input.shadowRoot.querySelector('input');
16616
+ }
16617
+
16618
+ if (inputElement) {
16619
+ // Force focus and set cursor position to end of text to ensure visibility
16620
+ inputElement.focus();
16621
+ const textLength = inputElement.value ? inputElement.value.length : 0;
16622
+ inputElement.setSelectionRange(textLength, textLength);
16623
+ }
16624
+ }
16625
+
16589
16626
  /**
16590
16627
  * Binds all behavior needed to the dropdown after rendering.
16591
16628
  * @private
@@ -16614,6 +16651,9 @@ class AuroCombobox extends AuroElement {
16614
16651
 
16615
16652
  this.dropdown.addEventListener('auroDropdown-triggerClick', () => {
16616
16653
  this.showBib();
16654
+
16655
+ // Fixes Chromium-specific issue where clicking outside input but within Combobox doesn't return focus
16656
+ this.forceFocusToInputEnd();
16617
16657
  });
16618
16658
 
16619
16659
  // setting up bibtemplate
@@ -16676,13 +16716,21 @@ class AuroCombobox extends AuroElement {
16676
16716
  this.menu.setAttribute('size', 'md');
16677
16717
  this.menu.setAttribute('shape', 'box');
16678
16718
  } else {
16679
- // set menu's default size if there it's not specified.
16680
- if (!this.menu.getAttribute('size')) {
16681
- this.menu.setAttribute('size', this.layout !== 'emphasized' ? 'md' : this.size);
16682
- }
16719
+ this.menu.setAttribute('size', this.layout === 'emphasized' ? 'lg' : 'md');
16683
16720
 
16684
- if (!this.getAttribute('shape')) {
16685
- this.menu.setAttribute('shape', this.layout === 'classic' ? 'box' : this.shape);
16721
+ switch (this.layout) {
16722
+ case 'classic':
16723
+ this.menu.setAttribute('shape', 'box');
16724
+ break;
16725
+ case 'emphasized':
16726
+ if (this.dropdown && this.dropdown.bib) {
16727
+ this.dropdown.bib.shape = 'rounded';
16728
+ }
16729
+ this.menu.setAttribute('shape', 'rounded');
16730
+ break;
16731
+ default:
16732
+ this.menu.setAttribute('shape', this.defaultMenuShape || this.shape);
16733
+ break;
16686
16734
  }
16687
16735
  }
16688
16736
  }
@@ -16694,6 +16742,7 @@ class AuroCombobox extends AuroElement {
16694
16742
  */
16695
16743
  configureMenu() {
16696
16744
  this.menu = this.querySelector('auro-menu, [auro-menu]');
16745
+ this.defaultMenuShape = this.menu.getAttribute('shape');
16697
16746
 
16698
16747
  this.menu.value = this.value;
16699
16748
 
@@ -16786,10 +16835,6 @@ class AuroCombobox extends AuroElement {
16786
16835
  this.validate();
16787
16836
  }
16788
16837
  });
16789
-
16790
- this.input.addEventListener('input', () => {
16791
- this.dispatchEvent(new CustomEvent('inputValue', { detail: { value: this.inputValue} }));
16792
- });
16793
16838
  }
16794
16839
 
16795
16840
  /**
@@ -16842,15 +16887,18 @@ class AuroCombobox extends AuroElement {
16842
16887
  this.validate();
16843
16888
  }
16844
16889
 
16845
- // Hide menu if value is empty, otherwise show if there are available suggestions
16846
16890
  if (this.input.value && this.input.value.length === 0) {
16891
+ // Hide menu if value is empty, otherwise show if there are available suggestions
16847
16892
  this.hideBib();
16848
- }
16849
-
16850
- // Force dropdown bib to hide if input value has no matching suggestions
16851
- if ((!this.availableOptions || this.availableOptions.length === 0) && !this.dropdown.isBibFullscreen) {
16893
+ } else if (this.menu.loading) {
16894
+ // if input has value but menu is loading, show bib immediately
16895
+ this.showBib();
16896
+ } else if ((!this.availableOptions || this.availableOptions.length === 0) && !this.dropdown.isBibFullscreen) {
16897
+ // Force dropdown bib to hide if input value has no matching suggestions
16852
16898
  this.hideBib();
16853
16899
  }
16900
+
16901
+ this.dispatchEvent(new CustomEvent('inputValue', { detail: { value: this.inputValue} }));
16854
16902
  }
16855
16903
 
16856
16904
  /**
@@ -17025,7 +17073,7 @@ class AuroCombobox extends AuroElement {
17025
17073
  if (this.value) {
17026
17074
  // If the value got set programmatically make sure we hide the bib
17027
17075
  // when input is not taking the focus (input can be in dropdown.trigger or in bibtemplate)
17028
- if (!this.contains(document.activeElement) && !this.bibtemplate.contains(document.activeElement)) {
17076
+ if (!this.componentHasFocus) {
17029
17077
  this.hideBib();
17030
17078
  }
17031
17079
  } else {
@@ -17050,7 +17098,8 @@ class AuroCombobox extends AuroElement {
17050
17098
  }
17051
17099
 
17052
17100
  if (changedProperties.has('availableOptions')) {
17053
- if (this.availableOptions && this.availableOptions.length > 0 && this.componentHasFocus) {
17101
+ // eslint-disable-next-line no-extra-parens
17102
+ if ((this.availableOptions && this.availableOptions.length > 0 && this.componentHasFocus) || this.menu.loading) {
17054
17103
  this.showBib();
17055
17104
  } else {
17056
17105
  this.hideBib();
@@ -17063,11 +17112,21 @@ class AuroCombobox extends AuroElement {
17063
17112
  }
17064
17113
 
17065
17114
  if (changedProperties.has('shape') && this.menu) {
17066
- this.menu.setAttribute('shape', this.layout === 'classic' ? 'box' : this.shape);
17115
+ switch (this.layout) {
17116
+ case 'classic':
17117
+ this.menu.setAttribute('shape', 'box');
17118
+ break;
17119
+ case 'emphasized':
17120
+ this.menu.setAttribute('shape', 'rounded');
17121
+ break;
17122
+ default:
17123
+ this.menu.setAttribute('shape', this.defaultMenuShape || this.shape);
17124
+ break;
17125
+ }
17067
17126
  }
17068
17127
 
17069
17128
  if (changedProperties.has('size') && this.menu) {
17070
- this.menu.setAttribute('size', this.layout !== 'emphasized' ? 'md' : this.size);
17129
+ this.menu.setAttribute('size', this.layout === 'emphasized' ? 'lg' : 'md');
17071
17130
  }
17072
17131
  }
17073
17132