smoothly 1.0.0-alpha.129 → 1.0.0-alpha.130
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/cjs/smoothly-accordion_70.cjs.entry.js +15 -16
- package/dist/cjs/smoothly-accordion_70.cjs.entry.js.map +1 -1
- package/dist/collection/components/icon/index.js +19 -19
- package/dist/collection/components/icon/index.js.map +1 -1
- package/dist/custom-elements/index.js +15 -16
- package/dist/custom-elements/index.js.map +1 -1
- package/dist/esm/smoothly-accordion_70.entry.js +15 -16
- package/dist/esm/smoothly-accordion_70.entry.js.map +1 -1
- package/dist/smoothly/{p-34ed5201.entry.js → p-d6185f62.entry.js} +2 -2
- package/dist/smoothly/{p-34ed5201.entry.js.map → p-d6185f62.entry.js.map} +1 -1
- package/dist/smoothly/smoothly.esm.js +1 -1
- package/dist/types/components/icon/index.d.ts +2 -2
- package/dist/types/components.d.ts +1 -1
- package/package.json +1 -1
|
@@ -14417,31 +14417,30 @@ const SmoothlyIcon = class {
|
|
|
14417
14417
|
index.registerInstance(this, hostRef);
|
|
14418
14418
|
this.color = undefined;
|
|
14419
14419
|
this.fill = "solid";
|
|
14420
|
-
this.name =
|
|
14420
|
+
this.name = "empty";
|
|
14421
14421
|
this.size = "medium";
|
|
14422
14422
|
this.toolTip = undefined;
|
|
14423
14423
|
this.document = undefined;
|
|
14424
14424
|
}
|
|
14425
14425
|
async loadDocument() {
|
|
14426
|
-
|
|
14427
|
-
if (this.name)
|
|
14428
|
-
this.
|
|
14429
|
-
|
|
14430
|
-
|
|
14431
|
-
|
|
14432
|
-
|
|
14433
|
-
|
|
14426
|
+
let result;
|
|
14427
|
+
if (this.name != "empty") {
|
|
14428
|
+
result = await Data.Icon.load(this.name);
|
|
14429
|
+
result = result === null || result === void 0 ? void 0 : result.replace(/(?<=^<svg\s?)/, `$& role="img"`).replace(` width="512" height="512"`, "").replace(/stroke:#000;/gi, "");
|
|
14430
|
+
if (result === null || result === void 0 ? void 0 : result.includes("<title>"))
|
|
14431
|
+
result = result.replace(/(<title>)[\w\d\s-]*(<\/title>)/, `<title>${this.toolTip || ""}</title>`);
|
|
14432
|
+
else
|
|
14433
|
+
result = result === null || result === void 0 ? void 0 : result.replace(/(.*>)(<\/svg>$)/, `$1<title>${this.toolTip || ""}</title>$2`);
|
|
14434
|
+
}
|
|
14435
|
+
return (result !== null && result !== void 0 ? result : `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
|
|
14436
|
+
<title>Empty</title>
|
|
14437
|
+
</svg>`);
|
|
14434
14438
|
}
|
|
14435
14439
|
async componentWillLoad() {
|
|
14436
|
-
this.loadDocument();
|
|
14440
|
+
this.document = await this.loadDocument();
|
|
14437
14441
|
}
|
|
14438
14442
|
render() {
|
|
14439
|
-
return
|
|
14440
|
-
? this.document
|
|
14441
|
-
.replace(` width="512" height="512"`, "")
|
|
14442
|
-
.replace(/(<title>)[\w\d\s-]*(<\/title>)/, `<title>${this.toolTip || ""}</title>`)
|
|
14443
|
-
.replace(/stroke:#000;/gi, "")
|
|
14444
|
-
: undefined }));
|
|
14443
|
+
return index.h(index.Host, { innerHTML: this.document });
|
|
14445
14444
|
}
|
|
14446
14445
|
static get watchers() { return {
|
|
14447
14446
|
"name": ["loadDocument"]
|