2023-10-02 10:46:09 +00:00
|
|
|
import BaseStyle from 'primevue/base/style';
|
|
|
|
|
2024-05-01 08:26:48 +00:00
|
|
|
const theme = ({ dt }) => `
|
2024-05-12 18:59:19 +00:00
|
|
|
.p-dataview {
|
|
|
|
border-color: ${dt('dataview.border.color')};
|
|
|
|
border-width: ${dt('dataview.border.width')};
|
|
|
|
border-style: solid;
|
|
|
|
border-radius: ${dt('dataview.border.radius')};
|
|
|
|
padding: ${dt('dataview.padding')};
|
|
|
|
}
|
|
|
|
|
2024-05-01 08:26:48 +00:00
|
|
|
.p-dataview-header {
|
|
|
|
background: ${dt('dataview.header.background')};
|
|
|
|
color: ${dt('dataview.header.color')};
|
2024-05-12 18:59:19 +00:00
|
|
|
border-color: ${dt('dataview.header.border.color')};
|
|
|
|
border-width: ${dt('dataview.header.border.width')};
|
|
|
|
border-style: solid;
|
|
|
|
padding: ${dt('dataview.header.padding')};
|
|
|
|
border-radius: ${dt('dataview.header.border.radius')};
|
2024-05-01 08:26:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.p-dataview-content {
|
|
|
|
background: ${dt('dataview.content.background')};
|
2024-05-12 18:59:19 +00:00
|
|
|
border-color: ${dt('dataview.content.border.color')};
|
|
|
|
border-width: ${dt('dataview.content.border.width')};
|
|
|
|
border-style: solid;
|
2024-05-01 08:26:48 +00:00
|
|
|
color: ${dt('dataview.content.color')};
|
2024-05-12 18:59:19 +00:00
|
|
|
padding: ${dt('dataview.content.padding')};
|
|
|
|
border-radius: ${dt('dataview.content.border.radius')};
|
2024-05-01 08:26:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.p-dataview-footer {
|
|
|
|
background: ${dt('dataview.footer.background')};
|
|
|
|
color: ${dt('dataview.footer.color')};
|
2024-05-12 18:59:19 +00:00
|
|
|
border-color: ${dt('dataview.footer.border.color')};
|
|
|
|
border-width: ${dt('dataview.footer.border.width')};
|
|
|
|
border-style: solid;
|
|
|
|
padding: ${dt('dataview.footer.padding')};
|
|
|
|
border-radius: ${dt('dataview.footer.border.radius')};
|
2024-05-01 08:26:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.p-dataview-paginator-top {
|
2024-05-12 18:59:19 +00:00
|
|
|
border-width: ${dt('dataview.paginator.top.border.width')};
|
|
|
|
border-color: ${dt('dataview.paginator.top.border.color')};
|
|
|
|
border-style: solid;
|
2024-05-01 08:26:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.p-dataview-paginator-bottom {
|
2024-05-12 18:59:19 +00:00
|
|
|
border-width: ${dt('dataview.paginator.bottom.border.width')};
|
|
|
|
border-color: ${dt('dataview.paginator.bottom.border.color')};
|
|
|
|
border-style: solid;
|
2024-05-01 08:26:48 +00:00
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
2023-10-02 10:46:09 +00:00
|
|
|
const classes = {
|
|
|
|
root: ({ props }) => [
|
|
|
|
'p-dataview p-component',
|
|
|
|
{
|
|
|
|
'p-dataview-list': props.layout === 'list',
|
|
|
|
'p-dataview-grid': props.layout === 'grid'
|
|
|
|
}
|
|
|
|
],
|
|
|
|
header: 'p-dataview-header',
|
2024-05-06 15:23:01 +00:00
|
|
|
pcPaginator: ({ position }) => 'p-dataview-paginator-' + position,
|
2023-10-02 10:46:09 +00:00
|
|
|
content: 'p-dataview-content',
|
2024-04-25 21:39:48 +00:00
|
|
|
emptyMessage: 'p-dataview-empty-message', // TODO: remove?
|
2023-10-02 10:46:09 +00:00
|
|
|
footer: 'p-dataview-footer'
|
|
|
|
};
|
|
|
|
|
|
|
|
export default BaseStyle.extend({
|
|
|
|
name: 'dataview',
|
2024-05-01 08:26:48 +00:00
|
|
|
theme,
|
2023-10-04 09:20:15 +00:00
|
|
|
classes
|
2023-10-02 10:46:09 +00:00
|
|
|
});
|