import SgdsElement from "../../base/sgds-element"; import SgdsIconButton from "../IconButton/sgds-icon-button"; /** * @summary Sidebar is a collapsible navigation component that displays menu items and groups. * Users can expand and collapse the sidebar to save screen space while navigating through organized menu items. * The sidebar coordinates selection and navigation across nested items using context providers and custom events. * * Features: * - Collapsible state for space-saving layouts with icon-only mode * - Multi-level nesting (up to 3 levels) with drawer overlay for root-level groups * - Keyboard navigation with full ARIA support for accessibility * - Programmatic link navigation support with anchor elements * - Active item tracking and synchronized state management * * Keyboard Navigation: * - Arrow Up/Down: Navigate between sidebar items and groups * - Arrow Left/Right: Collapse/expand groups or navigate drawer overlays * - Enter/Space: Activate focused item or toggle group * - Tab: Standard focus management to interactive elements * * @slot default - Insert sgds-sidebar-item, sgds-sidebar-group, and sgds-sidebar-section elements * @slot upper - Insert brand/logo content in sidebar header * @slot lower - Insert content in sidebar footer * * @fires sgds-select - Emitted when a sidebar item or group is selected. * Event detail: { activeItem: string } - name of the selected item * */ type SidebarVariant = "persistent" | "overlay" | "collapsible"; export declare class SgdsSidebar extends SgdsElement { static styles: import("lit").CSSResult[]; static dependencies: { "sgds-icon-button": typeof SgdsIconButton; }; /** * Controls whether the sidebar is collapsed or expanded to save screen space. * When true, sidebar displays icon-only mode for root items. When false, full labels and content are shown. * On mobile devices (width <= 576px), this is automatically toggled based on screen size. * Collapsing propagates to child items, affecting label visibility and spacing. * @attribute collapsed * @type {boolean} * @default false */ collapsed: boolean; /** * The name of the currently active sidebar item or group for programmatic control. * Setting this property programmatically selects the item with the matching `name` attribute. * Automatically expands parent groups to reveal nested items and syncs the active state throughout the hierarchy. * Clearing this property (setting to empty string) deselects all items. * @attribute active * @type {string} * @default "" */ active: string; /** * Shows a scrim/overlay background behind the drawer or sidebar in overlay mode. * When true, displays a semi-transparent dark overlay behind the drawer to focus user attention. * Only visible when drawer is open or in overlay mode with sidebar not collapsed. * @attribute scrim * @type {boolean} * @default false */ scrim: boolean; /** * Controls the sidebar's collapse behaviour. * - `"collapsible"` (default): shows a toggle button that collapses/expands the sidebar. * - `"persistent"`: sidebar is always visible and cannot be collapsed. * - `"overlay"`: sidebar slides over the content as a drawer on smaller viewports. * @attribute variant * @type {"collapsible" | "persistent" | "overlay"} * @default "collapsible" */ variant: SidebarVariant; /** * Accessible label for the sidebar navigation landmark. * Passed to the `