@amplifyup/sdk 0.1.65 → 0.1.66

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