react-tooltip 5.9.1-beta.1 → 5.9.1-beta.2
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/README.md +2 -2
- package/dist/react-tooltip.cjs.js +20 -10
- package/dist/react-tooltip.cjs.js.map +2 -2
- package/dist/react-tooltip.cjs.min.js +1 -1
- package/dist/react-tooltip.cjs.min.js.map +3 -3
- package/dist/react-tooltip.esm.js +20 -10
- package/dist/react-tooltip.esm.js.map +2 -2
- package/dist/react-tooltip.esm.min.js +1 -1
- package/dist/react-tooltip.esm.min.js.map +3 -3
- package/dist/react-tooltip.iife.js +20 -10
- package/dist/react-tooltip.iife.js.map +2 -2
- package/dist/react-tooltip.iife.min.js +1 -1
- package/dist/react-tooltip.iife.min.js.map +3 -3
- package/dist/react-tooltip.min.js +1 -1
- package/dist/react-tooltip.min.js.map +3 -3
- package/package.json +5 -7
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/index.tsx", "../src/components/TooltipController/TooltipController.tsx", "../src/components/Tooltip/Tooltip.tsx", "../src/utils/debounce.ts", "../src/components/TooltipContent/TooltipContent.tsx", "../src/components/TooltipProvider/TooltipProvider.tsx", "../src/components/TooltipProvider/TooltipWrapper.tsx", "../src/utils/use-isomorphic-layout-effect.ts", "../src/utils/compute-positions.ts", "esbuild-css-modules-plugin-namespace:./src/components/Tooltip/styles.module.css?esbuild-css-modules-plugin-building"],
|
|
4
|
-
"sourcesContent": ["import './tokens.css'\nimport type {\n ChildrenType,\n DataAttribute,\n EventsType,\n PlacesType,\n PositionStrategy,\n VariantType,\n WrapperType,\n IPosition,\n Middleware,\n} from './components/Tooltip/TooltipTypes'\nimport type { ITooltipController } from './components/TooltipController/TooltipControllerTypes'\nimport type { ITooltipWrapper } from './components/TooltipProvider/TooltipProviderTypes'\n\nexport { TooltipController as Tooltip } from './components/TooltipController'\nexport { TooltipProvider, TooltipWrapper } from './components/TooltipProvider'\nexport type {\n ChildrenType,\n DataAttribute,\n EventsType,\n PlacesType,\n PositionStrategy,\n VariantType,\n WrapperType,\n ITooltipController as ITooltip,\n ITooltipWrapper,\n IPosition,\n Middleware,\n}\n", "import { useEffect, useState } from 'react'\nimport { Tooltip } from 'components/Tooltip'\nimport type {\n EventsType,\n PositionStrategy,\n PlacesType,\n VariantType,\n WrapperType,\n DataAttribute,\n ITooltip,\n} from 'components/Tooltip/TooltipTypes'\nimport { useTooltip } from 'components/TooltipProvider'\nimport type { ITooltipController } from './TooltipControllerTypes'\n\nconst TooltipController = ({\n id,\n anchorId,\n anchorSelect,\n content,\n html,\n className,\n classNameArrow,\n variant = 'dark',\n place = 'top',\n offset = 10,\n wrapper = 'div',\n children = null,\n events = ['hover'],\n positionStrategy = 'absolute',\n middlewares,\n delayShow = 0,\n delayHide = 0,\n float = false,\n noArrow = false,\n clickable = false,\n closeOnEsc = false,\n style,\n position,\n isOpen,\n setIsOpen,\n afterShow,\n afterHide,\n}: ITooltipController) => {\n const [tooltipContent, setTooltipContent] = useState(content)\n const [tooltipHtml, setTooltipHtml] = useState(html)\n const [tooltipPlace, setTooltipPlace] = useState(place)\n const [tooltipVariant, setTooltipVariant] = useState(variant)\n const [tooltipOffset, setTooltipOffset] = useState(offset)\n const [tooltipDelayShow, setTooltipDelayShow] = useState(delayShow)\n const [tooltipDelayHide, setTooltipDelayHide] = useState(delayHide)\n const [tooltipFloat, setTooltipFloat] = useState(float)\n const [tooltipWrapper, setTooltipWrapper] = useState<WrapperType>(wrapper)\n const [tooltipEvents, setTooltipEvents] = useState(events)\n const [tooltipPositionStrategy, setTooltipPositionStrategy] = useState(positionStrategy)\n const [activeAnchor, setActiveAnchor] = useState<HTMLElement | null>(null)\n /**\n * @todo Remove this in a future version (provider/wrapper method is deprecated)\n */\n const { anchorRefs, activeAnchor: providerActiveAnchor } = useTooltip(id)\n\n const getDataAttributesFromAnchorElement = (elementReference: HTMLElement) => {\n const dataAttributes = elementReference?.getAttributeNames().reduce((acc, name) => {\n if (name.startsWith('data-tooltip-')) {\n const parsedAttribute = name.replace(/^data-tooltip-/, '') as DataAttribute\n acc[parsedAttribute] = elementReference?.getAttribute(name) ?? null\n }\n return acc\n }, {} as Record<DataAttribute, string | null>)\n\n return dataAttributes\n }\n\n const applyAllDataAttributesFromAnchorElement = (\n dataAttributes: Record<string, string | null>,\n ) => {\n const handleDataAttributes: Record<DataAttribute, (value: string | null) => void> = {\n place: (value) => {\n setTooltipPlace((value as PlacesType) ?? place)\n },\n content: (value) => {\n setTooltipContent(value ?? content)\n },\n html: (value) => {\n setTooltipHtml(value ?? html)\n },\n variant: (value) => {\n setTooltipVariant((value as VariantType) ?? variant)\n },\n offset: (value) => {\n setTooltipOffset(value === null ? offset : Number(value))\n },\n wrapper: (value) => {\n setTooltipWrapper((value as WrapperType) ?? wrapper)\n },\n events: (value) => {\n const parsed = value?.split(' ') as EventsType[]\n setTooltipEvents(parsed ?? events)\n },\n 'position-strategy': (value) => {\n setTooltipPositionStrategy((value as PositionStrategy) ?? positionStrategy)\n },\n 'delay-show': (value) => {\n setTooltipDelayShow(value === null ? delayShow : Number(value))\n },\n 'delay-hide': (value) => {\n setTooltipDelayHide(value === null ? delayHide : Number(value))\n },\n float: (value) => {\n setTooltipFloat(value === null ? float : value === 'true')\n },\n }\n // reset unset data attributes to default values\n // without this, data attributes from the last active anchor will still be used\n Object.values(handleDataAttributes).forEach((handler) => handler(null))\n Object.entries(dataAttributes).forEach(([key, value]) => {\n handleDataAttributes[key as DataAttribute]?.(value)\n })\n }\n\n useEffect(() => {\n setTooltipContent(content)\n }, [content])\n\n useEffect(() => {\n setTooltipHtml(html)\n }, [html])\n\n useEffect(() => {\n setTooltipPlace(place)\n }, [place])\n\n useEffect(() => {\n const elementRefs = new Set(anchorRefs)\n\n let selector = anchorSelect\n if (!selector && id) {\n selector = `[data-tooltip-id='${id}']`\n }\n if (selector) {\n try {\n const anchorsBySelect = document.querySelectorAll<HTMLElement>(selector)\n anchorsBySelect.forEach((anchor) => {\n elementRefs.add({ current: anchor })\n })\n } catch {\n if (!process.env.NODE_ENV || process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line no-console\n console.warn(`[react-tooltip] \"${anchorSelect}\" is not a valid CSS selector`)\n }\n }\n }\n\n const anchorById = document.querySelector<HTMLElement>(`[id='${anchorId}']`)\n if (anchorById) {\n elementRefs.add({ current: anchorById })\n }\n\n if (!elementRefs.size) {\n return () => null\n }\n\n const anchorElement = activeAnchor ?? anchorById ?? providerActiveAnchor.current\n\n const observerCallback: MutationCallback = (mutationList) => {\n mutationList.forEach((mutation) => {\n if (\n !anchorElement ||\n mutation.type !== 'attributes' ||\n !mutation.attributeName?.startsWith('data-tooltip-')\n ) {\n return\n }\n // make sure to get all set attributes, since all unset attributes are reset\n const dataAttributes = getDataAttributesFromAnchorElement(anchorElement)\n applyAllDataAttributesFromAnchorElement(dataAttributes)\n })\n }\n\n // Create an observer instance linked to the callback function\n const observer = new MutationObserver(observerCallback)\n\n // do not check for subtree and childrens, we only want to know attribute changes\n // to stay watching `data-attributes-*` from anchor element\n const observerConfig = { attributes: true, childList: false, subtree: false }\n\n if (anchorElement) {\n const dataAttributes = getDataAttributesFromAnchorElement(anchorElement)\n applyAllDataAttributesFromAnchorElement(dataAttributes)\n // Start observing the target node for configured mutations\n observer.observe(anchorElement, observerConfig)\n }\n\n return () => {\n // Remove the observer when the tooltip is destroyed\n observer.disconnect()\n }\n }, [anchorRefs, providerActiveAnchor, activeAnchor, anchorId, anchorSelect])\n\n const props: ITooltip = {\n id,\n anchorId,\n anchorSelect,\n className,\n classNameArrow,\n content: tooltipContent,\n html: tooltipHtml,\n place: tooltipPlace,\n variant: tooltipVariant,\n offset: tooltipOffset,\n wrapper: tooltipWrapper,\n events: tooltipEvents,\n positionStrategy: tooltipPositionStrategy,\n middlewares,\n delayShow: tooltipDelayShow,\n delayHide: tooltipDelayHide,\n float: tooltipFloat,\n noArrow,\n clickable,\n closeOnEsc,\n style,\n position,\n isOpen,\n setIsOpen,\n afterShow,\n afterHide,\n activeAnchor,\n setActiveAnchor: (anchor: HTMLElement | null) => setActiveAnchor(anchor),\n }\n\n return children ? <Tooltip {...props}>{children}</Tooltip> : <Tooltip {...props} />\n}\n\nexport default TooltipController\n", "import { useEffect, useState, useRef } from 'react'\nimport classNames from 'classnames'\nimport debounce from 'utils/debounce'\nimport { TooltipContent } from 'components/TooltipContent'\nimport { useTooltip } from 'components/TooltipProvider'\nimport useIsomorphicLayoutEffect from 'utils/use-isomorphic-layout-effect'\nimport { computeTooltipPosition } from '../../utils/compute-positions'\nimport styles from './styles.module.css'\nimport type { IPosition, ITooltip } from './TooltipTypes'\n\nconst Tooltip = ({\n // props\n id,\n className,\n classNameArrow,\n variant = 'dark',\n anchorId,\n anchorSelect,\n place = 'top',\n offset = 10,\n events = ['hover'],\n positionStrategy = 'absolute',\n middlewares,\n wrapper: WrapperElement,\n children = null,\n delayShow = 0,\n delayHide = 0,\n float = false,\n noArrow = false,\n clickable = false,\n closeOnEsc = false,\n style: externalStyles,\n position,\n afterShow,\n afterHide,\n // props handled by controller\n content,\n html,\n isOpen,\n setIsOpen,\n activeAnchor,\n setActiveAnchor,\n}: ITooltip) => {\n const tooltipRef = useRef<HTMLElement>(null)\n const tooltipArrowRef = useRef<HTMLElement>(null)\n const tooltipShowDelayTimerRef = useRef<NodeJS.Timeout | null>(null)\n const tooltipHideDelayTimerRef = useRef<NodeJS.Timeout | null>(null)\n const [inlineStyles, setInlineStyles] = useState({})\n const [inlineArrowStyles, setInlineArrowStyles] = useState({})\n const [show, setShow] = useState(false)\n const [rendered, setRendered] = useState(false)\n const wasShowing = useRef(false)\n const lastFloatPosition = useRef<IPosition | null>(null)\n /**\n * @todo Remove this in a future version (provider/wrapper method is deprecated)\n */\n const { anchorRefs, setActiveAnchor: setProviderActiveAnchor } = useTooltip(id)\n const hoveringTooltip = useRef(false)\n const [anchorsBySelect, setAnchorsBySelect] = useState<HTMLElement[]>([])\n const mounted = useRef(false)\n\n /**\n * useLayoutEffect runs before useEffect,\n * but should be used carefully because of caveats\n * https://beta.reactjs.org/reference/react/useLayoutEffect#caveats\n */\n useIsomorphicLayoutEffect(() => {\n mounted.current = true\n return () => {\n mounted.current = false\n }\n }, [])\n\n useEffect(() => {\n if (!show) {\n /**\n * this fixes weird behavior when switching between two anchor elements very quickly\n * remove the timeout and switch quickly between two adjancent anchor elements to see it\n *\n * in practice, this means the tooltip is not immediately removed from the DOM on hide\n */\n const timeout = setTimeout(() => {\n setRendered(false)\n }, 150)\n return () => {\n clearTimeout(timeout)\n }\n }\n return () => null\n }, [show])\n\n const handleShow = (value: boolean) => {\n if (!mounted.current) {\n return\n }\n if (value) {\n setRendered(true)\n }\n /**\n * wait for the component to render and calculate position\n * before actually showing\n */\n setTimeout(() => {\n if (!mounted.current) {\n return\n }\n setIsOpen?.(value)\n if (isOpen === undefined) {\n setShow(value)\n }\n }, 10)\n }\n\n /**\n * this replicates the effect from `handleShow()`\n * when `isOpen` is changed from outside\n */\n useEffect(() => {\n if (isOpen === undefined) {\n return () => null\n }\n if (isOpen) {\n setRendered(true)\n }\n const timeout = setTimeout(() => {\n setShow(isOpen)\n }, 10)\n return () => {\n clearTimeout(timeout)\n }\n }, [isOpen])\n\n useEffect(() => {\n if (show === wasShowing.current) {\n return\n }\n wasShowing.current = show\n if (show) {\n afterShow?.()\n } else {\n afterHide?.()\n }\n }, [show])\n\n const handleShowTooltipDelayed = () => {\n if (tooltipShowDelayTimerRef.current) {\n clearTimeout(tooltipShowDelayTimerRef.current)\n }\n\n tooltipShowDelayTimerRef.current = setTimeout(() => {\n handleShow(true)\n }, delayShow)\n }\n\n const handleHideTooltipDelayed = (delay = delayHide) => {\n if (tooltipHideDelayTimerRef.current) {\n clearTimeout(tooltipHideDelayTimerRef.current)\n }\n\n tooltipHideDelayTimerRef.current = setTimeout(() => {\n if (hoveringTooltip.current) {\n return\n }\n handleShow(false)\n }, delay)\n }\n\n const handleShowTooltip = (event?: Event) => {\n if (!event) {\n return\n }\n if (delayShow) {\n handleShowTooltipDelayed()\n } else {\n handleShow(true)\n }\n const target = event.currentTarget ?? event.target\n setActiveAnchor(target as HTMLElement)\n setProviderActiveAnchor({ current: target as HTMLElement })\n\n if (tooltipHideDelayTimerRef.current) {\n clearTimeout(tooltipHideDelayTimerRef.current)\n }\n }\n\n const handleHideTooltip = () => {\n if (clickable) {\n // allow time for the mouse to reach the tooltip, in case there's a gap\n handleHideTooltipDelayed(delayHide || 100)\n } else if (delayHide) {\n handleHideTooltipDelayed()\n } else {\n handleShow(false)\n }\n\n if (tooltipShowDelayTimerRef.current) {\n clearTimeout(tooltipShowDelayTimerRef.current)\n }\n }\n\n const handleTooltipPosition = ({ x, y }: IPosition) => {\n const virtualElement = {\n getBoundingClientRect() {\n return {\n x,\n y,\n width: 0,\n height: 0,\n top: y,\n left: x,\n right: x,\n bottom: y,\n }\n },\n } as Element\n computeTooltipPosition({\n place,\n offset,\n elementReference: virtualElement,\n tooltipReference: tooltipRef.current,\n tooltipArrowReference: tooltipArrowRef.current,\n strategy: positionStrategy,\n middlewares,\n }).then((computedStylesData) => {\n if (Object.keys(computedStylesData.tooltipStyles).length) {\n setInlineStyles(computedStylesData.tooltipStyles)\n }\n if (Object.keys(computedStylesData.tooltipArrowStyles).length) {\n setInlineArrowStyles(computedStylesData.tooltipArrowStyles)\n }\n })\n }\n\n const handleMouseMove = (event?: Event) => {\n if (!event) {\n return\n }\n const mouseEvent = event as MouseEvent\n const mousePosition = {\n x: mouseEvent.clientX,\n y: mouseEvent.clientY,\n }\n handleTooltipPosition(mousePosition)\n lastFloatPosition.current = mousePosition\n }\n\n const handleClickTooltipAnchor = (event?: Event) => {\n handleShowTooltip(event)\n if (delayHide) {\n handleHideTooltipDelayed()\n }\n }\n\n const handleClickOutsideAnchors = (event: MouseEvent) => {\n const anchorById = document.querySelector<HTMLElement>(`[id='${anchorId}']`)\n if (anchorById?.contains(event.target as HTMLElement)) {\n return\n }\n if (anchorsBySelect.some((anchor) => anchor.contains(event.target as HTMLElement))) {\n return\n }\n handleShow(false)\n }\n\n const handleEsc = (event: KeyboardEvent) => {\n if (event.key !== 'Escape') {\n return\n }\n handleShow(false)\n }\n\n // debounce handler to prevent call twice when\n // mouse enter and focus events being triggered toggether\n const debouncedHandleShowTooltip = debounce(handleShowTooltip, 50)\n const debouncedHandleHideTooltip = debounce(handleHideTooltip, 50)\n\n useEffect(() => {\n const elementRefs = new Set(anchorRefs)\n\n anchorsBySelect.forEach((anchor) => {\n elementRefs.add({ current: anchor })\n })\n\n const anchorById = document.querySelector<HTMLElement>(`[id='${anchorId}']`)\n if (anchorById) {\n elementRefs.add({ current: anchorById })\n }\n\n if (closeOnEsc) {\n window.addEventListener('keydown', handleEsc)\n }\n\n const enabledEvents: { event: string; listener: (event?: Event) => void }[] = []\n\n if (events.find((event: string) => event === 'click')) {\n window.addEventListener('click', handleClickOutsideAnchors)\n enabledEvents.push({ event: 'click', listener: handleClickTooltipAnchor })\n }\n\n if (events.find((event: string) => event === 'hover')) {\n enabledEvents.push(\n { event: 'mouseenter', listener: debouncedHandleShowTooltip },\n { event: 'mouseleave', listener: debouncedHandleHideTooltip },\n { event: 'focus', listener: debouncedHandleShowTooltip },\n { event: 'blur', listener: debouncedHandleHideTooltip },\n )\n if (float) {\n enabledEvents.push({\n event: 'mousemove',\n listener: handleMouseMove,\n })\n }\n }\n\n const handleMouseEnterTooltip = () => {\n hoveringTooltip.current = true\n }\n const handleMouseLeaveTooltip = () => {\n hoveringTooltip.current = false\n handleHideTooltip()\n }\n\n if (clickable) {\n tooltipRef.current?.addEventListener('mouseenter', handleMouseEnterTooltip)\n tooltipRef.current?.addEventListener('mouseleave', handleMouseLeaveTooltip)\n }\n\n enabledEvents.forEach(({ event, listener }) => {\n elementRefs.forEach((ref) => {\n ref.current?.addEventListener(event, listener)\n })\n })\n\n return () => {\n if (events.find((event: string) => event === 'click')) {\n window.removeEventListener('click', handleClickOutsideAnchors)\n }\n if (closeOnEsc) {\n window.removeEventListener('keydown', handleEsc)\n }\n if (clickable) {\n tooltipRef.current?.removeEventListener('mouseenter', handleMouseEnterTooltip)\n tooltipRef.current?.removeEventListener('mouseleave', handleMouseLeaveTooltip)\n }\n enabledEvents.forEach(({ event, listener }) => {\n elementRefs.forEach((ref) => {\n ref.current?.removeEventListener(event, listener)\n })\n })\n }\n /**\n * rendered is also a dependency to ensure anchor observers are re-registered\n * since `tooltipRef` becomes stale after removing/adding the tooltip to the DOM\n */\n }, [rendered, anchorRefs, anchorsBySelect, closeOnEsc, events])\n\n useEffect(() => {\n let selector = anchorSelect ?? ''\n if (!selector && id) {\n selector = `[data-tooltip-id='${id}']`\n }\n const documentObserverCallback: MutationCallback = (mutationList) => {\n const newAnchors: HTMLElement[] = []\n mutationList.forEach((mutation) => {\n if (mutation.type === 'attributes' && mutation.attributeName === 'data-tooltip-id') {\n const newId = (mutation.target as HTMLElement).getAttribute('data-tooltip-id')\n if (newId === id) {\n newAnchors.push(mutation.target as HTMLElement)\n }\n }\n if (mutation.type !== 'childList') {\n return\n }\n if (activeAnchor) {\n ;[...mutation.removedNodes].some((node) => {\n if (node.contains(activeAnchor)) {\n setRendered(false)\n handleShow(false)\n setActiveAnchor(null)\n return true\n }\n return false\n })\n }\n if (!selector) {\n return\n }\n try {\n const elements = [...mutation.addedNodes].filter((node) => node.nodeType === 1)\n newAnchors.push(\n // the element itself is an anchor\n ...(elements.filter((element) =>\n (element as HTMLElement).matches(selector),\n ) as HTMLElement[]),\n )\n newAnchors.push(\n // the element has children which are anchors\n ...elements.flatMap(\n (element) =>\n [...(element as HTMLElement).querySelectorAll(selector)] as HTMLElement[],\n ),\n )\n } catch {\n /**\n * invalid CSS selector.\n * already warned on tooltip controller\n */\n }\n })\n if (newAnchors.length) {\n setAnchorsBySelect((anchors) => [...anchors, ...newAnchors])\n }\n }\n const documentObserver = new MutationObserver(documentObserverCallback)\n // watch for anchor being removed from the DOM\n documentObserver.observe(document.body, {\n childList: true,\n subtree: true,\n attributes: true,\n attributeFilter: ['data-tooltip-id'],\n })\n return () => {\n documentObserver.disconnect()\n }\n }, [id, anchorSelect, activeAnchor])\n\n useEffect(() => {\n if (position) {\n // if `position` is set, override regular and `float` positioning\n handleTooltipPosition(position)\n return\n }\n\n if (float) {\n if (lastFloatPosition.current) {\n /*\n Without this, changes to `content`, `place`, `offset`, ..., will only\n trigger a position calculation after a `mousemove` event.\n\n To see why this matters, comment this line, run `yarn dev` and click the\n \"Hover me!\" anchor.\n */\n handleTooltipPosition(lastFloatPosition.current)\n }\n // if `float` is set, override regular positioning\n return\n }\n\n computeTooltipPosition({\n place,\n offset,\n elementReference: activeAnchor,\n tooltipReference: tooltipRef.current,\n tooltipArrowReference: tooltipArrowRef.current,\n strategy: positionStrategy,\n middlewares,\n }).then((computedStylesData) => {\n if (!mounted.current) {\n // invalidate computed positions after remount\n return\n }\n if (Object.keys(computedStylesData.tooltipStyles).length) {\n setInlineStyles(computedStylesData.tooltipStyles)\n }\n if (Object.keys(computedStylesData.tooltipArrowStyles).length) {\n setInlineArrowStyles(computedStylesData.tooltipArrowStyles)\n }\n })\n }, [show, activeAnchor, content, html, place, offset, positionStrategy, position])\n\n useEffect(() => {\n const anchorById = document.querySelector<HTMLElement>(`[id='${anchorId}']`)\n const anchors = [...anchorsBySelect, anchorById]\n if (!activeAnchor || !anchors.includes(activeAnchor)) {\n /**\n * if there is no active anchor,\n * or if the current active anchor is not amongst the allowed ones,\n * reset it\n */\n setActiveAnchor(anchorsBySelect[0] ?? anchorById)\n }\n }, [anchorId, anchorsBySelect, activeAnchor])\n\n useEffect(() => {\n return () => {\n if (tooltipShowDelayTimerRef.current) {\n clearTimeout(tooltipShowDelayTimerRef.current)\n }\n if (tooltipHideDelayTimerRef.current) {\n clearTimeout(tooltipHideDelayTimerRef.current)\n }\n }\n }, [])\n\n useEffect(() => {\n let selector = anchorSelect\n if (!selector && id) {\n selector = `[data-tooltip-id='${id}']`\n }\n if (!selector) {\n return\n }\n try {\n const anchors = Array.from(document.querySelectorAll<HTMLElement>(selector))\n setAnchorsBySelect(anchors)\n } catch {\n // warning was already issued in the controller\n setAnchorsBySelect([])\n }\n }, [id, anchorSelect])\n\n const hasContentOrChildren = Boolean(html || content || children)\n const canShow = hasContentOrChildren && show && Object.keys(inlineStyles).length > 0\n\n return rendered ? (\n <WrapperElement\n id={id}\n role=\"tooltip\"\n className={classNames('react-tooltip', styles['tooltip'], styles[variant], className, {\n [styles['show']]: canShow,\n [styles['fixed']]: positionStrategy === 'fixed',\n [styles['clickable']]: clickable,\n })}\n style={{ ...externalStyles, ...inlineStyles }}\n ref={tooltipRef}\n >\n {/**\n * content priority: html > content > children\n * children should be last so that it can be used as the \"default\" content\n */}\n {(html && <TooltipContent content={html} />) || content || children}\n <WrapperElement\n className={classNames('react-tooltip-arrow', styles['arrow'], classNameArrow, {\n /**\n * changed from dash `no-arrow` to camelcase because of:\n * https://github.com/indooorsman/esbuild-css-modules-plugin/issues/42\n */\n [styles['noArrow']]: noArrow,\n })}\n style={inlineArrowStyles}\n ref={tooltipArrowRef}\n />\n </WrapperElement>\n ) : null\n}\n\nexport default Tooltip\n", "/* eslint-disable @typescript-eslint/no-explicit-any */\n/**\n * This function debounce the received function\n * @param { function } \tfunc\t\t\t\tFunction to be debounced\n * @param { number } \t\twait\t\t\t\tTime to wait before execut the function\n * @param { boolean } \timmediate\t\tParam to define if the function will be executed immediately\n */\nconst debounce = (func: (...args: any[]) => void, wait?: number, immediate?: true) => {\n let timeout: NodeJS.Timeout | null = null\n\n return function debounced(this: typeof func, ...args: any[]) {\n const later = () => {\n timeout = null\n if (!immediate) {\n func.apply(this, args)\n }\n }\n\n if (timeout) {\n clearTimeout(timeout)\n }\n\n timeout = setTimeout(later, wait)\n }\n}\n\nexport default debounce\n", "/* eslint-disable react/no-danger */\nimport type { ITooltipContent } from './TooltipContentTypes'\n\nconst TooltipContent = ({ content }: ITooltipContent) => {\n return <span dangerouslySetInnerHTML={{ __html: content }} />\n}\n\nexport default TooltipContent\n", "import React, {\n createContext,\n PropsWithChildren,\n useCallback,\n useContext,\n useMemo,\n useState,\n} from 'react'\n\nimport type {\n AnchorRef,\n TooltipContextData,\n TooltipContextDataWrapper,\n} from './TooltipProviderTypes'\n\nconst DEFAULT_TOOLTIP_ID = 'DEFAULT_TOOLTIP_ID'\nconst DEFAULT_CONTEXT_DATA: TooltipContextData = {\n anchorRefs: new Set(),\n activeAnchor: { current: null },\n attach: () => {\n /* attach anchor element */\n },\n detach: () => {\n /* detach anchor element */\n },\n setActiveAnchor: () => {\n /* set active anchor */\n },\n}\n\nconst DEFAULT_CONTEXT_DATA_WRAPPER: TooltipContextDataWrapper = {\n getTooltipData: () => DEFAULT_CONTEXT_DATA,\n}\n\nconst TooltipContext = createContext<TooltipContextDataWrapper>(DEFAULT_CONTEXT_DATA_WRAPPER)\n\n/**\n * @deprecated Use the `data-tooltip-id` attribute, or the `anchorSelect` prop instead.\n * See https://react-tooltip.com/docs/getting-started\n */\nconst TooltipProvider: React.FC<PropsWithChildren<void>> = ({ children }) => {\n const [anchorRefMap, setAnchorRefMap] = useState<Record<string, Set<AnchorRef>>>({\n [DEFAULT_TOOLTIP_ID]: new Set(),\n })\n const [activeAnchorMap, setActiveAnchorMap] = useState<Record<string, AnchorRef>>({\n [DEFAULT_TOOLTIP_ID]: { current: null },\n })\n\n const attach = (tooltipId: string, ...refs: AnchorRef[]) => {\n setAnchorRefMap((oldMap) => {\n const tooltipRefs = oldMap[tooltipId] ?? new Set()\n refs.forEach((ref) => tooltipRefs.add(ref))\n // create new object to trigger re-render\n return { ...oldMap, [tooltipId]: new Set(tooltipRefs) }\n })\n }\n\n const detach = (tooltipId: string, ...refs: AnchorRef[]) => {\n setAnchorRefMap((oldMap) => {\n const tooltipRefs = oldMap[tooltipId]\n if (!tooltipRefs) {\n // tooltip not found\n // maybe thow error?\n return oldMap\n }\n refs.forEach((ref) => tooltipRefs.delete(ref))\n // create new object to trigger re-render\n return { ...oldMap }\n })\n }\n\n const setActiveAnchor = (tooltipId: string, ref: React.RefObject<HTMLElement>) => {\n setActiveAnchorMap((oldMap) => {\n if (oldMap[tooltipId]?.current === ref.current) {\n return oldMap\n }\n // create new object to trigger re-render\n return { ...oldMap, [tooltipId]: ref }\n })\n }\n\n const getTooltipData = useCallback(\n (tooltipId = DEFAULT_TOOLTIP_ID) => ({\n anchorRefs: anchorRefMap[tooltipId] ?? new Set(),\n activeAnchor: activeAnchorMap[tooltipId] ?? { current: null },\n attach: (...refs: AnchorRef[]) => attach(tooltipId, ...refs),\n detach: (...refs: AnchorRef[]) => detach(tooltipId, ...refs),\n setActiveAnchor: (ref: AnchorRef) => setActiveAnchor(tooltipId, ref),\n }),\n [anchorRefMap, activeAnchorMap, attach, detach],\n )\n\n const context = useMemo(() => {\n return {\n getTooltipData,\n }\n }, [getTooltipData])\n\n return <TooltipContext.Provider value={context}>{children}</TooltipContext.Provider>\n}\n\nexport function useTooltip(tooltipId = DEFAULT_TOOLTIP_ID) {\n return useContext(TooltipContext).getTooltipData(tooltipId)\n}\n\nexport default TooltipProvider\n", "import { useEffect, useRef } from 'react'\nimport classNames from 'classnames'\nimport { useTooltip } from './TooltipProvider'\nimport type { ITooltipWrapper } from './TooltipProviderTypes'\n\n/**\n * @deprecated Use the `data-tooltip-id` attribute, or the `anchorSelect` prop instead.\n * See https://react-tooltip.com/docs/getting-started\n */\nconst TooltipWrapper = ({\n tooltipId,\n children,\n className,\n place,\n content,\n html,\n variant,\n offset,\n wrapper,\n events,\n positionStrategy,\n delayShow,\n delayHide,\n}: ITooltipWrapper) => {\n const { attach, detach } = useTooltip(tooltipId)\n const anchorRef = useRef<HTMLElement | null>(null)\n\n useEffect(() => {\n attach(anchorRef)\n return () => {\n detach(anchorRef)\n }\n }, [])\n\n return (\n <span\n ref={anchorRef}\n className={classNames('react-tooltip-wrapper', className)}\n data-tooltip-place={place}\n data-tooltip-content={content}\n data-tooltip-html={html}\n data-tooltip-variant={variant}\n data-tooltip-offset={offset}\n data-tooltip-wrapper={wrapper}\n data-tooltip-events={events}\n data-tooltip-position-strategy={positionStrategy}\n data-tooltip-delay-show={delayShow}\n data-tooltip-delay-hide={delayHide}\n >\n {children}\n </span>\n )\n}\n\nexport default TooltipWrapper\n", "import { useLayoutEffect, useEffect } from 'react'\n\nconst useIsomorphicLayoutEffect = typeof window !== 'undefined' ? useLayoutEffect : useEffect\n\nexport default useIsomorphicLayoutEffect\n", "import { computePosition, offset, shift, arrow, flip } from '@floating-ui/dom'\nimport type { IComputePositions } from './compute-positions-types'\n\nexport const computeTooltipPosition = async ({\n elementReference = null,\n tooltipReference = null,\n tooltipArrowReference = null,\n place = 'top',\n offset: offsetValue = 10,\n strategy = 'absolute',\n middlewares = [offset(Number(offsetValue)), flip(), shift({ padding: 5 })],\n}: IComputePositions) => {\n if (!elementReference) {\n // elementReference can be null or undefined and we will not compute the position\n // eslint-disable-next-line no-console\n // console.error('The reference element for tooltip was not defined: ', elementReference)\n return { tooltipStyles: {}, tooltipArrowStyles: {} }\n }\n\n if (tooltipReference === null) {\n return { tooltipStyles: {}, tooltipArrowStyles: {} }\n }\n\n const middleware = middlewares\n\n if (tooltipArrowReference) {\n middleware.push(arrow({ element: tooltipArrowReference as HTMLElement, padding: 5 }))\n\n return computePosition(elementReference as HTMLElement, tooltipReference as HTMLElement, {\n placement: place,\n strategy,\n middleware,\n }).then(({ x, y, placement, middlewareData }) => {\n const styles = { left: `${x}px`, top: `${y}px` }\n\n const { x: arrowX, y: arrowY } = middlewareData.arrow ?? { x: 0, y: 0 }\n\n const staticSide =\n {\n top: 'bottom',\n right: 'left',\n bottom: 'top',\n left: 'right',\n }[placement.split('-')[0]] ?? 'bottom'\n\n const arrowStyle = {\n left: arrowX != null ? `${arrowX}px` : '',\n top: arrowY != null ? `${arrowY}px` : '',\n right: '',\n bottom: '',\n [staticSide]: '-4px',\n }\n\n return { tooltipStyles: styles, tooltipArrowStyles: arrowStyle }\n })\n }\n\n return computePosition(elementReference as HTMLElement, tooltipReference as HTMLElement, {\n placement: 'bottom',\n strategy,\n middleware,\n }).then(({ x, y }) => {\n const styles = { left: `${x}px`, top: `${y}px` }\n\n return { tooltipStyles: styles, tooltipArrowStyles: {} }\n })\n}\n", "import \"./styles.module.css?esbuild-css-modules-plugin-built\";\nexport default {\"arrow\":\"react-tooltip__arrow_KtSkBq\",\"clickable\":\"react-tooltip__clickable_KtSkBq\",\"dark\":\"react-tooltip__dark_KtSkBq\",\"error\":\"react-tooltip__error_KtSkBq\",\"fixed\":\"react-tooltip__fixed_KtSkBq\",\"info\":\"react-tooltip__info_KtSkBq\",\"light\":\"react-tooltip__light_KtSkBq\",\"noArrow\":\"react-tooltip__no-arrow_KtSkBq\",\"show\":\"react-tooltip__show_KtSkBq\",\"success\":\"react-tooltip__success_KtSkBq\",\"tooltip\":\"react-tooltip__tooltip_KtSkBq\",\"warning\":\"react-tooltip__warning_KtSkBq\"};;\nexport const arrow = \"react-tooltip__arrow_KtSkBq\";\nexport const clickable = \"react-tooltip__clickable_KtSkBq\";\nexport const dark = \"react-tooltip__dark_KtSkBq\";\nexport const error = \"react-tooltip__error_KtSkBq\";\nexport const fixed = \"react-tooltip__fixed_KtSkBq\";\nexport const info = \"react-tooltip__info_KtSkBq\";\nexport const light = \"react-tooltip__light_KtSkBq\";\nexport const noArrow = \"react-tooltip__no-arrow_KtSkBq\";\nexport const show = \"react-tooltip__show_KtSkBq\";\nexport const success = \"react-tooltip__success_KtSkBq\";\nexport const tooltip = \"react-tooltip__tooltip_KtSkBq\";\nexport const warning = \"react-tooltip__warning_KtSkBq\";"],
|
|
5
|
-
"mappings": "+kBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,aAAAE,GAAA,oBAAAC,GAAA,mBAAAC,KAAA,eAAAC,GAAAL,ICAA,IAAAM,EAAoC,iBCApC,IAAAC,EAA4C,iBAC5CC,GAAuB,0BCMvB,IAAMC,GAAW,CAACC,EAAgCC,EAAeC,IAAqB,CACpF,IAAIC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A,QAASqB,EACT,KAAME,EACN,MAAOE,EACP,QAASE,GACT,OAAQE,GACR,QAASQ,GACT,OAAQE,GACR,iBAAkBE,GAClB,YAAAjC,EACA,UAAWuB,EACX,UAAWE,GACX,MAAOE,GACP,QAAAvB,EACA,UAAAC,GACA,WAAAC,EACA,MAAAC,GACA,SAAAC,GACA,OAAAC,GACA,UAAAC,EACA,UAAAC,EACA,UAAAC,GACA,aAAAuB,EACA,gBAAkBoB,GAA+BnB,GAAgBmB,CAAM,CACzE,EAEA,OAAO1D,KAAW,QAACoE,GAAA,CAAS,GAAGD,GAAQ,SAAAnE,EAAS,KAAa,QAACoE,GAAA,CAAS,GAAGD,GAAO,CACnF,EAEOE,GAAQjF",
|
|
6
|
-
"names": ["src_exports", "__export", "TooltipController_default", "TooltipProvider_default", "TooltipWrapper_default", "__toCommonJS", "import_react", "import_react", "import_classnames", "debounce", "func", "wait", "immediate", "timeout", "args", "later", "debounce_default", "import_jsx_runtime", "TooltipContent", "content", "TooltipContent_default", "import_react", "import_jsx_runtime", "DEFAULT_TOOLTIP_ID", "DEFAULT_CONTEXT_DATA", "DEFAULT_CONTEXT_DATA_WRAPPER", "TooltipContext", "TooltipProvider", "children", "anchorRefMap", "setAnchorRefMap", "activeAnchorMap", "setActiveAnchorMap", "attach", "tooltipId", "refs", "oldMap", "_a", "tooltipRefs", "ref", "detach", "setActiveAnchor", "getTooltipData", "_b", "context", "useTooltip", "TooltipProvider_default", "import_react", "import_classnames", "import_jsx_runtime", "TooltipWrapper", "tooltipId", "children", "className", "place", "content", "html", "variant", "offset", "wrapper", "events", "positionStrategy", "delayShow", "delayHide", "attach", "detach", "useTooltip", "anchorRef", "classNames", "TooltipWrapper_default", "import_react", "useIsomorphicLayoutEffect", "use_isomorphic_layout_effect_default", "import_dom", "computeTooltipPosition", "elementReference", "tooltipReference", "tooltipArrowReference", "place", "offsetValue", "strategy", "middlewares", "middleware", "x", "y", "placement", "middlewareData", "_a", "_b", "styles", "arrowX", "arrowY", "staticSide", "arrowStyle", "styles_module_default", "import_jsx_runtime", "Tooltip", "id", "className", "classNameArrow", "variant", "anchorId", "anchorSelect", "place", "offset", "events", "positionStrategy", "middlewares", "WrapperElement", "children", "delayShow", "delayHide", "float", "noArrow", "clickable", "closeOnEsc", "externalStyles", "position", "afterShow", "afterHide", "content", "html", "isOpen", "setIsOpen", "activeAnchor", "setActiveAnchor", "tooltipRef", "tooltipArrowRef", "tooltipShowDelayTimerRef", "tooltipHideDelayTimerRef", "inlineStyles", "setInlineStyles", "inlineArrowStyles", "setInlineArrowStyles", "show", "setShow", "rendered", "setRendered", "wasShowing", "lastFloatPosition", "anchorRefs", "setProviderActiveAnchor", "useTooltip", "hoveringTooltip", "anchorsBySelect", "setAnchorsBySelect", "mounted", "use_isomorphic_layout_effect_default", "timeout", "handleShow", "value", "handleShowTooltipDelayed", "handleHideTooltipDelayed", "delay", "handleShowTooltip", "event", "_a", "target", "handleHideTooltip", "handleTooltipPosition", "x", "y", "computeTooltipPosition", "computedStylesData", "handleMouseMove", "mouseEvent", "mousePosition", "handleClickTooltipAnchor", "handleClickOutsideAnchors", "anchorById", "anchor", "handleEsc", "debouncedHandleShowTooltip", "debounce_default", "debouncedHandleHideTooltip", "_b", "elementRefs", "enabledEvents", "handleMouseEnterTooltip", "handleMouseLeaveTooltip", "listener", "ref", "selector", "documentObserverCallback", "mutationList", "newAnchors", "mutation", "node", "elements", "element", "e", "anchors", "documentObserver", "canShow", "classNames", "styles_module_default", "TooltipContent_default", "Tooltip_default", "import_jsx_runtime", "TooltipController", "id", "anchorId", "anchorSelect", "content", "html", "className", "classNameArrow", "variant", "place", "offset", "wrapper", "children", "events", "positionStrategy", "middlewares", "delayShow", "delayHide", "float", "noArrow", "clickable", "closeOnEsc", "style", "position", "isOpen", "setIsOpen", "afterShow", "afterHide", "tooltipContent", "setTooltipContent", "tooltipHtml", "setTooltipHtml", "tooltipPlace", "setTooltipPlace", "tooltipVariant", "setTooltipVariant", "tooltipOffset", "setTooltipOffset", "tooltipDelayShow", "setTooltipDelayShow", "tooltipDelayHide", "setTooltipDelayHide", "tooltipFloat", "setTooltipFloat", "tooltipWrapper", "setTooltipWrapper", "tooltipEvents", "setTooltipEvents", "tooltipPositionStrategy", "setTooltipPositionStrategy", "activeAnchor", "setActiveAnchor", "anchorRefs", "providerActiveAnchor", "useTooltip", "getDataAttributesFromAnchorElement", "elementReference", "acc", "name", "_a", "parsedAttribute", "applyAllDataAttributesFromAnchorElement", "dataAttributes", "handleDataAttributes", "value", "parsed", "handler", "key", "elementRefs", "selector", "anchor", "e", "anchorById", "anchorElement", "observerCallback", "mutationList", "mutation", "observer", "observerConfig", "props", "Tooltip_default", "TooltipController_default"]
|
|
4
|
+
"sourcesContent": ["import './tokens.css'\nimport type {\n ChildrenType,\n DataAttribute,\n EventsType,\n PlacesType,\n PositionStrategy,\n VariantType,\n WrapperType,\n IPosition,\n Middleware,\n} from './components/Tooltip/TooltipTypes'\nimport type { ITooltipController } from './components/TooltipController/TooltipControllerTypes'\nimport type { ITooltipWrapper } from './components/TooltipProvider/TooltipProviderTypes'\n\nexport { TooltipController as Tooltip } from './components/TooltipController'\nexport { TooltipProvider, TooltipWrapper } from './components/TooltipProvider'\nexport type {\n ChildrenType,\n DataAttribute,\n EventsType,\n PlacesType,\n PositionStrategy,\n VariantType,\n WrapperType,\n ITooltipController as ITooltip,\n ITooltipWrapper,\n IPosition,\n Middleware,\n}\n", "import { useEffect, useState } from 'react'\nimport { Tooltip } from 'components/Tooltip'\nimport type {\n EventsType,\n PositionStrategy,\n PlacesType,\n VariantType,\n WrapperType,\n DataAttribute,\n ITooltip,\n} from 'components/Tooltip/TooltipTypes'\nimport { useTooltip } from 'components/TooltipProvider'\nimport type { ITooltipController } from './TooltipControllerTypes'\n\nconst TooltipController = ({\n id,\n anchorId,\n anchorSelect,\n content,\n html,\n className,\n classNameArrow,\n variant = 'dark',\n place = 'top',\n offset = 10,\n wrapper = 'div',\n children = null,\n events = ['hover'],\n positionStrategy = 'absolute',\n middlewares,\n delayShow = 0,\n delayHide = 0,\n float = false,\n noArrow = false,\n clickable = false,\n closeOnEsc = false,\n style,\n position,\n isOpen,\n setIsOpen,\n afterShow,\n afterHide,\n}: ITooltipController) => {\n const [tooltipContent, setTooltipContent] = useState(content)\n const [tooltipHtml, setTooltipHtml] = useState(html)\n const [tooltipPlace, setTooltipPlace] = useState(place)\n const [tooltipVariant, setTooltipVariant] = useState(variant)\n const [tooltipOffset, setTooltipOffset] = useState(offset)\n const [tooltipDelayShow, setTooltipDelayShow] = useState(delayShow)\n const [tooltipDelayHide, setTooltipDelayHide] = useState(delayHide)\n const [tooltipFloat, setTooltipFloat] = useState(float)\n const [tooltipWrapper, setTooltipWrapper] = useState<WrapperType>(wrapper)\n const [tooltipEvents, setTooltipEvents] = useState(events)\n const [tooltipPositionStrategy, setTooltipPositionStrategy] = useState(positionStrategy)\n const [activeAnchor, setActiveAnchor] = useState<HTMLElement | null>(null)\n /**\n * @todo Remove this in a future version (provider/wrapper method is deprecated)\n */\n const { anchorRefs, activeAnchor: providerActiveAnchor } = useTooltip(id)\n\n const getDataAttributesFromAnchorElement = (elementReference: HTMLElement) => {\n const dataAttributes = elementReference?.getAttributeNames().reduce((acc, name) => {\n if (name.startsWith('data-tooltip-')) {\n const parsedAttribute = name.replace(/^data-tooltip-/, '') as DataAttribute\n acc[parsedAttribute] = elementReference?.getAttribute(name) ?? null\n }\n return acc\n }, {} as Record<DataAttribute, string | null>)\n\n return dataAttributes\n }\n\n const applyAllDataAttributesFromAnchorElement = (\n dataAttributes: Record<string, string | null>,\n ) => {\n const handleDataAttributes: Record<DataAttribute, (value: string | null) => void> = {\n place: (value) => {\n setTooltipPlace((value as PlacesType) ?? place)\n },\n content: (value) => {\n setTooltipContent(value ?? content)\n },\n html: (value) => {\n setTooltipHtml(value ?? html)\n },\n variant: (value) => {\n setTooltipVariant((value as VariantType) ?? variant)\n },\n offset: (value) => {\n setTooltipOffset(value === null ? offset : Number(value))\n },\n wrapper: (value) => {\n setTooltipWrapper((value as WrapperType) ?? wrapper)\n },\n events: (value) => {\n const parsed = value?.split(' ') as EventsType[]\n setTooltipEvents(parsed ?? events)\n },\n 'position-strategy': (value) => {\n setTooltipPositionStrategy((value as PositionStrategy) ?? positionStrategy)\n },\n 'delay-show': (value) => {\n setTooltipDelayShow(value === null ? delayShow : Number(value))\n },\n 'delay-hide': (value) => {\n setTooltipDelayHide(value === null ? delayHide : Number(value))\n },\n float: (value) => {\n setTooltipFloat(value === null ? float : value === 'true')\n },\n }\n // reset unset data attributes to default values\n // without this, data attributes from the last active anchor will still be used\n Object.values(handleDataAttributes).forEach((handler) => handler(null))\n Object.entries(dataAttributes).forEach(([key, value]) => {\n handleDataAttributes[key as DataAttribute]?.(value)\n })\n }\n\n useEffect(() => {\n setTooltipContent(content)\n }, [content])\n\n useEffect(() => {\n setTooltipHtml(html)\n }, [html])\n\n useEffect(() => {\n setTooltipPlace(place)\n }, [place])\n\n useEffect(() => {\n const elementRefs = new Set(anchorRefs)\n\n let selector = anchorSelect\n if (!selector && id) {\n selector = `[data-tooltip-id='${id}']`\n }\n if (selector) {\n try {\n const anchorsBySelect = document.querySelectorAll<HTMLElement>(selector)\n anchorsBySelect.forEach((anchor) => {\n elementRefs.add({ current: anchor })\n })\n } catch {\n if (!process.env.NODE_ENV || process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line no-console\n console.warn(`[react-tooltip] \"${anchorSelect}\" is not a valid CSS selector`)\n }\n }\n }\n\n const anchorById = document.querySelector<HTMLElement>(`[id='${anchorId}']`)\n if (anchorById) {\n elementRefs.add({ current: anchorById })\n }\n\n if (!elementRefs.size) {\n return () => null\n }\n\n const anchorElement = activeAnchor ?? anchorById ?? providerActiveAnchor.current\n\n const observerCallback: MutationCallback = (mutationList) => {\n mutationList.forEach((mutation) => {\n if (\n !anchorElement ||\n mutation.type !== 'attributes' ||\n !mutation.attributeName?.startsWith('data-tooltip-')\n ) {\n return\n }\n // make sure to get all set attributes, since all unset attributes are reset\n const dataAttributes = getDataAttributesFromAnchorElement(anchorElement)\n applyAllDataAttributesFromAnchorElement(dataAttributes)\n })\n }\n\n // Create an observer instance linked to the callback function\n const observer = new MutationObserver(observerCallback)\n\n // do not check for subtree and childrens, we only want to know attribute changes\n // to stay watching `data-attributes-*` from anchor element\n const observerConfig = { attributes: true, childList: false, subtree: false }\n\n if (anchorElement) {\n const dataAttributes = getDataAttributesFromAnchorElement(anchorElement)\n applyAllDataAttributesFromAnchorElement(dataAttributes)\n // Start observing the target node for configured mutations\n observer.observe(anchorElement, observerConfig)\n }\n\n return () => {\n // Remove the observer when the tooltip is destroyed\n observer.disconnect()\n }\n }, [anchorRefs, providerActiveAnchor, activeAnchor, anchorId, anchorSelect])\n\n const props: ITooltip = {\n id,\n anchorId,\n anchorSelect,\n className,\n classNameArrow,\n content: tooltipContent,\n html: tooltipHtml,\n place: tooltipPlace,\n variant: tooltipVariant,\n offset: tooltipOffset,\n wrapper: tooltipWrapper,\n events: tooltipEvents,\n positionStrategy: tooltipPositionStrategy,\n middlewares,\n delayShow: tooltipDelayShow,\n delayHide: tooltipDelayHide,\n float: tooltipFloat,\n noArrow,\n clickable,\n closeOnEsc,\n style,\n position,\n isOpen,\n setIsOpen,\n afterShow,\n afterHide,\n activeAnchor,\n setActiveAnchor: (anchor: HTMLElement | null) => setActiveAnchor(anchor),\n }\n\n return children ? <Tooltip {...props}>{children}</Tooltip> : <Tooltip {...props} />\n}\n\nexport default TooltipController\n", "import { useEffect, useState, useRef } from 'react'\nimport classNames from 'classnames'\nimport debounce from 'utils/debounce'\nimport { TooltipContent } from 'components/TooltipContent'\nimport { useTooltip } from 'components/TooltipProvider'\nimport useIsomorphicLayoutEffect from 'utils/use-isomorphic-layout-effect'\nimport { computeTooltipPosition } from '../../utils/compute-positions'\nimport styles from './styles.module.css'\nimport type { IPosition, ITooltip, PlacesType } from './TooltipTypes'\n\nconst Tooltip = ({\n // props\n id,\n className,\n classNameArrow,\n variant = 'dark',\n anchorId,\n anchorSelect,\n place = 'top',\n offset = 10,\n events = ['hover'],\n positionStrategy = 'absolute',\n middlewares,\n wrapper: WrapperElement,\n children = null,\n delayShow = 0,\n delayHide = 0,\n float = false,\n noArrow = false,\n clickable = false,\n closeOnEsc = false,\n style: externalStyles,\n position,\n afterShow,\n afterHide,\n // props handled by controller\n content,\n html,\n isOpen,\n setIsOpen,\n activeAnchor,\n setActiveAnchor,\n}: ITooltip) => {\n const tooltipRef = useRef<HTMLElement>(null)\n const tooltipArrowRef = useRef<HTMLElement>(null)\n const tooltipShowDelayTimerRef = useRef<NodeJS.Timeout | null>(null)\n const tooltipHideDelayTimerRef = useRef<NodeJS.Timeout | null>(null)\n const [actualPlacement, setActualPlacement] = useState(place)\n const [inlineStyles, setInlineStyles] = useState({})\n const [inlineArrowStyles, setInlineArrowStyles] = useState({})\n const [show, setShow] = useState(false)\n const [rendered, setRendered] = useState(false)\n const wasShowing = useRef(false)\n const lastFloatPosition = useRef<IPosition | null>(null)\n /**\n * @todo Remove this in a future version (provider/wrapper method is deprecated)\n */\n const { anchorRefs, setActiveAnchor: setProviderActiveAnchor } = useTooltip(id)\n const hoveringTooltip = useRef(false)\n const [anchorsBySelect, setAnchorsBySelect] = useState<HTMLElement[]>([])\n const mounted = useRef(false)\n\n /**\n * useLayoutEffect runs before useEffect,\n * but should be used carefully because of caveats\n * https://beta.reactjs.org/reference/react/useLayoutEffect#caveats\n */\n useIsomorphicLayoutEffect(() => {\n mounted.current = true\n return () => {\n mounted.current = false\n }\n }, [])\n\n useEffect(() => {\n if (!show) {\n /**\n * this fixes weird behavior when switching between two anchor elements very quickly\n * remove the timeout and switch quickly between two adjancent anchor elements to see it\n *\n * in practice, this means the tooltip is not immediately removed from the DOM on hide\n */\n const timeout = setTimeout(() => {\n setRendered(false)\n }, 150)\n return () => {\n clearTimeout(timeout)\n }\n }\n return () => null\n }, [show])\n\n const handleShow = (value: boolean) => {\n if (!mounted.current) {\n return\n }\n if (value) {\n setRendered(true)\n }\n /**\n * wait for the component to render and calculate position\n * before actually showing\n */\n setTimeout(() => {\n if (!mounted.current) {\n return\n }\n setIsOpen?.(value)\n if (isOpen === undefined) {\n setShow(value)\n }\n }, 10)\n }\n\n /**\n * this replicates the effect from `handleShow()`\n * when `isOpen` is changed from outside\n */\n useEffect(() => {\n if (isOpen === undefined) {\n return () => null\n }\n if (isOpen) {\n setRendered(true)\n }\n const timeout = setTimeout(() => {\n setShow(isOpen)\n }, 10)\n return () => {\n clearTimeout(timeout)\n }\n }, [isOpen])\n\n useEffect(() => {\n if (show === wasShowing.current) {\n return\n }\n wasShowing.current = show\n if (show) {\n afterShow?.()\n } else {\n afterHide?.()\n }\n }, [show])\n\n const handleShowTooltipDelayed = () => {\n if (tooltipShowDelayTimerRef.current) {\n clearTimeout(tooltipShowDelayTimerRef.current)\n }\n\n tooltipShowDelayTimerRef.current = setTimeout(() => {\n handleShow(true)\n }, delayShow)\n }\n\n const handleHideTooltipDelayed = (delay = delayHide) => {\n if (tooltipHideDelayTimerRef.current) {\n clearTimeout(tooltipHideDelayTimerRef.current)\n }\n\n tooltipHideDelayTimerRef.current = setTimeout(() => {\n if (hoveringTooltip.current) {\n return\n }\n handleShow(false)\n }, delay)\n }\n\n const handleShowTooltip = (event?: Event) => {\n if (!event) {\n return\n }\n if (delayShow) {\n handleShowTooltipDelayed()\n } else {\n handleShow(true)\n }\n const target = event.currentTarget ?? event.target\n setActiveAnchor(target as HTMLElement)\n setProviderActiveAnchor({ current: target as HTMLElement })\n\n if (tooltipHideDelayTimerRef.current) {\n clearTimeout(tooltipHideDelayTimerRef.current)\n }\n }\n\n const handleHideTooltip = () => {\n if (clickable) {\n // allow time for the mouse to reach the tooltip, in case there's a gap\n handleHideTooltipDelayed(delayHide || 100)\n } else if (delayHide) {\n handleHideTooltipDelayed()\n } else {\n handleShow(false)\n }\n\n if (tooltipShowDelayTimerRef.current) {\n clearTimeout(tooltipShowDelayTimerRef.current)\n }\n }\n\n const handleTooltipPosition = ({ x, y }: IPosition) => {\n const virtualElement = {\n getBoundingClientRect() {\n return {\n x,\n y,\n width: 0,\n height: 0,\n top: y,\n left: x,\n right: x,\n bottom: y,\n }\n },\n } as Element\n computeTooltipPosition({\n place,\n offset,\n elementReference: virtualElement,\n tooltipReference: tooltipRef.current,\n tooltipArrowReference: tooltipArrowRef.current,\n strategy: positionStrategy,\n middlewares,\n }).then((computedStylesData) => {\n if (Object.keys(computedStylesData.tooltipStyles).length) {\n setInlineStyles(computedStylesData.tooltipStyles)\n }\n if (Object.keys(computedStylesData.tooltipArrowStyles).length) {\n setInlineArrowStyles(computedStylesData.tooltipArrowStyles)\n }\n setActualPlacement(computedStylesData.place as PlacesType)\n })\n }\n\n const handleMouseMove = (event?: Event) => {\n if (!event) {\n return\n }\n const mouseEvent = event as MouseEvent\n const mousePosition = {\n x: mouseEvent.clientX,\n y: mouseEvent.clientY,\n }\n handleTooltipPosition(mousePosition)\n lastFloatPosition.current = mousePosition\n }\n\n const handleClickTooltipAnchor = (event?: Event) => {\n handleShowTooltip(event)\n if (delayHide) {\n handleHideTooltipDelayed()\n }\n }\n\n const handleClickOutsideAnchors = (event: MouseEvent) => {\n const anchorById = document.querySelector<HTMLElement>(`[id='${anchorId}']`)\n if (anchorById?.contains(event.target as HTMLElement)) {\n return\n }\n if (anchorsBySelect.some((anchor) => anchor.contains(event.target as HTMLElement))) {\n return\n }\n handleShow(false)\n }\n\n const handleEsc = (event: KeyboardEvent) => {\n if (event.key !== 'Escape') {\n return\n }\n handleShow(false)\n }\n\n // debounce handler to prevent call twice when\n // mouse enter and focus events being triggered toggether\n const debouncedHandleShowTooltip = debounce(handleShowTooltip, 50)\n const debouncedHandleHideTooltip = debounce(handleHideTooltip, 50)\n\n useEffect(() => {\n const elementRefs = new Set(anchorRefs)\n\n anchorsBySelect.forEach((anchor) => {\n elementRefs.add({ current: anchor })\n })\n\n const anchorById = document.querySelector<HTMLElement>(`[id='${anchorId}']`)\n if (anchorById) {\n elementRefs.add({ current: anchorById })\n }\n\n if (closeOnEsc) {\n window.addEventListener('keydown', handleEsc)\n }\n\n const enabledEvents: { event: string; listener: (event?: Event) => void }[] = []\n\n if (events.find((event: string) => event === 'click')) {\n window.addEventListener('click', handleClickOutsideAnchors)\n enabledEvents.push({ event: 'click', listener: handleClickTooltipAnchor })\n }\n\n if (events.find((event: string) => event === 'hover')) {\n enabledEvents.push(\n { event: 'mouseenter', listener: debouncedHandleShowTooltip },\n { event: 'mouseleave', listener: debouncedHandleHideTooltip },\n { event: 'focus', listener: debouncedHandleShowTooltip },\n { event: 'blur', listener: debouncedHandleHideTooltip },\n )\n if (float) {\n enabledEvents.push({\n event: 'mousemove',\n listener: handleMouseMove,\n })\n }\n }\n\n const handleMouseEnterTooltip = () => {\n hoveringTooltip.current = true\n }\n const handleMouseLeaveTooltip = () => {\n hoveringTooltip.current = false\n handleHideTooltip()\n }\n\n if (clickable) {\n tooltipRef.current?.addEventListener('mouseenter', handleMouseEnterTooltip)\n tooltipRef.current?.addEventListener('mouseleave', handleMouseLeaveTooltip)\n }\n\n enabledEvents.forEach(({ event, listener }) => {\n elementRefs.forEach((ref) => {\n ref.current?.addEventListener(event, listener)\n })\n })\n\n return () => {\n if (events.find((event: string) => event === 'click')) {\n window.removeEventListener('click', handleClickOutsideAnchors)\n }\n if (closeOnEsc) {\n window.removeEventListener('keydown', handleEsc)\n }\n if (clickable) {\n tooltipRef.current?.removeEventListener('mouseenter', handleMouseEnterTooltip)\n tooltipRef.current?.removeEventListener('mouseleave', handleMouseLeaveTooltip)\n }\n enabledEvents.forEach(({ event, listener }) => {\n elementRefs.forEach((ref) => {\n ref.current?.removeEventListener(event, listener)\n })\n })\n }\n /**\n * rendered is also a dependency to ensure anchor observers are re-registered\n * since `tooltipRef` becomes stale after removing/adding the tooltip to the DOM\n */\n }, [rendered, anchorRefs, anchorsBySelect, closeOnEsc, events])\n\n useEffect(() => {\n let selector = anchorSelect ?? ''\n if (!selector && id) {\n selector = `[data-tooltip-id='${id}']`\n }\n const documentObserverCallback: MutationCallback = (mutationList) => {\n const newAnchors: HTMLElement[] = []\n mutationList.forEach((mutation) => {\n if (mutation.type === 'attributes' && mutation.attributeName === 'data-tooltip-id') {\n const newId = (mutation.target as HTMLElement).getAttribute('data-tooltip-id')\n if (newId === id) {\n newAnchors.push(mutation.target as HTMLElement)\n }\n }\n if (mutation.type !== 'childList') {\n return\n }\n if (activeAnchor) {\n ;[...mutation.removedNodes].some((node) => {\n if (node.contains(activeAnchor)) {\n setRendered(false)\n handleShow(false)\n setActiveAnchor(null)\n return true\n }\n return false\n })\n }\n if (!selector) {\n return\n }\n try {\n const elements = [...mutation.addedNodes].filter((node) => node.nodeType === 1)\n newAnchors.push(\n // the element itself is an anchor\n ...(elements.filter((element) =>\n (element as HTMLElement).matches(selector),\n ) as HTMLElement[]),\n )\n newAnchors.push(\n // the element has children which are anchors\n ...elements.flatMap(\n (element) =>\n [...(element as HTMLElement).querySelectorAll(selector)] as HTMLElement[],\n ),\n )\n } catch {\n /**\n * invalid CSS selector.\n * already warned on tooltip controller\n */\n }\n })\n if (newAnchors.length) {\n setAnchorsBySelect((anchors) => [...anchors, ...newAnchors])\n }\n }\n const documentObserver = new MutationObserver(documentObserverCallback)\n // watch for anchor being removed from the DOM\n documentObserver.observe(document.body, {\n childList: true,\n subtree: true,\n attributes: true,\n attributeFilter: ['data-tooltip-id'],\n })\n return () => {\n documentObserver.disconnect()\n }\n }, [id, anchorSelect, activeAnchor])\n\n useEffect(() => {\n if (position) {\n // if `position` is set, override regular and `float` positioning\n handleTooltipPosition(position)\n return\n }\n\n if (float) {\n if (lastFloatPosition.current) {\n /*\n Without this, changes to `content`, `place`, `offset`, ..., will only\n trigger a position calculation after a `mousemove` event.\n\n To see why this matters, comment this line, run `yarn dev` and click the\n \"Hover me!\" anchor.\n */\n handleTooltipPosition(lastFloatPosition.current)\n }\n // if `float` is set, override regular positioning\n return\n }\n\n computeTooltipPosition({\n place,\n offset,\n elementReference: activeAnchor,\n tooltipReference: tooltipRef.current,\n tooltipArrowReference: tooltipArrowRef.current,\n strategy: positionStrategy,\n middlewares,\n }).then((computedStylesData) => {\n if (!mounted.current) {\n // invalidate computed positions after remount\n return\n }\n if (Object.keys(computedStylesData.tooltipStyles).length) {\n setInlineStyles(computedStylesData.tooltipStyles)\n }\n if (Object.keys(computedStylesData.tooltipArrowStyles).length) {\n setInlineArrowStyles(computedStylesData.tooltipArrowStyles)\n }\n setActualPlacement(computedStylesData.place as PlacesType)\n })\n }, [show, activeAnchor, content, html, place, offset, positionStrategy, position])\n\n useEffect(() => {\n const anchorById = document.querySelector<HTMLElement>(`[id='${anchorId}']`)\n const anchors = [...anchorsBySelect, anchorById]\n if (!activeAnchor || !anchors.includes(activeAnchor)) {\n /**\n * if there is no active anchor,\n * or if the current active anchor is not amongst the allowed ones,\n * reset it\n */\n setActiveAnchor(anchorsBySelect[0] ?? anchorById)\n }\n }, [anchorId, anchorsBySelect, activeAnchor])\n\n useEffect(() => {\n return () => {\n if (tooltipShowDelayTimerRef.current) {\n clearTimeout(tooltipShowDelayTimerRef.current)\n }\n if (tooltipHideDelayTimerRef.current) {\n clearTimeout(tooltipHideDelayTimerRef.current)\n }\n }\n }, [])\n\n useEffect(() => {\n let selector = anchorSelect\n if (!selector && id) {\n selector = `[data-tooltip-id='${id}']`\n }\n if (!selector) {\n return\n }\n try {\n const anchors = Array.from(document.querySelectorAll<HTMLElement>(selector))\n setAnchorsBySelect(anchors)\n } catch {\n // warning was already issued in the controller\n setAnchorsBySelect([])\n }\n }, [id, anchorSelect])\n\n const hasContentOrChildren = Boolean(html || content || children)\n const canShow = hasContentOrChildren && show && Object.keys(inlineStyles).length > 0\n\n return rendered ? (\n <WrapperElement\n id={id}\n role=\"tooltip\"\n className={classNames(\n 'react-tooltip',\n styles['tooltip'],\n styles[variant],\n className,\n `react-tooltip__place-${actualPlacement}`,\n {\n [styles['show']]: canShow,\n [styles['fixed']]: positionStrategy === 'fixed',\n [styles['clickable']]: clickable,\n },\n )}\n style={{ ...externalStyles, ...inlineStyles }}\n ref={tooltipRef}\n >\n {/**\n * content priority: html > content > children\n * children should be last so that it can be used as the \"default\" content\n */}\n {(html && <TooltipContent content={html} />) || content || children}\n <WrapperElement\n className={classNames('react-tooltip-arrow', styles['arrow'], classNameArrow, {\n /**\n * changed from dash `no-arrow` to camelcase because of:\n * https://github.com/indooorsman/esbuild-css-modules-plugin/issues/42\n */\n [styles['noArrow']]: noArrow,\n })}\n style={inlineArrowStyles}\n ref={tooltipArrowRef}\n />\n </WrapperElement>\n ) : null\n}\n\nexport default Tooltip\n", "/* eslint-disable @typescript-eslint/no-explicit-any */\n/**\n * This function debounce the received function\n * @param { function } \tfunc\t\t\t\tFunction to be debounced\n * @param { number } \t\twait\t\t\t\tTime to wait before execut the function\n * @param { boolean } \timmediate\t\tParam to define if the function will be executed immediately\n */\nconst debounce = (func: (...args: any[]) => void, wait?: number, immediate?: true) => {\n let timeout: NodeJS.Timeout | null = null\n\n return function debounced(this: typeof func, ...args: any[]) {\n const later = () => {\n timeout = null\n if (!immediate) {\n func.apply(this, args)\n }\n }\n\n if (timeout) {\n clearTimeout(timeout)\n }\n\n timeout = setTimeout(later, wait)\n }\n}\n\nexport default debounce\n", "/* eslint-disable react/no-danger */\nimport type { ITooltipContent } from './TooltipContentTypes'\n\nconst TooltipContent = ({ content }: ITooltipContent) => {\n return <span dangerouslySetInnerHTML={{ __html: content }} />\n}\n\nexport default TooltipContent\n", "import React, {\n createContext,\n PropsWithChildren,\n useCallback,\n useContext,\n useMemo,\n useState,\n} from 'react'\n\nimport type {\n AnchorRef,\n TooltipContextData,\n TooltipContextDataWrapper,\n} from './TooltipProviderTypes'\n\nconst DEFAULT_TOOLTIP_ID = 'DEFAULT_TOOLTIP_ID'\nconst DEFAULT_CONTEXT_DATA: TooltipContextData = {\n anchorRefs: new Set(),\n activeAnchor: { current: null },\n attach: () => {\n /* attach anchor element */\n },\n detach: () => {\n /* detach anchor element */\n },\n setActiveAnchor: () => {\n /* set active anchor */\n },\n}\n\nconst DEFAULT_CONTEXT_DATA_WRAPPER: TooltipContextDataWrapper = {\n getTooltipData: () => DEFAULT_CONTEXT_DATA,\n}\n\nconst TooltipContext = createContext<TooltipContextDataWrapper>(DEFAULT_CONTEXT_DATA_WRAPPER)\n\n/**\n * @deprecated Use the `data-tooltip-id` attribute, or the `anchorSelect` prop instead.\n * See https://react-tooltip.com/docs/getting-started\n */\nconst TooltipProvider: React.FC<PropsWithChildren<void>> = ({ children }) => {\n const [anchorRefMap, setAnchorRefMap] = useState<Record<string, Set<AnchorRef>>>({\n [DEFAULT_TOOLTIP_ID]: new Set(),\n })\n const [activeAnchorMap, setActiveAnchorMap] = useState<Record<string, AnchorRef>>({\n [DEFAULT_TOOLTIP_ID]: { current: null },\n })\n\n const attach = (tooltipId: string, ...refs: AnchorRef[]) => {\n setAnchorRefMap((oldMap) => {\n const tooltipRefs = oldMap[tooltipId] ?? new Set()\n refs.forEach((ref) => tooltipRefs.add(ref))\n // create new object to trigger re-render\n return { ...oldMap, [tooltipId]: new Set(tooltipRefs) }\n })\n }\n\n const detach = (tooltipId: string, ...refs: AnchorRef[]) => {\n setAnchorRefMap((oldMap) => {\n const tooltipRefs = oldMap[tooltipId]\n if (!tooltipRefs) {\n // tooltip not found\n // maybe thow error?\n return oldMap\n }\n refs.forEach((ref) => tooltipRefs.delete(ref))\n // create new object to trigger re-render\n return { ...oldMap }\n })\n }\n\n const setActiveAnchor = (tooltipId: string, ref: React.RefObject<HTMLElement>) => {\n setActiveAnchorMap((oldMap) => {\n if (oldMap[tooltipId]?.current === ref.current) {\n return oldMap\n }\n // create new object to trigger re-render\n return { ...oldMap, [tooltipId]: ref }\n })\n }\n\n const getTooltipData = useCallback(\n (tooltipId = DEFAULT_TOOLTIP_ID) => ({\n anchorRefs: anchorRefMap[tooltipId] ?? new Set(),\n activeAnchor: activeAnchorMap[tooltipId] ?? { current: null },\n attach: (...refs: AnchorRef[]) => attach(tooltipId, ...refs),\n detach: (...refs: AnchorRef[]) => detach(tooltipId, ...refs),\n setActiveAnchor: (ref: AnchorRef) => setActiveAnchor(tooltipId, ref),\n }),\n [anchorRefMap, activeAnchorMap, attach, detach],\n )\n\n const context = useMemo(() => {\n return {\n getTooltipData,\n }\n }, [getTooltipData])\n\n return <TooltipContext.Provider value={context}>{children}</TooltipContext.Provider>\n}\n\nexport function useTooltip(tooltipId = DEFAULT_TOOLTIP_ID) {\n return useContext(TooltipContext).getTooltipData(tooltipId)\n}\n\nexport default TooltipProvider\n", "import { useEffect, useRef } from 'react'\nimport classNames from 'classnames'\nimport { useTooltip } from './TooltipProvider'\nimport type { ITooltipWrapper } from './TooltipProviderTypes'\n\n/**\n * @deprecated Use the `data-tooltip-id` attribute, or the `anchorSelect` prop instead.\n * See https://react-tooltip.com/docs/getting-started\n */\nconst TooltipWrapper = ({\n tooltipId,\n children,\n className,\n place,\n content,\n html,\n variant,\n offset,\n wrapper,\n events,\n positionStrategy,\n delayShow,\n delayHide,\n}: ITooltipWrapper) => {\n const { attach, detach } = useTooltip(tooltipId)\n const anchorRef = useRef<HTMLElement | null>(null)\n\n useEffect(() => {\n attach(anchorRef)\n return () => {\n detach(anchorRef)\n }\n }, [])\n\n return (\n <span\n ref={anchorRef}\n className={classNames('react-tooltip-wrapper', className)}\n data-tooltip-place={place}\n data-tooltip-content={content}\n data-tooltip-html={html}\n data-tooltip-variant={variant}\n data-tooltip-offset={offset}\n data-tooltip-wrapper={wrapper}\n data-tooltip-events={events}\n data-tooltip-position-strategy={positionStrategy}\n data-tooltip-delay-show={delayShow}\n data-tooltip-delay-hide={delayHide}\n >\n {children}\n </span>\n )\n}\n\nexport default TooltipWrapper\n", "import { useLayoutEffect, useEffect } from 'react'\n\nconst useIsomorphicLayoutEffect = typeof window !== 'undefined' ? useLayoutEffect : useEffect\n\nexport default useIsomorphicLayoutEffect\n", "import { computePosition, offset, shift, arrow, flip } from '@floating-ui/dom'\nimport type { IComputePositions } from './compute-positions-types'\n\nexport const computeTooltipPosition = async ({\n elementReference = null,\n tooltipReference = null,\n tooltipArrowReference = null,\n place = 'top',\n offset: offsetValue = 10,\n strategy = 'absolute',\n middlewares = [offset(Number(offsetValue)), flip(), shift({ padding: 5 })],\n}: IComputePositions) => {\n if (!elementReference) {\n // elementReference can be null or undefined and we will not compute the position\n // eslint-disable-next-line no-console\n // console.error('The reference element for tooltip was not defined: ', elementReference)\n return { tooltipStyles: {}, tooltipArrowStyles: {}, place }\n }\n\n if (tooltipReference === null) {\n return { tooltipStyles: {}, tooltipArrowStyles: {}, place }\n }\n\n const middleware = middlewares\n\n if (tooltipArrowReference) {\n middleware.push(arrow({ element: tooltipArrowReference as HTMLElement, padding: 5 }))\n\n return computePosition(elementReference as HTMLElement, tooltipReference as HTMLElement, {\n placement: place,\n strategy,\n middleware,\n }).then(({ x, y, placement, middlewareData }) => {\n const styles = { left: `${x}px`, top: `${y}px` }\n\n const { x: arrowX, y: arrowY } = middlewareData.arrow ?? { x: 0, y: 0 }\n\n const staticSide =\n {\n top: 'bottom',\n right: 'left',\n bottom: 'top',\n left: 'right',\n }[placement.split('-')[0]] ?? 'bottom'\n\n const arrowStyle = {\n left: arrowX != null ? `${arrowX}px` : '',\n top: arrowY != null ? `${arrowY}px` : '',\n right: '',\n bottom: '',\n [staticSide]: '-4px',\n }\n\n return { tooltipStyles: styles, tooltipArrowStyles: arrowStyle, place: placement }\n })\n }\n\n return computePosition(elementReference as HTMLElement, tooltipReference as HTMLElement, {\n placement: 'bottom',\n strategy,\n middleware,\n }).then(({ x, y, placement }) => {\n const styles = { left: `${x}px`, top: `${y}px` }\n\n return { tooltipStyles: styles, tooltipArrowStyles: {}, place: placement }\n })\n}\n", "import \"./styles.module.css?esbuild-css-modules-plugin-built\";\nexport default {\"arrow\":\"react-tooltip__arrow_KtSkBq\",\"clickable\":\"react-tooltip__clickable_KtSkBq\",\"dark\":\"react-tooltip__dark_KtSkBq\",\"error\":\"react-tooltip__error_KtSkBq\",\"fixed\":\"react-tooltip__fixed_KtSkBq\",\"info\":\"react-tooltip__info_KtSkBq\",\"light\":\"react-tooltip__light_KtSkBq\",\"noArrow\":\"react-tooltip__no-arrow_KtSkBq\",\"show\":\"react-tooltip__show_KtSkBq\",\"success\":\"react-tooltip__success_KtSkBq\",\"tooltip\":\"react-tooltip__tooltip_KtSkBq\",\"warning\":\"react-tooltip__warning_KtSkBq\"};;\nexport const arrow = \"react-tooltip__arrow_KtSkBq\";\nexport const clickable = \"react-tooltip__clickable_KtSkBq\";\nexport const dark = \"react-tooltip__dark_KtSkBq\";\nexport const error = \"react-tooltip__error_KtSkBq\";\nexport const fixed = \"react-tooltip__fixed_KtSkBq\";\nexport const info = \"react-tooltip__info_KtSkBq\";\nexport const light = \"react-tooltip__light_KtSkBq\";\nexport const noArrow = \"react-tooltip__no-arrow_KtSkBq\";\nexport const show = \"react-tooltip__show_KtSkBq\";\nexport const success = \"react-tooltip__success_KtSkBq\";\nexport const tooltip = \"react-tooltip__tooltip_KtSkBq\";\nexport const warning = \"react-tooltip__warning_KtSkBq\";"],
|
|
5
|
+
"mappings": "+kBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,aAAAE,GAAA,oBAAAC,GAAA,mBAAAC,KAAA,eAAAC,GAAAL,ICAA,IAAAM,EAAoC,iBCApC,IAAAC,EAA4C,iBAC5CC,GAAuB,0BCMvB,IAAMC,GAAW,CAACC,EAAgCC,EAAeC,IAAqB,CACpF,IAAIC,EAAiC,KAErC,OAAO,YAAyCC,EAAa,CAC3D,IAAMC,EAAQ,IAAM,CAClBF,EAAU,KACLD,GACHF,EAAK,MAAM,KAAMI,CAAI,CAEzB,EAEID,GACF,aAAaA,CAAO,EAGtBA,EAAU,WAAWE,EAAOJ,CAAI,CAClC,CACF,EAEOK,GAAQP,GCtBN,IAAAQ,GAAA,6BADHC,GAAiB,CAAC,CAAE,QAAAC,CAAQ,OACzB,QAAC,QAAK,wBAAyB,CAAE,OAAQA,CAAQ,EAAG,EAGtDC,GAAQF,GC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,MAAOE,GACP,QAAAvB,EACA,UAAAC,GACA,WAAAC,GACA,MAAAC,GACA,SAAAC,GACA,OAAAC,GACA,UAAAC,EACA,UAAAC,EACA,UAAAC,GACA,aAAAuB,EACA,gBAAkBoB,GAA+BnB,EAAgBmB,CAAM,CACzE,EAEA,OAAO1D,KAAW,QAACoE,GAAA,CAAS,GAAGD,GAAQ,SAAAnE,EAAS,KAAa,QAACoE,GAAA,CAAS,GAAGD,GAAO,CACnF,EAEOE,GAAQjF",
|
|
6
|
+
"names": ["src_exports", "__export", "TooltipController_default", "TooltipProvider_default", "TooltipWrapper_default", "__toCommonJS", "import_react", "import_react", "import_classnames", "debounce", "func", "wait", "immediate", "timeout", "args", "later", "debounce_default", "import_jsx_runtime", "TooltipContent", "content", "TooltipContent_default", "import_react", "import_jsx_runtime", "DEFAULT_TOOLTIP_ID", "DEFAULT_CONTEXT_DATA", "DEFAULT_CONTEXT_DATA_WRAPPER", "TooltipContext", "TooltipProvider", "children", "anchorRefMap", "setAnchorRefMap", "activeAnchorMap", "setActiveAnchorMap", "attach", "tooltipId", "refs", "oldMap", "_a", "tooltipRefs", "ref", "detach", "setActiveAnchor", "getTooltipData", "_b", "context", "useTooltip", "TooltipProvider_default", "import_react", "import_classnames", "import_jsx_runtime", "TooltipWrapper", "tooltipId", "children", "className", "place", "content", "html", "variant", "offset", "wrapper", "events", "positionStrategy", "delayShow", "delayHide", "attach", "detach", "useTooltip", "anchorRef", "classNames", "TooltipWrapper_default", "import_react", "useIsomorphicLayoutEffect", "use_isomorphic_layout_effect_default", "import_dom", "computeTooltipPosition", "elementReference", "tooltipReference", "tooltipArrowReference", "place", "offsetValue", "strategy", "middlewares", "middleware", "x", "y", "placement", "middlewareData", "_a", "_b", "styles", "arrowX", "arrowY", "staticSide", "arrowStyle", "styles_module_default", "import_jsx_runtime", "Tooltip", "id", "className", "classNameArrow", "variant", "anchorId", "anchorSelect", "place", "offset", "events", "positionStrategy", "middlewares", "WrapperElement", "children", "delayShow", "delayHide", "float", "noArrow", "clickable", "closeOnEsc", "externalStyles", "position", "afterShow", "afterHide", "content", "html", "isOpen", "setIsOpen", "activeAnchor", "setActiveAnchor", "tooltipRef", "tooltipArrowRef", "tooltipShowDelayTimerRef", "tooltipHideDelayTimerRef", "actualPlacement", "setActualPlacement", "inlineStyles", "setInlineStyles", "inlineArrowStyles", "setInlineArrowStyles", "show", "setShow", "rendered", "setRendered", "wasShowing", "lastFloatPosition", "anchorRefs", "setProviderActiveAnchor", "useTooltip", "hoveringTooltip", "anchorsBySelect", "setAnchorsBySelect", "mounted", "use_isomorphic_layout_effect_default", "timeout", "handleShow", "value", "handleShowTooltipDelayed", "handleHideTooltipDelayed", "delay", "handleShowTooltip", "event", "_a", "target", "handleHideTooltip", "handleTooltipPosition", "x", "y", "computeTooltipPosition", "computedStylesData", "handleMouseMove", "mouseEvent", "mousePosition", "handleClickTooltipAnchor", "handleClickOutsideAnchors", "anchorById", "anchor", "handleEsc", "debouncedHandleShowTooltip", "debounce_default", "debouncedHandleHideTooltip", "_b", "elementRefs", "enabledEvents", "handleMouseEnterTooltip", "handleMouseLeaveTooltip", "listener", "ref", "selector", "documentObserverCallback", "mutationList", "newAnchors", "mutation", "node", "elements", "element", "e", "anchors", "documentObserver", "canShow", "classNames", "styles_module_default", "TooltipContent_default", "Tooltip_default", "import_jsx_runtime", "TooltipController", "id", "anchorId", "anchorSelect", "content", "html", "className", "classNameArrow", "variant", "place", "offset", "wrapper", "children", "events", "positionStrategy", "middlewares", "delayShow", "delayHide", "float", "noArrow", "clickable", "closeOnEsc", "style", "position", "isOpen", "setIsOpen", "afterShow", "afterHide", "tooltipContent", "setTooltipContent", "tooltipHtml", "setTooltipHtml", "tooltipPlace", "setTooltipPlace", "tooltipVariant", "setTooltipVariant", "tooltipOffset", "setTooltipOffset", "tooltipDelayShow", "setTooltipDelayShow", "tooltipDelayHide", "setTooltipDelayHide", "tooltipFloat", "setTooltipFloat", "tooltipWrapper", "setTooltipWrapper", "tooltipEvents", "setTooltipEvents", "tooltipPositionStrategy", "setTooltipPositionStrategy", "activeAnchor", "setActiveAnchor", "anchorRefs", "providerActiveAnchor", "useTooltip", "getDataAttributesFromAnchorElement", "elementReference", "acc", "name", "_a", "parsedAttribute", "applyAllDataAttributesFromAnchorElement", "dataAttributes", "handleDataAttributes", "value", "parsed", "handler", "key", "elementRefs", "selector", "anchor", "e", "anchorById", "anchorElement", "observerCallback", "mutationList", "mutation", "observer", "observerConfig", "props", "Tooltip_default", "TooltipController_default"]
|
|
7
7
|
}
|
|
@@ -178,10 +178,10 @@ var computeTooltipPosition = async ({
|
|
|
178
178
|
middlewares = [offset(Number(offsetValue)), flip(), shift({ padding: 5 })]
|
|
179
179
|
}) => {
|
|
180
180
|
if (!elementReference) {
|
|
181
|
-
return { tooltipStyles: {}, tooltipArrowStyles: {} };
|
|
181
|
+
return { tooltipStyles: {}, tooltipArrowStyles: {}, place };
|
|
182
182
|
}
|
|
183
183
|
if (tooltipReference === null) {
|
|
184
|
-
return { tooltipStyles: {}, tooltipArrowStyles: {} };
|
|
184
|
+
return { tooltipStyles: {}, tooltipArrowStyles: {}, place };
|
|
185
185
|
}
|
|
186
186
|
const middleware = middlewares;
|
|
187
187
|
if (tooltipArrowReference) {
|
|
@@ -207,16 +207,16 @@ var computeTooltipPosition = async ({
|
|
|
207
207
|
bottom: "",
|
|
208
208
|
[staticSide]: "-4px"
|
|
209
209
|
};
|
|
210
|
-
return { tooltipStyles: styles, tooltipArrowStyles: arrowStyle };
|
|
210
|
+
return { tooltipStyles: styles, tooltipArrowStyles: arrowStyle, place: placement };
|
|
211
211
|
});
|
|
212
212
|
}
|
|
213
213
|
return computePosition(elementReference, tooltipReference, {
|
|
214
214
|
placement: "bottom",
|
|
215
215
|
strategy,
|
|
216
216
|
middleware
|
|
217
|
-
}).then(({ x, y }) => {
|
|
217
|
+
}).then(({ x, y, placement }) => {
|
|
218
218
|
const styles = { left: `${x}px`, top: `${y}px` };
|
|
219
|
-
return { tooltipStyles: styles, tooltipArrowStyles: {} };
|
|
219
|
+
return { tooltipStyles: styles, tooltipArrowStyles: {}, place: placement };
|
|
220
220
|
});
|
|
221
221
|
};
|
|
222
222
|
|
|
@@ -262,6 +262,7 @@ var Tooltip = ({
|
|
|
262
262
|
const tooltipArrowRef = useRef2(null);
|
|
263
263
|
const tooltipShowDelayTimerRef = useRef2(null);
|
|
264
264
|
const tooltipHideDelayTimerRef = useRef2(null);
|
|
265
|
+
const [actualPlacement, setActualPlacement] = useState2(place);
|
|
265
266
|
const [inlineStyles, setInlineStyles] = useState2({});
|
|
266
267
|
const [inlineArrowStyles, setInlineArrowStyles] = useState2({});
|
|
267
268
|
const [show, setShow] = useState2(false);
|
|
@@ -409,6 +410,7 @@ var Tooltip = ({
|
|
|
409
410
|
if (Object.keys(computedStylesData.tooltipArrowStyles).length) {
|
|
410
411
|
setInlineArrowStyles(computedStylesData.tooltipArrowStyles);
|
|
411
412
|
}
|
|
413
|
+
setActualPlacement(computedStylesData.place);
|
|
412
414
|
});
|
|
413
415
|
};
|
|
414
416
|
const handleMouseMove = (event) => {
|
|
@@ -607,6 +609,7 @@ var Tooltip = ({
|
|
|
607
609
|
if (Object.keys(computedStylesData.tooltipArrowStyles).length) {
|
|
608
610
|
setInlineArrowStyles(computedStylesData.tooltipArrowStyles);
|
|
609
611
|
}
|
|
612
|
+
setActualPlacement(computedStylesData.place);
|
|
610
613
|
});
|
|
611
614
|
}, [show, activeAnchor, content, html, place, offset2, positionStrategy, position]);
|
|
612
615
|
useEffect3(() => {
|
|
@@ -649,11 +652,18 @@ var Tooltip = ({
|
|
|
649
652
|
{
|
|
650
653
|
id,
|
|
651
654
|
role: "tooltip",
|
|
652
|
-
className: classNames2(
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
655
|
+
className: classNames2(
|
|
656
|
+
"react-tooltip",
|
|
657
|
+
styles_module_default["tooltip"],
|
|
658
|
+
styles_module_default[variant],
|
|
659
|
+
className,
|
|
660
|
+
`react-tooltip__place-${actualPlacement}`,
|
|
661
|
+
{
|
|
662
|
+
[styles_module_default["show"]]: canShow,
|
|
663
|
+
[styles_module_default["fixed"]]: positionStrategy === "fixed",
|
|
664
|
+
[styles_module_default["clickable"]]: clickable
|
|
665
|
+
}
|
|
666
|
+
),
|
|
657
667
|
style: { ...externalStyles, ...inlineStyles },
|
|
658
668
|
ref: tooltipRef,
|
|
659
669
|
children: [
|