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-radiobutton {
|
|
|
|
position: relative;
|
|
|
|
display: inline-flex;
|
|
|
|
user-select: none;
|
|
|
|
vertical-align: bottom;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-radiobutton-input {
|
|
|
|
cursor: pointer;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-radiobutton-box {
|
|
|
|
display: flex;
|
|
|
|
justify-content: center;
|
|
|
|
align-items: center;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-radiobutton-icon {
|
|
|
|
-webkit-backface-visibility: hidden;
|
|
|
|
backface-visibility: hidden;
|
|
|
|
transform: translateZ(0) scale(.1);
|
|
|
|
border-radius: 50%;
|
|
|
|
visibility: hidden;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-radiobutton.p-highlight .p-radiobutton-icon {
|
|
|
|
transform: translateZ(0) scale(1.0, 1.0);
|
|
|
|
visibility: visible;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
2023-10-02 10:46:09 +00:00
|
|
|
const classes = {
|
|
|
|
root: ({ instance, props }) => [
|
|
|
|
'p-radiobutton p-component',
|
|
|
|
{
|
|
|
|
'p-highlight': instance.checked,
|
2024-01-30 11:27:56 +00:00
|
|
|
'p-disabled': props.disabled,
|
|
|
|
'p-invalid': props.invalid
|
2023-10-02 10:46:09 +00:00
|
|
|
}
|
|
|
|
],
|
2024-01-12 07:07:55 +00:00
|
|
|
box: 'p-radiobutton-box',
|
|
|
|
input: 'p-radiobutton-input',
|
2023-10-02 10:46:09 +00:00
|
|
|
icon: 'p-radiobutton-icon'
|
|
|
|
};
|
|
|
|
|
|
|
|
export default BaseStyle.extend({
|
|
|
|
name: 'radiobutton',
|
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
|
|
|
});
|