vue-nt-toast 0.1.2 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/package.json +1 -1
- package/src/index.js +2 -1
- package/src/toast.js +1 -1
- package/src/toast.scss +120 -1
- package/dist/nt-toast.es.js +0 -4486
- package/dist/nt-toast.umd.js +0 -12
- package/dist/toast.css +0 -1
package/README.md
CHANGED
|
@@ -22,6 +22,12 @@ You can set multiple options across the system, including theme, location, and s
|
|
|
22
22
|
|
|
23
23
|
테마, 위치, 스낵바 모드 등 여러 옵션을 전역에서 설정 하여 전체 시스템에 반영 하도록 할수있고, 사용자가 실행 할때 마다 변경 가능한 옵션을 적용 할수도 있습니다.
|
|
24
24
|
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Demo
|
|
28
|
+
|
|
29
|
+
[vue-nt-toast](https://noistommy.github.io/vue-nt-toast) demo page.
|
|
30
|
+
|
|
25
31
|
---
|
|
26
32
|
## Installation
|
|
27
33
|
|
package/package.json
CHANGED
package/src/index.js
CHANGED
package/src/toast.js
CHANGED
|
@@ -56,7 +56,7 @@ class Toast {
|
|
|
56
56
|
if (!this.options.useIcon || this.options.theme === 'line') return
|
|
57
57
|
this.icon = document.createElement('div')
|
|
58
58
|
this.icon.classList.add('toast-icon')
|
|
59
|
-
const iconClass = statusIcon[this.type] || '
|
|
59
|
+
const iconClass = statusIcon[this.type] || 'exclamation-circle'
|
|
60
60
|
this.icon.innerHTML = `<i class="fa fa-${iconClass}" />`
|
|
61
61
|
// this.icon.innerHTML = `<img src="./icons/success.svg" />`
|
|
62
62
|
// this.toast.appendChild(this.icon)
|
package/src/toast.scss
CHANGED
|
@@ -100,7 +100,6 @@ $colors: (
|
|
|
100
100
|
display: flex;
|
|
101
101
|
flex-direction: column;
|
|
102
102
|
z-index: 9999;
|
|
103
|
-
top: 0;
|
|
104
103
|
&.on-top {
|
|
105
104
|
flex-direction: column-reverse;
|
|
106
105
|
}
|
|
@@ -229,6 +228,24 @@ $colors: (
|
|
|
229
228
|
}
|
|
230
229
|
}
|
|
231
230
|
}
|
|
231
|
+
&:is(.top-left, .bottom-left) .toast {
|
|
232
|
+
animation-name: swing-reverse-off;
|
|
233
|
+
&.swing {
|
|
234
|
+
animation-name: swing-reverse;
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
&:is(.top-center, .top-full-width) .toast {
|
|
238
|
+
animation-name: pull-up-off;
|
|
239
|
+
&.swing {
|
|
240
|
+
animation-name: pull-up;
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
&:is(.bottom-center, .bottom-full-width) .toast {
|
|
244
|
+
animation-name: pull-down-off;
|
|
245
|
+
&.swing {
|
|
246
|
+
animation-name: pull-down;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
232
249
|
// .ga-primary {
|
|
233
250
|
// background-color: $primary;
|
|
234
251
|
// color: $white;
|
|
@@ -274,4 +291,106 @@ $colors: (
|
|
|
274
291
|
//opacity: 0;
|
|
275
292
|
}
|
|
276
293
|
|
|
294
|
+
}
|
|
295
|
+
@keyframes swing-reverse {
|
|
296
|
+
0% {
|
|
297
|
+
transform: translateX(-300px);
|
|
298
|
+
opacity: 0;
|
|
299
|
+
}
|
|
300
|
+
25% {
|
|
301
|
+
transform: translateX(-20px);
|
|
302
|
+
}
|
|
303
|
+
75% {
|
|
304
|
+
transform: translateX(10px);
|
|
305
|
+
opacity: .95;
|
|
306
|
+
}
|
|
307
|
+
100% {
|
|
308
|
+
transform: translateX(0px);
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
}
|
|
312
|
+
@keyframes swing-reverse-off {
|
|
313
|
+
0% {
|
|
314
|
+
transform: translateX(0px);
|
|
315
|
+
}
|
|
316
|
+
25% {
|
|
317
|
+
transform: translateX(10px);
|
|
318
|
+
//opacity: 0.95;
|
|
319
|
+
}
|
|
320
|
+
75% {
|
|
321
|
+
transform: translateX(-20px);
|
|
322
|
+
}
|
|
323
|
+
100% {
|
|
324
|
+
transform: translateX(-300px);
|
|
325
|
+
//opacity: 0;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
}
|
|
329
|
+
@keyframes pull-up {
|
|
330
|
+
0% {
|
|
331
|
+
transform: translateY(30px);
|
|
332
|
+
opacity: 0;
|
|
333
|
+
}
|
|
334
|
+
25% {
|
|
335
|
+
transform: translateY(10px);
|
|
336
|
+
}
|
|
337
|
+
75% {
|
|
338
|
+
transform: translateY(-5px);
|
|
339
|
+
opacity: .95;
|
|
340
|
+
}
|
|
341
|
+
100% {
|
|
342
|
+
transform: translateY(0px);
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
}
|
|
346
|
+
@keyframes pull-up-off {
|
|
347
|
+
0% {
|
|
348
|
+
transform: translateY(0px);
|
|
349
|
+
}
|
|
350
|
+
25% {
|
|
351
|
+
transform: translateY(5px);
|
|
352
|
+
//opacity: 0.95;
|
|
353
|
+
}
|
|
354
|
+
75% {
|
|
355
|
+
transform: translateY(-10px);
|
|
356
|
+
}
|
|
357
|
+
100% {
|
|
358
|
+
transform: translateY(-30px);
|
|
359
|
+
//opacity: 0;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
}
|
|
363
|
+
@keyframes pull-down {
|
|
364
|
+
0% {
|
|
365
|
+
transform: translateY(-30px);
|
|
366
|
+
opacity: 0;
|
|
367
|
+
}
|
|
368
|
+
25% {
|
|
369
|
+
transform: translateY(-10px);
|
|
370
|
+
}
|
|
371
|
+
75% {
|
|
372
|
+
transform: translateY(5px);
|
|
373
|
+
opacity: .95;
|
|
374
|
+
}
|
|
375
|
+
100% {
|
|
376
|
+
transform: translateY(0px);
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
}
|
|
380
|
+
@keyframes pull-down-off {
|
|
381
|
+
0% {
|
|
382
|
+
transform: translateY(0px);
|
|
383
|
+
}
|
|
384
|
+
25% {
|
|
385
|
+
transform: translateY(-5px);
|
|
386
|
+
//opacity: 0.95;
|
|
387
|
+
}
|
|
388
|
+
75% {
|
|
389
|
+
transform: translateY(10px);
|
|
390
|
+
}
|
|
391
|
+
100% {
|
|
392
|
+
transform: translateY(30px);
|
|
393
|
+
//opacity: 0;
|
|
394
|
+
}
|
|
395
|
+
|
|
277
396
|
}
|