@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.
- package/dist/components/Sidebar/Sidebar.d.ts +14 -1
- package/dist/components/Sidebar/__stories__/Sidebar.stories.d.ts +1 -0
- package/dist/index.es.js +369 -356
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +4 -4
- package/dist/index.umd.js.map +1 -1
- package/dist/layouts/AppShell/AppShell.d.ts +3 -1
- package/dist/layouts/AppShell/__stories__/AppShell.stories.d.ts +1 -0
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -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;
|