@wordpress/components
Version:
UI components for WordPress.
8 lines (7 loc) • 21.9 kB
Source Map (JSON)
{
"version": 3,
"sources": ["../../src/popover/index.tsx"],
"sourcesContent": ["import clsx from 'clsx';\nimport { useFloating, flip as flipMiddleware, shift as shiftMiddleware, limitShift, autoUpdate, arrow, offset as offsetMiddleware, size } from '@floating-ui/react-dom';\nimport { motion } from 'framer-motion';\nimport { useRef, useLayoutEffect, forwardRef, useContext, useMemo, useState, useCallback, createPortal } from '@wordpress/element';\nimport { useReducedMotion, useViewportMatch, useMergeRefs, __experimentalUseDialog as useDialog } from '@wordpress/compose';\nimport { close } from '@wordpress/icons';\nimport deprecated from '@wordpress/deprecated';\nimport { Path, SVG } from '@wordpress/primitives';\nimport { __ } from '@wordpress/i18n';\nimport Button from '../button';\nimport ScrollLock from '../scroll-lock';\nimport { Slot, Fill, useSlot } from '../slot-fill';\nimport { computePopoverPosition, positionToPlacement, placementToMotionAnimationProps, getReferenceElement } from './utils';\nimport { contextConnect, useContextSystem } from '../context';\nimport { overlayMiddlewares } from './overlay-middlewares';\nimport { StyleProvider } from '../style-provider';\n\n/**\n * Name of slot in which popover should fill.\n *\n * @type {string}\n */\nexport const SLOT_NAME = 'Popover';\n\n/**\n * Virtual padding to account for overflow boundaries.\n *\n * @type {number}\n */\nconst OVERFLOW_PADDING = 8;\n\n// An SVG displaying a triangle facing down, filled with a solid\n// color and bordered in such a way to create an arrow-like effect.\n// Keeping the SVG's viewbox squared simplify the arrow positioning\n// calculations.\nconst ArrowTriangle = () => /*#__PURE__*/_jsxs(SVG, {\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 100 100\",\n className: \"components-popover__triangle\",\n role: \"presentation\",\n children: [/*#__PURE__*/_jsx(Path, {\n className: \"components-popover__triangle-bg\",\n d: \"M 0 0 L 50 50 L 100 0\"\n }), /*#__PURE__*/_jsx(Path, {\n className: \"components-popover__triangle-border\",\n d: \"M 0 0 L 50 50 L 100 0\",\n vectorEffect: \"non-scaling-stroke\"\n })]\n});\nimport { slotNameContext } from './context';\nimport { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"react/jsx-runtime\";\nconst fallbackContainerClassname = 'components-popover__fallback-container';\nconst getPopoverFallbackContainer = () => {\n let container = document.body.querySelector('.' + fallbackContainerClassname);\n if (!container) {\n container = document.createElement('div');\n container.className = fallbackContainerClassname;\n document.body.append(container);\n }\n return container;\n};\nconst UnforwardedPopover = (props, forwardedRef) => {\n const {\n animate = true,\n headerTitle,\n constrainTabbing,\n onClose,\n children,\n className,\n noArrow = true,\n position,\n placement: placementProp = 'bottom-start',\n offset: offsetProp = 0,\n focusOnMount = 'firstElement',\n anchor,\n expandOnMobile,\n onFocusOutside,\n __unstableSlotName = SLOT_NAME,\n flip = true,\n resize = true,\n shift = false,\n inline = false,\n variant,\n style: contentStyle,\n // Deprecated props\n __unstableForcePosition,\n anchorRef,\n anchorRect,\n getAnchorRect,\n isAlternate,\n // Rest\n ...contentProps\n } = useContextSystem(props, 'Popover');\n let computedFlipProp = flip;\n let computedResizeProp = resize;\n if (__unstableForcePosition !== undefined) {\n deprecated('`__unstableForcePosition` prop in wp.components.Popover', {\n since: '6.1',\n version: '6.3',\n alternative: '`flip={ false }` and `resize={ false }`'\n });\n\n // Back-compat, set the `flip` and `resize` props\n // to `false` to replicate `__unstableForcePosition`.\n computedFlipProp = !__unstableForcePosition;\n computedResizeProp = !__unstableForcePosition;\n }\n if (anchorRef !== undefined) {\n deprecated('`anchorRef` prop in wp.components.Popover', {\n since: '6.1',\n alternative: '`anchor` prop'\n });\n }\n if (anchorRect !== undefined) {\n deprecated('`anchorRect` prop in wp.components.Popover', {\n since: '6.1',\n alternative: '`anchor` prop'\n });\n }\n if (getAnchorRect !== undefined) {\n deprecated('`getAnchorRect` prop in wp.components.Popover', {\n since: '6.1',\n alternative: '`anchor` prop'\n });\n }\n const computedVariant = isAlternate ? 'toolbar' : variant;\n if (isAlternate !== undefined) {\n deprecated('`isAlternate` prop in wp.components.Popover', {\n since: '6.2',\n alternative: \"`variant` prop with the `'toolbar'` value\"\n });\n }\n const arrowRef = useRef(null);\n const [fallbackReferenceElement, setFallbackReferenceElement] = useState(null);\n const anchorRefFallback = useCallback(node => {\n setFallbackReferenceElement(node);\n }, []);\n const isMobileViewport = useViewportMatch('medium', '<');\n const isExpanded = expandOnMobile && isMobileViewport;\n const hasArrow = !isExpanded && !noArrow;\n const normalizedPlacementFromProps = position ? positionToPlacement(position) : placementProp;\n const middleware = [...(placementProp === 'overlay' ? overlayMiddlewares() : []), offsetMiddleware(offsetProp), computedFlipProp && flipMiddleware(), computedResizeProp && size({\n padding: OVERFLOW_PADDING,\n apply(sizeProps) {\n const {\n firstElementChild\n } = refs.floating.current ?? {};\n\n // Only HTMLElement instances have the `style` property.\n if (!(firstElementChild instanceof HTMLElement)) {\n return;\n }\n\n // Reduce the height of the popover to the available space.\n Object.assign(firstElementChild.style, {\n maxHeight: `${Math.max(0, sizeProps.availableHeight)}px`,\n overflow: 'auto'\n });\n }\n }), shift && shiftMiddleware({\n crossAxis: true,\n limiter: limitShift(),\n padding: 1 // Necessary to avoid flickering at the edge of the viewport.\n }), arrow({\n element: arrowRef\n })];\n const slotName = useContext(slotNameContext) || __unstableSlotName;\n const slot = useSlot(slotName);\n let onDialogClose;\n if (onClose || onFocusOutside) {\n onDialogClose = (type, event) => {\n // Ideally the popover should have just a single onClose prop and\n // not three props that potentially do the same thing.\n if (type === 'focus-outside') {\n // Check if this blur event is actually relevant to this popover\n const blurTarget = event?.target;\n const referenceElement = refs.reference.current;\n const floatingElement = refs.floating.current;\n\n // Check if blur is from this popover's reference element or its floating content\n const isBlurFromThisPopover = referenceElement && 'contains' in referenceElement && referenceElement.contains(blurTarget) || floatingElement?.contains(blurTarget);\n // Ignore blur events that don't originate from this popover when there's no\n // relatedTarget (next focus target) and focus moves to document.body.\n // This prevents incorrectly closing the popover when clicking on elements\n // that don't accept focus (like clicking outside to empty space).\n const ownerDocument = floatingElement?.ownerDocument;\n if (!isBlurFromThisPopover && !('relatedTarget' in event && event.relatedTarget) && ownerDocument?.activeElement === ownerDocument?.body) {\n return;\n }\n // Call onFocusOutside if defined or call onClose.\n if (onFocusOutside) {\n onFocusOutside(event);\n } else if (onClose) {\n onClose();\n }\n } else if (onClose) {\n // onClose should be called for other event types if it exists.\n onClose();\n }\n };\n }\n const [dialogRef, dialogProps] = useDialog({\n constrainTabbing,\n focusOnMount,\n __unstableOnClose: onDialogClose,\n // @ts-expect-error The __unstableOnClose property needs to be deprecated first (see https://github.com/WordPress/gutenberg/pull/27675)\n onClose: onDialogClose\n });\n const {\n // Positioning coordinates\n x,\n y,\n // Object with \"regular\" refs to both \"reference\" and \"floating\"\n refs,\n // Type of CSS position property to use (absolute or fixed)\n strategy,\n update,\n placement: computedPlacement,\n middlewareData: {\n arrow: arrowData\n }\n } = useFloating({\n placement: normalizedPlacementFromProps === 'overlay' ? undefined : normalizedPlacementFromProps,\n middleware,\n whileElementsMounted: (referenceParam, floatingParam, updateParam) => autoUpdate(referenceParam, floatingParam, updateParam, {\n layoutShift: false,\n animationFrame: true\n })\n });\n const arrowCallbackRef = useCallback(node => {\n arrowRef.current = node;\n update();\n }, [update]);\n\n // When any of the possible anchor \"sources\" change,\n // recompute the reference element (real or virtual) and its owner document.\n\n const anchorRefTop = anchorRef?.top;\n const anchorRefBottom = anchorRef?.bottom;\n const anchorRefStartContainer = anchorRef?.startContainer;\n const anchorRefCurrent = anchorRef?.current;\n useLayoutEffect(() => {\n const resultingReferenceElement = getReferenceElement({\n anchor,\n anchorRef,\n anchorRect,\n getAnchorRect,\n fallbackReferenceElement\n });\n refs.setReference(resultingReferenceElement);\n }, [anchor, anchorRef, anchorRefTop, anchorRefBottom, anchorRefStartContainer, anchorRefCurrent, anchorRect, getAnchorRect, fallbackReferenceElement, refs]);\n const mergedFloatingRef = useMergeRefs([refs.setFloating, dialogRef, forwardedRef]);\n const style = isExpanded ? undefined : {\n position: strategy,\n top: 0,\n left: 0,\n // `x` and `y` are framer-motion specific props and are shorthands\n // for `translateX` and `translateY`. Currently it is not possible\n // to use `translateX` and `translateY` because those values would\n // be overridden by the return value of the\n // `placementToMotionAnimationProps` function.\n x: computePopoverPosition(x),\n y: computePopoverPosition(y)\n };\n const shouldReduceMotion = useReducedMotion();\n const shouldAnimate = animate && !isExpanded && !shouldReduceMotion;\n const [animationFinished, setAnimationFinished] = useState(false);\n const {\n style: motionInlineStyles,\n ...otherMotionProps\n } = useMemo(() => placementToMotionAnimationProps(computedPlacement), [computedPlacement]);\n const animationProps = shouldAnimate ? {\n style: {\n ...contentStyle,\n ...motionInlineStyles,\n ...style\n },\n onAnimationComplete: () => setAnimationFinished(true),\n ...otherMotionProps\n } : {\n animate: false,\n style: {\n ...contentStyle,\n ...style\n }\n };\n\n // When Floating UI has finished positioning and Framer Motion has finished animating\n // the popover, add the `is-positioned` class to signal that all transitions have finished.\n const isPositioned = (!shouldAnimate || animationFinished) && x !== null && y !== null;\n let content = /*#__PURE__*/_jsxs(motion.div, {\n className: clsx(className, {\n 'is-expanded': isExpanded,\n 'is-positioned': isPositioned,\n // Use the 'alternate' classname for 'toolbar' variant for back compat.\n [`is-${computedVariant === 'toolbar' ? 'alternate' : computedVariant}`]: computedVariant\n }),\n ...animationProps,\n ...contentProps,\n ref: mergedFloatingRef,\n ...dialogProps,\n tabIndex: -1,\n children: [isExpanded && /*#__PURE__*/_jsx(ScrollLock, {}), isExpanded && /*#__PURE__*/_jsxs(\"div\", {\n className: \"components-popover__header\",\n children: [/*#__PURE__*/_jsx(\"span\", {\n className: \"components-popover__header-title\",\n children: headerTitle\n }), /*#__PURE__*/_jsx(Button, {\n className: \"components-popover__close\",\n size: \"small\",\n icon: close,\n onClick: onClose,\n label: __('Close')\n })]\n }), /*#__PURE__*/_jsx(\"div\", {\n className: \"components-popover__content\",\n children: children\n }), hasArrow && /*#__PURE__*/_jsx(\"div\", {\n ref: arrowCallbackRef,\n className: ['components-popover__arrow', `is-${computedPlacement.split('-')[0]}`].join(' '),\n style: {\n left: typeof arrowData?.x !== 'undefined' && Number.isFinite(arrowData.x) ? `${arrowData.x}px` : '',\n top: typeof arrowData?.y !== 'undefined' && Number.isFinite(arrowData.y) ? `${arrowData.y}px` : ''\n },\n children: /*#__PURE__*/_jsx(ArrowTriangle, {})\n })]\n });\n const shouldRenderWithinSlot = slot.ref && !inline;\n const hasAnchor = anchorRef || anchorRect || anchor;\n if (shouldRenderWithinSlot) {\n content = /*#__PURE__*/_jsx(Fill, {\n name: slotName,\n children: content\n });\n } else if (!inline) {\n content = createPortal(/*#__PURE__*/_jsx(StyleProvider, {\n document: document,\n children: content\n }), getPopoverFallbackContainer());\n }\n if (hasAnchor) {\n return content;\n }\n return /*#__PURE__*/_jsxs(_Fragment, {\n children: [/*#__PURE__*/_jsx(\"span\", {\n ref: anchorRefFallback\n }), content]\n });\n};\n\n// Export the PopoverSlot individually to allow typescript to pick the types up.\nexport const PopoverSlot = forwardRef(({\n name = SLOT_NAME\n}, ref) => {\n return /*#__PURE__*/_jsx(Slot, {\n bubblesVirtually: true,\n name: name,\n className: \"popover-slot\",\n ref: ref\n });\n});\n\n/**\n * `Popover` renders its content in a floating modal. If no explicit anchor is passed via props, it anchors to its parent element by default.\n *\n * ```jsx\n * import { Button, Popover } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyPopover = () => {\n * \tconst [ isVisible, setIsVisible ] = useState( false );\n * \tconst toggleVisible = () => {\n * \t\tsetIsVisible( ( state ) => ! state );\n * \t};\n *\n * \treturn (\n * \t\t<Button variant=\"secondary\" onClick={ toggleVisible }>\n * \t\t\tToggle Popover!\n * \t\t\t{ isVisible && <Popover>Popover is toggled!</Popover> }\n * \t\t</Button>\n * \t);\n * };\n * ```\n *\n */\nexport const Popover = Object.assign(contextConnect(UnforwardedPopover, 'Popover'), {\n /**\n * Renders a slot that is used internally by Popover for rendering content.\n */\n Slot: Object.assign(PopoverSlot, {\n displayName: 'Popover.Slot'\n }),\n /**\n * Provides a context to manage popover slot names.\n *\n * This is marked as unstable and should not be used directly.\n */\n __unstableSlotNameProvider: Object.assign(slotNameContext.Provider, {\n displayName: 'Popover.__unstableSlotNameProvider'\n })\n});\nexport default Popover;"],
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiB;AACjB,uBAA+I;AAC/I,2BAAuB;AACvB,qBAA8G;AAC9G,qBAAuG;AACvG,mBAAsB;AACtB,wBAAuB;AACvB,wBAA0B;AAC1B,kBAAmB;AACnB,oBAAmB;AACnB,yBAAuB;AACvB,uBAAoC;AACpC,mBAAkH;AAClH,qBAAiD;AACjD,iCAAmC;AACnC,4BAA8B;AAkC9B,IAAAA,kBAAgC;AAChC,yBAAkE;AA5B3D,IAAM,YAAY;AAOzB,IAAM,mBAAmB;AAMzB,IAAM,gBAAgB,MAAmB,uCAAAC,MAAM,uBAAK;AAAA,EAClD,OAAO;AAAA,EACP,SAAS;AAAA,EACT,WAAW;AAAA,EACX,MAAM;AAAA,EACN,UAAU,CAAc,uCAAAC,KAAK,wBAAM;AAAA,IACjC,WAAW;AAAA,IACX,GAAG;AAAA,EACL,CAAC,GAAgB,uCAAAA,KAAK,wBAAM;AAAA,IAC1B,WAAW;AAAA,IACX,GAAG;AAAA,IACH,cAAc;AAAA,EAChB,CAAC,CAAC;AACJ,CAAC;AAGD,IAAM,6BAA6B;AACnC,IAAM,8BAA8B,MAAM;AACxC,MAAI,YAAY,SAAS,KAAK,cAAc,MAAM,0BAA0B;AAC5E,MAAI,CAAC,WAAW;AACd,gBAAY,SAAS,cAAc,KAAK;AACxC,cAAU,YAAY;AACtB,aAAS,KAAK,OAAO,SAAS;AAAA,EAChC;AACA,SAAO;AACT;AACA,IAAM,qBAAqB,CAAC,OAAO,iBAAiB;AAClD,QAAM;AAAA,IACJ,UAAU;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA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K,QAAQ;AAAA,MACnC,KAAK;AAAA,IACP,CAAC,GAAG,OAAO;AAAA,EACb,CAAC;AACH;AAGO,IAAM,kBAAc,2BAAW,CAAC;AAAA,EACrC,OAAO;AACT,GAAG,QAAQ;AACT,SAAoB,uCAAAA,KAAK,uBAAM;AAAA,IAC7B,kBAAkB;AAAA,IAClB;AAAA,IACA,WAAW;AAAA,IACX;AAAA,EACF,CAAC;AACH,CAAC;AAyBM,IAAM,UAAU,OAAO,WAAO,+BAAe,oBAAoB,SAAS,GAAG;AAAA;AAAA;AAAA;AAAA,EAIlF,MAAM,OAAO,OAAO,aAAa;AAAA,IAC/B,aAAa;AAAA,EACf,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMD,4BAA4B,OAAO,OAAO,gCAAgB,UAAU;AAAA,IAClE,aAAa;AAAA,EACf,CAAC;AACH,CAAC;AACD,IAAO,kBAAQ;",
"names": ["import_context", "_jsxs", "_jsx", "deprecated", "offsetMiddleware", "flipMiddleware", "shiftMiddleware", "useDialog", "clsx", "ScrollLock", "Button", "_Fragment"]
}