@proximus/lavender 1.4.10-alpha.13 → 1.4.10-alpha.15

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.
@@ -11070,7 +11070,6 @@ class HeaderItem extends WithExtraAttributes {
11070
11070
  this.shadowRoot.innerHTML = this.template();
11071
11071
  this.shadowRoot.adoptedStyleSheets = [stylesheet$7];
11072
11072
  this.internals = (_a = this.attachInternals) == null ? void 0 : _a.call(this);
11073
- this.role = "listitem";
11074
11073
  if (this.internals) {
11075
11074
  this.internals.role = "listitem";
11076
11075
  }
@@ -11079,6 +11078,7 @@ class HeaderItem extends WithExtraAttributes {
11079
11078
  return ["for", "href", "current"];
11080
11079
  }
11081
11080
  connectedCallback() {
11081
+ this.role = "listitem";
11082
11082
  this.setAttribute("slot", "header-entries");
11083
11083
  if (this.$button) {
11084
11084
  this.setupButtonA11y();
@@ -11229,12 +11229,12 @@ class Header extends WithExtraAttributes {
11229
11229
  });
11230
11230
  this.shadowRoot.innerHTML = this.template;
11231
11231
  this.internals = (_a = this.attachInternals) == null ? void 0 : _a.call(this);
11232
- this.role = "navigation";
11233
11232
  if (this.internals) {
11234
11233
  this.internals.role = "navigation";
11235
11234
  }
11236
11235
  }
11237
11236
  connectedCallback() {
11237
+ this.role = "navigation";
11238
11238
  this.addEventListener("click", (event) => {
11239
11239
  const targetElement = event.target.closest(
11240
11240
  "px-header-item"
@@ -12683,7 +12683,6 @@ class MegaDropDown extends HTMLElement {
12683
12683
  this.shadowRoot.innerHTML = this.template;
12684
12684
  this.shadowRoot.adoptedStyleSheets = [stylesheet$3];
12685
12685
  this.internals = (_a = this.attachInternals) == null ? void 0 : _a.call(this);
12686
- this.role = "menu";
12687
12686
  if (this.internals) {
12688
12687
  this.internals.role = "menu";
12689
12688
  }
@@ -12693,6 +12692,7 @@ class MegaDropDown extends HTMLElement {
12693
12692
  }
12694
12693
  connectedCallback() {
12695
12694
  var _a, _b;
12695
+ this.role = "menu";
12696
12696
  if (this.querySelectorAll("px-mdd-section").length === 0) {
12697
12697
  throw new Error("HeaderPanel must contain at least one MenuSection");
12698
12698
  }
@@ -12962,7 +12962,6 @@ class MddSectionItem extends HTMLElement {
12962
12962
  this.attachShadow({ mode: "open" });
12963
12963
  this.shadowRoot.adoptedStyleSheets = [stylesheet$1];
12964
12964
  this.internals = (_a = this.attachInternals) == null ? void 0 : _a.call(this);
12965
- this.role = "listitem";
12966
12965
  if (this.internals) {
12967
12966
  this.internals.role = "listitem";
12968
12967
  }
@@ -12987,6 +12986,7 @@ class MddSectionItem extends HTMLElement {
12987
12986
  }
12988
12987
  }
12989
12988
  connectedCallback() {
12989
+ this.role = "listitem";
12990
12990
  if (this.hasAttribute("href")) {
12991
12991
  this.updateView("href", this.href);
12992
12992
  this.$link.href = this.href;
@@ -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 HTMLElement {
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
- if (newValue !== null) {
17824
- this.$input.setAttribute(name, newValue);
17825
- } else {
17826
- this.$input.removeAttribute(name);
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() {