({props, forwardedRef: ref}: TabListInnerProps<T>)
| 341 | } |
| 342 | |
| 343 | function TabListInner<T>({props, forwardedRef: ref}: TabListInnerProps<T>) { |
| 344 | let state = useContext(TabListStateContext)!; |
| 345 | let {CollectionRoot} = useContext(CollectionRendererContext); |
| 346 | let {orientation = 'horizontal', keyboardActivation = 'automatic'} = |
| 347 | useSlottedContext(TabsContext)!; |
| 348 | let objectRef = useObjectRef(ref); |
| 349 | |
| 350 | let {tabListProps} = useTabList( |
| 351 | { |
| 352 | ...props, |
| 353 | orientation, |
| 354 | keyboardActivation |
| 355 | }, |
| 356 | state, |
| 357 | objectRef |
| 358 | ); |
| 359 | |
| 360 | let renderProps = useRenderProps({ |
| 361 | ...props, |
| 362 | children: null, |
| 363 | defaultClassName: 'react-aria-TabList', |
| 364 | values: { |
| 365 | orientation, |
| 366 | state |
| 367 | } |
| 368 | }); |
| 369 | |
| 370 | let DOMProps = filterDOMProps(props, {global: true}); |
| 371 | delete DOMProps.id; |
| 372 | |
| 373 | return ( |
| 374 | <dom.div |
| 375 | {...mergeProps(DOMProps, renderProps, tabListProps)} |
| 376 | ref={objectRef} |
| 377 | data-orientation={orientation || undefined}> |
| 378 | <SharedElementTransition> |
| 379 | <CollectionRoot |
| 380 | collection={state.collection} |
| 381 | persistedKeys={usePersistedKeys(state.selectionManager.focusedKey)} |
| 382 | /> |
| 383 | </SharedElementTransition> |
| 384 | </dom.div> |
| 385 | ); |
| 386 | } |
| 387 | |
| 388 | class TabItemNode extends CollectionNode<unknown> { |
| 389 | static readonly type = 'item'; |
nothing calls this directly
no test coverage detected