Initalize

This commit is contained in:
Your Name
2026-05-03 12:12:57 -04:00
commit 38652eb9b5
10603 changed files with 1762136 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
import { UseFocusTrapOptions, UseFocusTrapReturn } from "../useFocusTrap.js";
import * as _$vue from "vue";
import { Reactive, SlotsType } from "vue";
import { RenderableComponent } from "@vueuse/core";
//#region useFocusTrap/component.d.ts
interface UseFocusTrapProps extends RenderableComponent {
options?: UseFocusTrapOptions;
}
/**
* @deprecated
*/
interface ComponentUseFocusTrapOptions extends UseFocusTrapProps {}
interface UseFocusTrapSlots {
default: (data: Reactive<UseFocusTrapReturn>) => any;
}
declare const UseFocusTrap: _$vue.DefineSetupFnComponent<UseFocusTrapProps, Record<string, never>, SlotsType<UseFocusTrapSlots>, UseFocusTrapProps & {
[x: `on${Capitalize<string>}`]: ((...args: unknown[]) => any) | undefined;
}, _$vue.PublicProps>;
//#endregion
export { ComponentUseFocusTrapOptions, UseFocusTrap, UseFocusTrapProps };

View File

@@ -0,0 +1,15 @@
import { useFocusTrap } from "../useFocusTrap.js";
import { defineComponent, h, reactive, shallowRef } from "vue";
//#region useFocusTrap/component.ts
const UseFocusTrap = /* @__PURE__ */ defineComponent((props, { slots }) => {
const target = shallowRef();
const data = reactive(useFocusTrap(target, props.options));
return () => {
if (slots.default) return h(props.as || "div", { ref: target }, slots.default(data));
};
}, {
name: "UseFocusTrap",
props: ["as", "options"]
});
//#endregion
export { UseFocusTrap };