{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "features-tour",
  "title": "Features tour",
  "description": "A landing page’s features as a tour: pick one from the list, its description opens, and its picture plays in one large frame beside it.",
  "dependencies": [],
  "registryDependencies": [
    "https://kinoui.com/r/animated-number.json",
    "https://kinoui.com/r/avatar.json",
    "https://kinoui.com/r/badge.json",
    "https://kinoui.com/r/button.json",
    "https://kinoui.com/r/command.json",
    "https://kinoui.com/r/controllable.json",
    "https://kinoui.com/r/feature-parts.json",
    "https://kinoui.com/r/hero-parts.json",
    "https://kinoui.com/r/highlight.json",
    "https://kinoui.com/r/meter.json",
    "https://kinoui.com/r/scene.json",
    "https://kinoui.com/r/section-heading.json",
    "https://kinoui.com/r/sparkline.json",
    "https://kinoui.com/r/swap.json",
    "https://kinoui.com/r/tabs.json",
    "https://kinoui.com/r/text-shimmer.json",
    "https://kinoui.com/r/theme.json"
  ],
  "files": [
    {
      "path": "registry/components/kino/features-tour/features-tour.tsx",
      "content": "'use client'\n\nimport { Tabs, TabsPanel, TabsList, TabsTab } from '@/registry/components/kino/tabs'\nimport { useControllable } from '@/registry/lib/controllable'\nimport {\n  type Feature,\n  FeatureIcon,\n  featuresColumnClassName,\n  featuresSectionClassName,\n  featurePictureClassName,\n  FeatureStage,\n} from '@/registry/lib/feature-parts'\nimport { HeroShot } from '@/registry/lib/hero-parts'\nimport { tintedRowTextClassName } from '@/registry/lib/highlight'\nimport { SectionHeading, type SectionHeadingLevel } from '@/registry/lib/section-heading'\nimport { type ComponentProps, type ReactNode, useId } from 'react'\n\nimport { cn } from '@/lib/utils'\n\n/*\n * A landing page's features as a tour: a list of them on the start side and\n * one large picture beside it. Picking a feature opens its description in\n * the list and plays its picture. In a phone's column the picture follows\n * the list, in the order a keyboard reaches them.\n *\n *   <FeaturesTour\n *     title='Plan less. Ship more.'\n *     features={[{ value: 'cycles', title: 'Cycles that size themselves', description: '…', picture: <CyclePicture /> }]}\n *   />\n */\n\ninterface FeaturesTourProps extends Omit<\n  ComponentProps<'section'>,\n  'title' | 'children' | 'defaultValue' | 'onChange'\n> {\n  /** Each with its `picture`: the tour is the pictures. */\n  features: (Feature & { picture: ReactNode })[]\n  title: ReactNode\n  eyebrow?: ReactNode\n  description?: ReactNode\n  actions?: ReactNode\n  heading?: SectionHeadingLevel\n  /** The feature shown, by its `value`. */\n  value?: string\n  /** The feature shown at first: the first, unless you give another. */\n  defaultValue?: string\n  onValueChange?: (value: string) => void\n}\n\nfunction FeaturesTour({\n  features,\n  title,\n  eyebrow,\n  description,\n  actions,\n  heading = 'h2',\n  value: valueProp,\n  defaultValue,\n  onValueChange,\n  className,\n  ...props\n}: FeaturesTourProps) {\n  const titleId = useId()\n  const [value, setValue] = useControllable(\n    valueProp,\n    defaultValue ?? features[0]?.value ?? '',\n    onValueChange,\n  )\n  return (\n    <section\n      data-slot='features-tour'\n      aria-labelledby={titleId}\n      className={cn(featuresSectionClassName, className)}\n      {...props}\n    >\n      <div className={featuresColumnClassName}>\n        <SectionHeading\n          id={titleId}\n          eyebrow={eyebrow}\n          title={title}\n          description={description}\n          heading={heading}\n          align='start'\n        >\n          {actions ? (\n            <div className='mt-3 flex flex-wrap items-center gap-3'>{actions}</div>\n          ) : null}\n        </SectionHeading>\n        <Tabs\n          value={value}\n          onValueChange={(next) => setValue(String(next))}\n          orientation='vertical'\n          className='grid min-w-0 gap-6 @3xl/features:grid-cols-[minmax(0,2fr)_minmax(0,3fr)] @3xl/features:items-start @3xl/features:gap-10'\n        >\n          <TabsList variant='rows' aria-labelledby={titleId} className='min-w-0'>\n            {features.map((feature) => (\n              <TourTab key={feature.value} feature={feature} />\n            ))}\n          </TabsList>\n          {/* One frame for every feature: only the picture changes as the pick does. */}\n          <div className='min-w-0'>\n            {/* The stage's room, for the picture laid over it. */}\n            <div className='@container/stage relative'>\n              <HeroShot decorative>\n                <FeatureStage className='aspect-[4/3]' />\n              </HeroShot>\n              {features.map((feature) => (\n                <TabsPanel\n                  key={feature.value}\n                  value={feature.value}\n                  // Over the frame's window, inside its bezel, with its ring inside it.\n                  className='absolute inset-1.5 flex min-w-0 overflow-hidden rounded-(--surface-radius) focus-visible:ring-inset'\n                >\n                  <p className='sr-only'>{feature.description}</p>\n                  <div\n                    inert\n                    aria-hidden\n                    className={cn(featurePictureClassName, '@3xl/features:*:[zoom:1.1]')}\n                  >\n                    {feature.picture}\n                  </div>\n                </TabsPanel>\n              ))}\n            </div>\n            {features.some((feature) => feature.action) ? (\n              // Under the frame, the picked feature's link, in a row kept for it so nothing moves.\n              <div className='flex min-h-9 items-center justify-end pt-3 text-sm'>\n                {features.find((feature) => feature.value === value)?.action}\n              </div>\n            ) : null}\n          </div>\n        </Tabs>\n      </div>\n    </section>\n  )\n}\n\n/**\n * A feature in the list: its icon and title, and under them, once picked,\n * its description, which opens on `layout` as the one before closes.\n */\nfunction TourTab({ feature }: { feature: Feature }) {\n  return (\n    <TabsTab\n      value={feature.value}\n      className={cn(\n        'group/tab flex w-full min-w-0 flex-col items-stretch rounded-(--surface-radius) px-(--surface-padding) py-3 text-start',\n        'transition-[box-shadow] duration-(--motion-press-duration) ease-(--motion-press-fade-easing)',\n        'focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:outline-hidden',\n        // Its muted words keep 4.5:1 on the picked row's tint.\n        tintedRowTextClassName,\n        // Forced colours drop the tint: the picked row takes the system's highlight as an outline.\n        'forced-colors:data-[selected]:outline-2 forced-colors:data-[selected]:outline-[Highlight]',\n      )}\n    >\n      <span className='flex min-w-0 items-center gap-3'>\n        {feature.icon ? <FeatureIcon>{feature.icon}</FeatureIcon> : null}\n        <span className='text-muted-foreground group-hover/tab:text-foreground group-data-[selected]/tab:text-foreground min-w-0 flex-1 text-sm font-medium text-balance transition-colors duration-(--motion-press-duration) ease-(--motion-press-fade-easing)'>\n          <bdi>{feature.title}</bdi>\n        </span>\n      </span>\n      {/* The tab's name is its title: the panel says the description to a screen reader. */}\n      <span\n        aria-hidden\n        className='grid grid-rows-[0fr] transition-[grid-template-rows] duration-(--motion-layout-duration) ease-(--motion-layout-easing) group-data-[selected]/tab:grid-rows-[1fr] motion-reduce:transition-none'\n      >\n        <span className='min-h-0 overflow-hidden'>\n          <span\n            className={cn(\n              'text-muted-foreground block pt-1.5 text-sm text-pretty',\n              feature.icon && 'ps-11',\n              'opacity-0 transition-opacity duration-(--motion-exit-duration) ease-(--motion-exit-fade-easing) group-data-[selected]/tab:opacity-100 group-data-[selected]/tab:duration-(--motion-enter-duration) group-data-[selected]/tab:ease-(--motion-enter-fade-easing)',\n            )}\n          >\n            <bdi>{feature.description}</bdi>\n          </span>\n        </span>\n      </span>\n    </TabsTab>\n  )\n}\n\nexport { FeaturesTour, type FeaturesTourProps }\n",
      "type": "registry:component",
      "target": "@components/kino/features-tour/features-tour.tsx"
    }
  ],
  "type": "registry:block"
}