// Type definitions for spotlight/SpotlightContainerDecorator type Omit = Pick>; type Merge = Omit> & N; /** * The class name to apply to the default component to focus in a container. */ export declare const spotlightDefaultClass: string; export interface SpotlightContainerDecoratorConfig extends Object { /** * When `true` , allows focus to move outside the container to the next spottable element when holding 5 way keys. */ continue5WayHold?: boolean; /** * The selector for the default spottable element within the container. When an array of selectors is provided, the first selector that successfully matches a node is used. */ defaultElement?: string | string[]; /** * Directs which element receives focus when gaining focus from another container. If `'default-element'` , the default focused item will be selected. If `'last-focused'` , the container will focus the last focused item; if the container has never had focus, the default element will receive focus. If `null` , the default 5-way behavior will be applied. */ enterTo?: string; /** * Directs which element receives focus when the focus is leaving from the current container using 5-way direction keys. If `{down: '#left'}` , the focus moves to the DOM element whose id value is `left` when pressing the 5-way down. If `{left: '', right: ''}` , the focus cannot leave the current container with 5-way left and right. If `null` , the default 5-way behavior will be applied. */ leaveFor?: object; /** * Filter the navigable elements. */ navigableFilter?: Function; /** * Whether the container will preserve the specified `spotlightId` when it unmounts. */ preserveId?: boolean; /** * Restricts or prioritizes navigation when focus attempts to leave the container. It can be either 'none', 'self-first', or 'self-only'. Specifying 'self-first' indicates that elements within the container will have a higher likelihood to be chosen as the next navigable element. Specifying 'self-only' indicates that elements in other containers cannot be navigated to by using 5-way navigation - however, elements in other containers can still receive focus by calling `Spotlight.focus(elem)` explicitly. Specifying 'none' indicates there should be no restrictions when 5-way navigating the container. */ restrict?: string; } export interface SpotlightContainerDecoratorProps { /** * When `true` , controls in the container cannot be navigated. */ spotlightDisabled?: boolean; /** * Used to identify this component within the Spotlight system. * * If the value is `null` , an id will be generated. To keep the container information for restoring focus, it is required to specify a unique identifier. */ spotlightId?: string; /** * Whether or not the container is in muted mode. * * In muted mode, `:focus` CSS styles will not be applied to the Spottable controls giving them the appearance of not having focus while they still have focus. */ spotlightMuted?: boolean; /** * Restricts or prioritizes navigation when focus attempts to leave the container. It can be either 'none', 'self-first', or 'self-only'. Specifying 'self-first' indicates that elements within the container will have a higher likelihood to be chosen as the next navigable element. Specifying 'self-only' indicates that elements in other containers cannot be navigated to by using 5-way navigation - however, elements in other containers can still receive focus by calling `Spotlight.focus(elem)` explicitly. Specifying 'none' indicates there should be no restrictions when 5-way navigating the container. */ spotlightRestrict?: string; } export function SpotlightContainerDecorator

( config: SpotlightContainerDecoratorConfig, Component: React.ComponentType

| string, ): React.ComponentType

; export function SpotlightContainerDecorator

( Component: React.ComponentType

| string, ): React.ComponentType

; export default SpotlightContainerDecorator;