{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "card-customers-customers-2-2",
  "type": "registry:block",
  "title": "Client metrics",
  "description": "Workspace card from the overtrue/ui workspace examples. Editable source, scoped styles, and demo interactions.",
  "categories": [
    "cards",
    "workspace"
  ],
  "registryDependencies": [
    "https://ui.overtrue.xyz/r/overtrue-card-foundation.json"
  ],
  "files": [
    {
      "path": "src/blocks/registry/customers-customers-2-2.tsx",
      "type": "registry:component",
      "target": "components/overtrue/blocks/customers-customers-2-2.tsx",
      "content": "\"use client\";\nimport { BlockFrame } from \"./runtime/blocks/frame\";\nimport \"./runtime/cards.css\";\n// Extracted from src/components/overtrue/scenes/overview.tsx:343.\nimport { useWorkData } from \"./runtime/components/overtrue/workspace/work-data\";\nimport { useState } from \"react\";\nimport { Link } from \"react-router-dom\";\nimport { SceneCard, Pill, Person } from \"./runtime/components/overtrue/scenes/shared\";\n\nfunction CardExample() {\n  const { clients } = useWorkData();\n  const [stage] = useState(\"All clients\");\n  const [query] = useState(\"\");\n  const shown = clients.filter(\n    (client) =>\n      (stage === \"All clients\" || client.stage === stage) &&\n      `${client.name} ${client.contact} ${client.email}`\n        .toLowerCase()\n        .includes(query.trim().toLowerCase()),\n  );\n\n  return (\n    <>\n      <div\n        className=\"overtrue-block-content\"\n        data-workspace-page=\"client-overview\"\n      >\n        <SceneCard className=\"scene-table-card\">\n          <div\n            className=\"scene-table-wrap\"\n            tabIndex={0}\n            role=\"region\"\n            aria-label=\"Client directory\"\n          >\n            <table className=\"scene-table\">\n              <thead>\n                <tr>\n                  <th>Client</th>\n                  <th>Relationship owner</th>\n                  <th>Stage</th>\n                  <th className=\"scene-number\">Contract value</th>\n                </tr>\n              </thead>\n              <tbody>\n                {shown.map((client) => (\n                  <tr key={client.id}>\n                    <td>\n                      <Link\n                        to={`/datatables?q=${encodeURIComponent(client.name)}`}\n                      >\n                        <strong>{client.name}</strong>\n                      </Link>\n                      <small>{client.email}</small>\n                    </td>\n                    <td>\n                      <Person name={client.contact} />\n                    </td>\n                    <td>\n                      <Pill>{client.stage}</Pill>\n                    </td>\n                    <td className=\"scene-number\">\n                      ${client.value.toLocaleString(\"en-US\")}\n                    </td>\n                  </tr>\n                ))}\n              </tbody>\n            </table>\n            {!shown.length && (\n              <p className=\"scene-empty\">No clients in this view.</p>\n            )}\n          </div>\n          <div className=\"scene-table-summary\">\n            {shown.length} of {clients.length} relationships\n          </div>\n        </SceneCard>\n      </div>\n    </>\n  );\n}\n\nexport default function Block() { return <BlockFrame><CardExample /></BlockFrame>; }\n"
    }
  ],
  "docs": "Documentation: https://ui.overtrue.xyz/blocks/customers-customers-2-2. Includes the shared card foundation and hosted demo imagery. Replace sample data and navigation with your application data."
}
