first commit
This commit is contained in:
21
node_modules/@vueuse/integrations/dist/useFocusTrap/component.d.ts
generated
vendored
Normal file
21
node_modules/@vueuse/integrations/dist/useFocusTrap/component.d.ts
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
import { n as UseFocusTrapReturn, t as UseFocusTrapOptions } from "../index-CJw_eFkJ.js";
|
||||
import * as vue4 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: vue4.DefineSetupFnComponent<UseFocusTrapProps, Record<string, never>, SlotsType<UseFocusTrapSlots>, UseFocusTrapProps & {
|
||||
[x: `on${Capitalize<string>}`]: ((...args: unknown[]) => any) | undefined;
|
||||
}, vue4.PublicProps>;
|
||||
//#endregion
|
||||
export { ComponentUseFocusTrapOptions, UseFocusTrap, UseFocusTrapProps };
|
||||
17
node_modules/@vueuse/integrations/dist/useFocusTrap/component.js
generated
vendored
Normal file
17
node_modules/@vueuse/integrations/dist/useFocusTrap/component.js
generated
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
import { t as useFocusTrap } from "../useFocusTrap-lXZ_YG-8.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 };
|
||||
Reference in New Issue
Block a user