@textback/notification-widget 2.0.0 → 2.0.1-102913

Sign up to get free protection for your applications and to get access to all the features.
Files changed (109) hide show
  1. package/.eslintrc.js +291 -291
  2. package/build/index.js +12 -0
  3. package/build/sdk.js +9 -0
  4. package/package.json +70 -68
  5. package/promote_tag.sh +1 -1
  6. package/readme.md +569 -490
  7. package/server.js +8 -4
  8. package/src/libraries/ai.1.0.11.js +4088 -4088
  9. package/src/libraries/localization/locales/cs.js +14 -12
  10. package/src/libraries/localization/locales/en.js +14 -12
  11. package/src/libraries/localization/locales/index.js +8 -8
  12. package/src/libraries/localization/locales/pl.js +14 -12
  13. package/src/libraries/localization/locales/ro.js +14 -12
  14. package/src/libraries/localization/locales/ru.js +13 -12
  15. package/src/libraries/localization/locales/uk.js +14 -12
  16. package/src/libraries/localization/text.js +9 -9
  17. package/src/libraries/t.js +82 -82
  18. package/src/sdk/channels/channel.js +30 -30
  19. package/src/sdk/channels/facebook.js +13 -13
  20. package/src/sdk/channels/factory.js +3 -3
  21. package/src/sdk/channels/skype.js +12 -12
  22. package/src/sdk/channels/telegram.js +18 -18
  23. package/src/sdk/channels/viber.js +12 -12
  24. package/src/sdk/channels/vk-modal/vk-modal.html +17 -17
  25. package/src/sdk/channels/vk-modal/vk-modal.js +25 -25
  26. package/src/sdk/channels/vk-modal/vk-modal.scss +116 -116
  27. package/src/sdk/channels/vk.js +195 -184
  28. package/src/sdk/channels/whatsapp.js +16 -10
  29. package/src/sdk/channels/whatsappb.js +27 -0
  30. package/src/sdk/events/observer.js +46 -46
  31. package/src/sdk/index.js +5 -5
  32. package/src/sdk/sdk.js +67 -30
  33. package/src/sdk/utils/apiErrorHandler.js +11 -11
  34. package/src/sdk/utils/appInsights.js +88 -88
  35. package/src/sdk/utils/browserInfo.js +8 -8
  36. package/src/sdk/utils/constants.js +17 -17
  37. package/src/sdk/utils/cookies.js +67 -50
  38. package/src/sdk/utils/find.js +7 -7
  39. package/src/sdk/utils/loadConfig.js +20 -20
  40. package/src/sdk/utils/loadDeepLink.js +48 -21
  41. package/src/sdk/utils/loadScript.js +25 -25
  42. package/src/sdk/utils/loadSubscriptions.js +6 -6
  43. package/src/sdk/utils/parseQueryString.js +33 -33
  44. package/src/sdk/utils/windowHelper.js +25 -25
  45. package/src/sdk/widget/widget.js +192 -140
  46. package/src/widget/components/index.js +6 -2
  47. package/src/widget/components/tb-notification-button/facebook.js +9 -2
  48. package/src/widget/components/tb-notification-button/index.js +34 -34
  49. package/src/widget/components/tb-notification-button/styles.scss +657 -433
  50. package/src/widget/components/tb-notification-button/telegram.js +9 -2
  51. package/src/widget/components/tb-notification-button/viber.js +9 -2
  52. package/src/widget/components/tb-notification-button/vk.js +59 -50
  53. package/src/widget/components/tb-notification-button/whatsapp.js +15 -8
  54. package/src/widget/components/tb-notification-button/whatsappb.js +58 -0
  55. package/src/widget/components/tb-notification-widget/index.js +589 -384
  56. package/src/widget/components/tb-notification-widget/normalize.scss +395 -394
  57. package/src/widget/components/tb-notification-widget/styles.scss +502 -139
  58. package/src/widget/components/tb-nw-wahunter/index.js +259 -0
  59. package/src/widget/components/tb-nw-wahunter/styles.scss +471 -0
  60. package/src/widget/config.js +5 -5
  61. package/src/widget/icons/icon_chat_window.svg +1 -0
  62. package/src/widget/icons/icon_close.svg +1 -0
  63. package/src/widget/icons/icon_facebook.svg +7 -7
  64. package/src/widget/icons/icon_facebook_circle.svg +7 -9
  65. package/src/widget/icons/icon_instagram_circle.svg +95 -95
  66. package/src/widget/icons/icon_skype.svg +44 -44
  67. package/src/widget/icons/icon_skype_circle.svg +46 -46
  68. package/src/widget/icons/icon_skype_new.svg +113 -113
  69. package/src/widget/icons/icon_tg.svg +25 -25
  70. package/src/widget/icons/icon_tg_circle.svg +17 -27
  71. package/src/widget/icons/icon_viber.svg +75 -75
  72. package/src/widget/icons/icon_viber_circle.svg +67 -77
  73. package/src/widget/icons/icon_viber_new.svg +102 -102
  74. package/src/widget/icons/icon_vk.svg +14 -14
  75. package/src/widget/icons/icon_vk_circle.svg +16 -16
  76. package/src/widget/icons/icon_whatsapp.svg +147 -147
  77. package/src/widget/icons/icon_whatsapp_circle.svg +3 -3
  78. package/src/widget/icons/icon_whatsapp_hollow.svg +128 -0
  79. package/src/widget/icons/icon_whatsapp_new.svg +127 -127
  80. package/src/widget/icons/icon_whatsappb.svg +147 -0
  81. package/src/widget/icons/icon_whatsappb_circle.svg +4 -0
  82. package/src/widget/icons/icon_whatsappb_new.svg +127 -0
  83. package/src/widget/icons/paper-plane-arrow.svg +3 -0
  84. package/src/widget/icons/tb-logo.svg +21 -0
  85. package/src/widget/index.js +28 -28
  86. package/src/widget/locales/cs.js +42 -0
  87. package/src/widget/locales/en.js +42 -20
  88. package/src/widget/locales/index.js +2 -2
  89. package/src/widget/locales/pl.js +41 -19
  90. package/src/widget/locales/ro.js +41 -20
  91. package/src/widget/locales/ru.js +40 -19
  92. package/src/widget/locales/uk.js +40 -19
  93. package/src/widget/utils/cookiesEx.js +41 -41
  94. package/src/widget/utils/getLocale.js +4 -2
  95. package/src/widget/utils/stringifyAttributes.js +19 -19
  96. package/src/widget/utils/text.js +2 -1
  97. package/src/widget/utils/widgetsStorage.js +28 -28
  98. package/src/widget/widget.entry.js +3 -4
  99. package/tests/gf.html +35 -35
  100. package/tests/gf.js +21 -21
  101. package/tests/index.js +61 -61
  102. package/views/examples.ejs +7 -3
  103. package/views/sdk.html +274 -256
  104. package/webpack.common.js +72 -72
  105. package/webpack.dev.js +15 -15
  106. package/webpack.prod.js +10 -10
  107. package/src/widget/components/tb-notification-button/skype.js +0 -47
  108. package/src/widget/icons/text-back-badge.png +0 -0
  109. package/src/widget/locales/cz.js +0 -20
