@ark-ui/vue
Version:
A collection of unstyled, accessible UI components for Vue, utilizing state machines for seamless interaction.
55 lines (50 loc) • 1.68 kB
JavaScript
'use strict';
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
const vue = require('vue');
const factory = require('../factory.cjs');
const useCarousel = require('./use-carousel.cjs');
const useCarouselContext = require('./use-carousel-context.cjs');
const useForwardExpose = require('../../utils/use-forward-expose.cjs');
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
__name: "carousel-root",
props: /* @__PURE__ */ vue.mergeDefaults({
allowMouseDrag: { type: Boolean },
autoplay: { type: [Boolean, Object] },
defaultPage: {},
id: {},
ids: {},
inViewThreshold: {},
loop: { type: Boolean },
orientation: {},
padding: {},
page: {},
slideCount: {},
slidesPerMove: {},
slidesPerPage: {},
snapType: {},
spacing: {},
translations: {},
asChild: { type: Boolean }
}, {
allowMouseDrag: void 0,
loop: void 0,
autoplay: void 0
}),
emits: ["autoplayStatusChange", "dragStatusChange", "pageChange", "update:page"],
setup(__props, { emit: __emit }) {
const props = __props;
const emits = __emit;
const carousel = useCarousel.useCarousel(props, emits);
useCarouselContext.CarouselProvider(carousel);
useForwardExpose.useForwardExpose();
return (_ctx, _cache) => {
return vue.openBlock(), vue.createBlock(vue.unref(factory.ark).div, vue.mergeProps(vue.unref(carousel).getRootProps(), { "as-child": _ctx.asChild }), {
default: vue.withCtx(() => [
vue.renderSlot(_ctx.$slots, "default")
]),
_: 3
}, 16, ["as-child"]);
};
}
});
exports.default = _sfc_main;