UNPKG

@ark-ui/vue

Version:

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

38 lines (35 loc) 1.1 kB
import { defineComponent, mergeDefaults, createBlock, openBlock, unref, mergeProps, withCtx, renderSlot } from 'vue'; import { ark } from '../factory.js'; import { useSteps } from './use-steps.js'; import { StepsProvider } from './use-steps-context.js'; import { useForwardExpose } from '../../utils/use-forward-expose.js'; const _sfc_main = /* @__PURE__ */ defineComponent({ __name: "steps-root", props: /* @__PURE__ */ mergeDefaults({ count: {}, defaultStep: {}, id: {}, ids: {}, linear: { type: Boolean }, orientation: {}, step: {}, asChild: { type: Boolean } }, { linear: void 0 }), setup(__props) { const props = __props; const steps = useSteps(props); StepsProvider(steps); useForwardExpose(); return (_ctx, _cache) => { return openBlock(), createBlock(unref(ark).div, mergeProps(unref(steps).getRootProps(), { "as-child": _ctx.asChild }), { default: withCtx(() => [ renderSlot(_ctx.$slots, "default") ]), _: 3 }, 16, ["as-child"]); }; } }); export { _sfc_main as default };