@planetaexo/design-system 0.58.1 → 0.58.2
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.cjs +10 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +10 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -10097,12 +10097,14 @@ function Picture(_a) {
|
|
|
10097
10097
|
onError == null ? void 0 : onError(e);
|
|
10098
10098
|
};
|
|
10099
10099
|
const showLoader = visible && !loaded;
|
|
10100
|
+
const hideImg = visible && !loaded;
|
|
10101
|
+
const mergedStyle = __spreadValues(__spreadValues({}, imgProps.style), hideImg ? { opacity: 0 } : {});
|
|
10100
10102
|
if (!webp) {
|
|
10101
10103
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
10102
10104
|
showLoader && /* @__PURE__ */ jsx(PictureLoader, {}),
|
|
10103
10105
|
/* @__PURE__ */ jsx(
|
|
10104
10106
|
"img",
|
|
10105
|
-
__spreadValues({
|
|
10107
|
+
__spreadProps(__spreadValues({
|
|
10106
10108
|
ref,
|
|
10107
10109
|
src: realSrc,
|
|
10108
10110
|
"data-src": visible ? void 0 : src,
|
|
@@ -10110,7 +10112,9 @@ function Picture(_a) {
|
|
|
10110
10112
|
loading: loading != null ? loading : eager ? void 0 : "lazy",
|
|
10111
10113
|
onLoad: handleLoad,
|
|
10112
10114
|
onError: handleError
|
|
10113
|
-
}, imgProps)
|
|
10115
|
+
}, imgProps), {
|
|
10116
|
+
style: mergedStyle
|
|
10117
|
+
})
|
|
10114
10118
|
)
|
|
10115
10119
|
] });
|
|
10116
10120
|
}
|
|
@@ -10121,7 +10125,7 @@ function Picture(_a) {
|
|
|
10121
10125
|
extraSources,
|
|
10122
10126
|
/* @__PURE__ */ jsx(
|
|
10123
10127
|
"img",
|
|
10124
|
-
__spreadValues({
|
|
10128
|
+
__spreadProps(__spreadValues({
|
|
10125
10129
|
ref,
|
|
10126
10130
|
src: realSrc,
|
|
10127
10131
|
"data-src": visible ? void 0 : src,
|
|
@@ -10130,7 +10134,9 @@ function Picture(_a) {
|
|
|
10130
10134
|
loading: loading != null ? loading : eager ? void 0 : "lazy",
|
|
10131
10135
|
onLoad: handleLoad,
|
|
10132
10136
|
onError: handleError
|
|
10133
|
-
}, imgProps)
|
|
10137
|
+
}, imgProps), {
|
|
10138
|
+
style: mergedStyle
|
|
10139
|
+
})
|
|
10134
10140
|
)
|
|
10135
10141
|
] })
|
|
10136
10142
|
] });
|