@tamagui/popover 2.7.7 → 3.0.0-beta.643.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/dist/cjs/Popover.cjs +509 -664
  2. package/dist/cjs/Popover.native.cjs +603 -0
  3. package/dist/cjs/Popover.native.js +536 -691
  4. package/dist/cjs/Popover.native.js.map +1 -1
  5. package/dist/cjs/index.cjs +10 -11
  6. package/dist/cjs/index.native.cjs +22 -0
  7. package/dist/cjs/index.native.js +10 -10
  8. package/dist/cjs/index.native.js.map +1 -1
  9. package/dist/cjs/useFloatingContext.cjs +202 -234
  10. package/dist/cjs/useFloatingContext.native.cjs +36 -0
  11. package/dist/cjs/useFloatingContext.native.js +20 -27
  12. package/dist/cjs/useFloatingContext.native.js.map +1 -1
  13. package/dist/esm/Popover.mjs +473 -617
  14. package/dist/esm/Popover.mjs.map +1 -1
  15. package/dist/esm/Popover.native.js +499 -644
  16. package/dist/esm/Popover.native.js.map +1 -1
  17. package/dist/esm/index.js +3 -3
  18. package/dist/esm/index.mjs +3 -3
  19. package/dist/esm/index.native.js +3 -3
  20. package/dist/esm/useFloatingContext.mjs +186 -208
  21. package/dist/esm/useFloatingContext.mjs.map +1 -1
  22. package/dist/esm/useFloatingContext.native.js +4 -2
  23. package/dist/esm/useFloatingContext.native.js.map +1 -1
  24. package/dist/jsx/Popover.mjs +473 -617
  25. package/dist/jsx/Popover.mjs.map +1 -1
  26. package/dist/jsx/Popover.native.cjs +603 -0
  27. package/dist/jsx/Popover.native.js +536 -691
  28. package/dist/jsx/Popover.native.js.map +1 -1
  29. package/dist/jsx/index.js +3 -3
  30. package/dist/jsx/index.mjs +3 -3
  31. package/dist/jsx/index.native.cjs +22 -0
  32. package/dist/jsx/index.native.js +10 -10
  33. package/dist/jsx/index.native.js.map +1 -1
  34. package/dist/jsx/useFloatingContext.mjs +186 -208
  35. package/dist/jsx/useFloatingContext.mjs.map +1 -1
  36. package/dist/jsx/useFloatingContext.native.cjs +36 -0
  37. package/dist/jsx/useFloatingContext.native.js +20 -27
  38. package/dist/jsx/useFloatingContext.native.js.map +1 -1
  39. package/package.json +22 -22
  40. package/src/Popover.tsx +115 -147
  41. package/types/Popover.d.ts +33 -109
  42. package/types/Popover.d.ts.map +1 -1
  43. package/types/useFloatingContext.d.ts.map +1 -1
  44. package/dist/esm/index.js.map +0 -1
  45. package/dist/esm/index.mjs.map +0 -1
  46. package/dist/esm/index.native.js.map +0 -1
  47. package/dist/jsx/index.js.map +0 -1
  48. package/dist/jsx/index.mjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"names":["Adapt","AdaptParent","AdaptPortalContents","ProvideAdaptContext","useAdaptContext","useAdaptIsActive","Animate","ResetPresence","useComposedRefs","isWeb","useIsomorphicLayoutEffect","View","createStyledContext","useCreateShallowSetState","useEvent","useGet","Dismissable","DismissableBranch","FloatingOverrideContext","FocusScope","FocusScopeController","composeEventHandlers","withStaticProperties","Popper","PopperAnchor","PopperArrow","PopperArrowFrame","PopperContent","PopperContentFrame","PopperProvider","usePopperContext","Portal","needsPortalRepropagation","RemoveScroll","ScrollView","SheetController","YStack","useControllableState","React","useFloatingContext","Fragment","jsx","jsxs","needsRepropagation","openPopovers","Set","hasOpenPopovers","size","closeOpenPopovers","forEach","setOpen","closeLastOpenedPopover","last","Array","from","pop","PopoverContext","PopoverZIndexContext","createContext","PopoverAdaptHiddenContext","PopoverTriggerContext","usePopoverContext","useStyledContext","usePopoverTriggerContext","usePopoverOpen","scope","open","usePopoverTriggerSetup","triggerStateSettersRef","useRef","Map","activeTriggerIdRef","setActiveTrigger","id","prevId","current","get","registerTrigger","setOpenState","set","unregisterTrigger","delete","useEffect","activeId","PopoverContextProvider","memo","children","onOpenChange","onOpenToggle","triggerRef","contentId","hasCustomAnchor","onCustomAnchorAdd","voidFn","onCustomAnchorRemove","anchorTo","adaptScope","breakpointActive","keepChildrenMounted","disableDismissable","hoverable","branches","useState","Provider","popoverScope","PopoverAnchor","forwardRef","PopoverAnchor2","props","forwardedRef","rest","ref","PopoverTrigger","PopoverTrigger2","disablePressTrigger","triggerContext","triggerId","useId","triggerElRef","composedTriggerRef","activateSelf","el","trigger","getState","onPress","onMouseEnter","onPressIn","onFocus","virtualRef","useMemo","getBoundingClientRect","DOMRect","fromRect","measure","c","x","y","width","height","measureInWindow","wrappedTrigger","asChild","PopoverContent","styleable","PopoverContent2","trapFocus","enableRemoveScroll","zIndex","zIndexProp","contentImplProps","context","zIndexFromContext","useContext","composedRefs","isRightClickOutsideRef","isFullyHidden","setIsFullyHidden","isAdaptFullyHidden","PopoverPortal","passThrough","pointerEvents","PopoverContentImpl","disableOutsidePointerEvents","onCloseAutoFocus","event","defaultPrevented","preventDefault","focus","onPointerDownOutside","originalEvent","detail","ctrlLeftClick","button","ctrlKey","checkDefaultPrevented","onFocusOutside","useParentContexts","popperContext","adaptContext","RepropagateParentContexts","PortalAdaptSafe","parentContexts","content","stackZIndex","fullscreen","PopoverContentImpl2","onOpenAutoFocus","disableFocusScope","onEscapeKeyDown","onInteractOutside","freezeContentsWhenHidden","lazyMount","forceUnmount","alwaysDisable","contentProps","handleExitComplete","useCallback","contents","disable","handleDismiss","loop","enabled","trapped","onMountAutoFocus","onUnmountAutoFocus","style","dspContentsStyle","dismiss","onDismiss","type","present","Boolean","onExitComplete","unstyled","backgroundColor","alignItems","display","PopoverClose","PopoverClose2","componentName","PopoverArrow","PopoverArrow2","PopoverScrollView","scrollEnabled","DEFAULT_SCOPE","Popover","Popover2","portal","PopoverInner","Anchor","Arrow","Trigger","Content","Close","PopoverInner2","openProp","defaultOpen","keepChildrenMountedProp","disableFocus","restProps","setHasCustomAnchor","viaRef","prop","defaultProp","transition","onChange","val","add","handleOpenChange","via","isAdapted","floatingContext","setAnchorToRaw","setAnchorTo","useImperativeHandle","toggle","prev","close","stayInFrame","PopoverSheetController","result","value","showSheet","useShowPopoverSheet","getShowSheet","setIsAdaptFullyHidden","onAnimationComplete","isOpen","hidden"],"sources":["Popover.mjs"],"sourcesContent":["\nimport { Adapt, AdaptParent, AdaptPortalContents, ProvideAdaptContext, useAdaptContext, useAdaptIsActive } from \"@tamagui/adapt\";\nimport { Animate } from \"@tamagui/animate\";\nimport { ResetPresence } from \"@tamagui/animate-presence\";\nimport { useComposedRefs } from \"@tamagui/compose-refs\";\nimport { isWeb, useIsomorphicLayoutEffect } from \"@tamagui/constants\";\nimport { View, createStyledContext, useCreateShallowSetState, useEvent, useGet } from \"@tamagui/core\";\nimport { Dismissable, DismissableBranch } from \"@tamagui/dismissable\";\nimport { FloatingOverrideContext } from \"@tamagui/floating\";\nimport { FocusScope, FocusScopeController } from \"@tamagui/focus-scope\";\nimport { composeEventHandlers, withStaticProperties } from \"@tamagui/helpers\";\nimport { Popper, PopperAnchor, PopperArrow, PopperArrowFrame, PopperContent, PopperContentFrame, PopperProvider, usePopperContext } from \"@tamagui/popper\";\nimport { Portal, needsPortalRepropagation } from \"@tamagui/portal\";\nimport { RemoveScroll } from \"@tamagui/remove-scroll\";\nimport { ScrollView } from \"@tamagui/scroll-view\";\nimport { SheetController } from \"@tamagui/sheet/controller\";\nimport { YStack } from \"@tamagui/stacks\";\nimport { useControllableState } from \"@tamagui/use-controllable-state\";\nimport * as React from \"react\";\nimport { useFloatingContext } from \"./useFloatingContext\";\nimport { Fragment, jsx, jsxs } from \"react/jsx-runtime\";\n\nconst needsRepropagation = needsPortalRepropagation();\nconst openPopovers = /* @__PURE__ */ new Set();\nconst hasOpenPopovers = () => {\n\treturn openPopovers.size > 0;\n};\nconst closeOpenPopovers = () => {\n\tif (openPopovers.size === 0) return false;\n\topenPopovers.forEach((setOpen) => setOpen(false));\n\treturn true;\n};\nconst closeLastOpenedPopover = () => {\n\tif (openPopovers.size === 0) return false;\n\tconst last = Array.from(openPopovers).pop();\n\tif (last) {\n\t\tlast(false);\n\t\treturn true;\n\t}\n\treturn false;\n};\nconst PopoverContext = createStyledContext({}, \"Popover__\");\nconst PopoverZIndexContext = React.createContext(void 0);\nconst PopoverAdaptHiddenContext = React.createContext(true);\nconst PopoverTriggerContext = createStyledContext({}, \"PopoverTrigger__\");\nconst usePopoverContext = PopoverContext.useStyledContext;\nconst usePopoverTriggerContext = PopoverTriggerContext.useStyledContext;\nfunction usePopoverOpen(scope) {\n\treturn usePopoverContext(scope).open;\n}\nfunction usePopoverTriggerSetup(open) {\n\tconst triggerStateSettersRef = React.useRef(/* @__PURE__ */ new Map());\n\tconst activeTriggerIdRef = React.useRef(null);\n\tconst setActiveTrigger = useEvent((id) => {\n\t\tconst prevId = activeTriggerIdRef.current;\n\t\tif (prevId === id) return;\n\t\tif (prevId) triggerStateSettersRef.current.get(prevId)?.(false);\n\t\tactiveTriggerIdRef.current = id;\n\t\tif (id && open) triggerStateSettersRef.current.get(id)?.(true);\n\t});\n\tconst registerTrigger = useEvent((id, setOpenState) => {\n\t\ttriggerStateSettersRef.current.set(id, setOpenState);\n\t\tsetOpenState(activeTriggerIdRef.current === id && open);\n\t});\n\tconst unregisterTrigger = useEvent((id) => {\n\t\ttriggerStateSettersRef.current.delete(id);\n\t\tif (activeTriggerIdRef.current === id) activeTriggerIdRef.current = null;\n\t});\n\tReact.useEffect(() => {\n\t\tif (!open) {\n\t\t\tsetActiveTrigger(null);\n\t\t\treturn;\n\t\t}\n\t\tconst activeId = activeTriggerIdRef.current;\n\t\tif (activeId) triggerStateSettersRef.current.get(activeId)?.(true);\n\t}, [open, setActiveTrigger]);\n\treturn {\n\t\tsetActiveTrigger,\n\t\tregisterTrigger,\n\t\tunregisterTrigger\n\t};\n}\nconst PopoverContextProvider = React.memo(({ scope, children, open, onOpenChange, onOpenToggle, triggerRef, id = \"\", contentId, hasCustomAnchor = false, onCustomAnchorAdd = voidFn, onCustomAnchorRemove = voidFn, anchorTo, adaptScope, breakpointActive, keepChildrenMounted, disableDismissable, hoverable }) => {\n\tconst [branches] = React.useState(() => /* @__PURE__ */ new Set());\n\tconst { setActiveTrigger, registerTrigger, unregisterTrigger } = usePopoverTriggerSetup(open);\n\treturn /* @__PURE__ */ jsx(PopoverContext.Provider, {\n\t\tscope,\n\t\tpopoverScope: scope,\n\t\tadaptScope,\n\t\tid,\n\t\tcontentId,\n\t\ttriggerRef,\n\t\topen,\n\t\tonOpenChange,\n\t\tonOpenToggle,\n\t\thasCustomAnchor,\n\t\tonCustomAnchorAdd,\n\t\tonCustomAnchorRemove,\n\t\tanchorTo,\n\t\tbranches,\n\t\tbreakpointActive,\n\t\tkeepChildrenMounted,\n\t\tdisableDismissable,\n\t\thoverable,\n\t\tchildren: /* @__PURE__ */ jsx(PopoverTriggerContext.Provider, {\n\t\t\tscope,\n\t\t\ttriggerRef,\n\t\t\thasCustomAnchor,\n\t\t\tanchorTo,\n\t\t\tbranches,\n\t\t\tonOpenToggle,\n\t\t\tsetActiveTrigger,\n\t\t\tregisterTrigger,\n\t\t\tunregisterTrigger,\n\t\t\tchildren\n\t\t})\n\t});\n});\nconst voidFn = () => {};\nconst PopoverAnchor = React.memo(React.forwardRef(function PopoverAnchor2(props, forwardedRef) {\n\tconst { scope, ...rest } = props;\n\tconst { onCustomAnchorAdd, onCustomAnchorRemove } = usePopoverContext(scope) || {};\n\tReact.useEffect(() => {\n\t\tonCustomAnchorAdd();\n\t\treturn () => onCustomAnchorRemove();\n\t}, [onCustomAnchorAdd, onCustomAnchorRemove]);\n\treturn /* @__PURE__ */ jsx(PopperAnchor, {\n\t\tscope,\n\t\t...rest,\n\t\tref: forwardedRef\n\t});\n}));\nconst PopoverTrigger = React.memo(React.forwardRef(function PopoverTrigger2(props, forwardedRef) {\n\tconst { scope, disablePressTrigger, ...rest } = props;\n\tconst triggerContext = usePopoverTriggerContext(scope);\n\tconst triggerId = React.useId();\n\tconst [open, setOpen] = React.useState(false);\n\tconst anchorTo = triggerContext.anchorTo;\n\tconst triggerElRef = React.useRef(null);\n\tconst composedTriggerRef = useComposedRefs(forwardedRef, triggerElRef);\n\tconst { registerTrigger, unregisterTrigger } = triggerContext;\n\tReact.useEffect(() => {\n\t\tregisterTrigger(triggerId, setOpen);\n\t\treturn () => {\n\t\t\tunregisterTrigger(triggerId);\n\t\t};\n\t}, [\n\t\tregisterTrigger,\n\t\tunregisterTrigger,\n\t\ttriggerId\n\t]);\n\tif (!rest.children) return null;\n\tconst activateSelf = () => {\n\t\ttriggerContext.setActiveTrigger(triggerId);\n\t\tconst el = triggerElRef.current;\n\t\tif (el) triggerContext.triggerRef.current = el;\n\t};\n\tconst trigger = /* @__PURE__ */ jsx(View, {\n\t\t\"aria-expanded\": open,\n\t\t\"data-state\": getState(open),\n\t\t...rest,\n\t\tref: composedTriggerRef,\n\t\tonPress: composeEventHandlers(rest.onPress, () => {\n\t\t\tif (disablePressTrigger) return;\n\t\t\ttriggerContext.setActiveTrigger(open ? null : triggerId);\n\t\t\ttriggerContext.onOpenToggle();\n\t\t}),\n\t\tonMouseEnter: composeEventHandlers(rest.onMouseEnter, activateSelf),\n\t\tonPressIn: composeEventHandlers(rest.onPressIn, activateSelf),\n\t\tonFocus: composeEventHandlers(rest.onFocus, activateSelf)\n\t});\n\tconst virtualRef = React.useMemo(() => {\n\t\tif (!anchorTo) return null;\n\t\treturn { current: {\n\t\t\tgetBoundingClientRect: () => isWeb ? DOMRect.fromRect(anchorTo) : anchorTo,\n\t\t\t...!isWeb && {\n\t\t\t\tmeasure: (c) => c(anchorTo?.x, anchorTo?.y, anchorTo?.width, anchorTo?.height),\n\t\t\t\tmeasureInWindow: (c) => c(anchorTo?.x, anchorTo?.y, anchorTo?.width, anchorTo?.height)\n\t\t\t}\n\t\t} };\n\t}, [\n\t\ttriggerContext.anchorTo,\n\t\tanchorTo?.x,\n\t\tanchorTo?.y,\n\t\tanchorTo?.height,\n\t\tanchorTo?.width\n\t]);\n\tconst wrappedTrigger = isWeb ? /* @__PURE__ */ jsx(DismissableBranch, {\n\t\tbranches: triggerContext.branches,\n\t\tchildren: trigger\n\t}) : trigger;\n\treturn triggerContext.hasCustomAnchor ? wrappedTrigger : /* @__PURE__ */ jsx(PopperAnchor, {\n\t\t...virtualRef && { virtualRef },\n\t\tscope,\n\t\tasChild: true,\n\t\tchildren: wrappedTrigger\n\t});\n}));\nconst PopoverContent = PopperContentFrame.styleable(function PopoverContent2(props, forwardedRef) {\n\tconst { trapFocus, enableRemoveScroll = false, zIndex: zIndexProp, scope, ...contentImplProps } = props;\n\tconst context = usePopoverContext(scope);\n\tconst zIndexFromContext = React.useContext(PopoverZIndexContext);\n\tconst zIndex = zIndexProp ?? zIndexFromContext;\n\tconst open = usePopoverOpen(scope);\n\tconst composedRefs = useComposedRefs(forwardedRef, React.useRef(null));\n\tconst isRightClickOutsideRef = React.useRef(false);\n\tconst [isFullyHidden, setIsFullyHidden] = React.useState(!open);\n\tuseIsomorphicLayoutEffect(() => {\n\t\tif (open && isFullyHidden) setIsFullyHidden(false);\n\t}, [open, isFullyHidden]);\n\tconst isAdaptFullyHidden = React.useContext(PopoverAdaptHiddenContext);\n\tif (!context.keepChildrenMounted) {\n\t\tif (context.breakpointActive) {\n\t\t\tif (!open && isAdaptFullyHidden) return null;\n\t\t} else if (isFullyHidden && !open) return null;\n\t}\n\treturn /* @__PURE__ */ jsx(PopoverPortal, {\n\t\tpassThrough: context.breakpointActive,\n\t\tcontext,\n\t\topen,\n\t\tzIndex,\n\t\tchildren: /* @__PURE__ */ jsx(View, {\n\t\t\tpassThrough: context.breakpointActive,\n\t\t\tpointerEvents: open ? contentImplProps.pointerEvents ?? \"auto\" : \"none\",\n\t\t\tchildren: /* @__PURE__ */ jsx(PopoverContentImpl, {\n\t\t\t\t...contentImplProps,\n\t\t\t\tcontext,\n\t\t\t\topen,\n\t\t\t\tenableRemoveScroll,\n\t\t\t\tref: composedRefs,\n\t\t\t\tsetIsFullyHidden,\n\t\t\t\tscope,\n\t\t\t\ttrapFocus: trapFocus ?? open,\n\t\t\t\tdisableOutsidePointerEvents: true,\n\t\t\t\tonCloseAutoFocus: props.onCloseAutoFocus === false ? void 0 : composeEventHandlers(props.onCloseAutoFocus, (event) => {\n\t\t\t\t\tif (event.defaultPrevented) return;\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tif (!isRightClickOutsideRef.current) context.triggerRef.current?.focus();\n\t\t\t\t}),\n\t\t\t\tonPointerDownOutside: composeEventHandlers(props.onPointerDownOutside, (event) => {\n\t\t\t\t\tconst originalEvent = event.detail.originalEvent;\n\t\t\t\t\tconst ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n\t\t\t\t\tisRightClickOutsideRef.current = originalEvent.button === 2 || ctrlLeftClick;\n\t\t\t\t}, { checkDefaultPrevented: false }),\n\t\t\t\tonFocusOutside: composeEventHandlers(props.onFocusOutside, (event) => event.preventDefault(), { checkDefaultPrevented: false })\n\t\t\t})\n\t\t})\n\t});\n});\nconst useParentContexts = (scope) => {\n\tconst context = usePopoverContext(scope);\n\tconst triggerContext = usePopoverTriggerContext(scope);\n\treturn {\n\t\tpopperContext: usePopperContext(scope),\n\t\tadaptContext: useAdaptContext(context.adaptScope),\n\t\tcontext,\n\t\ttriggerContext\n\t};\n};\nfunction RepropagateParentContexts({ adaptContext, children, context, triggerContext, popperContext }) {\n\treturn /* @__PURE__ */ jsx(PopperProvider, {\n\t\tscope: context.popoverScope,\n\t\t...popperContext,\n\t\tchildren: /* @__PURE__ */ jsx(PopoverContext.Provider, {\n\t\t\tscope: context.popoverScope,\n\t\t\t...context,\n\t\t\tchildren: /* @__PURE__ */ jsx(PopoverTriggerContext.Provider, {\n\t\t\t\tscope: context.popoverScope,\n\t\t\t\t...triggerContext,\n\t\t\t\tchildren: /* @__PURE__ */ jsx(ProvideAdaptContext, {\n\t\t\t\t\t...adaptContext,\n\t\t\t\t\tchildren\n\t\t\t\t})\n\t\t\t})\n\t\t})\n\t});\n}\nconst PortalAdaptSafe = ({ children, context }) => {\n\t\"use no memo\";\n\tif (needsRepropagation) {\n\t\tconst parentContexts = useParentContexts(context.popoverScope);\n\t\treturn /* @__PURE__ */ jsx(AdaptPortalContents, {\n\t\t\tscope: context.adaptScope,\n\t\t\tchildren: /* @__PURE__ */ jsx(RepropagateParentContexts, {\n\t\t\t\t...parentContexts,\n\t\t\t\tchildren\n\t\t\t})\n\t\t});\n\t}\n\treturn /* @__PURE__ */ jsx(AdaptPortalContents, {\n\t\tscope: context.adaptScope,\n\t\tchildren\n\t});\n};\nfunction PopoverPortal({ context, open, zIndex, passThrough, children, onPress }) {\n\t\"use no memo\";\n\tlet content = children;\n\tif (needsRepropagation) content = /* @__PURE__ */ jsx(RepropagateParentContexts, {\n\t\t...useParentContexts(context.popoverScope),\n\t\tchildren: content\n\t});\n\treturn /* @__PURE__ */ jsxs(Portal, {\n\t\tpassThrough,\n\t\tstackZIndex: true,\n\t\tzIndex,\n\t\tchildren: [!!open && !context.breakpointActive && !context.hoverable && /* @__PURE__ */ jsx(YStack, {\n\t\t\tfullscreen: true,\n\t\t\tonPress: composeEventHandlers(onPress, context.onOpenToggle)\n\t\t}), content]\n\t});\n}\nconst PopoverContentImpl = React.forwardRef(function PopoverContentImpl2(props, forwardedRef) {\n\tconst { trapFocus, scope, onOpenAutoFocus, onCloseAutoFocus, disableOutsidePointerEvents, disableFocusScope, onEscapeKeyDown, onPointerDownOutside, onFocusOutside, onInteractOutside, children, enableRemoveScroll, freezeContentsWhenHidden, setIsFullyHidden, lazyMount, forceUnmount, context, open, alwaysDisable, ...contentProps } = props;\n\tconst { keepChildrenMounted, disableDismissable } = context;\n\tconst handleExitComplete = React.useCallback(() => {\n\t\tsetIsFullyHidden?.(true);\n\t}, [setIsFullyHidden]);\n\tlet contents = /* @__PURE__ */ jsx(ResetPresence, {\n\t\tdisable: context.breakpointActive,\n\t\tchildren\n\t});\n\tconst handleDismiss = React.useCallback(() => {\n\t\tcontext.onOpenChange(false, \"press\");\n\t}, [context]);\n\tif (!context.breakpointActive) {\n\t\tif (!alwaysDisable || !alwaysDisable.focus) contents = /* @__PURE__ */ jsx(FocusScope, {\n\t\t\tloop: trapFocus !== false,\n\t\t\tenabled: context.breakpointActive ? false : disableFocusScope ? false : open,\n\t\t\ttrapped: context.breakpointActive ? false : trapFocus,\n\t\t\tonMountAutoFocus: onOpenAutoFocus,\n\t\t\tonUnmountAutoFocus: onCloseAutoFocus === false ? void 0 : onCloseAutoFocus,\n\t\t\tchildren: /* @__PURE__ */ jsx(\"div\", {\n\t\t\t\tstyle: dspContentsStyle,\n\t\t\t\tchildren: contents\n\t\t\t})\n\t\t});\n\t\tif (!alwaysDisable || !alwaysDisable[\"remove-scroll\"]) contents = /* @__PURE__ */ jsx(RemoveScroll, {\n\t\t\tenabled: context.breakpointActive ? false : enableRemoveScroll ? open : false,\n\t\t\tchildren: contents\n\t\t});\n\t\tif (!alwaysDisable || !alwaysDisable.dismiss) contents = /* @__PURE__ */ jsx(Dismissable, {\n\t\t\tbranches: context.branches,\n\t\t\tforceUnmount: disableDismissable || (forceUnmount ?? !open),\n\t\t\tonEscapeKeyDown,\n\t\t\tonPointerDownOutside,\n\t\t\tonFocusOutside,\n\t\t\tonInteractOutside,\n\t\t\tonDismiss: handleDismiss,\n\t\t\tchildren: contents\n\t\t});\n\t}\n\treturn /* @__PURE__ */ jsx(Animate, {\n\t\ttype: \"presence\",\n\t\tpresent: Boolean(open),\n\t\tkeepChildrenMounted: Boolean(keepChildrenMounted),\n\t\tonExitComplete: handleExitComplete,\n\t\tlazyMount,\n\t\tpassThrough: context.breakpointActive,\n\t\tchildren: /* @__PURE__ */ jsx(PopperContent, {\n\t\t\tscope,\n\t\t\t\"data-state\": getState(open),\n\t\t\tid: context.contentId,\n\t\t\tref: forwardedRef,\n\t\t\tpassThrough: context.breakpointActive,\n\t\t\t...!contentProps.unstyled && {\n\t\t\t\tsize: \"$true\",\n\t\t\t\tbackgroundColor: \"$background\",\n\t\t\t\talignItems: \"center\"\n\t\t\t},\n\t\t\t...contentProps,\n\t\t\tchildren: /* @__PURE__ */ jsx(PortalAdaptSafe, {\n\t\t\t\tcontext,\n\t\t\t\tchildren: contents\n\t\t\t})\n\t\t}, context.contentId)\n\t});\n});\nconst dspContentsStyle = { display: \"contents\" };\nconst PopoverClose = React.forwardRef(function PopoverClose2(props, forwardedRef) {\n\tconst { scope, ...rest } = props;\n\tconst context = usePopoverContext(scope);\n\treturn /* @__PURE__ */ jsx(YStack, {\n\t\t...rest,\n\t\tref: forwardedRef,\n\t\tcomponentName: \"PopoverClose\",\n\t\tonPress: composeEventHandlers(props.onPress, () => context?.onOpenChange?.(false, \"press\"))\n\t});\n});\nconst PopoverArrow = PopperArrowFrame.styleable(function PopoverArrow2(props, forwardedRef) {\n\tconst { scope, ...rest } = props;\n\tif (useAdaptIsActive(usePopoverContext(scope).adaptScope)) return null;\n\treturn /* @__PURE__ */ jsx(PopperArrow, {\n\t\tscope,\n\t\tcomponentName: \"PopoverArrow\",\n\t\t...rest,\n\t\tref: forwardedRef\n\t});\n});\nconst PopoverScrollView = React.forwardRef(({ scope, ...props }, ref) => {\n\tconst context = usePopoverContext(scope);\n\treturn /* @__PURE__ */ jsx(ScrollView, {\n\t\tref,\n\t\tpointerEvents: context.breakpointActive ? \"none\" : void 0,\n\t\tscrollEnabled: !context.breakpointActive,\n\t\tpassThrough: context.breakpointActive,\n\t\t...props\n\t});\n});\nconst DEFAULT_SCOPE = \"\";\nconst Popover = withStaticProperties(React.forwardRef(function Popover2({ scope = DEFAULT_SCOPE, ...props }, ref) {\n\tconst id = React.useId();\n\tconst adaptScope = `PopoverAdapt${scope}`;\n\treturn /* @__PURE__ */ jsx(AdaptParent, {\n\t\tscope: adaptScope,\n\t\tportal: true,\n\t\tchildren: /* @__PURE__ */ jsx(PopoverInner, {\n\t\t\tadaptScope,\n\t\t\tref,\n\t\t\tid,\n\t\t\tscope,\n\t\t\t...props\n\t\t})\n\t});\n}), {\n\tAnchor: PopoverAnchor,\n\tArrow: PopoverArrow,\n\tTrigger: PopoverTrigger,\n\tContent: PopoverContent,\n\tClose: PopoverClose,\n\tAdapt,\n\tScrollView: PopoverScrollView,\n\tFocusScope: FocusScopeController\n});\nconst PopoverInner = React.forwardRef(function PopoverInner2(props, forwardedRef) {\n\tconst { children, open: openProp, defaultOpen, onOpenChange, scope = DEFAULT_SCOPE, keepChildrenMounted: keepChildrenMountedProp, hoverable, disableFocus, disableDismissable, zIndex, id, adaptScope, ...restProps } = props;\n\tconst triggerRef = React.useRef(null);\n\tconst [hasCustomAnchor, setHasCustomAnchor] = React.useState(false);\n\tconst viaRef = React.useRef(void 0);\n\tconst [keepChildrenMounted] = useControllableState({\n\t\tprop: keepChildrenMountedProp,\n\t\tdefaultProp: false,\n\t\ttransition: keepChildrenMountedProp === \"lazy\"\n\t});\n\tconst [open, setOpen] = useControllableState({\n\t\tprop: openProp,\n\t\tdefaultProp: defaultOpen || false,\n\t\tonChange: (val) => {\n\t\t\tonOpenChange?.(val, viaRef.current);\n\t\t}\n\t});\n\tReact.useEffect(() => {\n\t\tif (!open) return;\n\t\topenPopovers.add(setOpen);\n\t\treturn () => {\n\t\t\topenPopovers.delete(setOpen);\n\t\t};\n\t}, [open, setOpen]);\n\tconst handleOpenChange = useEvent((val, via) => {\n\t\tviaRef.current = via;\n\t\tsetOpen(val);\n\t});\n\tconst isAdapted = useAdaptIsActive(adaptScope);\n\tconst floatingContext = useFloatingContext({\n\t\topen,\n\t\tsetOpen: handleOpenChange,\n\t\tdisable: isAdapted,\n\t\thoverable,\n\t\tdisableFocus\n\t});\n\tconst [anchorTo, setAnchorToRaw] = React.useState();\n\tconst setAnchorTo = useCreateShallowSetState(setAnchorToRaw);\n\tReact.useImperativeHandle(forwardedRef, () => ({\n\t\tanchorTo: setAnchorTo,\n\t\ttoggle: () => setOpen((prev) => !prev),\n\t\topen: () => setOpen(true),\n\t\tclose: () => setOpen(false),\n\t\tsetOpen\n\t}));\n\tconst contentId = React.useId();\n\tconst onOpenToggle = useEvent(() => {\n\t\tif (open && isAdapted) return;\n\t\tsetOpen(!open);\n\t});\n\tconst onCustomAnchorAdd = React.useCallback(() => setHasCustomAnchor(true), []);\n\tconst onCustomAnchorRemove = React.useCallback(() => setHasCustomAnchor(false), []);\n\tconst contents = /* @__PURE__ */ jsx(Popper, {\n\t\topen,\n\t\tpassThrough: isAdapted,\n\t\tscope,\n\t\tstayInFrame: true,\n\t\t...restProps,\n\t\tchildren: /* @__PURE__ */ jsx(PopoverContextProvider, {\n\t\t\tscope,\n\t\t\topen,\n\t\t\tonOpenChange: handleOpenChange,\n\t\t\tonOpenToggle,\n\t\t\ttriggerRef,\n\t\t\tid,\n\t\t\tcontentId,\n\t\t\thasCustomAnchor,\n\t\t\tonCustomAnchorAdd,\n\t\t\tonCustomAnchorRemove,\n\t\t\tanchorTo,\n\t\t\tadaptScope,\n\t\t\tbreakpointActive: isAdapted,\n\t\t\tkeepChildrenMounted,\n\t\t\tdisableDismissable,\n\t\t\thoverable,\n\t\t\tchildren: /* @__PURE__ */ jsx(PopoverSheetController, {\n\t\t\t\tonOpenChange: setOpen,\n\t\t\t\topen,\n\t\t\t\tscope,\n\t\t\t\tchildren\n\t\t\t})\n\t\t})\n\t});\n\tlet result = /* @__PURE__ */ jsx(Fragment, { children: isWeb ? /* @__PURE__ */ jsx(FloatingOverrideContext.Provider, {\n\t\tvalue: floatingContext,\n\t\tchildren: contents\n\t}) : contents });\n\tif (zIndex !== void 0) return /* @__PURE__ */ jsx(PopoverZIndexContext.Provider, {\n\t\tvalue: zIndex,\n\t\tchildren: result\n\t});\n\treturn result;\n});\nfunction getState(open) {\n\treturn open ? \"open\" : \"closed\";\n}\nconst PopoverSheetController = ({ open, scope, ...props }) => {\n\tconst context = usePopoverContext(scope);\n\tconst showSheet = useShowPopoverSheet(context, open);\n\tconst breakpointActive = context?.breakpointActive;\n\tconst getShowSheet = useGet(showSheet);\n\tconst [isAdaptFullyHidden, setIsAdaptFullyHidden] = React.useState(!open);\n\tif (open && isAdaptFullyHidden) setIsAdaptFullyHidden(false);\n\treturn /* @__PURE__ */ jsx(SheetController, {\n\t\tonOpenChange: (val) => {\n\t\t\tif (getShowSheet()) props.onOpenChange?.(val);\n\t\t},\n\t\tonAnimationComplete: React.useCallback(({ open: isOpen }) => {\n\t\t\tif (!isOpen) setIsAdaptFullyHidden(true);\n\t\t}, []),\n\t\topen,\n\t\thidden: !breakpointActive,\n\t\tchildren: /* @__PURE__ */ jsx(PopoverAdaptHiddenContext.Provider, {\n\t\t\tvalue: isAdaptFullyHidden,\n\t\t\tchildren: props.children\n\t\t})\n\t});\n};\nconst useShowPopoverSheet = (context, open) => {\n\tconst isAdapted = useAdaptIsActive(context.adaptScope);\n\treturn open === false ? false : isAdapted;\n};\n\nexport { Popover, PopoverAnchor, PopoverArrow, PopoverClose, PopoverContent, PopoverContext, PopoverContextProvider, PopoverTrigger, PopoverTriggerContext, PopoverZIndexContext, closeLastOpenedPopover, closeOpenPopovers, hasOpenPopovers, usePopoverContext, usePopoverOpen, usePopoverTriggerContext, usePopoverTriggerSetup };"],"mappings":"AACA,SAASA,KAAK,EAAEC,WAAW,EAAEC,mBAAmB,EAAEC,mBAAmB,EAAEC,eAAe,EAAEC,gBAAgB,QAAQ,gBAAgB;AAChI,SAASC,OAAO,QAAQ,kBAAkB;AAC1C,SAASC,aAAa,QAAQ,2BAA2B;AACzD,SAASC,eAAe,QAAQ,uBAAuB;AACvD,SAASC,KAAK,EAAEC,yBAAyB,QAAQ,oBAAoB;AACrE,SAASC,IAAI,EAAEC,mBAAmB,EAAEC,wBAAwB,EAAEC,QAAQ,EAAEC,MAAM,QAAQ,eAAe;AACrG,SAASC,WAAW,EAAEC,iBAAiB,QAAQ,sBAAsB;AACrE,SAASC,uBAAuB,QAAQ,mBAAmB;AAC3D,SAASC,UAAU,EAAEC,oBAAoB,QAAQ,sBAAsB;AACvE,SAASC,oBAAoB,EAAEC,oBAAoB,QAAQ,kBAAkB;AAC7E,SAASC,MAAM,EAAEC,YAAY,EAAEC,WAAW,EAAEC,gBAAgB,EAAEC,aAAa,EAAEC,kBAAkB,EAAEC,cAAc,EAAEC,gBAAgB,QAAQ,iBAAiB;AAC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adapt, AdaptParent, AdaptPortalContents, ProvideAdaptContext, useAdaptContext, useAdaptIsActive } from \"@tamagui/adapt\";\nimport { Animate } from \"@tamagui/animate\";\nimport { ResetPresence } from \"@tamagui/animate-presence\";\nimport { useComposedRefs } from \"@tamagui/compose-refs\";\nimport { isWeb, useIsomorphicLayoutEffect } from \"@tamagui/constants\";\nimport { View, createRefComponent, createStyledContext, createStyledHOC, useCreateShallowSetState, useEvent } from \"@tamagui/core\";\nimport { Dismissable, DismissableBranch } from \"@tamagui/dismissable\";\nimport { FloatingOverrideContext } from \"@tamagui/floating\";\nimport { FocusScope, FocusScopeController } from \"@tamagui/focus-scope\";\nimport { composeEventHandlers, withStaticProperties } from \"@tamagui/helpers\";\nimport { Popper, PopperAnchor, PopperArrow, PopperArrowFrame, PopperContent, PopperContentFrame, PopperProvider, usePopperContext } from \"@tamagui/popper\";\nimport { Portal, needsPortalRepropagation } from \"@tamagui/portal\";\nimport { RemoveScroll } from \"@tamagui/remove-scroll\";\nimport { ScrollView } from \"@tamagui/scroll-view\";\nimport { YStack } from \"@tamagui/stacks\";\nimport { useControllableState } from \"@tamagui/use-controllable-state\";\nimport * as React from \"react\";\nimport { useFloatingContext } from \"./useFloatingContext\";\nimport { Fragment, jsx, jsxs } from \"react/jsx-runtime\";\n\nconst needsRepropagation = needsPortalRepropagation();\nconst openPopovers = /* @__PURE__ */ new Set();\nconst hasOpenPopovers = () => {\n\treturn openPopovers.size > 0;\n};\nconst closeOpenPopovers = () => {\n\tif (openPopovers.size === 0) return false;\n\topenPopovers.forEach((setOpen) => setOpen(false));\n\treturn true;\n};\nconst closeLastOpenedPopover = () => {\n\tif (openPopovers.size === 0) return false;\n\tconst last = Array.from(openPopovers).pop();\n\tif (last) {\n\t\tlast(false);\n\t\treturn true;\n\t}\n\treturn false;\n};\nconst PopoverContext = createStyledContext({}, \"Popover__\");\nconst PopoverZIndexContext = React.createContext(void 0);\nconst PopoverTriggerContext = createStyledContext({}, \"PopoverTrigger__\");\nconst usePopoverContext = PopoverContext.useStyledContext;\nconst usePopoverTriggerContext = PopoverTriggerContext.useStyledContext;\nfunction usePopoverOpen(scope) {\n\treturn usePopoverContext(scope).open;\n}\nfunction usePopoverTriggerSetup(open) {\n\tconst triggerStateSettersRef = React.useRef(/* @__PURE__ */ new Map());\n\tconst activeTriggerIdRef = React.useRef(null);\n\tconst setActiveTrigger = useEvent((id) => {\n\t\tconst prevId = activeTriggerIdRef.current;\n\t\tif (prevId === id) return;\n\t\tif (prevId) triggerStateSettersRef.current.get(prevId)?.(false);\n\t\tactiveTriggerIdRef.current = id;\n\t\tif (id && open) triggerStateSettersRef.current.get(id)?.(true);\n\t});\n\tconst registerTrigger = useEvent((id, setOpenState) => {\n\t\ttriggerStateSettersRef.current.set(id, setOpenState);\n\t\tsetOpenState(activeTriggerIdRef.current === id && open);\n\t});\n\tconst unregisterTrigger = useEvent((id) => {\n\t\ttriggerStateSettersRef.current.delete(id);\n\t\tif (activeTriggerIdRef.current === id) activeTriggerIdRef.current = null;\n\t});\n\tReact.useEffect(() => {\n\t\tif (!open) {\n\t\t\tsetActiveTrigger(null);\n\t\t\treturn;\n\t\t}\n\t\tconst activeId = activeTriggerIdRef.current;\n\t\tif (activeId) triggerStateSettersRef.current.get(activeId)?.(true);\n\t}, [open, setActiveTrigger]);\n\treturn {\n\t\tsetActiveTrigger,\n\t\tregisterTrigger,\n\t\tunregisterTrigger\n\t};\n}\nconst PopoverContextProvider = React.memo(({ scope, children, open, onOpenChange, onOpenToggle, triggerRef, id = \"\", contentId, hasCustomAnchor = false, onCustomAnchorAdd = voidFn, onCustomAnchorRemove = voidFn, anchorTo, adaptScope, breakpointActive, keepChildrenMounted, disableDismissable, hoverable }) => {\n\tconst [branches] = React.useState(() => /* @__PURE__ */ new Set());\n\tconst { setActiveTrigger, registerTrigger, unregisterTrigger } = usePopoverTriggerSetup(open);\n\treturn /* @__PURE__ */ jsx(PopoverContext.Provider, {\n\t\tscope,\n\t\tpopoverScope: scope,\n\t\tadaptScope,\n\t\tid,\n\t\tcontentId,\n\t\ttriggerRef,\n\t\topen,\n\t\tonOpenChange,\n\t\tonOpenToggle,\n\t\thasCustomAnchor,\n\t\tonCustomAnchorAdd,\n\t\tonCustomAnchorRemove,\n\t\tanchorTo,\n\t\tbranches,\n\t\tbreakpointActive,\n\t\tkeepChildrenMounted,\n\t\tdisableDismissable,\n\t\thoverable,\n\t\tchildren: /* @__PURE__ */ jsx(PopoverTriggerContext.Provider, {\n\t\t\tscope,\n\t\t\ttriggerRef,\n\t\t\thasCustomAnchor,\n\t\t\tanchorTo,\n\t\t\tbranches,\n\t\t\tonOpenToggle,\n\t\t\tsetActiveTrigger,\n\t\t\tregisterTrigger,\n\t\t\tunregisterTrigger,\n\t\t\tchildren\n\t\t})\n\t});\n});\nconst voidFn = () => {};\nconst PopoverAnchor = React.memo(createRefComponent(function PopoverAnchor2(props, forwardedRef) {\n\tconst { scope, ...rest } = props;\n\tconst { onCustomAnchorAdd, onCustomAnchorRemove } = usePopoverContext(scope) || {};\n\tReact.useEffect(() => {\n\t\tonCustomAnchorAdd();\n\t\treturn () => onCustomAnchorRemove();\n\t}, [onCustomAnchorAdd, onCustomAnchorRemove]);\n\treturn /* @__PURE__ */ jsx(PopperAnchor, {\n\t\tscope,\n\t\t...rest,\n\t\tref: forwardedRef\n\t});\n}));\nconst PopoverTrigger = React.memo(createRefComponent(function PopoverTrigger2(props, forwardedRef) {\n\tconst { scope, disablePressTrigger, ...rest } = props;\n\tconst triggerContext = usePopoverTriggerContext(scope);\n\tconst triggerId = React.useId();\n\tconst [open, setOpen] = React.useState(false);\n\tconst anchorTo = triggerContext.anchorTo;\n\tconst triggerElRef = React.useRef(null);\n\tconst composedTriggerRef = useComposedRefs(forwardedRef, triggerElRef);\n\tconst { registerTrigger, unregisterTrigger } = triggerContext;\n\tReact.useEffect(() => {\n\t\tregisterTrigger(triggerId, setOpen);\n\t\treturn () => {\n\t\t\tunregisterTrigger(triggerId);\n\t\t};\n\t}, [\n\t\tregisterTrigger,\n\t\tunregisterTrigger,\n\t\ttriggerId\n\t]);\n\tif (!rest.children) return null;\n\tconst activateSelf = () => {\n\t\ttriggerContext.setActiveTrigger(triggerId);\n\t\tconst el = triggerElRef.current;\n\t\tif (el) triggerContext.triggerRef.current = el;\n\t};\n\tconst trigger = /* @__PURE__ */ jsx(View, {\n\t\t\"aria-expanded\": open,\n\t\t\"data-state\": getState(open),\n\t\t...rest,\n\t\tref: composedTriggerRef,\n\t\tonPress: composeEventHandlers(rest.onPress, () => {\n\t\t\tif (disablePressTrigger) return;\n\t\t\ttriggerContext.setActiveTrigger(open ? null : triggerId);\n\t\t\ttriggerContext.onOpenToggle();\n\t\t}),\n\t\tonMouseEnter: composeEventHandlers(rest.onMouseEnter, activateSelf),\n\t\tonPressIn: composeEventHandlers(rest.onPressIn, activateSelf),\n\t\tonFocus: composeEventHandlers(rest.onFocus, activateSelf)\n\t});\n\tconst virtualRef = React.useMemo(() => {\n\t\tif (!anchorTo) return null;\n\t\treturn { current: {\n\t\t\tgetBoundingClientRect: () => isWeb ? DOMRect.fromRect(anchorTo) : anchorTo,\n\t\t\t...!isWeb && {\n\t\t\t\tmeasure: (c) => c(anchorTo?.x, anchorTo?.y, anchorTo?.width, anchorTo?.height),\n\t\t\t\tmeasureInWindow: (c) => c(anchorTo?.x, anchorTo?.y, anchorTo?.width, anchorTo?.height)\n\t\t\t}\n\t\t} };\n\t}, [\n\t\ttriggerContext.anchorTo,\n\t\tanchorTo?.x,\n\t\tanchorTo?.y,\n\t\tanchorTo?.height,\n\t\tanchorTo?.width\n\t]);\n\tconst wrappedTrigger = isWeb ? /* @__PURE__ */ jsx(DismissableBranch, {\n\t\tbranches: triggerContext.branches,\n\t\tchildren: trigger\n\t}) : trigger;\n\treturn triggerContext.hasCustomAnchor ? wrappedTrigger : /* @__PURE__ */ jsx(PopperAnchor, {\n\t\t...virtualRef && { virtualRef },\n\t\tscope,\n\t\tasChild: true,\n\t\tchildren: wrappedTrigger\n\t});\n}));\nconst PopoverContent = createStyledHOC(PopperContentFrame, function PopoverContent2(props, forwardedRef) {\n\tconst { trapFocus, enableRemoveScroll = false, zIndex: zIndexProp, scope, forceMount, ...contentImplProps } = props;\n\tconst context = usePopoverContext(scope);\n\tconst adaptContext = useAdaptContext(context.adaptScope);\n\tconst zIndexFromContext = React.useContext(PopoverZIndexContext);\n\tconst zIndex = zIndexProp ?? zIndexFromContext;\n\tconst open = usePopoverOpen(scope);\n\tconst composedRefs = useComposedRefs(forwardedRef, React.useRef(null));\n\tconst isRightClickOutsideRef = React.useRef(false);\n\tconst [isFullyHidden, setIsFullyHidden] = React.useState(!open);\n\tuseIsomorphicLayoutEffect(() => {\n\t\tif (open && isFullyHidden) setIsFullyHidden(false);\n\t}, [open, isFullyHidden]);\n\tif (!forceMount && !context.keepChildrenMounted) {\n\t\tif (context.breakpointActive) {\n\t\t\tif (!open && adaptContext.targetFullyHidden) return null;\n\t\t} else if (isFullyHidden && !open) return null;\n\t}\n\treturn /* @__PURE__ */ jsx(PopoverPortal, {\n\t\tpassThrough: context.breakpointActive,\n\t\tcontext,\n\t\topen,\n\t\tvisuallyActive: open || !isFullyHidden,\n\t\tzIndex,\n\t\tchildren: /* @__PURE__ */ jsx(View, {\n\t\t\tpassThrough: context.breakpointActive,\n\t\t\tpointerEvents: open ? contentImplProps.pointerEvents ?? \"auto\" : \"none\",\n\t\t\tchildren: /* @__PURE__ */ jsx(PopoverContentImpl, {\n\t\t\t\t...contentImplProps,\n\t\t\t\tcontext,\n\t\t\t\topen,\n\t\t\t\tforceMount,\n\t\t\t\tenableRemoveScroll,\n\t\t\t\tref: composedRefs,\n\t\t\t\tsetIsFullyHidden,\n\t\t\t\tscope,\n\t\t\t\ttrapFocus: trapFocus ?? open,\n\t\t\t\tdisableOutsidePointerEvents: true,\n\t\t\t\tonCloseAutoFocus: props.onCloseAutoFocus === false ? void 0 : composeEventHandlers(props.onCloseAutoFocus, (event) => {\n\t\t\t\t\tif (event.isCanceled) return;\n\t\t\t\t\tevent.cancel();\n\t\t\t\t\tif (!isRightClickOutsideRef.current) context.triggerRef.current?.focus();\n\t\t\t\t}),\n\t\t\t\tonPointerDownOutside: composeEventHandlers(props.onPointerDownOutside, (event) => {\n\t\t\t\t\tconst originalEvent = event.event;\n\t\t\t\t\tif (!originalEvent) return;\n\t\t\t\t\tconst ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n\t\t\t\t\tisRightClickOutsideRef.current = originalEvent.button === 2 || ctrlLeftClick;\n\t\t\t\t}, { checkDefaultPrevented: false }),\n\t\t\t\tonFocusOutside: composeEventHandlers(props.onFocusOutside, (event) => {\n\t\t\t\t\tif (trapFocus ?? open) event.cancel();\n\t\t\t\t}, { checkDefaultPrevented: false })\n\t\t\t})\n\t\t})\n\t});\n});\nconst useParentContexts = (scope) => {\n\tconst context = usePopoverContext(scope);\n\tconst triggerContext = usePopoverTriggerContext(scope);\n\treturn {\n\t\tpopperContext: usePopperContext(scope),\n\t\tadaptContext: useAdaptContext(context.adaptScope),\n\t\tcontext,\n\t\ttriggerContext\n\t};\n};\nfunction RepropagateParentContexts({ adaptContext, children, context, triggerContext, popperContext }) {\n\treturn /* @__PURE__ */ jsx(PopperProvider, {\n\t\tscope: context.popoverScope,\n\t\t...popperContext,\n\t\tchildren: /* @__PURE__ */ jsx(PopoverContext.Provider, {\n\t\t\tscope: context.popoverScope,\n\t\t\t...context,\n\t\t\tchildren: /* @__PURE__ */ jsx(PopoverTriggerContext.Provider, {\n\t\t\t\tscope: context.popoverScope,\n\t\t\t\t...triggerContext,\n\t\t\t\tchildren: /* @__PURE__ */ jsx(ProvideAdaptContext, {\n\t\t\t\t\t...adaptContext,\n\t\t\t\t\tchildren\n\t\t\t\t})\n\t\t\t})\n\t\t})\n\t});\n}\nconst PortalAdaptSafe = ({ children, context }) => {\n\t\"use no memo\";\n\tif (needsRepropagation) {\n\t\tconst parentContexts = useParentContexts(context.popoverScope);\n\t\treturn /* @__PURE__ */ jsx(AdaptPortalContents, {\n\t\t\tscope: context.adaptScope,\n\t\t\tchildren: /* @__PURE__ */ jsx(RepropagateParentContexts, {\n\t\t\t\t...parentContexts,\n\t\t\t\tchildren\n\t\t\t})\n\t\t});\n\t}\n\treturn /* @__PURE__ */ jsx(AdaptPortalContents, {\n\t\tscope: context.adaptScope,\n\t\tchildren\n\t});\n};\nfunction PopoverPortal({ context, open, visuallyActive, zIndex, passThrough, children, onPress }) {\n\t\"use no memo\";\n\tlet content = children;\n\tif (needsRepropagation) content = /* @__PURE__ */ jsx(RepropagateParentContexts, {\n\t\t...useParentContexts(context.popoverScope),\n\t\tchildren: content\n\t});\n\treturn /* @__PURE__ */ jsxs(Portal, {\n\t\tpassThrough,\n\t\tstackZIndex: true,\n\t\tzIndex,\n\t\thidden: !visuallyActive,\n\t\tchildren: [!!open && !context.breakpointActive && !context.hoverable && /* @__PURE__ */ jsx(YStack, {\n\t\t\tposition: \"absolute\",\n\t\t\tinset: 0,\n\t\t\tonPress: composeEventHandlers(onPress, context.onOpenToggle)\n\t\t}), content]\n\t});\n}\nconst PopoverContentImpl = createRefComponent(function PopoverContentImpl2(props, forwardedRef) {\n\tconst { trapFocus, scope, onOpenAutoFocus, onCloseAutoFocus, disableOutsidePointerEvents, disableFocusScope, onEscapeKeyDown, onPointerDownOutside, onFocusOutside, onInteractOutside, children, enableRemoveScroll, freezeContentsWhenHidden, setIsFullyHidden, lazyMount, forceUnmount, forceMount, context, open, alwaysDisable, ...contentProps } = props;\n\tconst { disableDismissable } = context;\n\tconst keepChildrenMounted = context.keepChildrenMounted || forceMount;\n\tconst handleExitComplete = React.useCallback(() => {\n\t\tsetIsFullyHidden?.(true);\n\t}, [setIsFullyHidden]);\n\tlet contents = /* @__PURE__ */ jsx(ResetPresence, {\n\t\tdisable: context.breakpointActive,\n\t\tchildren\n\t});\n\tconst handleDismiss = React.useCallback(() => {\n\t\tcontext.onOpenChange(false, \"press\");\n\t}, [context]);\n\tif (!context.breakpointActive) {\n\t\tif (!alwaysDisable || !alwaysDisable.focus) contents = /* @__PURE__ */ jsx(FocusScope, {\n\t\t\tloop: trapFocus !== false,\n\t\t\tenabled: context.breakpointActive ? false : disableFocusScope ? false : open,\n\t\t\ttrapped: context.breakpointActive ? false : trapFocus,\n\t\t\tonMountAutoFocus: onOpenAutoFocus,\n\t\t\tonUnmountAutoFocus: onCloseAutoFocus === false ? void 0 : onCloseAutoFocus,\n\t\t\tchildren: contents\n\t\t});\n\t\tif (!alwaysDisable || !alwaysDisable[\"remove-scroll\"]) contents = /* @__PURE__ */ jsx(RemoveScroll, {\n\t\t\tenabled: context.breakpointActive ? false : enableRemoveScroll ? open : false,\n\t\t\tchildren: contents\n\t\t});\n\t\tif (!alwaysDisable || !alwaysDisable.dismiss) contents = /* @__PURE__ */ jsx(Dismissable, {\n\t\t\tbranches: context.branches,\n\t\t\tforceUnmount: disableDismissable || (forceUnmount ?? !open),\n\t\t\tonEscapeKeyDown,\n\t\t\tonPointerDownOutside,\n\t\t\tonFocusOutside,\n\t\t\tonInteractOutside,\n\t\t\tonDismiss: handleDismiss,\n\t\t\tchildren: contents\n\t\t});\n\t}\n\treturn /* @__PURE__ */ jsx(Animate, {\n\t\ttype: \"presence\",\n\t\tpresent: Boolean(open),\n\t\tkeepChildrenMounted: Boolean(keepChildrenMounted),\n\t\tonExitComplete: handleExitComplete,\n\t\tlazyMount,\n\t\tpassThrough: context.breakpointActive,\n\t\tchildren: /* @__PURE__ */ jsx(PopperContent, {\n\t\t\tscope,\n\t\t\t\"data-state\": getState(open),\n\t\t\tid: context.contentId,\n\t\t\tref: forwardedRef,\n\t\t\tpassThrough: context.breakpointActive,\n\t\t\t...contentProps,\n\t\t\tchildren: /* @__PURE__ */ jsx(PortalAdaptSafe, {\n\t\t\t\tcontext,\n\t\t\t\tchildren: contents\n\t\t\t})\n\t\t}, context.contentId)\n\t});\n});\nconst PopoverClose = createRefComponent(function PopoverClose2(props, forwardedRef) {\n\tconst { scope, className, ...rest } = props;\n\tconst context = usePopoverContext(scope);\n\treturn /* @__PURE__ */ jsx(YStack, {\n\t\t...rest,\n\t\tref: forwardedRef,\n\t\tclassName: `is_PopoverClose ${className || \"\"}`.trim(),\n\t\tonPress: composeEventHandlers(props.onPress, () => context?.onOpenChange?.(false, \"press\"))\n\t});\n});\nconst PopoverArrow = createStyledHOC(PopperArrowFrame, function PopoverArrow2(props, forwardedRef) {\n\tconst { scope, className, ...rest } = props;\n\tif (useAdaptIsActive(usePopoverContext(scope).adaptScope)) return null;\n\treturn /* @__PURE__ */ jsx(PopperArrow, {\n\t\tscope,\n\t\tclassName: `is_PopoverArrow ${className || \"\"}`.trim(),\n\t\t...rest,\n\t\tref: forwardedRef\n\t});\n});\nconst PopoverScrollView = createRefComponent(({ scope, ...props }, ref) => {\n\tconst context = usePopoverContext(scope);\n\treturn /* @__PURE__ */ jsx(ScrollView, {\n\t\tref,\n\t\tpointerEvents: context.breakpointActive ? \"none\" : void 0,\n\t\tscrollEnabled: !context.breakpointActive,\n\t\tpassThrough: context.breakpointActive,\n\t\t...props\n\t});\n});\nconst DEFAULT_SCOPE = \"\";\nconst Popover = withStaticProperties(createRefComponent(function Popover2({ scope = DEFAULT_SCOPE, ...props }, ref) {\n\tconst id = React.useId();\n\tconst adaptScope = `PopoverAdapt${scope}`;\n\tconst { open: openProp, defaultOpen, onOpenChange } = props;\n\tconst viaRef = React.useRef(void 0);\n\tconst [open, setOpen] = useControllableState({\n\t\tprop: openProp,\n\t\tdefaultProp: defaultOpen || false,\n\t\tonChange: (val) => {\n\t\t\tonOpenChange?.(val, viaRef.current);\n\t\t}\n\t});\n\tconst handleOpenChange = useEvent((val, via) => {\n\t\tviaRef.current = via;\n\t\tsetOpen(val);\n\t});\n\tReact.useEffect(() => {\n\t\tif (!open) return;\n\t\topenPopovers.add(setOpen);\n\t\treturn () => {\n\t\t\topenPopovers.delete(setOpen);\n\t\t};\n\t}, [open, setOpen]);\n\treturn /* @__PURE__ */ jsx(AdaptParent, {\n\t\tscope: adaptScope,\n\t\topen,\n\t\tonOpenChange: setOpen,\n\t\tchildren: /* @__PURE__ */ jsx(PopoverInner, {\n\t\t\tadaptScope,\n\t\t\tref,\n\t\t\tid,\n\t\t\tscope,\n\t\t\topen,\n\t\t\tsetOpen,\n\t\t\thandleOpenChange,\n\t\t\t...props\n\t\t})\n\t});\n}), {\n\tAnchor: PopoverAnchor,\n\tArrow: PopoverArrow,\n\tTrigger: PopoverTrigger,\n\tContent: PopoverContent,\n\tClose: PopoverClose,\n\tAdapt,\n\tScrollView: PopoverScrollView,\n\tFocusScope: FocusScopeController\n});\nconst PopoverInner = createRefComponent(function PopoverInner2(props, forwardedRef) {\n\tconst { children, open: _openProp, defaultOpen: _defaultOpen, onOpenChange: _onOpenChange, scope = DEFAULT_SCOPE, keepChildrenMounted: keepChildrenMountedProp, hoverable, disableFocus, disableDismissable, zIndex, id, adaptScope, open, setOpen, handleOpenChange, ...restProps } = props;\n\tconst triggerRef = React.useRef(null);\n\tconst [hasCustomAnchor, setHasCustomAnchor] = React.useState(false);\n\tconst [keepChildrenMounted] = useControllableState({\n\t\tprop: keepChildrenMountedProp,\n\t\tdefaultProp: false,\n\t\ttransition: keepChildrenMountedProp === \"lazy\"\n\t});\n\tconst isAdapted = useAdaptIsActive(adaptScope);\n\tconst floatingContext = useFloatingContext({\n\t\topen,\n\t\tsetOpen: handleOpenChange,\n\t\tdisable: isAdapted,\n\t\thoverable,\n\t\tdisableFocus\n\t});\n\tconst [anchorTo, setAnchorToRaw] = React.useState();\n\tconst setAnchorTo = useCreateShallowSetState(setAnchorToRaw);\n\tReact.useImperativeHandle(forwardedRef, () => ({\n\t\tanchorTo: setAnchorTo,\n\t\ttoggle: () => setOpen((prev) => !prev),\n\t\topen: () => setOpen(true),\n\t\tclose: () => setOpen(false),\n\t\tsetOpen\n\t}));\n\tconst contentId = React.useId();\n\tconst onOpenToggle = useEvent(() => {\n\t\tif (open && isAdapted) return;\n\t\tsetOpen(!open);\n\t});\n\tconst onCustomAnchorAdd = React.useCallback(() => setHasCustomAnchor(true), []);\n\tconst onCustomAnchorRemove = React.useCallback(() => setHasCustomAnchor(false), []);\n\tconst contents = /* @__PURE__ */ jsx(Popper, {\n\t\topen,\n\t\tpassThrough: isAdapted,\n\t\tscope,\n\t\tstayInFrame: true,\n\t\t...restProps,\n\t\tchildren: /* @__PURE__ */ jsx(PopoverContextProvider, {\n\t\t\tscope,\n\t\t\topen,\n\t\t\tonOpenChange: handleOpenChange,\n\t\t\tonOpenToggle,\n\t\t\ttriggerRef,\n\t\t\tid,\n\t\t\tcontentId,\n\t\t\thasCustomAnchor,\n\t\t\tonCustomAnchorAdd,\n\t\t\tonCustomAnchorRemove,\n\t\t\tanchorTo,\n\t\t\tadaptScope,\n\t\t\tbreakpointActive: isAdapted,\n\t\t\tkeepChildrenMounted,\n\t\t\tdisableDismissable,\n\t\t\thoverable,\n\t\t\tchildren\n\t\t})\n\t});\n\tlet result = /* @__PURE__ */ jsx(Fragment, { children: isWeb ? /* @__PURE__ */ jsx(FloatingOverrideContext.Provider, {\n\t\tvalue: floatingContext,\n\t\tchildren: contents\n\t}) : contents });\n\tif (zIndex !== void 0) return /* @__PURE__ */ jsx(PopoverZIndexContext.Provider, {\n\t\tvalue: zIndex,\n\t\tchildren: result\n\t});\n\treturn result;\n});\nfunction getState(open) {\n\treturn open ? \"open\" : \"closed\";\n}\n\nexport { Popover, PopoverAnchor, PopoverArrow, PopoverClose, PopoverContent, PopoverContext, PopoverContextProvider, PopoverTrigger, PopoverTriggerContext, PopoverZIndexContext, closeLastOpenedPopover, closeOpenPopovers, hasOpenPopovers, usePopoverContext, usePopoverOpen, usePopoverTriggerContext, usePopoverTriggerSetup };"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAqBA,MAAM,qBAAqB,yBAAyB;AACpD,MAAM,+BAA+B,IAAI,IAAI;AAC7C,MAAM,wBAAwB;CAC7B,OAAO,aAAa,OAAO;AAC5B;AACA,MAAM,0BAA0B;CAC/B,IAAI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