rails_toastify 0.1.4 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ad106eeec4a5dc91967781e1012327953d768abee3af5d5868c72fc8c29706be
4
- data.tar.gz: afa96d9999758b8c2820073ad06474afabaed7d6403b895d0e7f1284df9b3743
3
+ metadata.gz: 4c9016ace17fcc8e2c9752befff1bb4dbe57a9759016fcaf4645fad02f747da2
4
+ data.tar.gz: d53c5284e34737ba275d1a2938dd281fdfa49157b75820565070fbdbf4c63bf7
5
5
  SHA512:
6
- metadata.gz: 950fe77e61917edbb1283a7330d76f45fd9a7b952f17eb99548e04080e1c09a5df9c2979ec98afbc71abfec67973b4e1e2009070bbf9139338315f24e597e8a4
7
- data.tar.gz: 746f2e26fe44d665ed3f47adabb9e7105aca988b35841621be478619d784308b096ebd5b9009c9bec29f841cb769d317f6cde42635f59d5bf0dd5702f8f0742c
6
+ metadata.gz: a56648ac935a1a150cdf1833b520e6666aed710930b174bb81b3ad030de8a617f1bf553061ecc0f7c3600c9b45309c18b143a8a9ac7fb7bb073eecc792b6dbde
7
+ data.tar.gz: cc9cbaec8bd2eb43bff831ce1922abd37cd5946e12c8f8d20e0309f191db50866eaaac49fa47954adb65b23a569956717d8821102d02e2103319609a946f561d
data/CHANGELOG.md CHANGED
@@ -1,3 +1,13 @@
1
+ # 0.1.6
2
+
3
+ - Fix css and js
4
+ - Close toast on progress bar finish
5
+ - Toast appear on top right
6
+
7
+ # 0.1.5
8
+
9
+ - Adjustments CSS progress bar and shadow
10
+
1
11
  # 0.1.4
2
12
 
3
13
  - Change CSS
@@ -5,7 +5,7 @@ document.addEventListener('DOMContentLoaded', () => {
5
5
  const toast = createToast(message, type, duration);
6
6
  toastContainer.appendChild(toast);
7
7
  setTimeout(() => {
8
- toast.classList.add('fade-out');
8
+ toast.classList.add('hide');
9
9
  toast.addEventListener('transitionend', () => toast.remove());
10
10
  }, duration);
11
11
  }
@@ -52,5 +52,4 @@ document.addEventListener('DOMContentLoaded', () => {
52
52
 
53
53
  return toast;
54
54
  }
55
-
56
55
  });
@@ -12,13 +12,14 @@
12
12
  align-items: center;
13
13
  background-color: #fff;
14
14
  border-radius: 4px;
15
- box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
15
+ box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.06);
16
16
  padding: 16px;
17
17
  margin: 8px;
18
18
  color: #333;
19
19
  position: relative;
20
- transition: transform 0.5s ease-in-out;
20
+ transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
21
21
  transform: translateX(100%);
22
+ max-width: 300px;
22
23
  }
23
24
 
24
25
  .toast.show {
@@ -27,22 +28,23 @@
27
28
 
28
29
  .toast.hide {
29
30
  transform: translateX(100%);
31
+ opacity: 0;
30
32
  }
31
33
 
32
- .toast--success {
33
- border-bottom: 5px solid #4caf50;
34
+ .toast--success .toast__progress-bar {
35
+ background-color: #4caf50;
34
36
  }
35
37
 
36
- .toast--error {
37
- border-bottom: 5px solid #f44336;
38
+ .toast--error .toast__progress-bar {
39
+ background-color: #f44336;
38
40
  }
39
41
 
40
- .toast--info {
41
- border-bottom: 5px solid #2196f3;
42
+ .toast--info .toast__progress-bar {
43
+ background-color: #2196f3;
42
44
  }
43
45
 
44
- .toast--warning {
45
- border-bottom: 5px solid #ff9800;
46
+ .toast--warning .toast__progress-bar {
47
+ background-color: #ff9800;
46
48
  }
47
49
 
48
50
  .toast__close-button {
@@ -67,7 +69,6 @@
67
69
  left: 0;
68
70
  width: 100%;
69
71
  height: 4px;
70
- background-color: currentColor;
71
72
  animation: progress-bar 5s linear forwards;
72
73
  }
73
74
 
@@ -85,11 +86,8 @@
85
86
  }
86
87
 
87
88
  .toast {
88
- @apply flex items-center bg-white rounded shadow p-4 my-2 text-gray-800 relative;
89
- }
90
-
91
- .toast {
92
- @apply transition-transform duration-500 ease-in-out;
89
+ @apply flex items-center bg-white rounded-lg shadow-lg p-4 my-2 text-gray-800 relative max-w-sm;
90
+ transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
93
91
  transform: translateX(100%);
94
92
  }
95
93
 
@@ -99,22 +97,23 @@
99
97
 
100
98
  .toast.hide {
101
99
  transform: translateX(100%);
100
+ opacity: 0;
102
101
  }
103
102
 
104
- .toast--success {
105
- @apply border-b-4 border-green-500;
103
+ .toast--success .toast__progress-bar {
104
+ @apply bg-green-500;
106
105
  }
107
106
 
108
- .toast--error {
109
- @apply border-b-4 border-red-500;
107
+ .toast--error .toast__progress-bar {
108
+ @apply bg-red-500;
110
109
  }
111
110
 
112
- .toast--info {
113
- @apply border-b-4 border-blue-500;
111
+ .toast--info .toast__progress-bar {
112
+ @apply bg-blue-500;
114
113
  }
115
114
 
116
- .toast--warning {
117
- @apply border-b-4 border-yellow-500;
115
+ .toast--warning .toast__progress-bar {
116
+ @apply bg-yellow-500;
118
117
  }
119
118
 
120
119
  .toast__close-button {
@@ -126,7 +125,6 @@
126
125
 
127
126
  .toast__progress-bar {
128
127
  @apply absolute bottom-0 left-0 w-full h-1;
129
- background-color: currentColor;
130
128
  animation: progress-bar 5s linear forwards;
131
129
  }
132
130
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RailsToastify
4
- VERSION = "0.1.4"
4
+ VERSION = "0.1.6"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_toastify
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elton Santos