{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "status-edge-card",
  "type": "registry:component",
  "title": "Status edge card",
  "description": "Give service health, warnings, and review states a quiet colored edge.",
  "categories": [
    "layout"
  ],
  "dependencies": [],
  "registryDependencies": [
    "card"
  ],
  "files": [
    {
      "path": "src/registry/overtrue/status-edge-card.tsx",
      "type": "registry:component",
      "target": "components/overtrue/status-edge-card.tsx",
      "content": "import { SectionCard, type SectionCardProps } from \"./section-card\";\nimport { cn } from \"@/lib/utils\";\n\nconst edges = {\n  top: \"inset-x-0 top-0 h-0.5 bg-[linear-gradient(90deg,transparent,var(--edge)_14%,var(--edge)_86%,transparent)]\",\n  bottom:\n    \"inset-x-0 bottom-0 h-0.5 bg-[linear-gradient(90deg,transparent,var(--edge)_14%,var(--edge)_86%,transparent)]\",\n  start:\n    \"inset-y-0 start-0 w-0.5 bg-[linear-gradient(180deg,transparent,var(--edge)_14%,var(--edge)_86%,transparent)]\",\n  end: \"inset-y-0 end-0 w-0.5 bg-[linear-gradient(180deg,transparent,var(--edge)_14%,var(--edge)_86%,transparent)]\",\n};\n// A soft wash of the tone that spreads from the edge into the card.\nconst washes = {\n  top: \"inset-x-0 top-0 h-28 bg-[radial-gradient(75%_100%_at_50%_0%,color-mix(in_oklab,var(--edge)_var(--edge-wash),transparent),transparent)]\",\n  bottom:\n    \"inset-x-0 bottom-0 h-28 bg-[radial-gradient(75%_100%_at_50%_100%,color-mix(in_oklab,var(--edge)_var(--edge-wash),transparent),transparent)]\",\n  start:\n    \"inset-y-0 start-0 w-36 bg-[radial-gradient(100%_75%_at_0%_50%,color-mix(in_oklab,var(--edge)_var(--edge-wash),transparent),transparent)] rtl:-scale-x-100\",\n  end: \"inset-y-0 end-0 w-36 bg-[radial-gradient(100%_75%_at_100%_50%,color-mix(in_oklab,var(--edge)_var(--edge-wash),transparent),transparent)] rtl:-scale-x-100\",\n};\n// Status tokens when the theme has them, otherwise emerald and amber.\nconst tones = {\n  primary: \"[--edge:var(--color-primary)]\",\n  success: \"[--edge:var(--color-success,var(--color-emerald-500))]\",\n  warning: \"[--edge:var(--color-warning,var(--color-amber-500))]\",\n  danger: \"[--edge:var(--color-destructive)]\",\n  info: \"[--edge:var(--color-info,var(--color-primary))]\",\n};\nexport interface StatusEdgeCardProps extends SectionCardProps {\n  edge?: keyof typeof edges;\n  tone?: keyof typeof tones;\n}\n/** Pair the decorative edge with a written status in the title or content. */\nexport function StatusEdgeCard({\n  edge = \"top\",\n  tone = \"primary\",\n  children,\n  className,\n  ...props\n}: StatusEdgeCardProps) {\n  return (\n    <SectionCard\n      data-slot=\"status-edge-card\"\n      data-tone={tone}\n      data-edge={edge}\n      className={cn(\"relative isolate overflow-hidden\", tones[tone], className)}\n      {...props}\n    >\n      <span\n        aria-hidden=\"true\"\n        data-slot=\"status-edge-card-wash\"\n        className={cn(\n          \"pointer-events-none absolute -z-10 [--edge-wash:8%] dark:[--edge-wash:13%]\",\n          washes[edge],\n        )}\n      />\n      <span\n        aria-hidden=\"true\"\n        data-slot=\"status-edge-card-edge\"\n        className={cn(\n          \"pointer-events-none absolute dark:shadow-[0_0_12px_color-mix(in_oklab,var(--edge)_65%,transparent)]\",\n          edges[edge],\n        )}\n      />\n      {children}\n    </SectionCard>\n  );\n}\n"
    },
    {
      "path": "src/registry/overtrue/section-card.tsx",
      "type": "registry:component",
      "target": "components/overtrue/section-card.tsx",
      "content": "import type { ComponentProps, ReactNode } from \"react\";\nimport {\n  Card,\n  CardContent,\n  CardHeader,\n  CardTitle,\n  CardDescription,\n} from \"@/components/ui/card\";\nimport { cn } from \"@/lib/utils\";\n\nexport interface SectionCardProps extends Omit<\n  ComponentProps<typeof Card>,\n  \"title\"\n> {\n  title?: ReactNode;\n  description?: ReactNode;\n  actions?: ReactNode;\n  contentClassName?: string;\n}\n\n/** A shared heading, actions and content surface for admin panels. */\nexport function SectionCard({\n  title,\n  description,\n  actions,\n  children,\n  className,\n  contentClassName,\n  ...props\n}: SectionCardProps) {\n  return (\n    <Card\n      data-slot=\"section-card\"\n      className={cn(\n        \"min-w-0 gap-0 rounded-2xl border border-border/70 bg-card py-0 text-card-foreground ring-0\",\n        \"shadow-[0_1px_2px_rgb(0_0_0/0.04),0_8px_24px_-12px_rgb(0_0_0/0.10)] dark:shadow-[inset_0_1px_0_rgb(255_255_255/0.05),0_1px_2px_rgb(0_0_0/0.5)]\",\n        className,\n      )}\n      {...props}\n    >\n      {(title || description || actions) && (\n        <CardHeader className=\"flex flex-row flex-wrap items-center justify-between gap-x-4 gap-y-3 border-b border-border/60 px-5 py-4 [.border-b]:pb-4\">\n          <div data-slot=\"section-card-heading\" className=\"min-w-0 flex-1\">\n            {title && (\n              <CardTitle className=\"m-0 text-sm leading-6 font-semibold tracking-tight text-card-foreground\">\n                {title}\n              </CardTitle>\n            )}\n            {description && (\n              <CardDescription className=\"m-0 mt-0.5 text-[13px] leading-5 text-muted-foreground\">\n                {description}\n              </CardDescription>\n            )}\n          </div>\n          {actions && (\n            <div\n              data-slot=\"section-card-actions\"\n              className=\"flex shrink-0 items-center gap-2\"\n            >\n              {actions}\n            </div>\n          )}\n        </CardHeader>\n      )}\n      <CardContent className={cn(\"p-5\", contentClassName)}>\n        {children}\n      </CardContent>\n    </Card>\n  );\n}\n"
    }
  ],
  "docs": "Documentation: https://ui.overtrue.xyz/components/status-edge-card. Requires an initialized shadcn/ui project with Tailwind CSS v4."
}
