{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "ds-ticker",
  "title": "Ticker",
  "description": "Faixa financeira scroll — adaptado Kibo.",
  "dependencies": [
    "class-variance-authority",
    "lucide-react"
  ],
  "registryDependencies": [
    "@lema-ds/tokens"
  ],
  "files": [
    {
      "path": "components/ds/ds-ticker.tsx",
      "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { TrendingUpIcon, TrendingDownIcon } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\n\n// ── Types ──────────────────────────────────────────────────────────────────\n\nexport interface TickerItem {\n  symbol: string\n  price: string\n  change: string\n  direction: \"up\" | \"down\"\n}\n\nexport interface TickerProps\n  extends\n    React.HTMLAttributes<HTMLDivElement>,\n    VariantProps<typeof tickerVariants> {\n  items: TickerItem[]\n  speed?: \"slow\" | \"normal\" | \"fast\"\n}\n\n// ── Variants ───────────────────────────────────────────────────────────────\n\nexport const tickerVariants = cva(\n  \"relative flex w-full items-center overflow-hidden border bg-card py-2\",\n  {\n    variants: {\n      size: {\n        sm: \"h-8 text-xs\",\n        md: \"h-9 text-xs\",\n      },\n    },\n    defaultVariants: { size: \"md\" },\n  }\n)\n\n// ── Component ──────────────────────────────────────────────────────────────\n\nexport function Ticker({\n  className,\n  items,\n  speed = \"normal\",\n  size = \"md\",\n  ...props\n}: TickerProps) {\n  const duration = speed === \"slow\" ? \"30s\" : speed === \"fast\" ? \"10s\" : \"20s\"\n  const loop = [...items, ...items]\n\n  return (\n    <div\n      data-slot=\"ticker\"\n      className={cn(tickerVariants({ size }), className)}\n      {...props}\n    >\n      <div\n        className=\"flex w-max animate-[marquee-x_var(--duration)_linear_infinite] items-center gap-6\"\n        style={{ \"--duration\": duration } as React.CSSProperties}\n      >\n        {loop.map((it, idx) => (\n          <span\n            key={`${it.symbol}-${idx}`}\n            className=\"flex items-center gap-2 whitespace-nowrap\"\n          >\n            <span className=\"font-medium\">{it.symbol}</span>\n            <span className=\"text-muted-foreground tabular-nums\">\n              {it.price}\n            </span>\n            <span\n              className={cn(\n                \"flex items-center gap-1 tabular-nums\",\n                it.direction === \"up\" ? \"text-success\" : \"text-destructive\"\n              )}\n            >\n              {it.direction === \"up\" ? (\n                <TrendingUpIcon className=\"size-3\" />\n              ) : (\n                <TrendingDownIcon className=\"size-3\" />\n              )}\n              {it.change}\n            </span>\n          </span>\n        ))}\n      </div>\n    </div>\n  )\n}\n",
      "type": "registry:ui"
    }
  ],
  "type": "registry:ui"
}
