@alma/widgets 2.2.9 → 2.3.1

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 (34) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/dist/raw/widgets.css +590 -0
  3. package/dist/raw/widgets.js +2616 -0
  4. package/dist/raw/widgets.js.map +1 -0
  5. package/dist/raw/widgets.m.js +2622 -0
  6. package/dist/raw/widgets.m.js.map +1 -0
  7. package/dist/raw/widgets.modern.js +2521 -0
  8. package/dist/raw/widgets.modern.js.map +1 -0
  9. package/dist/raw/widgets.umd.js +18494 -0
  10. package/dist/raw/widgets.umd.js.map +1 -0
  11. package/dist/types/Widgets/EligibilityModal/DesktopModal/index.d.ts +1 -8
  12. package/dist/types/Widgets/EligibilityModal/MobileModal/index.d.ts +1 -8
  13. package/dist/types/Widgets/EligibilityModal/ModalContainer.d.ts +13 -0
  14. package/dist/types/Widgets/{button.test.d.ts → EligibilityModal/ModalContainer.test.d.ts} +0 -0
  15. package/dist/types/Widgets/EligibilityModal/index.d.ts +2 -1
  16. package/dist/types/Widgets/PaymentPlans/PaymentPlans.test.d.ts +1 -0
  17. package/dist/types/Widgets/{PaymentPlan.d.ts → PaymentPlans/index.d.ts} +3 -2
  18. package/dist/types/Widgets/PaymentPlans/tests/SuggestedPaymentPlan.d.ts +1 -0
  19. package/dist/types/components/LoadingIndicator/index.d.ts +5 -0
  20. package/dist/types/hooks/useFetchEligibility.d.ts +2 -2
  21. package/dist/types/index.d.ts +1 -0
  22. package/dist/types/types.d.ts +12 -5
  23. package/dist/types/utils/merchantOrderPreferences.d.ts +14 -0
  24. package/dist/types/widgets_controller.d.ts +7 -2
  25. package/dist/widgets.css +9 -7
  26. package/dist/widgets.js +1 -1
  27. package/dist/widgets.js.map +1 -1
  28. package/dist/widgets.m.js +1 -1
  29. package/dist/widgets.m.js.map +1 -1
  30. package/dist/widgets.modern.js +1 -1
  31. package/dist/widgets.modern.js.map +1 -1
  32. package/dist/widgets.umd.js +1 -1
  33. package/dist/widgets.umd.js.map +1 -1
  34. package/package.json +4 -2
