{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"testimonial-featured","type":"registry:block","title":"Featured testimonial","description":"One large story at a time with the number it changed, arrows and dots, and the customers' logos below.","dependencies":["lucide-react"],"registryDependencies":["https://dashral.com/r/utils.json","https://dashral.com/r/avatar.json","https://dashral.com/r/button.json"],"files":[{"path":"registry/dashral/blocks/testimonial-featured.tsx","type":"registry:file","target":"components/dashral/blocks/testimonial-featured.tsx","content":"\"use client\"\n\nimport { useState } from \"react\"\nimport { ChevronLeft, ChevronRight, Quote } from \"lucide-react\"\nimport { Avatar } from \"../avatar\"\nimport { Button } from \"../button\"\n\nexport type Story = { text: string; name: string; role: string; company?: string; src?: string; stat?: { value: string; label: string } }\n\nconst sampleQuotes: Story[] = [\n  {\n    text: \"We used to argue about whose spreadsheet was right. Now there's one dashboard, and Monday's meeting takes fifteen minutes instead of an hour.\",\n    name: \"Olivia Martin\",\n    role: \"Head of Operations\",\n    company: \"Acme\",\n    src: \"https://randomuser.me/api/portraits/women/44.jpg\",\n    stat: { value: \"4×\", label: \"shorter weekly meetings\" },\n  },\n  {\n    text: \"The alerts caught a broken checkout on a Sunday night. That one message paid for the whole year.\",\n    name: \"Liam Johnson\",\n    role: \"Engineering Manager\",\n    company: \"Globex\",\n    src: \"https://randomuser.me/api/portraits/men/32.jpg\",\n    stat: { value: \"$38K\", label: \"saved in one weekend\" },\n  },\n  {\n    text: \"Our finance team finally trusts the numbers. The exports open in Excel exactly the way they expect.\",\n    name: \"Budi Santoso\",\n    role: \"CFO\",\n    company: \"PT Nusantara\",\n    stat: { value: \"12 h\", label: \"of reporting saved a month\" },\n  },\n]\nconst sampleLogos: React.ReactNode[] = [\"Acme\", \"Globex\", \"Initech\", \"Umbrella\", \"Hooli\", \"Nusantara\"]\n\n/**\n * One customer story at a time, large: the quote, who said it and the number it changed, with arrows and dots to\n * read the next. The companies that use the product sit underneath. Every part comes from props.\n */\nexport function TestimonialFeatured({\n  quotes = sampleQuotes,\n  logosTitle = \"Trusted by teams at\",\n  logos = sampleLogos,\n}: {\n  quotes?: Story[]\n  logosTitle?: string\n  /** The companies under it: names, or logos of their own; none hides the row. */\n  logos?: React.ReactNode[]\n}) {\n  const [index, setIndex] = useState(0)\n  const quote = quotes[index]!\n  const go = (step: number) => setIndex((index + step + quotes.length) % quotes.length)\n\n  return (\n    <section className=\"bg-background px-4 py-16 sm:px-6 sm:py-24\">\n      <div className=\"mx-auto max-w-4xl\">\n        <figure aria-roledescription=\"carousel\" aria-label=\"Customer stories\" className=\"relative rounded-3xl border bg-card p-8 sm:p-12\">\n          <Quote aria-hidden className=\"size-8 fill-primary/15 text-primary-text\" />\n          {/* Keyed by the story, so each one fades in. */}\n          <div key={index} aria-live=\"polite\" className=\"animate-in fade-in-0 slide-in-from-bottom-1 duration-(--duration-standard) ease-enter\">\n            <blockquote className=\"mt-6 text-xl leading-relaxed font-medium tracking-tight text-pretty sm:text-2xl\">“{quote.text}”</blockquote>\n            <figcaption className=\"mt-8 flex flex-wrap items-center justify-between gap-6\">\n              <span className=\"flex items-center gap-3\">\n                <Avatar src={quote.src} name={quote.name} alt=\"\" size=\"lg\" />\n                <span className=\"grid\">\n                  <span className=\"font-semibold\">{quote.name}</span>\n                  <span className=\"text-sm text-muted-foreground\">{quote.company ? `${quote.role}, ${quote.company}` : quote.role}</span>\n                </span>\n              </span>\n              {quote.stat && (\n                <span className=\"grid text-end\">\n                  <span className=\"text-3xl font-semibold tracking-tight text-primary-text\">{quote.stat.value}</span>\n                  <span className=\"text-sm text-muted-foreground\">{quote.stat.label}</span>\n                </span>\n              )}\n            </figcaption>\n          </div>\n          {quotes.length > 1 && (\n            <div className=\"mt-8 flex items-center justify-between border-t pt-6\">\n              <div className=\"flex gap-1.5\" role=\"group\" aria-label=\"Choose a story\">\n                {quotes.map((q, i) => (\n                  <button\n                    key={q.name}\n                    type=\"button\"\n                    aria-label={`Story ${i + 1}: ${q.name}`}\n                    aria-current={i === index || undefined}\n                    onClick={() => setIndex(i)}\n                    className={`h-1.5 rounded-full transition-[width,background-color] duration-(--duration-standard) ease-standard outline-none focus-visible:ring-2 focus-visible:ring-ring/50 ${i === index ? \"w-6 bg-primary\" : \"w-1.5 bg-border hover:bg-muted-foreground/50\"}`}\n                  />\n                ))}\n              </div>\n              <div className=\"flex gap-2\">\n                <Button variant=\"outline\" size=\"icon-sm\" aria-label=\"Previous story\" onClick={() => go(-1)}>\n                  <ChevronLeft className=\"rtl:-scale-x-100\" />\n                </Button>\n                <Button variant=\"outline\" size=\"icon-sm\" aria-label=\"Next story\" onClick={() => go(1)}>\n                  <ChevronRight className=\"rtl:-scale-x-100\" />\n                </Button>\n              </div>\n            </div>\n          )}\n        </figure>\n        {logos.length > 0 && (\n          <>\n            <p className=\"mt-12 text-center text-sm text-muted-foreground\">{logosTitle}</p>\n            <ul className=\"mt-5 flex flex-wrap items-center justify-center gap-x-10 gap-y-4\">\n              {logos.map((logo, i) => (\n                <li key={i} className=\"text-lg font-semibold tracking-tight text-muted-foreground/70\">\n                  {logo}\n                </li>\n              ))}\n            </ul>\n          </>\n        )}\n      </div>\n    </section>\n  )\n}\n"}],"cssVars":{"theme":{"color-primary-text":"var(--primary-text, var(--primary))","ease-standard":"var(--ease-standard)","ease-enter":"var(--ease-enter)","ease-exit":"var(--ease-exit)","ease-spring":"var(--ease-spring)"},"light":{"duration-fast":"160ms","duration-standard":"240ms","duration-considered":"480ms","ease-standard":"cubic-bezier(0.2, 0, 0, 1)","ease-enter":"cubic-bezier(0, 0, 0, 1)","ease-exit":"cubic-bezier(0.3, 0, 1, 1)","ease-spring":"linear(0, 0.071 4%, 0.234 8%, 0.433 12%, 0.626 17%, 0.791 21%, 0.917 25%, 1.004 29%, 1.055 33%, 1.079 38%, 1.083 42%, 1.075 46%, 1.06 50%, 1.043 54%, 1.027 58%, 1.015 62%, 1.005 67%, 0.998 71%, 0.995 75%, 0.993 79%, 0.993 83%, 0.994 88%, 0.995 92%, 0.997 96%, 1)"},"dark":{}}}