import { ElementType, ReactNode } from 'react'; import { BoxProps } from '@mui/material/Box'; import { SurfaceRung } from '../../tokens/colors'; export interface SurfaceProps extends Omit { /** * Force a rung instead of deriving one from the parent. * * Needed for portalled content, which cannot inherit through the DOM. Prefer * letting the rung derive: an explicit value is a claim about where this * element sits that the component tree can no longer keep honest. */ rung?: SurfaceRung; /** Render a different element. Defaults to `div`. */ component?: ElementType; children?: ReactNode; } /** * A background that knows where it is. * * Wrapping content in a `Surface` does two things: it paints the correct rung * for its nesting depth, and it declares the `--ds-*` custom properties that * descendants read to stay consistent with it — an input recesses one rung * below, quiet text picks a tier that still clears contrast, a border picks a * value that is legible against this specific background. * * Nesting is capped at three levels (`MAX_SURFACE_DEPTH`). A fourth is painted * at its parent's rung rather than continuing up the ladder, and logs an error * in development. The cap exists because the rungs are 2–3 L\* apart: past three * steps the steps stop reading as hierarchy and start reading as noise, and the * text ramp runs out of contrast headroom. If you need a fourth level, the * answer is almost always that one of the outer three should not be a surface. */ export declare function Surface({ rung: explicitRung, sx, style, children, ...rest }: SurfaceProps): import("react").JSX.Element;