| 10 | import { useRovingTabIndexContext } from './RovingTabIndexContext'; |
| 11 | |
| 12 | export interface Item<Key = unknown> { |
| 13 | /** |
| 14 | * The logical id used to track the item across reorders and re-renders. |
| 15 | * Components such as `Tabs` use the tab value here, while `MenuItem` generates an internal id. |
| 16 | */ |
| 17 | id: Key; |
| 18 | /** |
| 19 | * The item's current DOM element. |
| 20 | */ |
| 21 | element: HTMLElement | null; |
| 22 | /** |
| 23 | * Whether the item ignores user interaction. |
| 24 | */ |
| 25 | disabled: boolean; |
| 26 | /** |
| 27 | * Whether a disabled item should still be allowed to receive roving focus. |
| 28 | * `MenuList` uses this for its `disabledItemsFocusable` behavior. |
| 29 | */ |
| 30 | focusableWhenDisabled: boolean; |
| 31 | /** |
| 32 | * An optional text string used for typeahead matching. |
| 33 | */ |
| 34 | textValue?: string | undefined; |
| 35 | /** |
| 36 | * Whether the item is currently selected in the consumer component's own state model. |
| 37 | * `MenuList` uses this when `variant="selectedMenu"` to prefer the selected item by default, |
| 38 | * and `Tabs` sets this on the selected tab. |
| 39 | */ |
| 40 | selected: boolean; |
| 41 | } |
| 42 | |
| 43 | export interface UseRovingTabIndexParams<Key = unknown> { |
| 44 | /** |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…