@asteby/metacore-runtime-react 20.1.3 → 20.1.4

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,17 @@
1
1
  # @asteby/metacore-runtime-react
2
2
 
3
+ ## 20.1.4
4
+
5
+ ### Patch Changes
6
+
7
+ - 9e50db5: fix(kanban): cards stretch to fit their content instead of clamping
8
+
9
+ The card title and field values were `line-clamp-2` (cut to two lines + ellipsis).
10
+ Per product feedback the cards should grow DOWNWARD to show their full content and
11
+ never cut text. Removed the clamps so title and fields wrap fully (`break-words`
12
+ keeps long tokens from overflowing horizontally) and the card grows as tall as it
13
+ needs; the column's ScrollArea already scrolls when a lane gets long.
14
+
3
15
  ## 20.1.3
4
16
 
5
17
  ### Patch Changes
@@ -333,14 +333,14 @@ function KanbanCard({ card, titleCol, fieldCols, actions, locale, timeZone, curr
333
333
  id: String(card.id),
334
334
  });
335
335
  const visibleActions = actions.filter((a) => isActionAllowedForRowState(a, card));
336
- return (_jsx(Card, { ref: setNodeRef, ...attributes, ...listeners, className: "cursor-grab active:cursor-grabbing border-border/70 shadow-sm", style: { opacity: isDragging ? 0.4 : 1 }, onClick: () => onClick?.(card), "data-card-id": String(card.id), children: _jsxs(CardContent, { className: "space-y-1.5 p-3", children: [_jsxs("div", { className: "flex items-start justify-between gap-2", children: [_jsx("div", { className: "line-clamp-2 min-w-0 flex-1 break-words text-sm font-medium leading-snug", children: titleCol ? (_jsx(ActivityValueRenderer, { value: card[titleCol.key], col: titleCol, locale: locale, timeZone: timeZone, currency: currency })) : (_jsx("span", { className: "truncate", children: String(card.id) })) }), visibleActions.length > 0 && (_jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsx(Button, { variant: "ghost", size: "icon", className: "h-6 w-6 shrink-0 -mr-1 -mt-1",
336
+ return (_jsx(Card, { ref: setNodeRef, ...attributes, ...listeners, className: "cursor-grab active:cursor-grabbing border-border/70 shadow-sm", style: { opacity: isDragging ? 0.4 : 1 }, onClick: () => onClick?.(card), "data-card-id": String(card.id), children: _jsxs(CardContent, { className: "space-y-1.5 p-3", children: [_jsxs("div", { className: "flex items-start justify-between gap-2", children: [_jsx("div", { className: "min-w-0 flex-1 break-words text-sm font-medium leading-snug", children: titleCol ? (_jsx(ActivityValueRenderer, { value: card[titleCol.key], col: titleCol, locale: locale, timeZone: timeZone, currency: currency })) : (_jsx("span", { className: "truncate", children: String(card.id) })) }), visibleActions.length > 0 && (_jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsx(Button, { variant: "ghost", size: "icon", className: "h-6 w-6 shrink-0 -mr-1 -mt-1",
337
337
  // Don't start a drag / card click from the menu button.
338
338
  onPointerDown: (e) => e.stopPropagation(), onClick: (e) => e.stopPropagation(), children: _jsx(MoreHorizontal, { className: "h-4 w-4" }) }) }), _jsx(DropdownMenuContent, { align: "end", onClick: (e) => e.stopPropagation(), children: visibleActions.map((a) => (_jsxs(DropdownMenuItem, { onClick: (e) => {
339
339
  e.stopPropagation();
340
340
  onAction(a, card);
341
- }, children: [_jsx(DynamicIcon, { name: a.icon || 'Zap', className: "mr-2 h-4 w-4" }), a.label] }, a.key))) })] }))] }), fieldCols.map((col) => (_jsxs("div", { className: "flex min-w-0 items-start gap-1.5 text-xs text-muted-foreground", children: [_jsxs("span", { className: "shrink-0 opacity-70", children: [col.label, ":"] }), _jsx("span", { className: "line-clamp-2 min-w-0 break-words", children: _jsx(ActivityValueRenderer, { value: card[col.key], col: col, locale: locale, timeZone: timeZone, currency: currency }) })] }, col.key)))] }) }));
341
+ }, children: [_jsx(DynamicIcon, { name: a.icon || 'Zap', className: "mr-2 h-4 w-4" }), a.label] }, a.key))) })] }))] }), fieldCols.map((col) => (_jsxs("div", { className: "flex min-w-0 items-start gap-1.5 text-xs text-muted-foreground", children: [_jsxs("span", { className: "shrink-0 opacity-70", children: [col.label, ":"] }), _jsx("span", { className: "min-w-0 break-words", children: _jsx(ActivityValueRenderer, { value: card[col.key], col: col, locale: locale, timeZone: timeZone, currency: currency }) })] }, col.key)))] }) }));
342
342
  }
