UNPKG

@ark-ui/vue

Version:

A collection of unstyled, accessible UI components for Vue, utilizing state machines for seamless interaction.

32 lines (29 loc) 1.14 kB
import { defineComponent, createBlock, openBlock, unref, mergeProps, withCtx, renderSlot } from 'vue'; import { useRenderStrategyProps } from '../../utils/use-render-strategy.js'; import { useForwardExpose } from '../../utils/use-forward-expose.js'; import _sfc_main$1 from '../presence/presence.vue.js'; import { useDialogContext } from './use-dialog-context.js'; const _sfc_main = /* @__PURE__ */ defineComponent({ __name: "dialog-backdrop", props: { asChild: { type: Boolean } }, setup(__props) { const dialog = useDialogContext(); const renderStrategy = useRenderStrategyProps(); useForwardExpose(); return (_ctx, _cache) => { return openBlock(), createBlock(unref(_sfc_main$1), mergeProps(unref(dialog).getBackdropProps(), { present: unref(dialog).open, "lazy-mount": unref(renderStrategy).lazyMount, "unmount-on-exit": unref(renderStrategy).unmountOnExit }), { default: withCtx(() => [ renderSlot(_ctx.$slots, "default") ]), _: 3 }, 16, ["present", "lazy-mount", "unmount-on-exit"]); }; } }); export { _sfc_main as default };