@aurodesignsystem-dev/auro-formkit 0.0.0-pr1097.0 → 0.0.0-pr1098.1
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.
- package/components/combobox/demo/api.md +2 -2
- package/components/combobox/demo/api.min.js +118 -74
- package/components/combobox/demo/index.min.js +116 -72
- package/components/combobox/dist/auro-combobox.d.ts +1 -0
- package/components/combobox/dist/index.js +57 -24
- package/components/combobox/dist/registered.js +57 -24
- package/components/counter/demo/api.min.js +99 -67
- package/components/counter/demo/index.min.js +99 -67
- package/components/counter/dist/index.js +18 -3
- package/components/counter/dist/registered.js +18 -3
- package/components/datepicker/demo/api.min.js +197 -171
- package/components/datepicker/demo/index.min.js +197 -171
- package/components/datepicker/dist/index.js +18 -3
- package/components/datepicker/dist/registered.js +18 -3
- package/components/dropdown/demo/api.min.js +48 -16
- package/components/dropdown/demo/index.min.js +48 -16
- package/components/dropdown/dist/auro-dropdown.d.ts +2 -0
- package/components/dropdown/dist/index.js +18 -3
- package/components/dropdown/dist/registered.js +18 -3
- package/components/menu/demo/api.min.js +1 -1
- package/components/menu/demo/index.min.js +1 -1
- package/components/menu/dist/index.js +1 -1
- package/components/menu/dist/registered.js +1 -1
- package/components/select/demo/api.min.js +102 -49
- package/components/select/demo/index.min.js +102 -49
- package/components/select/dist/auro-select.d.ts +2 -0
- package/components/select/dist/index.js +46 -10
- package/components/select/dist/registered.js +46 -10
- package/package.json +1 -1
|
@@ -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;
|
|
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) {
|
|
@@ -16676,13 +16690,21 @@ class AuroCombobox extends AuroElement {
|
|
|
16676
16690
|
this.menu.setAttribute('size', 'md');
|
|
16677
16691
|
this.menu.setAttribute('shape', 'box');
|
|
16678
16692
|
} else {
|
|
16679
|
-
|
|
16680
|
-
if (!this.menu.getAttribute('size')) {
|
|
16681
|
-
this.menu.setAttribute('size', this.layout !== 'emphasized' ? 'md' : this.size);
|
|
16682
|
-
}
|
|
16693
|
+
this.menu.setAttribute('size', this.layout === 'emphasized' ? 'lg' : 'md');
|
|
16683
16694
|
|
|
16684
|
-
|
|
16685
|
-
|
|
16695
|
+
switch (this.layout) {
|
|
16696
|
+
case 'classic':
|
|
16697
|
+
this.menu.setAttribute('shape', 'box');
|
|
16698
|
+
break;
|
|
16699
|
+
case 'emphasized':
|
|
16700
|
+
if (this.dropdown && this.dropdown.bib) {
|
|
16701
|
+
this.dropdown.bib.shape = 'rounded';
|
|
16702
|
+
}
|
|
16703
|
+
this.menu.setAttribute('shape', 'rounded');
|
|
16704
|
+
break;
|
|
16705
|
+
default:
|
|
16706
|
+
this.menu.setAttribute('shape', this.defaultMenuShape || this.shape);
|
|
16707
|
+
break;
|
|
16686
16708
|
}
|
|
16687
16709
|
}
|
|
16688
16710
|
}
|
|
@@ -16694,6 +16716,7 @@ class AuroCombobox extends AuroElement {
|
|
|
16694
16716
|
*/
|
|
16695
16717
|
configureMenu() {
|
|
16696
16718
|
this.menu = this.querySelector('auro-menu, [auro-menu]');
|
|
16719
|
+
this.defaultMenuShape = this.menu.getAttribute('shape');
|
|
16697
16720
|
|
|
16698
16721
|
this.menu.value = this.value;
|
|
16699
16722
|
|
|
@@ -16786,10 +16809,6 @@ class AuroCombobox extends AuroElement {
|
|
|
16786
16809
|
this.validate();
|
|
16787
16810
|
}
|
|
16788
16811
|
});
|
|
16789
|
-
|
|
16790
|
-
this.input.addEventListener('input', () => {
|
|
16791
|
-
this.dispatchEvent(new CustomEvent('inputValue', { detail: { value: this.inputValue} }));
|
|
16792
|
-
});
|
|
16793
16812
|
}
|
|
16794
16813
|
|
|
16795
16814
|
/**
|
|
@@ -16842,15 +16861,18 @@ class AuroCombobox extends AuroElement {
|
|
|
16842
16861
|
this.validate();
|
|
16843
16862
|
}
|
|
16844
16863
|
|
|
16845
|
-
// Hide menu if value is empty, otherwise show if there are available suggestions
|
|
16846
16864
|
if (this.input.value && this.input.value.length === 0) {
|
|
16865
|
+
// Hide menu if value is empty, otherwise show if there are available suggestions
|
|
16847
16866
|
this.hideBib();
|
|
16848
|
-
}
|
|
16849
|
-
|
|
16850
|
-
|
|
16851
|
-
if ((!this.availableOptions || this.availableOptions.length === 0) && !this.dropdown.isBibFullscreen) {
|
|
16867
|
+
} else if (this.menu.loading) {
|
|
16868
|
+
// if input has value but menu is loading, show bib immediately
|
|
16869
|
+
this.showBib();
|
|
16870
|
+
} else if ((!this.availableOptions || this.availableOptions.length === 0) && !this.dropdown.isBibFullscreen) {
|
|
16871
|
+
// Force dropdown bib to hide if input value has no matching suggestions
|
|
16852
16872
|
this.hideBib();
|
|
16853
16873
|
}
|
|
16874
|
+
|
|
16875
|
+
this.dispatchEvent(new CustomEvent('inputValue', { detail: { value: this.inputValue} }));
|
|
16854
16876
|
}
|
|
16855
16877
|
|
|
16856
16878
|
/**
|
|
@@ -17025,7 +17047,7 @@ class AuroCombobox extends AuroElement {
|
|
|
17025
17047
|
if (this.value) {
|
|
17026
17048
|
// If the value got set programmatically make sure we hide the bib
|
|
17027
17049
|
// when input is not taking the focus (input can be in dropdown.trigger or in bibtemplate)
|
|
17028
|
-
if (!this.
|
|
17050
|
+
if (!this.componentHasFocus) {
|
|
17029
17051
|
this.hideBib();
|
|
17030
17052
|
}
|
|
17031
17053
|
} else {
|
|
@@ -17050,7 +17072,8 @@ class AuroCombobox extends AuroElement {
|
|
|
17050
17072
|
}
|
|
17051
17073
|
|
|
17052
17074
|
if (changedProperties.has('availableOptions')) {
|
|
17053
|
-
|
|
17075
|
+
// eslint-disable-next-line no-extra-parens
|
|
17076
|
+
if ((this.availableOptions && this.availableOptions.length > 0 && this.componentHasFocus) || this.menu.loading) {
|
|
17054
17077
|
this.showBib();
|
|
17055
17078
|
} else {
|
|
17056
17079
|
this.hideBib();
|
|
@@ -17063,11 +17086,21 @@ class AuroCombobox extends AuroElement {
|
|
|
17063
17086
|
}
|
|
17064
17087
|
|
|
17065
17088
|
if (changedProperties.has('shape') && this.menu) {
|
|
17066
|
-
|
|
17089
|
+
switch (this.layout) {
|
|
17090
|
+
case 'classic':
|
|
17091
|
+
this.menu.setAttribute('shape', 'box');
|
|
17092
|
+
break;
|
|
17093
|
+
case 'emphasized':
|
|
17094
|
+
this.menu.setAttribute('shape', 'rounded');
|
|
17095
|
+
break;
|
|
17096
|
+
default:
|
|
17097
|
+
this.menu.setAttribute('shape', this.defaultMenuShape || this.shape);
|
|
17098
|
+
break;
|
|
17099
|
+
}
|
|
17067
17100
|
}
|
|
17068
17101
|
|
|
17069
17102
|
if (changedProperties.has('size') && this.menu) {
|
|
17070
|
-
this.menu.setAttribute('size', this.layout
|
|
17103
|
+
this.menu.setAttribute('size', this.layout === 'emphasized' ? 'lg' : 'md');
|
|
17071
17104
|
}
|
|
17072
17105
|
}
|
|
17073
17106
|
|
|
@@ -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;
|
|
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) {
|
|
@@ -16676,13 +16690,21 @@ class AuroCombobox extends AuroElement {
|
|
|
16676
16690
|
this.menu.setAttribute('size', 'md');
|
|
16677
16691
|
this.menu.setAttribute('shape', 'box');
|
|
16678
16692
|
} else {
|
|
16679
|
-
|
|
16680
|
-
if (!this.menu.getAttribute('size')) {
|
|
16681
|
-
this.menu.setAttribute('size', this.layout !== 'emphasized' ? 'md' : this.size);
|
|
16682
|
-
}
|
|
16693
|
+
this.menu.setAttribute('size', this.layout === 'emphasized' ? 'lg' : 'md');
|
|
16683
16694
|
|
|
16684
|
-
|
|
16685
|
-
|
|
16695
|
+
switch (this.layout) {
|
|
16696
|
+
case 'classic':
|
|
16697
|
+
this.menu.setAttribute('shape', 'box');
|
|
16698
|
+
break;
|
|
16699
|
+
case 'emphasized':
|
|
16700
|
+
if (this.dropdown && this.dropdown.bib) {
|
|
16701
|
+
this.dropdown.bib.shape = 'rounded';
|
|
16702
|
+
}
|
|
16703
|
+
this.menu.setAttribute('shape', 'rounded');
|
|
16704
|
+
break;
|
|
16705
|
+
default:
|
|
16706
|
+
this.menu.setAttribute('shape', this.defaultMenuShape || this.shape);
|
|
16707
|
+
break;
|
|
16686
16708
|
}
|
|
16687
16709
|
}
|
|
16688
16710
|
}
|
|
@@ -16694,6 +16716,7 @@ class AuroCombobox extends AuroElement {
|
|
|
16694
16716
|
*/
|
|
16695
16717
|
configureMenu() {
|
|
16696
16718
|
this.menu = this.querySelector('auro-menu, [auro-menu]');
|
|
16719
|
+
this.defaultMenuShape = this.menu.getAttribute('shape');
|
|
16697
16720
|
|
|
16698
16721
|
this.menu.value = this.value;
|
|
16699
16722
|
|
|
@@ -16786,10 +16809,6 @@ class AuroCombobox extends AuroElement {
|
|
|
16786
16809
|
this.validate();
|
|
16787
16810
|
}
|
|
16788
16811
|
});
|
|
16789
|
-
|
|
16790
|
-
this.input.addEventListener('input', () => {
|
|
16791
|
-
this.dispatchEvent(new CustomEvent('inputValue', { detail: { value: this.inputValue} }));
|
|
16792
|
-
});
|
|
16793
16812
|
}
|
|
16794
16813
|
|
|
16795
16814
|
/**
|
|
@@ -16842,15 +16861,18 @@ class AuroCombobox extends AuroElement {
|
|
|
16842
16861
|
this.validate();
|
|
16843
16862
|
}
|
|
16844
16863
|
|
|
16845
|
-
// Hide menu if value is empty, otherwise show if there are available suggestions
|
|
16846
16864
|
if (this.input.value && this.input.value.length === 0) {
|
|
16865
|
+
// Hide menu if value is empty, otherwise show if there are available suggestions
|
|
16847
16866
|
this.hideBib();
|
|
16848
|
-
}
|
|
16849
|
-
|
|
16850
|
-
|
|
16851
|
-
if ((!this.availableOptions || this.availableOptions.length === 0) && !this.dropdown.isBibFullscreen) {
|
|
16867
|
+
} else if (this.menu.loading) {
|
|
16868
|
+
// if input has value but menu is loading, show bib immediately
|
|
16869
|
+
this.showBib();
|
|
16870
|
+
} else if ((!this.availableOptions || this.availableOptions.length === 0) && !this.dropdown.isBibFullscreen) {
|
|
16871
|
+
// Force dropdown bib to hide if input value has no matching suggestions
|
|
16852
16872
|
this.hideBib();
|
|
16853
16873
|
}
|
|
16874
|
+
|
|
16875
|
+
this.dispatchEvent(new CustomEvent('inputValue', { detail: { value: this.inputValue} }));
|
|
16854
16876
|
}
|
|
16855
16877
|
|
|
16856
16878
|
/**
|
|
@@ -17025,7 +17047,7 @@ class AuroCombobox extends AuroElement {
|
|
|
17025
17047
|
if (this.value) {
|
|
17026
17048
|
// If the value got set programmatically make sure we hide the bib
|
|
17027
17049
|
// when input is not taking the focus (input can be in dropdown.trigger or in bibtemplate)
|
|
17028
|
-
if (!this.
|
|
17050
|
+
if (!this.componentHasFocus) {
|
|
17029
17051
|
this.hideBib();
|
|
17030
17052
|
}
|
|
17031
17053
|
} else {
|
|
@@ -17050,7 +17072,8 @@ class AuroCombobox extends AuroElement {
|
|
|
17050
17072
|
}
|
|
17051
17073
|
|
|
17052
17074
|
if (changedProperties.has('availableOptions')) {
|
|
17053
|
-
|
|
17075
|
+
// eslint-disable-next-line no-extra-parens
|
|
17076
|
+
if ((this.availableOptions && this.availableOptions.length > 0 && this.componentHasFocus) || this.menu.loading) {
|
|
17054
17077
|
this.showBib();
|
|
17055
17078
|
} else {
|
|
17056
17079
|
this.hideBib();
|
|
@@ -17063,11 +17086,21 @@ class AuroCombobox extends AuroElement {
|
|
|
17063
17086
|
}
|
|
17064
17087
|
|
|
17065
17088
|
if (changedProperties.has('shape') && this.menu) {
|
|
17066
|
-
|
|
17089
|
+
switch (this.layout) {
|
|
17090
|
+
case 'classic':
|
|
17091
|
+
this.menu.setAttribute('shape', 'box');
|
|
17092
|
+
break;
|
|
17093
|
+
case 'emphasized':
|
|
17094
|
+
this.menu.setAttribute('shape', 'rounded');
|
|
17095
|
+
break;
|
|
17096
|
+
default:
|
|
17097
|
+
this.menu.setAttribute('shape', this.defaultMenuShape || this.shape);
|
|
17098
|
+
break;
|
|
17099
|
+
}
|
|
17067
17100
|
}
|
|
17068
17101
|
|
|
17069
17102
|
if (changedProperties.has('size') && this.menu) {
|
|
17070
|
-
this.menu.setAttribute('size', this.layout
|
|
17103
|
+
this.menu.setAttribute('size', this.layout === 'emphasized' ? 'lg' : 'md');
|
|
17071
17104
|
}
|
|
17072
17105
|
}
|
|
17073
17106
|
|