import * as React from "react" import { cn } from "../../lib/utils" // The card owns its padding; a flush card (a messenger or tab frame whose children reach the edge) opts out. function Card({ className, flush = false, ...props }: React.ComponentProps<"div"> & { flush?: boolean }) { return (
) } function CardHeader({ className, ...props }: React.ComponentProps<"div">) { return (
) } /** * / finding B10 - a card title can now BE a heading. * * THE DEFECT THIS ENABLES FIXING, and it is worth stating because the symptom sounds cosmetic: the * patient dashboard emitted exactly three headings - "Welcome, Patient One", "No Upcoming Appointments", * "No Unread Messages" - while the actual card titles ("Upcoming Appointments", "Unread Messages", * "Tasks") were `
`s. The document outline was therefore made of a greeting and two ABSENCE messages, * so a screen-reader user navigating by heading hears what they do NOT have and cannot reach the regions * those messages sit in. * * `as` DEFAULTS TO `div`, so this change renders nothing differently anywhere. Making every card title * a heading globally is the more complete answer and also a heading-order change across ~40 surfaces - * that belongs to a design pass, not to a bug card. Opting in per surface is what keeps this reviewable. */ type CardTitleElement = "div" | "h1" | "h2" | "h3" | "h4" function CardTitle({ className, as: Component = "div", ...props }: React.ComponentProps<"div"> & { as?: CardTitleElement }) { return ( ) } function CardDescription({ className, ...props }: React.ComponentProps<"div">) { return (
) } function CardAction({ className, ...props }: React.ComponentProps<"div">) { return (
) } function CardContent({ className, ...props }: React.ComponentProps<"div">) { return (
) } function CardFooter({ className, ...props }: React.ComponentProps<"div">) { return (
) } export { Card, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, CardContent, }