@proximus/lavender-content-header 1.4.3-alpha.8 → 1.4.3-beta.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.
Files changed (2) hide show
  1. package/dist/index.es.js +20 -14
  2. package/package.json +2 -2
package/dist/index.es.js CHANGED
@@ -1881,14 +1881,9 @@ const x = class x extends S {
1881
1881
  <px-h1 variant="title-3xl"><slot></slot></px-h1>
1882
1882
  <slot name="subtitle"></slot>
1883
1883
  </px-vstack>
1884
- ${this.$patchDescriptionSlot ? `<px-stack gap="s" direction="row" direction--mobile="column">
1885
- <slot name="patch" shrink></slot>
1886
- <slot name="patch-description"></slot>
1887
- </px-stack>` : ""}
1888
1884
  </div>
1889
1885
  </px-container>
1890
1886
  </px-grid>
1891
- ${this.$overlapSlot ? '<slot name="overlap" slot="overlap"></slot>' : ""}
1892
1887
  </px-section>
1893
1888
  </div>`, this.shadowRoot.innerHTML = this.template();
1894
1889
  }
@@ -1913,7 +1908,18 @@ const x = class x extends S {
1913
1908
  ];
1914
1909
  }
1915
1910
  connectedCallback() {
1916
- this.$subtitleSlot && this.$subtitleSlot.setAttribute("variant", "subtitle"), this.$patchDescriptionSlot && (this.$patchDescriptionSlot.localName === "px-p" && this.$patchDescriptionSlot.setAttribute("variant", "default"), (this.$patchDescriptionSlot.localName === "px-p" || this.$patchDescriptionSlot.localName === "px-span") && (this.$patchDescriptionSlot.setAttribute("font-size", "body-l"), this.$patchDescriptionSlot.removeAttribute("font-weight"), this.$patchDescriptionSlot.removeAttribute("color")), this.$patchDescriptionSlot.localName === "px-price" && this.$patchDescriptionSlot.setAttribute("size", "m")), this.createGridding();
1911
+ this.$patchDescriptionSlot && this.shadowRoot.querySelector(
1912
+ ".content-header-content"
1913
+ ).insertAdjacentHTML(
1914
+ "beforeend",
1915
+ `<px-stack gap="s" direction="row" direction--mobile="column">
1916
+ <slot name="patch" shrink></slot>
1917
+ <slot name="patch-description"></slot>
1918
+ </px-stack>`
1919
+ ), this.$overlapSlot && this.shadowRoot.querySelector("px-section").insertAdjacentHTML(
1920
+ "beforeend",
1921
+ '<slot name="overlap" slot="overlap"></slot>'
1922
+ ), this.$subtitleSlot && this.$subtitleSlot.setAttribute("variant", "subtitle"), this.$patchDescriptionSlot && (this.$patchDescriptionSlot.localName === "px-p" && this.$patchDescriptionSlot.setAttribute("variant", "default"), (this.$patchDescriptionSlot.localName === "px-p" || this.$patchDescriptionSlot.localName === "px-span") && (this.$patchDescriptionSlot.setAttribute("font-size", "body-l"), this.$patchDescriptionSlot.removeAttribute("font-weight"), this.$patchDescriptionSlot.removeAttribute("color")), this.$patchDescriptionSlot.localName === "px-price" && this.$patchDescriptionSlot.setAttribute("size", "m")), this.createGridding();
1917
1923
  }
1918
1924
  attributeChangedCallback(t, i, e) {
1919
1925
  if (i !== e)
@@ -1960,29 +1966,29 @@ const x = class x extends S {
1960
1966
  }
1961
1967
  createGridding(t) {
1962
1968
  const i = [
1963
- { prop: "hasGridding", gridAttr: "grid-cols", attr: "col-span" },
1969
+ { prop: "hasGridding", gridProp: "gridCols", attr: "col-span" },
1964
1970
  {
1965
1971
  prop: "hasGriddingMobile",
1966
- gridAttr: "grid-cols--mobile",
1972
+ gridProp: "gridColsMobile",
1967
1973
  attr: "col-span--mobile"
1968
1974
  },
1969
1975
  {
1970
1976
  prop: "hasGriddingTablet",
1971
- gridAttr: "grid-cols--tablet",
1977
+ gridProp: "gridColsTablet",
1972
1978
  attr: "col-span--tablet"
1973
1979
  },
1974
1980
  {
1975
1981
  prop: "hasGriddingLaptop",
1976
- gridAttr: "grid-cols--laptop",
1982
+ gridProp: "gridColsLaptop",
1977
1983
  attr: "col-span--laptop"
1978
1984
  }
1979
1985
  ], e = this.shadowRoot.querySelector(
1980
1986
  "px-grid > px-container"
1981
1987
  );
1982
- t !== null ? i.forEach(({ prop: o, gridAttr: r, attr: a }) => {
1983
- this[o] && (this.$grid.setAttribute(r, "3"), e == null || e.setAttribute(a, "2"));
1984
- }) : i.forEach(({ gridAttr: o, attr: r }) => {
1985
- this.$grid.setAttribute(o, "1"), e == null || e.setAttribute(r, "1");
1988
+ t !== null ? i.forEach(({ prop: o, gridProp: r, attr: a }) => {
1989
+ this[o] && (this.$grid[r] = "3", e.setAttribute(a, "2"));
1990
+ }) : i.forEach(({ gridProp: o, attr: r }) => {
1991
+ this.$grid[o] = "1", e.removeAttribute(r);
1986
1992
  });
1987
1993
  }
1988
1994
  get $grid() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proximus/lavender-content-header",
3
- "version": "1.4.3-alpha.8",
3
+ "version": "1.4.3-beta.1",
4
4
  "description": "",
5
5
  "main": "dist/index.es.js",
6
6
  "types": "dist/index.d.ts",
@@ -13,7 +13,7 @@
13
13
  "clean": "rm -rf dist",
14
14
  "build": "npm run clean && NODE_ENV=development vite build && tsc && npm run transform-package-json && npm run wc-manifest",
15
15
  "test": "vitest run --coverage",
16
- "wc-manifest": "cem analyze --globs \"src/*\" --config ../custom-elements-manifest.config.js --outdir dist"
16
+ "wc-manifest": "cem analyze --globs \"src/*\" --config ../../custom-elements-manifest.config.js --outdir dist"
17
17
  },
18
18
  "publishConfig": {
19
19
  "access": "public"