@alma/widgets 3.3.12 → 4.0.0

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.
Files changed (101) hide show
  1. package/README.md +1 -1
  2. package/dist/types/{Widgets → src/Widgets}/EligibilityModal/DesktopModal/index.d.ts +9 -9
  3. package/dist/types/{Widgets → src/Widgets}/EligibilityModal/MobileModal/index.d.ts +9 -9
  4. package/dist/types/{Widgets → src/Widgets}/EligibilityModal/ModalContainer.d.ts +16 -16
  5. package/dist/types/{Widgets → src/Widgets}/EligibilityModal/ModalContainer.test.d.ts +1 -1
  6. package/dist/types/{Widgets/PaymentPlans → src/Widgets/EligibilityModal}/__tests__/Basics.test.d.ts +1 -1
  7. package/dist/types/{Widgets → src/Widgets}/EligibilityModal/__tests__/Cards.test.d.ts +1 -1
  8. package/dist/types/{Widgets → src/Widgets}/EligibilityModal/__tests__/ModalContainer.test.d.ts +1 -1
  9. package/dist/types/{Widgets → src/Widgets}/EligibilityModal/__tests__/Plans.test.d.ts +1 -1
  10. package/dist/types/{Widgets → src/Widgets}/EligibilityModal/__tests__/Schedule.test.d.ts +1 -1
  11. package/dist/types/{Widgets → src/Widgets}/EligibilityModal/classNames.const.d.ts +23 -23
  12. package/dist/types/src/Widgets/EligibilityModal/components/Cards/index.d.ts +7 -0
  13. package/dist/types/{Widgets → src/Widgets}/EligibilityModal/components/EligibilityPlansButtons/index.d.ts +8 -8
  14. package/dist/types/{Widgets → src/Widgets}/EligibilityModal/components/Info/index.d.ts +5 -5
  15. package/dist/types/src/Widgets/EligibilityModal/components/Schedule/index.d.ts +6 -0
  16. package/dist/types/{Widgets → src/Widgets}/EligibilityModal/components/Title/index.d.ts +6 -6
  17. package/dist/types/{Widgets → src/Widgets}/EligibilityModal/index.d.ts +11 -11
  18. package/dist/types/{Widgets/EligibilityModal → src/Widgets/PaymentPlans}/__tests__/Basics.test.d.ts +1 -1
  19. package/dist/types/{Widgets → src/Widgets}/PaymentPlans/__tests__/Credit.test.d.ts +1 -1
  20. package/dist/types/{Widgets → src/Widgets}/PaymentPlans/__tests__/CustomTransitionDelay.test.d.ts +1 -1
  21. package/dist/types/{Widgets → src/Widgets}/PaymentPlans/__tests__/HideBorder.test.d.ts +1 -1
  22. package/dist/types/{Widgets → src/Widgets}/PaymentPlans/__tests__/HideWidget.test.d.ts +1 -1
  23. package/dist/types/{Widgets → src/Widgets}/PaymentPlans/__tests__/IneligibleOptions.test.d.ts +1 -1
  24. package/dist/types/{Widgets → src/Widgets}/PaymentPlans/__tests__/LanguageCheck.test.d.ts +1 -1
  25. package/dist/types/{Widgets → src/Widgets}/PaymentPlans/__tests__/LaunchModal.test.d.ts +1 -1
  26. package/dist/types/{Widgets → src/Widgets}/PaymentPlans/__tests__/Monochrome.test.d.ts +1 -1
  27. package/dist/types/{Widgets → src/Widgets}/PaymentPlans/__tests__/PaymentPlanContainer.test.d.ts +1 -1
  28. package/dist/types/{Widgets → src/Widgets}/PaymentPlans/__tests__/SuggestedPaymentPlan.test.d.ts +1 -1
  29. package/dist/types/{Widgets → src/Widgets}/PaymentPlans/__tests__/WithoutPlans.test.d.ts +1 -1
  30. package/dist/types/{Widgets → src/Widgets}/PaymentPlans/classNames.const.d.ts +13 -13
  31. package/dist/types/{Widgets → src/Widgets}/PaymentPlans/index.d.ts +18 -18
  32. package/dist/types/{assets → src/assets}/Cross.d.ts +5 -6
  33. package/dist/types/{assets → src/assets}/almaLogo.d.ts +6 -6
  34. package/dist/types/{assets → src/assets}/cards/amex.d.ts +3 -3
  35. package/dist/types/{assets → src/assets}/cards/cb.d.ts +3 -3
  36. package/dist/types/{assets → src/assets}/cards/mastercard.d.ts +3 -3
  37. package/dist/types/{assets → src/assets}/cards/visa.d.ts +3 -3
  38. package/dist/types/{components → src/components}/Installments/Installment/index.d.ts +8 -8
  39. package/dist/types/src/components/Installments/TotalBlock/index.d.ts +6 -0
  40. package/dist/types/src/components/Loader/index.d.ts +5 -0
  41. package/dist/types/src/components/LoadingIndicator/LoadingIndicator.d.ts +4 -0
  42. package/dist/types/{components → src/components}/Modal/index.d.ts +12 -12
  43. package/dist/types/{consts.d.ts → src/consts.d.ts} +6 -6
  44. package/dist/types/{hooks → src/hooks}/useButtonAnimation.d.ts +7 -7
  45. package/dist/types/src/hooks/useFetchEligibility.d.ts +3 -0
  46. package/dist/types/{hooks → src/hooks}/useSessionStorage.d.ts +20 -20
  47. package/dist/types/{hooks → src/hooks}/useSessionStorage.test.d.ts +1 -1
  48. package/dist/types/{index.d.ts → src/index.d.ts} +16 -18
  49. package/dist/types/{intl → src/intl}/IntlProvider.d.ts +8 -8
  50. package/dist/types/src/intl/messages/messages.de.json.d.ts +35 -0
  51. package/dist/types/src/intl/messages/messages.en.json.d.ts +35 -0
  52. package/dist/types/src/intl/messages/messages.es.json.d.ts +35 -0
  53. package/dist/types/src/intl/messages/messages.fr.json.d.ts +35 -0
  54. package/dist/types/src/intl/messages/messages.it.json.d.ts +35 -0
  55. package/dist/types/src/intl/messages/messages.nl.json.d.ts +35 -0
  56. package/dist/types/src/intl/messages/messages.pt.json.d.ts +35 -0
  57. package/dist/types/{intl → src/intl}/utils.d.ts +2 -2
  58. package/dist/types/src/setupTests.d.ts +0 -0
  59. package/dist/types/{types.d.ts → src/types.d.ts} +97 -97
  60. package/dist/types/src/utils/fetch.d.ts +6 -0
  61. package/dist/types/{utils → src/utils}/filterEligibility.d.ts +3 -3
  62. package/dist/types/{utils → src/utils}/index.d.ts +7 -7
  63. package/dist/types/{utils → src/utils}/index.test.d.ts +1 -1
  64. package/dist/types/{utils → src/utils}/merchantOrderPreferences.d.ts +14 -14
  65. package/dist/types/{utils → src/utils}/paymentPlanStrings.d.ts +4 -4
  66. package/dist/types/{utils → src/utils}/utilsForStorage.d.ts +2 -2
  67. package/dist/types/{utils → src/utils}/utilsForStorage.test.d.ts +1 -1
  68. package/dist/types/src/widgets_controller.d.ts +15 -0
  69. package/dist/types/vite.config.d.ts +2 -0
  70. package/dist/widgets-wc.umd.js +55 -1
  71. package/dist/widgets-wc.umd.js.map +1 -1
  72. package/dist/widgets.css +1 -15
  73. package/dist/widgets.js +7332 -1
  74. package/dist/widgets.js.map +1 -1
  75. package/dist/widgets.min.css +1 -0
  76. package/dist/widgets.umd.js +55 -1
  77. package/dist/widgets.umd.js.map +1 -1
  78. package/package.json +14 -8
  79. package/dist/raw/widgets-wc.umd.js +0 -17907
  80. package/dist/raw/widgets.css +0 -557
  81. package/dist/raw/widgets.js +0 -3358
  82. package/dist/raw/widgets.js.map +0 -1
  83. package/dist/raw/widgets.m.js +0 -3362
  84. package/dist/raw/widgets.m.js.map +0 -1
  85. package/dist/raw/widgets.modern.js +0 -3296
  86. package/dist/raw/widgets.modern.js.map +0 -1
  87. package/dist/raw/widgets.umd.js +0 -17907
  88. package/dist/raw/widgets.umd.js.map +0 -1
  89. package/dist/types/Widgets/EligibilityModal/components/Cards/index.d.ts +0 -7
  90. package/dist/types/Widgets/EligibilityModal/components/Schedule/index.d.ts +0 -6
  91. package/dist/types/components/Installments/TotalBlock/index.d.ts +0 -6
  92. package/dist/types/components/Loader/index.d.ts +0 -5
  93. package/dist/types/components/LoadingIndicator/LoadingIndicator.d.ts +0 -4
  94. package/dist/types/hooks/useFetchEligibility.d.ts +0 -3
  95. package/dist/types/setupTests.d.ts +0 -1
  96. package/dist/types/utils/fetch.d.ts +0 -6
  97. package/dist/types/widgets_controller.d.ts +0 -15
  98. package/dist/widgets.m.js +0 -2
  99. package/dist/widgets.m.js.map +0 -1
  100. package/dist/widgets.modern.js +0 -2
  101. package/dist/widgets.modern.js.map +0 -1
