79 lines
2.3 KiB
JavaScript
79 lines
2.3 KiB
JavaScript
import { useEmitAsProps } from "../shared/useEmitAsProps.js";
|
|
import { useForwardExpose } from "../shared/useForwardExpose.js";
|
|
import { Presence_default } from "../Presence/Presence.js";
|
|
import { injectDialogRootContext } from "./DialogRoot.js";
|
|
import { DialogContentModal_default } from "./DialogContentModal.js";
|
|
import { DialogContentNonModal_default } from "./DialogContentNonModal.js";
|
|
import { createBlock, createCommentVNode, defineComponent, mergeProps, openBlock, renderSlot, unref, withCtx } from "vue";
|
|
|
|
//#region src/Dialog/DialogContent.vue?vue&type=script&setup=true&lang.ts
|
|
var DialogContent_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
__name: "DialogContent",
|
|
props: {
|
|
forceMount: {
|
|
type: Boolean,
|
|
required: false
|
|
},
|
|
disableOutsidePointerEvents: {
|
|
type: Boolean,
|
|
required: false
|
|
},
|
|
asChild: {
|
|
type: Boolean,
|
|
required: false
|
|
},
|
|
as: {
|
|
type: null,
|
|
required: false
|
|
}
|
|
},
|
|
emits: [
|
|
"escapeKeyDown",
|
|
"pointerDownOutside",
|
|
"focusOutside",
|
|
"interactOutside",
|
|
"openAutoFocus",
|
|
"closeAutoFocus"
|
|
],
|
|
setup(__props, { emit: __emit }) {
|
|
const props = __props;
|
|
const emits = __emit;
|
|
const rootContext = injectDialogRootContext();
|
|
const emitsAsProps = useEmitAsProps(emits);
|
|
const { forwardRef } = useForwardExpose();
|
|
return (_ctx, _cache) => {
|
|
return openBlock(), createBlock(unref(Presence_default), { present: _ctx.forceMount || unref(rootContext).open.value }, {
|
|
default: withCtx(() => [unref(rootContext).modal.value ? (openBlock(), createBlock(DialogContentModal_default, mergeProps({
|
|
key: 0,
|
|
ref: unref(forwardRef)
|
|
}, {
|
|
...props,
|
|
...unref(emitsAsProps),
|
|
..._ctx.$attrs
|
|
}), {
|
|
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
_: 3
|
|
}, 16)) : (openBlock(), createBlock(DialogContentNonModal_default, mergeProps({
|
|
key: 1,
|
|
ref: unref(forwardRef)
|
|
}, {
|
|
...props,
|
|
...unref(emitsAsProps),
|
|
..._ctx.$attrs
|
|
}), {
|
|
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
_: 3
|
|
}, 16))]),
|
|
_: 3
|
|
}, 8, ["present"]);
|
|
};
|
|
}
|
|
});
|
|
|
|
//#endregion
|
|
//#region src/Dialog/DialogContent.vue
|
|
var DialogContent_default = DialogContent_vue_vue_type_script_setup_true_lang_default;
|
|
|
|
//#endregion
|
|
export { DialogContent_default };
|
|
//# sourceMappingURL=DialogContent.js.map
|