diff --git a/src/components/board/BoardView.tsx b/src/components/board/BoardView.tsx index 2cb685b..c6bbc46 100644 --- a/src/components/board/BoardView.tsx +++ b/src/components/board/BoardView.tsx @@ -1,5 +1,7 @@ import React, { useState, useRef, useEffect, useCallback } from "react"; import { Plus } from "lucide-react"; +import { motion } from "framer-motion"; +import { staggerContainer } from "@/lib/motion"; import { DndContext, DragOverlay, @@ -320,7 +322,13 @@ export function BoardView() { items={columnIds} strategy={horizontalListSortingStrategy} > -
+ {board.columns.map((column) => ( )}
- + {/* Drag overlay - renders a styled copy of the dragged item */} diff --git a/src/components/board/CardThumbnail.tsx b/src/components/board/CardThumbnail.tsx index 734f4d8..941a1f8 100644 --- a/src/components/board/CardThumbnail.tsx +++ b/src/components/board/CardThumbnail.tsx @@ -1,6 +1,7 @@ import React from "react"; import { format, isPast, isToday } from "date-fns"; import { motion, useReducedMotion } from "framer-motion"; +import { fadeSlideUp, springs } from "@/lib/motion"; import { useSortable } from "@dnd-kit/sortable"; import { CSS } from "@dnd-kit/utilities"; import type { Card, Label } from "@/types/board"; @@ -50,10 +51,14 @@ export function CardThumbnail({ card, boardLabels, columnId, onCardClick }: Card ref={setNodeRef} style={style} onClick={handleClick} - className="w-full rounded-lg bg-pylon-surface shadow-sm text-left transition-all duration-200 hover:-translate-y-px hover:shadow-md" - initial={prefersReducedMotion ? false : { opacity: 0, y: -8 }} - animate={{ opacity: 1, y: 0 }} - transition={{ type: "spring", stiffness: 300, damping: 25 }} + className="w-full rounded-lg bg-pylon-surface shadow-sm text-left" + variants={fadeSlideUp} + initial={prefersReducedMotion ? false : "hidden"} + animate="visible" + whileHover={{ scale: 1.02, y: -2, boxShadow: "0 4px 12px oklch(0% 0 0 / 10%)" }} + whileTap={{ scale: 0.98 }} + transition={springs.bouncy} + layout {...attributes} {...listeners} role="article" diff --git a/src/components/board/KanbanColumn.tsx b/src/components/board/KanbanColumn.tsx index b38677e..eb8787e 100644 --- a/src/components/board/KanbanColumn.tsx +++ b/src/components/board/KanbanColumn.tsx @@ -1,6 +1,7 @@ import { useState } from "react"; import { Plus } from "lucide-react"; import { motion, useReducedMotion } from "framer-motion"; +import { fadeSlideUp, springs, staggerContainer } from "@/lib/motion"; import { useDroppable } from "@dnd-kit/core"; import { SortableContext, @@ -68,9 +69,11 @@ export function KanbanColumn({ column, onCardClick }: KanbanColumnProps) { style={style} className="group/column flex shrink-0 flex-col rounded-lg bg-pylon-column" aria-label={`${column.title} column, ${cardCount} card${cardCount !== 1 ? "s" : ""}`} - initial={prefersReducedMotion ? false : { opacity: 0, x: 20 }} - animate={{ opacity: 1, x: 0 }} - transition={{ type: "spring", stiffness: 300, damping: 25 }} + variants={fadeSlideUp} + initial={prefersReducedMotion ? false : "hidden"} + animate="visible" + transition={springs.bouncy} + layout {...attributes} > {/* The column header is the drag handle for column reordering */} @@ -84,7 +87,14 @@ export function KanbanColumn({ column, onCardClick }: KanbanColumnProps) { strategy={verticalListSortingStrategy} > - +