package/CHANGELOG.md CHANGED
@@ -1,3 +1,24 @@
1
+ ## [2.3.1](https://github.com/alma/widgets/compare/v2.3.0...v2.3.1) (2022-05-02)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * update wrong translation ([#33](https://github.com/alma/widgets/issues/33)) ([578e6cd](https://github.com/alma/widgets/commit/578e6cd7550df6cc01fd7ad9968a4e8c9bb745e8))
7
+
8
+ # [2.3.0](https://github.com/alma/widgets/compare/v2.2.10...v2.3.0) (2022-04-21)
9
+
10
+
11
+ ### Features
12
+
13
+ * **payment-plan:** add firstDisplayedPaymentPlan option ([#26](https://github.com/alma/widgets/issues/26)) ([f16fa4a](https://github.com/alma/widgets/commit/f16fa4a068a9e06aec261489065bc1282acee666))
14
+
15
+ ## [2.2.10](https://github.com/alma/widgets/compare/v2.2.9...v2.2.10) (2022-04-12)
16
+
17
+
18
+ ### Bug Fixes
19
+
20
+ * updated build command to generate a raw folder with unminified JS/CSS ([#21](https://github.com/alma/widgets/issues/21)) ([e1729c1](https://github.com/alma/widgets/commit/e1729c1fd959eeee2e0fda1113db6ff2050b0ddb))
21
+
1
22
  ## [2.2.9](https://github.com/alma/widgets/compare/v2.2.8...v2.2.9) (2022-03-21)
2
23
 
3
24
 
@@ -0,0 +1,590 @@
1
+ @import url('https://fonts.googleapis.com/css2?family=Public+Sans:wght@300;600&family=Work+Sans:wght@700&display=swap');
2
+
3
+ * {
4
+ padding: 0;
5
+ margin: 0;
6
+ box-sizing: border-box;
7
+ }
8
+
9
+ :root {
10
+ --white: #fff;
11
+ --blue-100: #e9f4ff;
12
+ --blue-300: #00425d;
13
+ --blue-400: #003951;
14
+ --blue-500: #337b99;
15
+ --blue-600: #042736;
16
+ --red-100: #ffedee;
17
+ --red-300: #ffa0a6;
18
+ --red-600: #ff414d;
19
+ --orange: #ff7e55;
20
+ --orange-100: #fff3ee;
21
+ --orange-300: #fcd4b5;
22
+ --yellow-100: #fff5de;
23
+ --yellow-300: #ffde9d;
24
+ --yellow-600: #ffbb33;
25
+ --beige: #fff7f0;
26
+ --gray-100: #f7f9fb;
27
+ --gray-200: #f4f6f6;
28
+ --gray-300: #e1e4e6;
29
+ --gray-400: #c2d0d8;
30
+ --gray-500: #b2bbc0;
31
+ --gray-600: #819098;
32
+ --gray-700: #454f54;
33
+ --gray-800: #2e3538;
34
+ --green-100: #ddf8f1;
35
+ --green-300: #9cebd6;
36
+ --green-600: #1dcda3;
37
+ }
38
+ @font-face {
39
+ font-family: 'Eina04', sans-serif;
40
+ src: url('./assets/fonts/Eina04-Light.eot?#iefix') format('embedded-opentype'),
41
+ url('./assets/fonts/Eina04-Light.woff') format('woff'),
42
+ url('./assets/fonts/Eina04-Light.ttf') format('truetype'),
43
+ url('./assets/fonts/Eina04-Light.svg#Eina04-Light') format('svg');
44
+ font-weight: 300;
45
+ font-style: normal;
46
+ font-display: swap;
47
+ }
48
+ @font-face {
49
+ font-family: 'Eina04', sans-serif;
50
+ src: url('./assets/fonts/Eina04-Regular.eot?#iefix') format('embedded-opentype'),
51
+ url('./assets/fonts/Eina04-Regular.woff') format('woff'),
52
+ url('./assets/fonts/Eina04-Regular.ttf') format('truetype'),
53
+ url('./assets/fonts/Eina04-Regular.svg#Eina04-Regular') format('svg');
54
+ font-weight: 400;
55
+ font-style: normal;
56
+ font-display: swap;
57
+ }
58
+ @font-face {
59
+ font-family: 'Eina04', sans-serif;
60
+ src: url('./assets/fonts/Eina04-RegularItalic.eot?#iefix') format('embedded-opentype'),
61
+ url('./assets/fonts/Eina04-RegularItalic.woff') format('woff'),
62
+ url('./assets/fonts/Eina04-RegularItalic.ttf') format('truetype'),
63
+ url('./assets/fonts/Eina04-RegularItalic.svg#Eina04-RegularItalic') format('svg');
64
+ font-weight: 400;
65
+ font-style: italic;
66
+ font-display: swap;
67
+ }
68
+ @font-face {
69
+ font-family: 'Eina04', sans-serif;
70
+ src: url('./assets/fonts/Eina04-SemiBold.eot?#iefix') format('embedded-opentype'),
71
+ url('./assets/fonts/Eina04-SemiBold.woff') format('woff'),
72
+ url('./assets/fonts/Eina04-SemiBold.ttf') format('truetype'),
73
+ url('./assets/fonts/Eina04-SemiBold.svg#Eina04-SemiBold') format('svg');
74
+ font-weight: 500;
75
+ font-style: normal;
76
+ font-display: swap;
77
+ }
78
+ @font-face {
79
+ font-family: 'Eina04', sans-serif;
80
+ src: url('./assets/fonts/Eina04-SemiboldItalic.eot?#iefix') format('embedded-opentype'),
81
+ url('./assets/fonts/Eina04-SemiboldItalic.woff') format('woff'),
82
+ url('./assets/fonts/Eina04-SemiboldItalic.ttf') format('truetype'),
83
+ url('./assets/fonts/Eina04-SemiboldItalic.svg#Eina04-SemiboldItalic') format('svg');
84
+ font-weight: 500;
85
+ font-style: italic;
86
+ font-display: swap;
87
+ }
88
+ @font-face {
89
+ font-family: 'Eina04', sans-serif;
90
+ src: url('./assets/fonts/Eina04-Bold.eot?#iefix') format('embedded-opentype'),
91
+ url('./assets/fonts/Eina04-Bold.woff') format('woff'),
92
+ url('./assets/fonts/Eina04-Bold.ttf') format('truetype'),
93
+ url('./assets/fonts/Eina04-Bold.svg#Eina04-Bold') format('svg');
94
+ font-weight: 600;
95
+ font-style: normal;
96
+ font-display: swap;
97
+ }
98
+
99
+ @font-face {
100
+ font-family: 'Public Sans';
101
+ src: url('./assets/fonts/PublicSans-VariableFont_wght.ttf');
102
+ font-style: normal;
103
+ font-display: swap;
104
+ }
105
+
106
+ ._31lrj {
107
+ display: flex;
108
+ flex-direction: column;
109
+ align-items: center;
110
+ }
111
+
112
+ ._2p94X {
113
+ font-family: 'Eina04', sans-serif;
114
+ font-weight: bold;
115
+ line-height: 35px;
116
+ font-size: 64px;
117
+ color: var(--blue-300);
118
+ margin-bottom: 16px;
119
+ animation: _229P7 0.7s cubic-bezier(0.87, 0, 0.17, 1) 1ms infinite
120
+ alternate-reverse both;
121
+ }
122
+
123
+ ._1k0PM {
124
+ width: 34px;
125
+ height: 10px;
126
+ background-color: var(--red-600);
127
+ -webkit-animation: _2cX7o 1.4s cubic-bezier(0.87, 0, 0.17, 1) 1ms infinite forwards;
128
+ animation: _2cX7o 1.4s cubic-bezier(0.87, 0, 0.17, 1) 1ms infinite forwards;
129
+ }
130
+
131
+ @-webkit-keyframes _229P7 {
132
+ 0% {
133
+ opacity: 1;
134
+ color: var(--blue-300);
135
+ }
136
+ 100% {
137
+ opacity: 0;
138
+ color: var(--yellow-600);
139
+ }
140
+ }
141
+
142
+ @keyframes _229P7 {
143
+ 0% {
144
+ opacity: 1;
145
+ color: var(--blue-300);
146
+ }
147
+ 100% {
148
+ opacity: 0;
149
+ color: var(--yellow-600);
150
+ }
151
+ }
152
+
153
+ @-webkit-keyframes _2cX7o {
154
+ 0% {
155
+ opacity: 0;
156
+ transform: translateX(-34px);
157
+ border-radius: 48px;
158
+ background-color: var(--yellow-600);
159
+ }
160
+ 40% {
161
+ border-radius: 0;
162
+ }
163
+ 50% {
164
+ opacity: 1;
165
+ transform: translateX(0);
166
+ background-color: var(--red-600);
167
+ }
168
+ 60% {
169
+ border-radius: 0;
170
+ }
171
+ 100% {
172
+ opacity: 0;
173
+ transform: translateX(34px);
174
+ border-radius: 48px;
175
+ background-color: var(--yellow-600);
176
+ }
177
+ }
178
+
179
+ @keyframes _2cX7o {
180
+ 0% {
181
+ opacity: 0;
182
+ transform: translateX(-34px);
183
+ border-radius: 48px;
184
+ background-color: var(--yellow-600);
185
+ }
186
+ 40% {
187
+ border-radius: 0;
188
+ }
189
+ 50% {
190
+ opacity: 1;
191
+ transform: translateX(0);
192
+ background-color: var(--red-600);
193
+ }
194
+ 60% {
195
+ border-radius: 0;
196
+ }
197
+ 100% {
198
+ opacity: 0;
199
+ transform: translateX(34px);
200
+ border-radius: 48px;
201
+ background-color: var(--yellow-600);
202
+ }
203
+ }
204
+
205
+ ._D8SjB {
206
+ border: none;
207
+ background-color: var(--white);
208
+ color: var(--blue-300);
209
+ width: 100%;
210
+ max-height: 100%;
211
+ height: 100%;
212
+ position: relative;
213
+ }
214
+
215
+ ._ocM9x {
216
+ padding: 24px;
217
+ width: 100%;
218
+ height: 100%;
219
+ }
220
+
221
+ ._1GP2F {
222
+ overflow-y: auto;
223
+ }
224
+
225
+ ._1yxCb {
226
+ position: fixed;
227
+ top: 0;
228
+ left: 0;
229
+ right: 0;
230
+ bottom: 0;
231
+ display: flex;
232
+ align-items: center;
233
+ justify-content: center;
234
+ background-color: rgba(0, 0, 0, 0.3);
235
+ z-index: 99999;
236
+ }
237
+
238
+ ._12LLh {
239
+ display: flex;
240
+ justify-content: flex-end;
241
+ position: absolute;
242
+ top: 24px;
243
+ right: 24px;
244
+ z-index: 1;
245
+ }
246
+
247
+ ._3YRro {
248
+ border: 0;
249
+ background-color: var(--blue-300);
250
+ border-radius: 50%;
251
+ display: flex;
252
+ justify-content: center;
253
+ align-items: center;
254
+ cursor: pointer;
255
+ padding: 4px;
256
+ }
257
+
258
+ @media screen and (min-width: 800px) {
259
+ ._D8SjB {
260
+ border-radius: 8px;
261
+ width: 800px;
262
+ height: 550px;
263
+ }
264
+ ._1GP2F {
265
+ max-height: 100vh;
266
+ overflow: hidden;
267
+ }
268
+
269
+ ._ocM9x {
270
+ padding: 32px;
271
+ }
272
+ }
273
+
274
+ ._1l2Oa {
275
+ display: flex;
276
+ flex-wrap: wrap;
277
+ flex-direction: row;
278
+ justify-content: center;
279
+ margin-bottom: 24px;
280
+ }
281
+
282
+ ._1l2Oa > button {
283
+ position: relative;
284
+ height: 50px;
285
+ width: 50px;
286
+ margin: 0 4px 8px;
287
+ border: 1px solid var(--gray-300);
288
+ border-radius: 8px;
289
+ font-family: 'Eina04', sans-serif;
290
+ font-size: 18px;
291
+ line-height: 150%;
292
+ font-weight: 600;
293
+ color: var(--blue-400);
294
+ display: flex;
295
+ justify-content: center;
296
+ align-items: center;
297
+ overflow: hidden;
298
+ cursor: pointer;
299
+ background-color: var(--white);
300
+ transition: all 0.1s ease;
301
+ }
302
+
303
+ ._1l2Oa > button::after {
304
+ content: '';
305
+ width: 100%;
306
+ height: 4px;
307
+ position: absolute;
308
+ bottom: 0;
309
+ }
310
+
311
+ ._1l2Oa > button._3rue7 {
312
+ background-color: var(--blue-300);
313
+ color: var(--white);
314
+ border: 0;
315
+ }
316
+ ._1l2Oa > button._3rue7::after {
317
+ background-color: var(--red-600);
318
+ }
319
+
320
+ ._MPKjS {
321
+ padding: 32px 24px;
322
+ margin-bottom: 40px;
323
+ border-top: 1px solid var(--gray-300);
324
+ border-bottom: 1px solid var(--gray-300);
325
+ }
326
+
327
+ ._1A7Qv {
328
+ display: flex;
329
+ justify-content: space-between;
330
+ line-height: 150%;
331
+ margin-bottom: 4px;
332
+ }
333
+
334
+ ._14Ejo {
335
+ font-family: 'Eina04', sans-serif;
336
+ font-weight: 600;
337
+ font-size: 18px;
338
+ }
339
+
340
+ ._1ZIgu {
341
+ font-family: 'Eina04', sans-serif;
342
+ font-weight: 600;
343
+ font-size: 14px;
344
+ margin-bottom: 24px;
345
+ }
346
+
347
+ ._1BUr8 {
348
+ margin-top: 8px;
349
+ }
350
+
351
+ @media (min-width: 800px) {
352
+ ._MPKjS {
353
+ overflow-y: auto;
354
+ margin: 0;
355
+ border-bottom: 1px solid transparent;
356
+ height: 100%;
357
+ }
358
+ }
359
+
360
+ ._180ro {
361
+ display: flex;
362
+ flex-direction: column;
363
+ margin-bottom: 40px;
364
+ padding: 0 24px;
365
+ }
366
+
367
+ ._1HqCO {
368
+ display: flex;
369
+ align-items: center;
370
+ margin-bottom: 16px;
371
+ line-height: 180%;
372
+ }
373
+
374
+ ._3B8wx {
375
+ flex: 0 0 30px;
376
+ height: 30px;
377
+ line-height: 30px;
378
+ display: flex;
379
+ justify-content: center;
380
+ align-items: center;
381
+ border-radius: 50%;
382
+ background-color: var(--blue-300);
383
+ color: var(--white);
384
+ margin-right: 16px;
385
+ }
386
+
387
+ @media (min-width: 800px) {
388
+ ._180ro {
389
+ margin: 0;
390
+ padding: 0;
391
+ }
392
+ }
393
+
394
+ ._3Oyv_ {
395
+ width: 100%;
396
+ display: flex;
397
+ align-items: flex-end;
398
+ justify-content: center;
399
+ flex: 1;
400
+ padding-bottom: 64px;
401
+ }
402
+
403
+ @media (min-width: 800px) {
404
+ ._3Oyv_ {
405
+ padding-bottom: 0;
406
+ }
407
+ }
408
+
409
+ ._3ERx- {
410
+ font-family: 'Eina04', sans-serif;
411
+ font-weight: 600;
412
+ font-size: 18px;
413
+ line-height: 150%;
414
+ margin: 24px 0;
415
+ color: var(--blue-400);
416
+ text-align: center;
417
+ }
418
+
419
+ ._3ERx- > span {
420
+ background-color: rgba(253, 175, 111, 0.5);
421
+ border-radius: 2px;
422
+ padding: 8px 4px 2px 4px;
423
+ }
424
+
425
+ @media (min-width: 800px) {
426
+ ._3ERx- {
427
+ font-size: 24px;
428
+ text-align: start;
429
+ margin: 0 0 24px 0;
430
+ }
431
+ }
432
+
433
+ ._21g6u {
434
+ display: flex;
435
+ height: 100%;
436
+ flex-direction: row;
437
+ }
438
+
439
+ ._3zaP5 {
440
+ height: 100%;
441
+ display: flex;
442
+ flex-direction: column;
443
+ justify-content: space-between;
444
+ width: 100%;
445
+ }
446
+
447
+ ._2SBRC {
448
+ max-width: 300px;
449
+ padding-right: 24px;
450
+ }
451
+
452
+ ._17qNJ {
453
+ height: 100%;
454
+ display: flex;
455
+ align-items: center;
456
+ text-align: center;
457
+ font-size: 20px;
458
+ }
459
+
460
+ ._2oTJq {
461
+ height: 100%;
462
+ display: flex;
463
+ align-items: center;
464
+ justify-content: center;
465
+ }
466
+
467
+ ._2G7Ch {
468
+ height: 100%;
469
+ display: flex;
470
+ flex-direction: column;
471
+ }
472
+
473
+ ._2SwwZ {
474
+ display: flex;
475
+ flex-direction: column;
476
+ align-items: flex-start;
477
+ width: 100%;
478
+ }
479
+
480
+ ._2qODo {
481
+ width: 100%;
482
+ height: 20px;
483
+ background-color: #f7f9fb;
484
+ border-radius: 2px;
485
+ }
486
+ ._2YO01 {
487
+ width: 60%;
488
+ height: 15px;
489
+ margin-top: 16px;
490
+ background-color: #f7f9fb;
491
+ border-radius: 2px;
492
+ }
493
+
494
+ ._TSkFv {
495
+ width: 368px;
496
+ max-width: 100%;
497
+ background-color: transparent;
498
+ border: 1px solid var(--gray-300);
499
+ display: flex;
500
+ flex-direction: column;
501
+ align-items: flex-start;
502
+ padding: 12px;
503
+ }
504
+
505
+ ._TSkFv:focus,
506
+ ._TSkFv:focus-visible {
507
+ outline: none;
508
+ }
509
+
510
+ ._LJ4nZ {
511
+ color: var(--blue-300);
512
+ margin-right: 12px;
513
+ }
514
+ ._bMClc {
515
+ display: flex;
516
+ flex-direction: row;
517
+ align-items: flex-start;
518
+ }
519
+ ._17c_S {
520
+ display: flex;
521
+ flex-direction: row;
522
+ align-items: flex-start;
523
+ max-width: 310px;
524
+ flex-wrap: wrap;
525
+ }
526
+ ._2Kqjn {
527
+ font-size: 12px;
528
+ font-family: 'Eina04', sans-serif;
529
+ font-weight: 600;
530
+ color: var(--blue-300);
531
+ line-height: 20px;
532
+ display: flex;
533
+ flex-direction: column;
534
+ align-items: center;
535
+ text-align: center;
536
+ height: 22px;
537
+ width: 30px;
538
+ margin: 0 4px;
539
+ }
540
+ ._2Kqjn._3dG_J {
541
+ border-bottom: 3px solid var(--blue-300);
542
+ }
543
+
544
+ ._2Kqjn._3dG_J._3O1bg {
545
+ border-bottom-color: var(--gray-600);
546
+ cursor: not-allowed;
547
+ }
548
+
549
+ ._25GrF {
550
+ font-family: Public Sans;
551
+ font-style: normal;
552
+ font-weight: normal;
553
+ font-size: 12px;
554
+ line-height: 180%;
555
+ color: var(--blue-300);
556
+ text-align: left;
557
+ margin-top: 8px;
558
+ }
559
+ ._3O1bg {
560
+ color: var(--gray-600);
561
+ }
562
+ ._30j1O {
563
+ overflow: hidden;
564
+ align-items: center;
565
+ }
566
+ ._R0YlN {
567
+ align-items: center;
568
+ line-height: 100%;
569
+ }
570
+ ._2kGhu {
571
+ font-family: Public Sans;
572
+ font-style: normal;
573
+ font-weight: normal;
574
+ font-size: 12px;
575
+ color: var(--blue-300);
576
+ }
577
+ ._73d_Y {
578
+ cursor: pointer;
579
+ text-decoration: underline;
580
+ }
581
+ ._1ZDMS {
582
+ align-items: center;
583
+ }
584
+
585
+ ._UksZa {
586
+ cursor: pointer;
587
+ }
588
+ ._1lr-q {
589
+ cursor: not-allowed;
590
+ }