ma-icons 0.3.12 → 0.3.13
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/ma-icons.es.js +1 -1
- package/dist/ma-icons.iife.js +1 -1
- package/package.json +1 -1
package/dist/ma-icons.es.js
CHANGED
|
@@ -620,7 +620,7 @@ let u = class extends M {
|
|
|
620
620
|
` : E`${r}`;
|
|
621
621
|
}
|
|
622
622
|
async modifySvg() {
|
|
623
|
-
const t = "../icons/" + this.name + ".svg", e = new DOMParser().parseFromString(t, "image/svg+xml"), s = e.querySelector("svg");
|
|
623
|
+
const t = await (await fetch("../icons/" + this.name + ".svg")).text(), e = new DOMParser().parseFromString(t, "image/svg+xml"), s = e.querySelector("svg");
|
|
624
624
|
if (!s) return "";
|
|
625
625
|
s == null || s.setAttribute("width", this.size), s == null || s.setAttribute("height", this.size), s == null || s.setAttribute("fill", "none"), e.querySelectorAll("[stroke]").forEach((i) => i.setAttribute("stroke", this.href ? "hsl(0deg 0% 0% / calc(100% * 3/8))" : this.color)), e.querySelectorAll("[stroke-width]").forEach((i) => i.setAttribute("stroke-width", this.weight)), this.svg = s == null ? void 0 : s.outerHTML;
|
|
626
626
|
}
|
package/dist/ma-icons.iife.js
CHANGED
|
@@ -32,7 +32,7 @@ var MaIcons=function(I){"use strict";/**
|
|
|
32
32
|
<a download=${this.download} href=${this.href} class="${this.styled?"styled":""}">
|
|
33
33
|
${this.leading?w`${r} `:""}<slot></slot>${this.leading?"":w` ${r}`}
|
|
34
34
|
</a>
|
|
35
|
-
`:w`${r}`}async modifySvg(){const t="../icons/"+this.name+".svg",e=new DOMParser().parseFromString(t,"image/svg+xml"),s=e.querySelector("svg");if(!s)return"";s==null||s.setAttribute("width",this.size),s==null||s.setAttribute("height",this.size),s==null||s.setAttribute("fill","none"),e.querySelectorAll("[stroke]").forEach(i=>i.setAttribute("stroke",this.href?"hsl(0deg 0% 0% / calc(100% * 3/8))":this.color)),e.querySelectorAll("[stroke-width]").forEach(i=>i.setAttribute("stroke-width",this.weight)),this.svg=s==null?void 0:s.outerHTML}};u.styles=ut`
|
|
35
|
+
`:w`${r}`}async modifySvg(){const t=await(await fetch("../icons/"+this.name+".svg")).text(),e=new DOMParser().parseFromString(t,"image/svg+xml"),s=e.querySelector("svg");if(!s)return"";s==null||s.setAttribute("width",this.size),s==null||s.setAttribute("height",this.size),s==null||s.setAttribute("fill","none"),e.querySelectorAll("[stroke]").forEach(i=>i.setAttribute("stroke",this.href?"hsl(0deg 0% 0% / calc(100% * 3/8))":this.color)),e.querySelectorAll("[stroke-width]").forEach(i=>i.setAttribute("stroke-width",this.weight)),this.svg=s==null?void 0:s.outerHTML}};u.styles=ut`
|
|
36
36
|
svg {
|
|
37
37
|
display: block;
|
|
38
38
|
}
|