@toteat-eng/ds-react 2026.6.19 → 2026.7.10-1
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/NavBar/NavBar.d.ts +3 -1
- package/dist/components/Sidebar/Sidebar.d.ts +20 -2
- package/dist/components/Sidebar/__stories__/Sidebar.stories.d.ts +1 -0
- package/dist/components/Sidebar/index.d.ts +1 -1
- package/dist/index.es.js +757 -711
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +5 -5
- package/dist/index.umd.js.map +1 -1
- package/dist/layouts/AppShell/AppShell.d.ts +11 -1
- package/dist/layouts/AppShell/__stories__/AppShell.stories.d.ts +1 -0
- package/dist/style.css +2 -1
- package/package.json +1 -1
|
@@ -4,9 +4,11 @@ export interface NavBarProps {
|
|
|
4
4
|
onMenuToggle: () => void;
|
|
5
5
|
onLogoClick: () => void;
|
|
6
6
|
onRightToggle: () => void;
|
|
7
|
+
/** Reflects the sidebar's open state so the toggle exposes aria-expanded + the right label. */
|
|
8
|
+
isMenuOpen?: boolean;
|
|
7
9
|
isLoading?: boolean;
|
|
8
10
|
isPinLocked?: boolean;
|
|
9
11
|
rightSlot?: ReactNode;
|
|
10
12
|
"data-testid"?: string;
|
|
11
13
|
}
|
|
12
|
-
export declare function NavBar({ restaurantName, onMenuToggle, onLogoClick, onRightToggle, isLoading, isPinLocked, rightSlot, "data-testid": testId, }: NavBarProps): import("react/jsx-runtime").JSX.Element | null;
|
|
14
|
+
export declare function NavBar({ restaurantName, onMenuToggle, onLogoClick, onRightToggle, isMenuOpen, isLoading, isPinLocked, rightSlot, "data-testid": testId, }: NavBarProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,9 +1,27 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Stable id for the sidebar drawer `<nav>`. The NavBar toggle references it via
|
|
4
|
+
* `aria-controls` so assistive tech associates the hamburger with the drawer.
|
|
5
|
+
*/
|
|
6
|
+
export declare const SIDEBAR_DRAWER_ID = "ds-sidebar-drawer";
|
|
7
|
+
export type SidebarMode = "overlay" | "push";
|
|
2
8
|
export interface SidebarProps {
|
|
3
9
|
isOpen: boolean;
|
|
4
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;
|
|
5
17
|
isPinLocked?: boolean;
|
|
6
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
|
+
*/
|
|
7
25
|
children: ReactNode;
|
|
8
26
|
}
|
|
9
|
-
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;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export type { SidebarProps } from "./Sidebar";
|
|
2
|
-
export { Sidebar } from "./Sidebar";
|
|
2
|
+
export { SIDEBAR_DRAWER_ID, Sidebar } from "./Sidebar";
|