UNPKG

@ark-ui/vue

Version:

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

34 lines (29 loc) 1.23 kB
'use strict'; Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } }); const vue = require('vue'); const factory = require('../factory.cjs'); const useRatingGroupContext = require('./use-rating-group-context.cjs'); const useRatingGroupItemContext = require('./use-rating-group-item-context.cjs'); const useForwardExpose = require('../../utils/use-forward-expose.cjs'); const _sfc_main = /* @__PURE__ */ vue.defineComponent({ __name: "rating-group-item", props: { index: {}, asChild: { type: Boolean } }, setup(__props) { const props = __props; const ratingGroup = useRatingGroupContext.useRatingGroupContext(); useRatingGroupItemContext.RatingGroupItemProvider(vue.computed(() => ratingGroup.value.getItemState(props))); useForwardExpose.useForwardExpose(); return (_ctx, _cache) => { return vue.openBlock(), vue.createBlock(vue.unref(factory.ark).span, vue.mergeProps(vue.unref(ratingGroup).getItemProps(props), { "as-child": _ctx.asChild }), { default: vue.withCtx(() => [ vue.renderSlot(_ctx.$slots, "default") ]), _: 3 }, 16, ["as-child"]); }; } }); exports.default = _sfc_main;