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 }) => `
|
|
|
|
.p-selectbutton {
|
|
|
|
display: inline-flex;
|
|
|
|
user-select: none;
|
|
|
|
vertical-align: bottom;
|
|
|
|
outline-color: transparent;
|
2024-05-15 07:57:21 +00:00
|
|
|
border-radius: ${dt('selectbutton.border.radius')};
|
2024-05-01 08:26:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.p-selectbutton .p-togglebutton {
|
|
|
|
border-radius: 0;
|
2024-05-15 07:57:21 +00:00
|
|
|
border-width: 1px 1px 1px 0;
|
2024-05-01 08:26:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.p-selectbutton .p-togglebutton:focus-visible {
|
|
|
|
position: relative;
|
|
|
|
z-index: 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-selectbutton .p-togglebutton:first-child {
|
2024-05-15 07:57:21 +00:00
|
|
|
border-left-width: 1px;
|
|
|
|
border-top-left-radius: ${dt('selectbutton.border.radius')};
|
|
|
|
border-bottom-left-radius: ${dt('selectbutton.border.radius')};
|
2024-05-01 08:26:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.p-selectbutton .p-togglebutton:last-child {
|
2024-05-15 07:57:21 +00:00
|
|
|
border-top-right-radius: ${dt('selectbutton.border.radius')};
|
|
|
|
border-bottom-right-radius: ${dt('selectbutton.border.radius')};
|
2024-05-01 08:26:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.p-selectbutton.p-invalid {
|
|
|
|
outline: 1px solid ${dt('selectbutton.invalid.border.color')};
|
|
|
|
outline-offset: 0;
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
2023-10-02 10:46:09 +00:00
|
|
|
const classes = {
|
2024-01-30 11:27:56 +00:00
|
|
|
root: ({ props }) => [
|
2024-03-20 07:00:27 +00:00
|
|
|
'p-selectbutton p-component',
|
2024-01-30 11:27:56 +00:00
|
|
|
{
|
|
|
|
'p-invalid': props.invalid
|
|
|
|
}
|
2024-04-02 09:19:42 +00:00
|
|
|
]
|
2023-10-02 10:46:09 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
export default BaseStyle.extend({
|
|
|
|
name: 'selectbutton',
|
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
|
|
|
});
|