@discuss-ds/ui 0.9.0 → 0.9.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @discuss-ds/ui
2
2
 
3
+ ## 0.9.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#49](https://github.com/TamyresLucas/Discuss-UI-Storybook/pull/49) [`1931730`](https://github.com/TamyresLucas/Discuss-UI-Storybook/commit/19317303f60cfe751925bdb7e84747f8a68b78b3) Thanks [@TamyresLucas](https://github.com/TamyresLucas)! - `ImagePreview`: with an image, the preview area now hugs it (full width, the image's own height, at most 336px) instead of a fixed 336px area with bars above and below. The empty placeholder keeps the fixed height.
8
+
3
9
  ## 0.9.0
4
10
 
5
11
  ### Minor Changes
package/dist/index.cjs CHANGED
@@ -2403,7 +2403,17 @@ function MediaInfo({ name, details, onRemove, removeLabel, large, className, ...
2403
2403
  }
2404
2404
  var ImagePreview = React37.forwardRef(
2405
2405
  ({ className, children, name, details, onRemove, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { ref, className: cn("flex w-full flex-col overflow-hidden rounded-lg border border-border", className), ...props, children: [
2406
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "flex h-84 w-full items-center justify-center bg-accent-soft [&>img]:size-full [&>img]:object-contain", children }),
2406
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
2407
+ "div",
2408
+ {
2409
+ className: cn(
2410
+ "flex w-full items-center justify-center bg-accent-soft",
2411
+ // With an image the area hugs it (full width, its own height, at most 336px tall); the empty placeholder keeps the fixed height.
2412
+ children ? "[&>img]:block [&>img]:h-auto [&>img]:max-h-84 [&>img]:w-full [&>img]:object-contain" : "h-84"
2413
+ ),
2414
+ children
2415
+ }
2416
+ ),
2407
2417
  /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(MediaInfo, { name, details, onRemove, large: true })
2408
2418
  ] })
2409
2419
  );