@proximus/lavender-icon-common 1.4.18-beta.1 → 1.4.18

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 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
- // src/IconSet.ts
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
- // src/attributeValues.ts
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) !t.getAttribute("name") || !t.getAttribute("src") ? console.error("Icon name or src not found") : t.getAttribute("name") === this.from && t.getAttribute("type") !== "font" && (this.#e = t.getAttribute("src"), this.$el.firstElementChild?.setAttribute("href", `${this.#e}#icon-${this.name}`));
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 };
@@ -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.18-beta.1",
4
+ "version": "1.4.18",
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" } },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proximus/lavender-icon-common",
3
- "version": "1.4.18-beta.1",
3
+ "version": "1.4.18",
4
4
  "description": "",
5
5
  "main": "dist/index.es.js",
6
6
  "types": "dist/index.d.ts",