UNPKG

@ark-ui/vue

Version:

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

29 lines (26 loc) 948 B
import { defineComponent, computed, createBlock, openBlock, unref, mergeProps, withCtx, renderSlot } from 'vue'; import { ark } from '../factory.js'; import { RatingGroupProvider } from './use-rating-group-context.js'; import { useForwardExpose } from '../../utils/use-forward-expose.js'; const _sfc_main = /* @__PURE__ */ defineComponent({ __name: "rating-group-root-provider", props: { value: {}, asChild: { type: Boolean } }, setup(__props) { const props = __props; const ratingGroup = computed(() => props.value); RatingGroupProvider(ratingGroup); useForwardExpose(); return (_ctx, _cache) => { return openBlock(), createBlock(unref(ark).div, mergeProps(ratingGroup.value.getRootProps(), { "as-child": _ctx.asChild }), { default: withCtx(() => [ renderSlot(_ctx.$slots, "default") ]), _: 3 }, 16, ["as-child"]); }; } }); export { _sfc_main as default };