2023-10-02 10:46:09 +00:00
|
|
|
import BaseStyle from 'primevue/base/style';
|
|
|
|
|
|
|
|
const classes = {
|
|
|
|
mask: ({ instance }) => [
|
|
|
|
'p-galleria-mask p-component-overlay p-component-overlay-enter',
|
|
|
|
{
|
|
|
|
'p-ripple-disabled': instance.$primevue.config.ripple === false
|
|
|
|
}
|
|
|
|
],
|
|
|
|
root: ({ instance }) => {
|
|
|
|
const thumbnailsPosClass = instance.$attrs.showThumbnails && instance.getPositionClass('p-galleria-thumbnails', instance.$attrs.thumbnailsPosition);
|
|
|
|
const indicatorPosClass = instance.$attrs.showIndicators && instance.getPositionClass('p-galleria-indicators', instance.$attrs.indicatorsPosition);
|
|
|
|
|
|
|
|
return [
|
|
|
|
'p-galleria p-component',
|
|
|
|
{
|
|
|
|
'p-galleria-fullscreen': instance.$attrs.fullScreen,
|
2024-04-10 12:05:27 +00:00
|
|
|
'p-galleria-inset-indicators': instance.$attrs.showIndicatorsOnItem,
|
|
|
|
'p-galleria-hover-navigators': instance.$attrs.showItemNavigatorsOnHover && !instance.$attrs.fullScreen
|
2023-10-02 10:46:09 +00:00
|
|
|
},
|
|
|
|
thumbnailsPosClass,
|
|
|
|
indicatorPosClass
|
|
|
|
];
|
|
|
|
},
|
2024-04-10 12:05:27 +00:00
|
|
|
closeButton: 'p-galleria-close-button',
|
2023-10-02 10:46:09 +00:00
|
|
|
closeIcon: 'p-galleria-close-icon',
|
|
|
|
header: 'p-galleria-header',
|
|
|
|
content: 'p-galleria-content',
|
|
|
|
footer: 'p-galleria-footer',
|
2024-04-10 12:05:27 +00:00
|
|
|
itemWrapper: 'p-galleria-items-container',
|
|
|
|
itemContainer: 'p-galleria-items',
|
2023-10-02 10:46:09 +00:00
|
|
|
previousItemButton: ({ instance }) => [
|
2024-04-10 12:05:27 +00:00
|
|
|
'p-galleria-prev-button p-galleria-navigate-button',
|
2023-10-02 10:46:09 +00:00
|
|
|
{
|
|
|
|
'p-disabled': instance.isNavBackwardDisabled()
|
|
|
|
}
|
|
|
|
],
|
2024-04-10 12:05:27 +00:00
|
|
|
previousItemIcon: 'p-galleria-prev-icon',
|
2023-10-02 10:46:09 +00:00
|
|
|
item: 'p-galleria-item',
|
|
|
|
nextItemButton: ({ instance }) => [
|
2024-04-10 12:05:27 +00:00
|
|
|
'p-galleria-next-button p-galleria-navigate-button',
|
2023-10-02 10:46:09 +00:00
|
|
|
{
|
|
|
|
'p-disabled': instance.isNavForwardDisabled()
|
|
|
|
}
|
|
|
|
],
|
2024-04-10 12:05:27 +00:00
|
|
|
nextItemIcon: 'p-galleria-next-icon',
|
2023-10-02 10:46:09 +00:00
|
|
|
caption: 'p-galleria-caption',
|
2024-04-10 12:05:27 +00:00
|
|
|
indicators: 'p-galleria-indicators',
|
2023-10-02 10:46:09 +00:00
|
|
|
indicator: ({ instance, index }) => [
|
|
|
|
'p-galleria-indicator',
|
|
|
|
{
|
2024-04-10 12:05:27 +00:00
|
|
|
'p-galleria-indicator-active': instance.isIndicatorItemActive(index)
|
2023-10-02 10:46:09 +00:00
|
|
|
}
|
|
|
|
],
|
2024-04-10 12:05:27 +00:00
|
|
|
indicatorButton: 'p-galleria-indicator-button',
|
|
|
|
thumbnailWrapper: 'p-galleria-thumbnails',
|
|
|
|
thumbnailContainer: 'p-galleria-thumbnails-content',
|
2023-10-02 10:46:09 +00:00
|
|
|
previousThumbnailButton: ({ instance }) => [
|
2024-04-10 12:05:27 +00:00
|
|
|
'p-galleria-thumbnail-prev-button',
|
2023-10-02 10:46:09 +00:00
|
|
|
{
|
|
|
|
'p-disabled': instance.isNavBackwardDisabled()
|
|
|
|
}
|
|
|
|
],
|
|
|
|
previousThumbnailIcon: 'p-galleria-thumbnail-prev-icon',
|
2024-04-10 12:05:27 +00:00
|
|
|
thumbnailItemsContainer: 'p-galleria-thumbnails-viewport',
|
2023-10-02 10:46:09 +00:00
|
|
|
thumbnailItems: 'p-galleria-thumbnail-items',
|
|
|
|
thumbnailItem: ({ instance, index, activeIndex }) => [
|
|
|
|
'p-galleria-thumbnail-item',
|
|
|
|
{
|
|
|
|
'p-galleria-thumbnail-item-current': activeIndex === index,
|
|
|
|
'p-galleria-thumbnail-item-active': instance.isItemActive(index),
|
|
|
|
'p-galleria-thumbnail-item-start': instance.firstItemAciveIndex() === index,
|
|
|
|
'p-galleria-thumbnail-item-end': instance.lastItemActiveIndex() === index
|
|
|
|
}
|
|
|
|
],
|
2024-04-10 12:05:27 +00:00
|
|
|
thumbnailItemContent: 'p-galleria-thumbnail',
|
2023-10-02 10:46:09 +00:00
|
|
|
nextThumbnailButton: ({ instance }) => [
|
2024-04-10 12:05:27 +00:00
|
|
|
'p-galleria-thumbnail-next-button',
|
2023-10-02 10:46:09 +00:00
|
|
|
{
|
|
|
|
'p-disabled': instance.isNavForwardDisabled()
|
|
|
|
}
|
|
|
|
],
|
|
|
|
nextThumbnailIcon: 'p-galleria-thumbnail-next-icon'
|
|
|
|
};
|
|
|
|
|
|
|
|
export default BaseStyle.extend({
|
|
|
|
name: 'galleria',
|
|
|
|
classes
|
|
|
|
});
|