import { CElement, DOMElement, FunctionComponentElement, ReactComponentElement, ReactElement } from 'react'; export type FocusableRenderOptions = { /** * Is the element focused (via keyboard only)? */ focused: boolean; /** * The focusable element */ focusable?: HTMLElement; /** * Whether the focus state should be visible or not */ focusVisible: boolean; attachRef: (el: Element | null) => void; }; type FocusableRenderFunction = (opts: FocusableRenderOptions) => (ReactElement | ReactComponentElement | DOMElement | CElement | FunctionComponentElement) & { ref?: (args: any[]) => unknown; }; type FocusableOwnProps = { /** * The function called on each render. Identical to `render()` * @param {Object} opts - Render options * @param {boolean} opts.focused - Is the element focused (via keyboard only)? * @param {HTMLElement} opts.focusable - The focusable element. * @param {boolean} opts.focusVisible - Whether the focus state should be visible or not. * @param {function} opts.attachRef - Used internally to get a reference to the object. */ children?: FocusableRenderFunction; /** * The function called on each render. Identical to `children()`. * @param {Object} opts - Render options * @param {boolean} opts.focused - Is the element focused (via keyboard only)? * @param {HTMLElement} opts.focusable - The focusable element. * @param {boolean} opts.focusVisible - Whether the focus state should be visible or not. * @param {function} opts.attachRef - Used internally to get a reference to the object. */ render?: FocusableRenderFunction; }; type PropKeys = keyof FocusableOwnProps; type AllowedPropKeys = Readonly>; type FocusableProps = FocusableOwnProps; declare const allowedProps: AllowedPropKeys; type FocusableState = { focused: boolean; focusable?: HTMLElement; }; export type { FocusableProps, FocusableState }; export { allowedProps }; //# sourceMappingURL=props.d.ts.map