@proximus/lavender-light 2.0.0-alpha.10 → 2.0.0-alpha.12

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.
@@ -2299,7 +2299,7 @@ class Spacer extends HTMLElement {
2299
2299
  this.isVertical = false;
2300
2300
  }
2301
2301
  static get observedAttributes() {
2302
- return ["grow"];
2302
+ return ["grow", "nogap"];
2303
2303
  }
2304
2304
  attributeChangedCallback(name, oldValue, newValue) {
2305
2305
  if (name === "grow") {
@@ -2313,12 +2313,14 @@ class Spacer extends HTMLElement {
2313
2313
  connectedCallback() {
2314
2314
  this.growValue = this.getAttribute("grow") || `${1}`;
2315
2315
  this.style.flexGrow = this.growValue;
2316
- this.resizeObserver = new ResizeObserver(() => {
2317
- this.handleSizeChange();
2318
- });
2319
- this.isVertical = this.parentElement.localName === "px-vstack" || this.parentElement.style.flexDirection === "column";
2320
- this.resizeObserver.observe(this);
2321
- this.scheduleRecheck();
2316
+ if (this.nogap) {
2317
+ this.resizeObserver = new ResizeObserver(() => {
2318
+ this.handleSizeChange();
2319
+ });
2320
+ this.isVertical = this.parentElement.localName === "px-vstack" || this.parentElement.style.flexDirection === "column";
2321
+ this.resizeObserver.observe(this);
2322
+ this.scheduleRecheck();
2323
+ }
2322
2324
  }
2323
2325
  disconnectedCallback() {
2324
2326
  var _a;
@@ -2369,6 +2371,16 @@ class Spacer extends HTMLElement {
2369
2371
  this.style.flexGrow = this.growValue;
2370
2372
  }
2371
2373
  }
2374
+ get nogap() {
2375
+ return this.hasAttribute("nogap");
2376
+ }
2377
+ set nogap(value) {
2378
+ if (value) {
2379
+ this.setAttribute("nogap", "");
2380
+ } else {
2381
+ this.removeAttribute("nogap");
2382
+ }
2383
+ }
2372
2384
  }
2373
2385
  if (!customElements.get("px-spacer")) {
2374
2386
  customElements.define("px-spacer", Spacer);