2024-02-19 22:53:42 +00:00
|
|
|
export default {
|
2024-03-12 08:19:23 +00:00
|
|
|
css: ({ dt }) => `
|
2024-02-19 22:53:42 +00:00
|
|
|
.p-toast {
|
|
|
|
width: 25rem;
|
|
|
|
white-space: pre-line;
|
|
|
|
word-break: break-word;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-toast-message {
|
2024-03-12 10:20:51 +00:00
|
|
|
backdrop-filter: blur(${dt('toast.blur')});
|
2024-02-19 22:53:42 +00:00
|
|
|
margin: 0 0 1rem 0;
|
2024-03-12 08:19:23 +00:00
|
|
|
border-radius: ${dt('rounded.base')};
|
2024-02-19 22:53:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.p-toast-message-icon {
|
|
|
|
flex-shrink: 0;
|
|
|
|
font-size: 1.125rem;
|
|
|
|
width: 1.125rem;
|
|
|
|
height: 1.125rem;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-toast-message-content {
|
|
|
|
display: flex;
|
|
|
|
align-items: flex-start;
|
|
|
|
padding: 0.75rem;
|
|
|
|
gap: 0.5rem;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-toast-message-text {
|
|
|
|
flex: 1 1 auto;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-toast-summary {
|
|
|
|
font-weight: 500;
|
|
|
|
}
|
|
|
|
.p-toast-detail {
|
|
|
|
margin-top: 0.5rem;
|
|
|
|
font-size: 0.875rem;
|
|
|
|
}
|
|
|
|
|
2024-04-09 09:05:34 +00:00
|
|
|
.p-toast-close-button {
|
2024-02-19 22:53:42 +00:00
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
|
|
|
overflow: hidden;
|
|
|
|
position: relative;
|
|
|
|
border-radius: 50%;
|
|
|
|
cursor: pointer;
|
|
|
|
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;
|
|
|
|
width: 1.75rem;
|
|
|
|
height: 1.75rem;
|
2024-04-09 09:05:34 +00:00
|
|
|
margin: -25% 0 0 0;
|
2024-02-19 22:53:42 +00:00
|
|
|
right: -25%;
|
2024-04-09 09:05:34 +00:00
|
|
|
padding: 0;
|
|
|
|
border: none
|
|
|
|
user-select: none;
|
2024-02-19 22:53:42 +00:00
|
|
|
}
|
|
|
|
|
2024-04-09 09:05:34 +00:00
|
|
|
.p-toast-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-toast-message-info {
|
2024-03-12 10:20:51 +00:00
|
|
|
background: ${dt('toast.info.background')};
|
|
|
|
border: 1px solid ${dt('toast.info.border.color')};
|
|
|
|
color: ${dt('toast.info.color')};
|
|
|
|
box-shadow: ${dt('toast.info.box.shadow')};
|
2024-02-19 22:53:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.p-toast-message-info .p-toast-detail {
|
2024-03-12 10:20:51 +00:00
|
|
|
color: ${dt('toast.info.detail.color')};
|
2024-02-19 22:53:42 +00:00
|
|
|
}
|
|
|
|
|
2024-04-09 09:05:34 +00:00
|
|
|
.p-toast-message-info .p-toast-close-button:focus-visible {
|
2024-03-12 10:20:51 +00:00
|
|
|
color: ${dt('toast.info.color')};
|
2024-02-19 22:53:42 +00:00
|
|
|
}
|
|
|
|
|
2024-04-09 09:05:34 +00:00
|
|
|
.p-toast-message-info .p-toast-close-button:hover {
|
2024-03-12 10:20:51 +00:00
|
|
|
background: ${dt('toast.info.close.hover.background')};
|
2024-02-19 22:53:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.p-toast-message-success {
|
2024-03-12 10:20:51 +00:00
|
|
|
background: ${dt('toast.success.background')};
|
|
|
|
border: 1px solid ${dt('toast.success.border.color')};
|
|
|
|
color: ${dt('toast.success.color')};
|
|
|
|
box-shadow: ${dt('toast.success.box.shadow')};
|
2024-02-19 22:53:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.p-toast-message-success .p-toast-detail {
|
2024-03-12 10:20:51 +00:00
|
|
|
color: ${dt('toast.success.detail.color')};
|
2024-02-19 22:53:42 +00:00
|
|
|
}
|
|
|
|
|
2024-04-09 09:05:34 +00:00
|
|
|
.p-toast-message-success .p-toast-close-button:focus-visible {
|
2024-03-12 10:20:51 +00:00
|
|
|
color: ${dt('toast.success.color')};
|
2024-02-19 22:53:42 +00:00
|
|
|
}
|
|
|
|
|
2024-04-09 09:05:34 +00:00
|
|
|
.p-toast-message-success .p-toast-close-button:hover {
|
2024-03-12 10:20:51 +00:00
|
|
|
background: ${dt('toast.success.close.hover.background')};
|
2024-02-19 22:53:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.p-toast-message-warn {
|
2024-03-12 10:20:51 +00:00
|
|
|
background: ${dt('toast.warn.background')};
|
|
|
|
border: 1px solid ${dt('toast.warn.border.color')};
|
|
|
|
color: ${dt('toast.warn.color')};
|
|
|
|
box-shadow: ${dt('toast.warn.box.shadow')};
|
2024-02-19 22:53:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.p-toast-message-warn .p-toast-detail {
|
2024-03-12 10:20:51 +00:00
|
|
|
color: ${dt('toast.warn.detail.color')};
|
2024-02-19 22:53:42 +00:00
|
|
|
}
|
|
|
|
|
2024-04-09 09:05:34 +00:00
|
|
|
.p-toast-message-warn .p-toast-close-button:focus-visible {
|
2024-03-12 10:20:51 +00:00
|
|
|
color: ${dt('toast.warn.color')};
|
2024-02-19 22:53:42 +00:00
|
|
|
}
|
|
|
|
|
2024-04-09 09:05:34 +00:00
|
|
|
.p-toast-message-warn .p-toast-close-button:hover {
|
2024-03-12 10:20:51 +00:00
|
|
|
background: ${dt('toast.warn.close.hover.background')};
|
2024-02-19 22:53:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.p-toast-message-error {
|
2024-03-12 10:20:51 +00:00
|
|
|
background: ${dt('toast.error.background')};
|
|
|
|
border: 1px solid ${dt('toast.error.border.color')};
|
|
|
|
color: ${dt('toast.error.color')};
|
|
|
|
box-shadow: ${dt('toast.error.box.shadow')};
|
2024-02-19 22:53:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.p-toast-message-error .p-toast-detail {
|
2024-03-12 10:20:51 +00:00
|
|
|
color: ${dt('toast.error.detail.color')};
|
2024-02-19 22:53:42 +00:00
|
|
|
}
|
|
|
|
|
2024-04-09 09:05:34 +00:00
|
|
|
.p-toast-message-error .p-toast-close-button:focus-visible {
|
2024-03-12 10:20:51 +00:00
|
|
|
color: ${dt('toast.error.color')};
|
2024-02-19 22:53:42 +00:00
|
|
|
}
|
|
|
|
|
2024-04-09 09:05:34 +00:00
|
|
|
.p-toast-message-error .p-toast-close-button:hover {
|
2024-03-12 10:20:51 +00:00
|
|
|
background: ${dt('toast.error.close.hover.background')};
|
2024-02-19 22:53:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.p-toast-message-secondary {
|
2024-03-12 10:20:51 +00:00
|
|
|
background: ${dt('toast.secondary.background')};
|
|
|
|
border: 1px solid ${dt('toast.secondary.border.color')};
|
|
|
|
color: ${dt('toast.secondary.color')};
|
|
|
|
box-shadow: ${dt('toast.secondary.box.shadow')};
|
2024-02-19 22:53:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.p-toast-message-secondary .p-toast-detail {
|
2024-03-12 10:20:51 +00:00
|
|
|
color: ${dt('toast.secondary.detail.color')};
|
2024-02-19 22:53:42 +00:00
|
|
|
}
|
|
|
|
|
2024-04-09 09:05:34 +00:00
|
|
|
.p-toast-message-secondary .p-toast-close-button:focus-visible {
|
2024-03-12 10:20:51 +00:00
|
|
|
color: ${dt('toast.secondary.color')};
|
2024-02-19 22:53:42 +00:00
|
|
|
}
|
|
|
|
|
2024-04-09 09:05:34 +00:00
|
|
|
.p-toast-message-secondary .p-toast-close-button:hover {
|
2024-03-12 10:20:51 +00:00
|
|
|
background: ${dt('toast.secondary.close.hover.background')};
|
2024-02-19 22:53:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.p-toast-message-contrast {
|
2024-03-12 10:20:51 +00:00
|
|
|
background: ${dt('toast.contrast.background')};
|
|
|
|
border: 1px solid ${dt('toast.contrast.border.color')};
|
|
|
|
color: ${dt('toast.contrast.color')};
|
|
|
|
box-shadow: ${dt('toast.contrast.box.shadow')};
|
2024-02-19 22:53:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.p-toast-message-contrast .p-toast-detail {
|
2024-03-12 10:20:51 +00:00
|
|
|
color: ${dt('toast.contrast.detail.color')};
|
2024-02-19 22:53:42 +00:00
|
|
|
}
|
|
|
|
|
2024-04-09 09:05:34 +00:00
|
|
|
.p-toast-message-contrast .p-toast-close-button:focus-visible {
|
2024-03-12 10:20:51 +00:00
|
|
|
color: ${dt('toast.contrast.color')};
|
2024-02-19 22:53:42 +00:00
|
|
|
}
|
|
|
|
|
2024-04-09 09:05:34 +00:00
|
|
|
.p-toast-message-contrast .p-toast-close-button:hover {
|
2024-03-12 10:20:51 +00:00
|
|
|
background: ${dt('toast.contrast.close.hover.background')};
|
2024-02-19 22:53:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.p-toast-top-center {
|
|
|
|
transform: translateX(-50%);
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-toast-bottom-center {
|
|
|
|
transform: translateX(-50%);
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-toast-center {
|
|
|
|
min-width: 20vw;
|
|
|
|
transform: translate(-50%, -50%);
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-toast-message-enter-from {
|
|
|
|
opacity: 0;
|
|
|
|
transform: translateY(50%);
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-toast-message-leave-from {
|
|
|
|
max-height: 1000px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-toast .p-toast-message.p-toast-message-leave-to {
|
|
|
|
max-height: 0;
|
|
|
|
opacity: 0;
|
|
|
|
margin-bottom: 0;
|
|
|
|
overflow: hidden;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-toast-message-enter-active {
|
|
|
|
transition: transform 0.3s, opacity 0.3s;
|
|
|
|
}
|
|
|
|
|
|
|
|
.p-toast-message-leave-active {
|
|
|
|
transition: max-height 0.45s cubic-bezier(0, 1, 0, 1), opacity 0.3s, margin-bottom 0.3s;
|
|
|
|
}
|
|
|
|
`
|
|
|
|
};
|