@proximus/lavender-content-header 2.0.0-alpha.230 → 2.0.0-alpha.231

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.
@@ -30,6 +30,8 @@ export declare class ContentHeader extends PxElement<HTMLDivElement> {
30
30
  get $children(): NodeListOf<Element>;
31
31
  get backgroundColor(): string | null;
32
32
  set backgroundColor(value: string | null);
33
+ get backgroundGradient(): string | null;
34
+ set backgroundGradient(value: string | null);
33
35
  get gradient(): string | null;
34
36
  set gradient(value: string | null);
35
37
  get backgroundImage(): string | null;
@@ -106,6 +106,10 @@
106
106
  "kind": "field",
107
107
  "name": "backgroundColor"
108
108
  },
109
+ {
110
+ "kind": "field",
111
+ "name": "backgroundGradient"
112
+ },
109
113
  {
110
114
  "kind": "field",
111
115
  "name": "gradient"
package/dist/index.es.js CHANGED
@@ -169,12 +169,8 @@ var w = [
169
169
  this.$el.style.setProperty(`--${e}`, `url("${t}")`);
170
170
  }
171
171
  updateGradient(e, t) {
172
- if (this.checkName(m, t)) {
173
- let n = this.splitAttrNameFromBreakpoint(e);
174
- e = n.attrName;
175
- let r = n.breakpoint;
176
- this.$el.style.setProperty(`--${e}${r}`, `linear-gradient(var(--px-color-background-gradient-${t}))`);
177
- } else h(`"${t}" is not a valid ${e} value for ${this.tagName.toLowerCase()}. Allowed values are: "${m.join("\", \"")}".`);
172
+ let { attrName: n, breakpoint: r } = this.splitAttrNameFromBreakpoint(e), i = `--${n}${r}`;
173
+ t === null ? this.$el.style.removeProperty(i) : this.checkName(m, t) ? this.$el.style.setProperty(i, `linear-gradient(var(--px-color-background-gradient-${t}))`) : h(`"${t}" is not a valid ${e} value for ${this.tagName.toLowerCase()}. Allowed values are: "${m.join("\", \"")}".`);
178
174
  }
179
175
  updateBackgroundColor(e, t) {
180
176
  let n = t.startsWith("surface-");
@@ -1932,7 +1928,7 @@ var Q = new CSSStyleSheet();
1932
1928
  Q.replaceSync(b);
1933
1929
  var $ = class e extends t {
1934
1930
  static {
1935
- this.template = d("<div class=\"content-header\"><div class=\"contrast-helper\"></div><px-section padding-block=\"l\"><px-grid gap=\"none\"><px-container padding=\"none\" border-radius=\"none\" background-color=\"none\" ><div class=\"content-header-content\"><px-vstack gap=\"heading-to-subtitle\"><px-h1><slot></slot></px-h1><slot name=\"subtitle\"></slot></px-vstack><px-stack gap=\"s\" direction=\"row\" direction--mobile=\"column\"><slot name=\"patch\" shrink></slot><slot name=\"patch-description\"></slot></px-stack></div></px-container></px-grid><slot name=\"overlap\" slot=\"overlap\"></slot></px-section></div>");
1931
+ this.template = d("<div class=\"content-header\"><div class=\"contrast-helper\"></div><px-section padding-block=\"l\"><px-grid gap=\"none\"><px-container padding=\"none\" border-radius=\"none\" background-color=\"none\"><div class=\"content-header-content\"><px-vstack gap=\"heading-to-subtitle\"><px-h1><slot></slot></px-h1><slot name=\"subtitle\"></slot></px-vstack><px-stack gap=\"s\" direction=\"row\" direction--mobile=\"column\"><slot name=\"patch\" shrink></slot><slot name=\"patch-description\"></slot></px-stack></div></px-container></px-grid><slot name=\"overlap\" slot=\"overlap\"></slot></px-section></div>");
1936
1932
  }
1937
1933
  static {
1938
1934
  this.nativeName = "div";
@@ -1979,7 +1975,7 @@ var $ = class e extends t {
1979
1975
  this.$section.backgroundColor = r.indexOf(n) > 0 ? n : "none";
1980
1976
  break;
1981
1977
  case "background-gradient":
1982
- this.$section.gradient = m.indexOf(n) > 0 ? n : "none";
1978
+ this.$section.gradient = n === null ? null : m.indexOf(n) > 0 ? n : "none";
1983
1979
  break;
1984
1980
  case "background-image":
1985
1981
  this.$section.backgroundImage = n;
@@ -2089,12 +2085,18 @@ var $ = class e extends t {
2089
2085
  set backgroundColor(e) {
2090
2086
  this._updateAttribute("background-color", e);
2091
2087
  }
2092
- get gradient() {
2088
+ get backgroundGradient() {
2093
2089
  return this.getAttribute("background-gradient");
2094
2090
  }
2095
- set gradient(e) {
2091
+ set backgroundGradient(e) {
2096
2092
  this._updateAttribute("background-gradient", e);
2097
2093
  }
2094
+ get gradient() {
2095
+ return this.backgroundGradient;
2096
+ }
2097
+ set gradient(e) {
2098
+ this.backgroundGradient = e;
2099
+ }
2098
2100
  get backgroundImage() {
2099
2101
  return this.getAttribute("background-image");
2100
2102
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
3
3
  "name": "@proximus/lavender-content-header",
4
- "version": "2.0.0-alpha.230",
4
+ "version": "2.0.0-alpha.231",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -57,6 +57,7 @@
57
57
  { "name": "$overlapSlot" },
58
58
  { "name": "$children" },
59
59
  { "name": "backgroundColor" },
60
+ { "name": "backgroundGradient" },
60
61
  { "name": "gradient" },
61
62
  { "name": "backgroundImage" },
62
63
  { "name": "backgroundImageMobile" },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proximus/lavender-content-header",
3
- "version": "2.0.0-alpha.230",
3
+ "version": "2.0.0-alpha.231",
4
4
  "description": "",
5
5
  "main": "dist/index.es.js",
6
6
  "types": "dist/index.d.ts",