radix-vue
Version:
Vue port for Radix UI Primitives.
76 lines (75 loc) • 2.28 kB
TypeScript
import type { PrimitiveProps } from '../Primitive';
export type FocusScopeEmits = {
/**
* Event handler called when auto-focusing on mount.
* Can be prevented.
*/
'mountAutoFocus': [event: Event];
/**
* Event handler called when auto-focusing on unmount.
* Can be prevented.
*/
'unmountAutoFocus': [event: Event];
};
export interface FocusScopeProps extends PrimitiveProps {
/**
* When `true`, tabbing from last item will focus first tabbable
* and shift+tab from first item will focus last tababble.
* @defaultValue false
*/
loop?: boolean;
/**
* When `true`, focus cannot escape the focus scope via keyboard,
* pointer, or a programmatic focus.
* @defaultValue false
*/
trapped?: boolean;
}
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
loop: {
type: import("vue").PropType<boolean>;
default: boolean;
};
asChild: {
type: import("vue").PropType<boolean>;
};
as: {
type: import("vue").PropType<import('../Primitive').AsTag | import("vue").Component>;
};
trapped: {
type: import("vue").PropType<boolean>;
default: boolean;
};
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
mountAutoFocus: (event: Event) => void;
unmountAutoFocus: (event: Event) => void;
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
loop: {
type: import("vue").PropType<boolean>;
default: boolean;
};
asChild: {
type: import("vue").PropType<boolean>;
};
as: {
type: import("vue").PropType<import('../Primitive').AsTag | import("vue").Component>;
};
trapped: {
type: import("vue").PropType<boolean>;
default: boolean;
};
}>> & {
onMountAutoFocus?: ((event: Event) => any) | undefined;
onUnmountAutoFocus?: ((event: Event) => any) | undefined;
}, {
loop: boolean;
trapped: boolean;
}, {}>, {
default?(_: {}): any;
}>;
export default _default;
type __VLS_WithTemplateSlots<T, S> = T & {
new (): {
$slots: S;
};
};