{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "scroll-area-styled",
  "title": "Area-styled scroll",
  "description": "Styled scroll: the Area-styled set. 5 decorative scroll variations (ThinScrollArea, RoundedScrollArea, ColoredScrollArea, OverlayScrollArea, BothScrollArea) on the ai2 token system, driven by CSS token transitions and sized sm to xl. Part of the free styled layer.",
  "dependencies": [],
  "registryDependencies": [
    "@ai2/tokens"
  ],
  "files": [
    {
      "path": "registry/ai2/styled/scroll-area-styled.tsx",
      "content": "\"use client\"\n\nimport type * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\n\n/* Scroll-area family: 5 decorative scroll areas. Colour comes ONLY from tokens. The scrollbar is styled with WebKit pseudo-element arbitrary utilities (self-contained; no global stylesheet needed), plus scrollbar-width and scrollbar-color for Firefox. size -> the viewport height. */\n\nexport type StyledSize = \"sm\" | \"md\" | \"lg\" | \"xl\"\n\nconst height: Record<StyledSize, string> = {\n  sm: \"h-40\",\n  md: \"h-56\",\n  lg: \"h-72\",\n  xl: \"h-96\",\n}\n\nconst base = \"w-full overflow-y-auto rounded-lg border border-border bg-surface-2 p-3\"\n\n/* Varsayilan icerik: kaydirmayi tetikleyecek kadar uzun, token-stilli satirlar. */\nfunction DefaultRows({ count = 16 }: { count?: number }) {\n  return (\n    <div className=\"flex flex-col gap-2\">\n      {Array.from({ length: count }).map((_, i) => (\n        <div\n          key={i}\n          className=\"flex items-center justify-between rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground\"\n        >\n          <span className=\"font-medium\">Satir {i + 1}</span>\n          <span className=\"text-xs text-muted-foreground\">token</span>\n        </div>\n      ))}\n    </div>\n  )\n}\n\ntype Props = {\n  className?: string\n  size?: StyledSize\n  children?: React.ReactNode\n}\n\n/* Thin: cok ince token kaydirma cubugu. */\nexport function ThinScrollArea({ className, size = \"md\", children }: Props) {\n  return (\n    <div\n      data-slot=\"styled-scroll-area\"\n      className={cn(\n        base,\n        height[size],\n        \"[scrollbar-width:thin] [scrollbar-color:var(--color-border)_transparent]\",\n        \"[&::-webkit-scrollbar]:w-1 [&::-webkit-scrollbar-track]:bg-transparent [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-border\",\n        className\n      )}\n    >\n      {children ?? <DefaultRows />}\n    </div>\n  )\n}\n\n/* Rounded: dolgulu, hap seklinde yuvarlak token thumb. */\nexport function RoundedScrollArea({ className, size = \"md\", children }: Props) {\n  return (\n    <div\n      data-slot=\"styled-scroll-area\"\n      className={cn(\n        base,\n        height[size],\n        \"[scrollbar-width:thin] [scrollbar-color:var(--color-border)_transparent]\",\n        \"[&::-webkit-scrollbar]:w-3 [&::-webkit-scrollbar-track]:bg-transparent [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:border-4 [&::-webkit-scrollbar-thumb]:border-solid [&::-webkit-scrollbar-thumb]:border-transparent [&::-webkit-scrollbar-thumb]:bg-border [&::-webkit-scrollbar-thumb]:bg-clip-content\",\n        className\n      )}\n    >\n      {children ?? <DefaultRows />}\n    </div>\n  )\n}\n\n/* Colored: primary token thumb. */\nexport function ColoredScrollArea({ className, size = \"md\", children }: Props) {\n  return (\n    <div\n      data-slot=\"styled-scroll-area\"\n      className={cn(\n        base,\n        height[size],\n        \"[scrollbar-width:thin] [scrollbar-color:var(--color-primary)_transparent]\",\n        \"[&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-track]:bg-transparent [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-primary\",\n        className\n      )}\n    >\n      {children ?? <DefaultRows />}\n    </div>\n  )\n}\n\n/* Overlay: the scrollbar rides over the content and appears on hover. */\nexport function OverlayScrollArea({ className, size = \"md\", children }: Props) {\n  return (\n    <div\n      data-slot=\"styled-scroll-area\"\n      className={cn(\n        base,\n        height[size],\n        \"[scrollbar-width:thin] [scrollbar-color:transparent_transparent] hover:[scrollbar-color:var(--color-border)_transparent]\",\n        \"[&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar]:bg-transparent [&::-webkit-scrollbar-track]:bg-transparent [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-transparent hover:[&::-webkit-scrollbar-thumb]:bg-border\",\n        className\n      )}\n      style={{ overflowY: \"overlay\" } as React.CSSProperties}\n    >\n      {children ?? <DefaultRows />}\n    </div>\n  )\n}\n\n/* Both: hem x hem y kaydirma cubugu stilli; icerik viewport'tan genis ve uzun. */\nexport function BothScrollArea({ className, size = \"md\", children }: Props) {\n  return (\n    <div\n      data-slot=\"styled-scroll-area\"\n      className={cn(\n        base,\n        height[size],\n        \"overflow-auto\",\n        \"[scrollbar-width:thin] [scrollbar-color:var(--color-border)_transparent]\",\n        \"[&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-track]:bg-transparent [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-border [&::-webkit-scrollbar-corner]:bg-transparent\",\n        className\n      )}\n    >\n      {children ?? (\n        <div className=\"w-[150%]\">\n          <DefaultRows count={20} />\n        </div>\n      )}\n    </div>\n  )\n}\n",
      "type": "registry:component",
      "target": "components/ui/scroll-area-styled.tsx"
    }
  ],
  "categories": [
    "styled",
    "scroll"
  ],
  "type": "registry:component"
}