{
  "name": "scroll-area",
  "type": "ui:component",
  "title": "ScrollArea",
  "description": "Styled thin-scrollbar overflow container with vertical, horizontal, or 2D scrolling.",
  "dependencies": [],
  "registryDependencies": [
    "theme"
  ],
  "files": [
    {
      "path": "src/ui/scroll-area.tsx",
      "target": "src/ui/scroll-area.tsx",
      "sha256": "b278d9bb28fa56ba9ea63baef877d2843e2a9bf78d22fe34a8521b1282e5ba97",
      "content": "import './theme.css';\nimport { scope, type View } from '@fierst/aster';\n\nconst scrollScope = scope`\n  :scope {\n    position: relative;\n    overflow: auto;\n    overscroll-behavior: contain;\n    -webkit-overflow-scrolling: touch;\n    scrollbar-width: thin;\n    scrollbar-color: var(--aster-border-strong) transparent;\n  }\n  :scope.dir-vertical { overflow-x: hidden; overflow-y: auto; }\n  :scope.dir-horizontal { overflow-x: auto; overflow-y: hidden; }\n  :scope.is-bordered {\n    border: 1px solid var(--aster-border);\n    border-radius: var(--aster-radius-md);\n    background: var(--aster-surface);\n  }\n  :scope::-webkit-scrollbar { width: 8px; height: 8px; }\n  :scope::-webkit-scrollbar-track { background: transparent; }\n  :scope::-webkit-scrollbar-thumb {\n    background: var(--aster-border-strong);\n    border-radius: 9999px;\n    border: 2px solid transparent;\n    background-clip: content-box;\n  }\n  :scope::-webkit-scrollbar-thumb:hover { background: var(--aster-on-surface-subtle); background-clip: content-box; }\n`;\n\nexport function ScrollArea({\n  maxHeight = '260px',\n  orientation = 'vertical',\n  bordered = false,\n  class: extraClass,\n  children,\n}: {\n  maxHeight?: string;\n  orientation?: 'vertical' | 'horizontal' | 'both';\n  bordered?: boolean;\n  class?: string;\n  children?: View;\n}) {\n  const dirCls = orientation === 'both' ? '' : `dir-${orientation}`;\n  return (\n    <div\n      class={[scrollScope, dirCls, bordered ? 'is-bordered' : '', extraClass]\n        .filter(Boolean)\n        .join(' ')}\n      tabIndex={0}\n      style={{ maxHeight }}\n    >\n      {children}\n    </div>\n  );\n}\n"
    }
  ]
}
