@amplifyup/sdk 0.1.66 → 0.1.67

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/react.mjs CHANGED
@@ -5247,25 +5247,8 @@ function Image(props) {
5247
5247
  '[AmplifyUp SDK] Image value={\u2026} requires name="\u2026" for computed values'
5248
5248
  );
5249
5249
  }
5250
- const img = src ? /* @__PURE__ */ jsx(
5251
- "img",
5252
- {
5253
- ...imgProps,
5254
- src,
5255
- alt,
5256
- className: fieldAttrs ? void 0 : className,
5257
- width,
5258
- height,
5259
- style: fieldAttrs ? {
5260
- display: "block",
5261
- width: "100%",
5262
- height: "100%",
5263
- objectFit: "cover",
5264
- pointerEvents: "none"
5265
- } : typeof imgProps.style === "object" && imgProps.style ? imgProps.style : void 0
5266
- }
5267
- ) : null;
5268
- if (fieldAttrs) {
5250
+ if (!src) {
5251
+ if (!composerEdit || !fieldAttrs) return null;
5269
5252
  return /* @__PURE__ */ jsx(
5270
5253
  "span",
5271
5254
  {
@@ -5280,15 +5263,28 @@ function Image(props) {
5280
5263
  minHeight: height ? void 0 : 80,
5281
5264
  width: width || "100%",
5282
5265
  height: height || void 0,
5283
- cursor: "pointer",
5284
- background: src ? void 0 : "color-mix(in srgb, currentColor 8%, transparent)"
5285
- },
5286
- children: img
5266
+ background: "color-mix(in srgb, currentColor 8%, transparent)",
5267
+ cursor: "pointer"
5268
+ }
5287
5269
  }
5288
5270
  );
5289
5271
  }
5290
- if (!src) return null;
5291
- return img;
5272
+ return /* @__PURE__ */ jsx(
5273
+ "img",
5274
+ {
5275
+ ...imgProps,
5276
+ ...fieldAttrs,
5277
+ src,
5278
+ alt,
5279
+ className,
5280
+ width,
5281
+ height,
5282
+ style: {
5283
+ ...typeof imgProps.style === "object" && imgProps.style ? imgProps.style : {},
5284
+ ...composerEdit && fieldAttrs ? { cursor: "pointer" } : null
5285
+ }
5286
+ }
5287
+ );
5292
5288
  }
5293
5289
  var usePathname = null;
5294
5290
  if (typeof window !== "undefined") {