@ark-ui/vue
Version:
A collection of unstyled, accessible UI components for Vue, utilizing state machines for seamless interaction.
27 lines (24 loc) • 834 B
JavaScript
import { defineComponent, computed, createBlock, openBlock, unref, mergeProps, withCtx, renderSlot } from 'vue';
import { ark } from '../factory.js';
import { ProgressProvider } from './use-progress-context.js';
const _sfc_main = /* @__PURE__ */ defineComponent({
__name: "progress-root-provider",
props: {
value: {},
asChild: { type: Boolean }
},
setup(__props) {
const props = __props;
const progress = computed(() => props.value);
ProgressProvider(progress);
return (_ctx, _cache) => {
return openBlock(), createBlock(unref(ark).div, mergeProps(progress.value.getRootProps(), { "as-child": __props.asChild }), {
default: withCtx(() => [
renderSlot(_ctx.$slots, "default")
]),
_: 3
}, 16, ["as-child"]);
};
}
});
export { _sfc_main as default };