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