@proximus/lavender-content-header 1.4.20-alpha.5 → 1.4.20-alpha.7
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.
- package/dist/ContentHeader.d.ts +2 -0
- package/dist/custom-elements.json +4 -0
- package/dist/index.es.js +16 -10
- package/dist/web-types.json +2 -1
- package/package.json +1 -1
package/dist/ContentHeader.d.ts
CHANGED
|
@@ -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;
|
package/dist/index.es.js
CHANGED
|
@@ -169,12 +169,12 @@ var w = [
|
|
|
169
169
|
this.$el.style.setProperty(`--${e}`, `url("${t}")`);
|
|
170
170
|
}
|
|
171
171
|
updateGradient(e, t) {
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
}
|
|
172
|
+
let { attrName: n, breakpoint: r } = this.splitAttrNameFromBreakpoint(e), i = `--${n}${r}`;
|
|
173
|
+
if (t === null) {
|
|
174
|
+
this.$el.style.removeProperty(i);
|
|
175
|
+
return;
|
|
176
|
+
}
|
|
177
|
+
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
178
|
}
|
|
179
179
|
updateBackgroundColor(e, t) {
|
|
180
180
|
let n = t.startsWith("surface-");
|
|
@@ -1939,7 +1939,7 @@ var Q = new CSSStyleSheet();
|
|
|
1939
1939
|
Q.replaceSync(b);
|
|
1940
1940
|
var $ = class e extends t {
|
|
1941
1941
|
static {
|
|
1942
|
-
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\"
|
|
1942
|
+
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>");
|
|
1943
1943
|
}
|
|
1944
1944
|
static {
|
|
1945
1945
|
this.nativeName = "div";
|
|
@@ -1986,7 +1986,7 @@ var $ = class e extends t {
|
|
|
1986
1986
|
this.$section.backgroundColor = r.indexOf(n) > 0 ? n : "none";
|
|
1987
1987
|
break;
|
|
1988
1988
|
case "background-gradient":
|
|
1989
|
-
this.$section.gradient = m.indexOf(n) > 0 ? n : "none";
|
|
1989
|
+
this.$section.gradient = n === null ? null : m.indexOf(n) > 0 ? n : "none";
|
|
1990
1990
|
break;
|
|
1991
1991
|
case "background-image":
|
|
1992
1992
|
this.$section.backgroundImage = n;
|
|
@@ -2096,12 +2096,18 @@ var $ = class e extends t {
|
|
|
2096
2096
|
set backgroundColor(e) {
|
|
2097
2097
|
this._updateAttribute("background-color", e);
|
|
2098
2098
|
}
|
|
2099
|
-
get
|
|
2099
|
+
get backgroundGradient() {
|
|
2100
2100
|
return this.getAttribute("background-gradient");
|
|
2101
2101
|
}
|
|
2102
|
-
set
|
|
2102
|
+
set backgroundGradient(e) {
|
|
2103
2103
|
this._updateAttribute("background-gradient", e);
|
|
2104
2104
|
}
|
|
2105
|
+
get gradient() {
|
|
2106
|
+
return this.backgroundGradient;
|
|
2107
|
+
}
|
|
2108
|
+
set gradient(e) {
|
|
2109
|
+
this.backgroundGradient = e;
|
|
2110
|
+
}
|
|
2105
2111
|
get backgroundImage() {
|
|
2106
2112
|
return this.getAttribute("background-image");
|
|
2107
2113
|
}
|
package/dist/web-types.json
CHANGED
|
@@ -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": "1.4.20-alpha.
|
|
4
|
+
"version": "1.4.20-alpha.7",
|
|
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" },
|