@toteat-eng/ds-react 2026.7.9 → 2026.7.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,11 +4,24 @@ import { type ReactNode } from "react";
4
4
  * `aria-controls` so assistive tech associates the hamburger with the drawer.
5
5
  */
6
6
  export declare const SIDEBAR_DRAWER_ID = "ds-sidebar-drawer";
7
+ export type SidebarMode = "overlay" | "push";
7
8
  export interface SidebarProps {
8
9
  isOpen: boolean;
9
10
  onClose: () => void;
11
+ /**
12
+ * "overlay" (default, mobile): fixed drawer over content, dimming scrim, modal
13
+ * focus-trap + Escape + focus-return. "push" (desktop): in-flow drawer that
14
+ * pushes content, no scrim, non-modal (no focus-trap / Escape).
15
+ */
16
+ mode?: SidebarMode;
10
17
  isPinLocked?: boolean;
11
18
  isModal?: boolean;
19
+ /**
20
+ * In overlay (modal) mode, provide at least one focusable child. If none
21
+ * are focusable (e.g. a loading state or icon-only content), focus rests
22
+ * on the drawer container itself and Tab/Shift+Tab stay trapped there —
23
+ * the modal focus-trap never leaks into the background content.
24
+ */
12
25
  children: ReactNode;
13
26
  }
14
- export declare function Sidebar({ isOpen, onClose, isPinLocked, isModal, children, }: SidebarProps): import("react/jsx-runtime").JSX.Element | null;
27
+ export declare function Sidebar({ isOpen, onClose, mode, isPinLocked, isModal, children, }: SidebarProps): import("react/jsx-runtime").JSX.Element | null;
@@ -7,3 +7,4 @@ export declare const Open: Story;
7
7
  export declare const Closed: Story;
8
8
  export declare const PinLocked: Story;
9
9
  export declare const Modal: Story;
10
+ export declare const Push: Story;