@proximus/lavender 2.0.0-alpha.102 → 2.0.0-alpha.103

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.
@@ -17766,10 +17766,10 @@ if (!customElements.get("px-typography")) {
17766
17766
  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)}";
17767
17767
  const styleSheet$2 = new CSSStyleSheet();
17768
17768
  styleSheet$2.replaceSync(styles$1);
17769
- const _Autocomplete = class _Autocomplete extends HTMLElement {
17769
+ const _Autocomplete = class _Autocomplete extends WithExtraAttributes {
17770
17770
  constructor() {
17771
17771
  var _a;
17772
- super();
17772
+ super(styleSheet$2);
17773
17773
  __privateAdd(this, _Autocomplete_instances);
17774
17774
  __privateAdd(this, _controlId);
17775
17775
  __privateAdd(this, _onKeyDown);
@@ -17810,8 +17810,10 @@ const _Autocomplete = class _Autocomplete extends HTMLElement {
17810
17810
  options[nextIndex].focus();
17811
17811
  });
17812
17812
  __privateSet(this, _onInput, () => {
17813
+ var _a2;
17813
17814
  if (this.$input.value) {
17814
17815
  this.$input.$el.setAttribute("aria-expanded", "true");
17816
+ this.$dropDownContent.style.width = `${(_a2 = this.$input.shadowRoot.querySelector("input")) == null ? void 0 : _a2.offsetWidth}px`;
17815
17817
  this.$dropDown.showPopover();
17816
17818
  } else {
17817
17819
  this.$input.$el.setAttribute("aria-expanded", "false");
@@ -17820,13 +17822,12 @@ const _Autocomplete = class _Autocomplete extends HTMLElement {
17820
17822
  }
17821
17823
  __privateMethod(this, _Autocomplete_instances, updateFormValue_fn).call(this);
17822
17824
  });
17823
- this.attachShadow({ mode: "open" });
17824
17825
  this.shadowRoot.innerHTML = this.template();
17825
- this.shadowRoot.adoptedStyleSheets = [styleSheet$2];
17826
17826
  this.internals = (_a = this.attachInternals) == null ? void 0 : _a.call(this);
17827
17827
  }
17828
17828
  static get observedAttributes() {
17829
17829
  return [
17830
+ ...super.observedAttributes,
17830
17831
  "size",
17831
17832
  "state",
17832
17833
  "extended",
@@ -17837,10 +17838,23 @@ const _Autocomplete = class _Autocomplete extends HTMLElement {
17837
17838
  ];
17838
17839
  }
17839
17840
  attributeChangedCallback(name, oldValue, newValue) {
17840
- if (newValue !== null) {
17841
- this.$input.setAttribute(name, newValue);
17842
- } else {
17843
- this.$input.removeAttribute(name);
17841
+ switch (name) {
17842
+ case "size":
17843
+ case "state":
17844
+ case "extended":
17845
+ case "extended--mobile":
17846
+ case "extended--tablet":
17847
+ case "extended--laptop":
17848
+ case "extended--desktop":
17849
+ if (newValue !== null) {
17850
+ this.$input.setAttribute(name, newValue);
17851
+ } else {
17852
+ this.$input.removeAttribute(name);
17853
+ }
17854
+ break;
17855
+ default:
17856
+ super.attributeChangedCallback(name, oldValue, newValue);
17857
+ break;
17844
17858
  }
17845
17859
  }
17846
17860
  connectedCallback() {