import type { ReactElement, ReactNode } from 'react'; import React from 'react'; import type { Action, Options, State } from './types'; export declare function reducer(state: State, action: Action): State; export declare const RovingTabIndexContext: React.Context; }>>; /** * Creates a roving tabindex context. * @param {ReactNode} children - The child content, which will * include the DOM elements to rove between using the tab key. * @param {Object} options - An optional object to customize the * behaviour of the library. It is fine to pass a new object * every time the containing component is rendered, and the options * can be updated at any time. * @param {KeyDirection} options.direction - An optional direction value * that only applies when the roving tabindex is not being * used within a grid. This value specifies the arrow key behaviour. * The default value is 'horizontal'. * When set to 'horizontal' then only the ArrowLeft and ArrowRight * keys move to the previous and next tab stop respectively. * When set to 'vertical' then only the ArrowUp and ArrowDown keys * move to the previous and next tab stop respectively. When set * to 'both' then both the ArrowLeft and ArrowUp keys can be used * to move to the previous tab stop, and both the ArrowRight * and ArrowDown keys can be used to move to the next tab stop. * If you do not pass an explicit value then the 'horizontal' * behaviour applies. * @param {boolean} options.focusOnClick - An optional flag for indicating * if `focus()` should invoked on an item in the roving tabindex * when it is clicked. The default value for this flag is `false`, * meaning that `focus()` will not be invoked on click. * Browsers are * [inconsistent in their behaviour](https://zellwk.com/blog/inconsistent-button-behavior/) * when a button is clicked so you will see some variation between * the browsers with the default value. Prior to version 3 of this library, * the behaviour was to always invoke `focus()` on click; this behaviour * can be maintained by passing `true`. * @param {boolean} options.loopAround - An optional flag that, * when set to `true`, will loop the tabindex around when the user * tries to tab to the first or last elements in the roving tabindex, * rather than stopping. The default value is `false` (no looping). * Note that this option does not apply if the roving tabindex * is being used on a grid. */ export declare const Provider: ({ children, options, }: { children: ReactNode; options?: Options; }) => ReactElement; //# sourceMappingURL=Provider.d.ts.map