{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "auth-layout",
  "title": "AuthLayout",
  "description": "The page for signing in, signing up or resetting a password: one `Card` in the middle of the screen, with your brand, the title as the page's `<h1>`, the form, and a line under the card.",
  "registryDependencies": [
    "@ouro/card",
    "@ouro/heading",
    "@ouro/lib-class-name-check",
    "@ouro/lib-cn",
    "@ouro/lib-env",
    "@ouro/lib-use-dev-messages",
    "@ouro/text"
  ],
  "files": [
    {
      "path": "registry/ouro/components/ouro/auth-layout/auth-layout.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 { Card } from \"@/registry/ouro/components/ouro/card/card\";\nimport { Heading } from \"@/registry/ouro/components/ouro/text/heading\";\nimport { Text } from \"@/registry/ouro/components/ouro/text/text\";\n\n/** The props AuthLayout adds to the `<main>` attributes it passes through. */\nexport interface AuthLayoutOwnProps {\n  /** The page's heading, its `<h1>`: \"Sign in\". */\n  title: string;\n  /** A line under the title: \"Welcome back to Spoonjoy.\" */\n  description?: ReactNode;\n  /** Your logo or product name, above the title. Link it to the home page. */\n  brand?: ReactNode;\n  /** The form: fields and the submit button, usually a `Form`. */\n  children: ReactNode;\n  /** A line under the card, such as the link to the other form: \"No account? Sign up\". */\n  footer?: ReactNode;\n  /**\n   * The element the layout renders. Pass `\"div\"` when the layout renders inside a page that\n   * already has a `<main>`, since a document has one.\n   * @default \"main\"\n   */\n  as?: \"main\" | \"div\" | undefined;\n  /** Layout only: margins and height (`min-h-96`). Appearance classes warn in development. */\n  className?: string | undefined;\n  ref?: Ref<HTMLElement> | undefined;\n\n  /** Not a prop. Ouro UI uses `brand`: `<AuthLayout brand={<Logo />}>`. */\n  logo?: { \"Use <AuthLayout brand={<Logo />}>\": never };\n  /** Not a prop. Ouro UI uses `title`: `<AuthLayout title=\"Sign in\">`. */\n  heading?: { 'Use <AuthLayout title=\"Sign in\">': never };\n  /** Not a prop. Ouro UI uses `description`: `<AuthLayout description=\"Welcome back\">`. */\n  subtitle?: { 'Use <AuthLayout description=\"Welcome back\">': never };\n}\n\n/** Props for {@link AuthLayout}: its own props and the `<main>` attributes it passes through. */\nexport type AuthLayoutProps = Omit<HTMLAttributes<HTMLElement>, keyof AuthLayoutOwnProps> & AuthLayoutOwnProps;\n\n/**\n * The page for signing in, signing up or resetting a password: one `Card` in the middle of\n * the screen, with your brand, the title as the page's `<h1>`, the form, and a line under\n * the card. It is the page's `<main>`, at least as tall as the screen, and fills a phone's\n * width.\n *\n * Use `SidebarLayout` or `StackedLayout` instead for the signed-in app. Use `Dialog` for a\n * sign-in prompt over another page.\n *\n * @group Navigation\n * @see https://ui.ouroboros.bot/docs/auth-layout\n *\n * @example\n * <AuthLayout title=\"Sign in\" description=\"Welcome back.\" footer={<Link href=\"/signup\">Create an account</Link>}>\n *   <Form>\n *     <TextField label=\"Email\" name=\"email\" type=\"email\" required />\n *     <Button type=\"submit\" fullWidth>Sign in</Button>\n *   </Form>\n * </AuthLayout>\n */\nexport function AuthLayout(props: AuthLayoutProps): JSX.Element {\n  const {\n    title,\n    description,\n    brand,\n    children,\n    footer,\n    as,\n    className,\n    // Guard props (hint types), dropped here so they never reach the DOM.\n    logo,\n    heading,\n    subtitle,\n    ...rest\n  } = props;\n  useAppearanceClassNameCheck(\n    \"AuthLayout\",\n    className,\n    process.env.NODE_ENV !== \"production\"\n      ? (token: string) => `remove \"${token}\"; AuthLayout sets its own look`\n      : /* istanbul ignore next @preserve -- production only */ \"\",\n  );\n  useDevWarnings(\n    \"AuthLayout\",\n    process.env.NODE_ENV !== \"production\"\n      ? () => [\n          !title && [\"title is required; it is the page's heading\", '<AuthLayout title=\"Sign in\">'],\n          logo !== undefined && [\"logo is not a prop\", \"<AuthLayout brand={<Logo />}>\"],\n          heading !== undefined && [\"heading is not a prop\", '<AuthLayout title=\"Sign in\">'],\n          subtitle !== undefined && [\"subtitle is not a prop\", '<AuthLayout description=\"Welcome back\">'],\n        ]\n      : /* istanbul ignore next @preserve -- production only */ undefined,\n  );\n  // Typed as \"main\" for the ref, which is an HTMLElement either way.\n  const Root = (as === \"div\" ? \"div\" : \"main\") as \"main\";\n  return (\n    <Root\n      {...rest}\n      data-ouro=\"auth-layout\"\n      className={cn(\n        \"box-border flex min-h-dvh flex-col items-center justify-center gap-6 bg-background py-8 text-foreground\",\n        \"ps-[max(1rem,env(safe-area-inset-left,0px))] pe-[max(1rem,env(safe-area-inset-right,0px))]\",\n        className,\n      )}\n    >\n      <Card className=\"w-full max-w-sm\">\n        <div className=\"grid gap-6\">\n          <div className=\"grid gap-2\">\n            {brand !== undefined && <div className=\"mb-2 flex items-center\">{brand}</div>}\n            <Heading level={1} size=\"lg\">\n              {title}\n            </Heading>\n            {description !== undefined && <Text tone=\"muted\">{description}</Text>}\n          </div>\n          {children}\n        </div>\n      </Card>\n      {footer !== undefined && <div data-ouro-text=\"\" className=\"w-full max-w-sm text-center text-base pointer-fine:text-sm text-muted-foreground\">{footer}</div>}\n    </Root>\n  );\n}\n",
      "type": "registry:ui",
      "target": "@components/ouro/auth-layout/auth-layout.tsx"
    }
  ],
  "docs": "The page for signing in, signing up or resetting a password: one `Card` in the middle of the screen, with your brand, the title as the page's `<h1>`, the form, and a line under the card. Import: import { AuthLayout } from \"@/components/ouro/auth-layout/auth-layout\", with @/components replaced by your components alias (aliases.components in components.json, such as ~/components). Also installed: card, 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/auth-layout.md Ouro UI v1.3.257.",
  "type": "registry:ui"
}