UNPKG

@ark-ui/vue

Version:

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

39 lines (36 loc) 1.11 kB
import { defineComponent, createBlock, openBlock, unref, mergeProps, withCtx, renderSlot } from 'vue'; import { useForwardExpose } from '../../utils/use-forward-expose.js'; import { ark } from '../factory.js'; import { useProgress } from './use-progress.js'; import { ProgressProvider } from './use-progress-context.js'; const _sfc_main = /* @__PURE__ */ defineComponent({ __name: "progress-root", props: { defaultValue: {}, formatOptions: {}, id: {}, ids: {}, locale: {}, max: {}, min: {}, modelValue: {}, orientation: {}, translations: {}, asChild: { type: Boolean } }, setup(__props) { const props = __props; const progress = useProgress(props); ProgressProvider(progress); useForwardExpose(); return (_ctx, _cache) => { return openBlock(), createBlock(unref(ark).div, mergeProps(unref(progress).getRootProps(), { "as-child": _ctx.asChild }), { default: withCtx(() => [ renderSlot(_ctx.$slots, "default") ]), _: 3 }, 16, ["as-child"]); }; } }); export { _sfc_main as default };