{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "checkpoint-spend-demo",
  "type": "registry:block",
  "title": "Checkpoint: Spend Policy",
  "description": "Approval Flow Animation example, Spend Policy: A studio's company card policy: a flight waits on its receipt, and a casino charge is blocked by merchant category. A take on the flow diagram (flowchart). Fits features sections.",
  "author": "KeyframeUI <https://keyframeui.com>",
  "categories": [
    "features",
    "flow-diagram",
    "steps",
    "ai",
    "interaction",
    "data"
  ],
  "docs": "Live preview, examples and props: https://keyframeui.com/components/checkpoint#checkpoint-spend-demo",
  "registryDependencies": [
    "https://keyframeui.com/r/checkpoint.json"
  ],
  "files": [
    {
      "path": "components/checkpoint-spend-demo.tsx",
      "type": "registry:component",
      "content": "import * as React from \"react\";\n\nimport { Checkpoint, type CheckpointRequest, type CheckpointRule } from \"@/components/ui/checkpoint\";\n\nfunction Glyph({ children }: { children: React.ReactNode }) {\n  return (\n    <svg\n      viewBox=\"0 0 24 24\"\n      fill=\"none\"\n      stroke=\"currentColor\"\n      strokeWidth=\"1.8\"\n      strokeLinecap=\"round\"\n      strokeLinejoin=\"round\"\n      aria-hidden\n    >\n      {children}\n    </svg>\n  );\n}\n\nconst card = (\n  <Glyph>\n    <rect x=\"3\" y=\"5.5\" width=\"18\" height=\"13\" rx=\"2.5\" />\n    <path d=\"M3 10h18M7 15h4\" />\n  </Glyph>\n);\n\n// Tinta, a design studio, and its company card policy. Merchants and people are made up.\nconst RULES: CheckpointRule[] = [\n  {\n    id: \"merchant\",\n    label: \"Merchant\",\n    detail: \"Software, travel, meals, print\",\n    value: \"Allowed\",\n    icon: (\n      <Glyph>\n        <path d=\"M4 9.5L5.5 4h13L20 9.5M4 9.5h16M4 9.5c0 1.5 1.2 2.5 2.7 2.5s2.6-1 2.6-2.5c0 1.5 1.2 2.5 2.7 2.5s2.7-1 2.7-2.5c0 1.5 1.1 2.5 2.6 2.5S20 11 20 9.5M5.5 12v8h13v-8\" />\n      </Glyph>\n    ),\n  },\n  {\n    id: \"limit\",\n    label: \"Per charge\",\n    detail: \"Anything larger goes through a PO\",\n    value: \"≤ $2,000\",\n    icon: (\n      <Glyph>\n        <path d=\"M4 18h16M6.5 18V11M12 18V6M17.5 18v-4\" />\n      </Glyph>\n    ),\n  },\n  {\n    id: \"receipt\",\n    label: \"Receipt\",\n    detail: \"Over $75 needs one, or finance signs\",\n    value: \"> $75\",\n    icon: (\n      <Glyph>\n        <path d=\"M6 3.5h12v17l-2-1.3-2 1.3-2-1.3-2 1.3-2-1.3-2 1.3z\" />\n        <path d=\"M9 8h6M9 11.5h6M9 15h3.5\" />\n      </Glyph>\n    ),\n  },\n  {\n    id: \"budget\",\n    label: \"Budget\",\n    detail: \"Design team, Q4\",\n    value: \"$18,400 left\",\n    icon: (\n      <Glyph>\n        <path d=\"M12 3.5a8.5 8.5 0 1 0 8.5 8.5H12z\" />\n        <path d=\"M15 3.8A8.5 8.5 0 0 1 20.2 9H15z\" />\n      </Glyph>\n    ),\n  },\n];\n\nconst REQUESTS: CheckpointRequest[] = [\n  { id: \"figma\", label: \"FIGMA* ANNUAL\", meta: \"$45.00 · Lena Ortiz\", icon: card },\n  {\n    id: \"flight\",\n    label: \"NORDAIR 0742\",\n    meta: \"$1,386.40 · Sam Okafor, client visit in Oslo\",\n    verdicts: { receipt: \"hold\" },\n    icon: card,\n  },\n  {\n    id: \"casino\",\n    label: \"LUCKY STAR CASINO\",\n    meta: \"$600.00 · Sam Okafor\",\n    verdicts: { merchant: \"block\" },\n    reason: \"Gambling isn't covered\",\n    icon: card,\n  },\n];\n\nexport function CheckpointSpendDemo() {\n  return (\n    <div className=\"w-full max-w-xl rounded-[26px] border border-zinc-950/[0.08] bg-white p-1.5 shadow-[0_1px_2px_rgba(0,0,0,0.04)] dark:border-white/10 dark:bg-zinc-950\">\n      <div className=\"rounded-[20px] bg-zinc-50 bg-[radial-gradient(120%_70%_at_50%_0%,rgba(10,159,92,0.08),transparent_70%)] p-4 sm:p-5 dark:bg-white/[0.03] dark:bg-[radial-gradient(120%_70%_at_50%_0%,rgba(50,213,131,0.08),transparent_70%)]\">\n        <div className=\"mb-4 flex items-baseline justify-between gap-4 px-0.5\">\n          <p className=\"text-[13px] font-semibold tracking-tight text-zinc-950 dark:text-zinc-100\">\n            Card policy <span className=\"font-normal text-zinc-500 dark:text-zinc-400\">· Tinta Studio</span>\n          </p>\n          <p className=\"text-[12px] text-zinc-500 tabular-nums dark:text-zinc-400\">3 cards live</p>\n        </div>\n        <Checkpoint\n          rules={RULES}\n          requests={REQUESTS}\n          approver=\"Finance\"\n          className=\"[--checkpoint-accent:#0a9f5c] dark:[--checkpoint-accent:#32d583]\"\n        />\n      </div>\n    </div>\n  );\n}\n"
    }
  ]
}