{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "session-list",
  "type": "registry:ui",
  "title": "Session list",
  "description": "Active sessions list showing each device and location, marking the current device and giving other sessions a Revoke button. A React account security block.",
  "dependencies": [],
  "registryDependencies": [
    "https://ui.minidev.pro/r/button.json",
    "utils"
  ],
  "files": [
    {
      "path": "registry/ui/session-list.tsx",
      "type": "registry:ui",
      "target": "components/ui/session-list.tsx",
      "content": "\"use client\"\nimport { Button } from \"@/components/ui/button\"\nimport { cn } from \"@/lib/utils\"\n\n/** A list of signed-in devices with a revoke action on every session except the current one. */\ntype Session = { id: string; device: string; location: string; current?: boolean }\n\ntype SessionListProps = {\n  /** Active sessions, most recent first. Defaults to Maya Chen's Lumen sessions. */\n  sessions?: Session[]\n  className?: string\n}\n\nconst SAMPLE_SESSIONS: Session[] = [\n  { id: \"ses_01\", device: \"MacBook Pro · Chrome\", location: \"San Francisco, US · active now\", current: true },\n  { id: \"ses_02\", device: \"iPhone 16 · Lumen for iOS\", location: \"San Francisco, US · 2 hours ago\" },\n  { id: \"ses_03\", device: \"Windows · Edge\", location: \"Lagos, NG · yesterday\" },\n  { id: \"ses_04\", device: \"iPad Air · Safari\", location: \"Chennai, IN · Mar 2, 2026\" },\n]\n\nfunction SessionList({ sessions = SAMPLE_SESSIONS, className }: SessionListProps) {\n  return (\n    <div data-slot=\"session-list\" className={cn(\"w-full max-w-md divide-y divide-border rounded-xl border border-border bg-surface\", className)}>\n      {sessions.map((s) => (\n        <div key={s.id} className=\"flex items-center justify-between gap-3 px-3 py-3 text-sm\">\n          <div>\n            <p className=\"font-medium text-fg\">\n              {s.device} {s.current ? <span className=\"text-xs text-accent\">(this device)</span> : null}\n            </p>\n            <p className=\"text-xs text-fg-muted\">{s.location}</p>\n          </div>\n          {!s.current ? (\n            <Button size=\"sm\" variant=\"outline\">\n              Revoke\n            </Button>\n          ) : null}\n        </div>\n      ))}\n    </div>\n  )\n}\nexport { SessionList }\nexport type { SessionListProps, Session }\n"
    }
  ]
}
