UNPKG

@ark-ui/vue

Version:

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

28 lines (25 loc) 951 B
import { defineComponent, computed, renderSlot } from 'vue'; import { useForwardExpose } from '../../utils/use-forward-expose.js'; import { usePresence } from '../presence/use-presence.js'; import { PresenceProvider } from '../presence/use-presence-context.js'; import { FloatingPanelProvider } from './use-floating-panel-context.js'; const _sfc_main = /* @__PURE__ */ defineComponent({ __name: "floating-panel-root-provider", props: { value: {}, lazyMount: { type: Boolean }, unmountOnExit: { type: Boolean } }, setup(__props) { const props = __props; const floatingPanel = computed(() => props.value); FloatingPanelProvider(floatingPanel); const presence = usePresence(computed(() => ({ present: floatingPanel.value.open }))); PresenceProvider(presence); useForwardExpose(); return (_ctx, _cache) => { return renderSlot(_ctx.$slots, "default"); }; } }); export { _sfc_main as default };