1 | @import "../node_modules/tinper-bee-core/scss/minxin-variables";
|
2 | @import "../node_modules/tinper-bee-core/scss/minxin-mixins";
|
3 | @import "../node_modules/bee-icon/src/Icon.scss";
|
4 |
|
5 | $zIndex-message: 2000;
|
6 | .u-message {
|
7 | font-size: $message-font-size;
|
8 | position: fixed;
|
9 | z-index: $zIndex-message;
|
10 | width: 100%;
|
11 |
|
12 |
|
13 | &-notice {
|
14 | position: absolute;
|
15 | padding: $message-padding;
|
16 | @include shadow-3dp();
|
17 | background: $message-background;
|
18 | line-height: 1.5;
|
19 | overflow: hidden;
|
20 | color: #fff;
|
21 | &-description {
|
22 | font-size: 12px;
|
23 | word-wrap: break-word;
|
24 | vertical-align: middle;
|
25 | &-content {
|
26 | padding: $message-content-padding;
|
27 | margin-left: 45px;
|
28 | }
|
29 | &-icon{
|
30 | position: absolute;
|
31 | top: 0;
|
32 | left: 0;
|
33 | height: 100%;
|
34 | width: 45px;
|
35 | text-align: center;
|
36 | background-color: #000;
|
37 | .uf {
|
38 | font-size: 30px;
|
39 | }
|
40 | }
|
41 | }
|
42 |
|
43 | &-closable {
|
44 | padding-right: 20px;
|
45 | }
|
46 |
|
47 | &-close {
|
48 | position: absolute;
|
49 | right: 24px;
|
50 | top: 8px;
|
51 | cursor: pointer;
|
52 | outline: none;
|
53 | font-size: 30px;
|
54 | font-weight: 700;
|
55 | line-height: 1;
|
56 | text-shadow: 0 1px 0 #fff;
|
57 | filter: alpha(opacity=80);
|
58 | opacity: .8;
|
59 | text-decoration: none;
|
60 |
|
61 | &-x:after {
|
62 | content: '×';
|
63 | }
|
64 |
|
65 | &:hover {
|
66 | opacity: 1;
|
67 | filter: alpha(opacity=100);
|
68 | text-decoration: none;
|
69 | }
|
70 |
|
71 | }
|
72 | }
|
73 |
|
74 | &-notice-light {
|
75 | background-color: #fff;
|
76 | color: $gray-darkest;
|
77 | .u-message-notice-description-icon{
|
78 | background-color: $gray-lighter;
|
79 | }
|
80 | }
|
81 | &-notice-success {
|
82 | background-color: $brand-success;
|
83 | color: #fff;
|
84 | .u-message-notice-description-icon{
|
85 | background-color: $brand-success-active;
|
86 | }
|
87 | }
|
88 | &-notice-danger {
|
89 | background-color: $brand-danger;
|
90 | color: #fff;
|
91 | .u-message-notice-description-icon{
|
92 | background-color: $brand-danger-active;
|
93 | }
|
94 | }
|
95 | &-notice-info {
|
96 | background-color: $brand-info;
|
97 | color: #fff;
|
98 | .u-message-notice-description-icon{
|
99 | background-color: $brand-info-active;
|
100 | }
|
101 | }
|
102 | &-notice-warning {
|
103 | background-color:$brand-warning;
|
104 | color: #fff;
|
105 | .u-message-notice-description-icon{
|
106 | background-color: $brand-warning-active;
|
107 | }
|
108 | }
|
109 | &-notice-successlight {
|
110 | background-color: $brand-light-success;
|
111 | color: #000;
|
112 | .u-message-notice-description-icon{
|
113 | background-color: $brand-success;
|
114 | color: #fff;
|
115 | }
|
116 | }
|
117 | &-notice-dangerlight {
|
118 | background-color: $brand-light-danger;
|
119 | color: #000;
|
120 | .u-message-notice-description-icon{
|
121 | background-color: $brand-danger;
|
122 | color: #fff;
|
123 | }
|
124 | }
|
125 | &-notice-infolight {
|
126 | background-color: $brand-light-info;
|
127 | color: #000;
|
128 | .u-message-notice-description-icon{
|
129 | background-color: $brand-info;
|
130 | color: #fff;
|
131 | }
|
132 | }
|
133 | &-notice-warninglight {
|
134 | background-color: $brand-light-warning;
|
135 | color: #000;
|
136 | .u-message-notice-description-icon{
|
137 | background-color: $brand-warning;
|
138 | color: #fff;
|
139 | }
|
140 | }
|
141 |
|
142 | }
|
143 | .message-fade-effect {
|
144 | animation-duration: 0.24s;
|
145 | animation-fill-mode: both;
|
146 | animation-timing-function: cubic-bezier(0.645, 0.045, 0.355, 1);
|
147 | }
|
148 |
|
149 | .u-message-left-enter,
|
150 | .u-message-left-appear,.u-message-right-enter,
|
151 | .u-message-right-appear,.u-message-top-enter,
|
152 | .u-message-top-appear,.u-message-bottom-enter,
|
153 | .u-message-bottom-appear {
|
154 | opacity: 0;
|
155 | @extend .message-fade-effect;
|
156 | animation-play-state: paused;
|
157 | }
|
158 |
|
159 | .u-message-left-leave,
|
160 | .u-message-right-leave,
|
161 | .u-message-top-leave,
|
162 | .u-message-bottom-leave {
|
163 | @extend .message-fade-effect;
|
164 | animation-duration: 0.2s;
|
165 | animation-play-state: paused;
|
166 | }
|
167 |
|
168 |
|
169 | .u-message-left-enter.u-message-left-enter-active,
|
170 | .u-message-left-appear.u-message-left-appear-active {
|
171 | animation-name: uMessageLeftIn;
|
172 | animation-play-state: running;
|
173 | }
|
174 |
|
175 | .u-message-left-leave.u-message-left-leave-active {
|
176 | animation-name: uMessageFadeOut;
|
177 | animation-play-state: running;
|
178 | }
|
179 | .u-message-right-enter.u-message-right-enter-active,
|
180 | .u-message-right-appear.u-message-right-appear-active {
|
181 | animation-name: uMessageRightIn;
|
182 | animation-play-state: running;
|
183 | }
|
184 |
|
185 | .u-message-right-leave.u-message-right-leave-active {
|
186 | animation-name: uMessageFadeOut;
|
187 | animation-play-state: running;
|
188 | }
|
189 | .u-message-top-enter.u-message-top-enter-active,
|
190 | .u-message-top-appear.u-message-top-appear-active {
|
191 | animation-name: uMessageMoveUp;
|
192 | animation-play-state: running;
|
193 | }
|
194 |
|
195 | .u-message-top-leave.u-message-top-leave-active {
|
196 | animation-name: uMessageFadeOut;
|
197 | animation-play-state: running;
|
198 | }
|
199 | .u-message-bottom-enter.u-message-bottom-enter-active,
|
200 | .u-message-bottom-appear.u-message-bottom-appear-active {
|
201 | animation-name: uMessageMoveDown;
|
202 | animation-play-state: running;
|
203 | }
|
204 |
|
205 | .u-message-bottom-leave.u-message-bottom-leave-active {
|
206 | animation-name: uMessageFadeOut;
|
207 | animation-play-state: running;
|
208 | }
|
209 | @keyframes uMessageLeftIn {
|
210 | 0% {
|
211 | opacity: 0;
|
212 | right: 30px;
|
213 | }
|
214 | 100% {
|
215 | right: 0;
|
216 | opacity: 1;
|
217 | }
|
218 | }
|
219 | @keyframes uMessageRightIn {
|
220 | 0% {
|
221 | opacity: 0;
|
222 | left:30px;
|
223 | }
|
224 | 100% {
|
225 | left: 0;
|
226 | opacity: 1;
|
227 | }
|
228 | }
|
229 | @keyframes uMessageMoveUp {
|
230 | 0% {
|
231 | opacity: 0;
|
232 | top: -30px;
|
233 | }
|
234 | 100% {
|
235 | top: 0;
|
236 | opacity: 1;
|
237 | }
|
238 | }
|
239 | @keyframes uMessageMoveDown {
|
240 | 0% {
|
241 | opacity: 0;
|
242 | bottom: -78px;
|
243 | }
|
244 | 100% {
|
245 | bottom: -48px;
|
246 | opacity: 1;
|
247 | }
|
248 | }
|
249 |
|
250 |
|
251 | @keyframes uMessageFadeOut {
|
252 | 0% {
|
253 | opacity: 1;
|
254 | padding-top: $message-padding;
|
255 | padding-bottom: $message-padding;
|
256 | max-height: 150px;
|
257 | }
|
258 | 100% {
|
259 | opacity: 0;
|
260 | padding-top: 0;
|
261 | padding-bottom: 0;
|
262 | max-height: 0;
|
263 | }
|
264 | }
|