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

79 lines (73 loc) 2.61 kB
import { mergeProps, openBlock, createBlock, resolveDynamicComponent, withCtx, renderSlot, normalizeClass } from 'vue'; import BaseComponent from '@primevue/core/basecomponent'; import CarouselItemStyle from 'primevue/carouselitem/style'; var script$1 = { name: 'BaseCarouselItem', "extends": BaseComponent, props: { as: { type: [String, Object], "default": 'DIV' }, asChild: { type: Boolean, "default": false }, value: { type: [String, Number], "default": null } }, style: CarouselItemStyle, provide: function provide() { return { $pcCarouselItem: this, $parentInstance: this }; } }; var script = { name: 'CarouselItem', "extends": script$1, inheritAttrs: false, inject: ['$pcCarousel'], computed: { attrs: function attrs() { return mergeProps(this.a11yAttrs, this.ptmi('root')); }, a11yAttrs: function a11yAttrs() { var _this$$pcCarousel, _this$$pcCarousel2, _this$$pcCarousel3, _this$$pcCarousel4, _this$$pcCarousel5; return { role: 'group', 'aria-hidden': 'false', 'data-pc-name': 'carouselitem', 'data-pc-section': 'root', style: this.sx('root'), 'data-value': this.value, 'data-inview': 'false', 'data-orientation': (_this$$pcCarousel = this.$pcCarousel) === null || _this$$pcCarousel === void 0 ? void 0 : _this$$pcCarousel.orientation, 'data-align': (_this$$pcCarousel2 = this.$pcCarousel) === null || _this$$pcCarousel2 === void 0 ? void 0 : _this$$pcCarousel2.align, 'data-page': (_this$$pcCarousel3 = this.$pcCarousel) === null || _this$$pcCarousel3 === void 0 ? void 0 : _this$$pcCarousel3.d_page, 'data-swiping': (_this$$pcCarousel4 = this.$pcCarousel) !== null && _this$$pcCarousel4 !== void 0 && _this$$pcCarousel4.swiping ? '' : undefined, 'data-autosize': (_this$$pcCarousel5 = this.$pcCarousel) !== null && _this$$pcCarousel5 !== void 0 && _this$$pcCarousel5.autoSize ? '' : undefined }; } } }; 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 };