{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "feature-showcase",
  "title": "Feature Showcase",
  "description": "Benefits through alternating copy, media, and supporting details.",
  "dependencies": [
    "class-variance-authority"
  ],
  "registryDependencies": [
    "https://uaiblocks.dev/r/uai-theme.json",
    "https://uaiblocks.dev/r/description-list.json",
    "https://uaiblocks.dev/r/uai-utils.json"
  ],
  "files": [
    {
      "path": "src/registry/uai/blocks/feature-showcase.tsx",
      "content": "\"use client\";\n\nimport { cva } from \"class-variance-authority\";\nimport { type ComponentProps, createContext, useContext, useId } from \"react\";\nimport {\n  DescriptionList,\n  type DescriptionListProps,\n  type DescriptionListVariant,\n} from \"@/components/ui/uai/description-list\";\nimport { cn } from \"@/lib/uai-utils\";\n\nexport const FEATURE_SHOWCASE_VARIANTS = [\"alternating\", \"stacked\", \"cards\"] as const;\nexport type FeatureShowcaseVariant = (typeof FEATURE_SHOWCASE_VARIANTS)[number];\nexport type FeatureShowcaseProps = ComponentProps<\"section\"> & {\n  variant?: FeatureShowcaseVariant;\n};\n\ntype ShowcaseContext = { id: string; variant: FeatureShowcaseVariant };\nconst Context = createContext<ShowcaseContext | null>(null);\nfunction useShowcase(part: string) {\n  const context = useContext(Context);\n  if (!context) throw new Error(`${part} must be used within FeatureShowcase`);\n  return context;\n}\n\nconst detailVariants: Record<FeatureShowcaseVariant, DescriptionListVariant> = {\n  alternating: \"inline\",\n  stacked: \"inline\",\n  cards: \"stacked\",\n};\n\nconst featureShowcaseListVariants = cva(\"m-0 grid min-w-0 list-none p-0\", {\n  variants: {\n    variant: {\n      alternating: \"gap-10\",\n      stacked: \"mx-auto max-w-160 gap-10\",\n      cards: \"gap-3 @min-[720px]:grid-cols-2\",\n    },\n  },\n});\n\nconst featureShowcaseItemVariants = cva(\n  \"grid min-w-0 animate-[enter_400ms_var(--ease-out-quint)_both] fade-in-0 slide-in-from-bottom-[6px] nth-2:[animation-delay:40ms] nth-3:[animation-delay:80ms] nth-[n+4]:[animation-delay:120ms] supports-[animation-timeline:view()]:[animation-timeline:view()] supports-[animation-timeline:view()]:[animation-range:entry_0%_entry_35%] supports-[animation-timeline:view()]:[animation-duration:auto] motion-reduce:animate-none\",\n  {\n    variants: {\n      variant: {\n        alternating:\n          \"items-center gap-5 @min-[720px]:grid-cols-2 @min-[720px]:gap-12 @min-[720px]:even:*:data-[slot=feature-showcase-media]:-order-1\",\n        stacked: \"items-center gap-5\",\n        cards:\n          \"content-start items-center gap-4 rounded-[14px] border bg-card px-2 pt-2 pb-4.5 shadow-[0_1px_2px_oklch(0_0_0/0.04)] [&>:not([data-slot=feature-showcase-media])]:px-2\",\n      },\n    },\n  },\n);\n\nconst featureShowcaseMediaVariants = cva(\"relative m-0 box-border w-full min-w-0 overflow-hidden\", {\n  variants: {\n    variant: {\n      alternating: \"aspect-[4/3] rounded-[14px] border bg-card\",\n      stacked: \"-order-1 aspect-video rounded-[14px] border bg-card\",\n      cards: \"-order-1 aspect-video rounded-lg border-0 bg-background\",\n    },\n  },\n});\n\n/** Benefits as alternating copy and media. Rows stack below 720px with media first in Stacked and Cards. */\nexport function FeatureShowcase({\n  variant = \"alternating\",\n  children,\n  className,\n  ...props\n}: FeatureShowcaseProps) {\n  const id = useId();\n  return (\n    <Context.Provider value={{ id, variant }}>\n      <section\n        aria-labelledby={`${id}-title`}\n        data-slot=\"feature-showcase\"\n        data-variant={variant}\n        className={cn(\n          \"@container box-border grid min-w-0 gap-10 text-[13px]/[18px] text-foreground\",\n          className,\n        )}\n        {...props}\n      >\n        {children}\n      </section>\n    </Context.Provider>\n  );\n}\n\nexport function FeatureShowcaseHeader({ className, ...props }: ComponentProps<\"header\">) {\n  const { variant } = useShowcase(\"FeatureShowcaseHeader\");\n  const centered = variant !== \"alternating\";\n  return (\n    <header\n      data-slot=\"feature-showcase-header\"\n      className={cn(\n        \"grid max-w-160 gap-2\",\n        centered ? \"mx-auto justify-items-center text-center\" : \"justify-items-start text-start\",\n        className,\n      )}\n      {...props}\n    />\n  );\n}\n\nexport function FeatureShowcaseTitle({ className, ...props }: ComponentProps<\"h2\">) {\n  const { id } = useShowcase(\"FeatureShowcaseTitle\");\n  return (\n    <h2\n      data-slot=\"feature-showcase-title\"\n      className={cn(\n        \"m-0 text-[length:clamp(22px,2.5cqi_+_12px,30px)] leading-[1.15] font-medium tracking-[-0.025em] text-balance\",\n        className,\n      )}\n      {...props}\n      id={`${id}-title`}\n    />\n  );\n}\n\nexport function FeatureShowcaseDescription({ className, ...props }: ComponentProps<\"p\">) {\n  return (\n    <p\n      data-slot=\"feature-showcase-description\"\n      className={cn(\"m-0 text-[15px]/[23px] text-pretty text-muted-foreground\", className)}\n      {...props}\n    />\n  );\n}\n\nexport function FeatureShowcaseList({ className, ...props }: ComponentProps<\"ul\">) {\n  const { variant } = useShowcase(\"FeatureShowcaseList\");\n  return (\n    <ul\n      data-slot=\"feature-showcase-list\"\n      className={cn(featureShowcaseListVariants({ variant }), className)}\n      {...props}\n    />\n  );\n}\n\nexport function FeatureShowcaseItem({ className, ...props }: ComponentProps<\"li\">) {\n  const { variant } = useShowcase(\"FeatureShowcaseItem\");\n  return (\n    <li\n      data-slot=\"feature-showcase-item\"\n      className={cn(featureShowcaseItemVariants({ variant }), className)}\n      {...props}\n    />\n  );\n}\n\nexport function FeatureShowcaseContent({ className, ...props }: ComponentProps<\"div\">) {\n  return (\n    <div\n      data-slot=\"feature-showcase-content\"\n      className={cn(\"grid min-w-0 gap-2.5\", className)}\n      {...props}\n    />\n  );\n}\n\nexport function FeatureShowcaseLabel({ className, ...props }: ComponentProps<\"p\">) {\n  return (\n    <p\n      data-slot=\"feature-showcase-label\"\n      className={cn(\"m-0 text-xs/4 font-medium text-subtle-foreground\", className)}\n      {...props}\n    />\n  );\n}\n\nexport function FeatureShowcaseItemTitle({ className, ...props }: ComponentProps<\"h3\">) {\n  const { variant } = useShowcase(\"FeatureShowcaseItemTitle\");\n  return (\n    <h3\n      data-slot=\"feature-showcase-item-title\"\n      className={cn(\n        \"m-0 font-medium\",\n        variant === \"cards\" ? \"text-[15px]/5 tracking-[-0.01em]\" : \"text-lg/6 tracking-[-0.015em]\",\n        className,\n      )}\n      {...props}\n    />\n  );\n}\n\nexport function FeatureShowcaseItemDescription({ className, ...props }: ComponentProps<\"p\">) {\n  return (\n    <p\n      data-slot=\"feature-showcase-item-description\"\n      className={cn(\n        \"m-0 max-w-[52ch] text-[13.5px]/5 text-pretty text-muted-foreground\",\n        className,\n      )}\n      {...props}\n    />\n  );\n}\n\n/** Supporting facts rendered as a Description List. Compose DescriptionListItem children inside. */\nexport function FeatureShowcaseDetails({ variant, className, ...props }: DescriptionListProps) {\n  const showcase = useShowcase(\"FeatureShowcaseDetails\");\n  return (\n    <DescriptionList\n      variant={variant ?? detailVariants[showcase.variant]}\n      className={cn(\"mt-1\", className)}\n      {...props}\n    />\n  );\n}\n\nexport function FeatureShowcaseMedia({ className, ...props }: ComponentProps<\"figure\">) {\n  const { variant } = useShowcase(\"FeatureShowcaseMedia\");\n  return (\n    <figure\n      data-slot=\"feature-showcase-media\"\n      className={cn(featureShowcaseMediaVariants({ variant }), className)}\n      {...props}\n    />\n  );\n}\n",
      "type": "registry:component",
      "target": "@components/uai/feature-showcase.tsx"
    }
  ],
  "categories": [
    "marketing",
    "features"
  ],
  "type": "registry:block"
}