{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "faq-open",
  "title": "FAQ open",
  "description": "A landing page’s questions with every answer in view, in two columns under the heading and who to ask, for a handful of short answers with nothing to open.",
  "dependencies": [],
  "registryDependencies": [
    "https://kinoui.com/r/avatar.json",
    "https://kinoui.com/r/faq-parts.json",
    "https://kinoui.com/r/link-target.json",
    "https://kinoui.com/r/section-heading.json",
    "https://kinoui.com/r/theme.json"
  ],
  "files": [
    {
      "path": "registry/components/kino/faq-open/faq-open.tsx",
      "content": "'use client'\n\nimport {\n  faqAnswerClassName,\n  faqColumnClassName,\n  type FaqSectionProps,\n  type FaqQuestion,\n  faqQuestionClassName,\n  faqSectionClassName,\n} from '@/registry/lib/faq-parts'\nimport { linkTargetClassName, useLinkTarget } from '@/registry/lib/link-target'\nimport { HEADING_BELOW, SectionHeading } from '@/registry/lib/section-heading'\nimport { useCallback, useId, useRef } from 'react'\n\nimport { cn } from '@/lib/utils'\n\n/*\n * A landing page's questions with every answer in view: the heading and who\n * to ask across the top, and the questions in two columns under it. Nothing\n * opens, so a visitor reads as they scroll and the browser's find, a reader\n * mode and a search engine see it all as it is. Nothing moves either: the\n * answers are the point.\n *\n *   <FaqOpen\n *     title='Questions, answered.'\n *     questions={[{ value: 'cancel', question: 'Can we cancel at any time?', answer: '…' }]}\n *   />\n */\n\ninterface FaqOpenProps extends FaqSectionProps {\n  questions: FaqQuestion[]\n}\n\n/** Nothing to open: the question is on the page already. */\nfunction reveal() {}\n\nfunction FaqOpen({\n  title,\n  description,\n  eyebrow,\n  heading = 'h2',\n  contact,\n  questions,\n  className,\n  ...props\n}: FaqOpenProps) {\n  const titleId = useId()\n  const ref = useRef<HTMLElement>(null)\n  useLinkTarget(\n    ref,\n    useCallback(\n      (value: string) => questions.some((question) => question.value === value),\n      [questions],\n    ),\n    reveal,\n  )\n  const Question = HEADING_BELOW[heading]\n  return (\n    <section\n      ref={ref}\n      data-slot='faq-open'\n      aria-labelledby={titleId}\n      className={cn(faqSectionClassName, className)}\n      {...props}\n    >\n      <div className={cn(faqColumnClassName, 'flex flex-col gap-12')}>\n        <div className='flex min-w-0 flex-col gap-8 @3xl/faq:flex-row @3xl/faq:items-end @3xl/faq:justify-between @3xl/faq:gap-16'>\n          <SectionHeading\n            id={titleId}\n            eyebrow={eyebrow}\n            title={title}\n            description={description}\n            heading={heading}\n            align='start'\n          />\n          {contact ? <div className='min-w-0 @3xl/faq:max-w-xs'>{contact}</div> : null}\n        </div>\n        <div className='grid min-w-0 gap-x-16 gap-y-10 @3xl/faq:grid-cols-2'>\n          {questions.map((question) => (\n            <div\n              key={question.value}\n              data-link-target={question.value}\n              // A link to it moves focus here, so the keyboard goes on from it.\n              tabIndex={-1}\n              className={cn(\n                linkTargetClassName,\n                'focus-visible:ring-ring/50 flex min-w-0 flex-col gap-2 border-t pt-6 focus-visible:rounded-(--surface-radius) focus-visible:ring-3 focus-visible:outline-hidden',\n              )}\n            >\n              <Question className={faqQuestionClassName}>\n                <bdi>{question.question}</bdi>\n              </Question>\n              <div className={faqAnswerClassName}>{question.answer}</div>\n            </div>\n          ))}\n        </div>\n      </div>\n    </section>\n  )\n}\n\nexport { FaqOpen, type FaqOpenProps }\n",
      "type": "registry:component",
      "target": "@components/kino/faq-open/faq-open.tsx"
    }
  ],
  "type": "registry:block"
}