2024-02-19 22:53:42 +00:00
|
|
|
export default {
|
2024-03-12 08:19:23 +00:00
|
|
|
css: ({ dt }) => `
|
2024-04-09 09:00:55 +00:00
|
|
|
.p-message-content {
|
2024-02-19 22:53:42 +00:00
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
padding: 0.5rem 0.75rem;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-message {
|
|
|
|
margin: 1rem 0;
|
|
|
|
border-radius: 6px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-message-icon {
|
|
|
|
flex-shrink: 0;
|
|
|
|
}
|
|
|
|
|
2024-04-09 09:00:55 +00:00
|
|
|
.p-message-close-button {
|
2024-02-19 22:53:42 +00:00
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
|
|
|
flex-shrink: 0;
|
2024-04-09 09:00:55 +00:00
|
|
|
margin: 0 0 0 auto;
|
2024-02-19 22:53:42 +00:00
|
|
|
overflow: hidden;
|
|
|
|
position: relative;
|
|
|
|
width: 1.75rem;
|
|
|
|
height: 1.75rem;
|
|
|
|
border-radius: 50%;
|
|
|
|
background: transparent;
|
2024-03-12 08:19:23 +00:00
|
|
|
transition: background-color ${dt('transition.duration')}, color ${dt('transition.duration')}, outline-color ${dt('transition.duration')};
|
2024-02-19 22:53:42 +00:00
|
|
|
outline-color: transparent;
|
|
|
|
color: inherit;
|
2024-04-09 09:00:55 +00:00
|
|
|
padding: 0;
|
|
|
|
border: none;
|
|
|
|
cursor: pointer;
|
|
|
|
user-select: none;
|
2024-02-19 22:53:42 +00:00
|
|
|
}
|
|
|
|
|
2024-04-09 09:00:55 +00:00
|
|
|
.p-message-close-button:focus-visible {
|
2024-03-12 08:19:23 +00:00
|
|
|
outline-width: ${dt('focus.ring.width')};
|
|
|
|
outline-style: ${dt('focus.ring.style')};
|
|
|
|
outline-offset: ${dt('focus.ring.offset')};
|
2024-02-19 22:53:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.p-message-info {
|
2024-03-12 10:20:51 +00:00
|
|
|
background: ${dt('message.info.background')};
|
|
|
|
border: 1px solid ${dt('message.info.border.color')};
|
|
|
|
color: ${dt('message.info.color')};
|
|
|
|
box-shadow: ${dt('message.info.box.shadow')};
|
2024-02-19 22:53:42 +00:00
|
|
|
}
|
|
|
|
|
2024-04-09 09:00:55 +00:00
|
|
|
.p-message-info .p-message-close-button:focus-visible {
|
2024-03-12 10:20:51 +00:00
|
|
|
outline-color: ${dt('message.info.color')};
|
2024-02-19 22:53:42 +00:00
|
|
|
}
|
|
|
|
|
2024-04-09 09:00:55 +00:00
|
|
|
.p-message-info .p-message-close-button:hover {
|
2024-03-12 10:20:51 +00:00
|
|
|
background: ${dt('message.info.close.hover.background')};
|
2024-02-19 22:53:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.p-message-success {
|
2024-03-12 10:20:51 +00:00
|
|
|
background: ${dt('message.success.background')};
|
|
|
|
border: 1px solid ${dt('message.success.border.color')};
|
|
|
|
color: ${dt('message.success.color')};
|
|
|
|
box-shadow: ${dt('message.success.box.shadow')};
|
2024-02-19 22:53:42 +00:00
|
|
|
}
|
|
|
|
|
2024-04-09 09:00:55 +00:00
|
|
|
.p-message-success .p-message-close-button:focus-visible {
|
2024-03-12 10:20:51 +00:00
|
|
|
outline-color: ${dt('message.success.color')};
|
2024-02-19 22:53:42 +00:00
|
|
|
}
|
|
|
|
|
2024-04-09 09:00:55 +00:00
|
|
|
.p-message-success .p-message-close-button:hover {
|
2024-03-12 10:20:51 +00:00
|
|
|
background: ${dt('message.success.close.hover.background')};
|
2024-02-19 22:53:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.p-message-warn {
|
2024-03-12 10:20:51 +00:00
|
|
|
background: ${dt('message.warn.background')};
|
|
|
|
border: 1px solid ${dt('message.warn.border.color')};
|
|
|
|
color: ${dt('message.warn.color')};
|
|
|
|
box-shadow: ${dt('message.warn.box.shadow')};
|
2024-02-19 22:53:42 +00:00
|
|
|
}
|
|
|
|
|
2024-04-09 09:00:55 +00:00
|
|
|
.p-message-warn .p-message-close-button:focus-visible {
|
2024-03-12 10:20:51 +00:00
|
|
|
outline-color: ${dt('message.warn.color')};
|
2024-02-19 22:53:42 +00:00
|
|
|
}
|
|
|
|
|
2024-04-09 09:00:55 +00:00
|
|
|
.p-message-warn .p-message-close-button:hover {
|
2024-03-12 10:20:51 +00:00
|
|
|
background: ${dt('message.warn.close.hover.background')};
|
2024-02-19 22:53:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.p-message-error {
|
2024-03-12 10:20:51 +00:00
|
|
|
background: ${dt('message.error.background')};
|
|
|
|
border: 1px solid ${dt('message.error.border.color')};
|
|
|
|
color: ${dt('message.error.color')};
|
|
|
|
box-shadow: ${dt('message.error.box.shadow')};
|
2024-02-19 22:53:42 +00:00
|
|
|
}
|
|
|
|
|
2024-04-09 09:00:55 +00:00
|
|
|
.p-message-error .p-message-close-button:focus-visible {
|
2024-03-12 10:20:51 +00:00
|
|
|
outline-color: ${dt('message.error.color')};
|
2024-02-19 22:53:42 +00:00
|
|
|
}
|
|
|
|
|
2024-04-09 09:00:55 +00:00
|
|
|
.p-message-error .p-message-close-button:hover {
|
2024-03-12 10:20:51 +00:00
|
|
|
background: ${dt('message.error.close.hover.background')};
|
2024-02-19 22:53:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.p-message-secondary {
|
2024-03-12 10:20:51 +00:00
|
|
|
background: ${dt('message.secondary.background')};
|
|
|
|
border: 1px solid ${dt('message.secondary.border.color')};
|
|
|
|
color: ${dt('message.secondary.color')};
|
|
|
|
box-shadow: ${dt('message.secondary.box.shadow')};
|
2024-02-19 22:53:42 +00:00
|
|
|
}
|
|
|
|
|
2024-04-09 09:00:55 +00:00
|
|
|
.p-message-secondary .p-message-close-button:focus-visible {
|
2024-03-12 10:20:51 +00:00
|
|
|
outline-color: ${dt('message.secondary.color')};
|
2024-02-19 22:53:42 +00:00
|
|
|
}
|
|
|
|
|
2024-04-09 09:00:55 +00:00
|
|
|
.p-message-secondary .p-message-close-button:hover {
|
2024-03-12 10:20:51 +00:00
|
|
|
background: ${dt('message.secondary.close.hover.background')};
|
2024-02-19 22:53:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.p-message-contrast {
|
2024-03-12 10:20:51 +00:00
|
|
|
background: ${dt('message.contrast.background')};
|
|
|
|
border: 1px solid ${dt('message.contrast.border.color')};
|
|
|
|
color: ${dt('message.contrast.color')};
|
|
|
|
box-shadow: ${dt('message.contrast.box.shadow')};
|
2024-02-19 22:53:42 +00:00
|
|
|
}
|
|
|
|
|
2024-04-09 09:00:55 +00:00
|
|
|
.p-message-contrast .p-message-close-button:focus-visible {
|
2024-03-12 10:20:51 +00:00
|
|
|
outline-color: ${dt('message.contrast.color')};
|
2024-02-19 22:53:42 +00:00
|
|
|
}
|
|
|
|
|
2024-04-09 09:00:55 +00:00
|
|
|
.p-message-contrast .p-message-close-button:hover {
|
2024-03-12 10:20:51 +00:00
|
|
|
background: ${dt('message.contrast.close.hover.background')};
|
2024-02-19 22:53:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.p-message-text {
|
|
|
|
font-size: 1rem;
|
|
|
|
font-weight: 500;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-message-icon {
|
|
|
|
font-size: 1rem;
|
|
|
|
margin-right: 0.5rem;
|
|
|
|
}
|
|
|
|
|
2024-04-09 09:00:55 +00:00
|
|
|
.p-message .p-icon:not(.p-message-close-button-icon) {
|
2024-02-19 22:53:42 +00:00
|
|
|
width: 1rem;
|
|
|
|
height: 1rem;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-message-enter-from {
|
|
|
|
opacity: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-message-enter-active {
|
|
|
|
transition: opacity 0.3s;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-message.p-message-leave-from {
|
|
|
|
max-height: 1000px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-message.p-message-leave-to {
|
|
|
|
max-height: 0;
|
|
|
|
opacity: 0;
|
|
|
|
margin: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-message-leave-active {
|
|
|
|
overflow: hidden;
|
|
|
|
transition: max-height 0.3s cubic-bezier(0, 1, 0, 1), opacity 0.3s, margin 0.15s;
|
|
|
|
}
|
|
|
|
|
2024-04-09 09:00:55 +00:00
|
|
|
.p-message-leave-active .p-message-close-button {
|
2024-02-19 22:53:42 +00:00
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
`
|
|
|
|
};
|