@tamagui/popper 2.7.7 → 3.0.0-beta.1091.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.
- package/dist/cjs/Popper.cjs +473 -607
- package/dist/cjs/Popper.native.cjs +498 -0
- package/dist/cjs/Popper.native.js +454 -611
- package/dist/cjs/Popper.native.js.map +1 -1
- package/dist/cjs/index.cjs +9 -11
- package/dist/cjs/index.native.cjs +20 -0
- package/dist/cjs/index.native.js +9 -10
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/useRepositionOnNative.cjs +24 -0
- package/dist/cjs/useRepositionOnNative.native.cjs +63 -0
- package/dist/cjs/useRepositionOnNative.native.js +65 -0
- package/dist/cjs/useRepositionOnNative.native.js.map +1 -0
- package/dist/esm/Popper.mjs +443 -559
- package/dist/esm/Popper.mjs.map +1 -1
- package/dist/esm/Popper.native.js +423 -559
- package/dist/esm/Popper.native.js.map +1 -1
- package/dist/esm/index.js +1 -2
- package/dist/esm/index.mjs +1 -2
- package/dist/esm/index.native.js +1 -2
- package/dist/esm/useRepositionOnNative.mjs +4 -0
- package/dist/esm/useRepositionOnNative.mjs.map +1 -0
- package/dist/esm/useRepositionOnNative.native.js +36 -0
- package/dist/esm/useRepositionOnNative.native.js.map +1 -0
- package/dist/jsx/Popper.mjs +443 -559
- package/dist/jsx/Popper.mjs.map +1 -1
- package/dist/jsx/Popper.native.cjs +498 -0
- package/dist/jsx/Popper.native.js +454 -611
- package/dist/jsx/Popper.native.js.map +1 -1
- package/dist/jsx/index.js +1 -2
- package/dist/jsx/index.mjs +1 -2
- package/dist/jsx/index.native.cjs +20 -0
- package/dist/jsx/index.native.js +9 -10
- package/dist/jsx/index.native.js.map +1 -1
- package/dist/jsx/useRepositionOnNative.mjs +4 -0
- package/dist/jsx/useRepositionOnNative.mjs.map +1 -0
- package/dist/jsx/useRepositionOnNative.native.cjs +63 -0
- package/dist/jsx/useRepositionOnNative.native.js +65 -0
- package/dist/jsx/useRepositionOnNative.native.js.map +1 -0
- package/package.json +15 -13
- package/src/Popper.tsx +44 -129
- package/src/useRepositionOnNative.native.ts +40 -0
- package/src/useRepositionOnNative.ts +8 -0
- package/types/Popper.d.ts +42 -74
- package/types/Popper.d.ts.map +1 -1
- package/types/useRepositionOnNative.d.ts +6 -0
- package/types/useRepositionOnNative.d.ts.map +1 -0
- package/types/useRepositionOnNative.native.d.ts +7 -0
- package/types/useRepositionOnNative.native.d.ts.map +1 -0
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/index.mjs.map +0 -1
- package/dist/esm/index.native.js.map +0 -1
- package/dist/jsx/index.js.map +0 -1
- package/dist/jsx/index.mjs.map +0 -1
package/dist/jsx/Popper.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["flushSync","useComposedRefs","isWeb","useIsomorphicLayoutEffect","LayoutMeasurementController","View","createStyledContext","getVariableValue","registerLayoutNode","styled","FloatingOverrideContext","arrow","flip","getOverflowAncestors","offset","platform","shift","size","useFloating","getSpace","YStack","startTransition","React","jsx","PopperContextFast","PopperPositionContext","useStyledContext","usePopperContext","Provider","PopperProviderFast","PopperContextSlow","usePopperContextSlow","PopperProviderSlow","PopperProvider","scope","children","context","fns","useRef","current","slowContext","useState","refs","triggerElements","update","a","getReferenceProps","p","onHoverReference","e","onLeaveReference","checkFloating","setupOptions","setupPopper","options","Object","assign","getSideAndAlignFromPlacement","placement","side","align","split","transformOriginMiddleware","name","fn","data","rects","middlewareData","isArrowHidden","centerOffset","arrowWidth","arrowHeight","placedSide","placedAlign","noArrowAlign","start","center","end","arrowXCenter","x","arrowYCenter","y","floating","height","width","tamaguiAutoUpdate","reference","rafId","requestAnimationFrame","cleanups","cancelAnimationFrame","HTMLElement","push","ResizeObserver","lastWidth","lastHeight","ro","entries","entry","length","contentRect","observe","disconnect","ancestors","Element","uniqueAncestors","Set","ancestor","addEventListener","passive","window","removeEventListener","forEach","Popper","props","size$1","strategy","stayInFrame","allowFlip","offset$1","disableRTL","resize","passThrough","open","arrowEl","setArrow","arrowSize","setArrowSize","offsetOptions","floatingStyle","isOpen","middlewareRef","padding","mainAxis","crossAxis","element","apply","availableHeight","availableWidth","maxHeight","maxWidth","floatingChild","firstChild","style","elements","anchorWidth","anchorHeight","contentStyle","setProperty","filter","Boolean","sameScrollView","whileElementsMounted","isRTL","middleware","useMemo","og","getFloatingProps","props2","JSON","stringify","arrowRef","arrowStyle","onArrowSize","hasFloating","transformOrigin","value","PopperAnchor","styleable","PopperAnchor2","forwardedRef","virtualRef","rest","ref","triggerId","useId","useEffect","el","add","delete","setReference","refProps","safeSetReference","useCallback","node","shouldHandleInHover","composedRefs","onMouseEnter","currentTarget","onPointerEnter","nativeEvent","onMouseLeave","PopperContentFrame","variants","unstyled","true","...size","val","tokens","space","borderRadius","radius","PopperContent","forwardRef","PopperContent2","isAnimatePosControlled","animatePosition","enableAnimationForPositionChange","animatePos","isPositioned","updateRef","lastNodeRef","safeSetFloating","isNewNode","setFloating","ourNode","contentRefs","needsMeasure","setNeedsMeasure","hasBeenPositioned","lastGoodPosition","brieflyZero","effectiveX","effectiveY","hide","disableAnimationProp","disableAnimation","setDisableAnimation","frameProps","top","left","position","opacity","transition","animateOnly","animatePresence","floatingProps","transformOriginStyle","disable","direction","PopperArrowFrame","false","borderColor","backgroundColor","defaultVariants","process","env","TAMAGUI_HEADLESS","PopperArrowOuterFrame","zIndex","pointerEvents","overflow","alignItems","justifyContent","opposites","right","bottom","PopperArrow","PopperArrow2","propsIn","sizeProp","borderWidth","arrowProps","sizeVal","bounds","Math","max","arrowPositioned","primaryPlacement","innerArrowStyle","isVertical","oppSide","rotate","borderLeftWidth","borderTopWidth","borderBottomWidth","borderRightWidth"],"sources":["Popper.mjs"],"sourcesContent":["import { flushSync } from \"react-dom\";\nimport { useComposedRefs } from \"@tamagui/compose-refs\";\nimport { isWeb, useIsomorphicLayoutEffect } from \"@tamagui/constants\";\nimport { LayoutMeasurementController, View, createStyledContext, getVariableValue, registerLayoutNode, styled } from \"@tamagui/core\";\nimport { FloatingOverrideContext, arrow, flip, getOverflowAncestors, offset, platform, shift, size, useFloating } from \"@tamagui/floating\";\nimport { getSpace } from \"@tamagui/get-token\";\nimport { YStack } from \"@tamagui/stacks\";\nimport { startTransition } from \"@tamagui/start-transition\";\nimport * as React from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\n\nconst PopperContextFast = createStyledContext({}, \"Popper__\");\nconst PopperPositionContext = createStyledContext;\nconst { useStyledContext: usePopperContext, Provider: PopperProviderFast } = PopperContextFast;\nconst PopperContextSlow = createStyledContext({}, \"PopperSlow__\");\nconst { useStyledContext: usePopperContextSlow, Provider: PopperProviderSlow } = PopperContextSlow;\nconst PopperProvider = ({ scope, children, ...context }) => {\n\tconst fns = React.useRef(context);\n\tfns.current = context;\n\tconst [slowContext] = React.useState(() => ({\n\t\trefs: context.refs,\n\t\ttriggerElements: context.triggerElements,\n\t\tupdate(...a) {\n\t\t\tfns.current.update(...a);\n\t\t},\n\t\tgetReferenceProps(p) {\n\t\t\treturn fns.current.getReferenceProps?.(p);\n\t\t},\n\t\tonHoverReference(e) {\n\t\t\tfns.current.onHoverReference?.(e);\n\t\t},\n\t\tonLeaveReference() {\n\t\t\tfns.current.onLeaveReference?.();\n\t\t}\n\t}));\n\treturn /* @__PURE__ */ jsx(PopperProviderFast, {\n\t\tscope,\n\t\t...context,\n\t\tchildren: /* @__PURE__ */ jsx(PopperProviderSlow, {\n\t\t\tscope,\n\t\t\t...slowContext,\n\t\t\tchildren\n\t\t})\n\t});\n};\nconst checkFloating = void 0;\nconst setupOptions = {};\nfunction setupPopper(options) {\n\tObject.assign(setupOptions, options);\n}\nfunction getSideAndAlignFromPlacement(placement) {\n\tconst [side, align = \"center\"] = placement.split(\"-\");\n\treturn [side, align];\n}\nconst transformOriginMiddleware = (options) => ({\n\tname: \"transformOrigin\",\n\toptions,\n\tfn(data) {\n\t\tconst { placement, rects, middlewareData } = data;\n\t\tconst isArrowHidden = middlewareData.arrow?.centerOffset !== 0;\n\t\tconst arrowWidth = isArrowHidden ? 0 : options.arrowWidth;\n\t\tconst arrowHeight = isArrowHidden ? 0 : options.arrowHeight;\n\t\tconst [placedSide, placedAlign] = getSideAndAlignFromPlacement(placement);\n\t\tconst noArrowAlign = {\n\t\t\tstart: \"0%\",\n\t\t\tcenter: \"50%\",\n\t\t\tend: \"100%\"\n\t\t}[placedAlign];\n\t\tconst arrowXCenter = (middlewareData.arrow?.x ?? 0) + arrowWidth / 2;\n\t\tconst arrowYCenter = (middlewareData.arrow?.y ?? 0) + arrowHeight / 2;\n\t\tlet x = \"\";\n\t\tlet y = \"\";\n\t\tif (placedSide === \"bottom\") {\n\t\t\tx = isArrowHidden ? noArrowAlign : `${arrowXCenter}px`;\n\t\t\ty = `${-arrowHeight}px`;\n\t\t} else if (placedSide === \"top\") {\n\t\t\tx = isArrowHidden ? noArrowAlign : `${arrowXCenter}px`;\n\t\t\ty = `${rects.floating.height + arrowHeight}px`;\n\t\t} else if (placedSide === \"right\") {\n\t\t\tx = `${-arrowHeight}px`;\n\t\t\ty = isArrowHidden ? noArrowAlign : `${arrowYCenter}px`;\n\t\t} else if (placedSide === \"left\") {\n\t\t\tx = `${rects.floating.width + arrowHeight}px`;\n\t\t\ty = isArrowHidden ? noArrowAlign : `${arrowYCenter}px`;\n\t\t}\n\t\treturn { data: {\n\t\t\tx,\n\t\t\ty\n\t\t} };\n\t}\n});\nfunction tamaguiAutoUpdate(reference, floating, update) {\n\tupdate();\n\tlet rafId = requestAnimationFrame(() => {\n\t\tupdate();\n\t\trafId = 0;\n\t});\n\tconst cleanups = [() => {\n\t\tif (rafId) cancelAnimationFrame(rafId);\n\t}];\n\tif (reference instanceof HTMLElement) cleanups.push(registerLayoutNode(reference, update));\n\tif (typeof ResizeObserver !== \"undefined\") {\n\t\tlet lastWidth = -1;\n\t\tlet lastHeight = -1;\n\t\tconst ro = new ResizeObserver((entries) => {\n\t\t\tconst entry = entries[entries.length - 1];\n\t\t\tif (!entry) return;\n\t\t\tconst { width, height } = entry.contentRect;\n\t\t\tif (lastWidth === -1) {\n\t\t\t\tlastWidth = width;\n\t\t\t\tlastHeight = height;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (width !== lastWidth || height !== lastHeight) {\n\t\t\t\tlastWidth = width;\n\t\t\t\tlastHeight = height;\n\t\t\t\tupdate();\n\t\t\t}\n\t\t});\n\t\tro.observe(floating);\n\t\tcleanups.push(() => ro.disconnect());\n\t}\n\tconst ancestors = [...reference instanceof Element ? getOverflowAncestors(reference) : [], ...getOverflowAncestors(floating)];\n\tconst uniqueAncestors = [...new Set(ancestors)];\n\tfor (const ancestor of uniqueAncestors) ancestor.addEventListener(\"scroll\", update, { passive: true });\n\twindow.addEventListener(\"resize\", update);\n\tcleanups.push(() => {\n\t\tfor (const ancestor of uniqueAncestors) ancestor.removeEventListener(\"scroll\", update);\n\t\twindow.removeEventListener(\"resize\", update);\n\t});\n\treturn () => cleanups.forEach((fn) => fn());\n}\nfunction Popper(props) {\n\tconst { children, size: size$1, strategy = \"absolute\", placement = \"bottom\", stayInFrame, allowFlip, offset: offset$1, disableRTL, resize, passThrough, open, scope } = props;\n\tconst [arrowEl, setArrow] = React.useState(null);\n\tconst [arrowSize, setArrowSize] = React.useState(0);\n\tconst offsetOptions = offset$1 ?? arrowSize;\n\tconst floatingStyle = React.useRef({});\n\tconst isOpen = passThrough ? false : open ?? true;\n\tconst middlewareRef = React.useRef([]);\n\tif (isOpen) middlewareRef.current = [\n\t\ttypeof offsetOptions !== \"undefined\" ? offset(offsetOptions) : null,\n\t\tallowFlip ? flip(typeof allowFlip === \"boolean\" ? {} : allowFlip) : null,\n\t\tstayInFrame ? shift({\n\t\t\tpadding: 10,\n\t\t\tmainAxis: true,\n\t\t\tcrossAxis: false,\n\t\t\t...typeof stayInFrame === \"object\" ? stayInFrame : null\n\t\t}) : null,\n\t\tarrowEl ? arrow({ element: arrowEl }) : null,\n\t\tcheckFloating,\n\t\tresize ? size({\n\t\t\tpadding: typeof stayInFrame === \"object\" ? stayInFrame.padding : 10,\n\t\t\tapply({ availableHeight, availableWidth }) {\n\t\t\t\tif (passThrough) return;\n\t\t\t\tObject.assign(floatingStyle.current, {\n\t\t\t\t\tmaxHeight: `${availableHeight}px`,\n\t\t\t\t\tmaxWidth: `${availableWidth}px`\n\t\t\t\t});\n\t\t\t\tconst floatingChild = floating.refs.floating.current?.firstChild;\n\t\t\t\tif (floatingChild && floatingChild instanceof HTMLElement) Object.assign(floatingChild.style, floatingStyle.current);\n\t\t\t},\n\t\t\t...typeof resize === \"object\" && resize\n\t\t}) : null,\n\t\tsize({ apply({ elements, rects, availableWidth, availableHeight }) {\n\t\t\tconst { width: anchorWidth, height: anchorHeight } = rects.reference;\n\t\t\tconst contentStyle = elements.floating.style;\n\t\t\tcontentStyle.setProperty(\"--tamagui-popper-available-width\", `${availableWidth}px`);\n\t\t\tcontentStyle.setProperty(\"--tamagui-popper-available-height\", `${availableHeight}px`);\n\t\t\tcontentStyle.setProperty(\"--tamagui-popper-anchor-width\", `${anchorWidth}px`);\n\t\t\tcontentStyle.setProperty(\"--tamagui-popper-anchor-height\", `${anchorHeight}px`);\n\t\t} }),\n\t\ttransformOriginMiddleware({\n\t\t\tarrowHeight: arrowSize,\n\t\t\tarrowWidth: arrowSize\n\t\t})\n\t].filter(Boolean);\n\tlet floating = useFloating({\n\t\topen: isOpen,\n\t\tstrategy,\n\t\tplacement,\n\t\tsameScrollView: false,\n\t\twhileElementsMounted: !isOpen ? void 0 : tamaguiAutoUpdate,\n\t\tplatform: disableRTL ?? setupOptions.disableRTL ? {\n\t\t\t...platform,\n\t\t\tisRTL(element) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} : platform,\n\t\tmiddleware: middlewareRef.current\n\t});\n\tfloating = React.useMemo(() => {\n\t\tconst og = floating.getFloatingProps;\n\t\tif (resize && og) floating.getFloatingProps = (props2) => {\n\t\t\treturn og({\n\t\t\t\t...props2,\n\t\t\t\tstyle: {\n\t\t\t\t\t...props2.style,\n\t\t\t\t\t...floatingStyle.current\n\t\t\t\t}\n\t\t\t});\n\t\t};\n\t\treturn floating;\n\t}, [floating, resize ? JSON.stringify(resize) : null]);\n\tconst { middlewareData } = floating;\n\treturn /* @__PURE__ */ jsx(PopperProvider, {\n\t\tscope,\n\t\t...React.useMemo(() => {\n\t\t\treturn {\n\t\t\t\tsize: size$1,\n\t\t\t\tarrowRef: setArrow,\n\t\t\t\tarrowStyle: middlewareData.arrow,\n\t\t\t\tonArrowSize: setArrowSize,\n\t\t\t\thasFloating: middlewareData.checkFloating?.hasFloating,\n\t\t\t\ttransformOrigin: middlewareData.transformOrigin,\n\t\t\t\topen: !!open,\n\t\t\t\t...floating\n\t\t\t};\n\t\t}, [\n\t\t\topen,\n\t\t\tsize$1,\n\t\t\tfloating,\n\t\t\tJSON.stringify(middlewareData.arrow || null),\n\t\t\tJSON.stringify(middlewareData.transformOrigin || null)\n\t\t]),\n\t\tchildren: /* @__PURE__ */ jsx(FloatingOverrideContext.Provider, {\n\t\t\tvalue: null,\n\t\t\tchildren\n\t\t})\n\t});\n}\nconst PopperAnchor = YStack.styleable(function PopperAnchor2(props, forwardedRef) {\n\tconst { virtualRef, scope, ...rest } = props;\n\tconst context = usePopperContextSlow(scope);\n\tconst { getReferenceProps, refs, update } = context;\n\tconst ref = React.useRef(null);\n\tconst triggerId = React.useId();\n\tReact.useEffect(() => {\n\t\tif (!scope || !context.triggerElements || !ref.current) return;\n\t\tif (!(ref.current instanceof Element)) return;\n\t\tconst el = ref.current;\n\t\tcontext.triggerElements.add(triggerId, el);\n\t\treturn () => {\n\t\t\tcontext.triggerElements?.delete(triggerId);\n\t\t};\n\t}, [\n\t\tscope,\n\t\ttriggerId,\n\t\tcontext.triggerElements\n\t]);\n\tReact.useEffect(() => {\n\t\tif (virtualRef) {\n\t\t\trefs.setReference(virtualRef.current);\n\t\t\tupdate();\n\t\t}\n\t}, [virtualRef]);\n\tconst refProps = getReferenceProps?.({\n\t\t...rest,\n\t\tref\n\t}) || null;\n\tconst safeSetReference = React.useCallback((node) => {\n\t\tstartTransition(() => {\n\t\t\trefs.setReference(node);\n\t\t});\n\t}, [refs]);\n\tconst shouldHandleInHover = isWeb && scope;\n\tconst composedRefs = useComposedRefs(forwardedRef, ref, shouldHandleInHover ? void 0 : safeSetReference);\n\treturn /* @__PURE__ */ jsx(View, {\n\t\t...rest,\n\t\t...refProps,\n\t\tref: composedRefs,\n\t\t...shouldHandleInHover && {\n\t\t\tonMouseEnter: (e) => {\n\t\t\t\tconst el = e.currentTarget ?? ref.current;\n\t\t\t\tif (el instanceof HTMLElement) {\n\t\t\t\t\tflushSync(() => refs.setReference(el));\n\t\t\t\t\tupdate();\n\t\t\t\t\tif (!refProps) return;\n\t\t\t\t\trefProps.onPointerEnter?.(e);\n\t\t\t\t\tcontext.onHoverReference?.(e.nativeEvent);\n\t\t\t\t}\n\t\t\t},\n\t\t\tonMouseLeave: (e) => {\n\t\t\t\tcontext.onLeaveReference?.();\n\t\t\t\trefProps?.onMouseLeave?.(e);\n\t\t\t}\n\t\t}\n\t});\n});\nconst PopperContentFrame = styled(YStack, {\n\tname: \"PopperContent\",\n\tvariants: {\n\t\tunstyled: { true: {} },\n\t\tsize: { \"...size\": (val, { tokens }) => {\n\t\t\treturn {\n\t\t\t\tpadding: tokens.space[val],\n\t\t\t\tborderRadius: tokens.radius[val]\n\t\t\t};\n\t\t} }\n\t}\n});\nconst PopperContent = React.forwardRef(function PopperContent2(props, forwardedRef) {\n\tconst isAnimatePosControlled = \"animatePosition\" in props || \"enableAnimationForPositionChange\" in props;\n\tconst { scope, animatePosition, enableAnimationForPositionChange, children, passThrough, unstyled, ...rest } = props;\n\tconst animatePos = animatePosition ?? enableAnimationForPositionChange;\n\tconst context = usePopperContext(scope);\n\tconst { strategy, placement, refs, x, y, getFloatingProps, size, isPositioned, transformOrigin, update } = context;\n\tconst updateRef = React.useRef(update);\n\tupdateRef.current = update;\n\tconst lastNodeRef = React.useRef(null);\n\tconst safeSetFloating = React.useCallback((node) => {\n\t\tconst isNewNode = node !== lastNodeRef.current;\n\t\tif (node) {\n\t\t\tlastNodeRef.current = node;\n\t\t\trefs.setFloating(node);\n\t\t\tif (!isNewNode) updateRef.current?.();\n\t\t}\n\t}, [refs.setFloating]);\n\tReact.useEffect(() => {\n\t\treturn () => {\n\t\t\tconst ourNode = lastNodeRef.current;\n\t\t\tif (ourNode && refs.floating.current === ourNode) refs.setFloating(null);\n\t\t\tlastNodeRef.current = null;\n\t\t};\n\t}, []);\n\tconst contentRefs = useComposedRefs(safeSetFloating, forwardedRef);\n\tconst [needsMeasure, setNeedsMeasure] = React.useState(animatePos);\n\tuseIsomorphicLayoutEffect(() => {\n\t\tif (needsMeasure && x && y) setNeedsMeasure(false);\n\t}, [\n\t\tneedsMeasure,\n\t\tanimatePos,\n\t\tx,\n\t\ty\n\t]);\n\tconst hasBeenPositioned = React.useRef(false);\n\tconst lastGoodPosition = React.useRef({\n\t\tx: 0,\n\t\ty: 0\n\t});\n\tif (x !== 0 || y !== 0) {\n\t\tlastGoodPosition.current = {\n\t\t\tx,\n\t\t\ty\n\t\t};\n\t\tif (isPositioned) hasBeenPositioned.current = true;\n\t}\n\tconst brieflyZero = hasBeenPositioned.current && x === 0 && y === 0;\n\tconst effectiveX = brieflyZero ? lastGoodPosition.current.x : x;\n\tconst effectiveY = brieflyZero ? lastGoodPosition.current.y : y;\n\tconst hide = !hasBeenPositioned.current && effectiveX === 0 && effectiveY === 0;\n\tconst disableAnimationProp = animatePos === \"even-when-repositioning\" ? needsMeasure : !hasBeenPositioned.current && !isPositioned || needsMeasure;\n\tconst [disableAnimation, setDisableAnimation] = React.useState(disableAnimationProp);\n\tReact.useEffect(() => {\n\t\tsetDisableAnimation(disableAnimationProp);\n\t}, [disableAnimationProp]);\n\tconst frameProps = {\n\t\tref: contentRefs,\n\t\t...hide ? {} : {\n\t\t\tx: effectiveX || 0,\n\t\t\ty: effectiveY || 0\n\t\t},\n\t\ttop: 0,\n\t\tleft: 0,\n\t\tposition: strategy,\n\t\topacity: hide ? 0 : 1,\n\t\t...isAnimatePosControlled && {\n\t\t\ttransition: animatePos ? rest.transition : void 0,\n\t\t\tanimateOnly: animatePos && !disableAnimation ? rest.animateOnly : [],\n\t\t\tanimatePresence: false\n\t\t}\n\t};\n\tconst { style, ...floatingProps } = getFloatingProps ? getFloatingProps(frameProps) : frameProps;\n\tconst transformOriginStyle = isWeb && transformOrigin ? { transformOrigin: `${transformOrigin.x} ${transformOrigin.y}` } : void 0;\n\treturn /* @__PURE__ */ jsx(LayoutMeasurementController, {\n\t\tdisable: !context.open,\n\t\tchildren: /* @__PURE__ */ jsx(View, {\n\t\t\tpassThrough,\n\t\t\tref: contentRefs,\n\t\t\tdirection: rest.direction,\n\t\t\t...passThrough ? null : floatingProps,\n\t\t\t...!passThrough && animatePos && { \"data-popper-animate-position\": \"true\" },\n\t\t\tchildren: /* @__PURE__ */ jsx(PopperContentFrame, {\n\t\t\t\tpassThrough,\n\t\t\t\tunstyled,\n\t\t\t\t...!passThrough && {\n\t\t\t\t\t\"data-placement\": placement,\n\t\t\t\t\t\"data-strategy\": strategy,\n\t\t\t\t\tsize,\n\t\t\t\t\t...style,\n\t\t\t\t\t...transformOriginStyle,\n\t\t\t\t\t...rest\n\t\t\t\t},\n\t\t\t\tchildren\n\t\t\t}, \"popper-content-frame\")\n\t\t})\n\t});\n});\nconst PopperArrowFrame = styled(YStack, {\n\tname: \"PopperArrow\",\n\tvariants: { unstyled: { false: {\n\t\tborderColor: \"$borderColor\",\n\t\tbackgroundColor: \"$background\",\n\t\tposition: \"relative\"\n\t} } },\n\tdefaultVariants: { unstyled: process.env.TAMAGUI_HEADLESS === \"1\" }\n});\nconst PopperArrowOuterFrame = styled(YStack, {\n\tname: \"PopperArrowOuter\",\n\tvariants: { unstyled: { false: {\n\t\tposition: \"absolute\",\n\t\tzIndex: 1e6,\n\t\tpointerEvents: \"none\",\n\t\toverflow: \"hidden\",\n\t\talignItems: \"center\",\n\t\tjustifyContent: \"center\"\n\t} } },\n\tdefaultVariants: { unstyled: process.env.TAMAGUI_HEADLESS === \"1\" }\n});\nconst opposites = {\n\ttop: \"bottom\",\n\tright: \"left\",\n\tbottom: \"top\",\n\tleft: \"right\"\n};\nconst PopperArrow = React.forwardRef(function PopperArrow2(propsIn, forwardedRef) {\n\tconst isAnimatePosControlled = \"animatePosition\" in propsIn;\n\tconst { scope, animatePosition, transition, ...rest } = propsIn;\n\tconst { offset, size: sizeProp, borderWidth = 0, ...arrowProps } = rest;\n\tconst context = usePopperContext(scope);\n\tconst sizeVal = typeof sizeProp === \"number\" ? sizeProp : getVariableValue(getSpace(sizeProp ?? context.size, {\n\t\tshift: -2,\n\t\tbounds: [2]\n\t}));\n\tconst size = Math.max(0, +sizeVal);\n\tconst { placement } = context;\n\tconst refs = useComposedRefs(context.arrowRef, forwardedRef);\n\tconst x = context.arrowStyle?.x || 0;\n\tconst y = context.arrowStyle?.y || 0;\n\tconst arrowPositioned = context.arrowStyle != null;\n\tconst primaryPlacement = placement ? placement.split(\"-\")[0] : \"top\";\n\tconst arrowStyle = {\n\t\tx,\n\t\ty,\n\t\twidth: size,\n\t\theight: size\n\t};\n\tconst innerArrowStyle = {};\n\tconst isVertical = primaryPlacement === \"bottom\" || primaryPlacement === \"top\";\n\tif (primaryPlacement) {\n\t\tarrowStyle[isVertical ? \"width\" : \"height\"] = size * 2;\n\t\tconst oppSide = opposites[primaryPlacement];\n\t\tif (oppSide) {\n\t\t\tarrowStyle[oppSide] = -size;\n\t\t\tinnerArrowStyle[oppSide] = size / 2;\n\t\t}\n\t\tif (oppSide === \"top\" || oppSide === \"bottom\") arrowStyle.left = 0;\n\t\tif (oppSide === \"left\" || oppSide === \"right\") arrowStyle.top = 0;\n\t\tuseIsomorphicLayoutEffect(() => {\n\t\t\tcontext.onArrowSize?.(size);\n\t\t}, [size, context.onArrowSize]);\n\t}\n\treturn /* @__PURE__ */ jsx(PopperArrowOuterFrame, {\n\t\tref: refs,\n\t\t...arrowStyle,\n\t\t...!arrowPositioned && { opacity: 0 },\n\t\t...isAnimatePosControlled && {\n\t\t\ttransition: animatePosition ? transition : void 0,\n\t\t\tanimateOnly: animatePosition ? [\"transform\"] : [],\n\t\t\tanimatePresence: false\n\t\t},\n\t\tchildren: /* @__PURE__ */ jsx(PopperArrowFrame, {\n\t\t\twidth: size,\n\t\t\theight: size,\n\t\t\t...arrowProps,\n\t\t\t...innerArrowStyle,\n\t\t\trotate: \"45deg\",\n\t\t\t...primaryPlacement === \"bottom\" && {\n\t\t\t\tborderLeftWidth: borderWidth,\n\t\t\t\tborderTopWidth: borderWidth\n\t\t\t},\n\t\t\t...primaryPlacement === \"top\" && {\n\t\t\t\tborderBottomWidth: borderWidth,\n\t\t\t\tborderRightWidth: borderWidth\n\t\t\t},\n\t\t\t...primaryPlacement === \"right\" && {\n\t\t\t\tborderLeftWidth: borderWidth,\n\t\t\t\tborderBottomWidth: borderWidth\n\t\t\t},\n\t\t\t...primaryPlacement === \"left\" && {\n\t\t\t\tborderTopWidth: borderWidth,\n\t\t\t\tborderRightWidth: borderWidth\n\t\t\t}\n\t\t})\n\t});\n});\n\nexport { Popper, PopperAnchor, PopperArrow, PopperArrowFrame, PopperContent, PopperContentFrame, PopperContextFast, PopperContextSlow, PopperPositionContext, PopperProvider, PopperProviderFast, PopperProviderSlow, setupPopper, usePopperContext, usePopperContextSlow };"],"mappings":"AAAA,SAASA,SAAS,QAAQ,WAAW;AACrC,SAASC,eAAe,QAAQ,uBAAuB;AACvD,SAASC,KAAK,EAAEC,yBAAyB,QAAQ,oBAAoB;AACrE,SAASC,2BAA2B,EAAEC,IAAI,EAAEC,mBAAmB,EAAEC,gBAAgB,EAAEC,kBAAkB,EAAEC,MAAM,QAAQ,eAAe;AACpI,SAASC,uBAAuB,EAAEC,KAAK,EAAEC,IAAI,EAAEC,oBAAoB,EAAEC,MAAM,EAAEC,QAAQ,EAAEC,KAAK,EA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C5Bc,iBAAiB,EAAEd;MACpB,CAAC;MACD,IAAGO,gBAAgB,KAAK,MAAM,IAAI;QACjCM,cAAc,EAAEb,WAAW;QAC3Be,gBAAgB,EAAEf;MACnB,CAAC;IACF,CAAC;EACF,CAAC,CAAC;AACH,CAAC,CAAC;AAEF,SAASpJ,MAAM,EAAEsD,YAAY,EAAE0F,WAAW,EAAEjB,gBAAgB,EAAEtC,aAAa,EAAEV,kBAAkB,EAAExK,iBAAiB,EAAEM,iBAAiB,EAAEL,qBAAqB,EAAEQ,cAAc,EAAEJ,kBAAkB,EAAEG,kBAAkB,EAAEqB,WAAW,EAAE1B,gBAAgB,EAAEI,oBAAoB","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"Popper.js","names":[],"sources":["jsx/Popper.js"],"sourcesContent":["import { flushSync } from \"react-dom\";\nimport { useComposedRefs } from \"@tamagui/compose-refs\";\nimport { isWeb, useIsomorphicLayoutEffect } from \"@tamagui/constants\";\nimport { LayoutMeasurementController, View, createRefComponent, createStyledContext, createStyledHOC, getVariableValue, registerLayoutNode, styled } from \"@tamagui/core\";\nimport { FloatingOverrideContext, arrow, flip, getOverflowAncestors, offset, platform, shift, size, useFloating } from \"@tamagui/floating\";\nimport { getSize } from \"@tamagui/get-token\";\nimport { startTransition } from \"@tamagui/start-transition\";\nimport * as React from \"react\";\nimport { useRepositionOnNative } from \"./useRepositionOnNative\";\nimport { jsx } from \"react/jsx-runtime\";\n\nconst PopperContextFast = createStyledContext({}, \"Popper__\");\nconst PopperPositionContext = createStyledContext;\nconst { useStyledContext: usePopperContext, Provider: PopperProviderFast } = PopperContextFast;\nconst PopperContextSlow = createStyledContext({}, \"PopperSlow__\");\nconst { useStyledContext: usePopperContextSlow, Provider: PopperProviderSlow } = PopperContextSlow;\nconst PopperProvider = ({ scope, children, ...context }) => {\n\tconst fns = React.useRef(context);\n\tfns.current = context;\n\tconst [slowContext] = React.useState(() => ({\n\t\trefs: context.refs,\n\t\ttriggerElements: context.triggerElements,\n\t\tupdate(...a) {\n\t\t\tfns.current.update(...a);\n\t\t},\n\t\tgetReferenceProps(p) {\n\t\t\treturn fns.current.getReferenceProps?.(p);\n\t\t},\n\t\tonHoverReference(e) {\n\t\t\tfns.current.onHoverReference?.(e);\n\t\t},\n\t\tonLeaveReference() {\n\t\t\tfns.current.onLeaveReference?.();\n\t\t}\n\t}));\n\treturn /* @__PURE__ */ jsx(PopperProviderFast, {\n\t\tscope,\n\t\t...context,\n\t\tchildren: /* @__PURE__ */ jsx(PopperProviderSlow, {\n\t\t\tscope,\n\t\t\t...slowContext,\n\t\t\tchildren\n\t\t})\n\t});\n};\nconst checkFloating = void 0;\nconst setupOptions = {};\nfunction setupPopper(options) {\n\tObject.assign(setupOptions, options);\n}\nfunction getSideAndAlignFromPlacement(placement) {\n\tconst [side, align = \"center\"] = placement.split(\"-\");\n\treturn [side, align];\n}\nconst transformOriginMiddleware = (options) => ({\n\tname: \"transformOrigin\",\n\toptions,\n\tfn(data) {\n\t\tconst { placement, rects, middlewareData } = data;\n\t\tconst isArrowHidden = middlewareData.arrow?.centerOffset !== 0;\n\t\tconst arrowWidth = isArrowHidden ? 0 : options.arrowWidth;\n\t\tconst arrowHeight = isArrowHidden ? 0 : options.arrowHeight;\n\t\tconst [placedSide, placedAlign] = getSideAndAlignFromPlacement(placement);\n\t\tconst noArrowAlign = {\n\t\t\tstart: \"0%\",\n\t\t\tcenter: \"50%\",\n\t\t\tend: \"100%\"\n\t\t}[placedAlign];\n\t\tconst arrowXCenter = (middlewareData.arrow?.x ?? 0) + arrowWidth / 2;\n\t\tconst arrowYCenter = (middlewareData.arrow?.y ?? 0) + arrowHeight / 2;\n\t\tlet x = \"\";\n\t\tlet y = \"\";\n\t\tif (placedSide === \"bottom\") {\n\t\t\tx = isArrowHidden ? noArrowAlign : `${arrowXCenter}px`;\n\t\t\ty = `${-arrowHeight}px`;\n\t\t} else if (placedSide === \"top\") {\n\t\t\tx = isArrowHidden ? noArrowAlign : `${arrowXCenter}px`;\n\t\t\ty = `${rects.floating.height + arrowHeight}px`;\n\t\t} else if (placedSide === \"right\") {\n\t\t\tx = `${-arrowHeight}px`;\n\t\t\ty = isArrowHidden ? noArrowAlign : `${arrowYCenter}px`;\n\t\t} else if (placedSide === \"left\") {\n\t\t\tx = `${rects.floating.width + arrowHeight}px`;\n\t\t\ty = isArrowHidden ? noArrowAlign : `${arrowYCenter}px`;\n\t\t}\n\t\treturn { data: {\n\t\t\tx,\n\t\t\ty\n\t\t} };\n\t}\n});\nfunction tamaguiAutoUpdate(reference, floating, update) {\n\tupdate();\n\tlet rafId = requestAnimationFrame(() => {\n\t\tupdate();\n\t\trafId = 0;\n\t});\n\tconst cleanups = [() => {\n\t\tif (rafId) cancelAnimationFrame(rafId);\n\t}];\n\tif (reference instanceof HTMLElement) cleanups.push(registerLayoutNode(reference, update));\n\tif (typeof ResizeObserver !== \"undefined\") {\n\t\tlet lastWidth = -1;\n\t\tlet lastHeight = -1;\n\t\tconst ro = new ResizeObserver((entries) => {\n\t\t\tconst entry = entries[entries.length - 1];\n\t\t\tif (!entry) return;\n\t\t\tconst { width, height } = entry.contentRect;\n\t\t\tif (lastWidth === -1) {\n\t\t\t\tlastWidth = width;\n\t\t\t\tlastHeight = height;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (width !== lastWidth || height !== lastHeight) {\n\t\t\t\tlastWidth = width;\n\t\t\t\tlastHeight = height;\n\t\t\t\tupdate();\n\t\t\t}\n\t\t});\n\t\tro.observe(floating);\n\t\tcleanups.push(() => ro.disconnect());\n\t}\n\tconst ancestors = [...reference instanceof Element ? getOverflowAncestors(reference) : [], ...getOverflowAncestors(floating)];\n\tconst uniqueAncestors = [...new Set(ancestors)];\n\tfor (const ancestor of uniqueAncestors) ancestor.addEventListener(\"scroll\", update, { passive: true });\n\twindow.addEventListener(\"resize\", update);\n\tcleanups.push(() => {\n\t\tfor (const ancestor of uniqueAncestors) ancestor.removeEventListener(\"scroll\", update);\n\t\twindow.removeEventListener(\"resize\", update);\n\t});\n\treturn () => cleanups.forEach((fn) => fn());\n}\nfunction Popper(props) {\n\tconst { children, size: size$1, strategy = \"absolute\", placement = \"bottom\", stayInFrame, allowFlip, offset: offset$1, disableRTL, resize, passThrough, open, scope } = props;\n\tconst [arrowEl, setArrow] = React.useState(null);\n\tconst [arrowSize, setArrowSize] = React.useState(0);\n\tconst offsetOptions = offset$1 ?? arrowSize;\n\tconst floatingStyle = React.useRef({});\n\tconst isOpen = passThrough ? false : open ?? true;\n\tconst middlewareRef = React.useRef([]);\n\tif (isOpen) middlewareRef.current = [\n\t\ttypeof offsetOptions !== \"undefined\" ? offset(offsetOptions) : null,\n\t\tallowFlip ? flip(typeof allowFlip === \"boolean\" ? {} : allowFlip) : null,\n\t\tstayInFrame ? shift({\n\t\t\tpadding: 10,\n\t\t\tmainAxis: true,\n\t\t\tcrossAxis: false,\n\t\t\t...typeof stayInFrame === \"object\" ? stayInFrame : null\n\t\t}) : null,\n\t\tarrowEl ? arrow({ element: arrowEl }) : null,\n\t\tcheckFloating,\n\t\tresize ? size({\n\t\t\tpadding: typeof stayInFrame === \"object\" ? stayInFrame.padding : 10,\n\t\t\tapply({ availableHeight, availableWidth }) {\n\t\t\t\tif (passThrough) return;\n\t\t\t\tObject.assign(floatingStyle.current, {\n\t\t\t\t\tmaxHeight: `${availableHeight}px`,\n\t\t\t\t\tmaxWidth: `${availableWidth}px`\n\t\t\t\t});\n\t\t\t\tconst floatingChild = floating.refs.floating.current?.firstChild;\n\t\t\t\tif (floatingChild && floatingChild instanceof HTMLElement) Object.assign(floatingChild.style, floatingStyle.current);\n\t\t\t},\n\t\t\t...typeof resize === \"object\" && resize\n\t\t}) : null,\n\t\tsize({ apply({ elements, rects, availableWidth, availableHeight }) {\n\t\t\tconst { width: anchorWidth, height: anchorHeight } = rects.reference;\n\t\t\tconst contentStyle = elements.floating.style;\n\t\t\tcontentStyle.setProperty(\"--tamagui-popper-available-width\", `${availableWidth}px`);\n\t\t\tcontentStyle.setProperty(\"--tamagui-popper-available-height\", `${availableHeight}px`);\n\t\t\tcontentStyle.setProperty(\"--tamagui-popper-anchor-width\", `${anchorWidth}px`);\n\t\t\tcontentStyle.setProperty(\"--tamagui-popper-anchor-height\", `${anchorHeight}px`);\n\t\t} }),\n\t\ttransformOriginMiddleware({\n\t\t\tarrowHeight: arrowSize,\n\t\t\tarrowWidth: arrowSize\n\t\t})\n\t].filter(Boolean);\n\tlet floating = useFloating({\n\t\topen: isOpen,\n\t\tstrategy,\n\t\tplacement,\n\t\tsameScrollView: false,\n\t\twhileElementsMounted: !isOpen ? void 0 : tamaguiAutoUpdate,\n\t\tplatform: disableRTL ?? setupOptions.disableRTL ? {\n\t\t\t...platform,\n\t\t\tisRTL(element) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} : platform,\n\t\tmiddleware: middlewareRef.current\n\t});\n\tfloating = React.useMemo(() => {\n\t\tconst og = floating.getFloatingProps;\n\t\tif (resize && og) floating.getFloatingProps = (props2) => {\n\t\t\treturn og({\n\t\t\t\t...props2,\n\t\t\t\tstyle: {\n\t\t\t\t\t...props2.style,\n\t\t\t\t\t...floatingStyle.current\n\t\t\t\t}\n\t\t\t});\n\t\t};\n\t\treturn floating;\n\t}, [floating, resize ? JSON.stringify(resize) : null]);\n\tconst { middlewareData } = floating;\n\tuseRepositionOnNative(floating.update, passThrough);\n\treturn /* @__PURE__ */ jsx(PopperProvider, {\n\t\tscope,\n\t\t...React.useMemo(() => {\n\t\t\treturn {\n\t\t\t\tsize: size$1,\n\t\t\t\tarrowRef: setArrow,\n\t\t\t\tarrowStyle: middlewareData.arrow,\n\t\t\t\tonArrowSize: setArrowSize,\n\t\t\t\thasFloating: middlewareData.checkFloating?.hasFloating,\n\t\t\t\ttransformOrigin: middlewareData.transformOrigin,\n\t\t\t\topen: !!open,\n\t\t\t\t...floating\n\t\t\t};\n\t\t}, [\n\t\t\topen,\n\t\t\tsize$1,\n\t\t\tfloating,\n\t\t\tJSON.stringify(middlewareData.arrow || null),\n\t\t\tJSON.stringify(middlewareData.transformOrigin || null)\n\t\t]),\n\t\tchildren: /* @__PURE__ */ jsx(FloatingOverrideContext.Provider, {\n\t\t\tvalue: null,\n\t\t\tchildren\n\t\t})\n\t});\n}\nconst PopperAnchor = createStyledHOC(View, function PopperAnchor2(props, forwardedRef) {\n\tconst { virtualRef, scope, ...rest } = props;\n\tconst context = usePopperContextSlow(scope);\n\tconst { getReferenceProps, refs, update } = context;\n\tconst ref = React.useRef(null);\n\tconst triggerId = React.useId();\n\tReact.useEffect(() => {\n\t\tif (!scope || !context.triggerElements || !ref.current) return;\n\t\tif (!(ref.current instanceof Element)) return;\n\t\tconst el = ref.current;\n\t\tcontext.triggerElements.add(triggerId, el);\n\t\treturn () => {\n\t\t\tcontext.triggerElements?.delete(triggerId);\n\t\t};\n\t}, [\n\t\tscope,\n\t\ttriggerId,\n\t\tcontext.triggerElements\n\t]);\n\tReact.useEffect(() => {\n\t\tif (virtualRef) {\n\t\t\trefs.setReference(virtualRef.current);\n\t\t\tupdate();\n\t\t}\n\t}, [virtualRef]);\n\tconst refProps = getReferenceProps?.({\n\t\t...rest,\n\t\tref\n\t}) || null;\n\tconst safeSetReference = React.useCallback((node) => {\n\t\tstartTransition(() => {\n\t\t\trefs.setReference(node);\n\t\t});\n\t}, [refs]);\n\tconst shouldHandleInHover = isWeb && scope;\n\tconst composedRefs = useComposedRefs(forwardedRef, ref, shouldHandleInHover ? void 0 : safeSetReference);\n\treturn /* @__PURE__ */ jsx(View, {\n\t\t...rest,\n\t\t...refProps,\n\t\tref: composedRefs,\n\t\t...shouldHandleInHover && {\n\t\t\tonMouseEnter: (e) => {\n\t\t\t\tconst el = e.currentTarget ?? ref.current;\n\t\t\t\tif (el instanceof HTMLElement) {\n\t\t\t\t\tflushSync(() => refs.setReference(el));\n\t\t\t\t\tupdate();\n\t\t\t\t\tif (!refProps) return;\n\t\t\t\t\trefProps.onPointerEnter?.(e);\n\t\t\t\t\tcontext.onHoverReference?.(e.nativeEvent);\n\t\t\t\t}\n\t\t\t},\n\t\t\tonMouseLeave: (e) => {\n\t\t\t\tcontext.onLeaveReference?.();\n\t\t\t\trefProps?.onMouseLeave?.(e);\n\t\t\t}\n\t\t}\n\t});\n});\nconst PopperContentFrame = styled(View, { displayName: \"PopperContent\" });\nconst PopperContent = createRefComponent(function PopperContent2(props, forwardedRef) {\n\tconst isAnimatePosControlled = \"animatePosition\" in props;\n\tconst { scope, animatePosition, children, passThrough, ...rest } = props;\n\tconst animatePos = animatePosition;\n\tconst context = usePopperContext(scope);\n\tconst { strategy, placement, refs, x, y, getFloatingProps, isPositioned, transformOrigin, update } = context;\n\tconst updateRef = React.useRef(update);\n\tupdateRef.current = update;\n\tconst lastNodeRef = React.useRef(null);\n\tconst safeSetFloating = React.useCallback((node) => {\n\t\tconst isNewNode = node !== lastNodeRef.current;\n\t\tif (node) {\n\t\t\tlastNodeRef.current = node;\n\t\t\trefs.setFloating(node);\n\t\t\tif (!isNewNode) updateRef.current?.();\n\t\t}\n\t}, [refs.setFloating]);\n\tReact.useEffect(() => {\n\t\treturn () => {\n\t\t\tconst ourNode = lastNodeRef.current;\n\t\t\tif (ourNode && refs.floating.current === ourNode) refs.setFloating(null);\n\t\t\tlastNodeRef.current = null;\n\t\t};\n\t}, []);\n\tconst contentRefs = useComposedRefs(safeSetFloating, forwardedRef);\n\tconst [needsMeasure, setNeedsMeasure] = React.useState(animatePos);\n\tuseIsomorphicLayoutEffect(() => {\n\t\tif (needsMeasure && x && y) setNeedsMeasure(false);\n\t}, [\n\t\tneedsMeasure,\n\t\tanimatePos,\n\t\tx,\n\t\ty\n\t]);\n\tconst hasBeenPositioned = React.useRef(false);\n\tconst lastGoodPosition = React.useRef({\n\t\tx: 0,\n\t\ty: 0\n\t});\n\tif (x !== 0 || y !== 0) {\n\t\tlastGoodPosition.current = {\n\t\t\tx,\n\t\t\ty\n\t\t};\n\t\tif (isPositioned) hasBeenPositioned.current = true;\n\t}\n\tconst brieflyZero = hasBeenPositioned.current && x === 0 && y === 0;\n\tconst effectiveX = brieflyZero ? lastGoodPosition.current.x : x;\n\tconst effectiveY = brieflyZero ? lastGoodPosition.current.y : y;\n\tconst hide = !hasBeenPositioned.current && effectiveX === 0 && effectiveY === 0;\n\tconst disableAnimationProp = animatePos === \"even-when-repositioning\" ? needsMeasure : !hasBeenPositioned.current && !isPositioned || needsMeasure;\n\tconst [disableAnimation, setDisableAnimation] = React.useState(disableAnimationProp);\n\tReact.useEffect(() => {\n\t\tsetDisableAnimation(disableAnimationProp);\n\t}, [disableAnimationProp]);\n\tconst frameProps = {\n\t\tref: contentRefs,\n\t\t...hide ? {} : {\n\t\t\tx: effectiveX || 0,\n\t\t\ty: effectiveY || 0\n\t\t},\n\t\ttop: 0,\n\t\tleft: 0,\n\t\tposition: strategy,\n\t\topacity: hide ? 0 : 1,\n\t\t...isAnimatePosControlled && {\n\t\t\ttransition: animatePos && !disableAnimation ? rest.transition : \"none\",\n\t\t\tanimatePresence: false\n\t\t}\n\t};\n\tconst { style, ...floatingProps } = getFloatingProps ? getFloatingProps(frameProps) : frameProps;\n\tconst transformOriginStyle = isWeb && transformOrigin ? { transformOrigin: `${transformOrigin.x} ${transformOrigin.y}` } : void 0;\n\treturn /* @__PURE__ */ jsx(LayoutMeasurementController, {\n\t\tdisable: !context.open,\n\t\tchildren: /* @__PURE__ */ jsx(View, {\n\t\t\tpassThrough,\n\t\t\tref: contentRefs,\n\t\t\tdirection: rest.direction,\n\t\t\t...passThrough ? null : floatingProps,\n\t\t\t...!passThrough && animatePos && { \"data-popper-animate-position\": \"true\" },\n\t\t\tchildren: /* @__PURE__ */ jsx(PopperContentFrame, {\n\t\t\t\tpassThrough,\n\t\t\t\t...!passThrough && {\n\t\t\t\t\t\"data-placement\": placement,\n\t\t\t\t\t\"data-strategy\": strategy,\n\t\t\t\t\t...style,\n\t\t\t\t\t...transformOriginStyle,\n\t\t\t\t\t...rest\n\t\t\t\t},\n\t\t\t\tchildren\n\t\t\t}, \"popper-content-frame\")\n\t\t})\n\t});\n});\nconst PopperArrowFrame = styled(View, {\n\tdisplayName: \"PopperArrow\",\n\tposition: \"relative\"\n});\nconst PopperArrowOuterFrame = styled(View, {\n\tdisplayName: \"PopperArrowOuter\",\n\tposition: \"absolute\",\n\tzIndex: 1e6,\n\tpointerEvents: \"none\",\n\toverflow: \"hidden\",\n\talignItems: \"center\",\n\tjustifyContent: \"center\"\n});\nconst opposites = {\n\ttop: \"bottom\",\n\tright: \"left\",\n\tbottom: \"top\",\n\tleft: \"right\"\n};\nconst PopperArrow = createRefComponent(function PopperArrow2(propsIn, forwardedRef) {\n\tconst isAnimatePosControlled = \"animatePosition\" in propsIn;\n\tconst { scope, animatePosition, transition, ...rest } = propsIn;\n\tconst { offset, size: sizeProp, borderWidth = 0, ...arrowProps } = rest;\n\tconst context = usePopperContext(scope);\n\tconst sizeVal = typeof sizeProp === \"number\" ? sizeProp : getVariableValue(getSize(sizeProp ?? context.size ?? true)) * .52 - 11.5;\n\tconst size = Math.max(0, +sizeVal);\n\tconst { placement } = context;\n\tconst refs = useComposedRefs(context.arrowRef, forwardedRef);\n\tconst x = context.arrowStyle?.x || 0;\n\tconst y = context.arrowStyle?.y || 0;\n\tconst arrowPositioned = context.arrowStyle != null;\n\tconst primaryPlacement = placement ? placement.split(\"-\")[0] : \"top\";\n\tconst arrowStyle = {\n\t\tx,\n\t\ty,\n\t\twidth: size,\n\t\theight: size\n\t};\n\tconst innerArrowStyle = {};\n\tconst isVertical = primaryPlacement === \"bottom\" || primaryPlacement === \"top\";\n\tif (primaryPlacement) {\n\t\tarrowStyle[isVertical ? \"width\" : \"height\"] = size * 2;\n\t\tconst oppSide = opposites[primaryPlacement];\n\t\tif (oppSide) {\n\t\t\tarrowStyle[oppSide] = -size;\n\t\t\tinnerArrowStyle[oppSide] = size / 2;\n\t\t}\n\t\tif (oppSide === \"top\" || oppSide === \"bottom\") arrowStyle.left = 0;\n\t\tif (oppSide === \"left\" || oppSide === \"right\") arrowStyle.top = 0;\n\t\tuseIsomorphicLayoutEffect(() => {\n\t\t\tcontext.onArrowSize?.(size);\n\t\t}, [size, context.onArrowSize]);\n\t}\n\treturn /* @__PURE__ */ jsx(PopperArrowOuterFrame, {\n\t\tref: refs,\n\t\t...arrowStyle,\n\t\t...!arrowPositioned && { opacity: 0 },\n\t\t...isAnimatePosControlled && {\n\t\t\ttransition: animatePosition ? { transform: transition } : \"none\",\n\t\t\tanimatePresence: false\n\t\t},\n\t\tchildren: /* @__PURE__ */ jsx(PopperArrowFrame, {\n\t\t\twidth: size,\n\t\t\theight: size,\n\t\t\t...arrowProps,\n\t\t\t...innerArrowStyle,\n\t\t\trotate: \"45deg\",\n\t\t\t...primaryPlacement === \"bottom\" && {\n\t\t\t\tborderLeftWidth: borderWidth,\n\t\t\t\tborderTopWidth: borderWidth\n\t\t\t},\n\t\t\t...primaryPlacement === \"top\" && {\n\t\t\t\tborderBottomWidth: borderWidth,\n\t\t\t\tborderRightWidth: borderWidth\n\t\t\t},\n\t\t\t...primaryPlacement === \"right\" && {\n\t\t\t\tborderLeftWidth: borderWidth,\n\t\t\t\tborderBottomWidth: borderWidth\n\t\t\t},\n\t\t\t...primaryPlacement === \"left\" && {\n\t\t\t\tborderTopWidth: borderWidth,\n\t\t\t\tborderRightWidth: borderWidth\n\t\t\t}\n\t\t})\n\t});\n});\n\nexport { Popper, PopperAnchor, PopperArrow, PopperArrowFrame, PopperContent, PopperContentFrame, PopperContextFast, PopperContextSlow, PopperPositionContext, PopperProvider, PopperProviderFast, PopperProviderSlow, setupPopper, usePopperContext, usePopperContextSlow };"],"mappings":";;;;;;;;;;;;AAWA,MAAM,oBAAoB,oBAAoB,CAAC,GAAG,UAAU;AAC5D,MAAM,wBAAwB;AAC9B,MAAM,EAAE,kBAAkB,kBAAkB,UAAU,uBAAuB;AAC7E,MAAM,oBAAoB,oBAAoB,CAAC,GAAG,cAAc;AAChE,MAAM,EAAE,kBAAkB,sBAAsB,UAAU,uBAAuB;A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C/D,MAAM,aAAa;EAClB;EACA;EACA,OAAO;EACP,QAAQ;CACT;CACA,MAAM,kBAAkB,CAAC;CACzB,MAAM,aAAa,qBAAqB,YAAY,qBAAqB;CACzE,IAAI,kBAAkB;EACrB,WAAW,aAAa,UAAU,YAAY,OAAO;EACrD,MAAM,UAAU,UAAU;EAC1B,IAAI,SAAS;GACZ,WAAW,WAAW,CAAC;GACvB,gBAAgB,WAAW,OAAO;EACnC;EACA,IAAI,YAAY,SAAS,YAAY,UAAU,WAAW,OAAO;EACjE,IAAI,YAAY,UAAU,YAAY,SAAS,WAAW,MAAM;EAChE,gCAAgC;GAC/B,QAAQ,cAAc,IAAI;EAC3B,GAAG,CAAC,MAAM,QAAQ,WAAW,CAAC;CAC/B;CACA,OAAuB,oBAAI,uBAAuB;EACjD,KAAK;EACL,GAAG;EACH,GAAG,CAAC,mBAAmB,EAAE,SAAS,EAAE;EACpC,GAAG,0BAA0B;GAC5B,YAAY,kBAAkB,EAAE,WAAW,WAAW,IAAI;GAC1D,iBAAiB;EAClB;EACA,UAA0B,oBAAI,kBAAkB;GAC/C,OAAO;GACP,QAAQ;GACR,GAAG;GACH,GAAG;GACH,QAAQ;GACR,GAAG,qBAAqB,YAAY;IACnC,iBAAiB;IACjB,gBAAgB;GACjB;GACA,GAAG,qBAAqB,SAAS;IAChC,mBAAmB;IACnB,kBAAkB;GACnB;GACA,GAAG,qBAAqB,WAAW;IAClC,iBAAiB;IACjB,mBAAmB;GACpB;GACA,GAAG,qBAAqB,UAAU;IACjC,gBAAgB;IAChB,kBAAkB;GACnB;EACD,CAAC;CACF,CAAC;AACF,CAAC"}
|
|
@@ -0,0 +1,498 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __create = Object.create;
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __export = (target, all) => {
|
|
10
|
+
for (var name in all) __defProp(target, name, {
|
|
11
|
+
get: all[name],
|
|
12
|
+
enumerable: true
|
|
13
|
+
});
|
|
14
|
+
};
|
|
15
|
+
var __copyProps = (to, from, except, desc) => {
|
|
16
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
17
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
18
|
+
get: () => from[key],
|
|
19
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
return to;
|
|
23
|
+
};
|
|
24
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
25
|
+
value: mod,
|
|
26
|
+
enumerable: true
|
|
27
|
+
}) : target, mod));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var Popper_exports = {};
|
|
30
|
+
__export(Popper_exports, {
|
|
31
|
+
Popper: () => Popper,
|
|
32
|
+
PopperAnchor: () => PopperAnchor,
|
|
33
|
+
PopperArrow: () => PopperArrow,
|
|
34
|
+
PopperArrowFrame: () => PopperArrowFrame,
|
|
35
|
+
PopperContent: () => PopperContent,
|
|
36
|
+
PopperContentFrame: () => PopperContentFrame,
|
|
37
|
+
PopperContextFast: () => PopperContextFast,
|
|
38
|
+
PopperContextSlow: () => PopperContextSlow,
|
|
39
|
+
PopperPositionContext: () => PopperPositionContext,
|
|
40
|
+
PopperProvider: () => PopperProvider,
|
|
41
|
+
PopperProviderFast: () => PopperProviderFast,
|
|
42
|
+
PopperProviderSlow: () => PopperProviderSlow,
|
|
43
|
+
setupPopper: () => setupPopper,
|
|
44
|
+
usePopperContext: () => usePopperContext,
|
|
45
|
+
usePopperContextSlow: () => usePopperContextSlow
|
|
46
|
+
});
|
|
47
|
+
module.exports = __toCommonJS(Popper_exports);
|
|
48
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
49
|
+
var import_react_dom = require("react-dom");
|
|
50
|
+
var import_compose_refs = require("@tamagui/compose-refs");
|
|
51
|
+
var import_constants = require("@tamagui/constants");
|
|
52
|
+
var import_core = require("@tamagui/core");
|
|
53
|
+
var import_floating = require("@tamagui/floating");
|
|
54
|
+
var import_floating2 = require("@tamagui/floating");
|
|
55
|
+
var import_get_token = require("@tamagui/get-token");
|
|
56
|
+
var import_start_transition = require("@tamagui/start-transition");
|
|
57
|
+
var React = __toESM(require("react"), 1);
|
|
58
|
+
var import_useRepositionOnNative = require("./useRepositionOnNative.native.js");
|
|
59
|
+
var PopperContextFast = (0, import_core.createStyledContext)({}, "Popper__");
|
|
60
|
+
var PopperPositionContext = import_core.createStyledContext;
|
|
61
|
+
var { useStyledContext: usePopperContext, Provider: PopperProviderFast } = PopperContextFast;
|
|
62
|
+
var PopperContextSlow = (0, import_core.createStyledContext)({}, "PopperSlow__");
|
|
63
|
+
var { useStyledContext: usePopperContextSlow, Provider: PopperProviderSlow } = PopperContextSlow;
|
|
64
|
+
var PopperProvider = function(param) {
|
|
65
|
+
var { scope, children, ...context } = param;
|
|
66
|
+
var fns = React.useRef(context);
|
|
67
|
+
fns.current = context;
|
|
68
|
+
var [slowContext] = React.useState(function() {
|
|
69
|
+
return {
|
|
70
|
+
refs: context.refs,
|
|
71
|
+
triggerElements: context.triggerElements,
|
|
72
|
+
update() {
|
|
73
|
+
for (var _len = arguments.length, a = new Array(_len), _key = 0; _key < _len; _key++) a[_key] = arguments[_key];
|
|
74
|
+
fns.current.update(...a);
|
|
75
|
+
},
|
|
76
|
+
getReferenceProps(p) {
|
|
77
|
+
var _fns_current_getReferenceProps, _fns_current;
|
|
78
|
+
return (_fns_current_getReferenceProps = (_fns_current = fns.current).getReferenceProps) === null || _fns_current_getReferenceProps === void 0 ? void 0 : _fns_current_getReferenceProps.call(_fns_current, p);
|
|
79
|
+
},
|
|
80
|
+
onHoverReference(e) {
|
|
81
|
+
var _fns_current_onHoverReference, _fns_current;
|
|
82
|
+
(_fns_current_onHoverReference = (_fns_current = fns.current).onHoverReference) === null || _fns_current_onHoverReference === void 0 || _fns_current_onHoverReference.call(_fns_current, e);
|
|
83
|
+
},
|
|
84
|
+
onLeaveReference() {
|
|
85
|
+
var _fns_current_onLeaveReference, _fns_current;
|
|
86
|
+
(_fns_current_onLeaveReference = (_fns_current = fns.current).onLeaveReference) === null || _fns_current_onLeaveReference === void 0 || _fns_current_onLeaveReference.call(_fns_current);
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
});
|
|
90
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopperProviderFast, {
|
|
91
|
+
scope,
|
|
92
|
+
...context,
|
|
93
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopperProviderSlow, {
|
|
94
|
+
scope,
|
|
95
|
+
...slowContext,
|
|
96
|
+
children
|
|
97
|
+
})
|
|
98
|
+
});
|
|
99
|
+
};
|
|
100
|
+
var checkFloating = {
|
|
101
|
+
name: "checkFloating",
|
|
102
|
+
fn(data) {
|
|
103
|
+
return { data: { hasFloating: !!data.rects.floating.width } };
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
var setupOptions = {};
|
|
107
|
+
function setupPopper(options) {
|
|
108
|
+
Object.assign(setupOptions, options);
|
|
109
|
+
}
|
|
110
|
+
function tamaguiAutoUpdate(reference, floating, update) {
|
|
111
|
+
update();
|
|
112
|
+
var rafId = requestAnimationFrame(function() {
|
|
113
|
+
update();
|
|
114
|
+
rafId = 0;
|
|
115
|
+
});
|
|
116
|
+
var cleanups = [function() {
|
|
117
|
+
if (rafId) cancelAnimationFrame(rafId);
|
|
118
|
+
}];
|
|
119
|
+
if (reference instanceof HTMLElement) cleanups.push((0, import_core.registerLayoutNode)(reference, update));
|
|
120
|
+
if (typeof ResizeObserver !== "undefined") {
|
|
121
|
+
var lastWidth = -1;
|
|
122
|
+
var lastHeight = -1;
|
|
123
|
+
var ro = new ResizeObserver(function(entries) {
|
|
124
|
+
var entry = entries[entries.length - 1];
|
|
125
|
+
if (!entry) return;
|
|
126
|
+
var { width, height } = entry.contentRect;
|
|
127
|
+
if (lastWidth === -1) {
|
|
128
|
+
lastWidth = width;
|
|
129
|
+
lastHeight = height;
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
if (width !== lastWidth || height !== lastHeight) {
|
|
133
|
+
lastWidth = width;
|
|
134
|
+
lastHeight = height;
|
|
135
|
+
update();
|
|
136
|
+
}
|
|
137
|
+
});
|
|
138
|
+
ro.observe(floating);
|
|
139
|
+
cleanups.push(function() {
|
|
140
|
+
return ro.disconnect();
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
var ancestors = [...reference instanceof Element ? (0, import_floating2.getOverflowAncestors)(reference) : [], ...(0, import_floating2.getOverflowAncestors)(floating)];
|
|
144
|
+
var uniqueAncestors = [...new Set(ancestors)];
|
|
145
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
|
146
|
+
try {
|
|
147
|
+
for (var _iterator = uniqueAncestors[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) _step.value.addEventListener("scroll", update, { passive: true });
|
|
148
|
+
} catch (err) {
|
|
149
|
+
_didIteratorError = true;
|
|
150
|
+
_iteratorError = err;
|
|
151
|
+
} finally {
|
|
152
|
+
try {
|
|
153
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();
|
|
154
|
+
} finally {
|
|
155
|
+
if (_didIteratorError) throw _iteratorError;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
window.addEventListener("resize", update);
|
|
159
|
+
cleanups.push(function() {
|
|
160
|
+
var _iteratorNormalCompletion2 = true, _didIteratorError2 = false, _iteratorError2 = void 0;
|
|
161
|
+
try {
|
|
162
|
+
for (var _iterator2 = uniqueAncestors[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) _step2.value.removeEventListener("scroll", update);
|
|
163
|
+
} catch (err) {
|
|
164
|
+
_didIteratorError2 = true;
|
|
165
|
+
_iteratorError2 = err;
|
|
166
|
+
} finally {
|
|
167
|
+
try {
|
|
168
|
+
if (!_iteratorNormalCompletion2 && _iterator2.return != null) _iterator2.return();
|
|
169
|
+
} finally {
|
|
170
|
+
if (_didIteratorError2) throw _iteratorError2;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
window.removeEventListener("resize", update);
|
|
174
|
+
});
|
|
175
|
+
return function() {
|
|
176
|
+
return cleanups.forEach(function(fn) {
|
|
177
|
+
return fn();
|
|
178
|
+
});
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
function Popper(props) {
|
|
182
|
+
var { children, size, strategy = "absolute", placement = "bottom", stayInFrame, allowFlip, offset, disableRTL, resize, passThrough, open, scope } = props;
|
|
183
|
+
var [arrowEl, setArrow] = React.useState(null);
|
|
184
|
+
var [arrowSize, setArrowSize] = React.useState(0);
|
|
185
|
+
var offsetOptions = offset !== null && offset !== void 0 ? offset : arrowSize;
|
|
186
|
+
React.useRef({});
|
|
187
|
+
var isOpen = passThrough ? false : open !== null && open !== void 0 ? open : true;
|
|
188
|
+
var middlewareRef = React.useRef([]);
|
|
189
|
+
if (isOpen) middlewareRef.current = [
|
|
190
|
+
typeof offsetOptions !== "undefined" ? (0, import_floating2.offset)(offsetOptions) : null,
|
|
191
|
+
allowFlip ? (0, import_floating2.flip)(typeof allowFlip === "boolean" ? {} : allowFlip) : null,
|
|
192
|
+
stayInFrame ? (0, import_floating2.shift)({
|
|
193
|
+
padding: 10,
|
|
194
|
+
mainAxis: true,
|
|
195
|
+
crossAxis: false,
|
|
196
|
+
...typeof stayInFrame === "object" ? stayInFrame : null
|
|
197
|
+
}) : null,
|
|
198
|
+
arrowEl ? (0, import_floating2.arrow)({ element: arrowEl }) : null,
|
|
199
|
+
checkFloating,
|
|
200
|
+
null,
|
|
201
|
+
null,
|
|
202
|
+
null
|
|
203
|
+
].filter(Boolean);
|
|
204
|
+
var floating = (0, import_floating2.useFloating)({
|
|
205
|
+
open: isOpen,
|
|
206
|
+
strategy,
|
|
207
|
+
placement,
|
|
208
|
+
sameScrollView: false,
|
|
209
|
+
whileElementsMounted: !isOpen ? void 0 : tamaguiAutoUpdate,
|
|
210
|
+
platform: (disableRTL !== null && disableRTL !== void 0 ? disableRTL : setupOptions.disableRTL) ? {
|
|
211
|
+
...import_floating2.platform,
|
|
212
|
+
isRTL(element) {
|
|
213
|
+
return false;
|
|
214
|
+
}
|
|
215
|
+
} : import_floating2.platform,
|
|
216
|
+
middleware: middlewareRef.current
|
|
217
|
+
});
|
|
218
|
+
var { middlewareData } = floating;
|
|
219
|
+
(0, import_useRepositionOnNative.useRepositionOnNative)(floating.update, passThrough);
|
|
220
|
+
var popperContext = React.useMemo(function() {
|
|
221
|
+
var _middlewareData_checkFloating;
|
|
222
|
+
return {
|
|
223
|
+
size,
|
|
224
|
+
arrowRef: setArrow,
|
|
225
|
+
arrowStyle: middlewareData.arrow,
|
|
226
|
+
onArrowSize: setArrowSize,
|
|
227
|
+
hasFloating: (_middlewareData_checkFloating = middlewareData.checkFloating) === null || _middlewareData_checkFloating === void 0 ? void 0 : _middlewareData_checkFloating.hasFloating,
|
|
228
|
+
transformOrigin: middlewareData.transformOrigin,
|
|
229
|
+
open: !!open,
|
|
230
|
+
...floating
|
|
231
|
+
};
|
|
232
|
+
}, [
|
|
233
|
+
open,
|
|
234
|
+
size,
|
|
235
|
+
floating,
|
|
236
|
+
JSON.stringify(middlewareData.arrow || null),
|
|
237
|
+
JSON.stringify(middlewareData.transformOrigin || null)
|
|
238
|
+
]);
|
|
239
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopperProvider, {
|
|
240
|
+
scope,
|
|
241
|
+
...popperContext,
|
|
242
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_floating.FloatingOverrideContext.Provider, {
|
|
243
|
+
value: null,
|
|
244
|
+
children
|
|
245
|
+
})
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
var PopperAnchor = (0, import_core.createStyledHOC)(import_core.View, function PopperAnchor2(props, forwardedRef) {
|
|
249
|
+
var { virtualRef, scope, ...rest } = props;
|
|
250
|
+
var context = usePopperContextSlow(scope);
|
|
251
|
+
var { getReferenceProps, refs, update } = context;
|
|
252
|
+
var ref = React.useRef(null);
|
|
253
|
+
var triggerId = React.useId();
|
|
254
|
+
React.useEffect(function() {
|
|
255
|
+
if (!scope || !context.triggerElements || !ref.current) return;
|
|
256
|
+
if (!(ref.current instanceof Element)) return;
|
|
257
|
+
var el = ref.current;
|
|
258
|
+
context.triggerElements.add(triggerId, el);
|
|
259
|
+
return function() {
|
|
260
|
+
var _context_triggerElements;
|
|
261
|
+
(_context_triggerElements = context.triggerElements) === null || _context_triggerElements === void 0 || _context_triggerElements.delete(triggerId);
|
|
262
|
+
};
|
|
263
|
+
}, [
|
|
264
|
+
scope,
|
|
265
|
+
triggerId,
|
|
266
|
+
context.triggerElements
|
|
267
|
+
]);
|
|
268
|
+
React.useEffect(function() {
|
|
269
|
+
if (virtualRef) {
|
|
270
|
+
refs.setReference(virtualRef.current);
|
|
271
|
+
update();
|
|
272
|
+
}
|
|
273
|
+
}, [virtualRef]);
|
|
274
|
+
var refProps = (getReferenceProps === null || getReferenceProps === void 0 ? void 0 : getReferenceProps({
|
|
275
|
+
...rest,
|
|
276
|
+
ref
|
|
277
|
+
})) || null;
|
|
278
|
+
var safeSetReference = React.useCallback(function(node) {
|
|
279
|
+
(0, import_start_transition.startTransition)(function() {
|
|
280
|
+
refs.setReference(node);
|
|
281
|
+
});
|
|
282
|
+
}, [refs]);
|
|
283
|
+
var shouldHandleInHover = import_constants.isWeb && scope;
|
|
284
|
+
var composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, ref, shouldHandleInHover ? void 0 : safeSetReference);
|
|
285
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core.View, {
|
|
286
|
+
...rest,
|
|
287
|
+
...refProps,
|
|
288
|
+
ref: composedRefs,
|
|
289
|
+
...shouldHandleInHover && {
|
|
290
|
+
onMouseEnter: function(e) {
|
|
291
|
+
var _e_currentTarget;
|
|
292
|
+
var el = (_e_currentTarget = e.currentTarget) !== null && _e_currentTarget !== void 0 ? _e_currentTarget : ref.current;
|
|
293
|
+
if (el instanceof HTMLElement) {
|
|
294
|
+
var _refProps_onPointerEnter, _context_onHoverReference;
|
|
295
|
+
(0, import_react_dom.flushSync)(function() {
|
|
296
|
+
return refs.setReference(el);
|
|
297
|
+
});
|
|
298
|
+
update();
|
|
299
|
+
if (!refProps) return;
|
|
300
|
+
(_refProps_onPointerEnter = refProps.onPointerEnter) === null || _refProps_onPointerEnter === void 0 || _refProps_onPointerEnter.call(refProps, e);
|
|
301
|
+
(_context_onHoverReference = context.onHoverReference) === null || _context_onHoverReference === void 0 || _context_onHoverReference.call(context, e.nativeEvent);
|
|
302
|
+
}
|
|
303
|
+
},
|
|
304
|
+
onMouseLeave: function(e) {
|
|
305
|
+
var _context_onLeaveReference, _refProps_onMouseLeave;
|
|
306
|
+
(_context_onLeaveReference = context.onLeaveReference) === null || _context_onLeaveReference === void 0 || _context_onLeaveReference.call(context);
|
|
307
|
+
refProps === null || refProps === void 0 || (_refProps_onMouseLeave = refProps.onMouseLeave) == null || _refProps_onMouseLeave.call(refProps, e);
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
});
|
|
311
|
+
});
|
|
312
|
+
var PopperContentFrame = (0, import_core.styled)(import_core.View, { displayName: "PopperContent" });
|
|
313
|
+
var PopperContent = (0, import_core.createRefComponent)(function PopperContent2(props, forwardedRef) {
|
|
314
|
+
var isAnimatePosControlled = "animatePosition" in props;
|
|
315
|
+
var { scope, animatePosition, children, passThrough, ...rest } = props;
|
|
316
|
+
var animatePos = animatePosition;
|
|
317
|
+
var context = usePopperContext(scope);
|
|
318
|
+
var { strategy, placement, refs, x, y, getFloatingProps, isPositioned, transformOrigin, update } = context;
|
|
319
|
+
var updateRef = React.useRef(update);
|
|
320
|
+
updateRef.current = update;
|
|
321
|
+
var lastNodeRef = React.useRef(null);
|
|
322
|
+
var safeSetFloating = React.useCallback(function(node) {
|
|
323
|
+
var isNewNode = node !== lastNodeRef.current;
|
|
324
|
+
if (node) {
|
|
325
|
+
lastNodeRef.current = node;
|
|
326
|
+
refs.setFloating(node);
|
|
327
|
+
if (!isNewNode) {
|
|
328
|
+
var _updateRef_current;
|
|
329
|
+
(_updateRef_current = updateRef.current) === null || _updateRef_current === void 0 || _updateRef_current.call(updateRef);
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
}, [refs.setFloating]);
|
|
333
|
+
React.useEffect(function() {
|
|
334
|
+
return function() {
|
|
335
|
+
var ourNode = lastNodeRef.current;
|
|
336
|
+
if (ourNode && refs.floating.current === ourNode) refs.setFloating(null);
|
|
337
|
+
lastNodeRef.current = null;
|
|
338
|
+
};
|
|
339
|
+
}, []);
|
|
340
|
+
var contentRefs = (0, import_compose_refs.useComposedRefs)(safeSetFloating, forwardedRef);
|
|
341
|
+
var [needsMeasure, setNeedsMeasure] = React.useState(animatePos);
|
|
342
|
+
(0, import_constants.useIsomorphicLayoutEffect)(function() {
|
|
343
|
+
if (needsMeasure && x && y) setNeedsMeasure(false);
|
|
344
|
+
}, [
|
|
345
|
+
needsMeasure,
|
|
346
|
+
animatePos,
|
|
347
|
+
x,
|
|
348
|
+
y
|
|
349
|
+
]);
|
|
350
|
+
var hasBeenPositioned = React.useRef(false);
|
|
351
|
+
var lastGoodPosition = React.useRef({
|
|
352
|
+
x: 0,
|
|
353
|
+
y: 0
|
|
354
|
+
});
|
|
355
|
+
if (x !== 0 || y !== 0) {
|
|
356
|
+
lastGoodPosition.current = {
|
|
357
|
+
x,
|
|
358
|
+
y
|
|
359
|
+
};
|
|
360
|
+
if (isPositioned) hasBeenPositioned.current = true;
|
|
361
|
+
}
|
|
362
|
+
var brieflyZero = hasBeenPositioned.current && x === 0 && y === 0;
|
|
363
|
+
var effectiveX = brieflyZero ? lastGoodPosition.current.x : x;
|
|
364
|
+
var effectiveY = brieflyZero ? lastGoodPosition.current.y : y;
|
|
365
|
+
var hide = !hasBeenPositioned.current && effectiveX === 0 && effectiveY === 0;
|
|
366
|
+
var disableAnimationProp = animatePos === "even-when-repositioning" ? needsMeasure : !hasBeenPositioned.current && !isPositioned || needsMeasure;
|
|
367
|
+
var [disableAnimation, setDisableAnimation] = React.useState(disableAnimationProp);
|
|
368
|
+
React.useEffect(function() {
|
|
369
|
+
setDisableAnimation(disableAnimationProp);
|
|
370
|
+
}, [disableAnimationProp]);
|
|
371
|
+
var frameProps = {
|
|
372
|
+
ref: contentRefs,
|
|
373
|
+
...hide ? {} : {
|
|
374
|
+
x: effectiveX || 0,
|
|
375
|
+
y: effectiveY || 0
|
|
376
|
+
},
|
|
377
|
+
top: 0,
|
|
378
|
+
left: 0,
|
|
379
|
+
position: strategy,
|
|
380
|
+
opacity: hide ? 0 : 1,
|
|
381
|
+
...isAnimatePosControlled && {
|
|
382
|
+
transition: animatePos && !disableAnimation ? rest.transition : "none",
|
|
383
|
+
animatePresence: false
|
|
384
|
+
}
|
|
385
|
+
};
|
|
386
|
+
var { style, ...floatingProps } = getFloatingProps ? getFloatingProps(frameProps) : frameProps;
|
|
387
|
+
var transformOriginStyle = import_constants.isWeb && transformOrigin ? { transformOrigin: `${transformOrigin.x} ${transformOrigin.y}` } : void 0;
|
|
388
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core.LayoutMeasurementController, {
|
|
389
|
+
disable: !context.open,
|
|
390
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core.View, {
|
|
391
|
+
passThrough,
|
|
392
|
+
ref: contentRefs,
|
|
393
|
+
direction: rest.direction,
|
|
394
|
+
...passThrough ? null : floatingProps,
|
|
395
|
+
...!passThrough && animatePos && { "data-popper-animate-position": "true" },
|
|
396
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopperContentFrame, {
|
|
397
|
+
passThrough,
|
|
398
|
+
...!passThrough && {
|
|
399
|
+
"data-placement": placement,
|
|
400
|
+
"data-strategy": strategy,
|
|
401
|
+
...style,
|
|
402
|
+
...transformOriginStyle,
|
|
403
|
+
...rest
|
|
404
|
+
},
|
|
405
|
+
children
|
|
406
|
+
}, "popper-content-frame")
|
|
407
|
+
})
|
|
408
|
+
});
|
|
409
|
+
});
|
|
410
|
+
var PopperArrowFrame = (0, import_core.styled)(import_core.View, {
|
|
411
|
+
displayName: "PopperArrow",
|
|
412
|
+
position: "relative"
|
|
413
|
+
});
|
|
414
|
+
var PopperArrowOuterFrame = (0, import_core.styled)(import_core.View, {
|
|
415
|
+
displayName: "PopperArrowOuter",
|
|
416
|
+
position: "absolute",
|
|
417
|
+
zIndex: 1e6,
|
|
418
|
+
pointerEvents: "none",
|
|
419
|
+
overflow: "hidden",
|
|
420
|
+
alignItems: "center",
|
|
421
|
+
justifyContent: "center"
|
|
422
|
+
});
|
|
423
|
+
var opposites = {
|
|
424
|
+
top: "bottom",
|
|
425
|
+
right: "left",
|
|
426
|
+
bottom: "top",
|
|
427
|
+
left: "right"
|
|
428
|
+
};
|
|
429
|
+
var PopperArrow = (0, import_core.createRefComponent)(function PopperArrow2(propsIn, forwardedRef) {
|
|
430
|
+
var _context_arrowStyle, _context_arrowStyle1;
|
|
431
|
+
var isAnimatePosControlled = "animatePosition" in propsIn;
|
|
432
|
+
var { scope, animatePosition, transition, ...rest } = propsIn;
|
|
433
|
+
var { offset, size: sizeProp, borderWidth = 0, ...arrowProps } = rest;
|
|
434
|
+
var context = usePopperContext(scope);
|
|
435
|
+
var _ref;
|
|
436
|
+
var sizeVal = typeof sizeProp === "number" ? sizeProp : (0, import_core.getVariableValue)((0, import_get_token.getSize)((_ref = sizeProp !== null && sizeProp !== void 0 ? sizeProp : context.size) !== null && _ref !== void 0 ? _ref : true)) * .52 - 11.5;
|
|
437
|
+
var size = Math.max(0, +sizeVal);
|
|
438
|
+
var { placement } = context;
|
|
439
|
+
var refs = (0, import_compose_refs.useComposedRefs)(context.arrowRef, forwardedRef);
|
|
440
|
+
var x = ((_context_arrowStyle = context.arrowStyle) === null || _context_arrowStyle === void 0 ? void 0 : _context_arrowStyle.x) || 0;
|
|
441
|
+
var y = ((_context_arrowStyle1 = context.arrowStyle) === null || _context_arrowStyle1 === void 0 ? void 0 : _context_arrowStyle1.y) || 0;
|
|
442
|
+
var arrowPositioned = context.arrowStyle != null;
|
|
443
|
+
var primaryPlacement = placement ? placement.split("-")[0] : "top";
|
|
444
|
+
var arrowStyle = {
|
|
445
|
+
x,
|
|
446
|
+
y,
|
|
447
|
+
width: size,
|
|
448
|
+
height: size
|
|
449
|
+
};
|
|
450
|
+
var innerArrowStyle = {};
|
|
451
|
+
var isVertical = primaryPlacement === "bottom" || primaryPlacement === "top";
|
|
452
|
+
if (primaryPlacement) {
|
|
453
|
+
arrowStyle[isVertical ? "width" : "height"] = size * 2;
|
|
454
|
+
var oppSide = opposites[primaryPlacement];
|
|
455
|
+
if (oppSide) {
|
|
456
|
+
arrowStyle[oppSide] = -size;
|
|
457
|
+
innerArrowStyle[oppSide] = size / 2;
|
|
458
|
+
}
|
|
459
|
+
if (oppSide === "top" || oppSide === "bottom") arrowStyle.left = 0;
|
|
460
|
+
if (oppSide === "left" || oppSide === "right") arrowStyle.top = 0;
|
|
461
|
+
(0, import_constants.useIsomorphicLayoutEffect)(function() {
|
|
462
|
+
var _context_onArrowSize;
|
|
463
|
+
(_context_onArrowSize = context.onArrowSize) === null || _context_onArrowSize === void 0 || _context_onArrowSize.call(context, size);
|
|
464
|
+
}, [size, context.onArrowSize]);
|
|
465
|
+
}
|
|
466
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopperArrowOuterFrame, {
|
|
467
|
+
ref: refs,
|
|
468
|
+
...arrowStyle,
|
|
469
|
+
...!arrowPositioned && { opacity: 0 },
|
|
470
|
+
...isAnimatePosControlled && {
|
|
471
|
+
transition: animatePosition ? { transform: transition } : "none",
|
|
472
|
+
animatePresence: false
|
|
473
|
+
},
|
|
474
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PopperArrowFrame, {
|
|
475
|
+
width: size,
|
|
476
|
+
height: size,
|
|
477
|
+
...arrowProps,
|
|
478
|
+
...innerArrowStyle,
|
|
479
|
+
rotate: "45deg",
|
|
480
|
+
...primaryPlacement === "bottom" && {
|
|
481
|
+
borderLeftWidth: borderWidth,
|
|
482
|
+
borderTopWidth: borderWidth
|
|
483
|
+
},
|
|
484
|
+
...primaryPlacement === "top" && {
|
|
485
|
+
borderBottomWidth: borderWidth,
|
|
486
|
+
borderRightWidth: borderWidth
|
|
487
|
+
},
|
|
488
|
+
...primaryPlacement === "right" && {
|
|
489
|
+
borderLeftWidth: borderWidth,
|
|
490
|
+
borderBottomWidth: borderWidth
|
|
491
|
+
},
|
|
492
|
+
...primaryPlacement === "left" && {
|
|
493
|
+
borderTopWidth: borderWidth,
|
|
494
|
+
borderRightWidth: borderWidth
|
|
495
|
+
}
|
|
496
|
+
})
|
|
497
|
+
});
|
|
498
|
+
});
|