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-inline-message {
|
|
|
|
display: inline-flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
2024-05-09 15:35:57 +00:00
|
|
|
padding: ${dt('inlinemessage.padding')};
|
|
|
|
border-radius: ${dt('inlinemessage.border.radius')};
|
|
|
|
gap: ${dt('inlinemessage.gap')};
|
2024-05-01 08:26:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.p-inline-message-text {
|
2024-05-09 15:35:57 +00:00
|
|
|
font-weight: ${dt('inlinemessage.text.font.weight')};
|
2024-05-01 08:26:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.p-inline-message-icon {
|
|
|
|
flex-shrink: 0;
|
2024-05-09 15:35:57 +00:00
|
|
|
font-size: ${dt('inlinemessage.icon.size')};
|
|
|
|
width: ${dt('inlinemessage.icon.size')};
|
|
|
|
height: ${dt('inlinemessage.icon.size')};
|
2024-05-01 08:26:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.p-inline-message-icon-only .p-inline-message-text {
|
|
|
|
visibility: hidden;
|
|
|
|
width: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-fluid .p-inline-message {
|
|
|
|
display: flex;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-inline-message-info {
|
|
|
|
background: ${dt('inlinemessage.info.background')};
|
|
|
|
border: 1px solid ${dt('inlinemessage.info.border.color')};
|
|
|
|
color: ${dt('inlinemessage.info.color')};
|
2024-05-06 21:23:42 +00:00
|
|
|
box-shadow: ${dt('inlinemessage.info.shadow')};
|
2024-05-01 08:26:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.p-inline-message-info .p-inline-message-icon {
|
|
|
|
color: ${dt('inlinemessage.info.color')};
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-inline-message-success {
|
|
|
|
background: ${dt('inlinemessage.success.background')};
|
|
|
|
border: 1px solid ${dt('inlinemessage.success.border.color')};
|
|
|
|
color: ${dt('inlinemessage.success.color')};
|
2024-05-06 21:23:42 +00:00
|
|
|
box-shadow: ${dt('inlinemessage.success.shadow')};
|
2024-05-01 08:26:48 +00:00
|
|
|
}
|
2024-05-09 15:35:57 +00:00
|
|
|
|
2024-05-01 08:26:48 +00:00
|
|
|
.p-inline-message-success .p-inline-message-icon {
|
|
|
|
color: ${dt('inlinemessage.success.color')};
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-inline-message-warn {
|
|
|
|
background: ${dt('inlinemessage.warn.background')};
|
|
|
|
border: 1px solid ${dt('inlinemessage.warn.border.color')};
|
|
|
|
color: ${dt('inlinemessage.warn.color')};
|
2024-05-06 21:23:42 +00:00
|
|
|
box-shadow: ${dt('inlinemessage.warn.shadow')};
|
2024-05-01 08:26:48 +00:00
|
|
|
}
|
2024-05-09 15:35:57 +00:00
|
|
|
|
2024-05-01 08:26:48 +00:00
|
|
|
.p-inline-message-warn .p-inline-message-icon {
|
|
|
|
color: ${dt('inlinemessage.warn.color')};
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-inline-message-error {
|
|
|
|
background: ${dt('inlinemessage.error.background')};
|
|
|
|
border: 1px solid ${dt('inlinemessage.error.border.color')};
|
|
|
|
color: ${dt('inlinemessage.error.color')};
|
2024-05-06 21:23:42 +00:00
|
|
|
box-shadow: ${dt('inlinemessage.error.shadow')};
|
2024-05-01 08:26:48 +00:00
|
|
|
}
|
2024-05-09 15:35:57 +00:00
|
|
|
|
2024-05-01 08:26:48 +00:00
|
|
|
.p-inline-message-error .p-inline-message-icon {
|
|
|
|
color: ${dt('inlinemessage.error.color')};
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-inline-message-secondary {
|
|
|
|
background: ${dt('inlinemessage.secondary.background')};
|
|
|
|
border: 1px solid ${dt('inlinemessage.secondary.border.color')};
|
|
|
|
color: ${dt('inlinemessage.secondary.color')};
|
2024-05-06 21:23:42 +00:00
|
|
|
box-shadow: ${dt('inlinemessage.secondary.shadow')};
|
2024-05-01 08:26:48 +00:00
|
|
|
}
|
2024-05-09 15:35:57 +00:00
|
|
|
|
2024-05-01 08:26:48 +00:00
|
|
|
.p-inline-message-secondary .p-inline-message-icon {
|
|
|
|
color: ${dt('inlinemessage.secondary.color')};
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-inline-message-contrast {
|
|
|
|
background: ${dt('inlinemessage.contrast.background')};
|
|
|
|
border: 1px solid ${dt('inlinemessage.contrast.border.color')};
|
|
|
|
color: ${dt('inlinemessage.contrast.color')};
|
2024-05-06 21:23:42 +00:00
|
|
|
box-shadow: ${dt('inlinemessage.contrast.shadow')};
|
2024-05-01 08:26:48 +00:00
|
|
|
}
|
2024-05-09 15:35:57 +00:00
|
|
|
|
2024-05-01 08:26:48 +00:00
|
|
|
.p-inline-message-contrast .p-inline-message-icon {
|
|
|
|
color: ${dt('inlinemessage.contrast.color')};
|
|
|
|
}
|
|
|
|
`;
|
|
|
|
|
2023-10-02 10:46:09 +00:00
|
|
|
const classes = {
|
|
|
|
root: ({ props, instance }) => ['p-inline-message p-component p-inline-message-' + props.severity, { 'p-inline-message-icon-only': !instance.$slots.default }],
|
|
|
|
icon: ({ props }) => ['p-inline-message-icon', props.icon],
|
|
|
|
text: 'p-inline-message-text'
|
|
|
|
};
|
|
|
|
|
|
|
|
export default BaseStyle.extend({
|
|
|
|
name: 'inlinemessage',
|
2024-05-01 08:26:48 +00:00
|
|
|
theme,
|
2023-10-02 10:46:09 +00:00
|
|
|
classes
|
|
|
|
});
|