2019-06-20 19:10:53 +08:00
|
|
|
@import './mixins/mixins.scss';
|
2019-10-18 17:14:47 +08:00
|
|
|
|
2019-12-07 23:13:52 +08:00
|
|
|
@include b(notification-container) {
|
|
|
|
z-index: 4000;
|
|
|
|
position: fixed;
|
2019-12-08 20:47:14 +08:00
|
|
|
top: 12px;
|
2019-12-07 23:13:52 +08:00
|
|
|
left: 0;
|
|
|
|
right: 0;
|
|
|
|
height: 0;
|
|
|
|
overflow: visible;
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
align-items: flex-end;
|
2020-01-22 16:29:34 +08:00
|
|
|
& > {
|
|
|
|
@include b(scrollbar) {
|
|
|
|
height: -moz-fit-content !important;
|
|
|
|
height: fit-content !important;
|
|
|
|
max-height: 100vh !important;
|
|
|
|
& > {
|
|
|
|
@include b(scrollbar-container) {
|
|
|
|
height: -moz-fit-content !important;
|
|
|
|
height: fit-content !important;
|
|
|
|
max-height: 100vh !important;
|
|
|
|
@include b(scrollbar-content) {
|
|
|
|
padding-top: 12px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-12-07 23:13:52 +08:00
|
|
|
}
|
|
|
|
}
|
2020-01-22 16:29:34 +08:00
|
|
|
|
|
|
|
|
2019-12-08 20:47:14 +08:00
|
|
|
@include m(scrollable) {
|
|
|
|
top: 0;
|
|
|
|
}
|
2019-12-07 23:13:52 +08:00
|
|
|
}
|
|
|
|
|
2019-12-08 20:47:14 +08:00
|
|
|
@mixin notification-type-mixin ($type) {
|
|
|
|
@include m($type + '-type') {
|
|
|
|
@include e(avatar) {
|
|
|
|
@include b(icon) {
|
|
|
|
fill: map-get($--notification-avatar-fill, $type);
|
2020-02-07 20:04:20 +08:00
|
|
|
stroke: map-get($--notification-avatar-fill, $type);
|
2019-12-07 23:13:52 +08:00
|
|
|
}
|
|
|
|
}
|
2019-12-08 20:47:14 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@include themes-mixin {
|
|
|
|
@include b(notification) {
|
|
|
|
@include notification-type-mixin(success);
|
|
|
|
@include notification-type-mixin(info);
|
|
|
|
@include notification-type-mixin(warning);
|
|
|
|
@include notification-type-mixin(error);
|
|
|
|
@include notification-type-mixin(default);
|
|
|
|
background-color: $--notification-background-color;
|
2019-12-07 23:13:52 +08:00
|
|
|
color: $--notification-text-color;
|
2019-12-15 22:34:35 +08:00
|
|
|
@include once {
|
|
|
|
transition:
|
2019-12-23 21:40:45 +08:00
|
|
|
background-color .3s $--n-ease-in-out-cubic-bezier,
|
|
|
|
color .3s $--n-ease-in-out-cubic-bezier,
|
|
|
|
opacity .3s $--n-ease-in-out-cubic-bezier,
|
|
|
|
transform .3s $--n-ease-in-out-cubic-bezier,
|
|
|
|
max-height .3s $--n-ease-in-out-cubic-bezier,
|
|
|
|
margin-bottom .3s linear,
|
|
|
|
box-shadow .3s $--n-ease-in-out-cubic-bezier;
|
2019-12-20 16:59:37 +08:00
|
|
|
font-family: $--n-font-family;
|
2019-12-08 20:47:14 +08:00
|
|
|
font-size: 14px;
|
2019-12-07 23:13:52 +08:00
|
|
|
font-weight: 400;
|
|
|
|
position: relative;
|
|
|
|
display: flex;
|
|
|
|
overflow: hidden;
|
|
|
|
flex-shrink: 0;
|
|
|
|
margin-bottom: 12px;
|
|
|
|
margin-left: 12px;
|
|
|
|
margin-right: 16px;
|
|
|
|
padding-left: 16px;
|
|
|
|
padding-right: 16px;
|
|
|
|
width: 365px;
|
|
|
|
border-radius: 6px;
|
|
|
|
box-shadow: 0px 2px 12px 0px rgba(0, 0, 0, 0.18);
|
|
|
|
box-sizing: border-box;
|
|
|
|
opacity: 1;
|
|
|
|
&-transition-enter, &-transition-leave-to {
|
|
|
|
opacity: 0;
|
|
|
|
margin-bottom: 0;
|
|
|
|
transform: translateX(calc(100% + 16px));
|
|
|
|
}
|
|
|
|
&-transition-leave, &-transition-enter-to {
|
|
|
|
opacity: 1;
|
|
|
|
transform: translateX(0);
|
|
|
|
}
|
2019-12-08 20:47:14 +08:00
|
|
|
@include m(no-avatar) {
|
|
|
|
@include b(notification-main) {
|
|
|
|
margin-left: 8px;
|
|
|
|
width: calc(100% - 8px);
|
|
|
|
}
|
2019-12-07 23:13:52 +08:00
|
|
|
}
|
2020-01-09 17:39:18 +08:00
|
|
|
@include m(closable) {
|
|
|
|
@include b(notification-main) {
|
|
|
|
& > *:first-child {
|
|
|
|
padding-right: 20px
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-12-07 23:13:52 +08:00
|
|
|
}
|
|
|
|
@include e(close) {
|
|
|
|
@include once {
|
|
|
|
position: absolute;
|
|
|
|
top: 16px;
|
2019-12-08 20:47:14 +08:00
|
|
|
right: 12px;
|
2019-12-07 23:13:52 +08:00
|
|
|
font-size: 20px;
|
|
|
|
cursor: pointer;
|
|
|
|
}
|
2019-12-08 20:47:14 +08:00
|
|
|
@include b(icon) {
|
|
|
|
fill: $--notification-close-fill;
|
2020-02-07 20:04:20 +08:00
|
|
|
stroke: $--notification-close-fill;
|
2019-12-08 20:47:14 +08:00
|
|
|
}
|
2019-12-07 23:13:52 +08:00
|
|
|
}
|
|
|
|
@include e(avatar) {
|
|
|
|
@include once {
|
|
|
|
position: absolute;
|
|
|
|
top: 16px;
|
|
|
|
left: 16px;
|
|
|
|
width: 28px;
|
|
|
|
height: 28px;
|
|
|
|
font-size: 28px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@include b(notification-main) {
|
|
|
|
@include once {
|
|
|
|
padding-top: 16px;
|
|
|
|
padding-bottom: 16px;
|
|
|
|
box-sizing: border-box;
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
margin-left: 40px;
|
|
|
|
width: calc(100% - 40px);
|
2019-12-08 20:47:14 +08:00
|
|
|
@include b(notification-main-footer) {
|
2019-10-18 17:14:47 +08:00
|
|
|
display: flex;
|
2019-12-07 23:13:52 +08:00
|
|
|
align-items: center;
|
|
|
|
justify-content: space-between;
|
|
|
|
margin-top: 8px;
|
2019-06-21 00:34:24 +08:00
|
|
|
}
|
2019-12-07 23:13:52 +08:00
|
|
|
}
|
|
|
|
@include e(header) {
|
2019-12-08 20:47:14 +08:00
|
|
|
@include once {
|
2019-12-23 16:48:49 +08:00
|
|
|
font-weight: 500;
|
2019-12-08 20:47:14 +08:00
|
|
|
font-size: 16px;
|
2019-12-22 15:50:37 +08:00
|
|
|
transition: color .3s $--n-ease-in-out-cubic-bezier;
|
2019-12-08 20:47:14 +08:00
|
|
|
}
|
|
|
|
color: $--notification-header-text-color;
|
2019-12-07 23:13:52 +08:00
|
|
|
}
|
|
|
|
@include e(description) {
|
2019-12-08 20:47:14 +08:00
|
|
|
@include once {
|
|
|
|
margin-top: 8px;
|
|
|
|
font-size: 12px;
|
2019-12-22 15:50:37 +08:00
|
|
|
transition: color .3s $--n-ease-in-out-cubic-bezier;
|
2019-12-08 20:47:14 +08:00
|
|
|
}
|
|
|
|
color: $--notification-description-text-color;
|
2019-12-07 23:13:52 +08:00
|
|
|
}
|
|
|
|
@include e(content) {
|
2019-12-08 20:47:14 +08:00
|
|
|
@include once {
|
|
|
|
line-height: 1.25;
|
|
|
|
margin: 12px 0 0 0;
|
|
|
|
font-family: inherit;
|
|
|
|
&:first-child {
|
|
|
|
margin: 0;
|
|
|
|
}
|
|
|
|
white-space: pre-wrap;
|
|
|
|
word-wrap: break-word;
|
2019-12-22 15:50:37 +08:00
|
|
|
transition: color .3s $--n-ease-in-out-cubic-bezier;
|
2019-12-08 20:47:14 +08:00
|
|
|
}
|
|
|
|
color: $--notification-content-text-color;
|
2019-12-07 23:13:52 +08:00
|
|
|
}
|
|
|
|
@include b(notification-main-footer) {
|
2019-12-08 20:47:14 +08:00
|
|
|
@include once {
|
|
|
|
margin-top: 12px;
|
|
|
|
}
|
2019-12-07 23:13:52 +08:00
|
|
|
@include e(meta) {
|
2019-12-08 20:47:14 +08:00
|
|
|
@include once {
|
|
|
|
font-size: 12px;
|
2019-12-22 15:50:37 +08:00
|
|
|
transition: color .3s $--n-ease-in-out-cubic-bezier;
|
2019-12-08 20:47:14 +08:00
|
|
|
}
|
|
|
|
color: $--notification-description-text-color;
|
2019-06-28 15:08:31 +08:00
|
|
|
}
|
2019-12-07 23:13:52 +08:00
|
|
|
@include e(action) {
|
2019-12-08 20:47:14 +08:00
|
|
|
@include once {
|
|
|
|
cursor: pointer;
|
2019-12-22 15:50:37 +08:00
|
|
|
transition: color .3s $--n-ease-in-out-cubic-bezier;
|
2019-12-08 20:47:14 +08:00
|
|
|
}
|
|
|
|
color: $--notification-action-text-color;
|
2019-06-20 19:10:53 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-10-18 17:14:47 +08:00
|
|
|
}
|