343
343
  // Static preview rendered inside the DragOverlay (no dnd hooks, no menu).
344
344
  function CardPreview({ card, titleCol, fieldCols, locale, timeZone, currency, }) {
345
- return (_jsx(Card, { className: "w-72 cursor-grabbing border-primary/40 shadow-lg", children: _jsxs(CardContent, { className: "space-y-1.5 p-3", children: [_jsx("div", { className: "line-clamp-2 break-words text-sm font-medium leading-snug", children: titleCol ? (_jsx(ActivityValueRenderer, { value: card[titleCol.key], col: titleCol, locale: locale, timeZone: timeZone, currency: currency })) : (String(card.id)) }), fieldCols.map((col) => (_jsxs("div", { className: "flex min-w-0 items-start gap-1.5 text-xs text-muted-foreground", children: [_jsxs("span", { className: "shrink-0 opacity-70", children: [col.label, ":"] }), _jsx("span", { className: "line-clamp-2 min-w-0 break-words", children: _jsx(ActivityValueRenderer, { value: card[col.key], col: col, locale: locale, timeZone: timeZone, currency: currency }) })] }, col.key)))] }) }));
345
+ return (_jsx(Card, { className: "w-72 cursor-grabbing border-primary/40 shadow-lg", children: _jsxs(CardContent, { className: "space-y-1.5 p-3", children: [_jsx("div", { className: "break-words text-sm font-medium leading-snug", children: titleCol ? (_jsx(ActivityValueRenderer, { value: card[titleCol.key], col: titleCol, locale: locale, timeZone: timeZone, currency: currency })) : (String(card.id)) }), fieldCols.map((col) => (_jsxs("div", { className: "flex min-w-0 items-start gap-1.5 text-xs text-muted-foreground", children: [_jsxs("span", { className: "shrink-0 opacity-70", children: [col.label, ":"] }), _jsx("span", { className: "min-w-0 break-words", children: _jsx(ActivityValueRenderer, { value: card[col.key], col: col, locale: locale, timeZone: timeZone, currency: currency }) })] }, col.key)))] }) }));
346
346
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@asteby/metacore-runtime-react",
3
- "version": "20.1.3",
3
+ "version": "20.1.4",
4
4
  "description": "React runtime for metacore hosts — renders addon contributions dynamically",
5
5
  "repository": {
6
6
  "type": "git",
@@ -655,7 +655,7 @@ function KanbanCard({
655
655
  >
656
656
  <CardContent className="space-y-1.5 p-3">
657
657
  <div className="flex items-start justify-between gap-2">
658
- <div className="line-clamp-2 min-w-0 flex-1 break-words text-sm font-medium leading-snug">
658
+ <div className="min-w-0 flex-1 break-words text-sm font-medium leading-snug">
659
659
  {titleCol ? (
660
660
  <ActivityValueRenderer
661
661
  value={card[titleCol.key]}
@@ -708,7 +708,7 @@ function KanbanCard({
708
708
  className="flex min-w-0 items-start gap-1.5 text-xs text-muted-foreground"
709
709
  >
710
710
  <span className="shrink-0 opacity-70">{col.label}:</span>
711
- <span className="line-clamp-2 min-w-0 break-words">
711
+ <span className="min-w-0 break-words">
712
712
  <ActivityValueRenderer
713
713
  value={card[col.key]}
714
714
  col={col}
@@ -736,7 +736,7 @@ function CardPreview({
736
736
  return (
737
737
  <Card className="w-72 cursor-grabbing border-primary/40 shadow-lg">
738
738
  <CardContent className="space-y-1.5 p-3">
739
- <div className="line-clamp-2 break-words text-sm font-medium leading-snug">
739
+ <div className="break-words text-sm font-medium leading-snug">
740
740
  {titleCol ? (
741
741
  <ActivityValueRenderer
742
742
  value={card[titleCol.key]}
@@ -755,7 +755,7 @@ function CardPreview({
755
755
  className="flex min-w-0 items-start gap-1.5 text-xs text-muted-foreground"
756
756
  >
757
757
  <span className="shrink-0 opacity-70">{col.label}:</span>
758
- <span className="line-clamp-2 min-w-0 break-words">
758
+ <span className="min-w-0 break-words">
759
759
  <ActivityValueRenderer
760
760
  value={card[col.key]}
761
761
  col={col}