import { type AriaAttributes, type HTMLAttributes } from 'react'; import type { ControlledPagePanelProps, PagePanelSizes, UncontrolledPagePanelProps } from './page-types.js'; import type { PanelSize } from './panel-types.js'; import type { DataTestId } from '../../core/types/data-props.js'; import type { StylingProps } from '../../core/types/styling-props.js'; import type { WithChildren } from '../../core/types/with-children.js'; /** @public */ export interface SidebarOwnProps extends WithChildren, Omit, 'onResize' | keyof StylingProps>, StylingProps, DataTestId { /** * The desired width of the sidebar. * Depending on the available screen width and other panel configurations, * the size of the panel might not match the `preferredWidth` exactly. * @defaultValue 15% */ preferredWidth?: PanelSize; /** * The minimum width of the sidebar in pixels. * @defaultValue 200 */ minWidth?: number; /** * Screen size below which the overlay Drawer will be shown. * @defaultValue 640 */ breakpoint?: number; /** * If the sidebar's width can be resized (by drag and drop) * @defaultValue true */ resizable?: boolean; /** * Defines if the Sidebar content will be kept in the DOM, even if the content * is not shown to the user. * @defaultValue false */ keepMounted?: boolean; /** * Notifies the user if an action happened that should change the dismissed state * like clicking on the backdrop on mobile. * The returned state is only a recommendation and might differ from what the actual * state of the panel should be. */ onDismissChange?: (state: boolean, reason: string) => void; /** * Opt-in to the new panel controls. * @defaultValue false **/ integratedControls?: boolean; /** * Callback triggered after resizing is finished with the new panel sizes of * all existing panels and the newly applied panel width (in px). */ onResize?: (sizes: PagePanelSizes, width: number) => void; } /** @public */ export interface ControlledSidebarProps extends SidebarOwnProps, ControlledPagePanelProps { } /** @public */ export interface UncontrolledSidebarProps extends SidebarOwnProps, UncontrolledPagePanelProps { } /** @public */ export type SidebarProps = ControlledSidebarProps | UncontrolledSidebarProps; /** * The `Sidebar` component is used inside the `Page` component for displaying content in the corresponding panel. * @public */ export declare const Sidebar: (props: SidebarProps & import("react").RefAttributes) => import("react").ReactElement | null; /** @internal */ export interface IntegratedControlsProps extends AriaAttributes { dismissed: boolean; onClick: ({ value, reason }: { value: boolean; reason: string; }) => void; panelId: string; label: string; } /** @internal */ export declare const IntegratedControls: ({ dismissed, onClick, panelId, label, }: IntegratedControlsProps) => import("react/jsx-runtime").JSX.Element;