primevue-mirror/components/lib/metergroup/style/MeterGroupStyle.js

83 lines
2.0 KiB
JavaScript
Raw Normal View History

2024-01-11 13:42:20 +00:00
import BaseStyle from 'primevue/base/style';
const css = `
@layer primevue {
.p-metergroup {
position: relative;
overflow: hidden;
}
.p-metergroup-vertical.p-metergroup {
display: flex;
}
.p-metergroup-vertical .p-metergroup-meter-container {
flex-direction: column;
}
.p-metergroup-meter-container {
display: flex;
}
.p-metergroup-label-list {
display: flex;
margin: 0;
padding: 0;
list-style-type: none;
}
2024-01-12 09:51:29 +00:00
.p-metergroup-vertical .p-metergroup-label-list {
align-items: start;
}
.p-metergroup-horizontal .p-metergroup-label-list-vertical {
2024-01-11 13:42:20 +00:00
flex-direction: column;
}
2024-01-12 09:51:29 +00:00
.p-metergroup-vertical .p-metergroup-label-list-horizontal {
flex-direction: column;
2024-01-11 13:42:20 +00:00
}
.p-metergroup-label-list-item {
display: inline-flex;
align-items: center;
}
.p-metergroup-label-type {
display: inline-block;
}
}
`;
const classes = {
2024-01-18 12:53:33 +00:00
root: ({ props }) => [
2024-01-11 13:42:20 +00:00
'p-metergroup p-component',
{
2024-01-18 12:53:33 +00:00
'p-metergroup-horizontal': props.orientation === 'horizontal',
'p-metergroup-vertical': props.orientation === 'vertical'
2024-01-11 13:42:20 +00:00
}
],
metercontainer: 'p-metergroup-meter-container',
meter: 'p-metergroup-meter',
2024-01-18 12:53:33 +00:00
labellist: ({ props }) => [
2024-01-11 13:42:20 +00:00
'p-metergroup-label-list',
2024-01-18 12:53:33 +00:00
2024-01-11 13:42:20 +00:00
{
2024-01-18 12:53:33 +00:00
'p-metergroup-label-list-start': props.labelPosition === 'start',
'p-metergroup-label-list-end': props.labelPosition === 'end',
'p-metergroup-label-list-vertical': props.labelOrientation === 'vertical',
'p-metergroup-label-list-horizontal': props.labelOrientation === 'horizontal'
2024-01-11 13:42:20 +00:00
}
],
labellistitem: 'p-metergroup-label-list-item',
2024-01-12 09:51:29 +00:00
labelicon: 'p-metergroup-label-icon',
2024-01-11 13:42:20 +00:00
labellisttype: 'p-metergroup-label-type',
label: 'p-metergroup-label'
};
export default BaseStyle.extend({
name: 'metergroup',
css,
classes
});