UNPKG

@ark-ui/vue

Version:

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

50 lines (47 loc) 1.51 kB
import { defineComponent, mergeDefaults, createBlock, openBlock, unref, mergeProps, withCtx, renderSlot } from 'vue'; import { useForwardExpose } from '../../utils/use-forward-expose.js'; import { ark } from '../factory.js'; import { useMarquee } from './use-marquee.js'; import { MarqueeProvider } from './use-marquee-context.js'; const _sfc_main = /* @__PURE__ */ defineComponent({ __name: "marquee-root", props: /* @__PURE__ */ mergeDefaults({ autoFill: { type: Boolean }, defaultPaused: { type: Boolean }, delay: {}, id: {}, ids: {}, loopCount: {}, pauseOnInteraction: { type: Boolean }, paused: { type: Boolean }, reverse: { type: Boolean }, side: {}, spacing: {}, speed: {}, translations: {}, asChild: { type: Boolean } }, { autoFill: void 0, defaultPaused: void 0, pauseOnInteraction: void 0, paused: void 0, reverse: void 0 }), emits: ["complete", "loopComplete", "pauseChange"], setup(__props, { emit: __emit }) { const props = __props; const emits = __emit; const marquee = useMarquee(props, emits); MarqueeProvider(marquee); useForwardExpose(); return (_ctx, _cache) => { return openBlock(), createBlock(unref(ark).div, mergeProps(unref(marquee).getRootProps(), { "as-child": __props.asChild }), { default: withCtx(() => [ renderSlot(_ctx.$slots, "default") ]), _: 3 }, 16, ["as-child"]); }; } }); export { _sfc_main as default };