UNPKG

@ark-ui/vue

Version:

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

33 lines (30 loc) 1.27 kB
import { defineComponent, createBlock, createCommentVNode, unref, openBlock, 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 { useTourContext } from './use-tour-context.js'; const _sfc_main = /* @__PURE__ */ defineComponent({ __name: "tour-backdrop", props: { asChild: { type: Boolean } }, setup(__props) { const tour = useTourContext(); const renderStrategy = useRenderStrategyProps(); useForwardExpose(); return (_ctx, _cache) => { return unref(tour).step?.backdrop ? (openBlock(), createBlock(unref(_sfc_main$1), mergeProps({ key: 0 }, unref(tour).getBackdropProps(), { hidden: !unref(tour).open, present: unref(tour).open, "lazy-mount": unref(renderStrategy).lazyMount, "unmount-on-exit": unref(renderStrategy).unmountOnExit }), { default: withCtx(() => [ renderSlot(_ctx.$slots, "default") ]), _: 3 }, 16, ["hidden", "present", "lazy-mount", "unmount-on-exit"])) : createCommentVNode("", true); }; } }); export { _sfc_main as default };