import { PageHeaderProps } from "./PageHeader.cjs"; import { PageContentProps } from "./PageContent.cjs"; import { InsetSpacingTokens, PaddingSpacingTokens, SpaceProp, SpacingTokens } from "@marigold/system"; import { HTMLAttributes, ReactNode, Ref } from "react"; interface PageBaseProps extends Omit, 'className' | 'style'> { /** * Content of the page. Typically a `` followed by ``s * (and other page sections). */ children: ReactNode; /** Accessible label for the page's `
`. Required when no `` is present. */ 'aria-label'?: string; /** Ref forwarded to the underlying `<main>` landmark. */ ref?: Ref<HTMLElement>; /** * Base heading level for the page. A `<Title>` inside `<Page.Header>` (or a * bare `<Title>` directly under `<Page>`) renders at this level. * @default 1 */ headingLevel?: 1 | 2 | 3 | 4 | 5 | 6; /** * Tab index of the `<main>` landmark. Pass `-1` to make it a skip-link * target: programmatically focusable, never a tab stop, and drawing no focus * ring. Pass `0` to make it a real tab stop, which gives it the standard * focus ring. `usePageFocus` makes an untitled page's landmark focusable * itself, so it needs neither. */ tabIndex?: number; /** * Vertical rhythm between page sections (the `<Page.Header>` and the * `<Panel>`s below it). * @default 'regular' */ space?: SpaceProp<SpacingTokens>['space']; } /** * Padding around the page content. Either set `p` for uniform padding, or use * `px`/`py` to control the axes separately — setting both forms is a TypeScript * error, mirroring the `<Inset>` component's `p` / `px`+`py` split. */ type PagePaddingProps = { /** Padding on all sides. Cannot be combined with `px` or `py`. */ p?: SpaceProp<InsetSpacingTokens>['space']; px?: never; py?: never; } | { p?: never; /** Horizontal padding. */ px?: SpaceProp<PaddingSpacingTokens>['space']; /** Vertical padding. */ py?: SpaceProp<PaddingSpacingTokens>['space']; }; export type PageProps = PageBaseProps & PagePaddingProps; /** * `<Page>` is the content area of an `<AppShell>`. It renders the `<main>` * landmark in the grid's `main` area and owns the page's padding and vertical * rhythm. It does not own scroll (the document scrolls) and does not enforce a * max-width — content width is driven by `<Panel size="form">`. */ export declare const Page: { ({ children, "aria-label": ariaLabel, headingLevel, space, p, px, py, tabIndex, ref, ...props }: PageProps): import("react").JSX.Element; Header: ({ children }: PageHeaderProps) => import("react").JSX.Element; Content: ({ children, space }: PageContentProps) => import("react").JSX.Element; }; export {};