2023-10-02 10:46:09 +00:00
|
|
|
import BaseStyle from 'primevue/base/style';
|
|
|
|
|
2024-01-12 07:07:55 +00:00
|
|
|
const css = `
|
|
|
|
@layer primevue {
|
|
|
|
.p-checkbox {
|
|
|
|
position: relative;
|
|
|
|
display: inline-flex;
|
|
|
|
user-select: none;
|
|
|
|
vertical-align: bottom;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-checkbox-input {
|
|
|
|
cursor: pointer;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-checkbox-box {
|
|
|
|
display: flex;
|
|
|
|
justify-content: center;
|
|
|
|
align-items: center;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
2023-10-02 10:46:09 +00:00
|
|
|
const classes = {
|
|
|
|
root: ({ instance, props }) => [
|
2024-01-12 07:07:55 +00:00
|
|
|
'p-tristatecheckbox p-checkbox p-component',
|
2023-10-02 10:46:09 +00:00
|
|
|
{
|
2024-01-12 07:07:55 +00:00
|
|
|
'p-highlight': instance.active,
|
|
|
|
'p-disabled': props.disabled
|
2023-10-02 10:46:09 +00:00
|
|
|
}
|
|
|
|
],
|
2024-01-12 07:07:55 +00:00
|
|
|
box: 'p-checkbox-box',
|
|
|
|
input: 'p-checkbox-input',
|
2023-10-02 10:46:09 +00:00
|
|
|
checkIcon: 'p-checkbox-icon',
|
|
|
|
uncheckIcon: 'p-checkbox-icon',
|
|
|
|
nullableIcon: 'p-checkbox-icon'
|
|
|
|
};
|
|
|
|
|
|
|
|
export default BaseStyle.extend({
|
|
|
|
name: 'tristatecheckbox',
|
2024-01-12 07:07:55 +00:00
|
|
|
css,
|
2023-10-04 09:20:15 +00:00
|
|
|
classes
|
2023-10-02 10:46:09 +00:00
|
|
|
});
|