{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "features-01",
  "title": "Alternating feature rows",
  "description": "Three rows that swap sides on wide screens, each pairing a short text with an invoice, a reminder list or a payment list drawn from primitives.",
  "dependencies": [],
  "registryDependencies": [
    "https://ui.ndekocode.dev/r/badge.json",
    "https://ui.ndekocode.dev/r/button.json",
    "https://ui.ndekocode.dev/r/chip.json",
    "https://ui.ndekocode.dev/r/icons.json",
    "https://ui.ndekocode.dev/r/status-orb.json",
    "https://ui.ndekocode.dev/r/theme.json",
    "https://ui.ndekocode.dev/r/utils.json"
  ],
  "files": [
    {
      "path": "registry/ndeko/blocks/features/features-01/index.tsx",
      "content": "import { ChevronRightIcon } from '@/registry/ndeko/lib/icons';\nimport { cn } from '@/registry/ndeko/lib/utils';\nimport { Button } from '@/registry/ndeko/ui/button';\n\nimport { ROWS, SECTION } from './data';\nimport { FeatureMedia } from './feature-media';\n\nfunction isMediaFirst(index: number) {\n  return index % 2 === 1;\n}\n\nexport default function Features01() {\n  return (\n    <section className='px-4 py-16 sm:px-6 sm:py-24 lg:px-8'>\n      <div className='mx-auto flex max-w-6xl flex-col gap-14 sm:gap-20'>\n        <div className='flex max-w-2xl flex-col gap-3'>\n          <h2 className='text-2xl font-semibold text-balance sm:text-3xl'>\n            {SECTION.title}\n          </h2>\n          <p className='text-muted-foreground text-base text-pretty'>\n            {SECTION.description}\n          </p>\n        </div>\n        <ul className='flex flex-col gap-16 sm:gap-24'>\n          {ROWS.map((row, index) => (\n            <li\n              key={row.id}\n              className='grid items-center gap-8 lg:grid-cols-2 lg:gap-16'\n            >\n              <div className='flex flex-col items-start gap-4'>\n                <span className='keycap-3d text-muted-foreground flex size-9 items-center justify-center rounded-lg'>\n                  <row.icon />\n                </span>\n                <h3 className='text-xl font-semibold text-balance'>\n                  {row.title}\n                </h3>\n                <p className='text-muted-foreground max-w-md text-sm leading-relaxed text-pretty'>\n                  {row.description}\n                </p>\n                <Button\n                  variant='link'\n                  className='h-auto px-0'\n                  nativeButton={false}\n                  render={<a href='#' />}\n                >\n                  {row.linkLabel}\n                  <ChevronRightIcon className='size-3.5' />\n                </Button>\n              </div>\n              <div className={cn(isMediaFirst(index) && 'lg:order-first')}>\n                <FeatureMedia id={row.id} />\n              </div>\n            </li>\n          ))}\n        </ul>\n      </div>\n    </section>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/blocks/features-01/index.tsx"
    },
    {
      "path": "registry/ndeko/blocks/features/features-01/feature-media.tsx",
      "content": "import { cn } from '@/registry/ndeko/lib/utils';\nimport { Badge } from '@/registry/ndeko/ui/badge';\nimport { Chip } from '@/registry/ndeko/ui/chip';\nimport { StatusOrb } from '@/registry/ndeko/ui/status-orb';\n\nimport {\n  INVOICE,\n  type InvoiceLine,\n  type MediaId,\n  PAYMENTS,\n  REMINDERS,\n} from './data';\n\nconst AMOUNT_FORMAT = new Intl.NumberFormat('en-US', {\n  style: 'currency',\n  currency: 'USD',\n  maximumFractionDigits: 0,\n});\n\nconst SURFACE =\n  'bg-card hairline-ring ring-border dark:bg-foreground/[0.04] rounded-xl shadow-[0_1px_2px_rgb(0_0_0/0.04),0_12px_32px_-16px_rgb(0_0_0/0.12)]';\n\nfunction amountOf(value: number) {\n  return AMOUNT_FORMAT.format(value);\n}\n\nfunction lineTotalOf(line: InvoiceLine) {\n  return line.hours * line.rate;\n}\n\nfunction invoiceTotalOf(lines: InvoiceLine[]) {\n  let total = 0;\n  for (const line of lines) {\n    total += lineTotalOf(line);\n  }\n  return total;\n}\n\nfunction hoursLabelOf(hours: number) {\n  if (hours === 1) {\n    return '1 hour';\n  }\n  return `${hours} hours`;\n}\n\nfunction InvoiceMedia() {\n  const total = invoiceTotalOf(INVOICE.lines);\n\n  return (\n    <div className={cn(SURFACE, 'flex w-full max-w-sm flex-col gap-4 p-5')}>\n      <div className='flex items-start justify-between gap-3'>\n        <div className='flex flex-col gap-0.5'>\n          <p className='text-sm font-medium'>{INVOICE.client}</p>\n          <p className='text-muted-foreground text-xs tabular-nums'>\n            {INVOICE.number}, {INVOICE.period}\n          </p>\n        </div>\n        <Badge variant='secondary' className='text-muted-foreground'>\n          {INVOICE.status}\n        </Badge>\n      </div>\n      <table className='w-full text-[13px]'>\n        <caption className='sr-only'>Invoice lines</caption>\n        <thead>\n          <tr className='text-muted-foreground hairline-b border-border text-xs'>\n            <th scope='col' className='pb-2 text-left font-medium'>\n              Task\n            </th>\n            <th scope='col' className='pb-2 text-right font-medium'>\n              Amount\n            </th>\n          </tr>\n        </thead>\n        <tbody>\n          {INVOICE.lines.map((line) => {\n            const lineTotal = lineTotalOf(line);\n\n            return (\n              <tr\n                key={line.description}\n                className='hairline-b border-border last:border-b-0'\n              >\n                <td className='py-2'>\n                  <span className='block'>{line.description}</span>\n                  <span className='text-muted-foreground text-xs tabular-nums'>\n                    {hoursLabelOf(line.hours)} at {amountOf(line.rate)}\n                  </span>\n                </td>\n                <td className='py-2 text-right align-top tabular-nums'>\n                  {amountOf(lineTotal)}\n                </td>\n              </tr>\n            );\n          })}\n        </tbody>\n        <tfoot>\n          <tr className='hairline-t border-border'>\n            <th scope='row' className='pt-3 text-left font-medium'>\n              Total\n            </th>\n            <td className='pt-3 text-right font-semibold tabular-nums'>\n              {amountOf(total)}\n            </td>\n          </tr>\n        </tfoot>\n      </table>\n    </div>\n  );\n}\n\nfunction RemindersMedia() {\n  return (\n    <ol className={cn(SURFACE, 'flex w-full max-w-sm flex-col gap-1 p-2')}>\n      {REMINDERS.map((reminder) => (\n        <li key={reminder.title} className='flex items-center gap-3 p-2.5'>\n          <span className='keycap-3d text-muted-foreground flex size-8 shrink-0 items-center justify-center rounded-lg'>\n            <reminder.icon />\n          </span>\n          <div className='flex min-w-0 flex-1 flex-col'>\n            <p className='truncate text-[13px] font-medium'>{reminder.title}</p>\n            <p className='text-muted-foreground text-xs'>{reminder.date}</p>\n          </div>\n          <Chip color={reminder.color}>{reminder.status}</Chip>\n        </li>\n      ))}\n    </ol>\n  );\n}\n\nfunction PaymentsMedia() {\n  const latest = PAYMENTS[0];\n\n  return (\n    <div className='relative w-full max-w-sm pt-10 sm:pt-0'>\n      <ul className={cn(SURFACE, 'flex flex-col gap-1 p-2')}>\n        {PAYMENTS.map((payment) => (\n          <li\n            key={payment.invoice}\n            className='flex items-center justify-between gap-3 p-2.5'\n          >\n            <div className='flex min-w-0 flex-col'>\n              <p className='truncate text-[13px] font-medium'>\n                {payment.client}\n              </p>\n              <p className='text-muted-foreground text-xs tabular-nums'>\n                {payment.invoice}\n              </p>\n            </div>\n            <div className='flex shrink-0 flex-col items-end gap-1'>\n              <span className='text-[13px] tabular-nums'>\n                {amountOf(payment.amount)}\n              </span>\n              <Chip color={payment.color}>{payment.status}</Chip>\n            </div>\n          </li>\n        ))}\n      </ul>\n      <div className='surface-raised absolute -top-2 right-0 flex items-center gap-2.5 rounded-xl py-2 ps-2 pe-3.5 sm:-top-6 sm:-right-4'>\n        <StatusOrb tone='success' size='sm' className='[&>span]:animate-none' />\n        <p className='text-[13px] font-medium tabular-nums'>\n          {amountOf(latest.amount)} received\n        </p>\n      </div>\n    </div>\n  );\n}\n\nconst MEDIA_BY_ID: Record<MediaId, () => React.ReactNode> = {\n  invoice: InvoiceMedia,\n  reminders: RemindersMedia,\n  payments: PaymentsMedia,\n};\n\nexport function FeatureMedia({ id }: { id: MediaId }) {\n  const Media = MEDIA_BY_ID[id];\n\n  return (\n    <div\n      aria-hidden='true'\n      className='bg-foreground/[0.025] flex min-h-72 items-center justify-center rounded-2xl p-4 sm:p-10'\n    >\n      <Media />\n    </div>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/blocks/features-01/feature-media.tsx"
    },
    {
      "path": "registry/ndeko/blocks/features/features-01/data.ts",
      "content": "import {\n  BellIcon,\n  ClockIcon,\n  FileTextIcon,\n  type Icon,\n  MailIcon,\n  SendIcon,\n  WalletIcon,\n} from '@/registry/ndeko/lib/icons';\n\nexport type MediaId = 'invoice' | 'reminders' | 'payments';\n\nexport type FeatureRow = {\n  id: MediaId;\n  icon: Icon;\n  title: string;\n  description: string;\n  linkLabel: string;\n};\n\nexport const SECTION = {\n  title: 'Everything between the last tracked hour and the paid invoice',\n  description:\n    'Three steps that usually live in three tools, kept in one place and in the right order.',\n};\n\nexport const ROWS: FeatureRow[] = [\n  {\n    id: 'invoice',\n    icon: FileTextIcon,\n    title: 'Draft invoices from the hours you tracked',\n    description:\n      'Pick a client and a period. Tallyfold groups the time by task, applies each rate and leaves a draft for you to check line by line.',\n    linkLabel: 'How drafts work',\n  },\n  {\n    id: 'reminders',\n    icon: BellIcon,\n    title: 'Reminders that stay polite',\n    description:\n      'Choose the tone and the rhythm once. Tallyfold follows up on late invoices and stops the moment a payment arrives.',\n    linkLabel: 'Set up reminders',\n  },\n  {\n    id: 'payments',\n    icon: WalletIcon,\n    title: 'Payments land beside the invoice',\n    description:\n      'Clients pay by card or bank transfer from the link in the email. The invoice turns paid and the books follow the same day.',\n    linkLabel: 'See payment options',\n  },\n];\n\nexport type InvoiceLine = {\n  description: string;\n  hours: number;\n  rate: number;\n};\n\nexport const INVOICE = {\n  number: 'TF-0142',\n  client: 'Harbor & Finch Studio',\n  period: '1 to 31 October',\n  status: 'Draft',\n  lines: [\n    { description: 'Brand workshop', hours: 6, rate: 90 },\n    { description: 'Website copy', hours: 14, rate: 75 },\n    { description: 'Review rounds', hours: 3, rate: 75 },\n  ] satisfies InvoiceLine[],\n};\n\nexport type Reminder = {\n  icon: Icon;\n  title: string;\n  date: string;\n  status: string;\n  color: string;\n};\n\nexport const REMINDERS: Reminder[] = [\n  {\n    icon: SendIcon,\n    title: 'Invoice sent',\n    date: 'Mon 3 Nov',\n    status: 'Delivered',\n    color: 'var(--success)',\n  },\n  {\n    icon: MailIcon,\n    title: 'Friendly reminder',\n    date: 'Mon 10 Nov',\n    status: 'Opened',\n    color: 'var(--info)',\n  },\n  {\n    icon: ClockIcon,\n    title: 'Second reminder',\n    date: 'Mon 17 Nov',\n    status: 'Scheduled',\n    color: 'var(--warning)',\n  },\n];\n\nexport type Payment = {\n  client: string;\n  invoice: string;\n  amount: number;\n  status: string;\n  color: string;\n};\n\nexport const PAYMENTS: Payment[] = [\n  {\n    client: 'Harbor & Finch Studio',\n    invoice: 'TF-0142',\n    amount: 1815,\n    status: 'Paid',\n    color: 'var(--success)',\n  },\n  {\n    client: 'Okafor Bakery',\n    invoice: 'TF-0139',\n    amount: 640,\n    status: 'Paid',\n    color: 'var(--success)',\n  },\n  {\n    client: 'Lune Architects',\n    invoice: 'TF-0137',\n    amount: 2300,\n    status: 'Due Friday',\n    color: 'var(--warning)',\n  },\n];\n",
      "type": "registry:component",
      "target": "components/blocks/features-01/data.ts"
    }
  ],
  "categories": [
    "blocks",
    "features"
  ],
  "type": "registry:block"
}