import * as React from "react" import { cva, type VariantProps } from "class-variance-authority" import { cn } from "cn" function BubbleGroup({ className, ...props }: React.ComponentProps<"div">) { return (
) } const bubbleVariants = cva( "cn-bubble group/bubble relative flex w-fit min-w-0 flex-col", { variants: { variant: { default: "cn-bubble-variant-default", secondary: "cn-bubble-variant-secondary", muted: "cn-bubble-variant-muted", tinted: "cn-bubble-variant-tinted", outline: "cn-bubble-variant-outline", ghost: "cn-bubble-variant-ghost", destructive: "cn-bubble-variant-destructive", }, }, defaultVariants: { variant: "default", }, } ) function Bubble({ variant = "default", align = "start", className, ...props }: React.ComponentProps<"div"> & VariantProps & { align?: "start" | "end" }) { return (
) } function BubbleContent({ className, render, children, ...props }: React.ComponentProps<"div"> & { render?: (props: React.HTMLAttributes) => React.ReactNode }) { if (render) { const renderProps = { ...props, "data-slot": "bubble-content", className: cn( "cn-bubble-content w-fit max-w-full min-w-0 overflow-hidden wrap-break-word [button]:text-left [button,a]:transition-colors", className ), children, } return render(renderProps) } return (
{children}
) } const bubbleReactionsVariants = cva( "cn-bubble-reactions absolute z-10 flex w-fit items-center justify-center", { variants: { side: { top: "cn-bubble-reactions-side-top", bottom: "cn-bubble-reactions-side-bottom", }, align: { start: "cn-bubble-reactions-align-start", end: "cn-bubble-reactions-align-end", }, }, defaultVariants: { side: "bottom", align: "end", }, } ) function BubbleReactions({ side = "bottom", align = "end", className, ...props }: React.ComponentProps<"div"> & { align?: "start" | "end" side?: "top" | "bottom" }) { return (
) } export { BubbleGroup, Bubble, BubbleContent, BubbleReactions }