ngx-snotifire 15.0.2 → 15.0.4-beta
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/package.json +2 -2
- package/styles/_shared/animations.scss +188 -0
- package/styles/_shared/icons.scss +39 -0
- package/styles/dark/buttons.scss +41 -0
- package/styles/dark/icon.scss +60 -0
- package/styles/dark/prompt.scss +134 -0
- package/styles/dark/snotify.scss +65 -0
- package/styles/dark/toast.scss +104 -0
- package/styles/dark.scss +9 -0
- package/styles/material/buttons.scss +75 -0
- package/styles/material/icon.scss +60 -0
- package/styles/material/prompt.scss +135 -0
- package/styles/material/snotify.scss +65 -0
- package/styles/material/toast.scss +232 -0
- package/styles/material.scss +8 -0
- package/styles/simple/buttons.scss +41 -0
- package/styles/simple/icon.scss +60 -0
- package/styles/simple/prompt.scss +134 -0
- package/styles/simple/snotify.scss +65 -0
- package/styles/simple/toast.scss +143 -0
- package/styles/simple.scss +8 -0
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ngx-snotifire",
|
|
3
|
-
"version": "15.0.
|
|
3
|
+
"version": "15.0.4-beta",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@angular/common": "^15.0.0",
|
|
7
7
|
"@angular/core": "^15.0.0",
|
|
8
|
-
"rxjs": "
|
|
8
|
+
"rxjs": "^7.5.0"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"tslib": "^2.3.0"
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
$animation-name: "fade";
|
|
2
|
+
|
|
3
|
+
.notifire-toast {
|
|
4
|
+
animation-fill-mode: both;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.snotify-leftTop,
|
|
8
|
+
.snotify-leftCenter,
|
|
9
|
+
.snotify-leftBottom {
|
|
10
|
+
.#{$animation-name}In {
|
|
11
|
+
animation-name: fadeInLeft;
|
|
12
|
+
}
|
|
13
|
+
.#{$animation-name}Out {
|
|
14
|
+
animation-name: fadeOutLeft;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.snotify-rightTop,
|
|
19
|
+
.snotify-rightCenter,
|
|
20
|
+
.snotify-rightBottom {
|
|
21
|
+
.#{$animation-name}In {
|
|
22
|
+
animation-name: fadeInRight;
|
|
23
|
+
}
|
|
24
|
+
.#{$animation-name}Out {
|
|
25
|
+
animation-name: fadeOutRight;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.snotify-centerTop {
|
|
30
|
+
.#{$animation-name}In {
|
|
31
|
+
animation-name: fadeInDown;
|
|
32
|
+
}
|
|
33
|
+
.#{$animation-name}Out {
|
|
34
|
+
animation-name: fadeOutUp;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
.snotify-centerCenter {
|
|
38
|
+
.#{$animation-name}In {
|
|
39
|
+
animation-name: fadeIn;
|
|
40
|
+
}
|
|
41
|
+
.#{$animation-name}Out {
|
|
42
|
+
animation-name: fadeOut;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
.snotify-centerBottom {
|
|
46
|
+
.#{$animation-name}In {
|
|
47
|
+
animation-name: fadeInUp;
|
|
48
|
+
}
|
|
49
|
+
.#{$animation-name}Out {
|
|
50
|
+
animation-name: fadeOutDown;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// Fade in
|
|
55
|
+
|
|
56
|
+
@keyframes fadeInLeft {
|
|
57
|
+
0% {
|
|
58
|
+
opacity: 0;
|
|
59
|
+
transform: translate3d(-100%, 0, 0) scaleX(1.2);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
100% {
|
|
63
|
+
opacity: 1;
|
|
64
|
+
transform: none;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
@keyframes fadeInRight {
|
|
69
|
+
0% {
|
|
70
|
+
opacity: 0;
|
|
71
|
+
transform: translate3d(100%, 0, 0) scaleX(1.2);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
100% {
|
|
75
|
+
opacity: 1;
|
|
76
|
+
transform: none;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
@keyframes fadeInUp {
|
|
81
|
+
0% {
|
|
82
|
+
opacity: 0;
|
|
83
|
+
transform: translate3d(0, 100%, 0) scaleY(1.2);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
100% {
|
|
87
|
+
opacity: 1;
|
|
88
|
+
transform: none;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
@keyframes fadeInDown {
|
|
93
|
+
0% {
|
|
94
|
+
opacity: 0;
|
|
95
|
+
transform: translate3d(0, -100%, 0) scaleY(1.2);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
100% {
|
|
99
|
+
opacity: 1;
|
|
100
|
+
transform: none;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
@keyframes fadeIn {
|
|
105
|
+
0% {
|
|
106
|
+
opacity: 0;
|
|
107
|
+
}
|
|
108
|
+
100% {
|
|
109
|
+
opacity: 1;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
// Fade out
|
|
114
|
+
|
|
115
|
+
@keyframes fadeOut {
|
|
116
|
+
0% {
|
|
117
|
+
opacity: 1;
|
|
118
|
+
}
|
|
119
|
+
100% {
|
|
120
|
+
opacity: 0;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
@keyframes fadeOutDown {
|
|
125
|
+
0% {
|
|
126
|
+
opacity: 1;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
100% {
|
|
130
|
+
opacity: 0;
|
|
131
|
+
transform: translate3d(0, 100%, 0);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
@keyframes fadeOutLeft {
|
|
136
|
+
0% {
|
|
137
|
+
opacity: 1;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
100% {
|
|
141
|
+
opacity: 0;
|
|
142
|
+
transform: translate3d(-100%, 0, 0);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
@keyframes fadeOutRight {
|
|
147
|
+
0% {
|
|
148
|
+
opacity: 1;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
100% {
|
|
152
|
+
opacity: 0;
|
|
153
|
+
transform: translate3d(100%, 0, 0);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
@keyframes fadeOutUp {
|
|
158
|
+
0% {
|
|
159
|
+
opacity: 1;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
100% {
|
|
163
|
+
opacity: 0;
|
|
164
|
+
transform: translate3d(0, -100%, 0);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
// Toast collapse
|
|
169
|
+
|
|
170
|
+
@keyframes appear {
|
|
171
|
+
0% {
|
|
172
|
+
max-height: 0;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
100% {
|
|
176
|
+
max-height: 50vh;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
@keyframes disappear {
|
|
181
|
+
0% {
|
|
182
|
+
max-height: 50vh;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
100% {
|
|
186
|
+
max-height: 0;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/// Replace `$search` with `$replace` in `$string`
|
|
2
|
+
/// @author Hugo Giraudel
|
|
3
|
+
/// @param String $string - Initial string
|
|
4
|
+
/// @param String $search - Substring to replace
|
|
5
|
+
/// @param String $replace ('') - New value
|
|
6
|
+
/// @return String - Updated string
|
|
7
|
+
@function str-replace($string, $search, $replace: "") {
|
|
8
|
+
$index: str-index($string, $search);
|
|
9
|
+
|
|
10
|
+
@if $index {
|
|
11
|
+
@return str-slice($string, 1, $index - 1) + $replace +
|
|
12
|
+
str-replace(str-slice($string, $index + str-length($search)), $search, $replace);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
@return $string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
@function -svg($svg, $color, $viewBox: "0 0 512 512") {
|
|
19
|
+
$result: 'data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" x="0px" y="0px" viewBox="#{$viewBox}" fill="#{$color}">#{$svg}</svg>';
|
|
20
|
+
$result: str-replace($result, "%", "%25");
|
|
21
|
+
$result: str-replace($result, '"', "%22");
|
|
22
|
+
$result: str-replace($result, "'", "%27");
|
|
23
|
+
$result: str-replace($result, " ", "%20");
|
|
24
|
+
$result: str-replace($result, "<", "%3C");
|
|
25
|
+
$result: str-replace($result, ">", "%3E");
|
|
26
|
+
$result: str-replace($result, "#", "%23");
|
|
27
|
+
|
|
28
|
+
@return $result;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@function -generate-icons($colors-map) {
|
|
32
|
+
@return (
|
|
33
|
+
error: -svg('<g><path d="M437,75A256,256,0,1,0,75,437,256,256,0,1,0,437,75ZM416.43,416.43a226.82,226.82,0,0,1-320.86,0C7.11,328,7.11,184,95.57,95.57a226.82,226.82,0,0,1,320.86,0C504.89,184,504.89,328,416.43,416.43Z"/><path d="M368.81,143.19a14.5,14.5,0,0,0-20.58,0L256,235.42l-92.23-92.23a14.55,14.55,0,0,0-20.58,20.58L235.42,256l-92.23,92.23a14.6,14.6,0,0,0,10.24,24.89,14.19,14.19,0,0,0,10.24-4.31l92.23-92.23,92.23,92.23a14.64,14.64,0,0,0,10.24,4.31,14,14,0,0,0,10.24-4.31,14.5,14.5,0,0,0,0-20.58l-92-92.23,92.23-92.23A14.5,14.5,0,0,0,368.81,143.19Z"/></g>', map-get($colors-map, error)),
|
|
34
|
+
warning: -svg('<g><path d="M256,512c141.15,0,256-114.84,256-256S397.15,0,256,0,0,114.84,0,256,114.85,512,256,512Zm0-480.49c123.79,0,224.49,100.71,224.49,224.49S379.79,480.49,256,480.49,31.51,379.79,31.51,256,132.21,31.51,256,31.51Z"/><circle cx="260.08" cy="343.87" r="26.35"/><path d="M254.68,278.39a15.76,15.76,0,0,0,15.75-15.75V128.72a15.75,15.75,0,1,0-31.51,0V262.63A15.76,15.76,0,0,0,254.68,278.39Z"/></g>', map-get($colors-map, warning)),
|
|
35
|
+
info: -svg('<g><path d="M256,0C114.84,0,0,114.84,0,256S114.84,512,256,512,512,397.16,512,256,397.15,0,256,0Zm0,478.43C133.35,478.43,33.57,378.64,33.57,256S133.35,33.58,256,33.58,478.42,133.36,478.42,256,378.64,478.43,256,478.43Z"/><path d="M251.26,161.24a22.39,22.39,0,1,0-22.38-22.39A22.39,22.39,0,0,0,251.26,161.24Z"/><path d="M286.84,357.87h-14v-160A16.79,16.79,0,0,0,256,181.05H225.17a16.79,16.79,0,0,0,0,33.58h14.05V357.87H225.17a16.79,16.79,0,0,0,0,33.57h61.67a16.79,16.79,0,1,0,0-33.57Z"/></g>', map-get($colors-map, info)),
|
|
36
|
+
success: -svg('<g><path d="M256,0C114.85,0,0,114.84,0,256S114.85,512,256,512,512,397.16,512,256,397.15,0,256,0Zm0,492.31c-130.29,0-236.31-106-236.31-236.31S125.71,19.69,256,19.69,492.31,125.71,492.31,256,386.29,492.31,256,492.31Z"/><path class="cls-1" d="M376.64,151,225.31,321.24l-91.17-72.93a9.85,9.85,0,0,0-12.3,15.38l98.46,78.77a9.86,9.86,0,0,0,13.52-1.15L391.36,164.08A9.85,9.85,0,0,0,376.64,151Z"/></g>', map-get($colors-map, success)),
|
|
37
|
+
async: -svg('<g><path d="M256,0a32,32,0,0,0-32,32V96a32,32,0,0,0,64,0V32A32,32,0,0,0,256,0Zm0,384a32,32,0,0,0-32,32v64a32,32,0,0,0,64,0V416A32,32,0,0,0,256,384ZM391.74,165.5,437,120.22A32,32,0,0,0,391.74,75L346.5,120.22a32,32,0,0,0,45.25,45.28Zm-271.52,181L75,391.74A32,32,0,0,0,120.22,437l45.25-45.25a32,32,0,0,0-45.25-45.25Zm0-271.52A32,32,0,1,0,75,120.22l45.25,45.28a32,32,0,1,0,45.25-45.28ZM391.74,346.5a32,32,0,0,0-45.25,45.25L391.74,437A32,32,0,0,0,437,391.74ZM480,224H416a32,32,0,0,0,0,64h64a32,32,0,0,0,0-64ZM128,256a32,32,0,0,0-32-32H32a32,32,0,0,0,0,64H96A32,32,0,0,0,128,256Z"/></g>', map-get($colors-map, async))
|
|
38
|
+
);
|
|
39
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
.notifire-toast__buttons {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-flow: row nowrap;
|
|
4
|
+
justify-content: space-between;
|
|
5
|
+
border-top: 1px solid rgba(255, 255, 255, 0.1);
|
|
6
|
+
button {
|
|
7
|
+
position: relative;
|
|
8
|
+
width: 100%;
|
|
9
|
+
border-right: 1px solid rgba(255, 255, 255, 0.1);
|
|
10
|
+
border-left: 1px solid rgba(255, 255, 255, 0.1);
|
|
11
|
+
border-top: none;
|
|
12
|
+
border-bottom: none;
|
|
13
|
+
background: transparent;
|
|
14
|
+
padding: 8px;
|
|
15
|
+
text-transform: capitalize;
|
|
16
|
+
color: #fff;
|
|
17
|
+
cursor: pointer;
|
|
18
|
+
|
|
19
|
+
&:hover,
|
|
20
|
+
&:focus {
|
|
21
|
+
background: rgba(255, 255, 255, 0.1);
|
|
22
|
+
outline: none;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&:active {
|
|
26
|
+
background: rgba(255, 255, 255, 0.15);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&:last-child {
|
|
30
|
+
border-right: none;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&:first-child {
|
|
34
|
+
border-left: none;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&--bold {
|
|
39
|
+
font-weight: 700;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
$success: #4caf50;
|
|
2
|
+
$info: #1e88e5;
|
|
3
|
+
$warning: #ff9800;
|
|
4
|
+
$error: #f44336;
|
|
5
|
+
$async: $info;
|
|
6
|
+
|
|
7
|
+
$icons: -generate-icons(
|
|
8
|
+
(
|
|
9
|
+
error: $error,
|
|
10
|
+
warning: $warning,
|
|
11
|
+
info: $info,
|
|
12
|
+
success: $success,
|
|
13
|
+
async: $async
|
|
14
|
+
)
|
|
15
|
+
);
|
|
16
|
+
|
|
17
|
+
.snotifire-icon {
|
|
18
|
+
width: 100%;
|
|
19
|
+
height: 100%;
|
|
20
|
+
position: absolute;
|
|
21
|
+
right: 10px;
|
|
22
|
+
top: 50%;
|
|
23
|
+
line-height: 0;
|
|
24
|
+
transform: translate(0, -50%);
|
|
25
|
+
max-height: 48px;
|
|
26
|
+
max-width: 48px;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.snotifire-icon--error {
|
|
30
|
+
background-image: url("#{map-get($icons, error)}");
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.snotifire-icon--warning {
|
|
34
|
+
background-image: url("#{map-get($icons, warning)}");
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.snotifire-icon--info {
|
|
38
|
+
background-image: url("#{map-get($icons, info)}");
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.snotifire-icon--success {
|
|
42
|
+
background-image: url("#{map-get($icons, success)}");
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.snotifire-icon--async {
|
|
46
|
+
background-image: url("#{map-get($icons, async)}");
|
|
47
|
+
animation: async 3s infinite linear;
|
|
48
|
+
transform-origin: 50% 50%;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
@keyframes async {
|
|
52
|
+
0% {
|
|
53
|
+
-webkit-transform: translate(0, -50%) rotate(0deg);
|
|
54
|
+
transform: translate(0, -50%) rotate(0deg);
|
|
55
|
+
}
|
|
56
|
+
100% {
|
|
57
|
+
-webkit-transform: translate(0, -50%) rotate(360deg);
|
|
58
|
+
transform: translate(0, -50%) rotate(360deg);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
.notifire-toast__input {
|
|
2
|
+
position: relative;
|
|
3
|
+
z-index: 1;
|
|
4
|
+
display: inline-block;
|
|
5
|
+
margin: 0;
|
|
6
|
+
width: 100%;
|
|
7
|
+
vertical-align: top;
|
|
8
|
+
transition: all 0.5s;
|
|
9
|
+
transition-delay: 0.3s;
|
|
10
|
+
transition-timing-function: cubic-bezier(0.2, 1, 0.3, 1);
|
|
11
|
+
|
|
12
|
+
&__field {
|
|
13
|
+
position: relative;
|
|
14
|
+
display: block;
|
|
15
|
+
float: right;
|
|
16
|
+
padding: 0.85em 0.5em;
|
|
17
|
+
width: 100%;
|
|
18
|
+
border: none;
|
|
19
|
+
border-radius: 0;
|
|
20
|
+
background: transparent;
|
|
21
|
+
color: #333;
|
|
22
|
+
font-weight: bold;
|
|
23
|
+
-webkit-appearance: none; /* for box shadows to show on iOS */
|
|
24
|
+
opacity: 0;
|
|
25
|
+
transition: opacity 0.3s;
|
|
26
|
+
|
|
27
|
+
&:focus {
|
|
28
|
+
outline: none;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&__label {
|
|
33
|
+
display: inline-block;
|
|
34
|
+
float: right;
|
|
35
|
+
padding: 0 0.85em;
|
|
36
|
+
width: 100%;
|
|
37
|
+
color: #999;
|
|
38
|
+
font-weight: bold;
|
|
39
|
+
font-size: 70.25%;
|
|
40
|
+
-webkit-font-smoothing: antialiased;
|
|
41
|
+
-moz-osx-font-smoothing: grayscale;
|
|
42
|
+
-webkit-touch-callout: none;
|
|
43
|
+
-webkit-user-select: none;
|
|
44
|
+
-khtml-user-select: none;
|
|
45
|
+
-moz-user-select: none;
|
|
46
|
+
-ms-user-select: none;
|
|
47
|
+
user-select: none;
|
|
48
|
+
position: absolute;
|
|
49
|
+
left: 0;
|
|
50
|
+
height: 100%;
|
|
51
|
+
text-align: left;
|
|
52
|
+
pointer-events: none;
|
|
53
|
+
|
|
54
|
+
&::before,
|
|
55
|
+
&::after {
|
|
56
|
+
content: "";
|
|
57
|
+
position: absolute;
|
|
58
|
+
top: 0;
|
|
59
|
+
left: 0;
|
|
60
|
+
width: 100%;
|
|
61
|
+
height: 100%;
|
|
62
|
+
transition: transform 0.3s;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
&::before {
|
|
66
|
+
border-top: 2px solid #4c4c4c;
|
|
67
|
+
transform: translate3d(0, 100%, 0) translate3d(0, -2px, 0);
|
|
68
|
+
transition-delay: 0.3s;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
&::after {
|
|
72
|
+
z-index: -1;
|
|
73
|
+
background: #eee;
|
|
74
|
+
transform: scale3d(1, 0, 1);
|
|
75
|
+
transform-origin: 50% 0;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
&__labelContent {
|
|
80
|
+
position: relative;
|
|
81
|
+
display: block;
|
|
82
|
+
padding: 1em 0;
|
|
83
|
+
width: 100%;
|
|
84
|
+
transition: transform 0.3s 0.3s;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.notifire-toast__input--filled {
|
|
89
|
+
margin-top: 2.5em;
|
|
90
|
+
|
|
91
|
+
&:focus,
|
|
92
|
+
.notifire-toast__input__field {
|
|
93
|
+
opacity: 1;
|
|
94
|
+
transition-delay: 0.3s;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.notifire-toast__input__field:focus
|
|
99
|
+
+ .notifire-toast__input__label
|
|
100
|
+
.notifire-toast__input__labelContent,
|
|
101
|
+
.notifire-toast__input--filled .notifire-toast__input__labelContent {
|
|
102
|
+
transform: translate(0, -80%);
|
|
103
|
+
transition-timing-function: cubic-bezier(0.2, 1, 0.3, 1);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.notifire-toast__input__field:focus + .notifire-toast__input__label::before,
|
|
107
|
+
.notifire-toast__input--filled .notifire-toast__input__label::before {
|
|
108
|
+
transition-delay: 0s;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.notifire-toast__input__field:focus + .notifire-toast__input__label::before,
|
|
112
|
+
.notifire-toast__input--filled .notifire-toast__input__label::before {
|
|
113
|
+
transform: translate(0, 0);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.notifire-toast__input__field:focus + .notifire-toast__input__label::after,
|
|
117
|
+
.notifire-toast__input--filled .notifire-toast__input__label::after {
|
|
118
|
+
transform: scale(1, 1);
|
|
119
|
+
transition-delay: 0.3s;
|
|
120
|
+
transition-timing-function: cubic-bezier(0.2, 1, 0.3, 1);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.notifire-toast {
|
|
124
|
+
&--invalid {
|
|
125
|
+
.notifire-toast__input__label::before {
|
|
126
|
+
border-color: $error;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
&--valid {
|
|
130
|
+
.notifire-toast__input__label::before {
|
|
131
|
+
border-color: $success;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
$backdrop-color: #000000;
|
|
2
|
+
$snotify-width: auto !default;
|
|
3
|
+
|
|
4
|
+
@if $snotify-width == auto {
|
|
5
|
+
$snotify-width: 300px;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.snotify {
|
|
9
|
+
display: block;
|
|
10
|
+
position: fixed;
|
|
11
|
+
width: $snotify-width;
|
|
12
|
+
z-index: 9999;
|
|
13
|
+
box-sizing: border-box;
|
|
14
|
+
pointer-events: none;
|
|
15
|
+
* {
|
|
16
|
+
box-sizing: border-box;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.snotify-leftTop,
|
|
21
|
+
.snotify-leftCenter,
|
|
22
|
+
.snotify-leftBottom {
|
|
23
|
+
left: 10px;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.snotify-rightTop,
|
|
27
|
+
.snotify-rightCenter,
|
|
28
|
+
.snotify-rightBottom {
|
|
29
|
+
right: 10px;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.snotify-centerTop,
|
|
33
|
+
.snotify-centerCenter,
|
|
34
|
+
.snotify-centerBottom {
|
|
35
|
+
left: calc(50% - #{$snotify-width} / 2);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.snotify-leftTop,
|
|
39
|
+
.snotify-centerTop,
|
|
40
|
+
.snotify-rightTop {
|
|
41
|
+
top: 10px;
|
|
42
|
+
}
|
|
43
|
+
.snotify-leftCenter,
|
|
44
|
+
.snotify-rightCenter,
|
|
45
|
+
.snotify-centerCenter {
|
|
46
|
+
top: 50%;
|
|
47
|
+
transform: translateY(-50%);
|
|
48
|
+
}
|
|
49
|
+
.snotify-leftBottom,
|
|
50
|
+
.snotify-rightBottom,
|
|
51
|
+
.snotify-centerBottom {
|
|
52
|
+
bottom: 10px;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.snotifire-backdrop{
|
|
56
|
+
position: fixed;
|
|
57
|
+
top: 0;
|
|
58
|
+
right: 0;
|
|
59
|
+
bottom: 0;
|
|
60
|
+
left: 0;
|
|
61
|
+
background-color: $backdrop-color;
|
|
62
|
+
opacity: 0;
|
|
63
|
+
z-index: 9998;
|
|
64
|
+
transition: opacity 0.3s;
|
|
65
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
$toast-bg: rgba(0, 0, 0, 0.9);
|
|
2
|
+
$toast-color: #fff;
|
|
3
|
+
$toast-progressBar: #000;
|
|
4
|
+
$toast-progressBarPercentage: #4c4c4c;
|
|
5
|
+
|
|
6
|
+
$snotify-title-font-size: auto !default;
|
|
7
|
+
$snotify-body-font-size: auto !default;
|
|
8
|
+
|
|
9
|
+
@if $snotify-title-font-size == auto {
|
|
10
|
+
$snotify-title-font-size: 1.8em;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
@if $snotify-body-font-size == auto {
|
|
14
|
+
$snotify-body-font-size: 1em;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.notifire-toast {
|
|
18
|
+
display: block;
|
|
19
|
+
cursor: pointer;
|
|
20
|
+
background-color: $toast-bg;
|
|
21
|
+
max-height: 300px;
|
|
22
|
+
height: 100%;
|
|
23
|
+
margin: 5px;
|
|
24
|
+
opacity: 0;
|
|
25
|
+
overflow: hidden;
|
|
26
|
+
pointer-events: auto;
|
|
27
|
+
|
|
28
|
+
&--in {
|
|
29
|
+
animation-name: appear;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&--out {
|
|
33
|
+
animation-name: disappear;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&__inner {
|
|
37
|
+
display: flex;
|
|
38
|
+
flex-flow: column nowrap;
|
|
39
|
+
align-items: flex-start;
|
|
40
|
+
justify-content: center;
|
|
41
|
+
position: relative;
|
|
42
|
+
padding: 5px 65px 5px 15px;
|
|
43
|
+
min-height: 78px;
|
|
44
|
+
font-size: 16px;
|
|
45
|
+
color: $toast-color;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
&__progressBar {
|
|
49
|
+
position: relative;
|
|
50
|
+
width: 100%;
|
|
51
|
+
height: 5px;
|
|
52
|
+
background-color: $toast-progressBar;
|
|
53
|
+
|
|
54
|
+
&__percentage {
|
|
55
|
+
position: absolute;
|
|
56
|
+
top: 0;
|
|
57
|
+
left: 0;
|
|
58
|
+
height: 5px;
|
|
59
|
+
background-color: $toast-progressBarPercentage;
|
|
60
|
+
max-width: 100%;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
&__title {
|
|
65
|
+
font-size: $snotify-title-font-size;
|
|
66
|
+
line-height: 1.2em;
|
|
67
|
+
margin-bottom: 5px;
|
|
68
|
+
color: $toast-color;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
&__body {
|
|
72
|
+
font-size: $snotify-body-font-size;
|
|
73
|
+
color: $toast-color;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.notifire-toast-show {
|
|
78
|
+
transform: translate(0, 0);
|
|
79
|
+
opacity: 1;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.notifire-toast-remove {
|
|
83
|
+
max-height: 0;
|
|
84
|
+
overflow: hidden;
|
|
85
|
+
transform: translate(0, 50%);
|
|
86
|
+
opacity: 0;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/***************
|
|
90
|
+
** Modifiers **
|
|
91
|
+
**************/
|
|
92
|
+
|
|
93
|
+
.snotify-prompt {
|
|
94
|
+
ngx-snotify-prompt {
|
|
95
|
+
width: 100%;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.snotify-confirm,
|
|
100
|
+
.snotify-prompt {
|
|
101
|
+
.notifire-toast__inner {
|
|
102
|
+
padding: 10px 15px;
|
|
103
|
+
}
|
|
104
|
+
}
|