{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "widgets-01",
  "title": "Widget Grid",
  "author": "VenusUI",
  "description": "A home-screen style grid of widgets: weather, world clocks, music, calendar and reminders.",
  "dependencies": [
    "lucide-react"
  ],
  "registryDependencies": [
    "https://venusui.com/r/weather-widget.json",
    "https://venusui.com/r/world-clock.json"
  ],
  "files": [
    {
      "path": "registry/default/blocks/widgets-01/components/widgets-01.tsx",
      "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { Pause, Play } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\nimport { WeatherWidget } from \"@/registry/default/ui/weather-widget\"\nimport { WorldClock } from \"@/registry/default/ui/world-clock\"\n\n// Cover: Unsplash (free under the Unsplash License). Track, events and reminders are made up.\nconst COVER = \"https://images.unsplash.com/photo-1614850523459-c2f4c699c52e?w=200&h=200&fit=crop&auto=format&q=80\"\n\nconst ZONES = [\n  { city: \"London\", timeZone: \"Europe/London\" },\n  { city: \"New York\", timeZone: \"America/New_York\" },\n  { city: \"Tokyo\", timeZone: \"Asia/Tokyo\" },\n]\n\nconst events = [\n  { time: \"10:00\", title: \"Design review\", color: \"bg-violet-500\" },\n  { time: \"13:00\", title: \"Lunch with Marcus\", color: \"bg-emerald-500\" },\n  { time: \"16:30\", title: \"Dentist\", color: \"bg-sky-500\" },\n]\n\nconst tile = \"rounded-[1.75rem] border bg-card p-5 shadow-sm\"\n\n/** A home-screen style grid of widgets: weather, world clocks, music, calendar and reminders. */\nexport function Widgets01() {\n  const [playing, setPlaying] = React.useState(true)\n  const [done, setDone] = React.useState<Record<string, boolean>>({ \"Water the plants\": true })\n  const reminders = [\"Water the plants\", \"Send the invoice\", \"Call Mum\", \"Renew passport\"]\n\n  return (\n    <section aria-labelledby=\"widgets-01-title\" className=\"py-24 sm:py-28\">\n      <div className=\"mx-auto max-w-6xl px-4 sm:px-6\">\n        <h2 id=\"widgets-01-title\" className=\"text-3xl font-semibold tracking-tight sm:text-4xl\">\n          Good morning, Priya\n        </h2>\n        <p className=\"mt-2 text-muted-foreground\">Here’s your day at a glance.</p>\n\n        <div className=\"mt-10 grid gap-4 sm:grid-cols-2 lg:grid-cols-4\">\n          <WeatherWidget\n            className=\"max-w-none sm:row-span-2\"\n            city=\"Lisbon\"\n            condition=\"sunny\"\n            temperature={24}\n            high={27}\n            low={17}\n            summary=\"Sunny and warm\"\n            forecast={[\n              { day: \"Tue\", condition: \"sunny\", high: 27, low: 17 },\n              { day: \"Wed\", condition: \"cloudy\", high: 23, low: 16 },\n              { day: \"Thu\", condition: \"rain\", high: 18, low: 13 },\n              { day: \"Fri\", condition: \"cloudy\", high: 21, low: 14 },\n              { day: \"Sat\", condition: \"sunny\", high: 25, low: 16 },\n            ]}\n          />\n\n          <section aria-label=\"World clock\" className={cn(tile, \"flex items-center justify-center sm:col-span-1 lg:col-span-2\")}>\n            <WorldClock zones={ZONES} className=\"gap-4 [&>li]:w-24\" />\n          </section>\n\n          <section aria-label=\"Now playing\" className={cn(tile, \"flex flex-col\")}>\n            <div className=\"flex items-center gap-3\">\n              <img src={COVER} alt=\"\" className=\"size-14 rounded-xl\" />\n              <div className=\"min-w-0\">\n                <p className=\"truncate text-sm font-semibold\">Night Drive</p>\n                <p className=\"truncate text-sm text-muted-foreground\">The Paper Moons</p>\n              </div>\n            </div>\n            <div className=\"mt-auto pt-5\">\n              <div className=\"h-1 overflow-hidden rounded-full bg-muted\">\n                <div className=\"h-full w-[38%] rounded-full bg-foreground\" />\n              </div>\n              <div className=\"mt-3 flex items-center justify-between\">\n                <span className=\"font-mono text-xs text-muted-foreground tabular-nums\">1:24 / 3:40</span>\n                <button\n                  type=\"button\"\n                  aria-label={playing ? \"Pause Night Drive\" : \"Play Night Drive\"}\n                  onClick={() => setPlaying(!playing)}\n                  className=\"grid size-9 place-items-center rounded-full bg-foreground text-background outline-none focus-visible:ring-3 focus-visible:ring-ring/50\"\n                >\n                  {playing ? <Pause aria-hidden=\"true\" className=\"size-4 fill-current\" /> : <Play aria-hidden=\"true\" className=\"ml-0.5 size-4 fill-current\" />}\n                </button>\n              </div>\n            </div>\n          </section>\n\n          <section aria-label=\"Today's calendar\" className={tile}>\n            <p className=\"text-xs font-semibold tracking-widest text-red-600 uppercase dark:text-red-500\">Monday</p>\n            <p className=\"text-4xl font-light tabular-nums\">16</p>\n            <ul className=\"mt-3 space-y-2\">\n              {events.map((e) => (\n                <li key={e.title} className=\"flex items-center gap-2.5 text-sm\">\n                  <span aria-hidden=\"true\" className={cn(\"h-8 w-1 rounded-full\", e.color)} />\n                  <span>\n                    <span className=\"block font-medium\">{e.title}</span>\n                    <span className=\"block text-xs text-muted-foreground\">{e.time}</span>\n                  </span>\n                </li>\n              ))}\n            </ul>\n          </section>\n\n          <section aria-label=\"Reminders\" className={cn(tile, \"sm:col-span-2 lg:col-span-2\")}>\n            <p className=\"text-sm font-semibold\">\n              Reminders <span className=\"font-normal text-muted-foreground\">· {reminders.filter((r) => !done[r]).length} left</span>\n            </p>\n            <ul className=\"mt-3 grid gap-x-6 gap-y-2 sm:grid-cols-2\">\n              {reminders.map((r) => (\n                <li key={r}>\n                  <label className=\"flex cursor-pointer items-center gap-2.5 text-sm\">\n                    <input\n                      type=\"checkbox\"\n                      checked={Boolean(done[r])}\n                      onChange={() => setDone((d) => ({ ...d, [r]: !d[r] }))}\n                      className=\"size-4 accent-orange-500\"\n                    />\n                    <span className={cn(done[r] && \"text-muted-foreground line-through\")}>{r}</span>\n                  </label>\n                </li>\n              ))}\n            </ul>\n          </section>\n        </div>\n      </div>\n    </section>\n  )\n}\n",
      "type": "registry:component"
    }
  ],
  "meta": {
    "version": "0.1.1"
  },
  "categories": [
    "content"
  ],
  "type": "registry:block"
}