import * as React from "react";
import { TooltipContent } from "./tooltip";
type SidebarContextProps = {
state: "expanded" | "collapsed";
open: boolean;
setOpen: (open: boolean) => void;
openMobile: boolean;
setOpenMobile: (open: boolean) => void;
isMobile: boolean;
toggleSidebar: () => void;
};
/**
* Returns the active sidebar context and enforces provider usage.
*
* @remarks
* Must be called from within {@link SidebarProvider}. Exposes desktop and mobile
* open state along with the shared toggle helper used by sidebar primitives.
*
* @example
* ```tsx
* const {open, toggleSidebar} = useSidebar();
* ```
*
* @see {@link https://react.dev/reference/react/useContext | React useContext Docs}
*/
declare function useSidebar(): SidebarContextProps;
/**
* Props for the sidebar provider.
*/
interface SidebarProviderProps extends React.ComponentProps<"div"> {
/**
* Initial uncontrolled open state for desktop layouts.
* @default true
*/
defaultOpen?: boolean;
/**
* Controlled open state for desktop layouts.
* @default undefined
*/
open?: boolean;
/**
* Callback invoked when the desktop open state changes.
* @default undefined
*/
onOpenChange?: (open: boolean) => void;
}
/**
* Provides shared sidebar state, keyboard shortcuts, and responsive behavior.
*
* @remarks
* - Renders a `
` element
* - Built on shared React context and tooltip primitives
* - Persists desktop collapse state to a cookie for cross-page continuity
*
* @example
* ```tsx
*
*
*
* ```
*
* @see {@link https://react.dev/reference/react/useContext | React Context Docs}
*/
declare const SidebarProvider: React.ForwardRefExoticComponent
& React.RefAttributes>;
/**
* Props for the root sidebar panel.
*/
type SidebarProps = React.ComponentProps<"div"> & {
/**
* Edge of the screen where the sidebar is rendered.
* @default "left"
*/
side?: "left" | "right";
/**
* Visual presentation style used for desktop rendering.
* @default "sidebar"
*/
variant?: "sidebar" | "floating" | "inset";
/**
* Desktop collapse behavior for the sidebar.
* @default "offcanvas"
*/
collapsible?: "offcanvas" | "icon" | "none";
};
/**
* Renders the responsive sidebar panel for desktop and mobile layouts.
*
* @remarks
* - Renders a `` element on desktop and a dialog portal on mobile
* - Built on the shared sidebar context
*
* @example
* ```tsx
*
*
*
* ```
*
* @see {@link https://developer.mozilla.org/docs/Web/Accessibility/ARIA/Roles/dialog_role | ARIA Dialog Role}
*/
declare const Sidebar: React.ForwardRefExoticComponent
& React.RefAttributes>;
/**
* Renders the primary button used to toggle the sidebar.
*
* @remarks
* - Renders the shared `Button` component
* - Built on the shared sidebar context
*
* @example
* ```tsx
*
* ```
*
* @see {@link https://developer.mozilla.org/docs/Web/HTML/Element/button | HTML button element}
*/
declare const SidebarTrigger: React.ForwardRefExoticComponent & React.RefAttributes, "ref"> & React.RefAttributes>;
/**
* Renders a slim rail button used to toggle the sidebar collapsed state.
*
* @remarks
* - Renders a `