{"version":3,"file":"drawer-root.cjs","sources":["../../../components/drawer/drawer-root.tsx"],"sourcesContent":["'use client';\n\nimport { Drawer as DrawerPrimitive } from '@base-ui/react/drawer';\n\ntype Side = 'top' | 'right' | 'bottom' | 'left';\n\nconst sideToSwipeDirection: Record<\n  Side,\n  DrawerPrimitive.Root.Props['swipeDirection']\n> = {\n  top: 'up',\n  right: 'right',\n  bottom: 'down',\n  left: 'left'\n};\n\nexport interface DrawerRootProps extends DrawerPrimitive.Root.Props {\n  /** The direction from which the drawer appears and can be swiped to dismiss. */\n  side?: Side;\n}\n\nexport function DrawerRoot({\n  side = 'right',\n  swipeDirection,\n  ...props\n}: DrawerRootProps) {\n  return (\n    <DrawerPrimitive.Root\n      swipeDirection={swipeDirection ?? sideToSwipeDirection[side]}\n      {...props}\n    />\n  );\n}\nDrawerRoot.displayName = 'Drawer';\n"],"names":[],"mappings":";;;;;;AAMA;AAIE;AACA;AACA;AACA;;AAQc;AAKd;AAMF;AACA;;"}