{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "drawer-delivery",
  "title": "Drawer: truck route",
  "description": "An example of Drawer: truck route.",
  "dependencies": [],
  "registryDependencies": [
    "@keyline-ui/button",
    "@keyline-ui/drawer",
    "@keyline-ui/keyline"
  ],
  "files": [
    {
      "path": "src/registry/keyline/examples/drawer-delivery.tsx",
      "content": "\"use client\";\n\nimport { useState } from \"react\";\nimport { Button } from \"../ui/button\";\nimport {\n  Drawer,\n  DrawerBody,\n  DrawerClose,\n  DrawerPopup,\n  DrawerDescription,\n  DrawerFooter,\n  DrawerHeader,\n  DrawerTitle,\n  DrawerTrigger,\n} from \"../ui/drawer\";\n\nconst STOPS = [\n  [\"9:40\", \"Left the warehouse\"],\n  [\"10:15\", \"Scranton Business Park, 40 cases\"],\n  [\"11:05\", \"Lackawanna County, 120 cases\"],\n  [\"12:30\", \"Lunch at Cugino's\"],\n  [\"13:20\", \"Vance Refrigeration, held: no one to sign\"],\n  [\"14:10\", \"Blue Cross of Pennsylvania, 60 cases\"],\n];\n\nexport function TruckRoute() {\n  const [called, setCalled] = useState(false);\n\n  return (\n    <div className=\"grid gap-4\">\n      <Drawer>\n        <DrawerTrigger render={<Button className=\"justify-self-start\" />}>Darryl&apos;s route</DrawerTrigger>\n        <DrawerPopup size=\"min(70vh, 480px)\">\n          <DrawerHeader>\n            <DrawerTitle>Darryl&apos;s route today</DrawerTitle>\n            <DrawerDescription>Swipe down, press Escape or Close to put it away.</DrawerDescription>\n          </DrawerHeader>\n          <DrawerBody>\n            <ol className=\"m-0 grid list-none gap-3 p-0 text-[14px]\">\n              {STOPS.map(([at, what]) => (\n                <li key={at} className=\"grid grid-cols-[3.5rem_1fr] gap-3\">\n                  <span className=\"font-kl-mono text-[13px] text-kl-ink-2\">{at}</span>\n                  <span>{what}</span>\n                </li>\n              ))}\n            </ol>\n          </DrawerBody>\n          <DrawerFooter>\n            <DrawerClose render={<Button layout=\"cell\" />}>Close</DrawerClose>\n            <DrawerClose render={<Button layout=\"cell\" variant=\"primary\" onClick={() => setCalled(true)} />}>\n              Call Bob Vance\n            </DrawerClose>\n          </DrawerFooter>\n        </DrawerPopup>\n      </Drawer>\n      <p role=\"status\" className=\"m-0 min-h-5 text-[14px] text-kl-ink-2\">\n        {called ? \"Calling Vance Refrigeration about the held delivery.\" : \"\"}\n      </p>\n    </div>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/keyline/examples/drawer-delivery.tsx"
    }
  ],
  "categories": [
    "drawer"
  ],
  "type": "registry:block"
}