{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "hero-section",
  "title": "Hero Section",
  "description": "Positioning, a primary action, supporting proof, and product media.",
  "dependencies": [
    "class-variance-authority",
    "lucide-react"
  ],
  "registryDependencies": [
    "badge",
    "button",
    "https://uaiblocks.dev/r/uai-theme.json",
    "https://uaiblocks.dev/r/task-list.json",
    "https://uaiblocks.dev/r/trust-panel.json",
    "https://uaiblocks.dev/r/uai-utils.json"
  ],
  "files": [
    {
      "path": "src/registry/uai/blocks/hero-section.tsx",
      "content": "\"use client\";\n\nimport { cva } from \"class-variance-authority\";\nimport { ArrowRight } from \"lucide-react\";\nimport { type ComponentProps, createContext, useContext, useId } from \"react\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n  TrustPanel,\n  type TrustPanelProps,\n  type TrustPanelVariant,\n} from \"@/components/ui/uai/trust-panel\";\nimport { cn } from \"@/lib/uai-utils\";\n\nexport const HERO_SECTION_VARIANTS = [\"split\", \"centered\", \"framed\"] as const;\nexport type HeroSectionVariant = (typeof HERO_SECTION_VARIANTS)[number];\nexport type HeroSectionProps = ComponentProps<\"section\"> & { variant?: HeroSectionVariant };\n\ntype HeroContext = { id: string; variant: HeroSectionVariant };\nconst Context = createContext<HeroContext | null>(null);\nfunction useHero(part: string) {\n  const context = useContext(Context);\n  if (!context) throw new Error(`${part} must be used within HeroSection`);\n  return context;\n}\n\nconst heroSectionVariants = cva(\n  \"box-border @container min-w-0 text-[13px]/[18px] text-foreground\",\n  {\n    variants: {\n      variant: {\n        split: \"py-2\",\n        centered: \"py-2 text-center\",\n        framed:\n          \"rounded-[14px] border bg-card p-[clamp(24px,5cqi,48px)] shadow-[0_1px_2px_oklch(0_0_0/0.04)]\",\n      },\n    },\n  },\n);\n\n// Media enters after the text has started: 12px up, from 98.5%, at 200ms.\nconst mediaIn =\n  \"animate-in fade-in-0 slide-in-from-bottom-3 zoom-in-[0.985] duration-300 ease-out-quint fill-mode-both [animation-delay:200ms] motion-reduce:animate-none\";\n\n/** Opening section with positioning copy, actions, proof, and media. Split and Framed stack below 720px. */\nexport function HeroSection({\n  variant = \"split\",\n  children,\n  className,\n  ...props\n}: HeroSectionProps) {\n  const id = useId();\n  return (\n    <Context.Provider value={{ id, variant }}>\n      <section\n        aria-labelledby={`${id}-title`}\n        data-slot=\"hero-section\"\n        data-variant={variant}\n        className={cn(heroSectionVariants({ variant }), className)}\n        {...props}\n      >\n        <div\n          className={cn(\n            \"grid min-w-0 items-center gap-8\",\n            variant !== \"centered\" &&\n              \"@min-[720px]:grid-cols-[minmax(0,1fr)_minmax(0,1fr)] @min-[720px]:gap-12\",\n          )}\n        >\n          {children}\n        </div>\n      </section>\n    </Context.Provider>\n  );\n}\n\nexport function HeroSectionContent({ className, ...props }: ComponentProps<\"div\">) {\n  const { variant } = useHero(\"HeroSectionContent\");\n  const centered = variant === \"centered\";\n  return (\n    <div\n      data-slot=\"hero-section-content\"\n      className={cn(\n        \"grid min-w-0\",\n        \"*:animate-in *:fade-in-0 *:slide-in-from-bottom-[6px] *:duration-300 *:ease-out-quint *:fill-mode-both *:nth-2:[animation-delay:40ms] *:nth-3:[animation-delay:80ms] *:nth-4:[animation-delay:120ms] *:nth-[n+5]:[animation-delay:160ms] motion-reduce:*:animate-none\",\n        centered ? \"mx-auto max-w-[640px] justify-items-center\" : \"justify-items-start\",\n        className,\n      )}\n      {...props}\n    />\n  );\n}\n\nexport type HeroSectionEyebrowProps = ComponentProps<\"p\"> & {\n  /** Turns the eyebrow into a link pill with a trailing arrow. */\n  href?: string;\n};\n\n/**\n * A short announcement above the title. Put a tag in `<span data-tag>` (\"New\"). With `href`,\n * the whole pill is one link, so give it a descriptive text (\"New: Shared inbox for field teams\").\n */\nexport function HeroSectionEyebrow({\n  href,\n  className,\n  children,\n  ...props\n}: HeroSectionEyebrowProps) {\n  const pill = cn(\n    \"inline-flex min-h-7 items-center gap-2 rounded-full bg-muted py-1 pr-2.5 pl-1 text-xs/4 font-medium text-muted-foreground\",\n    \"[&_[data-tag]]:inline-flex [&_[data-tag]]:h-5 [&_[data-tag]]:items-center [&_[data-tag]]:rounded-full [&_[data-tag]]:bg-card [&_[data-tag]]:px-2 [&_[data-tag]]:text-foreground [&_[data-tag]]:shadow-[0_0_0_1px_var(--border)]\",\n  );\n  return (\n    <p data-slot=\"hero-section-eyebrow\" className={cn(\"m-0\", !href && pill, className)} {...props}>\n      {href ? (\n        <a\n          href={href}\n          className={cn(\n            pill,\n            \"group/eyebrow no-underline transition-[background-color,scale] duration-[120ms,140ms] ease-[ease-out,cubic-bezier(0.23,1,0.32,1)] hover:bg-[color-mix(in_oklab,var(--muted)_85%,var(--foreground))] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring focus-visible:outline-solid active:scale-[0.97] motion-reduce:transition-none motion-reduce:active:scale-100\",\n          )}\n        >\n          {children}\n          <ArrowRight\n            aria-hidden=\"true\"\n            strokeWidth={2}\n            className=\"size-3.5 text-foreground transition-[translate] duration-160 ease-out-quint group-hover/eyebrow:translate-x-0.5 motion-reduce:transition-none\"\n          />\n        </a>\n      ) : (\n        children\n      )}\n    </p>\n  );\n}\n\nexport function HeroSectionTitle({ className, ...props }: ComponentProps<\"h1\">) {\n  const { id, variant } = useHero(\"HeroSectionTitle\");\n  return (\n    <h1\n      data-slot=\"hero-section-title\"\n      className={cn(\n        \"m-0 mt-4 text-[length:clamp(30px,4cqi_+_10px,42px)] leading-[1.06] font-medium tracking-[-0.035em] text-balance first:mt-0\",\n        // In two columns the title gets half the width, so scale with the column: 42px at a\n        // 960px hero (456px column) and down in step, which keeps it to three lines.\n        variant !== \"centered\" && \"@min-[720px]:text-[length:clamp(30px,4.6cqi_-_2px,42px)]\",\n        // An <em> sets the second clause in muted ink, not italic.\n        \"[&_em]:text-muted-foreground [&_em]:not-italic\",\n        className,\n      )}\n      {...props}\n      id={`${id}-title`}\n    />\n  );\n}\n\nexport function HeroSectionDescription({ className, ...props }: ComponentProps<\"p\">) {\n  return (\n    <p\n      data-slot=\"hero-section-description\"\n      className={cn(\n        \"m-0 mt-4 max-w-[46ch] text-[15px]/[23px] text-pretty text-muted-foreground first:mt-0\",\n        className,\n      )}\n      {...props}\n    />\n  );\n}\n\nexport function HeroSectionActions({ className, ...props }: ComponentProps<\"div\">) {\n  const { variant } = useHero(\"HeroSectionActions\");\n  return (\n    <div\n      data-slot=\"hero-section-actions\"\n      className={cn(\n        \"mt-6 flex flex-wrap gap-2 first:mt-0\",\n        variant === \"centered\" ? \"justify-center\" : \"justify-start\",\n        className,\n      )}\n      {...props}\n    />\n  );\n}\n\nexport type HeroSectionActionProps = ComponentProps<\"a\"> & { priority?: \"primary\" | \"secondary\" };\n\nexport function HeroSectionAction({\n  priority = \"primary\",\n  className,\n  ...props\n}: HeroSectionActionProps) {\n  const primary = priority === \"primary\";\n  return (\n    <Button\n      asChild\n      variant={primary ? \"default\" : \"secondary\"}\n      className={cn(\n        \"h-9 gap-1.5 rounded-full px-4 py-0 text-[13px]/[18px] no-underline has-[>svg]:px-4 transition-[filter,box-shadow,scale] duration-[120ms,120ms,140ms] ease-[ease-out,ease-out,cubic-bezier(0.23,1,0.32,1)] focus-visible:ring-0 focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-offset-2 focus-visible:outline-ring active:scale-[0.97] motion-reduce:transition-none motion-reduce:active:scale-100\",\n        primary\n          ? \"bg-primary text-primary-foreground hover:bg-primary hover:brightness-108\"\n          : \"bg-secondary text-secondary-foreground hover:bg-secondary hover:shadow-[inset_0_0_0_999px_color-mix(in_oklab,var(--foreground)_9%,transparent)]\",\n        className,\n      )}\n    >\n      <a data-slot=\"hero-section-action\" data-priority={priority} {...props} />\n    </Button>\n  );\n}\n\n/**\n * Supporting proof as one row, rendered as a Trust Panel. Compose an optional decorative\n * avatar stack (`<span data-avatars aria-hidden>` with 24px circles), a TrustPanelTitle with\n * the count in `<b>`, and a TrustPanelRating; a hairline divides the title from the rating.\n */\nexport function HeroSectionProof({ variant, className, ...props }: TrustPanelProps) {\n  const hero = useHero(\"HeroSectionProof\");\n  const panelVariant: TrustPanelVariant =\n    variant ?? (hero.variant === \"framed\" ? \"compact\" : \"plain\");\n  return (\n    <TrustPanel\n      {...props}\n      variant={panelVariant}\n      className={cn(\n        \"mt-7 flex w-full flex-wrap items-center gap-x-3.5 gap-y-2 text-[12.5px]/[18px] text-muted-foreground first:mt-0\",\n        hero.variant === \"centered\" ? \"justify-center\" : \"justify-start\",\n        \"[&_[data-avatars]]:flex [&_[data-avatars]]:items-center [&_[data-avatars]>*]:-ml-1.5 [&_[data-avatars]>*:first-child]:ml-0 [&_[data-avatars]>*]:grid [&_[data-avatars]>*]:size-6 [&_[data-avatars]>*]:place-items-center [&_[data-avatars]>*]:rounded-full [&_[data-avatars]>*]:text-[10.5px] [&_[data-avatars]>*]:font-semibold [&_[data-avatars]>*]:shadow-[0_0_0_2px_var(--background)]\",\n        \"[&_[data-slot=trust-panel-title]]:text-[12.5px]/[18px] [&_[data-slot=trust-panel-title]]:font-normal [&_[data-slot=trust-panel-title]]:tracking-normal [&_[data-slot=trust-panel-title]]:text-muted-foreground [&_[data-slot=trust-panel-title]_b]:font-medium [&_[data-slot=trust-panel-title]_b]:text-foreground\",\n        \"[&_[data-slot=trust-panel-rating]]:before:h-4 [&_[data-slot=trust-panel-rating]]:before:w-px [&_[data-slot=trust-panel-rating]]:before:bg-border [&_[data-slot=trust-panel-rating]]:before:content-['']\",\n        // Proof stars are ink, never a status colour.\n        \"[&_[data-slot=trust-panel-rating]_.text-warning]:text-foreground\",\n        className,\n      )}\n    />\n  );\n}\n\n/**\n * The product picture. It is a positioning stage without chrome, so composed media brings its\n * own surfaces; give a plain screenshot `rounded-[14px] border` yourself. Decorative\n * compositions should be `aria-hidden`.\n */\nexport function HeroSectionMedia({ className, ...props }: ComponentProps<\"figure\">) {\n  const { variant } = useHero(\"HeroSectionMedia\");\n  return (\n    <figure\n      data-slot=\"hero-section-media\"\n      className={cn(\n        // Media composes its own surfaces, so it never inherits the Centered text alignment.\n        \"relative m-0 box-border w-full min-w-0 text-start\",\n        mediaIn,\n        variant === \"centered\"\n          ? \"mx-auto aspect-[16/9] max-w-[880px]\"\n          : \"h-[min(430px,110cqi)] @min-[720px]:h-[430px]\",\n        variant === \"framed\" && \"rounded-xl\",\n        className,\n      )}\n      {...props}\n    />\n  );\n}\n",
      "type": "registry:component",
      "target": "@components/uai/hero-section.tsx"
    }
  ],
  "categories": [
    "marketing",
    "hero"
  ],
  "type": "registry:block"
}