@proximus/lavender 1.4.10-alpha.13 → 1.4.10-alpha.14
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/dist/lavender.cjs.js +1 -1
- package/dist/lavender.es.js +22 -8
- package/dist/lavender.umd.js +1 -1
- package/package.json +1 -1
package/dist/lavender.es.js
CHANGED
|
@@ -17749,10 +17749,10 @@ if (!customElements.get("px-typography")) {
|
|
|
17749
17749
|
const styles$1 = ":host .dropdown-content{background-color:var(--px-color-background-surface-default);border-radius:var(--px-radius-main);box-shadow:0 4px 6px -1px #25252514;overflow:hidden}:host([inverted]) .dropdown-content{background-color:var(--px-color-background-surface-dark)}";
|
|
17750
17750
|
const styleSheet$2 = new CSSStyleSheet();
|
|
17751
17751
|
styleSheet$2.replaceSync(styles$1);
|
|
17752
|
-
const _Autocomplete = class _Autocomplete extends
|
|
17752
|
+
const _Autocomplete = class _Autocomplete extends WithExtraAttributes {
|
|
17753
17753
|
constructor() {
|
|
17754
17754
|
var _a;
|
|
17755
|
-
super();
|
|
17755
|
+
super(styleSheet$2);
|
|
17756
17756
|
__privateAdd(this, _Autocomplete_instances);
|
|
17757
17757
|
__privateAdd(this, _controlId);
|
|
17758
17758
|
__privateAdd(this, _onKeyDown);
|
|
@@ -17793,8 +17793,10 @@ const _Autocomplete = class _Autocomplete extends HTMLElement {
|
|
|
17793
17793
|
options[nextIndex].focus();
|
|
17794
17794
|
});
|
|
17795
17795
|
__privateSet(this, _onInput, () => {
|
|
17796
|
+
var _a2;
|
|
17796
17797
|
if (this.$input.value) {
|
|
17797
17798
|
this.$input.$el.setAttribute("aria-expanded", "true");
|
|
17799
|
+
this.$dropDownContent.style.width = `${(_a2 = this.$input.shadowRoot.querySelector("input")) == null ? void 0 : _a2.offsetWidth}px`;
|
|
17798
17800
|
this.$dropDown.showPopover();
|
|
17799
17801
|
} else {
|
|
17800
17802
|
this.$input.$el.setAttribute("aria-expanded", "false");
|
|
@@ -17803,13 +17805,12 @@ const _Autocomplete = class _Autocomplete extends HTMLElement {
|
|
|
17803
17805
|
}
|
|
17804
17806
|
__privateMethod(this, _Autocomplete_instances, updateFormValue_fn).call(this);
|
|
17805
17807
|
});
|
|
17806
|
-
this.attachShadow({ mode: "open" });
|
|
17807
17808
|
this.shadowRoot.innerHTML = this.template();
|
|
17808
|
-
this.shadowRoot.adoptedStyleSheets = [styleSheet$2];
|
|
17809
17809
|
this.internals = (_a = this.attachInternals) == null ? void 0 : _a.call(this);
|
|
17810
17810
|
}
|
|
17811
17811
|
static get observedAttributes() {
|
|
17812
17812
|
return [
|
|
17813
|
+
...super.observedAttributes,
|
|
17813
17814
|
"size",
|
|
17814
17815
|
"state",
|
|
17815
17816
|
"extended",
|
|
@@ -17820,10 +17821,23 @@ const _Autocomplete = class _Autocomplete extends HTMLElement {
|
|
|
17820
17821
|
];
|
|
17821
17822
|
}
|
|
17822
17823
|
attributeChangedCallback(name, oldValue, newValue) {
|
|
17823
|
-
|
|
17824
|
-
|
|
17825
|
-
|
|
17826
|
-
|
|
17824
|
+
switch (name) {
|
|
17825
|
+
case "size":
|
|
17826
|
+
case "state":
|
|
17827
|
+
case "extended":
|
|
17828
|
+
case "extended--mobile":
|
|
17829
|
+
case "extended--tablet":
|
|
17830
|
+
case "extended--laptop":
|
|
17831
|
+
case "extended--desktop":
|
|
17832
|
+
if (newValue !== null) {
|
|
17833
|
+
this.$input.setAttribute(name, newValue);
|
|
17834
|
+
} else {
|
|
17835
|
+
this.$input.removeAttribute(name);
|
|
17836
|
+
}
|
|
17837
|
+
break;
|
|
17838
|
+
default:
|
|
17839
|
+
super.attributeChangedCallback(name, oldValue, newValue);
|
|
17840
|
+
break;
|
|
17827
17841
|
}
|
|
17828
17842
|
}
|
|
17829
17843
|
connectedCallback() {
|