feat(frontend): content micro-animations — stagger, button press, toast polish

- animate-stagger utility + staggerDelay() helper; lists now rise in sequence
  (recordings grid, moderation rows, message list, media queue, dashboard tiles).
- Button gets a subtle active:scale-[0.97] press feedback.
- Toaster: toast-in slide-up, tone-accent border, rounded hover-close target.
- All motion is reduced-motion aware (killed under prefers-reduced-motion).
This commit is contained in:
asepharyana
2026-08-18 11:01:00 +07:00
parent 0cb0b82fb1
commit 217ecc1aa1
10 changed files with 74 additions and 14 deletions
@@ -29,6 +29,7 @@ import {
} from "@/hooks";
import { formatNumber } from "@/lib/format";
import type { DashboardStats } from "@/lib/types";
import { staggerDelay } from "@/lib/utils";
function deriveSignal(stats?: DashboardStats) {
if (!stats) return { tone: "signal" as const, label: "nominal" };
@@ -113,23 +114,31 @@ export function DashboardView({
value={formatNumber(s.total_messages)}
tone="signal"
icon={<MessageSquare className="size-3.5" />}
className="animate-stagger"
style={staggerDelay(0)}
/>
<MetricTile
label="Flagged"
value={formatNumber(s.total_flagged)}
tone={s.total_flagged > 0 ? "vermilion" : "neutral"}
hint={`${s.today_flagged} today`}
className="animate-stagger"
style={staggerDelay(1)}
/>
<MetricTile
label="Active 24h"
value={formatNumber(s.active_users_24h)}
tone="signal"
icon={<Users className="size-3.5" />}
className="animate-stagger"
style={staggerDelay(2)}
/>
<MetricTile
label="Voice clips"
value={formatNumber(s.total_voice_recordings)}
icon={<Mic className="size-3.5" />}
className="animate-stagger"
style={staggerDelay(3)}
/>
</div>
</GlassPanel>