UNPKG

primevue

Version:

PrimeVue is a premium UI library for Vue featuring a rich set of 90+ components, a theme designer, various theme alternatives such as Material, Bootstrap, Tailwind, premium templates and professional support. In addition, it integrates with PrimeBlock, wh

83 lines (77 loc) 3.83 kB
import { mergeProps, openBlock, createBlock, resolveDynamicComponent, withCtx, renderSlot, normalizeClass } from 'vue'; import BaseComponent from '@primevue/core/basecomponent'; import CarouselContentStyle from 'primevue/carouselcontent/style'; var script$1 = { name: 'BaseCarouselContent', "extends": BaseComponent, props: { as: { type: [String, Object], "default": 'DIV' }, asChild: { type: Boolean, "default": false } }, style: CarouselContentStyle, provide: function provide() { return { $pcCarouselContent: this, $parentInstance: this }; } }; var script = { name: 'CarouselContent', "extends": script$1, inheritAttrs: false, inject: ['$pcCarousel'], methods: { setContentElRef: function setContentElRef(el) { var _this$$pcCarousel, _el$$el; (_this$$pcCarousel = this.$pcCarousel) === null || _this$$pcCarousel === void 0 || _this$$pcCarousel.setContentEl((_el$$el = el === null || el === void 0 ? void 0 : el.$el) !== null && _el$$el !== void 0 ? _el$$el : el); } }, computed: { attrs: function attrs() { return mergeProps(this.a11yAttrs, this.ptmi('root')); }, a11yAttrs: function a11yAttrs() { var _this$$pcCarousel2, _this$$pcCarousel3, _this$$pcCarousel4, _this$$pcCarousel5, _this$$pcCarousel6, _this$$pcCarousel7, _this$$pcCarousel7$is, _this$$pcCarousel8, _this$$pcCarousel9, _this$$pcCarousel0, _this$$pcCarousel1; return { ref: this.setContentElRef, 'data-pc-name': 'carouselcontent', 'data-pc-section': 'root', style: this.sx('root'), 'data-orientation': (_this$$pcCarousel2 = this.$pcCarousel) === null || _this$$pcCarousel2 === void 0 ? void 0 : _this$$pcCarousel2.orientation, 'data-align': (_this$$pcCarousel3 = this.$pcCarousel) === null || _this$$pcCarousel3 === void 0 ? void 0 : _this$$pcCarousel3.align, 'data-page': (_this$$pcCarousel4 = this.$pcCarousel) === null || _this$$pcCarousel4 === void 0 ? void 0 : _this$$pcCarousel4.d_page, 'data-swiping': (_this$$pcCarousel5 = this.$pcCarousel) !== null && _this$$pcCarousel5 !== void 0 && _this$$pcCarousel5.swiping ? '' : undefined, 'data-autosize': (_this$$pcCarousel6 = this.$pcCarousel) !== null && _this$$pcCarousel6 !== void 0 && _this$$pcCarousel6.autoSize ? '' : undefined, 'aria-live': (_this$$pcCarousel7 = this.$pcCarousel) !== null && _this$$pcCarousel7 !== void 0 && (_this$$pcCarousel7$is = _this$$pcCarousel7.isAutoplay) !== null && _this$$pcCarousel7$is !== void 0 && _this$$pcCarousel7$is.call(_this$$pcCarousel7) ? 'off' : 'polite', onPointerdown: (_this$$pcCarousel8 = this.$pcCarousel) === null || _this$$pcCarousel8 === void 0 ? void 0 : _this$$pcCarousel8.onContentPointerDown, onPointermove: (_this$$pcCarousel9 = this.$pcCarousel) === null || _this$$pcCarousel9 === void 0 ? void 0 : _this$$pcCarousel9.onContentPointerMove, onPointerup: (_this$$pcCarousel0 = this.$pcCarousel) === null || _this$$pcCarousel0 === void 0 ? void 0 : _this$$pcCarousel0.onContentPointerUp, onWheel: (_this$$pcCarousel1 = this.$pcCarousel) === null || _this$$pcCarousel1 === void 0 ? void 0 : _this$$pcCarousel1.onContentWheel }; } } }; function render(_ctx, _cache, $props, $setup, $data, $options) { return !_ctx.asChild ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.as), mergeProps({ key: 0, "class": _ctx.cx('root') }, $options.attrs), { "default": withCtx(function () { return [renderSlot(_ctx.$slots, "default")]; }), _: 3 }, 16, ["class"])) : renderSlot(_ctx.$slots, "default", { key: 1, a11yAttrs: $options.a11yAttrs, "class": normalizeClass(_ctx.cx('root')) }); } script.render = render; export { script as default };