import { type Ref } from 'vue'; import type { OkuElement, PrimitiveProps } from '@oku-ui/primitive'; import type { Scope } from '@oku-ui/provide'; export type ScopeDismissableLayer = T & { scopeOkuDismissableLayer?: Scope; }; export declare const scopeDismissableLayerProps: { scopeOkuDismissableLayer: { type: import("vue").PropType>; required: boolean; }; }; export declare const DISMISSABLE_NAME = "OkuDismissableLayer"; export declare const BRANCH_NAME = "OkuDismissableLayerBranch"; export declare const INJECT_UPDATE = "dismissableLayer.update"; export declare const POINTER_DOWN_OUTSIDE = "dismissableLayer.pointerdownOutside"; export declare const FOCUS_OUTSIDE = "dismissableLayer.focusOutside"; export declare const DismissableLayerProvideKey: unique symbol; export type DismissableLayerProvideValue = { layers: Ref>; layersWithOutsidePointerEventsDisabled: Ref>; branches: Ref>; }; export declare const dismissableLayerInject: { layers: Set & Omit, keyof Set>; layersWithOutsidePointerEventsDisabled: Set & Omit, keyof Set>; branches: Set & Omit, keyof Set>; }; export type DismissableLayerNativeElement = OkuElement<'div'>; export type DismissableLayerElement = HTMLDivElement; export type PointerdownOutsideEvent = CustomEvent<{ originalEvent: PointerEvent; }>; export type FocusOutsideEvent = CustomEvent<{ originalEvent: FocusEvent; }>; export type FocusCaptureEvent = CustomEvent<{ originalEvent: FocusEvent; }>; export type FocusBlurCaptureEvent = CustomEvent<{ originalEvent: FocusEvent; }>; export type PointerdownCaptureEvent = CustomEvent<{ originalEvent: PointerEvent; }>; export interface DismissableLayerProps extends PrimitiveProps { /** * When `true`, hover/focus/click interactions will be disabled on elements outside * the `DismissableLayer`. Users will need to click twice on outside elements to * interact with them: once to close the `DismissableLayer`, and again to trigger the element. */ disableOutsidePointerEvents?: boolean; } export type DismissableLayerEmits = { /** * Event handler called when the escape key is down. * Can be prevented. */ escapeKeydown: [event: KeyboardEvent]; /** * Event handler called when the a `pointerdown` event happens outside of the `DismissableLayer`. * Can be prevented. */ pointerdownOutside: [event: PointerdownOutsideEvent]; /** * Event handler called when the focus moves outside of the `DismissableLayer`. * Can be prevented. */ focusOutside: [event: FocusOutsideEvent]; /** * Event handler called when an interaction happens outside the `DismissableLayer`. * Specifically, when a `pointerdown` event happens outside or focus moves outside of it. * Can be prevented. */ interactOutside: [event: PointerdownOutsideEvent | FocusOutsideEvent]; /** * Handler called when the `DismissableLayer` should be dismissed */ dismiss: []; focusCapture: [event: FocusCaptureEvent]; blurCapture: [event: FocusBlurCaptureEvent]; pointerdownCapture: [event: PointerdownCaptureEvent]; }; export declare const dismissableLayerProps: { props: { asChild: BooleanConstructor; disableOutsidePointerEvents: { type: BooleanConstructor; default: boolean; }; }; emits: { escapeKeydown: (event: KeyboardEvent) => boolean; pointerdownOutside: (event: PointerdownOutsideEvent) => boolean; focusOutside: (event: FocusOutsideEvent) => boolean; interactOutside: (event: PointerdownOutsideEvent | FocusOutsideEvent) => boolean; dismiss: () => boolean; focusCapture: (event: FocusCaptureEvent) => boolean; blurCapture: (event: FocusBlurCaptureEvent) => boolean; pointerdownCapture: (event: PointerdownCaptureEvent) => boolean; }; }; export type DismissableLayerBranchNativeElement = OkuElement<'div'>; export type DismissableLayerBranchElement = HTMLDivElement; export interface DismissableLayerBranchProps extends PrimitiveProps { } export declare const dismissableLayerBranchProps: { props: { asChild: BooleanConstructor; }; emits: {}; };