@loke/design-system
Version:
A design system with individually importable components
3 lines (2 loc) • 1.88 kB
JavaScript
"use client";
import{cn}from"@loke/design-system/cn";import*as PopoverPrimitive from"@loke/ui/popover";import{jsx}from"react/jsx-runtime";function Popover({...props}){return jsx(PopoverPrimitive.Root,{"data-slot":"popover",...props})}function PopoverTrigger({...props}){return jsx(PopoverPrimitive.Trigger,{"data-slot":"popover-trigger",...props})}function PopoverContent({className,align="center",sideOffset=4,matchTriggerWidth=!1,...props}){return jsx(PopoverPrimitive.Portal,{children:jsx(PopoverPrimitive.Content,{align,className:cn("data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 flex w-72 origin-(--loke-popover-content-transform-origin) flex-col gap-2.5 rounded-lg bg-popover p-2.5 text-popover-foreground text-sm shadow-md outline-hidden ring-1 ring-foreground/10 duration-100 data-closed:animate-out data-open:animate-in",{"max-h-(--loke-popover-content-available-height) w-(--loke-popover-trigger-width)":matchTriggerWidth},className),"data-slot":"popover-content",sideOffset,...props})})}function PopoverAnchor({...props}){return jsx(PopoverPrimitive.Anchor,{"data-slot":"popover-anchor",...props})}function PopoverHeader({className,...props}){return jsx("div",{className:cn("flex flex-col gap-0.5 text-sm",className),"data-slot":"popover-header",...props})}function PopoverTitle({className,...props}){return jsx("div",{className:cn("font-medium",className),"data-slot":"popover-title",...props})}function PopoverDescription({className,...props}){return jsx("p",{className:cn("text-muted-foreground",className),"data-slot":"popover-description",...props})}export{PopoverTrigger,PopoverTitle,PopoverHeader,PopoverDescription,PopoverContent,PopoverAnchor,Popover};