From 94506aa3496f3f04d79311bd528579f13a14a094 Mon Sep 17 00:00:00 2001 From: Maofeng Date: Fri, 31 Jul 2026 16:06:44 +0800 Subject: [PATCH] feat(ui): expose advanced popover positioning Forward explicit anchors and position-method selection through PopoverContent so consumers can position popovers against virtual or custom anchors without bypassing the shared primitive. --- packages/ui/src/components/popover.tsx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/packages/ui/src/components/popover.tsx b/packages/ui/src/components/popover.tsx index 47e49c7..4498419 100644 --- a/packages/ui/src/components/popover.tsx +++ b/packages/ui/src/components/popover.tsx @@ -27,7 +27,13 @@ function PopoverTrigger({ ...props }: PopoverPrimitive.Trigger.Props) { type PopoverContentProps = PopoverPrimitive.Popup.Props & Pick< PopoverPrimitive.Positioner.Props, - "align" | "alignOffset" | "arrowPadding" | "side" | "sideOffset" + | "align" + | "alignOffset" + | "anchor" + | "arrowPadding" + | "positionMethod" + | "side" + | "sideOffset" > & { /** * Renders the popup with an AnchoredSurface and connects its tail to the @@ -42,7 +48,9 @@ function PopoverContent({ className, align = "center", alignOffset = 0, + anchor, arrowPadding, + positionMethod, render, showArrow = false, side = "bottom", @@ -75,7 +83,9 @@ function PopoverContent({