@proximus/lavender-icon-common 1.4.18-beta.1 → 1.4.19-alpha.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.
- package/dist/index.es.js +11 -3
- package/dist/web-types.json +3 -3
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { WithExtraAttributes as e, booleanPropertyToAttributeSetter as t, createTemplate as n, iconSizeValuesKC as r, log as i, propertyToAttributeSetter as a, renderTemplate as o } from "@proximus/lavender-common";
|
|
2
|
-
|
|
2
|
+
//#region src/IconSet.ts
|
|
3
3
|
var s = class extends HTMLElement {
|
|
4
4
|
constructor() {
|
|
5
5
|
super();
|
|
@@ -35,7 +35,8 @@ var s = class extends HTMLElement {
|
|
|
35
35
|
}
|
|
36
36
|
};
|
|
37
37
|
customElements.get("px-icon-set") || customElements.define("px-icon-set", s);
|
|
38
|
-
|
|
38
|
+
//#endregion
|
|
39
|
+
//#region src/attributeValues.ts
|
|
39
40
|
var c = [
|
|
40
41
|
"Brand",
|
|
41
42
|
"Accent",
|
|
@@ -95,7 +96,13 @@ var f = class s extends e {
|
|
|
95
96
|
this.role = "img";
|
|
96
97
|
let e = document.querySelectorAll("px-icon-set");
|
|
97
98
|
e || console.log("<px-icon-set> component not found");
|
|
98
|
-
for (let t of e)
|
|
99
|
+
for (let t of e) {
|
|
100
|
+
if (!t.getAttribute("name") || !t.getAttribute("src")) {
|
|
101
|
+
console.error("Icon name or src not found");
|
|
102
|
+
continue;
|
|
103
|
+
}
|
|
104
|
+
t.getAttribute("name") === this.from && t.getAttribute("type") !== "font" && (this.#e = t.getAttribute("src"), this.$el.firstElementChild?.setAttribute("href", `${this.#e}#icon-${this.name}`));
|
|
105
|
+
}
|
|
99
106
|
!this.ariaLabel && this.#t && (this.#t.ariaHidden = "true", this.ariaHidden = "true"), this.parentElement?.localName === "px-a" && this.slot !== "before" && this.slot !== "after" && (this.color || this.setAttribute("color", "inherit"));
|
|
100
107
|
}
|
|
101
108
|
updateAttribute(e, t, n, r) {
|
|
@@ -151,4 +158,5 @@ var f = class s extends e {
|
|
|
151
158
|
}
|
|
152
159
|
};
|
|
153
160
|
customElements.get("px-icon") || customElements.define("px-icon", f);
|
|
161
|
+
//#endregion
|
|
154
162
|
export { f as Icon, s as IconSet, c as iconColorValues, l as iconColorValuesKC, d as styleSheet };
|
package/dist/web-types.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
|
|
3
3
|
"name": "@proximus/lavender-icon-common",
|
|
4
|
-
"version": "1.4.
|
|
4
|
+
"version": "1.4.19-alpha.1",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
8
8
|
"elements": [
|
|
9
9
|
{
|
|
10
10
|
"name": "px-icon",
|
|
11
|
-
"description": "\n---\n",
|
|
11
|
+
"description": "\n\n---\n",
|
|
12
12
|
"doc-url": "",
|
|
13
13
|
"attributes": [
|
|
14
14
|
{ "name": "name", "value": { "type": "string" } },
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
},
|
|
37
37
|
{
|
|
38
38
|
"name": "px-icon-set",
|
|
39
|
-
"description": "\n---\n",
|
|
39
|
+
"description": "\n\n---\n",
|
|
40
40
|
"doc-url": "",
|
|
41
41
|
"attributes": [
|
|
42
42
|
{ "name": "name", "value": { "type": "string" } },
|