{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "block-sign-in",
  "type": "registry:block",
  "title": "Sign in",
  "description": "A sign-in screen in two raised cards: the form, with its help links and keyboard hints, beside a picture of the product.",
  "dependencies": [
    "@remixicon/react@^4.9.0"
  ],
  "registryDependencies": [
    "https://wideset.co/r/avatar.json",
    "https://wideset.co/r/block-styles.json",
    "https://wideset.co/r/breadcrumbs.json",
    "https://wideset.co/r/button.json",
    "https://wideset.co/r/checkbox.json",
    "https://wideset.co/r/divider.json",
    "https://wideset.co/r/filter-button.json",
    "https://wideset.co/r/form-field.json",
    "https://wideset.co/r/icon-button.json",
    "https://wideset.co/r/select.json",
    "https://wideset.co/r/sidebar.json",
    "https://wideset.co/r/status-badge.json",
    "https://wideset.co/r/tabs.json",
    "https://wideset.co/r/tag.json",
    "https://wideset.co/r/text-input.json",
    "https://wideset.co/r/utils.json"
  ],
  "files": [
    {
      "path": "src/blocks/sign-in/app-icon.tsx",
      "type": "registry:file",
      "target": "blocks/wideset/sign-in/app-icon.tsx",
      "content": "'use client';\n\nimport { cn } from '@/lib/wideset/utils';\nimport { useId } from 'react';\n\n/** Figma's W, in its own box (24.97 × 13.87). */\nconst W =\n  'M21.377 0C21.377 0 18.14 9.233 18.017 9.574C17.95 9.402 14.331 0 14.331 0H11.069C11.069 0 7.462 9.574 7.41 9.703C7.353 9.57 3.508 0 3.508 0H0L5.853 13.871H9.059L12.716 4.054H12.773C12.81 4.149 16.51 13.871 16.51 13.871H19.827C19.827 13.871 24.932 0.114 24.967 0H21.377Z';\n\n/** Figma's tile, 46.24 × 46.89 with a 16.18 radius, at its place in the 47.25 × 48 icon. */\nconst TILE = { x: 0.69, y: 0.81, width: 46.24, height: 46.89, rx: 16.18 };\n\n// Light-palette primitives: the icon looks the same in dark mode.\nconst INDIGO_300 = '[stop-color:var(--ws-colors-light-indigo-300)]';\nconst INDIGO_400 = '[stop-color:var(--ws-colors-light-indigo-400)]';\nconst INDIGO_500 = '[stop-color:var(--ws-colors-light-indigo-500)]';\nconst INDIGO_600 = '[stop-color:var(--ws-colors-light-indigo-600)]';\nconst INDIGO_700 = '[stop-color:var(--ws-colors-light-indigo-700)]';\nconst PURPLE_200 = '[stop-color:var(--ws-colors-light-purple-200)]';\nconst PURPLE_400 = '[stop-color:var(--ws-colors-light-purple-400)]';\nconst WHITE = '[stop-color:var(--ws-colors-light-neutral-0)]';\n\n/**\n * The app icon at the top of a sign-in card: Figma's glass tile, a W lit from below. It is not the\n * flat brand mark of an app's sidebar, and it keeps its colours in dark mode, so it draws with the\n * light palette's primitives. Figma lights the tile with blurred, blended shapes; here that light is\n * two gradients in the nearest tokens. Decorative: the title beside it names the product.\n */\nexport function AppIcon({ className }: { className?: string }) {\n  const id = useId();\n  const url = (name: string) => `url(#${id}${name})`;\n\n  return (\n    <svg\n      viewBox=\"0 0 47.25 48\"\n      preserveAspectRatio=\"none\"\n      aria-hidden=\"true\"\n      className={cn('size-ws-18 shrink-0', className)}\n    >\n      <defs>\n        <clipPath id={`${id}tile`}>\n          <rect {...TILE} />\n        </clipPath>\n        {/* The light rising from the bottom edge. */}\n        <linearGradient id={`${id}glow`} x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\">\n          <stop offset=\"0\" stopOpacity={0.06} className={INDIGO_600} />\n          <stop offset=\"0.4\" stopOpacity={0.1} className={INDIGO_600} />\n          <stop offset=\"0.6\" stopOpacity={0.38} className={INDIGO_600} />\n          <stop offset=\"0.75\" stopOpacity={0.62} className={INDIGO_600} />\n          <stop offset=\"0.86\" stopOpacity={0.85} className={INDIGO_600} />\n          <stop offset=\"0.93\" stopOpacity={0.9} className={INDIGO_500} />\n          <stop offset=\"0.97\" className={INDIGO_400} />\n          <stop offset=\"1\" className={INDIGO_300} />\n        </linearGradient>\n        {/* Figma's radial fill: centred above the tile, so its rim lights the lower corners. */}\n        <radialGradient\n          id={`${id}bowl`}\n          cx=\"0.5\"\n          cy=\"-0.111\"\n          r=\"1\"\n          gradientTransform=\"matrix(0.8005 0 0 1.4758 0.0998 0.0528)\"\n        >\n          <stop offset=\"0.55\" stopOpacity={0} className={INDIGO_600} />\n          <stop offset=\"0.79\" className={INDIGO_600} />\n          <stop offset=\"0.86\" className={INDIGO_400} />\n        </radialGradient>\n        <linearGradient id={`${id}w`} x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\">\n          <stop offset=\"0\" className={PURPLE_200} />\n          <stop offset=\"0.5\" stopOpacity={0.56} className={INDIGO_500} />\n          <stop offset=\"1\" stopOpacity={0.15} className={INDIGO_700} />\n        </linearGradient>\n        {/* Figma's two glass highlights: a lilac line along the top, a white one along the bottom. */}\n        <linearGradient id={`${id}rim`} x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\">\n          <stop offset=\"0\" stopOpacity={0.3} className={PURPLE_400} />\n          <stop offset=\"0.15\" stopOpacity={0} className={PURPLE_400} />\n          <stop offset=\"0.92\" stopOpacity={0} className={WHITE} />\n          <stop offset=\"1\" stopOpacity={0.2} className={WHITE} />\n        </linearGradient>\n      </defs>\n      <g clipPath={url('tile')}>\n        <rect {...TILE} className=\"fill-(--ws-colors-light-brand-1100)\" />\n        <rect {...TILE} fill={url('bowl')} />\n        <rect {...TILE} fill={url('glow')} />\n      </g>\n      <rect\n        x=\"0.23\"\n        y=\"0.23\"\n        width=\"46.79\"\n        height=\"47.54\"\n        rx=\"16.18\"\n        fill=\"none\"\n        stroke={url('rim')}\n        strokeWidth=\"0.46\"\n      />\n      <path transform=\"translate(11.32 18.61)\" d={W} fill={url('w')} />\n    </svg>\n  );\n}\n"
    },
    {
      "path": "src/blocks/sign-in/auth-card.tsx",
      "type": "registry:file",
      "target": "blocks/wideset/sign-in/auth-card.tsx",
      "content": "'use client';\n\nimport {\n  type RemixiconComponentType,\n  RiArrowDownSLine,\n  RiArrowLeftLine,\n  RiArrowUpSLine,\n} from '@remixicon/react';\nimport { cn } from '@/lib/wideset/utils';\nimport { type AnchorHTMLAttributes, type ReactNode, useEffect, useRef } from 'react';\n\nimport { AppIcon } from './app-icon';\n\n/*\n  The card a sign-in or sign-up screen sits in. Every starting point that uses it (the sign-in,\n  sign-up and account-access screens) carries a byte-identical copy of this file and of app-icon.tsx;\n  src/__tests__/blocks.test.tsx keeps them the same.\n*/\n\ntype AuthCardProps = {\n  /** The other screen (sign in, or create an account), in the footer; ↑ and ↓ open it too. */\n  other: { href: string; label: string };\n  children: ReactNode;\n  className?: string;\n};\n\nconst FOOTER_CONTROL =\n  'typography-body-md text-ws-static-subtle hover:text-ws-static-base gap-ws-5 rounded-ws-control-md focus-visible:wds-focus-visible outline-ws-dynamic-primary-strong-default flex cursor-pointer items-center';\n\n/**\n * Figma's sign-in card: the app icon and the form on white, a grey footer that says how to leave by\n * keyboard. Esc, or ← outside a text field, goes back; ↑ or ↓ outside a text field opens the other\n * screen. In a field the arrows stay with the field: they move the caret and open autofill.\n * 740px tall as in Figma, or the window less the page's padding when that is shorter, and never\n * shorter than its content.\n */\nexport function AuthCard({ other, children, className }: AuthCardProps) {\n  const back = useRef<HTMLButtonElement>(null);\n  const next = useRef<HTMLAnchorElement>(null);\n\n  useEffect(() => {\n    const onKeyDown = (event: KeyboardEvent) => {\n      if (event.defaultPrevented || event.isComposing) return;\n      if (event.altKey || event.ctrlKey || event.metaKey || event.shiftKey) return;\n      const typing =\n        event.target instanceof Element &&\n        event.target.closest('input, textarea, select, [contenteditable]') !== null;\n      if (event.key === 'Escape' || (event.key === 'ArrowLeft' && !typing)) {\n        back.current?.click();\n      } else if ((event.key === 'ArrowUp' || event.key === 'ArrowDown') && !typing) {\n        event.preventDefault();\n        next.current?.click();\n      }\n    };\n    document.addEventListener('keydown', onKeyDown);\n    return () => document.removeEventListener('keydown', onKeyDown);\n  }, []);\n\n  return (\n    <div\n      className={cn(\n        'bg-ws-static-foreground rounded-ws-container-xl shadow-ws-low flex h-[min(46.25rem,calc(100dvh-3rem))] min-h-fit flex-col justify-between overflow-hidden',\n        className,\n      )}\n    >\n      <div className=\"gap-ws-14 p-ws-12 sm:p-ws-18 flex flex-col items-start\">\n        <AppIcon />\n        {children}\n      </div>\n      <footer className=\"bg-ws-static-alpha-subtle px-ws-12 py-ws-9 flex items-center justify-between\">\n        <button\n          ref={back}\n          type=\"button\"\n          aria-keyshortcuts=\"Escape ArrowLeft\"\n          onClick={() => window.history.back()}\n          className={FOOTER_CONTROL}\n        >\n          <Key icon={RiArrowLeftLine} />\n          Back\n        </button>\n        <a\n          ref={next}\n          href={other.href}\n          aria-keyshortcuts=\"ArrowUp ArrowDown\"\n          className={FOOTER_CONTROL}\n        >\n          <span className=\"gap-ws-3 flex\">\n            <Key icon={RiArrowUpSLine} />\n            <Key icon={RiArrowDownSLine} />\n          </span>\n          {other.label}\n        </a>\n      </footer>\n    </div>\n  );\n}\n\n/**\n * A key, drawn as Figma draws it here: the box of Button `xs` Border, as a `kbd`. The control it\n * sits in names the shortcut (`aria-keyshortcuts`), so screen readers skip the key itself.\n */\nfunction Key({ icon: Icon }: { icon: RemixiconComponentType }) {\n  return (\n    <kbd\n      aria-hidden=\"true\"\n      className=\"border-ws-dynamic-secondary-default bg-ws-static-highlight-subtle shadow-ws-controls-control rounded-ws-control-md size-ws-12 text-ws-dynamic-secondary-default flex shrink-0 items-center justify-center border\"\n    >\n      <Icon className=\"size-ws-8\" />\n    </kbd>\n  );\n}\n\n/** A link inside a sentence, as Figma draws the help line's: body text in the primary colour, underlined. */\nexport function TextLink({\n  className,\n  children,\n  ...props\n}: AnchorHTMLAttributes<HTMLAnchorElement>) {\n  return (\n    <a\n      className={cn(\n        'text-ws-dynamic-primary-default hover:text-ws-dynamic-primary-hover active:text-ws-dynamic-primary-pressed rounded-ws-control-sm focus-visible:wds-focus-visible outline-ws-dynamic-primary-strong-default underline decoration-from-font',\n        className,\n      )}\n      {...props}\n    >\n      {children}\n    </a>\n  );\n}\n"
    },
    {
      "path": "src/blocks/sign-in/data.ts",
      "type": "registry:file",
      "target": "blocks/wideset/sign-in/data.ts",
      "content": "import {\n  type RemixiconComponentType,\n  RiBarChart2Line,\n  RiCalendarLine,\n  RiInformationLine,\n  RiMapPin2Line,\n  RiMoreFill,\n  RiProgress4Line,\n  RiProgress6Line,\n  RiStarLine,\n  RiTimeLine,\n} from '@remixicon/react';\nimport type { AvatarColor } from '@/components/ui/wideset/avatar/Avatar.colors';\nimport type { StatusBadgeProps } from '@/components/ui/wideset/status-badge/StatusBadge.types';\nimport type { TagProps } from '@/components/ui/wideset/tag/Tag.types';\n\n/** Where the screen leads: replace with your routes. */\nexport const ROUTES = {\n  /** After a successful sign-in. */\n  app: '#app',\n  signUp: '#sign-up',\n  magicLink: '#magic-link',\n  resetPassword: '#reset-password',\n};\n\n// The product in the card beside the form: the Kanban board as Figma's sign-in shows it. Replace\n// the whole card with a picture of your own product.\n\nexport type Person = { name: string; initials: string; color?: AvatarColor; online?: boolean };\nexport type SpaceColor = 'purple' | 'indigo' | 'blue' | 'cyan' | 'teal' | 'green';\n\n/** A status (`StatusBadge`) or a category (`Tag`) on a card. */\nexport type Badge =\n  | {\n      kind: 'status';\n      label: string;\n      color?: StatusBadgeProps['color'];\n      icon?: RemixiconComponentType;\n    }\n  | { kind: 'tag'; label: string; color: TagProps['color'] };\n\nexport type Task = {\n  id: string;\n  /** The card's header row; `null` is a task nobody has picked up yet. */\n  assignee?: Person | null;\n  /** The header row's name when nobody is assigned. */\n  placeholder?: string;\n  date?: string;\n  details?: { icon: RemixiconComponentType; label: string }[];\n  title?: string;\n  badges?: Badge[];\n  comments?: number;\n  attachments?: number;\n};\n\n/** Several tasks of one person, stacked under their name. */\nexport type TaskGroup = {\n  id: string;\n  assignee: Person;\n  age: string;\n  tasks: Task[];\n  hidden: number;\n};\n\nexport type Column = {\n  id: string;\n  title: string;\n  icon: RemixiconComponentType;\n  color: TagProps['color'];\n  count: number;\n  items: (Task | TaskGroup)[];\n};\n\nexport const account: Person & { email: string } = {\n  name: 'Adam Smith',\n  initials: 'AS',\n  email: 'hello@wideset.co',\n  online: true,\n};\n\nexport const navigation = [\n  { id: 'dashboard', label: 'Dashboard', icon: RiBarChart2Line },\n  { id: 'recent', label: 'Recent', icon: RiTimeLine },\n  { id: 'starred', label: 'Starred', icon: RiStarLine },\n];\n\nexport const spaceGroups: {\n  id: string;\n  label: string;\n  spaces: { id: string; label: string; color: SpaceColor }[];\n}[] = [\n  {\n    id: 'pinned-spaces',\n    label: 'Pinned Spaces',\n    spaces: [\n      { id: 'kick-off', label: 'Project Kick-off', color: 'purple' },\n      { id: 'research', label: 'Research & Discovery', color: 'indigo' },\n      { id: 'ideas', label: 'Ideas & Concepts', color: 'blue' },\n    ],\n  },\n  {\n    id: 'spaces',\n    label: 'Spaces',\n    spaces: [\n      { id: 'design', label: 'Design', color: 'cyan' },\n      { id: 'handoff', label: 'Development Handoff', color: 'teal' },\n      { id: 'feedback', label: 'Feedback & Iteration', color: 'green' },\n    ],\n  },\n];\n\nexport const breadcrumbs = ['Teams', 'Projects', 'Design Analysis 2024'];\n\nexport const views = ['Board', 'List', 'Calendar', 'Table', 'Gantt'];\n\nconst andrew: Person = { name: 'Andrew Tang', initials: 'AT', online: true };\nconst ryan: Person = { name: 'Ryan Gosling', initials: 'RG', online: true };\nconst jake: Person = { name: 'Jake Gyllenhaal', initials: 'JG', color: 'brand', online: true };\n\n/** The two columns that show beside the form; the board's right edge runs out of the card. */\nexport const columns: Column[] = [\n  {\n    id: 'backlog',\n    title: 'Backlog',\n    icon: RiProgress6Line,\n    color: 'teal',\n    count: 3,\n    items: [\n      {\n        id: 'site-visit',\n        assignee: null,\n        placeholder: 'Godly',\n        details: [\n          { icon: RiMapPin2Line, label: 'California, USA' },\n          { icon: RiCalendarLine, label: '21/01/2025' },\n          { icon: RiMoreFill, label: 'More information' },\n        ],\n        badges: [{ kind: 'status', label: 'Medium', color: 'info' }],\n      },\n      {\n        id: 'andrew-backlog',\n        assignee: andrew,\n        age: '6d',\n        hidden: 4,\n        tasks: [\n          {\n            id: 'workflow',\n            title: 'Optimize team workflow to improve efficiency and reduce bottlenecks.',\n            badges: [\n              { kind: 'status', label: '254', icon: RiInformationLine },\n              { kind: 'status', label: 'Medium' },\n            ],\n            comments: 254,\n          },\n          {\n            id: 'satisfaction',\n            title: 'Enhance client satisfaction',\n            badges: [{ kind: 'tag', label: 'Requires Creative Input', color: 'purple' }],\n          },\n        ],\n      },\n    ],\n  },\n  {\n    id: 'partial',\n    title: 'Partial support',\n    icon: RiProgress4Line,\n    color: 'cyan',\n    count: 2,\n    items: [\n      {\n        id: 'menu-redesign',\n        assignee: ryan,\n        date: '21/01/2025',\n        title: 'Incorporate client feedback on a multi-location restaurant menu redesign',\n      },\n      {\n        id: 'scheduling-prototype',\n        assignee: jake,\n        title: 'Build a click-through prototype of a scheduling tool for usability testing',\n        badges: [{ kind: 'status', label: 'High Priority', color: 'negative' }],\n        attachments: 4,\n      },\n    ],\n  },\n];\n"
    },
    {
      "path": "src/blocks/sign-in/index.tsx",
      "type": "registry:file",
      "target": "blocks/wideset/sign-in/index.tsx",
      "content": "'use client';\n\nimport '@/styles/wideset-blocks.css';\n\nimport { AuthCard } from './auth-card';\nimport { ROUTES } from './data';\nimport { ProductPreview } from './product-preview';\nimport { SignInForm } from './sign-in-form';\n\n/**\n * Sign in, Inset direction with no navigation: two raised cards on the grey page, the form beside\n * the product, as tall as each other. Under 1280px the product goes and the form stays, centred.\n */\nexport default function SignIn() {\n  return (\n    <main className=\"ws-block-utility bg-ws-static-background p-ws-12 flex min-h-dvh items-center justify-center\">\n      <div className=\"gap-ws-9 flex w-full max-w-[78.5rem] justify-center\">\n        <AuthCard\n          other={{ href: ROUTES.signUp, label: 'Create account' }}\n          className=\"w-full max-w-[38.75rem]\"\n        >\n          <SignInForm />\n        </AuthCard>\n        <ProductPreview className=\"hidden w-full max-w-[38.75rem] xl:block\" />\n      </div>\n    </main>\n  );\n}\n"
    },
    {
      "path": "src/blocks/sign-in/product-preview.tsx",
      "type": "registry:file",
      "target": "blocks/wideset/sign-in/product-preview.tsx",
      "content": "'use client';\n\nimport {\n  type RemixiconComponentType,\n  RiAddLine,\n  RiArrowDownSLine,\n  RiAttachment2,\n  RiChat2Line,\n  RiFlashlightFill,\n  RiFolder3Fill,\n  RiMoreFill,\n} from '@remixicon/react';\nimport { Avatar } from '@/components/ui/wideset/avatar/Avatar';\nimport { Breadcrumbs } from '@/components/ui/wideset/breadcrumbs/Breadcrumbs';\nimport { Button } from '@/components/ui/wideset/button/Button';\nimport { cn } from '@/lib/wideset/utils';\nimport { Divider } from '@/components/ui/wideset/divider/Divider';\nimport { FilterButton } from '@/components/ui/wideset/filter-button/FilterButton';\nimport { IconButton } from '@/components/ui/wideset/button/IconButton';\nimport { Select } from '@/components/ui/wideset/select/Select';\nimport { Sidebar } from '@/components/ui/wideset/sidebar/Sidebar';\nimport { StatusBadge } from '@/components/ui/wideset/status-badge/StatusBadge';\nimport { Tabs } from '@/components/ui/wideset/tabs/Tabs';\nimport { Tag } from '@/components/ui/wideset/tag/Tag';\n\nimport { AppIcon } from './app-icon';\nimport {\n  account,\n  type Badge,\n  breadcrumbs,\n  type Column,\n  columns,\n  navigation,\n  type SpaceColor,\n  spaceGroups,\n  type Task,\n  type TaskGroup,\n  views,\n} from './data';\n\n/**\n * Figma's card beside the sign-in form: a Wideset screen (the Kanban board) at 54% over a glow on\n * near-black, its right side cut off by the card. The screen is drawn from the library, so it\n * follows the theme; the card keeps its colours in dark mode. A picture, so it is inert and\n * hidden from screen readers: replace it with a picture of your own product.\n */\nexport function ProductPreview({ className }: { className?: string }) {\n  return (\n    <div\n      aria-hidden=\"true\"\n      // Set as an attribute: React 18 drops a boolean `inert` prop, React 19 accepts both.\n      ref={(node) => node?.setAttribute('inert', '')}\n      className={cn(\n        'rounded-ws-container-xl shadow-ws-low relative isolate overflow-hidden bg-(--ws-colors-light-neutral-1100)',\n        className,\n      )}\n    >\n      {/* Figma paints the glow with a blurred glass orb over a raster; here it is three gradients\n          in the light palette's nearest tokens: the wash, the pink corner and the orb's edge. */}\n      <div className=\"absolute inset-0 bg-[linear-gradient(transparent_12%,var(--ws-colors-light-purple-1000)_30%,var(--ws-colors-light-indigo-900)_50%,color-mix(in_srgb,var(--ws-colors-light-blue-500)_80%,transparent))]\" />\n      <div className=\"absolute inset-0 bg-[radial-gradient(at_100%_100%,var(--ws-colors-light-brand-200),transparent_60%)]\" />\n      <div className=\"rounded-ws-control-full absolute top-[-10.0625rem] left-[18.5rem] size-[59.625rem] bg-linear-to-b/srgb from-(--ws-colors-light-indigo-900) from-50% to-transparent to-75%\" />\n      {/* The screen at Figma's 1440 × 960, scaled into a 777 × 518 window 192px from the left. */}\n      <div className=\"rounded-ws-container-lg shadow-ws-medium absolute top-1/2 left-[12rem] h-[32.375rem] w-[48.5625rem] -translate-y-1/2 overflow-hidden\">\n        <div className=\"h-[60rem] w-[90rem] origin-top-left scale-[0.5396]\">\n          <Board />\n        </div>\n      </div>\n    </div>\n  );\n}\n\n/** The Kanban screen in the Flat direction: sidebar, header and view tabs, filters, columns. */\nfunction Board() {\n  return (\n    <div className=\"bg-ws-static-foreground flex h-full\">\n      <Sidebar>\n        <Sidebar.Header>\n          <Sidebar.Expanded>\n            <div className=\"gap-ws-7 py-ws-3 pl-ws-5 flex items-center\">\n              <AppIcon className=\"size-ws-14\" />\n              <span className=\"typography-label-strong-sm text-ws-dynamic-secondary-default min-w-0 flex-1 truncate\">\n                Wideset\n              </span>\n              <Sidebar.Trigger />\n            </div>\n          </Sidebar.Expanded>\n        </Sidebar.Header>\n        <Sidebar.Section scrollable>\n          <Sidebar.Expanded>\n            <nav aria-label=\"Workspace\" className=\"gap-ws-11 flex flex-col\">\n              <div className=\"flex flex-col\">\n                {navigation.map((item) => (\n                  <Sidebar.Item\n                    key={item.id}\n                    href={`#${item.id}`}\n                    icon={item.icon}\n                    label={item.label}\n                  />\n                ))}\n              </div>\n              {spaceGroups.map((group) => (\n                <div\n                  key={group.id}\n                  role=\"group\"\n                  aria-labelledby={`sidebar-${group.id}`}\n                  className=\"gap-ws-2 flex flex-col\"\n                >\n                  <Sidebar.SectionHeader id={`sidebar-${group.id}`}>\n                    {group.label}\n                  </Sidebar.SectionHeader>\n                  {group.spaces.map((space) => (\n                    <Sidebar.Item\n                      key={space.id}\n                      href={`#${space.id}`}\n                      icon={SPACE_ICON[space.color]}\n                      label={space.label}\n                    />\n                  ))}\n                </div>\n              ))}\n            </nav>\n          </Sidebar.Expanded>\n        </Sidebar.Section>\n        <Sidebar.Footer>\n          <Sidebar.Expanded>\n            <div className=\"gap-ws-5 px-ws-5 py-ws-3 flex items-center\">\n              <Avatar initials={account.initials} status=\"online\" />\n              <span className=\"flex min-w-0 flex-1 flex-col\">\n                <span className=\"typography-label-strong-sm text-ws-static-base truncate\">\n                  {account.name}\n                </span>\n                <span className=\"typography-label-sm text-ws-static-subtle truncate\">\n                  {account.email}\n                </span>\n              </span>\n              <RiArrowDownSLine aria-hidden=\"true\" className=\"size-ws-9 text-ws-static-strong\" />\n            </div>\n          </Sidebar.Expanded>\n        </Sidebar.Footer>\n      </Sidebar>\n\n      <div className=\"flex min-w-0 flex-1 flex-col\">\n        <Tabs defaultValue=\"Board\" divider={false}>\n          <header className=\"border-ws-static-subtle border-b\">\n            <div className=\"border-ws-static-subtle h-ws-18 px-ws-11 flex items-center border-b\">\n              <Breadcrumbs separator=\"arrow\">\n                {breadcrumbs.map((crumb, index) => (\n                  <Breadcrumbs.Item key={crumb}>\n                    {index === 0 ? (\n                      <RiFolder3Fill aria-hidden=\"true\" className=\"size-ws-9\" />\n                    ) : null}\n                    {crumb}\n                  </Breadcrumbs.Item>\n                ))}\n              </Breadcrumbs>\n            </div>\n            <div className=\"px-ws-11\">\n              <Tabs.List aria-label=\"Views\">\n                {views.map((view) => (\n                  <Tabs.Item key={view} value={view}>\n                    <Tabs.Label>{view}</Tabs.Label>\n                  </Tabs.Item>\n                ))}\n              </Tabs.List>\n            </div>\n          </header>\n        </Tabs>\n        <div className=\"gap-ws-9 pt-ws-9 flex min-h-0 flex-1 flex-col\">\n          <div className=\"gap-ws-5 px-ws-11 flex items-center\">\n            <FilterButton\n              label=\"Team\"\n              placeholder=\"Team\"\n              options={[{ value: 'wideset', label: 'Wideset' }]}\n              defaultValue={['wideset']}\n              onChange={() => {}}\n            />\n            <FilterButton\n              label=\"Assigned to\"\n              placeholder=\"Assigned to\"\n              options={[{ value: 'andrew', label: 'Andrew Tang' }]}\n              onChange={() => {}}\n            />\n            <Select\n              size=\"sm\"\n              preset=\"ghost\"\n              aria-label=\"Sort tasks\"\n              options={[{ value: 'newest', label: 'Sort by newest' }]}\n              defaultValue=\"newest\"\n              className=\"w-auto\"\n            />\n          </div>\n          <div className=\"gap-ws-9 px-ws-11 flex min-h-0 flex-1\">\n            {columns.map((column) => (\n              <KanbanColumn key={column.id} column={column} />\n            ))}\n          </div>\n        </div>\n      </div>\n    </div>\n  );\n}\n\nconst TILE: Record<SpaceColor, string> = {\n  purple: 'bg-ws-non-semantic-purple-strong text-ws-non-semantic-purple-on-strong',\n  indigo: 'bg-ws-non-semantic-indigo-strong text-ws-non-semantic-indigo-on-strong',\n  blue: 'bg-ws-non-semantic-blue-strong text-ws-non-semantic-blue-on-strong',\n  cyan: 'bg-ws-non-semantic-cyan-strong text-ws-non-semantic-cyan-on-strong',\n  teal: 'bg-ws-non-semantic-teal-strong text-ws-non-semantic-teal-on-strong',\n  green: 'bg-ws-non-semantic-green-strong text-ws-non-semantic-green-on-strong',\n};\n\n/** Figma's Sidebar Item `Type=Thumbnail`: a 20px colour tile with a white glyph, as the item icon. */\nconst spaceTile = (color: SpaceColor): RemixiconComponentType => {\n  const SpaceTile = () => (\n    <span\n      className={cn(\n        'rounded-ws-control-md size-ws-11 flex shrink-0 items-center justify-center',\n        TILE[color],\n      )}\n    >\n      <RiFlashlightFill className=\"size-ws-7\" />\n    </span>\n  );\n  return SpaceTile;\n};\n\nconst SPACE_ICON: Record<SpaceColor, RemixiconComponentType> = {\n  purple: spaceTile('purple'),\n  indigo: spaceTile('indigo'),\n  blue: spaceTile('blue'),\n  cyan: spaceTile('cyan'),\n  teal: spaceTile('teal'),\n  green: spaceTile('green'),\n};\n\nconst isGroup = (item: Task | TaskGroup): item is TaskGroup => 'tasks' in item;\n\nfunction Menu() {\n  return (\n    <IconButton\n      icon={RiMoreFill}\n      size=\"xs\"\n      variant=\"secondary\"\n      preset=\"ghost\"\n      aria-label=\"Actions\"\n    />\n  );\n}\n\nfunction TaskBadge({ badge }: { badge: Badge }) {\n  if (badge.kind === 'tag')\n    return (\n      <Tag size=\"sm\" color={badge.color}>\n        {badge.label}\n      </Tag>\n    );\n  return (\n    <StatusBadge size=\"sm\" color={badge.color}>\n      {badge.icon ? <StatusBadge.Icon icon={badge.icon} /> : null}\n      <StatusBadge.Label>{badge.label}</StatusBadge.Label>\n    </StatusBadge>\n  );\n}\n\n/** A task: raised on the column, or flat inside a person's stack, which already names them. */\nfunction TaskCard({ task, nested = false }: { task: Task; nested?: boolean }) {\n  return (\n    <article\n      className={cn(\n        'p-ws-5 gap-ws-5 rounded-ws-container-sm flex flex-col',\n        nested ? 'bg-ws-static-container' : 'bg-ws-static-overlay shadow-ws-forms-base',\n      )}\n    >\n      {task.assignee !== undefined ? (\n        <div className=\"p-ws-3 gap-ws-4 flex flex-col\">\n          <div className=\"gap-ws-5 flex items-center\">\n            {task.assignee ? (\n              <Avatar\n                size=\"sm\"\n                initials={task.assignee.initials}\n                color={task.assignee.color}\n                status={task.assignee.online ? 'online' : undefined}\n              />\n            ) : (\n              <Avatar size=\"sm\" shape=\"square\" />\n            )}\n            <p className=\"typography-label-sm text-ws-static-strong min-w-0 flex-1 truncate\">\n              {task.assignee?.name ?? task.placeholder}\n            </p>\n            <Menu />\n          </div>\n          {task.date ? (\n            <p className=\"typography-label-sm text-ws-static-base\">{task.date}</p>\n          ) : null}\n          {task.details ? (\n            <div className=\"mt-ws-4 gap-ws-7 flex flex-col\">\n              <Divider weight=\"thin\" emphasis=\"subtle\" className=\"-mx-ws-7 w-auto\" />\n              <ul className=\"gap-ws-3 flex flex-col\">\n                {task.details.map(({ icon: Icon, label }) => (\n                  <li key={label} className=\"gap-ws-5 flex items-center\">\n                    <span className=\"size-ws-12 flex shrink-0 items-center justify-center\">\n                      <Icon className=\"size-ws-9 text-ws-dynamic-secondary-default\" />\n                    </span>\n                    <span className=\"typography-label-sm text-ws-static-base truncate\">\n                      {label}\n                    </span>\n                  </li>\n                ))}\n              </ul>\n            </div>\n          ) : null}\n        </div>\n      ) : null}\n      {task.title ? (\n        <div className=\"p-ws-3 gap-ws-5 flex items-start\">\n          <p className=\"typography-body-md text-ws-static-base min-w-0 flex-1\">{task.title}</p>\n          {task.assignee === undefined ? <Menu /> : null}\n        </div>\n      ) : null}\n      {task.badges || task.comments ? (\n        <div className=\"p-ws-3 gap-ws-3 flex items-center\">\n          {task.badges?.map((badge) => (\n            <TaskBadge key={badge.label} badge={badge} />\n          ))}\n          {task.comments ? (\n            <StatusBadge size=\"sm\" className=\"ml-auto\">\n              <StatusBadge.Icon icon={RiChat2Line} />\n              <StatusBadge.Label>{task.comments}</StatusBadge.Label>\n            </StatusBadge>\n          ) : null}\n        </div>\n      ) : null}\n      {task.attachments ? (\n        <div className=\"border-ws-static-subtle rounded-ws-control-md h-ws-15 px-ws-5 gap-ws-5 flex items-center border\">\n          <span className=\"size-ws-11 flex shrink-0 items-center justify-center\">\n            <RiAttachment2 className=\"size-ws-9 text-ws-static-subtle\" />\n          </span>\n          <span className=\"typography-label-sm text-ws-static-subtle truncate\">\n            {task.attachments} attachments\n          </span>\n        </div>\n      ) : null}\n    </article>\n  );\n}\n\n/** A status column: its label and count, the cards, and a button that adds a task. */\nfunction KanbanColumn({ column }: { column: Column }) {\n  return (\n    <section className=\"bg-ws-static-alpha-subtle rounded-ws-container-md p-ws-5 gap-ws-4 flex w-[22.125rem] shrink-0 flex-col\">\n      <div className=\"p-ws-3 flex items-center justify-between\">\n        <div className=\"gap-ws-4 flex items-center\">\n          <Tag color={column.color}>\n            <Tag.Icon icon={column.icon} />\n            {column.title}\n          </Tag>\n          <Tag color={column.color}>{column.count}</Tag>\n          <Menu />\n        </div>\n        <IconButton\n          icon={RiAddLine}\n          size=\"xs\"\n          variant=\"secondary\"\n          preset=\"ghost\"\n          aria-label=\"Add\"\n        />\n      </div>\n      {column.items.map((item) =>\n        isGroup(item) ? (\n          <div\n            key={item.id}\n            className=\"bg-ws-static-alpha-subtle rounded-ws-container-md p-ws-3 gap-ws-4 flex flex-col\"\n          >\n            <div className=\"px-ws-5 py-ws-3 gap-ws-5 flex items-center\">\n              <Avatar\n                size=\"sm\"\n                initials={item.assignee.initials}\n                color={item.assignee.color}\n                status={item.assignee.online ? 'online' : undefined}\n              />\n              <p className=\"typography-label-sm text-ws-static-strong min-w-0 flex-1 truncate\">\n                {item.assignee.name}\n              </p>\n              <span className=\"typography-label-strong-sm text-ws-static-subtle\">{item.age}</span>\n            </div>\n            <div className=\"gap-ws-3 flex flex-col\">\n              {item.tasks.map((task) => (\n                <TaskCard key={task.id} task={task} nested />\n              ))}\n            </div>\n            <p className=\"p-ws-3 typography-label-sm text-ws-static-strong\">View +{item.hidden}</p>\n          </div>\n        ) : (\n          <TaskCard key={item.id} task={item} />\n        ),\n      )}\n      <Button variant=\"secondary\" preset=\"ghost\" size=\"sm\" className=\"shrink-0\">\n        <Button.Icon icon={RiAddLine} />\n        New task\n      </Button>\n    </section>\n  );\n}\n"
    },
    {
      "path": "src/blocks/sign-in/sign-in-form.tsx",
      "type": "registry:file",
      "target": "blocks/wideset/sign-in/sign-in-form.tsx",
      "content": "'use client';\n\nimport { Button } from '@/components/ui/wideset/button/Button';\nimport { Checkbox } from '@/components/ui/wideset/checkbox/Checkbox';\nimport { FormField } from '@/components/ui/wideset/form-field/FormField';\nimport { TextInput } from '@/components/ui/wideset/text-input/TextInput';\nimport { type FormEvent, useId, useState } from 'react';\n\nimport { TextLink } from './auth-card';\nimport { ROUTES } from './data';\n\n/*\n  The sign-in form. The two sign-in starting points (sign-in, sign-in-card) carry byte-identical\n  copies of this file; src/__tests__/blocks.test.tsx keeps them the same.\n*/\n\ntype Field = 'username' | 'password';\n\n/**\n * Figma's sign-in form. Submitting checks only that both fields are filled, names the empty one\n * and moves focus to it; whether the pair is right is the server's answer, and that error never\n * says which part was wrong. Nothing here talks to a server.\n */\nexport function SignInForm() {\n  const id = useId();\n  const [errors, setErrors] = useState<Partial<Record<Field, string>>>({});\n  const clear = (field: Field) =>\n    setErrors((all) => (all[field] ? { ...all, [field]: undefined } : all));\n\n  const submit = (event: FormEvent<HTMLFormElement>) => {\n    event.preventDefault();\n    const data = new FormData(event.currentTarget);\n    const next = {\n      username: String(data.get('username') ?? '').trim()\n        ? undefined\n        : 'Enter your e-mail or username.',\n      password: data.get('password') ? undefined : 'Enter your password.',\n    };\n    setErrors(next);\n    const invalid = (Object.keys(next) as Field[]).find((field) => next[field]);\n    if (invalid) {\n      document.getElementById(`${id}-${invalid}`)?.focus();\n      return;\n    }\n    // Sign the person in here, then open the app.\n    window.location.assign(ROUTES.app);\n  };\n\n  return (\n    <form\n      noValidate\n      onSubmit={submit}\n      aria-labelledby={`${id}-title`}\n      className=\"gap-ws-12 flex w-full flex-col\"\n    >\n      <h1 id={`${id}-title`} className=\"typography-title-md text-ws-static-strong mb-ws-5\">\n        Sign in to Wideset\n      </h1>\n      <FormField label=\"E-mail or username\" htmlFor={`${id}-username`} errorText={errors.username}>\n        <TextInput\n          id={`${id}-username`}\n          name=\"username\"\n          autoComplete=\"username\"\n          autoCapitalize=\"none\"\n          spellCheck={false}\n          placeholder=\"e.g. hello@wideset.co\"\n          required\n          variant={errors.username ? 'danger' : 'primary'}\n          onChange={() => clear('username')}\n          // eslint-disable-next-line jsx-a11y/no-autofocus -- the screen has one task, and it starts here\n          autoFocus\n        />\n      </FormField>\n      <FormField label=\"Password\" htmlFor={`${id}-password`} errorText={errors.password}>\n        <TextInput\n          id={`${id}-password`}\n          name=\"password\"\n          type=\"password\"\n          autoComplete=\"current-password\"\n          placeholder=\"Enter your password\"\n          required\n          variant={errors.password ? 'danger' : 'primary'}\n          onChange={() => clear('password')}\n        />\n      </FormField>\n      <Checkbox name=\"remember\" label=\"Keep me signed in\" />\n      <Button type=\"submit\" size=\"lg\" className=\"w-full\">\n        Sign in\n      </Button>\n      {/* Figma breaks the line after \"or\" with a 363px measure. */}\n      <p className=\"typography-body-md text-ws-static-subtle max-w-[22.6875rem]\">\n        Trouble with signing in? Request a magic{' '}\n        <TextLink href={ROUTES.magicLink}>sign in link</TextLink> or{' '}\n        <TextLink href={ROUTES.resetPassword}>reset your password</TextLink>\n      </p>\n    </form>\n  );\n}\n"
    }
  ],
  "meta": {
    "version": "1.1.0",
    "commit": "a734f9f0"
  }
}
