import { type ComponentProps, type ReactNode } from 'react'; /** * Unstyled Carbon UI Shell wiring, the behaviour of the styled shell without a single class. * `Root` holds whether the side nav is expanded and gives it an id: a `Header.MenuButton` and a * `SideNav.Root` inside it wire themselves to each other (`aria-expanded`, `aria-controls`, the * hamburger opening and the side nav's Esc / overlay / focus leaving closing) with no props. Left * out, give the menu button `active` / `onToggle` and the side nav `expanded` / `onToggle` yourself. * * `Content` is the `
` beside the side nav (the skip link's target): it * finds the side nav on the page (or in the same shadow root) and shows how it lays out as * `data-side-nav` — `default` (pushes the page from `lg`), `rail`, `fixed`, `collapsible` (over the * page) or `none` — to offset the page by. * * ```tsx * * * Skip to main content * ☰ * * * * … * * … * * ``` */ export interface RootProps { /** The side nav is expanded (controlled). */ sideNavExpanded?: boolean; defaultSideNavExpanded?: boolean; /** The menu button, Esc, the overlay or focus leaving the side nav asked for this state. */ onSideNavExpandedChange?: (expanded: boolean) => void; children?: ReactNode; } export interface ShellContextValue { sideNavExpanded: boolean; setSideNavExpanded: (expanded: boolean) => void; /** The side nav's id, for the menu button's `aria-controls`. */ sideNavId: string; } /** The state of the enclosing `Shell.Root`, or null outside one (the parts then follow their own props). */ export declare function useShellContext(): ShellContextValue | null; /** Holds the side nav's expanded state for the menu button and the side nav; renders only its children. */ export declare function Root({ sideNavExpanded, defaultSideNavExpanded, onSideNavExpandedChange, children }: Readonly): import("react").JSX.Element; /** How a side nav sits beside the content: pushing it 256 (fixed) / 48 (rail) / 256 from lg (default), or over it (collapsible). */ export type SideNavMode = 'default' | 'rail' | 'fixed' | 'collapsible'; export interface ContentProps extends Omit, 'id'> { /** How the side nav beside it lays out; found on the page (or in the same shadow root) when left out. */ sideNav?: SideNavMode | 'none'; id?: string; } /** The page's `
`: `data-side-nav` tells how the side nav beside it lays out. */ export declare function Content({ sideNav, id, ref, ...rest }: Readonly): import("react").JSX.Element;