{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "stats-statement",
  "title": "Stats statement",
  "description": "The numbers inside one large sentence, in full colour against muted words, rolling into place in reading order the first time each is seen, with the sources under it.",
  "dependencies": [],
  "registryDependencies": [
    "https://kinoui.com/r/hero-parts.json",
    "https://kinoui.com/r/section-heading.json",
    "https://kinoui.com/r/stats-parts.json"
  ],
  "files": [
    {
      "path": "registry/components/kino/stats-statement/stats-statement.tsx",
      "content": "'use client'\n\nimport { displayTitleClassName } from '@/registry/lib/hero-parts'\nimport { SectionHeading } from '@/registry/lib/section-heading'\nimport {\n  type StatSource,\n  StatsArrival,\n  statsColumnClassName,\n  statsSectionClassName,\n  StatsSource,\n  type StatsWordsProps,\n} from '@/registry/lib/stats-parts'\nimport { type ComponentProps, type ReactNode, useId } from 'react'\n\nimport { cn } from '@/lib/utils'\n\n/*\n * The numbers told as one sentence, set large: the words in a quieter\n * colour and the numbers in full, so the eye lands on them in reading\n * order. The first time it is seen, the numbers roll into place in that\n * order. Where each comes from is a footnote under it.\n *\n *   <StatsStatement eyebrow='Kino in numbers' sources={[{ label: 'Status page', href: '/status' }]}>\n *     Kino plans the week for <StatsNumber value={12400} /> teams in{' '}\n *     <StatsNumber value={84} /> countries.\n *   </StatsStatement>\n */\n\ninterface StatsStatementProps\n  extends StatsWordsProps, Omit<ComponentProps<'section'>, 'title'> {\n  /** The sentence, with each figure in a `StatsNumber`. */\n  children: ReactNode\n  /** Where the numbers come from, in a line under the sentence. */\n  sources?: StatSource[]\n  /** What the line of sources is called for a screen reader. */\n  sourcesLabel?: string\n  /** A link to more under it, such as the customer stories: a `NudgeLink`. */\n  action?: ReactNode\n}\n\nfunction StatsStatement({\n  eyebrow,\n  heading = 'h2',\n  locale,\n  sources,\n  sourcesLabel = 'Sources',\n  action,\n  className,\n  children,\n  ...props\n}: StatsStatementProps) {\n  const titleId = useId()\n  return (\n    <section\n      data-slot='stats-statement'\n      aria-labelledby={titleId}\n      className={cn(statsSectionClassName, className)}\n      {...props}\n    >\n      <StatsArrival locale={locale}>\n        <div className={cn(statsColumnClassName, 'flex flex-col items-start gap-8')}>\n          <SectionHeading\n            id={titleId}\n            eyebrow={eyebrow}\n            title={children}\n            heading={heading}\n            align='start'\n            titleClassName={cn(\n              displayTitleClassName,\n              'text-muted-foreground max-w-5xl text-3xl @2xl/stats:text-4xl @5xl/stats:text-5xl @5xl/stats:leading-[1.1] [&_[data-slot=stats-number]]:text-foreground',\n            )}\n          />\n          {sources?.length || action ? (\n            <div className='flex w-full flex-col gap-6 border-t pt-6 @2xl/stats:flex-row @2xl/stats:items-center @2xl/stats:justify-between'>\n              {sources?.length ? (\n                <ul\n                  aria-label={sourcesLabel}\n                  className='flex flex-wrap items-center gap-x-6 gap-y-1'\n                >\n                  {sources.map((source, index) => (\n                    <li key={index}>\n                      <StatsSource source={source} />\n                    </li>\n                  ))}\n                </ul>\n              ) : null}\n              {action}\n            </div>\n          ) : null}\n        </div>\n      </StatsArrival>\n    </section>\n  )\n}\n\nexport { StatsStatement, type StatsStatementProps }\n",
      "type": "registry:component",
      "target": "@components/kino/stats-statement/stats-statement.tsx"
    }
  ],
  "type": "registry:block"
}