{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "sheet", "type": "registry:ui", "title": "Sheet", "files": [ { "path": "ui/sheet.tsrx", "type": "registry:ui", "target": "components/ui/sheet.tsrx", "content": "// Base UI base sheet — TRANSCRIBED from upstream's `bases/base-ui/ui/sheet.tsx`\n// (maintainer-supplied), class strings verbatim. Runs on @octanejs/base-ui's Dialog:\n// Overlay -> Backdrop, Content -> Popup.\n//\n// UPSTREAM ANIMATES THIS WITH CSS TRANSITIONS, NOT KEYFRAMES, which is why the file is transcribed\n// rather than derived. Base UI publishes `data-starting-style` and `data-ending-style` (see\n// utils/popupStateMapping.ts) and this source drives motion off them with a plain `transition`,\n// where the radix base uses `animate-in` / `animate-out` keyframe utilities.\n//\n// A derived version of this file did jump visibly on close, which is what prompted the\n// transcription. Do NOT infer from that a general rule that keyframes cannot work on Base UI: the\n// same mapping also emits `data-open` and `data-closed`, so `data-closed:animate-out` does match,\n// and the precise cause of that jump was never isolated. What is established here is only what\n// upstream ships, which is this.\n//\n// So the motion here reads: `transition duration-200` plus per-side\n// `data-starting-style:translate-*` / `data-ending-style:translate-*` and an opacity pair —\n// the element sits offset-and-transparent before open and after close, and transitions to its\n// resting position in between.\n//\n// ONE DEPARTURE FROM THE SOURCE: upstream's title carries `cn-font-heading`, a semantic hook from\n// the pinned cn-* system. This package ships the utilities-inlined flavor, the react-aria base\n// drops the same class, and nothing defines it here (0 occurrences in the built CSS).\n//\n// Octane adaptations: no `\"use client\"`; refs are props.\nimport { type OctaneNode } from 'octane';\nimport { Dialog as SheetPrimitive } from '@octanejs/base-ui/dialog';\nimport { XIcon } from '@octanejs/lucide';\n\nimport { cn } from '@/lib/utils';\nimport { Button } from '@/components/ui/button';\n\ntype Props = { className?: string; children?: OctaneNode } & Record;\n\nexport function Sheet(props: Record) @{\n\t\n}\n\nexport function SheetTrigger(props: Record) @{\n\t\n}\n\nexport function SheetClose(props: Record) @{\n\t\n}\n\nexport function SheetPortal(props: Record) @{\n\t\n}\n\nexport function SheetOverlay({ className, ...props }: Props) @{\n\t\n}\n\nexport interface SheetContentProps extends Props {\n\tside?: 'top' | 'right' | 'bottom' | 'left';\n\tshowCloseButton?: boolean;\n}\n\nexport function SheetContent(props: SheetContentProps) @{\n\tconst { className, side = 'right', showCloseButton = true, children: _children, ...rest } = props;\n\n\t\n\t\t\n\t\t\n\t\t\t{props.children}\n\t\t\t@if (showCloseButton) {\n\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tClose\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t}\n\t\t\n\t\n}\n\nexport function SheetHeader({ className, ...props }: Props) @{\n\t
\n}\n\nexport function SheetFooter({ className, ...props }: Props) @{\n\t\n}\n\nexport function SheetTitle({ className, ...props }: Props) @{\n\t\n}\n\nexport function SheetDescription({ className, ...props }: Props) @{\n\t\n}\n" } ], "dependencies": [ "@octanejs/base-ui@0.1.33", "@octanejs/lucide@0.1.30" ], "registryDependencies": [ "@octane/button", "@octane/utils" ] }