2019-06-20 19:10:53 +08:00
|
|
|
@import './mixins/mixins.scss';
|
2019-10-18 17:14:47 +08:00
|
|
|
|
2019-09-17 19:21:07 +08:00
|
|
|
@import './themes/vars.scss';
|
2019-06-20 19:10:53 +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;
|
|
|
|
@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-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);
|
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-08 20:47:14 +08:00
|
|
|
background-color .3s $default-cubic-bezier,
|
|
|
|
color .3s $default-cubic-bezier,
|
|
|
|
opacity .3s $default-cubic-bezier,
|
|
|
|
transform .3s $default-cubic-bezier,
|
|
|
|
max-height .3s $default-cubic-bezier,
|
|
|
|
margin-bottom .3s linear,
|
|
|
|
box-shadow .3s $default-cubic-bezier;
|
|
|
|
font-family: $default-font-family;
|
|
|
|
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
|
|
|
}
|
|
|
|
}
|
|
|
|
@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;
|
|
|
|
}
|
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;
|
|
|
|
width: 100%;
|
|
|
|
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 {
|
|
|
|
font-weight: 700;
|
|
|
|
font-size: 16px;
|
|
|
|
transition: color .3s $default-cubic-bezier;
|
|
|
|
}
|
|
|
|
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;
|
|
|
|
transition: color .3s $default-cubic-bezier;
|
|
|
|
}
|
|
|
|
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;
|
|
|
|
transition: color .3s $default-cubic-bezier;
|
|
|
|
}
|
|
|
|
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;
|
|
|
|
transition: color .3s $default-cubic-bezier;
|
|
|
|
}
|
|
|
|
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;
|
|
|
|
transition: color .3s $default-cubic-bezier;
|
|
|
|
}
|
|
|
|
color: $--notification-action-text-color;
|
2019-06-20 19:10:53 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-10-18 17:14:47 +08:00
|
|
|
}
|