"use client" /** * FloatingSheetPanel — base shell for hub-adjacent product drawers. * * Composes `Sheet` with the floating inset pattern (`showOverlay={false}`, * rounded rail beside the hub). Feature drawers (Export, Properties, invite, * folder create) supply body + footer content; this module owns chrome only. * * Reference consumer: `components/ui/export-drawer.tsx`. * * Layout contract (scroll body + pinned footer): * ``` * FloatingSheetPanelContent // flex column, overflow-hidden, fixed height * FloatingSheetPanelHeader // shrink-0 *
* ``` * Header and footer MUST NOT live inside `FloatingSheetPanelBody`. */ import * as React from "react" import { FLOATING_SHEET_SIZE_LABEL, FLOATING_SHEET_SIZES, floatingSheetSizeStorageKey, floatingSheetWidthStorageKey, getFloatingSheetInsetProps, useCompactFloatingSheet, type FloatingSheetSide, type FloatingSheetSize, } from "../../lib/floating-sheet-panel" import { OverlayElevationProvider, SHEET_TOOLTIP_Z_INDEX, } from "../../lib/overlay-elevation" import { getStorageItem, scheduleStorageWrite } from "../../lib/persisted-state" import { useSheetRail } from "../../lib/sheet-rail" import { cn } from "../../lib/utils" import { Button } from "./button" import { Kbd, KbdGroup } from "./kbd" import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, Shortcut, } from "./dropdown-menu" import { Separator } from "./separator" import { Sheet, SheetClose, SheetContent, SheetDescription, SheetTitle, } from "./sheet" import { Tip } from "./tip" /** * Controlled floating sheet root — alias of `Sheet` with the rail behaviour: * * - **Non-modal.** No focus trap, no scroll lock, no `pointer-events: none` on * the body, so the hub behind stays clickable while the rail is open. This is * an inspector beside the work, not a door in front of it. * - **Single rail.** Opening this panel closes whichever rail was already open. * - **Dismissed by the page, except by its own triggers.** A click on the hub * closes the rail. A click on a control that *feeds* the rail — the * Properties button, a column menu that deep-links into it, the row that * swaps which record it is showing — keeps it open and changes its content * instead. Mark those with {@link railTriggerProps}. */ function FloatingSheetPanel({ exclusive = true, modal = false, ...props }: React.ComponentProps{subtitle}
) : null}