{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "feature-parts",
  "title": "Feature parts",
  "description": "What the Features blocks share: a feature's words, the stage its picture stands on, and the section around them.",
  "dependencies": [],
  "registryDependencies": [
    "https://kinoui.com/r/icon-tile.json",
    "https://kinoui.com/r/hero-parts.json",
    "https://kinoui.com/r/section-heading.json",
    "https://kinoui.com/r/studio.json",
    "https://kinoui.com/r/theme.json"
  ],
  "files": [
    {
      "path": "registry/lib/feature-parts.tsx",
      "content": "import { IconTile } from '@/registry/components/kino/icon-tile'\nimport { NudgeLink } from '@/registry/lib/hero-parts'\nimport type { HEADING_BELOW, SectionHeadingLevel } from '@/registry/lib/section-heading'\nimport { Studio } from '@/registry/lib/studio'\nimport type { ComponentProps, ReactNode } from 'react'\n\nimport { cn } from '@/lib/utils'\n\n/*\n * What the Features blocks share: a feature's words, the stage its picture\n * stands on, and the section around them.\n *\n * A picture is the product at work, made of live components, that plays\n * once when it is seen (`useScene` in `registry/lib/scene`). It is a picture\n * to everyone but the eye: the feature's words say what it shows, so it is\n * hidden from screen readers and nothing in it takes focus or a click.\n */\n\n/** One feature: what it is called, what it does for the person, and the product doing it. */\ninterface Feature {\n  /** Tells the features apart, and names a picked one. */\n  value: string\n  title: string\n  description: ReactNode\n  /** Beside the title where there is no picture, or in a list of features. */\n  icon?: ReactNode\n  /** The product doing it, made of live components that play once when seen (`useScene`). */\n  picture?: ReactNode\n  /** A link to more about it, after its description. */\n  action?: ReactNode\n}\n\n/** A feature's heading: a level under the section's title. */\ntype FeatureHeading = (typeof HEADING_BELOW)[SectionHeadingLevel]\n\n/** The section every arrangement stands in, laid out by its own width. */\nconst featuresSectionClassName =\n  '@container/features relative flex min-h-full w-full min-w-0 flex-col bg-background px-(--surface-padding) py-12 @3xl/features:px-10 @3xl/features:py-16'\n\n/** The content's column, as wide as a page's. */\nconst featuresColumnClassName = 'mx-auto flex w-full max-w-6xl min-w-0 flex-col gap-10'\n\n/** A feature's icon, in an Icon tile of the primary tone, so a column of them lines up and follows the brand's colour. */\nfunction FeatureIcon(props: Omit<ComponentProps<typeof IconTile>, 'tone' | 'label'>) {\n  return <IconTile data-feature-icon='' tone='primary' {...props} />\n}\n\n/** The words of a feature: its title, what it does, and a link to more. */\nfunction FeatureWords({\n  feature,\n  heading: Heading,\n  className,\n  size = 'default',\n}: {\n  feature: Feature\n  heading: FeatureHeading\n  className?: string\n  /** `lead` for the one feature told in depth: its words read larger. */\n  size?: 'default' | 'lead'\n}) {\n  return (\n    <div className={cn('flex min-w-0 flex-col gap-1.5', className)}>\n      <Heading\n        className={cn(\n          'font-medium tracking-tight text-balance',\n          size === 'lead' ? 'text-xl @3xl/features:text-2xl' : 'text-base',\n        )}\n      >\n        {/* Its own direction, so its words read the same way round right to left. */}\n        <bdi>{feature.title}</bdi>\n      </Heading>\n      <p\n        className={cn(\n          'text-muted-foreground text-pretty',\n          size === 'lead' ? 'text-base' : 'text-sm',\n        )}\n      >\n        <bdi>{feature.description}</bdi>\n      </p>\n      {feature.action ? (\n        <div\n          className={cn(\n            'flex flex-wrap items-center gap-3 text-sm',\n            size === 'lead' ? 'mt-4' : 'mt-1.5',\n          )}\n        >\n          {feature.action}\n        </div>\n      ) : null}\n    </div>\n  )\n}\n\n/**\n * A link to more about a feature, for its `action`: its words, then an arrow\n * that nudges along the line on hover, as the Hero's announcement's does. Name what it's about for a screen\n * reader, since every feature's link may read Learn more.\n */\nfunction FeatureLink(props: ComponentProps<'a'>) {\n  return <NudgeLink data-slot='feature-link' {...props} />\n}\n\n/** Where a picture sits on a stage: centred, with more room around it once the stage, a `stage` container, has it. */\nconst featurePictureClassName =\n  'flex w-full min-w-0 items-center justify-center p-3 @xs/stage:p-6'\n\n/**\n * The stage a picture stands on: a grey studio, lit softly behind it. Hidden\n * from screen readers, with nothing in it to focus or press.\n */\nfunction FeatureStage({ className, children, ...props }: ComponentProps<'div'>) {\n  return (\n    <div\n      inert\n      aria-hidden\n      data-slot='feature-stage'\n      // Its width set, so on a narrow column its min height lowers an aspect ratio rather than widening it.\n      className={cn(\n        '@container/stage relative isolate flex min-h-64 w-full min-w-0 overflow-hidden',\n        className,\n      )}\n      {...props}\n    >\n      <Studio />\n      {children ? (\n        <div data-slot='feature-picture' className={featurePictureClassName}>\n          {children}\n        </div>\n      ) : null}\n    </div>\n  )\n}\n\nexport {\n  type Feature,\n  type FeatureHeading,\n  featuresColumnClassName,\n  featuresSectionClassName,\n  FeatureIcon,\n  FeatureLink,\n  featurePictureClassName,\n  FeatureStage,\n  FeatureWords,\n}\n",
      "type": "registry:lib",
      "target": "@lib/feature-parts.tsx"
    }
  ],
  "type": "registry:lib"
}