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
40 lines (37 loc) • 1.67 kB
JavaScript
import BaseStyle from '@primevue/core/base/style';
var classes = {
root: function root(_ref) {
var _instance$$pcCarousel;
var instance = _ref.instance;
return ['p-carousel-content', ((_instance$$pcCarousel = instance.$pcCarousel) === null || _instance$$pcCarousel === void 0 ? void 0 : _instance$$pcCarousel.orientation) === 'vertical' ? 'p-carousel-content-vertical' : 'p-carousel-content-horizontal'];
}
};
var inlineStyles = {
root: function root(_ref2) {
var _c$resolveSnapType;
var instance = _ref2.instance;
var c = instance.$pcCarousel;
var isVertical = (c === null || c === void 0 ? void 0 : c.orientation) === 'vertical';
return {
'--px-slides-per-page': c === null || c === void 0 ? void 0 : c.slidesPerPage,
'--px-spacing-items': (c === null || c === void 0 ? void 0 : c.spacing) + 'px',
'--px-scroll-snap-type': c === null || c === void 0 || (_c$resolveSnapType = c.resolveSnapType) === null || _c$resolveSnapType === void 0 ? void 0 : _c$resolveSnapType.call(c),
position: 'relative',
scrollbarWidth: 'none',
display: 'flex',
flexDirection: isVertical ? 'column' : 'row',
overflowX: isVertical ? undefined : 'scroll',
overflowY: isVertical ? 'scroll' : undefined,
overscrollBehaviorX: isVertical ? undefined : 'contain',
overscrollBehaviorY: isVertical ? 'contain' : undefined,
gap: 'var(--px-spacing-items)',
scrollSnapType: 'var(--px-scroll-snap-type)'
};
}
};
var CarouselContentStyle = BaseStyle.extend({
name: 'carouselcontent',
classes: classes,
inlineStyles: inlineStyles
});
export { CarouselContentStyle as default };