@@ -12,7 +12,7 @@ import React, {
12
12
import { useHoverDirty , useMeasure } from 'react-use' ;
13
13
import cx from 'classnames' ;
14
14
import { HierarchyRectangularNode , hierarchy , treemap , treemapSquarify } from 'd3' ;
15
- import { Tooltip , TooltipArrow , TooltipAnchor } from 'ariakit/tooltip ' ;
15
+ import { Tooltip , TooltipArrow , TooltipAnchor } from '@ ariakit/react ' ;
16
16
import {
17
17
type ReportMetricRow ,
18
18
type MetricRunInfo ,
@@ -128,15 +128,15 @@ const TileContent = forwardRef((props: TileContentProps, ref: Ref<HTMLDivElement
128
128
const TileContentWithTooltip = ( props : TileContentProps & { parentRef : RefObject < Element > } ) => {
129
129
const { label, sizeDisplay, item, runInfo, parentRef } = props ;
130
130
131
- const tooltipState = useTooltipStateWithMouseFollow ( { parentRef } ) ;
131
+ const { tooltip , getAnchorRect } = useTooltipStateWithMouseFollow ( { parentRef } ) ;
132
132
133
133
return (
134
134
< >
135
- < TooltipAnchor state = { tooltipState } className = { css . tileContentTooltipAnchor } >
135
+ < TooltipAnchor store = { tooltip } className = { css . tileContentTooltipAnchor } >
136
136
< TileContent label = { label } sizeDisplay = { sizeDisplay } item = { item } runInfo = { runInfo } />
137
137
</ TooltipAnchor >
138
- < Tooltip state = { tooltipState } className = { css . tooltip } >
139
- < TooltipArrow state = { tooltipState } size = { 16 } className = { css . tileTooltipArrow } />
138
+ < Tooltip store = { tooltip } gutter = { 16 } getAnchorRect = { getAnchorRect } className = { css . tooltip } >
139
+ < TooltipArrow store = { tooltip } size = { 16 } className = { css . tileTooltipArrow } />
140
140
< TileTooltipContent item = { item } />
141
141
</ Tooltip >
142
142
</ >
@@ -258,15 +258,15 @@ type TileGroupTitleContentWithTooltipProps = {
258
258
const TileGroupTitleContentWithTooltip = ( props : TileGroupTitleContentWithTooltipProps ) => {
259
259
const { parentRef, tooltipContent, ...restProps } = props ;
260
260
261
- const tooltipState = useTooltipStateWithMouseFollow ( { parentRef } ) ;
261
+ const { tooltip , getAnchorRect } = useTooltipStateWithMouseFollow ( { parentRef } ) ;
262
262
263
263
return (
264
264
< >
265
- < TooltipAnchor state = { tooltipState } className = { css . tileContentTooltipAnchor } >
265
+ < TooltipAnchor store = { tooltip } className = { css . tileContentTooltipAnchor } >
266
266
< TileGroupTitleContent { ...restProps } />
267
267
</ TooltipAnchor >
268
- < Tooltip state = { tooltipState } className = { css . tooltip } >
269
- < TooltipArrow state = { tooltipState } size = { 16 } className = { css . tileTooltipArrow } />
268
+ < Tooltip store = { tooltip } gutter = { 16 } getAnchorRect = { getAnchorRect } className = { css . tooltip } >
269
+ < TooltipArrow store = { tooltip } size = { 16 } className = { css . tileTooltipArrow } />
270
270
< TileGroupTitleTooltipContent { ...tooltipContent } />
271
271
</ Tooltip >
272
272
</ >
0 commit comments