{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "block-order-confirmation",
  "type": "registry:block",
  "title": "Order confirmation",
  "description": "The page after a plan upgrade on a raised page: a centred confirmation with the next charge, the receipt, two next steps and the way back to the workspace.",
  "dependencies": [
    "@remixicon/react@^4.9.0"
  ],
  "registryDependencies": [
    "https://wideset.co/r/action-tile.json",
    "https://wideset.co/r/app-shell.json",
    "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/card.json",
    "https://wideset.co/r/divider.json",
    "https://wideset.co/r/dropdown-menu.json",
    "https://wideset.co/r/icon-button.json",
    "https://wideset.co/r/list-item.json",
    "https://wideset.co/r/sidebar.json",
    "https://wideset.co/r/text-input.json",
    "https://wideset.co/r/utils.json"
  ],
  "files": [
    {
      "path": "src/blocks/order-confirmation/brand-mark.tsx",
      "type": "registry:file",
      "target": "blocks/wideset/order-confirmation/brand-mark.tsx",
      "content": "'use client';\n\nimport { cn } from '@/lib/wideset/utils';\n\nconst TILE =\n  'M0 16C0 8.45753 0 4.68629 2.34315 2.34315C4.68629 0 8.45753 0 16 0C23.5425 0 27.3137 0 29.6569 2.34315C32 4.68629 32 8.45753 32 16C32 23.5425 32 27.3137 29.6569 29.6569C27.3137 32 23.5425 32 16 32C8.45753 32 4.68629 32 2.34315 29.6569C0 27.3137 0 23.5425 0 16Z';\n\n/**\n * Orbit's mark: a planet and its ring on the inverse tile, so it inverts in dark mode. It takes\n * the size of its place (32px in a sidebar, 36px in a larger switcher). Decorative beside the\n * product's name; give it a `label` when it stands alone.\n */\nexport function BrandMark({ className, label }: { className?: string; label?: string }) {\n  return (\n    <svg\n      viewBox=\"0 0 32 32\"\n      role={label ? 'img' : undefined}\n      aria-label={label}\n      aria-hidden={label ? undefined : true}\n      className={cn('size-ws-14 shrink-0', className)}\n    >\n      <path d={TILE} className=\"fill-(--ws-static-fill-inverse-background)\" />\n      <ellipse\n        cx=\"16\"\n        cy=\"16\"\n        rx=\"10.5\"\n        ry=\"4\"\n        transform=\"rotate(-28 16 16)\"\n        strokeWidth=\"1.75\"\n        className=\"fill-none stroke-(--ws-static-text-inverse-strong)\"\n      />\n      <circle cx=\"16\" cy=\"16\" r=\"4.75\" className=\"fill-(--ws-static-text-inverse-strong)\" />\n    </svg>\n  );\n}\n"
    },
    {
      "path": "src/blocks/order-confirmation/confirmation-header.tsx",
      "type": "registry:file",
      "target": "blocks/wideset/order-confirmation/confirmation-header.tsx",
      "content": "'use client';\n\n// TODO(custom): page header for a confirmation (a large status mark, the title, one line); no PageHeader in Wideset, and an icon-only StatusBadge stops at 28px.\nimport { RiCheckLine } from '@remixicon/react';\n\nimport { nextChargeAmount, order, workspace } from './data';\nimport { formatDate, formatUsd } from './format';\n\n/**\n * The confirmation itself, centred over the receipt: a check in the positive colour (a judgement:\n * it worked), a title that says what happened, and one line with what happens next. The mark is\n * StatusBadge's positive fill at 48px, large enough to be the first thing read, still a plain\n * icon rather than a drawing: a confirmation is a quiet page.\n */\nexport function ConfirmationHeader() {\n  return (\n    <header className=\"gap-ws-9 flex flex-col items-center text-center\">\n      <span\n        role=\"img\"\n        aria-label=\"Confirmed\"\n        className=\"size-ws-18 rounded-ws-control-full bg-ws-semantic-inverse-positive text-ws-semantic-on-inverse-positive flex items-center justify-center\"\n      >\n        <RiCheckLine aria-hidden=\"true\" className=\"size-ws-12\" />\n      </span>\n      <div className=\"gap-ws-2 flex flex-col\">\n        <h1 className=\"typography-title-md text-ws-static-strong\">\n          {workspace.name} is now on {order.plan.name}\n        </h1>\n        <p className=\"typography-body-md text-ws-static-subtle tabular-nums\">\n          All {order.seats} seats moved from {order.previous.name} today. Your next charge is{' '}\n          {formatUsd(nextChargeAmount)} on {formatDate(order.nextCharge)}.\n        </p>\n      </div>\n    </header>\n  );\n}\n"
    },
    {
      "path": "src/blocks/order-confirmation/data.ts",
      "type": "registry:file",
      "target": "blocks/wideset/order-confirmation/data.ts",
      "content": "import {\n  type RemixiconComponentType,\n  RiBankCardFill,\n  RiBankCardLine,\n  RiContactsBook3Line,\n  RiHandCoinLine,\n  RiHome5Line,\n  RiInbox2Line,\n  RiKey2Line,\n  RiLineChartLine,\n  RiPieChart2Line,\n  RiPlugLine,\n  RiQuestionLine,\n  RiSettings3Line,\n  RiTeamLine,\n} from '@remixicon/react';\n\n/*\n  The order: on Nov 10, 2026 Maya moved Lumen Studio from Growth ($39 a seat) to Scale ($69 a\n  seat), 40 seats, billed monthly. The billing period runs Nov 1 – 30 and Growth is already paid\n  for it, so today's charge is the difference for the days that are left: 40 seats × $30 × 21/30 =\n  $840.00. From Dec 1 the full Scale price applies: 40 × $69 = $2,760.00. Lumen Studio Ltd is a UK\n  business with a VAT number, so the VAT is reverse-charged: 0%. Every amount on the page is\n  worked out below from these values.\n*/\n\n/** The product is Orbit; the workspace that bought the plan is Lumen Studio. */\nexport const product = { name: 'Orbit' };\nexport const workspace = { name: 'Lumen Studio', initials: 'LS' };\nexport const account = { name: 'Maya Okafor', email: 'maya@lumenstudio.co', initials: 'MO' };\n\nexport type NavLink = {\n  id: string;\n  label: string;\n  icon: RemixiconComponentType;\n  /** The icon while the page is open (a line icon swaps for its fill). */\n  activeIcon?: RemixiconComponentType;\n};\n\nexport const mainLinks: NavLink[] = [\n  { id: 'home', label: 'Home', icon: RiHome5Line },\n  { id: 'inbox', label: 'Inbox', icon: RiInbox2Line },\n  { id: 'customers', label: 'Customers', icon: RiContactsBook3Line },\n  { id: 'deals', label: 'Deals', icon: RiHandCoinLine },\n  { id: 'revenue', label: 'Revenue', icon: RiLineChartLine },\n  { id: 'reports', label: 'Reports', icon: RiPieChart2Line },\n];\n\nexport const settingsLinks: NavLink[] = [\n  { id: 'general', label: 'General', icon: RiSettings3Line },\n  { id: 'members', label: 'Members', icon: RiTeamLine },\n  { id: 'billing', label: 'Billing', icon: RiBankCardLine, activeIcon: RiBankCardFill },\n  { id: 'integrations', label: 'Integrations', icon: RiPlugLine },\n  { id: 'api-keys', label: 'API keys', icon: RiKey2Line },\n];\n\nexport const helpLink: NavLink = { id: 'help', label: 'Help and support', icon: RiQuestionLine };\n\nexport const order = {\n  /** The order's number is also its invoice's. */\n  number: 'ORB-2026-0131',\n  placed: '2026-11-10',\n  /** The plan the workspace left and the one it bought: price per seat per month. */\n  previous: { name: 'Growth', seatPrice: 39 },\n  plan: { name: 'Scale', seatPrice: 69 },\n  interval: 'Billed monthly',\n  seats: 40,\n  /** The billing period the upgrade lands in: Scale is charged from `placed` to its end. */\n  period: { from: '2026-11-01', to: '2026-11-30' },\n  nextCharge: '2026-12-01',\n  vat: { rate: 0, label: 'reverse charge' },\n  card: { brand: 'Mastercard', last4: '8812' },\n};\n\n/** Seats with someone in them: the rest are free to hand out. */\nexport const seatsUsed = 38;\n\nconst DAY = 86_400_000;\n/** The days from one calendar day to another, both counted. */\nconst days = (from: string, to: string) => (Date.parse(to) - Date.parse(from)) / DAY + 1;\n/** Rounds to whole cents, the way the totals are charged. */\nconst cents = (value: number) => Math.round(value * 100) / 100;\n\n/** What a seat costs more on the new plan, a month. */\nexport const seatDifference = order.plan.seatPrice - order.previous.seatPrice;\nexport const daysLeft = days(order.placed, order.period.to);\nexport const daysInPeriod = days(order.period.from, order.period.to);\n\n/** Today's charge: the difference for every seat, for the share of the period that is left. */\nexport const subtotal = cents((order.seats * seatDifference * daysLeft) / daysInPeriod);\nexport const vatAmount = cents(subtotal * order.vat.rate);\nexport const total = cents(subtotal + vatAmount);\n/** From the next period on: every seat at the new plan's full price. */\nexport const nextChargeAmount = order.seats * order.plan.seatPrice;\n\nexport type NextStep = { id: string; title: string; description: string; href: string };\n\n/** What the new plan makes worth doing first: two at most, one line and one destination each. */\nexport const nextSteps: NextStep[] = [\n  {\n    id: 'invite',\n    title: 'Invite teammates',\n    description: `${order.seats - seatsUsed} of your ${order.seats} seats are still free.`,\n    href: '#members',\n  },\n  {\n    id: 'sso',\n    title: 'Turn on single sign-on',\n    description: `SAML sign-in comes with ${order.plan.name}. Connect your identity provider.`,\n    href: '#single-sign-on',\n  },\n];\n"
    },
    {
      "path": "src/blocks/order-confirmation/format.ts",
      "type": "registry:file",
      "target": "blocks/wideset/order-confirmation/format.ts",
      "content": "// One locale for the whole screen; swap it for the user's.\nconst LOCALE = 'en-US';\n\nconst usd = new Intl.NumberFormat(LOCALE, { style: 'currency', currency: 'USD' });\nconst percent = new Intl.NumberFormat(LOCALE, { style: 'percent', maximumFractionDigits: 2 });\n// Dates are calendar days (`2026-11-10`), parsed as UTC midnight: format them in UTC too.\nconst date = new Intl.DateTimeFormat(LOCALE, {\n  day: 'numeric',\n  month: 'short',\n  year: 'numeric',\n  timeZone: 'UTC',\n});\nconst dayMonth = new Intl.DateTimeFormat(LOCALE, {\n  day: 'numeric',\n  month: 'short',\n  timeZone: 'UTC',\n});\n\nexport const formatUsd = (value: number) => usd.format(value);\nexport const formatPercent = (rate: number) => percent.format(rate);\n/** Nov 10, 2026. */\nexport const formatDate = (iso: string) => date.format(new Date(iso));\n/** Nov 10 – 30: a stretch inside one year, which the page already names. */\nexport const formatDays = (from: string, to: string) =>\n  dayMonth.formatRange(new Date(from), new Date(to));\n"
    },
    {
      "path": "src/blocks/order-confirmation/index.tsx",
      "type": "registry:file",
      "target": "blocks/wideset/order-confirmation/index.tsx",
      "content": "'use client';\n\nimport '@/styles/wideset-blocks.css';\n\nimport { RiSideBarLine } from '@remixicon/react';\nimport { AppShell } from '@/components/ui/wideset/app-shell/AppShell';\nimport { Breadcrumbs } from '@/components/ui/wideset/breadcrumbs/Breadcrumbs';\nimport { IconButton } from '@/components/ui/wideset/button/IconButton';\nimport { useId, useState } from 'react';\n\nimport { ConfirmationHeader } from './confirmation-header';\nimport { order } from './data';\nimport { NextSteps } from './next-steps';\nimport { Receipt } from './receipt';\nimport { AppSidebar } from './sidebar';\n\n/**\n * Order confirmation (Inset direction): the page after a purchase, here an upgrade from Growth to\n * Scale. One narrow reading column on the raised page, in the order the buyer asks: did it work,\n * what happens next, what did I pay, what do I do now. The way on is the only filled button.\n */\nexport default function OrderConfirmation() {\n  const sidebarId = useId();\n  const [collapsed, setCollapsed] = useState(false);\n\n  return (\n    <AppShell className=\"ws-block-utility\" direction=\"inset\">\n      <AppSidebar id={sidebarId} collapsed={collapsed} onCollapsedChange={setCollapsed} />\n      <AppShell.Main>\n        <div className=\"h-ws-18 border-ws-static-base flex shrink-0 items-center border-b\">\n          {/* The bar belongs to the surround: it runs edge to edge. The sidebar's toggle is pulled\n              left so its glyph, not its box, sits 20px from the edge; the crumbs follow it. */}\n          <div className=\"gap-ws-5 px-ws-11 flex w-full items-center\">\n            <IconButton\n              icon={RiSideBarLine}\n              variant=\"secondary\"\n              preset=\"ghost\"\n              size=\"sm\"\n              iconClassName=\"text-ws-static-subtle size-ws-9\"\n              aria-label={collapsed ? 'Expand sidebar' : 'Collapse sidebar'}\n              aria-expanded={!collapsed}\n              aria-controls={sidebarId}\n              onClick={() => setCollapsed(!collapsed)}\n              className=\"-ml-ws-5\"\n            />\n            <Breadcrumbs separator=\"arrow\">\n              <Breadcrumbs.Item asChild>\n                <a href=\"#settings\">Settings</a>\n              </Breadcrumbs.Item>\n              <Breadcrumbs.Item asChild>\n                <a href=\"#billing\">Billing</a>\n              </Breadcrumbs.Item>\n              <Breadcrumbs.Item>{`Order ${order.number}`}</Breadcrumbs.Item>\n            </Breadcrumbs>\n          </div>\n        </div>\n\n        {/* The page scrolls inside the card, so the card's corners stay put. */}\n        <div className=\"ws-scrollbar min-h-0 flex-1 overflow-y-auto\">\n          {/* A confirmation is read, not scanned: one column of 40rem, centred on the page. */}\n          <div className=\"px-ws-14 gap-ws-14 pt-ws-14 pb-ws-16 mx-auto flex w-full max-w-[44rem] flex-col\">\n            <ConfirmationHeader />\n            <Receipt />\n            <NextSteps />\n          </div>\n        </div>\n      </AppShell.Main>\n    </AppShell>\n  );\n}\n"
    },
    {
      "path": "src/blocks/order-confirmation/key-value.tsx",
      "type": "registry:file",
      "target": "blocks/wideset/order-confirmation/key-value.tsx",
      "content": "'use client';\n\n// TODO(custom): key-value pair (label above value); no DescriptionList in Wideset.\nimport type { ReactNode } from 'react';\n\n/** A fact: its label above its value. Render inside a `dl`. */\nexport function KeyValue({ label, children }: { label: string; children: ReactNode }) {\n  return (\n    <div className=\"gap-ws-3 flex min-w-0 flex-col\">\n      <dt className=\"typography-label-sm text-ws-static-subtle\">{label}</dt>\n      <dd className=\"typography-body-md text-ws-static-base tabular-nums\">{children}</dd>\n    </div>\n  );\n}\n"
    },
    {
      "path": "src/blocks/order-confirmation/next-steps.tsx",
      "type": "registry:file",
      "target": "blocks/wideset/order-confirmation/next-steps.tsx",
      "content": "'use client';\n\nimport { RiArrowRightLine } from '@remixicon/react';\nimport { ActionTile } from '@/components/ui/wideset/action-tile/ActionTile';\nimport { Button } from '@/components/ui/wideset/button/Button';\nimport { useId } from 'react';\n\nimport { nextSteps } from './data';\n\n/**\n * What to do next: the few things the new plan makes worth doing, each a tile that is its own one\n * action and ends in an arrow because it goes somewhere (no icon badges: they would add a colour\n * per tile), then the way on, the page's one filled button.\n */\nexport function NextSteps() {\n  const id = useId();\n\n  return (\n    <section aria-labelledby={id} className=\"gap-ws-9 flex flex-col\">\n      <h2 id={id} className=\"typography-label-strong-md text-ws-static-strong\">\n        What to do next\n      </h2>\n      <ul className=\"gap-ws-5 flex flex-col\">\n        {nextSteps.map((step) => (\n          <li key={step.id}>\n            <ActionTile\n              title={step.title}\n              description={step.description}\n              icon={RiArrowRightLine}\n              href={step.href}\n            />\n          </li>\n        ))}\n      </ul>\n      <Button size=\"sm\" asChild className=\"mt-ws-5 self-start\">\n        <a href=\"#home\">Go to workspace</a>\n      </Button>\n    </section>\n  );\n}\n"
    },
    {
      "path": "src/blocks/order-confirmation/order-totals.tsx",
      "type": "registry:file",
      "target": "blocks/wideset/order-confirmation/order-totals.tsx",
      "content": "'use client';\n\n// TODO(custom): order totals (label and amount rows, the total under a line); no DescriptionList in Wideset.\nimport { cn } from '@/lib/wideset/utils';\nimport type { ReactNode } from 'react';\n\nimport { daysInPeriod, daysLeft, order, seatDifference, subtotal, total, vatAmount } from './data';\nimport { formatDays, formatPercent, formatUsd } from './format';\n\ntype RowProps = {\n  label: string;\n  /** How the amount comes about, under the label. */\n  detail?: ReactNode;\n  value: number;\n  /** The figure the reader is after: it opens its own group under a line. */\n  strong?: boolean;\n};\n\n/** A label and its amount on one row. The line is the row's own border: a `dl` holds only rows. */\nfunction Row({ label, detail, value, strong }: RowProps) {\n  const type = strong\n    ? 'typography-label-strong-md text-ws-static-strong'\n    : 'typography-body-md text-ws-static-base';\n  return (\n    <div\n      className={cn(\n        'gap-ws-9 flex items-baseline justify-between',\n        strong && 'border-ws-static-base pt-ws-7 border-t',\n      )}\n    >\n      <dt className={cn('gap-ws-2 flex min-w-0 flex-col', type)}>\n        {label}\n        {detail && (\n          <span className=\"typography-caption-md text-ws-static-subtle tabular-nums\">{detail}</span>\n        )}\n      </dt>\n      <dd className={cn(type, 'tabular-nums')}>{formatUsd(value)}</dd>\n    </div>\n  );\n}\n\n/**\n * What was charged: the upgrade for the days left in the period, with how it is worked out, the\n * VAT, and the total. Every figure comes from `data.ts`, so the rows always add up.\n */\nexport function OrderTotals() {\n  return (\n    <dl className=\"gap-ws-7 flex flex-col\">\n      <Row\n        label={`Upgrade to ${order.plan.name}, ${formatDays(order.placed, order.period.to)}`}\n        detail={`${order.seats} seats × ${formatUsd(seatDifference)} more than ${order.previous.name}, ${daysLeft} of ${daysInPeriod} days`}\n        value={subtotal}\n      />\n      <Row label={`VAT ${formatPercent(order.vat.rate)}, ${order.vat.label}`} value={vatAmount} />\n      <Row label=\"Total paid\" value={total} strong />\n    </dl>\n  );\n}\n"
    },
    {
      "path": "src/blocks/order-confirmation/people.assets.ts",
      "type": "registry:file",
      "target": "blocks/wideset/order-confirmation/people.assets.ts",
      "content": "// Portraits of the sample people as small JPEG data URLs (a block ships only .ts and .tsx).\n// Exported from the Wideset Core Figma file by people.cjs: do not edit by hand.\n\n/** A person’s photo by name. People who are not here show their initials. */\nexport const PHOTOS: Record<string, string | undefined> = {\n  'Maya Okafor':\n    'data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/4gHYSUNDX1BST0ZJTEUAAQEAAAHIAAAAAAQwAABtbnRyUkdCIFhZWiAH4AABAAEAAAAAAABhY3NwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAA9tYAAQAAAADTLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlkZXNjAAAA8AAAACRyWFlaAAABFAAAABRnWFlaAAABKAAAABRiWFlaAAABPAAAABR3dHB0AAABUAAAABRyVFJDAAABZAAAAChnVFJDAAABZAAAAChiVFJDAAABZAAAAChjcHJ0AAABjAAAADxtbHVjAAAAAAAAAAEAAAAMZW5VUwAAAAgAAAAcAHMAUgBHAEJYWVogAAAAAAAAb6IAADj1AAADkFhZWiAAAAAAAABimQAAt4UAABjaWFlaIAAAAAAAACSgAAAPhAAAts9YWVogAAAAAAAA9tYAAQAAAADTLXBhcmEAAAAAAAQAAAACZmYAAPKnAAANWQAAE9AAAApbAAAAAAAAAABtbHVjAAAAAAAAAAEAAAAMZW5VUwAAACAAAAAcAEcAbwBvAGcAbABlACAASQBuAGMALgAgADIAMAAxADb/2wBDAAQDAwQDAwQEBAQFBQQFBwsHBwYGBw4KCggLEA4RERAOEA8SFBoWEhMYEw8QFh8XGBsbHR0dERYgIh8cIhocHRz/2wBDAQUFBQcGBw0HBw0cEhASHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBz/wAARCABgAGADASIAAhEBAxEB/8QAHQAAAAcBAQEAAAAAAAAAAAAAAgMEBQYHCAEACf/EADUQAAEDAwMBBgUDAgcAAAAAAAECAwQABREGEiEHEzFBUWGBCBQicaEVMpHB0SQzQkNTseH/xAAbAQACAwEBAQAAA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PET16D7/iZp1C9Hvt5cVHcC2m0BtLie4qGTwfek1x1OiHblRbhHSVDgrI4PrTobN8oFFoYCfDHNNd8jolxwHGwSR5VzT1uJiWHOFOWJbrKo1LqFiXvYhtJwvjKU44qRdFdTW/Td1ukW5yUx/wBQS0W3XDhG5G7gnwzv/FNk6whCisNYyeOKSRNFzb7cWIMKMt+U+oJQ2kck/wBB6+FO0KoGAoiRZ6dTvuo/aajiSmJrCH4zzbzCxlLjagpKvsRSkVI9NdPGNOaVtdmwlS4rQSpYGMq5Kj7qJNHSNGPhO+O4Ck+Ch3Vsmi2Ia27QW9Tar4T/ABI0mjBxR0q3SoKsPtFIH+ocik4NBII5zbp1UqrxIcj0jzpzT72oJvZoO1hvBdX5DyHqatJmzxrSlLcZlKGsDuHP80RoW3CFp+Orbhb+XVHzz3fjFP7mFpQT5lJrQpUwq56zz/WNRe5rtTB8KnAHzELaQ5jP80oTltQUPeiktlh1SPDvFGnuowmPIjqrppadUuLlMuKgXFf7nWk5Ss+akeP3GDVbS+id8TJQf8FKbTxuS4U59iKvTOPPNe7RYP7iKRr6fQrHiYYPpH7fU7igOFWyPWUOr4fZ90dQqZNjQmU+DSS4r27h75qxNJ9NrBoZClwGC7NcG1cp47nFDyz4D0GKmaipYwSTRak/UPSrULGjQOUG/nK3GoV7gYdtvIbRKIyFHcoZJNKEMJSg4AAr2PqA8AK6+5sVHb/5F01E4ln2pp9gpWgHcOePCqlvlt/Spqmx/lq5TVzSXgqYIoOCEb1HyA/9NVxrVjfHafA+rG/2JoVZAVmto141vcKM+FtjP//Z',\n};\n"
    },
    {
      "path": "src/blocks/order-confirmation/person-avatar.tsx",
      "type": "registry:file",
      "target": "blocks/wideset/order-confirmation/person-avatar.tsx",
      "content": "'use client';\n\nimport type { AvatarProps } from '@/components/ui/wideset/avatar/Avatar.types';\nimport { Avatar } from '@/components/ui/wideset/avatar/Avatar';\n\nimport { PHOTOS } from './people.assets';\n\ntype PersonAvatarProps = Pick<\n  AvatarProps,\n  'size' | 'shape' | 'status' | 'color' | 'className' | 'title' | 'aria-hidden' | 'aria-label'\n> & {\n  /** The person's full name: the key their photo is filed under. */\n  name: string;\n  initials: string;\n  /** Leave empty beside the person's name; pass the name where the avatar stands alone. */\n  alt?: string;\n};\n\n/**\n * A person's avatar: their photo when the sample people have one, otherwise their initials in\n * their colour. A real product mixes the two, so every place the block draws a person asks here\n * and the choice is made once. The initials stay as the fallback if the image fails to load.\n */\nexport function PersonAvatar({ name, initials, color, alt = '', ...props }: PersonAvatarProps) {\n  const photo = PHOTOS[name];\n  return photo ? (\n    <Avatar src={photo} alt={alt} initials={initials} {...props} />\n  ) : (\n    <Avatar initials={initials} color={color} {...props} />\n  );\n}\n"
    },
    {
      "path": "src/blocks/order-confirmation/receipt.tsx",
      "type": "registry:file",
      "target": "blocks/wideset/order-confirmation/receipt.tsx",
      "content": "'use client';\n\nimport { RiDownload2Line } from '@remixicon/react';\nimport { Button } from '@/components/ui/wideset/button/Button';\nimport { Card } from '@/components/ui/wideset/card/Card';\nimport { useId } from 'react';\n\nimport { order } from './data';\nimport { formatDate, formatUsd } from './format';\nimport { KeyValue } from './key-value';\nimport { OrderTotals } from './order-totals';\n\n/**\n * The receipt: the proof of the purchase, in one bordered card. The facts that identify the order\n * come first, the money under a line, and the two things to do with a receipt sit in the header as\n * secondary actions, so the page keeps its one filled button for the way on.\n */\nexport function Receipt() {\n  const titleId = useId();\n\n  return (\n    <Card role=\"region\" aria-labelledby={titleId}>\n      <Card.Header>\n        <div className=\"gap-ws-9 flex flex-wrap items-center justify-between\">\n          <h2 id={titleId} className=\"typography-label-strong-md text-ws-static-strong\">\n            Receipt\n          </h2>\n          <Card.Action className=\"gap-ws-5\">\n            <Button size=\"sm\" variant=\"secondary\" preset=\"ghost\">\n              View invoice\n            </Button>\n            <Button size=\"sm\" variant=\"secondary\" preset=\"border\">\n              <Button.Icon icon={RiDownload2Line} />\n              Download receipt\n            </Button>\n          </Card.Action>\n        </div>\n      </Card.Header>\n      {/* Card.Content keeps 10px free on its right for a scrollbar: the padding gives it back. */}\n      <Card.Content contentClassName=\"pr-ws-6\">\n        <div className=\"gap-ws-11 flex flex-col\">\n          <dl className=\"gap-ws-11 grid grid-cols-2 sm:grid-cols-3\">\n            <KeyValue label=\"Order number\">{order.number}</KeyValue>\n            <KeyValue label=\"Date\">{formatDate(order.placed)}</KeyValue>\n            <KeyValue label=\"Payment method\">\n              {order.card.brand} ending {order.card.last4}\n            </KeyValue>\n            <KeyValue label=\"Plan\">\n              {order.plan.name}, {order.interval.toLowerCase()}\n            </KeyValue>\n            <KeyValue label=\"Seats\">{order.seats}</KeyValue>\n            <KeyValue label=\"Price\">{formatUsd(order.plan.seatPrice)} a seat a month</KeyValue>\n          </dl>\n          <div className=\"border-ws-static-base pt-ws-11 border-t\">\n            <OrderTotals />\n          </div>\n        </div>\n      </Card.Content>\n    </Card>\n  );\n}\n"
    },
    {
      "path": "src/blocks/order-confirmation/sidebar.tsx",
      "type": "registry:file",
      "target": "blocks/wideset/order-confirmation/sidebar.tsx",
      "content": "'use client';\n\n// TODO(custom): workspace switcher and account menu are composed by hand.\nimport {\n  RiAddLine,\n  RiArrowDownSLine,\n  RiLogoutBoxRLine,\n  RiSearchLine,\n  RiSettingsLine,\n} from '@remixicon/react';\nimport { Divider } from '@/components/ui/wideset/divider/Divider';\nimport { DropdownMenu } from '@/components/ui/wideset/dropdown/DropdownMenu';\nimport { IconButton } from '@/components/ui/wideset/button/IconButton';\nimport { ListItem } from '@/components/ui/wideset/list-item/ListItem';\nimport { Sidebar } from '@/components/ui/wideset/sidebar/Sidebar';\nimport { type SidebarProps } from '@/components/ui/wideset/sidebar/Sidebar.types';\nimport { TextInput } from '@/components/ui/wideset/text-input/TextInput';\nimport { useState } from 'react';\n\nimport { BrandMark } from './brand-mark';\nimport {\n  account,\n  helpLink,\n  mainLinks,\n  type NavLink,\n  product,\n  settingsLinks,\n  workspace,\n} from './data';\nimport { PersonAvatar } from './person-avatar';\n\n/**\n * The workspace sidebar: switcher, search, the app's pages, settings and the signed-in account.\n * Its toggle sits in the page bar, so the screen holds `collapsed` and passes it down; collapsed,\n * it keeps the mark, the page icons and the avatar.\n */\nexport function AppSidebar(props: Pick<SidebarProps, 'id' | 'collapsed' | 'onCollapsedChange'>) {\n  const [active, setActive] = useState('billing');\n\n  const link = ({ id, label, icon, activeIcon }: NavLink) => (\n    <Sidebar.Item\n      key={id}\n      href={`#${id}`}\n      icon={active === id ? (activeIcon ?? icon) : icon}\n      label={label}\n      active={active === id}\n      onClick={() => setActive(id)}\n    />\n  );\n\n  const nav = (\n    <nav aria-label=\"Workspace\" className=\"gap-ws-9 flex flex-col\">\n      <div className=\"flex flex-col\">{mainLinks.map(link)}</div>\n      <Divider weight=\"thin\" />\n      <div role=\"group\" aria-labelledby=\"sidebar-settings\" className=\"gap-ws-2 flex flex-col\">\n        <Sidebar.SectionHeader id=\"sidebar-settings\">Settings</Sidebar.SectionHeader>\n        {settingsLinks.map(link)}\n      </div>\n    </nav>\n  );\n\n  return (\n    <Sidebar {...props}>\n      <Sidebar.Header>\n        <Sidebar.Expanded>\n          <div className=\"gap-ws-9 flex flex-col\">\n            <div className=\"gap-ws-7 pt-ws-3 pb-ws-7 flex items-center\">\n              <BrandMark className=\"size-ws-15\" />\n              <div className=\"flex min-w-0 flex-1 flex-col\">\n                <span className=\"typography-label-strong-sm text-ws-static-strong truncate\">\n                  {workspace.name}\n                </span>\n                <span className=\"typography-caption-md text-ws-static-subtle truncate\">\n                  {product.name}\n                </span>\n              </div>\n              <DropdownMenu>\n                <DropdownMenu.Trigger asChild>\n                  <IconButton\n                    icon={RiArrowDownSLine}\n                    variant=\"secondary\"\n                    preset=\"ghost\"\n                    size=\"xs\"\n                    aria-label=\"Switch workspace\"\n                    className=\"mr-ws-3\"\n                  />\n                </DropdownMenu.Trigger>\n                <DropdownMenu.Content className=\"ws-block-utility\" align=\"end\">\n                  <DropdownMenu.Item data-state=\"checked\">\n                    <ListItem.Content>\n                      <ListItem.Label>{workspace.name}</ListItem.Label>\n                    </ListItem.Content>\n                  </DropdownMenu.Item>\n                  <DropdownMenu.Separator />\n                  <DropdownMenu.Item>\n                    <ListItem.Prefix>\n                      <RiAddLine className=\"size-ws-9\" />\n                    </ListItem.Prefix>\n                    <ListItem.Content>\n                      <ListItem.Label>New workspace</ListItem.Label>\n                    </ListItem.Content>\n                  </DropdownMenu.Item>\n                </DropdownMenu.Content>\n              </DropdownMenu>\n            </div>\n            <TextInput size=\"sm\">\n              <TextInput.Prefix inner>\n                <TextInput.Icon icon={RiSearchLine} />\n              </TextInput.Prefix>\n              <TextInput.Input type=\"search\" placeholder=\"Search\" aria-label=\"Search\" />\n            </TextInput>\n          </div>\n        </Sidebar.Expanded>\n        <Sidebar.Collapsed>\n          <div className=\"pt-ws-3 pb-ws-7 flex justify-center\">\n            <BrandMark className=\"size-ws-15\" />\n          </div>\n        </Sidebar.Collapsed>\n      </Sidebar.Header>\n\n      {/* A section draws only the slot for the state it is in, so the pages go in both. */}\n      <Sidebar.Section scrollable>{nav}</Sidebar.Section>\n\n      <Sidebar.Footer>\n        <div className=\"gap-ws-9 flex flex-col\">\n          <div className=\"flex flex-col\">{link(helpLink)}</div>\n          {/* On the grey ground the line keeps the nav's inset: run edge to edge, it would stop\n              short of the page and read as broken. */}\n          <div className=\"border-ws-static-base pt-ws-5 border-t\">\n            <Sidebar.Expanded>\n              <DropdownMenu>\n                <DropdownMenu.Trigger asChild>\n                  <button\n                    type=\"button\"\n                    className=\"gap-ws-5 px-ws-5 py-ws-3 rounded-ws-control-lg hover:bg-ws-dynamic-tertiary-alpha-strong-default focus-visible:wds-focus-visible outline-ws-dynamic-primary-strong-default flex w-full items-center text-left\"\n                  >\n                    <PersonAvatar name={account.name} initials={account.initials} color=\"orange\" />\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-caption-md text-ws-static-subtle truncate\">\n                        {account.email}\n                      </span>\n                    </span>\n                    <RiArrowDownSLine\n                      aria-hidden=\"true\"\n                      className=\"size-ws-9 text-ws-static-strong\"\n                    />\n                  </button>\n                </DropdownMenu.Trigger>\n                <DropdownMenu.Content side=\"top\" align=\"start\" className=\"ws-block-utility w-[14rem]\">\n                  <DropdownMenu.Item>\n                    <ListItem.Prefix>\n                      <RiSettingsLine className=\"size-ws-9\" />\n                    </ListItem.Prefix>\n                    <ListItem.Content>\n                      <ListItem.Label>Account settings</ListItem.Label>\n                    </ListItem.Content>\n                  </DropdownMenu.Item>\n                  <DropdownMenu.Separator />\n                  <DropdownMenu.Item variant=\"danger\">\n                    <ListItem.Prefix>\n                      <RiLogoutBoxRLine className=\"size-ws-9\" />\n                    </ListItem.Prefix>\n                    <ListItem.Content>\n                      <ListItem.Label>Log out</ListItem.Label>\n                    </ListItem.Content>\n                  </DropdownMenu.Item>\n                </DropdownMenu.Content>\n              </DropdownMenu>\n            </Sidebar.Expanded>\n            <Sidebar.Collapsed>\n              <div className=\"flex justify-center\">\n                <PersonAvatar\n                  name={account.name}\n                  initials={account.initials}\n                  color=\"orange\"\n                  alt={account.name}\n                  title={account.name}\n                />\n              </div>\n            </Sidebar.Collapsed>\n          </div>\n        </div>\n      </Sidebar.Footer>\n    </Sidebar>\n  );\n}\n"
    }
  ],
  "meta": {
    "version": "1.1.0",
    "commit": "a734f9f0"
  }
}
