ngx-snotifire 15.0.3 → 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.
@@ -0,0 +1,75 @@
1
+ .notifire-toast__buttons {
2
+ display: flex;
3
+ flex-flow: row nowrap;
4
+ justify-content: space-between;
5
+ border-top: 1px solid rgba(0, 0, 0, 0.1);
6
+ button {
7
+ position: relative;
8
+ width: 100%;
9
+ border-right: 1px solid rgba(0, 0, 0, 0.1);
10
+ border-left: 1px solid rgba(0, 0, 0, 0.1);
11
+ border-top: none;
12
+ border-bottom: none;
13
+ background: transparent;
14
+ padding: 8px;
15
+ text-transform: capitalize;
16
+ color: #fff;
17
+ box-sizing: border-box;
18
+ overflow: hidden;
19
+ cursor: pointer;
20
+ &::after {
21
+ content: "";
22
+ position: absolute;
23
+ top: 50%;
24
+ left: 50%;
25
+ width: 5px;
26
+ height: 5px;
27
+ background: rgba(255, 255, 255, 0.3);
28
+ opacity: 0;
29
+ border-radius: 100%;
30
+ transform: scale(1, 1) translate(-50%);
31
+ transform-origin: 50% 50%;
32
+ }
33
+
34
+ &:focus:not(:active)::after {
35
+ animation: ripple 1s ease-out;
36
+ }
37
+
38
+ &:hover,
39
+ &:focus {
40
+ background: rgba(0, 0, 0, 0.1);
41
+ outline: none;
42
+ }
43
+
44
+ &:active {
45
+ background: rgba(0, 0, 0, 0.15);
46
+ }
47
+
48
+ &:last-child {
49
+ border-right: none;
50
+ }
51
+
52
+ &:first-child {
53
+ border-left: none;
54
+ }
55
+ }
56
+
57
+ &--bold {
58
+ font-weight: 700;
59
+ }
60
+ }
61
+
62
+ @keyframes ripple {
63
+ 0% {
64
+ transform: scale(0, 0);
65
+ opacity: 1;
66
+ }
67
+ 20% {
68
+ transform: scale(25, 25);
69
+ opacity: 1;
70
+ }
71
+ 100% {
72
+ opacity: 0;
73
+ transform: scale(40, 40);
74
+ }
75
+ }
@@ -0,0 +1,60 @@
1
+ $success: #c8e6c9;
2
+ $info: #bbdefb;
3
+ $warning: #ffccbc;
4
+ $error: #ffcdd2;
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,135 @@
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: #e0f2f1;
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 #fff;
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: #b2dfdb;
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-bg;
127
+ }
128
+ }
129
+
130
+ &--valid {
131
+ .notifire-toast__input__label::before {
132
+ border-color: $success-bg;
133
+ }
134
+ }
135
+ }
@@ -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,232 @@
1
+ $simple-bg: #fff;
2
+ $simple-color: #000;
3
+ $simple-progressBar: #c7c7c7;
4
+ $simple-progressBarPercentage: #4c4c4c;
5
+
6
+ $success-bg: #4caf50;
7
+ $success-color: #c8e6c9;
8
+ $success-progressBar: #388e3c;
9
+ $success-progressBarPercentage: #81c784;
10
+
11
+ $info-bg: #1e88e5;
12
+ $info-color: #e3f2fd;
13
+ $info-progressBar: #1565c0;
14
+ $info-progressBarPercentage: #64b5f6;
15
+
16
+ $warning-bg: #ff9800;
17
+ $warning-color: #fff3e0;
18
+ $warning-progressBar: #ef6c00;
19
+ $warning-progressBarPercentage: #ffcc80;
20
+
21
+ $error-bg: #f44336;
22
+ $error-color: #ffebee;
23
+ $error-progressBar: #c62828;
24
+ $error-progressBarPercentage: #ef9a9a;
25
+
26
+ $async-bg: $info-bg;
27
+ $async-color: $info-color;
28
+ $async-progressBar: $info-progressBar;
29
+ $async-progressBarPercentage: $info-progressBarPercentage;
30
+
31
+ $confirm-bg: #009688;
32
+ $confirm-color: #e0f2f1;
33
+ $confirm-progressBar: #4db6ac;
34
+ $confirm-progressBarPercentage: #80cbc4;
35
+
36
+ $prompt-bg: #009688;
37
+ $prompt-color: #e0f2f1;
38
+
39
+ $snotify-title-font-size: auto !default;
40
+ $snotify-body-font-size: auto !default;
41
+
42
+ @if $snotify-title-font-size == auto {
43
+ $snotify-title-font-size: 1.8em;
44
+ }
45
+
46
+ @if $snotify-body-font-size == auto {
47
+ $snotify-body-font-size: 1em;
48
+ }
49
+
50
+ .notifire-toast {
51
+ display: block;
52
+ cursor: pointer;
53
+ background-color: $simple-bg;
54
+ height: 100%;
55
+ margin: 5px;
56
+ opacity: 0;
57
+ border-radius: 5px;
58
+ overflow: hidden;
59
+ pointer-events: auto;
60
+
61
+ &--in {
62
+ animation-name: appear;
63
+ }
64
+
65
+ &--out {
66
+ animation-name: disappear;
67
+ }
68
+
69
+ &__inner {
70
+ display: flex;
71
+ flex-flow: column nowrap;
72
+ align-items: flex-start;
73
+ justify-content: center;
74
+ position: relative;
75
+ padding: 5px 65px 5px 15px;
76
+ min-height: 78px;
77
+ font-size: 16px;
78
+ color: $simple-color;
79
+ }
80
+
81
+ &__progressBar {
82
+ position: relative;
83
+ width: 100%;
84
+ height: 10px;
85
+ background-color: $simple-progressBar;
86
+
87
+ &__percentage {
88
+ position: absolute;
89
+ top: 0;
90
+ left: 0;
91
+ height: 10px;
92
+ background-color: $simple-progressBarPercentage;
93
+ max-width: 100%;
94
+ }
95
+ }
96
+
97
+ &__title {
98
+ font-size: $snotify-title-font-size;
99
+ line-height: 1.2em;
100
+ margin-bottom: 5px;
101
+ color: #fff;
102
+ }
103
+
104
+ &__body {
105
+ font-size: $snotify-body-font-size;
106
+ }
107
+ }
108
+
109
+ .notifire-toast-show {
110
+ transform: translate(0, 0);
111
+ opacity: 1;
112
+ }
113
+
114
+ .notifire-toast-remove {
115
+ max-height: 0;
116
+ overflow: hidden;
117
+ transform: translate(0, 50%);
118
+ opacity: 0;
119
+ }
120
+
121
+ .fadeOutRight {
122
+ animation-name: fadeOutRight;
123
+ }
124
+
125
+ /***************
126
+ ** Modifiers **
127
+ **************/
128
+
129
+ .snotify-simple {
130
+ .notifire-toast__title,
131
+ .notifire-toast__body {
132
+ color: $simple-color;
133
+ }
134
+ }
135
+
136
+ .snotify-success {
137
+ background-color: $success-bg;
138
+ .notifire-toast__progressBar {
139
+ background-color: $success-progressBar;
140
+ }
141
+ .notifire-toast__progressBar__percentage {
142
+ background-color: $success-progressBarPercentage;
143
+ }
144
+ .notifire-toast__body {
145
+ color: $success-color;
146
+ }
147
+ }
148
+
149
+ .snotify-info {
150
+ background-color: $info-bg;
151
+ .notifire-toast__progressBar {
152
+ background-color: $info-progressBar;
153
+ }
154
+ .notifire-toast__progressBar__percentage {
155
+ background-color: $info-progressBarPercentage;
156
+ }
157
+ .notifire-toast__body {
158
+ color: $info-color;
159
+ }
160
+ }
161
+
162
+ .snotify-warning {
163
+ background-color: $warning-bg;
164
+ .notifire-toast__progressBar {
165
+ background-color: $warning-progressBar;
166
+ }
167
+ .notifire-toast__progressBar__percentage {
168
+ background-color: $warning-progressBarPercentage;
169
+ }
170
+ .notifire-toast__body {
171
+ color: $warning-color;
172
+ }
173
+ }
174
+
175
+ .snotify-error {
176
+ background-color: $error-bg;
177
+ .notifire-toast__progressBar {
178
+ background-color: $error-progressBar;
179
+ }
180
+ .notifire-toast__progressBar__percentage {
181
+ background-color: $error-progressBarPercentage;
182
+ }
183
+ .notifire-toast__body {
184
+ color: $error-color;
185
+ }
186
+ }
187
+
188
+ .snotify-async {
189
+ background-color: $async-bg;
190
+ .notifire-toast__progressBar {
191
+ background-color: $async-progressBar;
192
+ }
193
+ .notifire-toast__progressBar__percentage {
194
+ background-color: $async-progressBarPercentage;
195
+ }
196
+ .notifire-toast__body {
197
+ color: $async-color;
198
+ }
199
+ }
200
+
201
+ .snotify-confirm {
202
+ background-color: $confirm-bg;
203
+ .notifire-toast__progressBar {
204
+ background-color: $confirm-progressBar;
205
+ }
206
+ .notifire-toast__progressBar__percentage {
207
+ background-color: $confirm-progressBarPercentage;
208
+ }
209
+ .notifire-toast__body {
210
+ color: $confirm-color;
211
+ }
212
+ }
213
+
214
+ .snotify-prompt {
215
+ background-color: $prompt-bg;
216
+ ngx-snotify-prompt {
217
+ width: 100%;
218
+ }
219
+ .notifire-toast__title {
220
+ margin-bottom: 0;
221
+ }
222
+ .notifire-toast__body {
223
+ color: $prompt-color;
224
+ }
225
+ }
226
+
227
+ .snotify-confirm,
228
+ .snotify-prompt {
229
+ .notifire-toast__inner {
230
+ padding: 10px 15px;
231
+ }
232
+ }
@@ -0,0 +1,8 @@
1
+ @import "_shared/icons";
2
+ @import "_shared/animations";
3
+
4
+ @import "material/snotify";
5
+ @import "material/toast";
6
+ @import "material/prompt";
7
+ @import "material/buttons";
8
+ @import "material/icon";
@@ -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(0, 0, 0, 0.1);
6
+ button {
7
+ position: relative;
8
+ width: 100%;
9
+ border-right: 1px solid rgba(0, 0, 0, 0.1);
10
+ border-left: 1px solid rgba(0, 0, 0, 0.1);
11
+ border-top: none;
12
+ border-bottom: none;
13
+ background: transparent;
14
+ padding: 8px;
15
+ text-transform: capitalize;
16
+ color: #000;
17
+ cursor: pointer;
18
+
19
+ &:hover,
20
+ &:focus {
21
+ background: rgba(0, 0, 0, 0.1);
22
+ outline: none;
23
+ }
24
+
25
+ &:active {
26
+ background: rgba(0, 0, 0, 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: $success-border-color;
2
+ $info: $info-border-color;
3
+ $warning: $warning-border-color;
4
+ $error: $error-border-color;
5
+ $async: $async-border-color;
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
+ }