{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "page-header",
  "title": "PageHeader",
  "description": "The top of a page: its title with an optional line above it (`eyebrow`), a description under it, the page's actions beside it, and a trail and an image above.",
  "registryDependencies": [
    "@ouro/heading",
    "@ouro/lib-class-name-check",
    "@ouro/lib-cn",
    "@ouro/lib-env",
    "@ouro/lib-use-dev-messages"
  ],
  "files": [
    {
      "path": "registry/ouro/components/ouro/page-header/page-header.tsx",
      "content": "\"use client\";\n\nimport type { HTMLAttributes, JSX, ReactNode, Ref } from \"react\";\nimport { useAppearanceClassNameCheck } from \"@/registry/ouro/lib/ouro/class-name-check\";\nimport { cn } from \"@/registry/ouro/lib/ouro/cn\";\nimport { useDevWarnings } from \"@/registry/ouro/lib/ouro/use-dev-messages\";\nimport { Heading } from \"@/registry/ouro/components/ouro/text/heading\";\n\n/** The props PageHeader adds to the `<div>` attributes it passes through. */\nexport interface PageHeaderOwnProps {\n  /** The page's title, its `<h1>` (or `<h2>` with `level={2}`). */\n  title: ReactNode;\n  /** A short line above the title that says what kind of page this is or where it sits: \"Settings\", \"Project\". */\n  eyebrow?: ReactNode;\n  /** A short sentence under the title. */\n  description?: ReactNode;\n  /** The page's actions, such as Edit and Share buttons: at the end of the title on wide screens, under it on phones. */\n  actions?: ReactNode;\n  /**\n   * A trail above everything else, such as a `Breadcrumb`.\n   *\n   * @claim \"A trail above everything else, such\" registry/ouro/components/ouro/page-header/page-header.test.tsx verify:testExists(registry/ouro/components/ouro/page-header/page-header.test.tsx::PageHeader > puts the trail and the image above the title, the image at full width)\n   */\n  breadcrumb?: ReactNode;\n  /**\n   * An image or illustration above the title, at the header's full width with rounded corners.\n   * Give an `<img>` its `alt`, or `alt=\"\"` when the title already says what it shows.\n   */\n  media?: ReactNode;\n  /** More under the description, such as badges or a byline. */\n  children?: ReactNode;\n  /**\n   * The title's heading level. `1` for the page title; `2` when the header heads a section\n   * inside a page that already has its `<h1>`. @default 1\n   */\n  level?: 1 | 2 | (number & { 'Use 1 for the page title or 2 for a section': never }) | undefined;\n  /** How large the title is: `md` for an app page, `lg` for a landing or profile page. @default \"md\" */\n  size?: \"md\" | \"lg\" | (string & { 'Use \"md\" or \"lg\"': never }) | undefined;\n  /** A line under the header, between it and the page's content. */\n  divider?: boolean | undefined;\n  /** Layout only: margins, width (`mb-8`, `max-w-5xl`). Appearance classes warn in development. */\n  className?: string | undefined;\n  ref?: Ref<HTMLDivElement> | undefined;\n\n  /** Not a prop. The text under the title is `description`: `<PageHeader title=\"…\" description=\"…\" />`. */\n  subtitle?: { 'Use <PageHeader description=\"...\" />': never };\n  /** Not a prop. The text above the title is `eyebrow`: `<PageHeader eyebrow=\"Settings\" title=\"…\" />`. */\n  overline?: { 'Use <PageHeader eyebrow=\"Settings\" />': never };\n  /** Not a prop. The buttons are `actions`: `<PageHeader actions={<Button>Edit</Button>} />`. */\n  action?: { 'Use actions={<Button>Edit</Button>}': never };\n  /** Not a prop. The image is `media`: `<PageHeader media={<img src={src} alt=\"\" />} />`. */\n  image?: { 'Use media={<img src={src} alt=\"\" />}': never };\n  /** Not a prop. The title is `title`: `<PageHeader title=\"Billing\" />`. */\n  heading?: { 'Use <PageHeader title=\"Billing\" />': never };\n}\n\n/** Props for {@link PageHeader}: its own props and the `<div>` attributes it passes through. */\nexport type PageHeaderProps = Omit<HTMLAttributes<HTMLDivElement>, keyof PageHeaderOwnProps> & PageHeaderOwnProps;\n\n/**\n * The top of a page: its title with an optional line above it (`eyebrow`), a description\n * under it, the page's actions beside it, and a trail and an image above. On phones the\n * actions move under the title. The title is the page's `<h1>`, in the theme's heading font;\n * with `level={2}` the header heads a section instead.\n *\n * Use `Heading` instead for a plain title with nothing around it, and `Card` for a block of\n * content with its own title inside a page.\n *\n * @group Layout\n * @see https://ui.ouroboros.bot/docs/page-header\n *\n * @example\n * <PageHeader\n *   eyebrow=\"Settings\"\n *   title=\"Billing\"\n *   description=\"Your plan, invoices and payment method.\"\n *   actions={<Button>Change plan</Button>}\n * />\n */\nexport function PageHeader(props: PageHeaderProps): JSX.Element {\n  const {\n    title,\n    eyebrow,\n    description,\n    actions,\n    breadcrumb,\n    media,\n    children,\n    level: levelProp = 1,\n    size: sizeProp = \"md\",\n    divider,\n    className,\n    // Guard props (hint types), dropped here so they never reach the DOM.\n    subtitle,\n    overline,\n    action,\n    image,\n    heading,\n    ...rest\n  } = props;\n  const level = levelProp === 2 ? 2 : 1;\n  const size = sizeProp === \"lg\" ? \"lg\" : \"md\";\n  useAppearanceClassNameCheck(\n    \"PageHeader\",\n    className,\n    process.env.NODE_ENV !== \"production\"\n      ? (token: string) => `remove \"${token}\"; PageHeader sets its own look from the theme`\n      : /* istanbul ignore next @preserve -- production only */ \"\",\n  );\n  useDevWarnings(\n    \"PageHeader\",\n    process.env.NODE_ENV !== \"production\"\n      ? () => [\n          level !== levelProp && [`level={${String(levelProp)}} is not a level; use 1 or 2`, \"<PageHeader level={2} />\"],\n          size !== sizeProp && [`size=\"${String(sizeProp)}\" is not a size; use \"md\" or \"lg\"`, '<PageHeader size=\"lg\" />'],\n          subtitle !== undefined && [\"subtitle is not a prop\", `<PageHeader description=\"${typeof subtitle === \"string\" ? subtitle : \"...\"}\" />`],\n          overline !== undefined && [\"overline is not a prop\", `<PageHeader eyebrow=\"${typeof overline === \"string\" ? overline : \"...\"}\" />`],\n          action !== undefined && [\"action is not a prop\", \"<PageHeader actions={<Button>Edit</Button>} />\"],\n          image !== undefined && [\"image is not a prop\", '<PageHeader media={<img src={src} alt=\"\" />} />'],\n          heading !== undefined && [\"heading is not a prop\", `<PageHeader title=\"${typeof heading === \"string\" ? heading : \"...\"}\" />`],\n        ]\n      : /* istanbul ignore next @preserve -- production only */ undefined,\n  );\n  return (\n    <div\n      {...rest}\n      data-ouro=\"page-header\"\n      data-size={size}\n      className={cn(\"grid min-w-0 gap-4\", divider && \"border-0 border-b border-solid border-border pb-6\", className)}\n    >\n      {breadcrumb != null ? (\n        <div data-slot=\"breadcrumb\" className=\"min-w-0\">\n          {breadcrumb}\n        </div>\n      ) : null}\n      {media != null ? (\n        <div data-slot=\"media\" className=\"min-w-0 overflow-hidden rounded-ouro-lg bg-muted [&>img]:block [&>img]:h-full [&>img]:w-full [&>img]:object-cover\">\n          {media}\n        </div>\n      ) : null}\n      <div className=\"grid min-w-0 gap-4 sm:grid-cols-[minmax(0,1fr)_auto] sm:items-end\">\n        <div className=\"grid min-w-0 gap-2\">\n          {eyebrow != null ? (\n            <p data-slot=\"eyebrow\" className={\"m-0 text-sm leading-5 font-medium text-muted-foreground\"}>\n              {eyebrow}\n            </p>\n          ) : null}\n          <Heading level={level} size={size === \"lg\" ? \"display\" : level === 1 ? \"2xl\" : \"xl\"} className=\"min-w-0 break-words\">\n            {title}\n          </Heading>\n          {description != null ? (\n            <div data-slot=\"description\" className={\"max-w-prose text-base leading-7 text-muted-foreground\"}>\n              {description}\n            </div>\n          ) : null}\n          {children != null ? <div className=\"min-w-0 pt-1\">{children}</div> : null}\n        </div>\n        {actions != null ? (\n          <div data-slot=\"actions\" className=\"flex min-w-0 flex-wrap items-center gap-2 sm:justify-end\">\n            {actions}\n          </div>\n        ) : null}\n      </div>\n    </div>\n  );\n}\n",
      "type": "registry:ui",
      "target": "@components/ouro/page-header/page-header.tsx"
    }
  ],
  "docs": "The top of a page: its title with an optional line above it (`eyebrow`), a description under it, the page's actions beside it, and a trail and an image above. Import: import { PageHeader } from \"@/components/ouro/page-header/page-header\", with @/components replaced by your components alias (aliases.components in components.json, such as ~/components). Also installed: heading, text, the helpers they import in lib/ouro. Needs ouro-base in your stylesheet: add that item once per app, from the same place as this one, if you have not. Docs: https://ui.ouroboros.bot/docs/page-header.md Ouro UI v1.3.257.",
  "type": "registry:ui"
}