@@ -1,557 +0,0 @@
1
- :root {
2
- --white: #fff;
3
- --weight-normal: 400;
4
- --weight-medium: 500;
5
- --weight-semi-bold: 600;
6
- --weight-bold: 700;
7
-
8
- /** Colors **/
9
- --alma-orange: #fa5022;
10
- --soft-orange: #ffeadb;
11
- --alma-blue: #60d2df;
12
- --soft-blue: #e7f8fa;
13
- --alma-yellow: #ffcf00;
14
- --soft-yellow: #fff5cc;
15
- --alma-green: #4bb543;
16
- --soft-green: #e2f3e1;
17
- --alma-red: #CF2020;
18
- --soft-red: #ffecec;
19
- --off-white: #f9f9f9;
20
- --light-gray: #F0F0F0;
21
- --dark-gray: #6C6C6C;
22
- --off-black: #1a1a1a;
23
- --white: #fff;
24
- --black: #000;
25
- }
26
-
27
- /** Venn **/
28
- @font-face {
29
- font-family: Venn;
30
- src: url('https://cdn.almapay.com/fonts/Venn/Venn-Bold.eot') format('embedded-opentype'),
31
- url('https://cdn.almapay.com/fonts/Venn/Venn-Bold.woff') format('woff'),
32
- url('https://cdn.almapay.com/fonts/Venn/Venn-Bold.ttf') format('truetype');
33
- font-weight: 700;
34
- font-style: normal;
35
- font-display: swap;
36
- }
37
- @font-face {
38
- font-family: Venn;
39
- src: url('https://cdn.almapay.com/fonts/Venn/Venn-Regular.eot?#iefix') format('embedded-opentype'),
40
- url('https://cdn.almapay.com/fonts/Venn/Venn-Regular.woff') format('woff'),
41
- url('https://cdn.almapay.com/fonts/Venn/Venn-Regular.ttf') format('truetype');
42
- font-weight: 400;
43
- font-style: normal;
44
- font-display: swap;
45
- }
46
-
47
- /** Argent **/
48
- @font-face {
49
- font-family: Argent;
50
- src: url('https://cdn.almapay.com/fonts/Argent/ArgentCF-DemiBold.eot') format('embedded-opentype'),
51
- url('https://cdn.almapay.com/fonts/Argent/ArgentCF-DemiBold.woff') format('woff'),
52
- url('https://cdn.almapay.com/fonts/Argent/ArgentCF-DemiBold.ttf') format('truetype');
53
- font-weight: 600;
54
- font-style: normal;
55
- font-display: swap;
56
- }
57
-
58
- ._GTTk7 {
59
- margin: 16px 0;
60
- font-family: 'Argent', sans-serif;
61
- background-color: var(--off-white);
62
- border-radius: 20px;
63
- padding: 24px;
64
- z-index: 2;
65
- position: relative;
66
- }
67
-
68
- ._GTTk7 h3 {
69
- margin: 4px 0;
70
- }
71
-
72
- ._34s2g {
73
- display: flex;
74
- flex-direction: row;
75
- justify-content: space-between;
76
- font-size: 20px;
77
- }
78
-
79
- ._W7qIA {
80
- display: flex;
81
- font-family: 'Venn', sans-serif;
82
- flex-direction: row;
83
- justify-content: space-between;
84
- font-weight: var(--weight-bold);
85
- font-size: 14px;
86
- line-height: 135%;
87
- }
88
-
89
- ._24KmE {
90
- text-align: right;
91
- }
92
-
93
- ._31lrj {
94
- display: flex;
95
- flex-direction: column;
96
- align-items: center;
97
- }
98
-
99
- ._31lrj > svg {
100
- animation: _3NtDa 1.7s ease infinite;
101
- }
102
-
103
- @keyframes _3NtDa {
104
- 60% {
105
- transform: scale(1); }
106
-
107
- 70% {
108
- transform: scale(0.7); }
109
-
110
- 80% {
111
- transform: scale(1); }
112
-
113
- 85% {
114
- transform: scale(0.95); }
115
-
116
- 100% {
117
- transform: scale(1); }
118
- }
119
-
120
- ._D8SjB {
121
- border: none;
122
- background-color: var(--white);
123
- color: var(--off-black);
124
- width: 100%;
125
- height: 83vh;
126
- position: absolute;
127
- bottom: 0;
128
- border-top-left-radius: 20px;
129
- border-top-right-radius: 20px;
130
- padding-top: 48px;
131
- outline: none;
132
- }
133
-
134
- ._ocM9x {
135
- padding: 24px;
136
- width: 100%;
137
- height: 100%;
138
- }
139
-
140
- ._1GP2F {
141
- overflow-y: auto;
142
- margin: 0;
143
- box-sizing: border-box;
144
- }
145
-
146
- ._1yxCb {
147
- position: fixed;
148
- top: 0;
149
- left: 0;
150
- right: 0;
151
- bottom: 0;
152
- display: flex;
153
- align-items: center;
154
- justify-content: center;
155
- background-color: rgba(0, 0, 0, 0.3);
156
- z-index: 99999;
157
- }
158
-
159
- ._12LLh {
160
- display: flex;
161
- justify-content: flex-end;
162
- position: absolute;
163
- top: 12px;
164
- right: 12px;
165
- z-index: 1;
166
- }
167
-
168
- ._3YRro {
169
- border: 0;
170
- display: flex;
171
- justify-content: center;
172
- align-items: center;
173
- background-color: var(--off-black);
174
- border-radius: 50%;
175
- cursor: pointer;
176
- padding: 4px;
177
- }
178
-
179
- @media screen and (min-width: 800px) {
180
- ._D8SjB {
181
- border-radius: 8px;
182
- width: 800px;
183
- height: 550px;
184
- position: relative;
185
- padding-top: 0;
186
- }
187
-
188
- ._1GP2F {
189
- max-height: 100vh;
190
- overflow: hidden;
191
- }
192
-
193
- ._ocM9x {
194
- padding: 32px;
195
- }
196
- }
197
-
198
- ._1l2Oa {
199
- display: flex;
200
- flex-wrap: wrap;
201
- flex-direction: row;
202
- justify-content: center;
203
- margin-bottom: 24px;
204
- padding-bottom: 12px;
205
- gap: 8px;
206
- border-bottom: 1px solid var(--light-gray);
207
- }
208
-
209
- ._1l2Oa > button {
210
- display: initial;
211
- height: 50px;
212
- min-width: 50px;
213
- border: 1px solid var(--dark-gray);
214
- border-radius: 16px;
215
- font-family: 'Argent', sans-serif;
216
- font-size: 20px;
217
- line-height: 120%;
218
- font-weight: 600;
219
- cursor: pointer;
220
- background-color: var(--white);
221
- transition: all 0.1s ease;
222
- color: var(--off-black);
223
- padding: initial; /* To avoid CSS surcharge on this. */
224
- }
225
-
226
- ._1l2Oa > button._3rue7 {
227
- background-color: var(--alma-orange);
228
- color: var(--white);
229
- border: 0;
230
- }
231
-
232
- ._2T78a {
233
- margin: 32px;
234
- }
235
-
236
- ._z2Uiv {
237
- display: flex;
238
- flex-direction: row;
239
- justify-content: space-between;
240
- font-size: var(--font-base);
241
- line-height: 135%;
242
- margin-bottom: 6px;
243
- width: 100%;
244
- }
245
-
246
- ._2lJQy {
247
- display: flex;
248
- align-items: center;
249
- margin-left: -23px;
250
- }
251
-
252
- ._1Z9wr {
253
- width: 10px;
254
- height: 10px;
255
- border-radius: 50%;
256
- background-color: var(--soft-orange);
257
- margin-right: 16px;
258
- z-index: 1;
259
- }
260
-
261
- ._2Nmkl {
262
- background-color: var(--alma-orange);
263
- }
264
-
265
- ._ezY-3 {
266
- font-weight: bold;
267
- }
268
-
269
- @media screen and (min-width: 800px) {
270
- ._z2Uiv {
271
- font-size: var(--font-base);
272
- }
273
-
274
- ._1Z9wr::after {
275
- border-left: 2px solid var(--off-white);
276
- height: 85px;
277
- margin-left: 4px;
278
- content: " ";
279
- position: absolute;
280
- z-index: 0;
281
- margin-top: 10px;
282
- }
283
- }
284
-
285
- ._MPKjS {
286
- padding: 0 24px;
287
- margin-bottom: 16px;
288
- font-family: 'Venn', sans-serif;
289
- }
290
-
291
- ._3a7er {
292
- font-size: 14px;
293
- margin-left: 4px;
294
- }
295
-
296
- @media (min-width: 800px) {
297
- ._MPKjS {
298
- overflow-y: auto;
299
- margin: 0;
300
- }
301
- }
302
-
303
- ._1N3yO {
304
- display: flex;
305
- flex-direction: row;
306
- width: 100%;
307
- justify-content: center;
308
- gap: 10px;
309
- margin: 24px 0;
310
- }
311
-
312
- ._180ro {
313
- display: flex;
314
- flex-direction: column;
315
- margin-bottom: 40px;
316
- padding: 0 24px;
317
- gap: 20px;
318
- font-family: 'Venn', sans-serif;
319
- }
320
-
321
- ._1HqCO {
322
- display: flex;
323
- align-items: center;
324
- line-height: 135%;
325
- gap: 16px;
326
- }
327
-
328
- ._3B8wx {
329
- font-family: 'Argent', sans-serif;
330
- font-weight: 600;
331
- font-size: 32px;
332
- min-width: 20px;
333
- line-height: 110%;
334
- color: var(--alma-blue);
335
- }
336
-
337
- ._1HqCO:first-child ._3B8wx {
338
- color: var(--alma-orange);
339
- }
340
-
341
- ._1HqCO:last-child ._3B8wx {
342
- color: var(--alma-yellow);
343
- }
344
-
345
- @media (min-width: 800px) {
346
- ._180ro {
347
- margin: 0;
348
- padding: 0;
349
- }
350
- }
351
-
352
- ._3ERx- {
353
- font-family: 'Argent', sans-serif;
354
- font-weight: 600;
355
- font-size: 20px;
356
- line-height: 130%;
357
- text-align: center;
358
- margin: 0 0 24px 0;
359
- }
360
-
361
- @media (min-width: 800px) {
362
- ._3ERx- {
363
- font-size: 24px;
364
- }
365
- }
366
-
367
- ._21g6u {
368
- display: flex;
369
- height: 100%;
370
- flex-direction: row;
371
- }
372
-
373
- ._3zaP5 {
374
- height: 100%;
375
- display: flex;
376
- flex-direction: column;
377
- width: 100%;
378
- }
379
-
380
- ._2SBRC {
381
- max-width: 300px;
382
- padding-right: 24px;
383
- gap: 20px;
384
- }
385
-
386
- ._xW3wt {
387
- position: absolute;
388
- bottom: 35px;
389
- left: 150px;
390
- }
391
-
392
- ._17qNJ {
393
- height: 100%;
394
- display: flex;
395
- align-items: center;
396
- text-align: center;
397
- font-size: 20px;
398
- }
399
-
400
- ._2oTJq {
401
- height: 100%;
402
- display: flex;
403
- align-items: center;
404
- justify-content: center;
405
- }
406
-
407
- ._2u9rj {
408
- position: relative;
409
- }
410
-
411
- ._VRdAU {
412
- position: absolute;
413
- top: 15px;
414
- left: 5px;
415
- width: 2px;
416
- /* 120px is a magic number, to avoid seeing the line under the TotalBlock */
417
- height: calc(100% - 120px);
418
- background-color: var(--off-white);
419
- }
420
-
421
- @media screen and (min-width: 800px) {
422
- ._2u9rj {
423
- overflow: auto;
424
- }
425
- ._VRdAU {
426
- display: none;
427
- }
428
- }
429
-
430
- ._2G7Ch {
431
- display: flex;
432
- flex-direction: column;
433
- }
434
-
435
- ._2779r {
436
- margin: 0 auto;
437
- overflow: visible;
438
- }
439
-
440
- ._2SwwZ {
441
- display: flex;
442
- flex-direction: column;
443
- align-items: flex-start;
444
- width: 100%;
445
- }
446
-
447
- ._2qODo {
448
- width: 100%;
449
- height: 20px;
450
- background-color: var(--light-gray);
451
- border-radius: 2px;
452
- }
453
- ._2YO01 {
454
- width: 60%;
455
- height: 15px;
456
- margin-top: 16px;
457
- background-color: var(--light-gray);
458
- border-radius: 2px;
459
- }
460
-
461
- ._TSkFv {
462
- width: 368px;
463
- max-width: 100%;
464
- background-color: var(--white);
465
- border: 1px solid var(--light-gray);
466
- display: flex;
467
- flex-direction: column;
468
- align-items: flex-start;
469
- padding: 12px;
470
- gap: 8px;
471
- }
472
-
473
- ._TSkFv:focus,
474
- ._TSkFv:focus-visible {
475
- outline: none;
476
- }
477
-
478
- ._LJ4nZ {
479
- margin-right: 12px;
480
- }
481
-
482
- ._bMClc {
483
- display: flex;
484
- flex-direction: row;
485
- align-items: flex-start;
486
- }
487
-
488
- ._17c_S {
489
- display: flex;
490
- flex-direction: row;
491
- gap: 8px;
492
- align-items: flex-start;
493
- max-width: 310px;
494
- flex-wrap: wrap;
495
- }
496
-
497
- ._2Kqjn {
498
- font-family: 'Venn', sans-serif;
499
- color: var(--off-black);
500
- border-radius: 4px;
501
- font-weight: 700;
502
- font-size: 12px;
503
- display: flex;
504
- flex-direction: column;
505
- justify-content: center;
506
- align-items: center;
507
- height: 24px;
508
- min-width: 24px;
509
- padding: 2px 10px; /* The 4px is made for Deferred plans */
510
- }
511
-
512
- ._2Kqjn._3dG_J {
513
- color: var(--white);
514
- background: var(--alma-orange);
515
- }
516
-
517
- ._2Kqjn._3dG_J._2hx83 {
518
- background: var(--off-black);
519
- }
520
-
521
- ._2Kqjn._3dG_J._3O1bg {
522
- background-color: var(--white);
523
- color: var(--dark-gray);
524
- cursor: not-allowed;
525
- }
526
-
527
- ._3_qcn {
528
- border: none;
529
- }
530
-
531
- ._25GrF {
532
- font-family: 'Venn', sans-serif;
533
- font-size: 12px;
534
- line-height: 180%;
535
- color: var(--off-black);
536
- }
537
-
538
- ._3O1bg {
539
- color: var(--dark-gray);
540
- }
541
-
542
- ._30j1O {
543
- overflow: hidden;
544
- align-items: center;
545
- }
546
-
547
- ._1ZDMS {
548
- align-items: center;
549
- }
550
-
551
- ._UksZa {
552
- cursor: pointer;
553
- }
554
-
555
- ._1lr-q {
556
- cursor: not-allowed;
557
- }