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,103 +1,6 @@
|
|||
<script>
|
||||
import BaseComponent from 'primevue/basecomponent';
|
||||
import { useStyle } from 'primevue/usestyle';
|
||||
|
||||
const styles = `
|
||||
@layer primevue {
|
||||
.p-paginator-default {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.p-paginator {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.p-paginator-left-content {
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.p-paginator-right-content {
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.p-paginator-page,
|
||||
.p-paginator-next,
|
||||
.p-paginator-last,
|
||||
.p-paginator-first,
|
||||
.p-paginator-prev,
|
||||
.p-paginator-current {
|
||||
cursor: pointer;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
line-height: 1;
|
||||
user-select: none;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.p-paginator-element:focus {
|
||||
z-index: 1;
|
||||
position: relative;
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
const classes = {
|
||||
paginator: ({ instance, key }) => [
|
||||
'p-paginator p-component',
|
||||
{
|
||||
'p-paginator-default': !instance.hasBreakpoints(),
|
||||
[`p-paginator-${key}`]: instance.hasBreakpoints()
|
||||
}
|
||||
],
|
||||
start: 'p-paginator-left-content',
|
||||
end: 'p-paginator-right-content',
|
||||
firstPageButton: ({ instance }) => [
|
||||
'p-paginator-first p-paginator-element p-link',
|
||||
{
|
||||
'p-disabled': instance.$attrs.disabled
|
||||
}
|
||||
],
|
||||
firstPageIcon: 'p-paginator-icon',
|
||||
previousPageButton: ({ instance }) => [
|
||||
'p-paginator-prev p-paginator-element p-link',
|
||||
{
|
||||
'p-disabled': instance.$attrs.disabled
|
||||
}
|
||||
],
|
||||
previousPageIcon: 'p-paginator-icon',
|
||||
nextPageButton: ({ instance }) => [
|
||||
'p-paginator-next p-paginator-element p-link',
|
||||
{
|
||||
'p-disabled': instance.$attrs.disabled
|
||||
}
|
||||
],
|
||||
nextPageIcon: 'p-paginator-icon',
|
||||
lastPageButton: ({ instance }) => [
|
||||
'p-paginator-last p-paginator-element p-link',
|
||||
{
|
||||
'p-disabled': instance.$attrs.disabled
|
||||
}
|
||||
],
|
||||
lastPageIcon: 'p-paginator-icon',
|
||||
pages: 'p-paginator-pages',
|
||||
pageButton: ({ props, pageLink }) => [
|
||||
'p-paginator-page p-paginator-element p-link',
|
||||
{
|
||||
'p-highlight': pageLink - 1 === props.page
|
||||
}
|
||||
],
|
||||
current: 'p-paginator-current',
|
||||
rowPerPageDropdown: 'p-paginator-rpp-options',
|
||||
jumpToPageDropdown: 'p-paginator-page-options',
|
||||
jumpToPageInput: 'p-paginator-page-input'
|
||||
};
|
||||
|
||||
const { load: loadStyle } = useStyle(styles, { name: 'paginator', manual: true });
|
||||
import PaginatorStyle from 'primevue/paginator/style';
|
||||
|
||||
export default {
|
||||
name: 'BasePaginator',
|
||||
|
@ -136,10 +39,7 @@ export default {
|
|||
default: true
|
||||
}
|
||||
},
|
||||
css: {
|
||||
classes,
|
||||
loadStyle
|
||||
},
|
||||
style: PaginatorStyle,
|
||||
provide() {
|
||||
return {
|
||||
$parentInstance: this
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue