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-inplace-display {
|
|
|
|
display: inline;
|
|
|
|
cursor: pointer;
|
2024-05-09 19:00:50 +00:00
|
|
|
padding: ${dt('inplace.padding')};
|
|
|
|
border-radius: ${dt('inplace.border.radius')};
|
|
|
|
transition: background ${dt('transition.duration')}, color ${dt('transition.duration')}, outline-color ${dt('transition.duration')}, box-shadow ${dt('transition.duration')};
|
2024-05-01 08:26:48 +00:00
|
|
|
outline-color: transparent;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-inplace-display:not(.p-disabled):hover {
|
|
|
|
background: ${dt('inplace.display.hover.background')};
|
|
|
|
color: ${dt('inplace.display.hover.color')};
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-inplace-display:focus-visible {
|
2024-05-09 19:00:50 +00:00
|
|
|
box-shadow: ${dt('inplace.focus.ring.shadow')};
|
|
|
|
outline: ${dt('inplace.focus.ring.width')} ${dt('inplace.focus.ring.style')} ${dt('inplace.focus.ring.color')};
|
|
|
|
outline-offset: ${dt('inplace.focus.ring.offset')};
|
2024-05-01 08:26:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.p-inplace-content {
|
|
|
|
display: inline;
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
2023-10-02 10:46:09 +00:00
|
|
|
const classes = {
|
2024-04-09 14:11:00 +00:00
|
|
|
root: 'p-inplace p-component',
|
2023-10-02 10:46:09 +00:00
|
|
|
display: ({ props }) => ['p-inplace-display', { 'p-disabled': props.disabled }],
|
|
|
|
content: 'p-inplace-content'
|
|
|
|
};
|
|
|
|
|
|
|
|
export default BaseStyle.extend({
|
|
|
|
name: 'inplace',
|
2024-05-01 08:26:48 +00:00
|
|
|
theme,
|
2023-10-02 10:46:09 +00:00
|
|
|
classes
|
|
|
|
});
|