import { type FocusEvent } from 'react'; import type { ValidationState } from '../validation/types.js'; /** @internal */ interface UseContainerFocusOptions { onFocus?: (e: FocusEvent) => void; onBlur?: (e: FocusEvent) => void; disabled?: boolean; emitValidationState?: (state: ValidationState) => void; /** * When provided, called on blur instead of the default * `getI18nValidationState(intl, control, 'blur')` to produce the * ValidationState passed to `emitValidationState`. Use when the component * has richer error state than native input.validity can express. */ getBlurValidationState?: () => ValidationState; /** * When set, elements inside a portaled overlay tagged with * `data-dt-owner="{overlayOwnerId}"` are treated as part of the component * boundary. Focus moving between the container and the overlay does not * fire onFocus, onBlur, or SETISTOUCHED. */ overlayOwnerId?: string; /** * When provided, called with the blur relatedTarget before SETISTOUCHED is * dispatched. Return true to suppress the blur (no SETISTOUCHED, no onBlur). * * TODO: [APPDEV-19074] Temporary escape hatch for the TimeframeSelector overlay — clicking * preset/recent items shifts focus outside the picker boundary, which causes * SETISTOUCHED to fire and the resulting layout shift makes the click miss. * Remove once the layout shift is resolved at the root. */ shouldSuppressBlur?: (relatedTarget: Element | null) => boolean; } /** @internal */ export declare function useContainerFocus({ onFocus, onBlur, disabled, emitValidationState, getBlurValidationState, overlayOwnerId, shouldSuppressBlur, }: UseContainerFocusOptions): { containerClassName: string; onFocus: (e: FocusEvent) => void; onBlur: (e: FocusEvent) => void; tabIndex: number; }; export {}; //# sourceMappingURL=useContainerFocus.d.ts.map