@ark-ui/vue
Version:
A collection of unstyled, accessible UI components for Vue, utilizing state machines for seamless interaction.
54 lines (49 loc) • 1.69 kB
JavaScript
'use strict';
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
const vue = require('vue');
const factory = require('../factory.cjs');
const useRatingGroup = require('./use-rating-group.cjs');
const useRatingGroupContext = require('./use-rating-group-context.cjs');
const useForwardExpose = require('../../utils/use-forward-expose.cjs');
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
__name: "rating-group-root",
props: /* @__PURE__ */ vue.mergeDefaults({
allowHalf: { type: Boolean },
autoFocus: { type: Boolean },
count: {},
defaultValue: {},
disabled: { type: Boolean },
form: {},
id: {},
ids: {},
modelValue: {},
name: {},
readOnly: { type: Boolean },
required: { type: Boolean },
translations: {},
asChild: { type: Boolean }
}, {
allowHalf: void 0,
autoFocus: void 0,
disabled: void 0,
readOnly: void 0,
required: void 0
}),
emits: ["hoverChange", "valueChange", "update:modelValue"],
setup(__props, { emit: __emit }) {
const props = __props;
const emits = __emit;
const ratingGroup = useRatingGroup.useRatingGroup(props, emits);
useRatingGroupContext.RatingGroupProvider(ratingGroup);
useForwardExpose.useForwardExpose();
return (_ctx, _cache) => {
return vue.openBlock(), vue.createBlock(vue.unref(factory.ark).div, vue.mergeProps(vue.unref(ratingGroup).getRootProps(), { "as-child": _ctx.asChild }), {
default: vue.withCtx(() => [
vue.renderSlot(_ctx.$slots, "default")
]),
_: 3
}, 16, ["as-child"]);
};
}
});
exports.default = _sfc_main;