{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "onboarding-02",
  "description": "The first page of an empty workspace with quick starts, an empty dashboards list, setup progress and help links.",
  "registryDependencies": [
    "button",
    "https://www.dashboardblocks.com/r/radix/block-state.json",
    "https://www.dashboardblocks.com/r/radix/checklist.json",
    "https://www.dashboardblocks.com/r/radix/link.json",
    "https://www.dashboardblocks.com/r/radix/onboarding.json",
    "https://www.dashboardblocks.com/r/radix/progress-bar.json"
  ],
  "files": [
    {
      "path": "registry/components/dashboardblocks/onboarding/onboarding-02.tsx",
      "content": "'use client'\n\nimport {\n  BlockMessage,\n  BlockReady,\n  BlockStateProvider,\n  BlockStateRows,\n  type BlockStateProps,\n  type BlockStatus,\n  getBlockState,\n} from '@/registry/components/dashboardblocks/block-state'\nimport {\n  type StepState,\n  describeChecklistProgress,\n  getChecklistProgress,\n  getNextStep,\n  StepIndicator,\n  stepStateConfig,\n} from '@/registry/components/dashboardblocks/checklist'\nimport { Link } from '@/registry/components/dashboardblocks/link'\nimport { ActionCard } from '@/registry/components/dashboardblocks/onboarding'\nimport { ProgressBar } from '@/registry/components/dashboardblocks/progress-bar'\nimport { IconPlaceholder } from '@/registry/icons/icon-placeholder'\nimport { type ReactNode, useId } from 'react'\n\nimport { buttonVariants } from '@/components/ui/button'\n\nimport { cn } from '@/lib/utils'\n\ninterface QuickStart {\n  badge?: string\n  description: string\n  duration?: string\n  href: string\n  icon: ReactNode\n  id: string\n  title: string\n}\n\ninterface SetupTask {\n  href?: string\n  id: string\n  state: StepState\n  title: string\n}\n\ninterface HelpLink {\n  description: string\n  href: string\n  icon: ReactNode\n  id: string\n  title: string\n}\n\ninterface Onboarding2Props extends BlockStateProps {\n  firstName: string\n  help: HelpLink[]\n  quickStarts: QuickStart[]\n  /** Loading and error apply to the setup tasks. */\n  status?: BlockStatus\n  /** Leave out, or pass none, to show the setup tasks' empty state. */\n  tasks?: SetupTask[]\n  templatesHref: string\n  tourHref: string\n  workspace: string\n}\n\nconst exampleProps: Onboarding2Props = {\n  firstName: 'Priya',\n  help: [\n    {\n      description: 'Guides for every data source',\n      href: '/docs',\n      icon: (\n        <IconPlaceholder\n          lucide='BookOpenIcon'\n          tabler='IconBook'\n          hugeicons='BookOpen02Icon'\n          phosphor='BookOpenIcon'\n          remixicon='RiBookOpenLine'\n        />\n      ),\n      id: 'docs',\n      title: 'Documentation',\n    },\n    {\n      description: 'Questions answered by other teams',\n      href: '/community',\n      icon: (\n        <IconPlaceholder\n          lucide='MessageCircleIcon'\n          tabler='IconMessageCircle'\n          hugeicons='BubbleChatIcon'\n          phosphor='ChatCircleIcon'\n          remixicon='RiChat3Line'\n        />\n      ),\n      id: 'community',\n      title: 'Community forum',\n    },\n    {\n      description: 'A 20-minute call with our team',\n      href: '/book-a-call',\n      icon: (\n        <IconPlaceholder\n          lucide='HeadphonesIcon'\n          tabler='IconHeadphones'\n          hugeicons='HeadphonesIcon'\n          phosphor='HeadphonesIcon'\n          remixicon='RiHeadphoneLine'\n        />\n      ),\n      id: 'call',\n      title: 'Book a setup call',\n    },\n  ],\n  quickStarts: [\n    {\n      badge: 'Recommended',\n      description: 'Sync Postgres, Stripe, HubSpot or 40 other sources on a schedule.',\n      duration: 'About 3 min',\n      href: '/sources/new',\n      icon: (\n        <IconPlaceholder\n          lucide='PlugIcon'\n          tabler='IconPlug'\n          hugeicons='PlugSocketIcon'\n          phosphor='PlugIcon'\n          remixicon='RiPlugLine'\n        />\n      ),\n      id: 'connect',\n      title: 'Connect a data source',\n    },\n    {\n      description: 'Import a CSV or Excel file for a quick first look.',\n      duration: 'About 1 min',\n      href: '/import',\n      icon: (\n        <IconPlaceholder\n          lucide='UploadIcon'\n          tabler='IconUpload'\n          hugeicons='Upload01Icon'\n          phosphor='UploadSimpleIcon'\n          remixicon='RiUploadLine'\n        />\n      ),\n      id: 'upload',\n      title: 'Upload a spreadsheet',\n    },\n    {\n      description: \"Click around a coffee chain's sales while your own data syncs.\",\n      duration: 'No setup',\n      href: '/samples/coffee-chain',\n      icon: (\n        <IconPlaceholder\n          lucide='LayoutDashboardIcon'\n          tabler='IconDashboard'\n          hugeicons='DashboardSquare01Icon'\n          phosphor='SquaresFourIcon'\n          remixicon='RiDashboardLine'\n        />\n      ),\n      id: 'sample',\n      title: 'Explore a sample dashboard',\n    },\n    {\n      description: \"Bring in the people who'll build and read dashboards with you.\",\n      duration: 'About 1 min',\n      href: '/settings/members',\n      icon: (\n        <IconPlaceholder\n          lucide='UserPlusIcon'\n          tabler='IconUserPlus'\n          hugeicons='UserAdd01Icon'\n          phosphor='UserPlusIcon'\n          remixicon='RiUserAddLine'\n        />\n      ),\n      id: 'invite',\n      title: 'Invite your team',\n    },\n  ],\n  tasks: [\n    { id: 'workspace', state: 'done', title: 'Create your workspace' },\n    {\n      href: '/sources/new',\n      id: 'source',\n      state: 'current',\n      title: 'Connect a data source',\n    },\n    {\n      href: '/dashboards/new',\n      id: 'dashboard',\n      state: 'todo',\n      title: 'Build a dashboard',\n    },\n    { href: '/settings/members', id: 'team', state: 'todo', title: 'Invite your team' },\n    { href: '/reports/new', id: 'report', state: 'todo', title: 'Schedule a report' },\n  ],\n  templatesHref: '/templates',\n  tourHref: '/tour',\n  workspace: 'Fernhill Coffee',\n}\n\nconst Onboarding2 = (props: Onboarding2Props) => {\n  const {\n    firstName,\n    help,\n    quickStarts,\n    errorMessage,\n    status,\n    tasks = [],\n    templatesHref,\n    tourHref,\n    workspace,\n  } = props\n  const id = useId()\n  const state = getBlockState(status, tasks)\n  const progress = getChecklistProgress(tasks)\n  const next = getNextStep(tasks)\n\n  return (\n    <BlockStateProvider errorMessage={errorMessage} state={state}>\n      <div className='bg-background @container/page flex min-h-svh flex-col'>\n        <div className='mx-auto flex w-full max-w-6xl flex-col gap-8 p-4 sm:p-6 lg:p-8'>\n          <header className='flex flex-col gap-4 @3xl/page:flex-row @3xl/page:items-end @3xl/page:justify-between'>\n            <div className='flex flex-col gap-1'>\n              <p className='text-muted-foreground text-sm'>{workspace}</p>\n              <h1 className='text-2xl font-semibold tracking-tight'>\n                Welcome, {firstName}\n              </h1>\n              <p className='text-muted-foreground max-w-prose text-sm text-pretty'>\n                Your workspace is empty for now. Bring in some data and your first\n                dashboard can be ready in minutes.\n              </p>\n            </div>\n            <Link\n              href={tourHref}\n              className={cn(\n                buttonVariants({ size: 'sm', variant: 'outline' }),\n                'self-start @3xl/page:self-auto',\n              )}\n            >\n              <IconPlaceholder\n                lucide='CirclePlayIcon'\n                tabler='IconPlayerPlay'\n                hugeicons='PlayCircleIcon'\n                phosphor='PlayCircleIcon'\n                remixicon='RiPlayCircleLine'\n                data-icon='inline-start'\n              />\n              Watch the tour\n            </Link>\n          </header>\n          <div className='grid gap-10 @4xl/page:grid-cols-[minmax(0,1fr)_20rem]'>\n            <div className='flex flex-col gap-10'>\n              <section aria-labelledby={`${id}-start`} className='flex flex-col gap-3'>\n                <div className='flex flex-col gap-0.5'>\n                  <h2 id={`${id}-start`} className='font-semibold tracking-tight'>\n                    Start with your data\n                  </h2>\n                  <p className='text-muted-foreground text-sm'>\n                    Pick any of these. The others will wait.\n                  </p>\n                </div>\n                <ul className='grid gap-x-8 gap-y-3 @2xl/page:grid-cols-2'>\n                  {quickStarts.map((action) => (\n                    <li key={action.id}>\n                      <ActionCard\n                        badge={action.badge}\n                        description={action.description}\n                        href={action.href}\n                        icon={action.icon}\n                        meta={action.duration}\n                        title={action.title}\n                      />\n                    </li>\n                  ))}\n                </ul>\n              </section>\n              <section\n                aria-labelledby={`${id}-dashboards`}\n                className='flex flex-col gap-3'\n              >\n                <h2 id={`${id}-dashboards`} className='font-semibold tracking-tight'>\n                  Dashboards\n                </h2>\n                <div className='rounded-xl border border-dashed'>\n                  <BlockMessage\n                    icon={\n                      <IconPlaceholder\n                        lucide='LayoutDashboardIcon'\n                        tabler='IconDashboard'\n                        hugeicons='DashboardSquare01Icon'\n                        phosphor='SquaresFourIcon'\n                        remixicon='RiDashboardLine'\n                      />\n                    }\n                    title='No dashboards yet'\n                    description='Dashboards you build or start from a template show up here.'\n                    action={\n                      <Link\n                        href={templatesHref}\n                        className={buttonVariants({ size: 'sm', variant: 'outline' })}\n                      >\n                        Browse templates\n                        <IconPlaceholder\n                          lucide='ArrowRightIcon'\n                          tabler='IconArrowRight'\n                          hugeicons='ArrowRight01Icon'\n                          phosphor='ArrowRightIcon'\n                          remixicon='RiArrowRightLine'\n                          data-icon='inline-end'\n                        />\n                      </Link>\n                    }\n                  />\n                </div>\n              </section>\n            </div>\n            <aside aria-label='Setup and help' className='flex flex-col gap-10'>\n              <section aria-labelledby={`${id}-setup`} className='flex flex-col gap-3'>\n                <div className='flex flex-col gap-0.5'>\n                  <h2 id={`${id}-setup`} className='font-semibold tracking-tight'>\n                    Set up {workspace}\n                  </h2>\n                  <BlockReady className='text-sm'>\n                    <p className='text-muted-foreground text-sm'>\n                      {describeChecklistProgress(progress)}.\n                      {next && ` Next: ${next.title}.`}\n                    </p>\n                  </BlockReady>\n                </div>\n                {state === 'loading' && <ProgressBar className='h-1.5' percentage={0} />}\n                <BlockStateRows className='border-t' rows={5} />\n                {!state && (\n                  <>\n                    <div\n                      role='progressbar'\n                      aria-label={`Set up ${workspace}`}\n                      aria-valuemax={progress.total}\n                      aria-valuemin={0}\n                      aria-valuenow={progress.done}\n                      aria-valuetext={describeChecklistProgress(progress)}\n                    >\n                      <ProgressBar\n                        className='h-1.5'\n                        fillClassName='motion-reduce:transition-none'\n                        percentage={progress.percentage}\n                      />\n                    </div>\n                    <ol className='border-t'>\n                      {tasks.map((task, index) => (\n                        <li\n                          key={task.id}\n                          aria-current={task.state === 'current' ? 'step' : undefined}\n                          className='flex items-center gap-3 border-b py-2.5 text-sm'\n                        >\n                          <StepIndicator index={index + 1} state={task.state} />\n                          {task.href && task.state !== 'done' ? (\n                            <Link\n                              href={task.href}\n                              className={cn(\n                                'underline-offset-4 hover:underline',\n                                task.state === 'current' && 'font-medium',\n                              )}\n                            >\n                              {task.title}\n                            </Link>\n                          ) : (\n                            <span className='text-muted-foreground'>{task.title}</span>\n                          )}\n                          <span className='sr-only'>\n                            , {stepStateConfig[task.state].label}\n                          </span>\n                        </li>\n                      ))}\n                    </ol>\n                  </>\n                )}\n              </section>\n              <section aria-labelledby={`${id}-help`} className='flex flex-col gap-3'>\n                <h2 id={`${id}-help`} className='font-semibold tracking-tight'>\n                  Learn the basics\n                </h2>\n                <ul className='border-t'>\n                  {help.map((link) => (\n                    <li key={link.id} className='border-b'>\n                      <Link\n                        href={link.href}\n                        className='group/help focus-visible:ring-ring/50 flex items-start gap-3 rounded-md py-2.5 outline-none focus-visible:ring-3'\n                      >\n                        <span\n                          aria-hidden\n                          className='text-muted-foreground group-hover/help:text-foreground mt-0.5 flex shrink-0 transition-colors [&_svg]:size-4'\n                        >\n                          {link.icon}\n                        </span>\n                        <span className='flex min-w-0 flex-col gap-0.5'>\n                          <span className='text-sm font-medium underline-offset-4 group-hover/help:underline'>\n                            {link.title}\n                          </span>\n                          <span className='text-muted-foreground text-sm'>\n                            {link.description}\n                          </span>\n                        </span>\n                      </Link>\n                    </li>\n                  ))}\n                </ul>\n              </section>\n            </aside>\n          </div>\n        </div>\n      </div>\n    </BlockStateProvider>\n  )\n}\n\nexport { Onboarding2, exampleProps as onboarding2ExampleProps, type Onboarding2Props }\n",
      "type": "registry:component",
      "target": "@components/dashboardblocks/onboarding/onboarding-02.tsx"
    }
  ],
  "meta": {
    "shows": "The first page of an empty workspace with quick starts, an empty dashboards list, setup progress and help links.",
    "size": "page",
    "usedWith": [
      "onboarding-01"
    ],
    "component": "Onboarding2",
    "props": "{ firstName: string; help: { description: string; href: string; icon: ReactNode; id: string; title: string }[]; quickStarts: { badge?: string; description: string; duration?: string; href: string; icon: ReactNode; id: string; title: string }[]; status?: \"loading\" | \"error\"; tasks?: { href?: string; id: string; state: \"done\" | \"todo\" | \"current\" | \"skipped\"; title: string }[]; templatesHref: string; tourHref: string; workspace: string; errorMessage?: string }"
  },
  "type": "registry:component"
}