@@ -1,433 +1,657 @@
1
- $color-fb: #3b5998;
2
- $color-vk: #45668e;
3
- $color-tg: #1E96C8;
4
- $color-skype: #00aff0;
5
- $color-viber: #59267c;
6
- $color-whatsapp: #189d0e;
7
-
8
- @mixin shadow-on-hover() {
9
- transition: box-shadow 0.4s;
10
-
11
- &:hover {
12
- box-shadow: 0 2px 4px 1px rgba(0, 0, 0, 0.4);
13
- }
14
- }
15
-
16
- @mixin set-channel-button-brand-color($color) {
17
- .tb-notification-button__inner > a {
18
- background-color: $color;
19
- }
20
-
21
- tb-notification-button__icon > svg path {
22
- fill: $color;
23
- }
24
- }
25
-
26
-
27
- tb-notification-widget {
28
- #tb-notification-widget-inner.tb-notification-widget-inner {
29
- tb-notification-button a {
30
- cursor: pointer !important;
31
- }
32
-
33
- .tb-notification-button__tip {
34
- position: absolute;
35
- font-size: 10px;
36
- text-align: center;
37
- margin-top: 19px;
38
- left: 0;
39
- width: 100%;
40
- color: #6f7b8a;
41
- }
42
-
43
- .tb-btn-align-center {
44
- text-align: center;
45
- }
46
-
47
- .tb-btn-align-left {
48
- text-align: left;
49
- }
50
-
51
- .tb-btn-align-right {
52
- text-align: right;
53
- }
54
- }
55
-
56
- /* new design */
57
-
58
- #tb-notification-widget-inner.tb-notification-widget-inner .tb-widget-buttons.tb-btn-style-square {
59
- /* inline & popup */
60
- tb-notification-button {
61
- display: block;
62
- width: 100%;
63
- margin: 0px 0px 20px;
64
- padding: 0px;
65
- background-color: transparent;
66
-
67
-
68
-
69
- &[channel="skype"] {
70
- @include set-channel-button-brand-color($color-skype);
71
- }
72
-
73
- &[channel="facebook"] {
74
- @include set-channel-button-brand-color($color-fb);
75
- }
76
-
77
- &[channel="vk"] {
78
- @include set-channel-button-brand-color($color-vk);
79
-
80
- .tb-notification-button__inner > div {
81
- @include shadow-on-hover();
82
- }
83
- }
84
-
85
- &[authorized="true"] tb-notification-button__text[for="login"], &[authorized="false"] tb-notification-button__text[for="subscribe"] {
86
- display: none;
87
- }
88
-
89
- &[channel="viber"] {
90
- // @include set-channel-button-brand-color($color-viber);
91
- .tb-notification-button__inner > a {
92
- background-color: $color-viber;
93
- }
94
- }
95
-
96
- &[channel="tg"] {
97
- @include set-channel-button-brand-color($color-tg);
98
- }
99
-
100
- &[channel="whatsapp"] {
101
- .tb-notification-button__inner > a {
102
- background-color: $color-whatsapp;
103
- }
104
- }
105
-
106
- &[loading] {
107
- color: transparent;
108
- &:after {
109
- content: "";
110
- border-radius: 100%;
111
- border: 3px solid #fff;
112
- border-bottom-color: transparent;
113
- position: absolute;
114
- top: 50%;
115
- left: 50%;
116
- width: 16px;
117
- height: 16px;
118
- margin: -11px 0 0 -11px;
119
- animation-name: spin;
120
- animation-duration: 1000ms;
121
- animation-iteration-count: infinite;
122
- }
123
- }
124
-
125
-
126
-
127
- .tb-notification-button__inner {
128
- position: relative;
129
- display: inline-block;
130
- box-sizing: border-box;
131
- width: 219px;
132
- padding-left: 35px;
133
- float: initial;
134
-
135
- > a {
136
- all: initial;
137
- display: block;
138
- box-sizing: content-box;
139
- border-radius: 2px;
140
- cursor: pointer;
141
- color: #fff;
142
- position: relative;
143
- font-size: 12px;
144
- font-family: Arial,Helvetica,sans-serif;
145
- padding: 0px;
146
- line-height: 29px;
147
- height: 30px;
148
- text-align: center;
149
- text-decoration: none !important;
150
- &:hover {
151
- color: #fff;
152
- }
153
-
154
- @include shadow-on-hover();
155
- }
156
-
157
- tb-notification-button__text {
158
- display: inline-block;
159
- vertical-align: middle;
160
- }
161
-
162
- tb-notification-button__icon {
163
- position: absolute;
164
- top: 0px;
165
- left: 0px;
166
- width: 30px;
167
- height: 30px;
168
- margin: 0px;
169
- > svg {
170
- width: 100%;
171
- height: 100%;
172
- }
173
- }
174
-
175
- }
176
- }
177
- }
178
-
179
- /* old design */
180
- #tb-notification-widget-inner.tb-notification-widget-inner .tb-widget-buttons.tb-btn-style-rounded {
181
-
182
- /* inline */
183
- tb-notification-button {
184
- @include shadow-on-hover();
185
-
186
- box-sizing: content-box;
187
- padding: 10px 20px;
188
- border-radius: 25px;
189
- cursor: pointer;
190
- background-color: #2979FF;
191
- color: #fff;
192
- display: inline-block;
193
- margin: 0 13px 45px 0;
194
- position: relative;
195
-
196
- &[channel="skype"] {
197
- background-color: $color-skype;
198
- }
199
- &[channel="facebook"] {
200
- background-color: $color-fb;
201
- }
202
- &[channel="vk"] {
203
- background-color: $color-vk;
204
- }
205
- &[authorized="true"] tb-notification-button__text[for="login"], &[authorized="false"] tb-notification-button__text[for="subscribe"] {
206
- display: none;
207
- }
208
- &[channel="viber"] {
209
- background-color: $color-viber;
210
- }
211
- &[channel="tg"] {
212
- background-color: $color-tg;
213
- }
214
- &[channel="whatsapp"] {
215
- background-color: $color-whatsapp;
216
- }
217
- &[loading] {
218
- color: transparent;
219
- &:after {
220
- content: "";
221
- border-radius: 100%;
222
- border: 3px solid #fff;
223
- border-bottom-color: transparent;
224
- position: absolute;
225
- top: 50%;
226
- left: 50%;
227
- width: 16px;
228
- height: 16px;
229
- margin: -11px 0 0 -11px;
230
- animation-name: spin;
231
- animation-duration: 1000ms;
232
- animation-iteration-count: infinite;
233
- }
234
- }
235
- > a {
236
- all: initial;
237
- display: block;
238
- text-decoration: none;
239
- color: #fff;
240
- font-family: inherit;
241
- //font-size: 17px;
242
- margin: -10px -20px;
243
- //padding: 10px 20px;
244
- text-decoration: none !important;
245
-
246
- padding: 6px 30px 8px;
247
- min-width: 110px;
248
- text-align: center;
249
- font-size: 15px;
250
-
251
- &:hover {
252
- color: #fff;
253
- }
254
- }
255
- }
256
-
257
- tb-notification-button__text {
258
- display: inline-block;
259
- vertical-align: middle;
260
- }
261
-
262
- tb-notification-button__icon {
263
- display: inline-block;
264
- vertical-align: middle;
265
- //width: 40px;
266
- //height: 40px;
267
- width: 30px;
268
- height: 30px;
269
- margin: -10px 0 -10px -15px;
270
- > svg {
271
- width: 100%;
272
- height: 100%;
273
- }
274
- }
275
- }
276
-
277
- &.tb-no-api-call #tb-notification-widget-inner.tb-notification-widget-inner .tb-widget-buttons.tb-btn-style-rounded tb-notification-button {
278
- margin-bottom: 13px;
279
- }
280
-
281
- /* popup */
282
- #tb-notification-widget-inner.tb-notification-widget-inner tb-notification-widget-overlay .tb-widget-buttons.tb-btn-style-rounded {
283
- tb-notification-button {
284
- display: inline-block;
285
- width: 120px;
286
- height: 24px;
287
- padding: 0px;
288
- margin: 0px 0px 18px 0px;
289
-
290
- > a {
291
- position: relative;
292
- text-align: center;
293
- font-size: 12px;
294
- padding: 5px 20px;
295
- margin: 0px;
296
- }
297
- }
298
- tb-notification-button__icon {
299
- display: block;
300
- position: absolute;
301
- left: 8px;
302
- top: 2px;
303
- width: 20px;
304
- height: 20px;
305
- margin: 0px;
306
- padding: 0px;
307
- }
308
- tb-notification-button__text {
309
- vertical-align: baseline;
310
- width: 60px;
311
- text-align: center;
312
- color: #fff;
313
- }
314
- }
315
-
316
-
317
-
318
-
319
- /* circle icons design */
320
- #tb-notification-widget-inner.tb-notification-widget-inner .tb-widget-buttons.tb-btn-style-icons {
321
-
322
- /* inline */
323
- tb-notification-button {
324
- display: inline-block;
325
- position: relative;
326
- margin: 0px 13px 13px 0px;
327
-
328
- &:hover {
329
- cursor: pointer;
330
- }
331
-
332
- &[loading] {
333
- color: transparent;
334
- &:after {
335
- content: "";
336
- border-radius: 100%;
337
- border: 3px solid #fff;
338
- border-bottom-color: transparent;
339
- position: absolute;
340
- top: 50%;
341
- left: 50%;
342
- width: 16px;
343
- height: 16px;
344
- margin: -11px 0 0 -11px;
345
- animation-name: spin;
346
- animation-duration: 1000ms;
347
- animation-iteration-count: infinite;
348
- }
349
- }
350
- > a {
351
- all: initial;
352
- display: block;
353
- text-decoration: none;
354
- font-family: inherit;
355
- text-decoration: none !important;
356
-
357
- min-width: 80px;
358
- text-align: center;
359
- font-size: 13px;
360
- color: #333;
361
-
362
- &:hover {
363
- cursor: pointer;
364
- }
365
- }
366
- }
367
-
368
- tb-notification-button__text {
369
- display: block;
370
- margin-top: 4px;
371
- }
372
-
373
- tb-notification-button__icon {
374
- display: block;
375
- width: 50px;
376
- height: 50px;
377
- margin: 0px auto;
378
- > svg {
379
- width: 100%;
380
- height: 100%;
381
- }
382
- }
383
- }
384
-
385
- /*styles for non mobile*/
386
- @media only screen and (min-device-width: 736px) {
387
-
388
- /* new design */
389
-
390
- #tb-notification-widget-inner.tb-notification-widget-inner .tb-widget-buttons.tb-btn-style-square {
391
- tb-notification-button {
392
- .tb-notification-button__inner {
393
- padding-left: 55px;
394
- width: 239px;
395
-
396
- tb-notification-button__icon {
397
- top: -5px;
398
- left: 0px;
399
- width: 40px;
400
- height: 40px;
401
- }
402
- }
403
- }
404
- }
405
-
406
- /* old design*/
407
-
408
- #tb-notification-widget-inner.tb-notification-widget-inner tb-notification-widget-overlay .tb-widget-buttons.tb-btn-style-rounded {
409
- tb-notification-button {
410
- margin: 0px 19px 24px 0px;
411
- width: 206px;
412
- height: 50px;
413
-
414
- > a {
415
- padding: 10px 20px;
416
- font-size: 20px;
417
- }
418
- }
419
-
420
- tb-notification-button__icon {
421
- width: 40px;
422
- height: 40px;
423
- left: 15px;
424
- top: 5px;
425
- }
426
-
427
- tb-notification-button__text {
428
- width: 100px;
429
- line-height: 30px;
430
- }
431
- }
432
- }
433
- }
1
+ $color-fb: #3b5998;
2
+ $color-fb-gradient: #6077a6;
3
+
4
+ $color-vk: #4a76a8;
5
+ $color-vk-gradient: #0f65c6;
6
+
7
+ $color-tg: #61A8DE;
8
+ $color-tg-gradient:#408AC2;
9
+
10
+ $color-skype: #00aff0;
11
+ $color-skype-gradient:#00d0e7;
12
+
13
+ $color-viber: #574e92;
14
+ $color-viber-gradient:#655bab;
15
+
16
+ $color-whatsapp: #25D366;
17
+ $color-whatsappb: #25D366;
18
+ $color-whatsapp-gradient:#2fc368;
19
+
20
+ @mixin shadow-on-hover() {
21
+ transition: box-shadow 0.4s;
22
+
23
+ &:hover {
24
+ box-shadow: 0 2px 4px 1px rgba(0, 0, 0, 0.4);
25
+ }
26
+ }
27
+
28
+ @mixin shadow-on-hover-gradient() {
29
+ transition: box-shadow 0.4s;
30
+
31
+ &:hover {
32
+ box-shadow:inset 0 0 3px 3px rgba(0, 0, 0, 0.4);
33
+ }
34
+ }
35
+
36
+ @mixin set-channel-button-brand-color($color) {
37
+ .tb-notification-button__inner > a {
38
+ background-color: $color;
39
+ }
40
+
41
+ tb-notification-button__icon > svg path {
42
+ fill: $color;
43
+ }
44
+ }
45
+
46
+ @mixin set-channel-button-brand-linear-gradient-color($color, $color-gradient) {
47
+ background: linear-gradient(309.02deg, $color -6.45%, $color-gradient 111.08%);
48
+ }
49
+
50
+ tb-notification-widget {
51
+ #tb-notification-widget-inner.tb-notification-widget-inner {
52
+ tb-notification-button a {
53
+ cursor: pointer !important;
54
+ }
55
+
56
+ .tb-notification-button__tip {
57
+ position: absolute;
58
+ font-size: 10px;
59
+ text-align: center;
60
+ margin-top: 19px;
61
+ left: 0;
62
+ width: 100%;
63
+ color: #6f7b8a;
64
+ }
65
+
66
+ .tb-btn-align-center {
67
+ text-align: center;
68
+ }
69
+
70
+ .tb-btn-align-left {
71
+ text-align: left;
72
+ }
73
+
74
+ .tb-btn-align-right {
75
+ text-align: right;
76
+ }
77
+ }
78
+
79
+ /* new design */
80
+
81
+ #tb-notification-widget-inner.tb-notification-widget-inner .tb-widget-buttons.tb-btn-style-square {
82
+ /* inline & popup */
83
+ tb-notification-button {
84
+ display: block;
85
+ width: 100%;
86
+ margin: 0px 0px 20px;
87
+ padding: 0px;
88
+ background-color: transparent;
89
+ height: 30px;
90
+
91
+
92
+
93
+ &[channel="skype"] {
94
+ @include set-channel-button-brand-color($color-skype);
95
+ }
96
+
97
+ &[channel="facebook"] {
98
+ @include set-channel-button-brand-color($color-fb);
99
+ }
100
+
101
+ &[channel="vk"] {
102
+ @include set-channel-button-brand-color($color-vk);
103
+
104
+ .tb-notification-button__inner > div {
105
+ @include shadow-on-hover();
106
+ }
107
+ }
108
+
109
+ &[authorized="true"] tb-notification-button__text[for="login"], &[authorized="false"] tb-notification-button__text[for="subscribe"] {
110
+ display: none;
111
+ }
112
+
113
+ &[channel="viber"] {
114
+ // @include set-channel-button-brand-color($color-viber);
115
+ .tb-notification-button__inner > a {
116
+ background-color: $color-viber;
117
+ }
118
+ }
119
+
120
+ &[channel="tg"] {
121
+ @include set-channel-button-brand-color($color-tg);
122
+ }
123
+
124
+ &[channel="whatsapp"] {
125
+ .tb-notification-button__inner > a {
126
+ background-color: $color-whatsapp;
127
+ }
128
+ }
129
+
130
+ &[channel="whatsappb"] {
131
+ .tb-notification-button__inner > a {
132
+ background-color: $color-whatsappb;
133
+ }
134
+ }
135
+
136
+ &[loading] {
137
+ color: transparent;
138
+ &:after {
139
+ content: "";
140
+ border-radius: 100%;
141
+ border: 3px solid #fff;
142
+ border-bottom-color: transparent;
143
+ position: absolute;
144
+ top: 50%;
145
+ left: 50%;
146
+ width: 16px;
147
+ height: 16px;
148
+ margin: -11px 0 0 -11px;
149
+ animation-name: spin;
150
+ animation-duration: 1000ms;
151
+ animation-iteration-count: infinite;
152
+ }
153
+ }
154
+
155
+
156
+
157
+ .tb-notification-button__inner {
158
+ position: relative;
159
+ display: inline-block;
160
+ box-sizing: border-box;
161
+ width: 219px;
162
+ padding-left: 35px;
163
+ float: initial;
164
+
165
+ > a {
166
+ all: initial;
167
+ display: block;
168
+ box-sizing: content-box;
169
+ border-radius: 4px;
170
+ cursor: pointer;
171
+ color: #fff;
172
+ position: relative;
173
+ font-size: 12px;
174
+ font-family: Arial,Helvetica,sans-serif;
175
+ padding: 0px;
176
+ line-height: 29px;
177
+ height: 30px;
178
+ text-align: center;
179
+ text-decoration: none !important;
180
+ &:hover {
181
+ color: #fff;
182
+ }
183
+
184
+ @include shadow-on-hover();
185
+ }
186
+
187
+ tb-notification-button__text {
188
+ display: inline-block;
189
+ vertical-align: middle;
190
+ }
191
+
192
+ tb-notification-button__icon {
193
+ position: absolute;
194
+ top: 0px;
195
+ left: 0px;
196
+ width: 30px;
197
+ height: 30px;
198
+ margin: 0px;
199
+ > svg {
200
+ width: 100%;
201
+ height: 100%;
202
+ }
203
+ }
204
+
205
+ }
206
+ }
207
+ }
208
+
209
+ /* old design */
210
+ #tb-notification-widget-inner.tb-notification-widget-inner .tb-widget-buttons.tb-btn-style-rounded {
211
+
212
+ /* inline */
213
+ tb-notification-button {
214
+ @include shadow-on-hover();
215
+
216
+ box-sizing: content-box;
217
+ padding: 10px 20px;
218
+ border-radius: 25px;
219
+ cursor: pointer;
220
+ background-color: #2979FF;
221
+ color: #fff;
222
+ display: inline-block;
223
+ margin: 0 13px 45px 0;
224
+ position: relative;
225
+
226
+ &[channel="skype"] {
227
+ background-color: $color-skype;
228
+ }
229
+ &[channel="facebook"] {
230
+ background-color: $color-fb;
231
+ }
232
+ &[channel="vk"] {
233
+ background-color: $color-vk;
234
+ }
235
+ &[authorized="true"] tb-notification-button__text[for="login"], &[authorized="false"] tb-notification-button__text[for="subscribe"] {
236
+ display: none;
237
+ }
238
+ &[channel="viber"] {
239
+ background-color: $color-viber;
240
+ }
241
+ &[channel="tg"] {
242
+ background-color: $color-tg;
243
+ }
244
+ &[channel="whatsapp"] {
245
+ background-color: $color-whatsapp;
246
+ }
247
+ &[channel="whatsappb"] {
248
+ background-color: $color-whatsappb;
249
+ }
250
+ &[loading] {
251
+ color: transparent;
252
+ &:after {
253
+ content: "";
254
+ border-radius: 100%;
255
+ border: 3px solid #fff;
256
+ border-bottom-color: transparent;
257
+ position: absolute;
258
+ top: 50%;
259
+ left: 50%;
260
+ width: 16px;
261
+ height: 16px;
262
+ margin: -11px 0 0 -11px;
263
+ animation-name: spin;
264
+ animation-duration: 1000ms;
265
+ animation-iteration-count: infinite;
266
+ }
267
+ }
268
+ > a {
269
+ all: initial;
270
+ display: block;
271
+ text-decoration: none;
272
+ color: #fff;
273
+ font-family: inherit;
274
+ //font-size: 17px;
275
+ margin: -10px -20px;
276
+ //padding: 10px 20px;
277
+ text-decoration: none !important;
278
+
279
+ padding: 6px 30px 8px;
280
+ min-width: 110px;
281
+ text-align: center;
282
+ font-size: 15px;
283
+
284
+ &:hover {
285
+ color: #fff;
286
+ }
287
+ }
288
+ }
289
+
290
+ tb-notification-button__text {
291
+ display: inline-block;
292
+ vertical-align: middle;
293
+ }
294
+
295
+ tb-notification-button__icon {
296
+ display: inline-block;
297
+ vertical-align: middle;
298
+ //width: 40px;
299
+ //height: 40px;
300
+ width: 30px;
301
+ height: 30px;
302
+ margin: -10px 0 -10px -15px;
303
+ > svg {
304
+ width: 100%;
305
+ height: 100%;
306
+ }
307
+ }
308
+ }
309
+
310
+ &.tb-no-api-call #tb-notification-widget-inner.tb-notification-widget-inner .tb-widget-buttons.tb-btn-style-rounded tb-notification-button {
311
+ margin-bottom: 13px;
312
+ }
313
+
314
+ /* popup */
315
+ #tb-notification-widget-inner.tb-notification-widget-inner tb-notification-widget-overlay .tb-widget-buttons.tb-btn-style-rounded {
316
+ tb-notification-button {
317
+ display: inline-block;
318
+ width: 120px;
319
+ height: 24px;
320
+ padding: 0px;
321
+ margin: 0px 0px 18px 0px;
322
+
323
+ > a {
324
+ position: relative;
325
+ text-align: center;
326
+ font-size: 12px;
327
+ padding: 5px 20px;
328
+ margin: 0px;
329
+ }
330
+ }
331
+ tb-notification-button__icon {
332
+ display: block;
333
+ position: absolute;
334
+ left: 8px;
335
+ top: 2px;
336
+ width: 20px;
337
+ height: 20px;
338
+ margin: 0px;
339
+ padding: 0px;
340
+ }
341
+ tb-notification-button__text {
342
+ vertical-align: baseline;
343
+ width: 60px;
344
+ text-align: center;
345
+ color: #fff;
346
+ }
347
+ }
348
+
349
+ /* old design */
350
+ #tb-notification-widget-inner.tb-notification-widget-inner .tb-widget-buttons.tb-btn-style-gradient {
351
+
352
+ /* inline */
353
+ tb-notification-button {
354
+ @include shadow-on-hover-gradient();
355
+
356
+ box-sizing: content-box;
357
+ padding: 21px 36px;
358
+ border-radius: 5px;
359
+ cursor: pointer;
360
+ background-color: #2979FF;
361
+ color: #fff;
362
+ display: inline-block;
363
+ margin: 0 13px 45px 0;
364
+ position: relative;
365
+
366
+ &[channel="skype"] {
367
+ @include set-channel-button-brand-linear-gradient-color($color-skype, $color-skype-gradient);
368
+ }
369
+ &[channel="facebook"] {
370
+ @include set-channel-button-brand-linear-gradient-color($color-fb, $color-fb-gradient);
371
+ }
372
+ &[channel="vk"] {
373
+ @include set-channel-button-brand-linear-gradient-color($color-vk, $color-vk-gradient);
374
+ padding: 19px 36px;
375
+ }
376
+ &[authorized="true"] tb-notification-button__text[for="login"], &[authorized="false"] tb-notification-button__text[for="subscribe"] {
377
+ display: none;
378
+ }
379
+ &[channel="viber"] {
380
+ @include set-channel-button-brand-linear-gradient-color($color-viber, $color-viber-gradient);
381
+ }
382
+ &[channel="tg"] {
383
+ @include set-channel-button-brand-linear-gradient-color($color-tg, $color-tg-gradient);
384
+ }
385
+ &[channel="whatsapp"] {
386
+ @include set-channel-button-brand-linear-gradient-color($color-whatsapp, $color-whatsapp-gradient);
387
+ }
388
+ &[channel="whatsappb"] {
389
+ @include set-channel-button-brand-linear-gradient-color($color-whatsappb, $color-whatsapp-gradient);
390
+ }
391
+ &[loading] {
392
+ color: transparent;
393
+ &:after {
394
+ content: "";
395
+ border-radius: 100%;
396
+ border: 3px solid #fff;
397
+ border-bottom-color: transparent;
398
+ position: absolute;
399
+ top: 50%;
400
+ left: 50%;
401
+ width: 16px;
402
+ height: 16px;
403
+ margin: -11px 0 0 -11px;
404
+ animation-name: spin;
405
+ animation-duration: 1000ms;
406
+ animation-iteration-count: infinite;
407
+ }
408
+ }
409
+ > a {
410
+ all: initial;
411
+ display: block;
412
+ text-decoration: none;
413
+ color: #fff;
414
+ font-family: inherit;
415
+ //font-size: 17px;
416
+ margin: -10px -20px;
417
+ //padding: 10px 20px;
418
+ text-decoration: none !important;
419
+
420
+ padding: 6px 30px 8px;
421
+ min-width: 110px;
422
+ text-align: center;
423
+ font-size: 15px;
424
+
425
+ &:hover {
426
+ color: #fff;
427
+ }
428
+ }
429
+
430
+ &[channel="viber"] tb-notification-button__icon {
431
+ > svg {
432
+ width: 110%;
433
+ height: 110%;
434
+ }
435
+ }
436
+ }
437
+
438
+ tb-notification-button__text {
439
+ display: inline-block;
440
+ vertical-align: middle;
441
+ }
442
+
443
+ tb-notification-button__icon {
444
+ display: inline-block;
445
+ vertical-align: middle;
446
+ //width: 40px;
447
+ //height: 40px;
448
+ width: 30px;
449
+ height: 30px;
450
+ margin: -10px 0 -10px -15px;
451
+ > svg {
452
+ width: 100%;
453
+ height: 100%;
454
+ }
455
+ }
456
+ }
457
+
458
+ &.tb-no-api-call #tb-notification-widget-inner.tb-notification-widget-inner .tb-widget-buttons.tb-btn-style-gradient tb-notification-button {
459
+ margin-bottom: 13px;
460
+ }
461
+
462
+ /* popup */
463
+ #tb-notification-widget-inner.tb-notification-widget-inner tb-notification-widget-overlay .tb-widget-buttons.tb-btn-style-gradient {
464
+ tb-notification-button {
465
+ display: inline-block;
466
+ width: 120px;
467
+ height: 24px;
468
+ padding: 0px;
469
+ margin: 0px 0px 18px 0px;
470
+
471
+ > a {
472
+ position: relative;
473
+ text-align: center;
474
+ font-size: 12px;
475
+ padding: 5px 20px;
476
+ margin: 0px;
477
+ }
478
+ }
479
+ tb-notification-button__icon {
480
+ display: block;
481
+ position: absolute;
482
+ left: 8px;
483
+ top: 2px;
484
+ width: 20px;
485
+ height: 20px;
486
+ margin: 0px;
487
+ padding: 0px;
488
+ }
489
+ tb-notification-button__text {
490
+ vertical-align: baseline;
491
+ width: 60px;
492
+ text-align: center;
493
+ color: #fff;
494
+ }
495
+ }
496
+
497
+
498
+ /* circle icons design */
499
+ #tb-notification-widget-inner.tb-notification-widget-inner .tb-widget-buttons.tb-btn-style-icons {
500
+
501
+ /* inline */
502
+ tb-notification-button {
503
+ display: inline-block;
504
+ position: relative;
505
+ margin: 0px 13px 13px 0px;
506
+
507
+ &:hover {
508
+ cursor: pointer;
509
+ }
510
+
511
+ &[loading] {
512
+ color: transparent;
513
+ &:after {
514
+ content: "";
515
+ border-radius: 100%;
516
+ border: 3px solid #fff;
517
+ border-bottom-color: transparent;
518
+ position: absolute;
519
+ top: 50%;
520
+ left: 50%;
521
+ width: 16px;
522
+ height: 16px;
523
+ margin: -11px 0 0 -11px;
524
+ animation-name: spin;
525
+ animation-duration: 1000ms;
526
+ animation-iteration-count: infinite;
527
+ }
528
+ }
529
+ > a {
530
+ all: initial;
531
+ display: block;
532
+ text-decoration: none;
533
+ font-family: inherit;
534
+ text-decoration: none !important;
535
+
536
+ min-width: 80px;
537
+ text-align: center;
538
+ font-size: 15px;
539
+ color: #333;
540
+
541
+ &:hover {
542
+ cursor: pointer;
543
+ }
544
+ }
545
+
546
+ &[channel="whatsappb"] tb-notification-button__icon, &[channel="whatsapp"] tb-notification-button__icon {
547
+ background: $color-whatsapp;
548
+ }
549
+
550
+ &[channel="viber"] tb-notification-button__icon {
551
+ background: $color-viber;
552
+ }
553
+
554
+ &[channel="tg"] tb-notification-button__icon {
555
+ background: $color-tg;
556
+ }
557
+
558
+ &[channel="facebook"] tb-notification-button__icon {
559
+ background: $color-fb;
560
+ }
561
+ }
562
+
563
+ tb-notification-button__text {
564
+ display: block;
565
+ margin-top: 4px;
566
+ }
567
+
568
+ tb-notification-button__icon {
569
+ display: block;
570
+ position: relative;
571
+ width: 50px;
572
+ height: 50px;
573
+ margin: 0 auto;
574
+ transition: all .3s ease;
575
+ border-radius: 50%;
576
+ box-shadow: 0 6px 12px rgba(0,0,0,.25);
577
+ > svg {
578
+ width: 100%;
579
+ height: 100%;
580
+ }
581
+
582
+ &[channel="whatsappb"] svg {
583
+ display: block;
584
+ position: absolute;
585
+ top: 0;
586
+ bottom: 0;
587
+ left: 0;
588
+ right: 0;
589
+ margin: auto;
590
+ width: 50%;
591
+ height: 50%;
592
+ }
593
+
594
+ &:hover {
595
+ -webkit-transform: scale(1.3);
596
+ -ms-transform: scale(1.3);
597
+ transform: scale(1.3);
598
+ }
599
+ }
600
+ }
601
+ }
602
+
603
+ /*styles for non mobile*/
604
+ @media only screen and (min-device-width: 736px) {
605
+
606
+ /* new design */
607
+
608
+ #tb-notification-widget-inner.tb-notification-widget-inner .tb-widget-buttons.tb-btn-style-square {
609
+ tb-notification-button {
610
+ .tb-notification-button__inner {
611
+ padding-left: 55px;
612
+ width: 239px;
613
+
614
+ tb-notification-button__icon {
615
+ top: -5px;
616
+ left: 0px;
617
+ width: 40px;
618
+ height: 40px;
619
+ }
620
+ }
621
+ }
622
+ }
623
+
624
+ /* old design*/
625
+
626
+ #tb-notification-widget-inner.tb-notification-widget-inner tb-notification-widget-overlay .tb-widget-buttons.tb-btn-style-rounded {
627
+ tb-notification-button {
628
+ margin: 0px 19px 24px 0px;
629
+ width: 206px;
630
+ height: 50px;
631
+
632
+ > a {
633
+ padding: 10px 20px;
634
+ font-size: 20px;
635
+ }
636
+ }
637
+
638
+ tb-notification-button__icon {
639
+ width: 40px;
640
+ height: 40px;
641
+ left: 15px;
642
+ top: 5px;
643
+ }
644
+
645
+ tb-notification-button__text {
646
+ width: 100px;
647
+ line-height: 30px;
648
+ }
649
+ }
650
+ }
651
+
652
+ // Dirty crutch. There is no other way now *'(
653
+ tb-notification-widget-popup.tb-popup-with-image .tb-widget-buttons > div:last-child {
654
+ tb-notification-button {
655
+ margin-bottom: 0 !important;
656
+ }
657
+ }