@platned/ui 1.1.0 → 1.1.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/dist/blocks.cjs CHANGED
@@ -7289,10 +7289,14 @@ function DetailRow({
7289
7289
  const { span, copy, hint, permission: _permission, ...valueField } = field;
7290
7290
  const label = field.label ?? (0, import__38.humanize)(String(field.key));
7291
7291
  const raw = (0, import__38.getValueAt)(record, String(field.key));
7292
- const value = /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("span", { className: "inline-flex min-w-0 items-center gap-1", children: [
7293
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import__38.Value, { row: record, field: valueField, className: "break-words" }),
7294
- copy && !(0, import__38.isEmptyValue)(raw) && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(CopyValue, { value: String(raw), label })
7295
- ] });
7292
+ const value = (
7293
+ // max-w-full and min-w-0: in the rows layout the value is end-aligned, so nothing else stops a long one
7294
+ // (an email, a URL) from running over its label; this way it wraps, or truncates where its type does.
7295
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("span", { className: "inline-flex max-w-full min-w-0 items-center gap-1", children: [
7296
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import__38.Value, { row: record, field: valueField, className: "min-w-0 break-words" }),
7297
+ copy && !(0, import__38.isEmptyValue)(raw) && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(CopyValue, { value: String(raw), label })
7298
+ ] })
7299
+ );
7296
7300
  if (layout === "rows") {
7297
7301
  return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { "data-slot": "detail-row", className: "flex items-start justify-between gap-4 py-2.5 first:pt-0 last:pb-0", children: [
7298
7302
  /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("dt", { className: "shrink-0 text-muted-foreground", children: label }),