{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "font-card", "type": "registry:component", "title": "Font Card", "description": "Blinkist Font Card Component", "dependencies": [ "class-variance-authority" ], "registryDependencies": [ "theme", "card", "badge" ], "files": [ { "path": "components/font-card.tsx", "content": "import { Badge } from \"@/components/ui/badge\"\nimport { Card, CardContent, CardDescription, CardHeader, CardTitle } from \"@/components/ui/card\"\n\ninterface FontWeight {\n weight: number\n style: string\n url?: string\n}\n\ninterface FontFamily {\n name: string\n weights: FontWeight[]\n description: string\n externalSource?: string\n externalUrl?: string\n}\n\nexport function FontCard({ font }: { font: FontFamily }) {\n const weightNames: Record = {\n 400: \"Regular\",\n 500: \"Medium\",\n 700: \"Bold\",\n }\n\n return (\n \n \n
\n {font.name}\n {font.externalSource && (\n \n {font.externalSource}\n \n )}\n
\n {font.description}\n
\n \n {font.weights.length > 0 ? (\n
\n

Available Weights & Styles

\n
\n {font.weights.map((weight, index) => (\n
\n
\n
\n {weight.weight.toString().charAt(0)}\n
\n
\n

\n {weightNames[weight.weight] || weight.weight}\n {weight.style === \"italic\" ? \" Italic\" : \"\"}\n

\n

Weight: {weight.weight}

\n
\n
\n {weight.url && (\n \n View Font File\n \n )}\n
\n ))}\n
\n
\n ) : (\n
\n

\n This font is loaded from an external source.\n {font.externalUrl && (\n <>\n
\n \n View External Stylesheet\n \n \n )}\n

\n
\n )}\n\n
\n

Preview

\n \n

The quick brown fox jumps over the lazy dog.

\n

\n Blinkist offers the key insights from top nonfiction in a made-for-mobile format.\n

\n
\n \n
\n
\n )\n}\n", "type": "registry:component" }, { "path": "components/ui/badge.tsx", "content": "import type * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst badgeVariants = cva(\n \"inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2\",\n {\n variants: {\n variant: {\n default: \"border-transparent bg-primary text-primary-foreground hover:bg-primary/80\",\n secondary: \"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80\",\n destructive: \"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80\",\n outline: \"text-foreground\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n },\n)\n\nexport interface BadgeProps extends React.HTMLAttributes, VariantProps {}\n\nfunction Badge({ className, variant, ...props }: BadgeProps) {\n return
\n}\n\nexport { Badge, badgeVariants }\n", "type": "registry:ui", "target": "" }, { "path": "components/ui/card.tsx", "content": "import * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst Card = React.forwardRef>(({ className, ...props }, ref) => (\n
\n))\nCard.displayName = \"Card\"\n\nconst CardHeader = React.forwardRef>(\n ({ className, ...props }, ref) => (\n
\n ),\n)\nCardHeader.displayName = \"CardHeader\"\n\nconst CardTitle = React.forwardRef>(\n ({ className, ...props }, ref) => (\n

\n ),\n)\nCardTitle.displayName = \"CardTitle\"\n\nconst CardDescription = React.forwardRef>(\n ({ className, ...props }, ref) => (\n

\n ),\n)\nCardDescription.displayName = \"CardDescription\"\n\nconst CardContent = React.forwardRef>(\n ({ className, ...props }, ref) =>

,\n)\nCardContent.displayName = \"CardContent\"\n\nconst CardFooter = React.forwardRef>(\n ({ className, ...props }, ref) => (\n
\n ),\n)\nCardFooter.displayName = \"CardFooter\"\n\nexport { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent }\n", "type": "registry:ui", "target": "" } ] }