{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"marketing-stats-comparison-stats","type":"registry:block","title":"Comparison Stats","files":[{"path":"components/blocks/marketing/stats/comparison-stats.tsx","content":"import { Badge } from '@/components/ui/badge';\nimport {\n  TrendingUp,\n  TrendingDown,\n  ChevronUp,\n  ChevronDown,\n  BarChart3,\n} from 'lucide-react';\nimport { cn } from '@/lib/utils';\n\nexport default function ComparisonStats() {\n  const stats = [\n    {\n      title: 'Revenue',\n      current: '$348,245',\n      previous: '$298,129',\n      change: 16.8,\n      timeframe: 'vs. last quarter',\n      trend: 'up',\n    },\n    {\n      title: 'New Customers',\n      current: '2,427',\n      previous: '2,184',\n      change: 11.1,\n      timeframe: 'vs. last quarter',\n      trend: 'up',\n    },\n    {\n      title: 'Average Order Value',\n      current: '$143.80',\n      previous: '$132.40',\n      change: 8.6,\n      timeframe: 'vs. last quarter',\n      trend: 'up',\n    },\n    {\n      title: 'Refund Rate',\n      current: '2.1%',\n      previous: '2.8%',\n      change: -25.0,\n      timeframe: 'vs. last quarter',\n      trend: 'down', // Down is good for refund rate\n    },\n  ];\n\n  return (\n    <div className=\"container mx-auto px-4 py-24 md:px-6 lg:py-32 2xl:max-w-[1400px]\">\n      <div className=\"mx-auto max-w-6xl\">\n        <div className=\"flex flex-col items-start gap-8 lg:flex-row lg:gap-16\">\n          <div className=\"lg:w-1/3\">\n            <div className=\"sticky top-20\">\n              <Badge className=\"mb-4\">Q3 2023</Badge>\n              <h2 className=\"text-3xl font-bold lg:text-4xl\">\n                Quarterly Business Review\n              </h2>\n              <p className=\"text-muted-foreground mt-4\">\n                Compare our current performance against previous metrics,\n                showing growth and areas of improvement.\n              </p>\n              <div className=\"mt-8 flex items-center justify-start\">\n                <BarChart3 className=\"text-primary mr-2 h-5 w-5\" />\n                <span className=\"font-medium\">\n                  Updated daily at midnight UTC\n                </span>\n              </div>\n            </div>\n          </div>\n\n          <div className=\"lg:w-2/3\">\n            <div className=\"grid gap-6 sm:grid-cols-2\">\n              {stats.map((stat, index) => (\n                <div key={index} className=\"bg-card rounded-xl border p-6\">\n                  <div className=\"flex items-center justify-between\">\n                    <p className=\"text-muted-foreground font-medium\">\n                      {stat.title}\n                    </p>\n                    <div\n                      className={cn(\n                        'flex items-center rounded-full px-2 py-1 text-xs font-medium',\n                        (stat.trend === 'up' && stat.title !== 'Refund Rate') ||\n                          (stat.trend === 'down' &&\n                            stat.title === 'Refund Rate')\n                          ? 'bg-emerald-50 text-emerald-600 dark:bg-emerald-950 dark:text-emerald-400'\n                          : 'bg-rose-50 text-rose-600 dark:bg-rose-950 dark:text-rose-400'\n                      )}\n                    >\n                      {Math.abs(stat.change)}%\n                      {(stat.trend === 'up' && stat.title !== 'Refund Rate') ||\n                      (stat.trend === 'down' &&\n                        stat.title === 'Refund Rate') ? (\n                        <ChevronUp className=\"ml-1 h-3 w-3\" />\n                      ) : (\n                        <ChevronDown className=\"ml-1 h-3 w-3\" />\n                      )}\n                    </div>\n                  </div>\n\n                  <div className=\"mt-3\">\n                    <h3 className=\"text-3xl font-bold\">{stat.current}</h3>\n                    <div className=\"text-muted-foreground mt-1 flex items-center text-sm\">\n                      <div className=\"flex items-center\">\n                        {(stat.trend === 'up' &&\n                          stat.title !== 'Refund Rate') ||\n                        (stat.trend === 'down' &&\n                          stat.title === 'Refund Rate') ? (\n                          <TrendingUp className=\"mr-1 h-4 w-4 text-emerald-500\" />\n                        ) : (\n                          <TrendingDown className=\"mr-1 h-4 w-4 text-rose-500\" />\n                        )}\n                        from {stat.previous}\n                      </div>\n                    </div>\n                    <p className=\"text-muted-foreground mt-3 text-sm\">\n                      {stat.timeframe}\n                    </p>\n                  </div>\n                </div>\n              ))}\n            </div>\n          </div>\n        </div>\n      </div>\n    </div>\n  );\n}\n","type":"registry:component","target":"components/blocks/marketing/stats/comparison-stats.tsx"},{"path":"components/ui/badge.tsx","content":"import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { Slot } from \"radix-ui\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst badgeVariants = cva(\n  \"group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!\",\n  {\n    variants: {\n      variant: {\n        default: \"bg-primary text-primary-foreground [a]:hover:bg-primary/80\",\n        secondary:\n          \"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80\",\n        destructive:\n          \"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20\",\n        outline:\n          \"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground\",\n        ghost:\n          \"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50\",\n        link: \"text-primary underline-offset-4 hover:underline\",\n      },\n    },\n    defaultVariants: {\n      variant: \"default\",\n    },\n  }\n)\n\nfunction Badge({\n  className,\n  variant = \"default\",\n  asChild = false,\n  ...props\n}: React.ComponentProps<\"span\"> &\n  VariantProps<typeof badgeVariants> & { asChild?: boolean }) {\n  const Comp = asChild ? Slot.Root : \"span\"\n\n  return (\n    <Comp\n      data-slot=\"badge\"\n      data-variant={variant}\n      className={cn(badgeVariants({ variant }), className)}\n      {...props}\n    />\n  )\n}\n\nexport { Badge, badgeVariants }\n","type":"registry:ui","target":"components/ui/badge.tsx"}],"description":"Paired figures with labels that weigh your offering against a baseline. Great for sales pages that need to make the gain feel concrete and credible.","dependencies":["class-variance-authority","lucide-react","radix-ui"]}