()
| 1236 | const TreeDropIndicatorForwardRef = forwardRef(TreeDropIndicator); |
| 1237 | |
| 1238 | function RootDropIndicator() { |
| 1239 | let {dragAndDropHooks, dropState} = useContext(DragAndDropContext); |
| 1240 | let ref = useRef<HTMLDivElement>(null); |
| 1241 | // oxlint-disable-next-line react/react-compiler |
| 1242 | let {dropIndicatorProps} = dragAndDropHooks!.useDropIndicator!( |
| 1243 | { |
| 1244 | target: {type: 'root'} |
| 1245 | }, |
| 1246 | dropState!, |
| 1247 | ref |
| 1248 | ); |
| 1249 | let isDropTarget = dropState!.isDropTarget({type: 'root'}); |
| 1250 | let {visuallyHiddenProps} = useVisuallyHidden(); |
| 1251 | |
| 1252 | if (!isDropTarget && dropIndicatorProps['aria-hidden']) { |
| 1253 | return null; |
| 1254 | } |
| 1255 | |
| 1256 | return ( |
| 1257 | <div role="row" aria-hidden={dropIndicatorProps['aria-hidden']} style={{position: 'absolute'}}> |
| 1258 | <div role="gridcell"> |
| 1259 | <div role="button" {...visuallyHiddenProps} {...dropIndicatorProps} ref={ref} /> |
| 1260 | </div> |
| 1261 | </div> |
| 1262 | ); |
| 1263 | } |
| 1264 | |
| 1265 | export interface TreeSectionProps<T> extends SectionProps<T>, DOMRenderProps<'div', undefined> {} |
| 1266 |
nothing calls this directly
no test coverage detected