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-splitbutton {
|
|
|
|
display: inline-flex;
|
|
|
|
position: relative;
|
2024-05-09 09:13:03 +00:00
|
|
|
border-radius: ${dt('splitbutton.border.radius')};
|
2024-05-01 08:26:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.p-splitbutton-button {
|
|
|
|
border-top-right-radius: 0;
|
|
|
|
border-bottom-right-radius: 0;
|
|
|
|
border-right: 0 none;
|
|
|
|
}
|
|
|
|
|
2024-05-09 09:13:03 +00:00
|
|
|
.p-splitbutton-button:focus-visible,
|
|
|
|
.p-splitbutton-dropdown:focus-visible {
|
|
|
|
z-index: 1;
|
|
|
|
}
|
|
|
|
|
2024-05-01 08:26:48 +00:00
|
|
|
.p-splitbutton-button:not(:disabled):hover,
|
|
|
|
.p-splitbutton-button:not(:disabled):active {
|
|
|
|
border-right: 0 none;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-splitbutton-dropdown {
|
|
|
|
border-top-left-radius: 0;
|
|
|
|
border-bottom-left-radius: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-splitbutton .p-menu {
|
|
|
|
min-width: 100%;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-fluid .p-splitbutton {
|
|
|
|
display: flex;
|
|
|
|
}
|
|
|
|
|
2024-05-09 09:13:03 +00:00
|
|
|
.p-splitbutton-rounded .p-splitbutton-dropdown {
|
|
|
|
border-top-right-radius: ${dt('splitbutton.rounded.border.radius')};
|
|
|
|
border-bottom-right-radius: ${dt('splitbutton.rounded.border.radius')};
|
2024-05-01 08:26:48 +00:00
|
|
|
}
|
|
|
|
|
2024-05-09 09:13:03 +00:00
|
|
|
.p-splitbutton-rounded .p-splitbutton-button {
|
|
|
|
border-top-left-radius: ${dt('splitbutton.rounded.border.radius')};
|
|
|
|
border-bottom-left-radius: ${dt('splitbutton.rounded.border.radius')};
|
2024-05-01 08:26:48 +00:00
|
|
|
}
|
|
|
|
|
2024-05-09 09:13:03 +00:00
|
|
|
.p-splitbutton-raised {
|
|
|
|
box-shadow: ${dt('splitbutton.raised.shadow')};
|
2024-05-01 08:26:48 +00:00
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
2023-10-02 10:46:09 +00:00
|
|
|
const classes = {
|
2024-05-09 09:13:03 +00:00
|
|
|
root: ({ props }) => [
|
|
|
|
'p-splitbutton p-component',
|
|
|
|
{
|
|
|
|
'p-splitbutton-raised': props.raised,
|
|
|
|
'p-splitbutton-rounded': props.rounded
|
|
|
|
}
|
|
|
|
],
|
2024-05-06 15:23:01 +00:00
|
|
|
pcButton: 'p-splitbutton-button',
|
|
|
|
pcDropdown: 'p-splitbutton-dropdown'
|
2023-10-02 10:46:09 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
export default BaseStyle.extend({
|
|
|
|
name: 'splitbutton',
|
2024-05-01 08:26:48 +00:00
|
|
|
theme,
|
2023-10-02 10:46:09 +00:00
|
|
|
classes
|
|
|
|
});
|