react-toast-master 2.1.3 → 2.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.
@@ -1,22 +0,0 @@
1
- import "../styles/textColor.css";
2
- import "../styles/breakPoints.css";
3
-
4
- const LoadFooter = ({ toastAlignment, toastBG, loadFooter }) => (
5
- <div className={`_footer toast_width reveal_ani ${toastAlignment} ${toastBGClasses[toastBG]}`}>
6
- {loadFooter}
7
- </div>
8
- );
9
-
10
- const toastBGClasses = {
11
- dark: "footer_dark",
12
- warning: "footer_dark",
13
- white: "footer_white",
14
- info: "footer_info",
15
- error: "footer_error",
16
- success: "footer_success",
17
- gray: "footer_success",
18
- glass: "footer_success",
19
- transparent: "footer_success",
20
- };
21
-
22
- export default LoadFooter;
@@ -1,41 +0,0 @@
1
- /**
2
- * Returns the animation that should be used when hiding a toast, based on the
3
- * current animation and position of the toast.
4
- *
5
- * @param {String} toastAnimation The animation that is currently being used to show the toast.
6
- * @param {String} toastPG The position of the toast (top/bottom/topFull/bottomFull).
7
- * @returns {String} The animation that should be used to hide the toast.
8
- */
9
- export const getAnimation = (toastAnimation, toastPG) => {
10
- let animation;
11
-
12
- switch (toastAnimation) {
13
- case "ani_top":
14
- animation = "ani_slide_out_up";
15
- break;
16
- case "ani_down":
17
- animation = "ani_slide_out_down";
18
- break;
19
- case "ani_left":
20
- animation = "ani_slide_out_left";
21
- break;
22
- case "ani_right":
23
- animation = "ani_slide_out_right";
24
- break;
25
- case "ani_jelly":
26
- animation = "ani_jelly_out";
27
- break;
28
- case "ani_zoom":
29
- animation = "ani_zoom_out";
30
- break;
31
- default:
32
- animation = "ani_fade_out";
33
- }
34
-
35
- // Check if the toast is full and apply the appropriate animation
36
- if (toastPG === "bottomFull" || toastPG === "topFull") {
37
- animation = "ani_fade_out_full";
38
- }
39
-
40
- return animation;
41
- };
@@ -1,256 +0,0 @@
1
- .outer_container {
2
- position: fixed;
3
- display: flex;
4
- width: 100%;
5
- pointer-events: none;
6
- }
7
-
8
- .inner_container {
9
- position: relative;
10
- display: flex;
11
- flex-direction: column;
12
- pointer-events: all;
13
- }
14
-
15
- /*
16
- reveal animation css
17
- */
18
- .outer_container.ani_down {
19
- animation: slide_down 0.5s ease forwards;
20
- }
21
- .outer_container.ani_top {
22
- animation: slide_up 0.5s ease forwards;
23
- }
24
- .outer_container.ani_left {
25
- animation: slide_left 0.5s ease forwards;
26
- }
27
- .outer_container.ani_right {
28
- animation: slide_right 0.5s ease forwards;
29
- }
30
- .outer_container.ani_fade {
31
- animation: fade_in 0.5s ease forwards;
32
- }
33
- .outer_container.ani_zoom {
34
- animation: zoom_in 0.8s ease forwards;
35
- }
36
- .outer_container.ani_jelly {
37
- animation: jelly 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.475) forwards;
38
- }
39
-
40
- /*
41
- reveal animation
42
- */
43
- @keyframes slide_down {
44
- from {
45
- transform: translateY(-150%);
46
- }
47
- to {
48
- transform: translateY(0);
49
- }
50
- }
51
-
52
- @keyframes slide_up {
53
- from {
54
- transform: translateY(150%);
55
- }
56
- to {
57
- transform: translateY(0);
58
- }
59
- }
60
-
61
- @keyframes slide_left {
62
- from {
63
- transform: translateX(-100%);
64
- }
65
- to {
66
- transform: translateX(0);
67
- }
68
- }
69
-
70
- @keyframes slide_right {
71
- from {
72
- transform: translateX(100%);
73
- }
74
- to {
75
- transform: translateX(0);
76
- }
77
- }
78
-
79
- @keyframes fade_in {
80
- from {
81
- scale: 0.975;
82
- opacity: 0.2;
83
- }
84
- to {
85
- opacity: 1;
86
- scale: 1;
87
- }
88
- }
89
-
90
- @keyframes zoom_in {
91
- from {
92
- scale: 0.9;
93
- opacity: 0;
94
- }
95
- to {
96
- scale: 1;
97
- scale: 1;
98
- }
99
- }
100
- @keyframes jelly {
101
- from {
102
- transform: rotateX(90deg);
103
- scale: 0.93;
104
- }
105
- to {
106
- transform: rotateX(0deg);
107
- scale: 1;
108
- }
109
- }
110
-
111
- /*
112
- closing animation css
113
- */
114
- .outer_container.ani_fade_out {
115
- animation: fade_out 0.5s ease forwards;
116
- }
117
- .outer_container.ani_zoom_out {
118
- animation: zoom_out 0.5s ease-out forwards;
119
- }
120
- .outer_container.ani_slide_out_down {
121
- animation: slide_out_down 0.5s ease forwards;
122
- }
123
- .outer_container.ani_slide_out_up {
124
- animation: slide_out_up 0.5s ease forwards;
125
- }
126
- .outer_container.ani_slide_out_left {
127
- animation: slide_out_left 0.5s ease forwards;
128
- }
129
- .outer_container.ani_slide_out_right {
130
- animation: slide_out_right 0.5s ease forwards;
131
- }
132
- .outer_container.ani_jelly_out {
133
- animation: jelly_out 0.5s ease forwards;
134
- }
135
-
136
- /*
137
- closing animation
138
- */
139
-
140
- @keyframes slide_out_down {
141
- from {
142
- transform: translateY(0);
143
- }
144
- to {
145
- transform: translateY(-200%);
146
- }
147
- }
148
-
149
- @keyframes slide_out_up {
150
- from {
151
- transform: translateY(0);
152
- }
153
- to {
154
- transform: translateY(200%);
155
- }
156
- }
157
-
158
- @keyframes slide_out_left {
159
- from {
160
- transform: translateX(0);
161
- }
162
- to {
163
- transform: translateX(-100%);
164
- }
165
- }
166
-
167
- @keyframes slide_out_right {
168
- from {
169
- transform: translateX(0);
170
- }
171
- to {
172
- transform: translateX(100%);
173
- }
174
- }
175
-
176
- @keyframes fade_out {
177
- from {
178
- opacity: 1;
179
- scale: 1;
180
- }
181
- to {
182
- opacity: 0;
183
- scale: 0.95;
184
- }
185
- }
186
-
187
- @keyframes zoom_out {
188
- from {
189
- scale: 1;
190
- opacity: 1;
191
- }
192
- to {
193
- scale: 0.9;
194
- opacity: 0;
195
- }
196
- }
197
-
198
- @keyframes jelly_out {
199
- from {
200
- transform: rotateX(0deg);
201
- scale: 1;
202
- opacity: 1;
203
- }
204
- to {
205
- transform: rotateX(40deg);
206
- scale: 0.95;
207
- opacity: 0;
208
- }
209
- }
210
-
211
- /*
212
- this css style is used when the toast is using full width "bottomFull" ||"topFull"
213
- */
214
- .outer_container.ani_fade_out_full {
215
- animation: fade_out_full 0.5s ease forwards;
216
- }
217
-
218
- @keyframes fade_out_full {
219
- from {
220
- opacity: 1;
221
- }
222
- to {
223
- opacity: 0;
224
- }
225
- }
226
-
227
- .reveal_ani {
228
- animation: revealFooter 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
229
- }
230
-
231
- @keyframes revealFooter {
232
- from {
233
- opacity: 0;
234
- transform: translateY(-150%);
235
- }
236
- to {
237
- opacity: 1;
238
- transform: translateY(0);
239
- }
240
- }
241
-
242
- .overlay {
243
- position: fixed;
244
- top: 0;
245
- left: 0;
246
- width: 100%;
247
- height: 100%;
248
- background-color: glass;
249
- transition: background-color 0.35s ease-in-out;
250
- z-index: 9997;
251
- backdrop-filter: blur(0.7px);
252
- }
253
-
254
- .overlay.show {
255
- background-color: rgba(12, 12, 12, 0.63);
256
- }
@@ -1,52 +0,0 @@
1
- /* background */
2
- .bg_white {
3
- background-color: #ffffff;
4
- border: 1px solid #dddddd;
5
- }
6
- .bg_error {
7
- background-color: #dc2626;
8
- border: 1px solid #d14f4f;
9
- }
10
- .bg_dark {
11
- background-color: #141318;
12
- border: 1px solid #35383d;
13
- }
14
- .bg_gray {
15
- background-color: #495668;
16
- border: 1px solid #97a5b9;
17
- }
18
- .bg_glass {
19
- background: #ffffff38 !important;
20
- backdrop-filter: blur(7px) !important;
21
- -webkit-backdrop-filter: blur(7px) !important;
22
- border: 1px solid rgba(255, 255, 255, 0.18) !important;
23
- }
24
- .bg_success {
25
- background-color: #07bc0c;
26
- border: 1px solid #007e33;
27
- }
28
-
29
- .bg_warning {
30
- background-color: #edc319;
31
- border: 1px solid #ff8800;
32
- }
33
-
34
- .bg_info {
35
- background-color: #007fff;
36
- border: 1px solid #146fb9;
37
- }
38
-
39
- .bg_transparent {
40
- background-color: transparent;
41
- border: 1px solid #ffffff;
42
- }
43
-
44
- .bg_darker {
45
- color: rgb(231, 231, 231);
46
- }
47
- .bg_whiter {
48
- color: #536075;
49
- }
50
- .bg_glass_close {
51
- color: #ffffff;
52
- }
@@ -1,44 +0,0 @@
1
- /* border radius */
2
- .rounded_none {
3
- border-radius: 0rem;
4
- }
5
- .rounded_md {
6
- border-radius: 0.375rem;
7
- }
8
- .rounded_sm {
9
- border-radius: 0.125rem;
10
- }
11
- .rounded_lg {
12
- border-radius: 0.5rem;
13
- }
14
- .rounded_xl {
15
- border-radius: 0.75rem;
16
- }
17
- .rounded_2xl {
18
- border-radius: 1rem;
19
- }
20
- .rounded_full {
21
- border-radius: 9999px;
22
- }
23
-
24
- .border_white {
25
- border: 1px solid #fff;
26
- }
27
- .border_dark {
28
- border: 1px solid #141318;
29
- }
30
- .border_success {
31
- border: 1px solid #22c55e;
32
- }
33
- .border_error {
34
- border: 1px solid #dc2626;
35
- }
36
- .border_warning {
37
- border: 1px solid #edc319;
38
- }
39
- .border_info {
40
- border: 1px solid #2196f3;
41
- }
42
- .border_neutral {
43
- border: 1px solid rgba(136, 136, 136, 0.651);
44
- }
@@ -1,237 +0,0 @@
1
- /* xl */
2
- @media screen and (min-width: 1280px) and (max-width: 5120px) {
3
- .toast_width {
4
- padding: 0.725rem 2.3rem;
5
- }
6
- .max_width {
7
- width: 475px;
8
- overflow: hidden;
9
- }
10
- .toast_width_confirm {
11
- padding: 1.1rem 1.5rem;
12
- }
13
- .toast_message {
14
- align-items: center;
15
- font-size: 1.04rem;
16
- line-height: 1.3rem;
17
- font-weight: 600;
18
- white-space: normal;
19
- column-gap: 1rem;
20
- }
21
-
22
- /* footer */
23
- ._footer {
24
- white-space: break-spaces;
25
- display: flex;
26
- border-top-width: 1px;
27
- border-top-style: solid;
28
- font-weight: 400;
29
- font-size: 0.875rem;
30
- line-height: 1.25rem;
31
- padding: 0.325rem 2.3rem;
32
- }
33
-
34
- .confirm_div {
35
- font-size: 1rem;
36
- line-height: 1.5rem;
37
- display: flex;
38
- align-items: center;
39
- margin-top: 0.75rem;
40
- color: #374151;
41
- font-weight: 500;
42
- column-gap: 0.75rem;
43
- }
44
-
45
- /*
46
- this css is being used in the InnerFooter component
47
- */
48
- .innerFooter {
49
- white-space: break-spaces;
50
- display: flex;
51
- font-weight: 400;
52
- font-size: 0.875rem;
53
- padding: 0.625rem 0rem;
54
- line-height: 1.25rem;
55
- }
56
- }
57
-
58
- /* medium display */
59
- @media screen and (min-width: 768px) and (max-width: 1279px) {
60
- .toast_message {
61
- flex-direction: row;
62
- column-gap: 0.8rem;
63
- font-size: 1rem;
64
- line-height: 1.3rem;
65
- font-weight: 600;
66
- align-items: center;
67
- }
68
- .toast_width {
69
- padding: 0.425rem 2rem;
70
- }
71
- .toast_width_confirm {
72
- padding: 1rem 1.5rem;
73
- }
74
- .max_width {
75
- width: 445px;
76
- overflow: hidden;
77
- }
78
- /* footer */
79
- ._footer {
80
- white-space: break-spaces;
81
- display: flex;
82
- border-top-width: 1px;
83
- border-top-style: solid;
84
-
85
- font-weight: 400;
86
- font-size: 0.8rem;
87
- line-height: 1.25rem;
88
- padding: 0.325rem 2rem;
89
- }
90
-
91
- .confirm_div {
92
- font-size: 1rem;
93
- line-height: 1.5rem;
94
- display: flex;
95
- align-items: center;
96
- margin-top: 0.75rem;
97
- color: #374151;
98
- font-weight: 500;
99
- column-gap: 0.75rem;
100
- }
101
-
102
- /*
103
- this css is being used in the InnerFooter component
104
- */
105
- .innerFooter {
106
- white-space: break-spaces;
107
- display: flex;
108
- font-weight: 400;
109
- font-size: 0.8rem;
110
- line-height: 1.25rem;
111
- padding: 0.6rem 0rem;
112
- }
113
- }
114
-
115
- /* small display */
116
- @media screen and (min-width: 481px) and (max-width: 767px) {
117
- .toast_message {
118
- flex-direction: row;
119
- font-size: 17px;
120
- line-height: 1.4rem;
121
- font-weight: 500;
122
- gap: 0rem 0.75rem;
123
- align-items: center;
124
- }
125
- .toast_width {
126
- padding: 0.425rem 2.2rem;
127
- }
128
- .toast_width_confirm {
129
- padding: 1rem 1.5rem;
130
- }
131
- .max_width {
132
- width: 390px;
133
- overflow: hidden;
134
- }
135
- /* footer */
136
- ._footer {
137
- white-space: break-spaces;
138
- display: flex;
139
- border-top-width: 1px;
140
- border-top-style: solid;
141
-
142
- font-weight: 400;
143
- font-size: 13px;
144
- line-height: 1.2rem;
145
- padding: 0.35rem 2.2rem;
146
- }
147
- .confirm_div {
148
- font-size: 1rem;
149
- line-height: 1.5rem;
150
- display: flex;
151
- align-items: center;
152
- margin-top: 0.75rem;
153
- color: #374151;
154
- font-weight: 500;
155
- column-gap: 0.75rem;
156
- }
157
-
158
- /*
159
- this css is being used in the InnerFooter component
160
- */
161
- .innerFooter {
162
- font-size: 14px;
163
- letter-spacing: -0.4px;
164
- padding: 0.625rem 0rem;
165
- }
166
- }
167
-
168
- @media screen and (min-width: 120px) and (max-width: 480px) {
169
- .toast_width {
170
- padding: 0.425rem 1.1rem;
171
- }
172
- .toast_width_confirm {
173
- padding: 0.925rem 0.875rem;
174
- }
175
- .max_width {
176
- width: 95vw;
177
- overflow: hidden;
178
- }
179
- /* footer */
180
- ._footer {
181
- white-space: break-spaces;
182
- display: flex;
183
- border-top-width: 1px;
184
- border-top-style: solid;
185
- font-weight: 400;
186
- font-size: 13px;
187
- line-height: 1.1rem;
188
- padding: 0.325rem 0.575rem;
189
- letter-spacing: -0.5px;
190
- }
191
- .toast_message {
192
- flex-direction: row;
193
- align-items: center;
194
- gap: 0rem 0.6rem;
195
- font-size: 16px;
196
- line-height: 1.25rem;
197
- font-weight: 500;
198
- letter-spacing: -0.4px;
199
- }
200
-
201
- /* confirm toast component styles */
202
- .confirm_div {
203
- display: flex;
204
- flex-direction: column-reverse;
205
- align-items: center;
206
- margin-top: 0.75rem;
207
- color: #374151;
208
- font-weight: 500;
209
- row-gap: 0.37rem;
210
- font-size: 13.5px;
211
- line-height: 1.25rem;
212
- width: 100%;
213
- }
214
-
215
- /*
216
- this css is being used in the InnerFooter component
217
- */
218
- .innerFooter {
219
- font-size: 13.5px;
220
- letter-spacing: -0.6px;
221
- padding: 0.725rem 0rem;
222
- }
223
- }
224
-
225
- .toast_message {
226
- display: flex;
227
- position: relative;
228
- }
229
-
230
- /* Reset styles for <p> tags inside the .toast component */
231
- p {
232
- margin-block-start: 0;
233
- margin-block-end: 0;
234
- margin-inline-start: 0;
235
- margin-inline-end: 0;
236
- unicode-bidi: initial;
237
- }