fix(stat-card): only look interactive when it actually is #1

Merged
enricobuehler merged 2 commits from worktree-statcard-affordance into main 2026-08-09 14:05:08 +00:00
2 Commits
Author SHA1 Message Date
enricobuehler 05c636023a chore: refresh bun.lock with the peer deps package.json already declares
The lockfile predated @unom/ui, class-variance-authority, lucide-react and motion
being listed as peers; an install adds them back. No dependency change.
2026-08-09 13:02:32 +02:00
enricobuehler 2655e573e2 fix(stat-card): only look interactive when it actually is
StatCard applied `whileHover={{ scale: 1.02 }}` unconditionally while having no click
handler in its API at all — so every stat on every dashboard lifted under the cursor and
did nothing. A scale-on-hover is the plainest "you can click this" signal there is; a card
that lifts without acting is a promise the UI does not keep. Reported from the Punktfunk
console's Overview tab, where four of them sit in a row.

Adds an optional `onClick`. Given one, the card lifts, presses, shows a pointer, takes
focus and responds to Enter/Space with role="button". Without one it is inert and looks
inert. Existing call sites pass no handler, so they simply stop pretending.

The new stat-card/StatCard → "Interactive vs static" story puts both side by side, which
is the cheapest way to see the regression return.
2026-08-09 12:50:18 +02:00