@sula-tech/webcomponents 0.17.4 → 0.17.5
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/sula-avatar_29.cjs.entry.js +21 -6
- package/dist/cjs/sula-avatar_29.cjs.entry.js.map +1 -1
- package/dist/collection/components/sula-loader/sula-loader.js +21 -6
- package/dist/collection/components/sula-loader/sula-loader.js.map +1 -1
- package/dist/components/{p-DGCOlK4x.js → p-Ds1BVj4V.js} +3 -3
- package/dist/components/{p-DGCOlK4x.js.map → p-Ds1BVj4V.js.map} +1 -1
- package/dist/components/{p-fwcKhm5l.js → p-zE24jlFe.js} +23 -8
- package/dist/components/{p-fwcKhm5l.js.map → p-zE24jlFe.js.map} +1 -1
- package/dist/components/sula-button.js +1 -1
- package/dist/components/sula-loader.js +1 -1
- package/dist/components/sula-modal.js +2 -2
- package/dist/esm/sula-avatar_29.entry.js +21 -6
- package/dist/esm/sula-avatar_29.entry.js.map +1 -1
- package/dist/types/components/sula-loader/sula-loader.d.ts +7 -3
- package/dist/webcomponents/{p-f62433bd.entry.js → p-342be8e3.entry.js} +23 -8
- package/dist/webcomponents/p-342be8e3.entry.js.map +1 -0
- package/dist/webcomponents/webcomponents.esm.js +1 -1
- package/package.json +1 -1
- package/dist/webcomponents/p-f62433bd.entry.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, c as createEvent, h, a as Host } from './index.js';
|
|
2
|
-
import { d as defineCustomElement$4, a as SulaButtonAppearance } from './p-
|
|
2
|
+
import { d as defineCustomElement$4, a as SulaButtonAppearance } from './p-Ds1BVj4V.js';
|
|
3
3
|
import { d as defineCustomElement$3 } from './p-fgs5TBQ7.js';
|
|
4
|
-
import { d as defineCustomElement$2 } from './p-
|
|
4
|
+
import { d as defineCustomElement$2 } from './p-zE24jlFe.js';
|
|
5
5
|
|
|
6
6
|
var SulaModalType;
|
|
7
7
|
(function (SulaModalType) {
|
|
@@ -27784,17 +27784,29 @@ const SulaLoader = class {
|
|
|
27784
27784
|
* Tamanho predefinido (small, medium, large)
|
|
27785
27785
|
*/
|
|
27786
27786
|
this.size = SulaLoaderSize.Medium;
|
|
27787
|
+
this.animationInstance = null;
|
|
27788
|
+
}
|
|
27789
|
+
connectedCallback() {
|
|
27790
|
+
this.tryInitLottie();
|
|
27787
27791
|
}
|
|
27788
27792
|
componentDidLoad() {
|
|
27789
|
-
this.
|
|
27793
|
+
this.tryInitLottie();
|
|
27794
|
+
}
|
|
27795
|
+
componentDidRender() {
|
|
27796
|
+
this.tryInitLottie();
|
|
27790
27797
|
}
|
|
27791
27798
|
disconnectedCallback() {
|
|
27792
|
-
|
|
27793
|
-
|
|
27799
|
+
this.destroyAnimation();
|
|
27800
|
+
}
|
|
27801
|
+
destroyAnimation() {
|
|
27802
|
+
if (!this.animationInstance) {
|
|
27803
|
+
return;
|
|
27794
27804
|
}
|
|
27805
|
+
this.animationInstance.destroy();
|
|
27806
|
+
this.animationInstance = null;
|
|
27795
27807
|
}
|
|
27796
|
-
|
|
27797
|
-
if (!this.containerRef)
|
|
27808
|
+
tryInitLottie() {
|
|
27809
|
+
if (!this.containerRef || this.animationInstance)
|
|
27798
27810
|
return;
|
|
27799
27811
|
try {
|
|
27800
27812
|
const animationData = loaderAnimation;
|
|
@@ -27811,6 +27823,9 @@ const SulaLoader = class {
|
|
|
27811
27823
|
console.error('Erro ao carregar animação Lottie:', error);
|
|
27812
27824
|
}
|
|
27813
27825
|
}
|
|
27826
|
+
initLottie() {
|
|
27827
|
+
this.tryInitLottie();
|
|
27828
|
+
}
|
|
27814
27829
|
getDimensions() {
|
|
27815
27830
|
const sizes = {
|
|
27816
27831
|
small: '24px',
|
|
@@ -27821,7 +27836,7 @@ const SulaLoader = class {
|
|
|
27821
27836
|
}
|
|
27822
27837
|
render() {
|
|
27823
27838
|
const { width, height } = this.getDimensions();
|
|
27824
|
-
return (h$1(Host, { key: '
|
|
27839
|
+
return (h$1(Host, { key: '4d73099f19f4e81ed2cd83ee1402e0f06f71f7ca' }, h$1("div", { key: '2593fe1c91bf4c7f167caa55fdc476d0a9d73841', ref: el => (this.containerRef = el), style: {
|
|
27825
27840
|
width: width,
|
|
27826
27841
|
height: height,
|
|
27827
27842
|
} })));
|