{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "sheet",
  "registryDependencies": [
    "@fulldev/button",
    "@fulldev/dialog",
    "@fulldev/icon"
  ],
  "files": [
    {
      "path": "src/components/ui/sheet/sheet.astro",
      "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n  defaultOpen?: boolean\n  closeOnClickOutside?: boolean\n  closeOnEscape?: boolean\n  lockScroll?: boolean\n}\n\nconst {\n  class: className,\n  defaultOpen,\n  closeOnClickOutside,\n  closeOnEscape,\n  lockScroll,\n  ...props\n} = Astro.props\n\nconst manageScrollLock = lockScroll !== false\n---\n\n<div\n  data-slot=\"dialog\"\n  data-sheet-lock-scroll={manageScrollLock ? \"\" : undefined}\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=\"false\"\n  {...props}\n>\n  <slot />\n</div>\n\n<script>\n  import { create } from \"@data-slot/dialog\"\n\n  create()\n\n  declare global {\n    interface Window {\n      __fulldevSheetScrollLock?: {\n        roots: Set<HTMLElement>\n        savedHtmlOverflow: string\n        savedHtmlScrollbarGutter: string\n        savedBodyPaddingRight: string\n      }\n      __fulldevSheetScrollLockBound?: boolean\n    }\n  }\n\n  const state =\n    window.__fulldevSheetScrollLock ??\n    (window.__fulldevSheetScrollLock = {\n      roots: new Set<HTMLElement>(),\n      savedHtmlOverflow: \"\",\n      savedHtmlScrollbarGutter: \"\",\n      savedBodyPaddingRight: \"\",\n    })\n\n  const applyScrollLock = () => {\n    const html = document.documentElement\n    const body = document.body\n\n    if (state.roots.size === 0) {\n      html.style.overflow = state.savedHtmlOverflow\n      html.style.scrollbarGutter = state.savedHtmlScrollbarGutter\n      body.style.paddingRight = state.savedBodyPaddingRight\n      return\n    }\n\n    if (state.roots.size === 1) {\n      state.savedHtmlOverflow = html.style.overflow\n      state.savedHtmlScrollbarGutter = html.style.scrollbarGutter\n      state.savedBodyPaddingRight = body.style.paddingRight\n    }\n\n    const scrollbarWidth = window.innerWidth - html.clientWidth\n    const bodyPaddingRight = Number.parseFloat(\n      window.getComputedStyle(body).paddingRight || \"0\"\n    )\n\n    html.style.overflow = \"hidden\"\n    html.style.scrollbarGutter = \"auto\"\n    body.style.paddingRight = `${bodyPaddingRight + Math.max(scrollbarWidth, 0)}px`\n  }\n\n  const syncRoot = (root: HTMLElement, open: boolean) => {\n    const hasRoot = state.roots.has(root)\n    if (open === hasRoot) return\n\n    if (open) state.roots.add(root)\n    else state.roots.delete(root)\n\n    applyScrollLock()\n  }\n\n  if (!window.__fulldevSheetScrollLockBound) {\n    window.__fulldevSheetScrollLockBound = true\n\n    document.addEventListener(\"dialog:change\", (event) => {\n      const target = event.target\n\n      if (\n        !(target instanceof HTMLElement) ||\n        target.dataset.slot !== \"dialog\" ||\n        target.dataset.sheetLockScroll === undefined\n      ) {\n        return\n      }\n\n      const detail = (event as CustomEvent<{ open?: boolean }>).detail\n      syncRoot(target, Boolean(detail?.open))\n    })\n  }\n\n  document\n    .querySelectorAll<HTMLElement>(\n      '[data-slot=\"dialog\"][data-sheet-lock-scroll]'\n    )\n    .forEach((root) => {\n      syncRoot(root, root.hasAttribute(\"data-open\"))\n    })\n</script>\n",
      "type": "registry:ui"
    },
    {
      "path": "src/components/ui/sheet/sheet-close.astro",
      "content": "---\nimport type { ComponentProps } from \"astro/types\"\n\nimport { Button } from \"@/components/ui/button\"\n\ntype Props = ComponentProps<typeof Button>\n\nconst { ...props } = Astro.props\n---\n\n<Button data-slot=\"dialog-close\" {...props}>\n  <slot />\n</Button>\n",
      "type": "registry:ui"
    },
    {
      "path": "src/components/ui/sheet/sheet-content.astro",
      "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/ui/button\"\nimport DialogPortal from \"@/components/ui/dialog/dialog-portal.astro\"\nimport { Icon } from \"@/components/ui/icon\"\n\ntype Props = HTMLAttributes<\"div\"> & {\n  side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n  showCloseButton?: boolean\n}\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    hidden\n    class=\"fixed inset-0 z-50 bg-black/10 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs\"\n    style=\"z-index: calc(var(--dialog-overlay-stack-index, 0) + 100);\"\n  >\n  </div>\n  <div\n    data-slot=\"dialog-content\"\n    data-side={side}\n    hidden\n    class={cn(\n      \"bg-popover text-popover-foreground fixed z-50 flex flex-col gap-4 bg-clip-padding text-sm shadow-lg 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\",\n      \"bg-popover text-popover-foreground fixed z-50 flex flex-col gap-4 bg-clip-padding text-sm shadow-lg 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\",\n      className\n    )}\n    style={`z-index: calc(var(--dialog-content-stack-index, 0) + 101);${style ? ` ${style}` : \"\"}`}\n    {...props}\n  >\n    <slot />\n    {\n      showCloseButton && (\n        <Button\n          type=\"button\"\n          data-slot=\"dialog-close\"\n          variant=\"ghost\"\n          size=\"icon-sm\"\n          class=\"absolute top-3 right-3\"\n        >\n          <Icon name=\"x\" class=\"size-4\" />\n          <span class=\"sr-only\">Close</span>\n        </Button>\n      )\n    }\n  </div>\n</DialogPortal>\n",
      "type": "registry:ui"
    },
    {
      "path": "src/components/ui/sheet/sheet-description.astro",
      "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"p\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<p\n  data-slot=\"dialog-description\"\n  class={cn(\"text-muted-foreground text-sm\", className)}\n  {...props}\n>\n  <slot />\n</p>\n",
      "type": "registry:ui"
    },
    {
      "path": "src/components/ui/sheet/sheet-footer.astro",
      "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\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:ui"
    },
    {
      "path": "src/components/ui/sheet/sheet-header.astro",
      "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\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:ui"
    },
    {
      "path": "src/components/ui/sheet/sheet-title.astro",
      "content": "---\nimport type { HTMLAttributes } from \"astro/types\"\n\nimport { cn } from \"@/lib/utils\"\n\ntype Props = HTMLAttributes<\"h2\">\n\nconst { class: className, ...props } = Astro.props\n---\n\n<h2\n  data-slot=\"dialog-title\"\n  class={cn(\"text-foreground font-medium\", className)}\n  {...props}\n>\n  <slot />\n</h2>\n",
      "type": "registry:ui"
    },
    {
      "path": "src/components/ui/sheet/sheet-trigger.astro",
      "content": "---\nimport type { ComponentProps } from \"astro/types\"\n\nimport { Button } from \"@/components/ui/button\"\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:ui"
    },
    {
      "path": "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\"\n",
      "type": "registry:ui"
    }
  ],
  "type": "registry:ui"
}