@nectary/labs 2.10.9 → 2.11.0
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nectary/labs",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.11.0",
|
|
4
4
|
"files": [
|
|
5
5
|
"**/*/*.css",
|
|
6
6
|
"**/*/*.json",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"dev": "vite build --watch"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@nectary/components": "5.38.
|
|
22
|
+
"@nectary/components": "5.38.1"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@types/node": "22.12.0",
|
|
@@ -21,6 +21,8 @@ export declare class PhonePreviewRcsChannel extends NectaryElement {
|
|
|
21
21
|
set color(value: string);
|
|
22
22
|
get banner(): string;
|
|
23
23
|
set banner(value: string);
|
|
24
|
+
get bannerColor(): string;
|
|
25
|
+
set bannerColor(value: string);
|
|
24
26
|
get logo(): string;
|
|
25
27
|
set logo(value: string);
|
|
26
28
|
}
|
|
@@ -29,6 +31,7 @@ type RcsChannelProps = {
|
|
|
29
31
|
description?: string;
|
|
30
32
|
color?: string;
|
|
31
33
|
banner?: string;
|
|
34
|
+
bannerColor?: string;
|
|
32
35
|
logo?: string;
|
|
33
36
|
};
|
|
34
37
|
type RcsChannelElementProps = Partial<{
|
|
@@ -54,7 +54,7 @@ class PhonePreviewRcsChannel extends NectaryElement {
|
|
|
54
54
|
this.#controller = null;
|
|
55
55
|
}
|
|
56
56
|
static get observedAttributes() {
|
|
57
|
-
return ["name", "description", "color", "banner", "logo"];
|
|
57
|
+
return ["name", "description", "color", "banner", "bannercolor", "logo"];
|
|
58
58
|
}
|
|
59
59
|
attributeChangedCallback(name, oldVal, newVal) {
|
|
60
60
|
if (oldVal === newVal) {
|
|
@@ -65,6 +65,7 @@ class PhonePreviewRcsChannel extends NectaryElement {
|
|
|
65
65
|
case "description":
|
|
66
66
|
case "color":
|
|
67
67
|
case "banner":
|
|
68
|
+
case "bannercolor":
|
|
68
69
|
case "logo":
|
|
69
70
|
this.#updateUI();
|
|
70
71
|
break;
|
|
@@ -94,6 +95,12 @@ class PhonePreviewRcsChannel extends NectaryElement {
|
|
|
94
95
|
set banner(value) {
|
|
95
96
|
this.setAttribute("banner", value);
|
|
96
97
|
}
|
|
98
|
+
get bannerColor() {
|
|
99
|
+
return this.getAttribute("bannercolor") ?? "";
|
|
100
|
+
}
|
|
101
|
+
set bannerColor(value) {
|
|
102
|
+
this.setAttribute("bannercolor", value);
|
|
103
|
+
}
|
|
97
104
|
get logo() {
|
|
98
105
|
return this.getAttribute("logo") ?? "";
|
|
99
106
|
}
|
|
@@ -109,8 +116,11 @@ class PhonePreviewRcsChannel extends NectaryElement {
|
|
|
109
116
|
this.#logoImg.src = this.logo !== "" ? this.logo : transparentIcon;
|
|
110
117
|
this.#brandName.textContent = this.name !== "" ? this.name : "Brand name";
|
|
111
118
|
this.#brandDescription.textContent = this.description !== "" ? this.description : "Brand description";
|
|
112
|
-
|
|
113
|
-
|
|
119
|
+
const bannerColor = this.bannerColor !== "" ? this.bannerColor : this.color;
|
|
120
|
+
if (bannerColor !== "") {
|
|
121
|
+
this.style.setProperty("--banner-color", bannerColor);
|
|
122
|
+
} else {
|
|
123
|
+
this.style.removeProperty("--banner-color");
|
|
114
124
|
}
|
|
115
125
|
this.#updateActionsFromSlottedChildren();
|
|
116
126
|
this.#tabs.setAttribute("color", this.color);
|