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