mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-10 09:22:34 +00:00
Fixed #4530 - Export styles of all components
This commit is contained in:
parent
7b6d458067
commit
dc2913e887
463 changed files with 10696 additions and 9670 deletions
|
@ -1,136 +1,6 @@
|
|||
<script>
|
||||
import BaseComponent from 'primevue/basecomponent';
|
||||
import { useStyle } from 'primevue/usestyle';
|
||||
|
||||
const styles = `
|
||||
@layer primevue {
|
||||
.p-carousel {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.p-carousel-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.p-carousel-prev,
|
||||
.p-carousel-next {
|
||||
align-self: center;
|
||||
flex-grow: 0;
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.p-carousel-container {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.p-carousel-items-content {
|
||||
overflow: hidden;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.p-carousel-items-container {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.p-carousel-indicators {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.p-carousel-indicator > button {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
/* Vertical */
|
||||
.p-carousel-vertical .p-carousel-container {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.p-carousel-vertical .p-carousel-items-container {
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
/* Keyboard Support */
|
||||
.p-items-hidden .p-carousel-item {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.p-items-hidden .p-carousel-item.p-carousel-item-active {
|
||||
visibility: visible;
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
const classes = {
|
||||
root: ({ instance }) => [
|
||||
'p-carousel p-component',
|
||||
{
|
||||
'p-carousel-vertical': instance.isVertical(),
|
||||
'p-carousel-horizontal': !instance.isVertical()
|
||||
}
|
||||
],
|
||||
header: 'p-carousel-header',
|
||||
content: 'p-carousel-content',
|
||||
container: 'p-carousel-container',
|
||||
previousButton: ({ instance }) => [
|
||||
'p-carousel-prev p-link',
|
||||
{
|
||||
'p-disabled': instance.backwardIsDisabled
|
||||
}
|
||||
],
|
||||
previousButtonIcon: 'p-carousel-next-icon',
|
||||
itemsContent: 'p-carousel-items-content',
|
||||
itemsContainer: 'p-carousel-items-container',
|
||||
itemCloned: ({ index, value, totalShiftedItems, d_numVisible }) => [
|
||||
'p-carousel-item p-carousel-item-cloned',
|
||||
{
|
||||
'p-carousel-item-active': totalShiftedItems * -1 === value.length + d_numVisible,
|
||||
'p-carousel-item-start': index === 0,
|
||||
'p-carousel-item-end': value.slice(-1 * d_numVisible).length - 1 === index
|
||||
}
|
||||
],
|
||||
item: ({ instance, index }) => [
|
||||
'p-carousel-item',
|
||||
{
|
||||
'p-carousel-item-active': instance.firstIndex() <= index && instance.lastIndex() >= index,
|
||||
'p-carousel-item-start': instance.firstIndex() === index,
|
||||
'p-carousel-item-end': instance.lastIndex() === index
|
||||
}
|
||||
],
|
||||
nextButton: ({ instance }) => [
|
||||
'p-carousel-next p-link',
|
||||
{
|
||||
'p-disabled': instance.forwardIsDisabled
|
||||
}
|
||||
],
|
||||
nextButtonIcon: 'p-carousel-prev-icon',
|
||||
indicators: 'p-carousel-indicators p-reset',
|
||||
indicator: ({ instance, index }) => [
|
||||
'p-carousel-indicator',
|
||||
{
|
||||
'p-highlight': instance.d_page === index
|
||||
}
|
||||
],
|
||||
indicatorButton: 'p-link',
|
||||
footer: 'p-carousel-footer'
|
||||
};
|
||||
|
||||
const { load: loadStyle } = useStyle(styles, { name: 'carousel', manual: true });
|
||||
import CarouselStyle from 'primevue/carousel/style';
|
||||
|
||||
export default {
|
||||
name: 'BaseCarousel',
|
||||
|
@ -186,10 +56,7 @@ export default {
|
|||
default: null
|
||||
}
|
||||
},
|
||||
css: {
|
||||
classes,
|
||||
loadStyle
|
||||
},
|
||||
style: CarouselStyle,
|
||||
provide() {
|
||||
return {
|
||||
$parentInstance: this
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue