{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "sheet",
  "title": "Sheet",
  "description": "Astro side panels for secondary tasks and compact navigation.",
  "dependencies": [
    "@data-slot/dialog",
    "@lucide/astro",
    "cn"
  ],
  "registryDependencies": [
    "@gnostic/button",
    "@gnostic/dialog"
  ],
  "files": [
    {
      "path": "packages/ui/src/components/ui/sheet/index.ts",
      "content": "export { default as Sheet } from './sheet.astro'\nexport { default as SheetContent } from './sheet-content.astro'\nexport { default as SheetTrigger } from './sheet-trigger.astro'\nexport { default as SheetHeader } from './sheet-header.astro'\nexport { default as SheetTitle } from './sheet-title.astro'\nexport { default as SheetDescription } from './sheet-description.astro'\nexport { default as SheetFooter } from './sheet-footer.astro'\nexport { default as SheetClose } from './sheet-close.astro'\nexport type { SheetProps, SheetContentProps } from './types.ts'\n",
      "type": "registry:file",
      "target": "~/src/components/ui/sheet/index.ts"
    },
    {
      "path": "packages/ui/src/components/ui/sheet/sheet-close.astro",
      "content": "---\nimport type { HTMLTag, Polymorphic } from \"astro/types\"\n\nimport { Button } from \"../button/index.ts\"\nimport type { ButtonVariantProps } from \"../button/button-variants.ts\"\n\ntype Props<Tag extends HTMLTag = \"button\"> = Polymorphic<{ as: Tag }> & ButtonVariantProps\n\nconst { ...props } = Astro.props\n---\n\n<Button data-slot=\"dialog-close\" {...props}>\n  <slot />\n</Button>\n",
      "type": "registry:file",
      "target": "~/src/components/ui/sheet/sheet-close.astro"
    },
    {
      "path": "packages/ui/src/components/ui/sheet/sheet-content.astro",
      "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport XIcon from \"@lucide/astro/icons/x\"\n\nimport { cn } from \"cn\"\nimport { Button } from \"../button/index.ts\"\nimport DialogPortal from \"../dialog/dialog-portal.astro\"\nimport type { SheetContentProps } from \"./types.ts\"\n\ntype Props = HTMLAttributes<\"div\"> & SheetContentProps\n\nconst {\n  class: className,\n  side = \"right\",\n  showCloseButton = true,\n  style,\n  ...props\n} = Astro.props\n---\n\n<DialogPortal>\n  <div\n    data-slot=\"dialog-overlay\"\n    data-sheet\n    hidden\n    class=\"fixed inset-0 z-50 bg-black/32 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 backdrop-blur-sm\"\n    style=\"z-index: calc(var(--dialog-overlay-stack-index, 0) * 2 + 100);\"\n  ></div>\n  <div\n    data-slot=\"dialog-content\"\n    data-sheet\n    data-side={side}\n    hidden\n    class={cn(\"bg-popover text-popover-foreground fixed z-50 flex flex-col gap-4 not-dark:bg-clip-padding text-sm shadow-lg/5 before:pointer-events-none before:absolute before:inset-0 before:shadow-[0_1px_--theme(--color-black/4%)] dark:before:shadow-[0_-1px_--theme(--color-white/6%)] transition duration-200 ease-in-out outline-none data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-10 data-[side=bottom]:data-starting-style:translate-y-10 data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=left]:data-ending-style:-translate-x-10 data-[side=left]:data-starting-style:-translate-x-10 data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:data-ending-style:translate-x-10 data-[side=right]:data-starting-style:translate-x-10 data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:-translate-y-10 data-[side=top]:data-starting-style:-translate-y-10 data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm\", className)}\n    style={`z-index: calc(var(--dialog-content-stack-index, 0) * 2 + 101);${style ? ` ${style}` : \"\"}`}\n    {...props}\n  >\n    <slot />\n    {showCloseButton && (\n      <Button\n        type=\"button\"\n        data-slot=\"dialog-close\"\n        data-sheet\n        variant=\"ghost\"\n        size=\"icon-sm\"\n        class=\"absolute top-4 right-4\"\n      >\n        <XIcon />\n        <span class=\"sr-only\">Close</span>\n      </Button>\n    )}\n  </div>\n</DialogPortal>\n",
      "type": "registry:file",
      "target": "~/src/components/ui/sheet/sheet-content.astro"
    },
    {
      "path": "packages/ui/src/components/ui/sheet/sheet-description.astro",
      "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"cn\"\n\ntype Props = HTMLAttributes<\"p\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<p\n  data-slot=\"dialog-description\"\n  data-sheet\n  class={cn(\"text-muted-foreground text-sm\", className)}\n  {...props}\n>\n  <slot />\n</p>\n",
      "type": "registry:file",
      "target": "~/src/components/ui/sheet/sheet-description.astro"
    },
    {
      "path": "packages/ui/src/components/ui/sheet/sheet-footer.astro",
      "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"cn\"\n\ntype Props = HTMLAttributes<\"div\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<div\n  data-slot=\"sheet-footer\"\n  class={cn(\"mt-auto flex flex-col gap-2 p-4\", className)}\n  {...props}\n>\n  <slot />\n</div>\n",
      "type": "registry:file",
      "target": "~/src/components/ui/sheet/sheet-footer.astro"
    },
    {
      "path": "packages/ui/src/components/ui/sheet/sheet-header.astro",
      "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"cn\"\n\ntype Props = HTMLAttributes<\"div\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<div\n  data-slot=\"sheet-header\"\n  class={cn(\"flex flex-col gap-1.5 p-4\", className)}\n  {...props}\n>\n  <slot />\n</div>\n",
      "type": "registry:file",
      "target": "~/src/components/ui/sheet/sheet-header.astro"
    },
    {
      "path": "packages/ui/src/components/ui/sheet/sheet-title.astro",
      "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"cn\"\n\ntype Props = HTMLAttributes<\"h2\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<h2\n  data-slot=\"dialog-title\"\n  data-sheet\n  class={cn(\"font-heading font-semibold text-xl leading-none\", className)}\n  {...props}\n>\n  <slot />\n</h2>\n",
      "type": "registry:file",
      "target": "~/src/components/ui/sheet/sheet-title.astro"
    },
    {
      "path": "packages/ui/src/components/ui/sheet/sheet-trigger.astro",
      "content": "---\nimport type { ComponentProps } from \"astro/types\"\n\nimport { Button } from \"../button/index.ts\"\n\ntype Props = ComponentProps<typeof Button>\n\nconst { ...props } = Astro.props\n---\n\n<Button data-slot=\"dialog-trigger\" {...props}>\n  <slot />\n</Button>\n",
      "type": "registry:file",
      "target": "~/src/components/ui/sheet/sheet-trigger.astro"
    },
    {
      "path": "packages/ui/src/components/ui/sheet/sheet.astro",
      "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\nimport type { SheetProps } from \"./types.ts\"\n\ntype Props = HTMLAttributes<\"div\"> & SheetProps\n\nconst {\n  class: className,\n  defaultOpen,\n  closeOnClickOutside,\n  closeOnEscape,\n  lockScroll,\n  ...props\n} = Astro.props\n---\n\n<div\n  data-slot=\"dialog\"\n  class={className}\n  data-default-open={defaultOpen}\n  data-close-on-click-outside={closeOnClickOutside}\n  data-close-on-escape={closeOnEscape}\n  data-lock-scroll={lockScroll}\n  {...props}\n>\n  <slot />\n</div>\n\n<script>\n  import { create } from \"@data-slot/dialog\"\n  import type { DialogController as SheetController } from \"@data-slot/dialog\"\n  // Destroy bindings before a view transition so the next page-load binds once.\n  const controllers: SheetController[] = []\n  const initialize = () => controllers.push(...create())\n  initialize()\n  document.addEventListener(\"astro:page-load\", initialize)\n  document.addEventListener(\"astro:before-swap\", () => {\n    for (const controller of controllers) controller.destroy()\n    controllers.length = 0\n  })\n</script>\n",
      "type": "registry:file",
      "target": "~/src/components/ui/sheet/sheet.astro"
    },
    {
      "path": "packages/ui/src/components/ui/sheet/types.ts",
      "content": "import type { DialogOptions } from '@data-slot/dialog'\n\n/**\n * Sheet configuration rendered as data attributes.\n * A sheet uses the dialog controller. `alertDialog` stays on Alert Dialog.\n */\nexport type SheetProps = Pick<\n    DialogOptions,\n    'defaultOpen' | 'closeOnClickOutside' | 'closeOnEscape' | 'lockScroll'\n>\n\n/** Edge and close control for the sheet panel. */\nexport type SheetContentProps = {\n    /**\n     * Screen edge the sheet slides in from.\n     *\n     * @default \"right\"\n     */\n    side?: 'top' | 'right' | 'bottom' | 'left'\n    /**\n     * Show the close button.\n     *\n     * @default true\n     */\n    showCloseButton?: boolean\n}\n",
      "type": "registry:file",
      "target": "~/src/components/ui/sheet/types.ts"
    }
  ],
  "meta": {
    "framework": "astro",
    "source": "@gnostic/ui",
    "testedDependencies": {
      "@data-slot/dialog": "^1.1.2",
      "@lucide/astro": "^1.68.0",
      "cn": "0.5.2"
    }
  },
  "docs": "https://ui.gnosticai.com/components/sheet",
  "categories": [
    "ui"
  ],
  "type": "registry:ui"
}
