@alma/widgets 2.6.0 → 2.8.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 (38) hide show
  1. package/dist/raw/widgets.css +14 -0
  2. package/dist/raw/widgets.js +267 -65
  3. package/dist/raw/widgets.js.map +1 -1
  4. package/dist/raw/widgets.m.js +267 -65
  5. package/dist/raw/widgets.m.js.map +1 -1
  6. package/dist/raw/widgets.modern.js +260 -67
  7. package/dist/raw/widgets.modern.js.map +1 -1
  8. package/dist/raw/widgets.umd.js +267 -65
  9. package/dist/raw/widgets.umd.js.map +1 -1
  10. package/dist/types/Widgets/EligibilityModal/DesktopModal/index.d.ts +2 -0
  11. package/dist/types/Widgets/EligibilityModal/MobileModal/index.d.ts +2 -0
  12. package/dist/types/Widgets/EligibilityModal/ModalContainer.d.ts +2 -1
  13. package/dist/types/Widgets/EligibilityModal/{modal.test.d.ts → __tests__/Basics.test.d.ts} +0 -0
  14. package/dist/types/Widgets/EligibilityModal/__tests__/Cards.test.d.ts +1 -0
  15. package/dist/types/Widgets/EligibilityModal/__tests__/ModalContainer.test.d.ts +1 -0
  16. package/dist/types/Widgets/EligibilityModal/__tests__/Plans.test.d.ts +1 -0
  17. package/dist/types/Widgets/EligibilityModal/classNames.const.d.ts +1 -0
  18. package/dist/types/Widgets/EligibilityModal/components/Cards/index.d.ts +7 -0
  19. package/dist/types/Widgets/EligibilityModal/index.d.ts +2 -1
  20. package/dist/types/Widgets/PaymentPlans/__tests__/Monochrome.test.d.ts +1 -0
  21. package/dist/types/Widgets/PaymentPlans/index.d.ts +3 -1
  22. package/dist/types/assets/Logo.d.ts +3 -2
  23. package/dist/types/assets/cards/amex.d.ts +3 -0
  24. package/dist/types/assets/cards/cb.d.ts +3 -0
  25. package/dist/types/assets/cards/mastercard.d.ts +3 -0
  26. package/dist/types/assets/cards/visa.d.ts +3 -0
  27. package/dist/types/types.d.ts +8 -4
  28. package/dist/types/widgets_controller.d.ts +1 -2
  29. package/dist/widgets.css +2 -1
  30. package/dist/widgets.js +1 -1
  31. package/dist/widgets.js.map +1 -1
  32. package/dist/widgets.m.js +1 -1
  33. package/dist/widgets.m.js.map +1 -1
  34. package/dist/widgets.modern.js +1 -1
  35. package/dist/widgets.modern.js.map +1 -1
  36. package/dist/widgets.umd.js +1 -1
  37. package/dist/widgets.umd.js.map +1 -1
  38. package/package.json +1 -1
@@ -6296,7 +6296,7 @@
6296
6296
  "eligibility-modal.title": "<highlighted>Bezahlen Sie in Raten</highlighted> per Kreditkarte mit Alma.",
6297
6297
  "eligibility-modal.title-deferred": "<highlighted>Bezahlen Sie in Raten</highlighted> oder später per Kreditkarte mit Alma.",
6298
6298
  "eligibility-modal.total": "Insgesamt",
6299
- "installments.today": "Heutzutage",
6299
+ "installments.today": "Heute",
6300
6300
  "payment-plan-strings.day-abbreviation": "J{numberOfDeferredDays}",
6301
6301
  "payment-plan-strings.default-message": "Bezahlen Sie in Raten mit Alma",
6302
6302
  "payment-plan-strings.deferred": "{totalAmount} zu zahlen am {dueDate}",
@@ -6339,7 +6339,7 @@
6339
6339
  "eligibility-modal.credit-cost": "Coste de crédito (incl. en el total)",
6340
6340
  "eligibility-modal.credit-cost-amount": "{creditCost} (TAE {TAEG})",
6341
6341
  "eligibility-modal.no-eligibility": "Uy, parece que la simulación no ha funcionado.",
6342
- "eligibility-modal.title": "<highlighted>Paga a plazos</highlighted> con tarjeta de crédito con Alma.",
6342
+ "eligibility-modal.title": "<highlighted>Paga a plazos</highlighted> con tu tarjeta, a través de Alma.",
6343
6343
  "eligibility-modal.title-deferred": "<highlighted>Paga a plazos</highlighted> o más adelante con tu tarjeta, a través de Alma.",
6344
6344
  "eligibility-modal.total": "Total",
6345
6345
  "installments.today": "Hoy",
@@ -6385,8 +6385,8 @@
6385
6385
  "eligibility-modal.credit-cost": "Di cui commissioni",
6386
6386
  "eligibility-modal.credit-cost-amount": "{creditCost} (TAEG {TAEG})",
6387
6387
  "eligibility-modal.no-eligibility": "Ops, sembra che la simulazione non abbia funzionato.",
6388
- "eligibility-modal.title": "<highlighted>Paga a rate</highlighted> con carta di credito con Alma.",
6389
- "eligibility-modal.title-deferred": "<highlighted>Paga a rate</highlighted> e posticipa il pagamento con Alma, senza interessi.",
6388
+ "eligibility-modal.title": "<highlighted>Paga a rate</highlighted> con Alma, senza interessi.",
6389
+ "eligibility-modal.title-deferred": "<highlighted>Paga a rate</highlighted> o posticipa il pagamento con Alma, senza interessi.",
6390
6390
  "eligibility-modal.total": "Totale",
6391
6391
  "installments.today": "Oggi",
6392
6392
  "payment-plan-strings.day-abbreviation": "G{numberOfDeferredDays}",
@@ -6427,9 +6427,6 @@
6427
6427
  case Locale.fr:
6428
6428
  return messagesFR;
6429
6429
 
6430
- case Locale.en:
6431
- return messagesEN;
6432
-
6433
6430
  case Locale.es:
6434
6431
  return messagesES;
6435
6432
 
@@ -6444,6 +6441,7 @@
6444
6441
  case Locale['nl-NL']:
6445
6442
  return messagesNL;
6446
6443
 
6444
+ case Locale.en:
6447
6445
  default:
6448
6446
  return messagesEN;
6449
6447
  }
@@ -16781,6 +16779,7 @@
16781
16779
  scheduleDetails: prefix + '-schedule-details',
16782
16780
  scheduleTotal: prefix + '-schedule-total',
16783
16781
  scheduleCredit: prefix + '-schedule-credit',
16782
+ cardContainer: prefix + '-card-logos',
16784
16783
  summary: prefix + '-summary'
16785
16784
  };
16786
16785
 
@@ -16798,6 +16797,7 @@
16798
16797
  scrollable = _ref$scrollable === void 0 ? false : _ref$scrollable,
16799
16798
  props = _objectWithoutPropertiesLoose(_ref, _excluded);
16800
16799
 
16800
+ /* istanbul ignore next */
16801
16801
  Modal.setAppElement('body');
16802
16802
  return /*#__PURE__*/react.createElement(Modal, Object.assign({
16803
16803
  className: classnames(s$1.modal, className),
@@ -18400,16 +18400,187 @@
18400
18400
  }))));
18401
18401
  };
18402
18402
 
18403
- var s$4 = {"list":"_180ro","listItem":"_1HqCO","bullet":"_3B8wx"};
18403
+ var AmexCard = function AmexCard() {
18404
+ return /*#__PURE__*/react.createElement("svg", {
18405
+ xmlns: "http://www.w3.org/2000/svg",
18406
+ width: "24",
18407
+ height: "16",
18408
+ viewBox: "0 0 24 16"
18409
+ }, /*#__PURE__*/react.createElement("defs", null, /*#__PURE__*/react.createElement("linearGradient", {
18410
+ id: "cardamex",
18411
+ x1: "10.914%",
18412
+ x2: "87.432%",
18413
+ y1: "86.279%",
18414
+ y2: "15.035%"
18415
+ }, /*#__PURE__*/react.createElement("stop", {
18416
+ offset: "0%",
18417
+ stopColor: "#3FA9F5"
18418
+ }), /*#__PURE__*/react.createElement("stop", {
18419
+ offset: "100%",
18420
+ stopColor: "#0071BC"
18421
+ }))), /*#__PURE__*/react.createElement("g", {
18422
+ fill: "none",
18423
+ fillRule: "evenodd"
18424
+ }, /*#__PURE__*/react.createElement("path", {
18425
+ fill: "url(#cardamex)",
18426
+ fillRule: "nonzero",
18427
+ d: "M22.559 16H1.379C.627 16 0 15.392 0 14.662V1.338C0 .608.627 0 1.379 0H22.62C23.373 0 24 .608 24 1.338v13.324c-.063.73-.627 1.338-1.441 1.338z"
18428
+ }), /*#__PURE__*/react.createElement("g", {
18429
+ fill: "#FFF"
18430
+ }, /*#__PURE__*/react.createElement("path", {
18431
+ d: "M10.115 8.711L8.889 6.044H7.295v3.852L5.517 6.044H4.17l-1.778 4.03h1.103l.368-.889h2.023l.368.89h2.084V7.11l1.349 2.963h.92l1.348-2.904v2.904h.98v-4.03H11.28l-1.165 2.667zm-5.272-.474H4.23l.613-1.422v.06l.613 1.362h-.613z"
18432
+ }), /*#__PURE__*/react.createElement("path", {
18433
+ fillRule: "nonzero",
18434
+ d: "M19.372 7.94l.735-.77 1.042-1.185h-1.287L18.697 7.23l-1.164-1.245h-3.985v3.97h3.923l1.226-1.303 1.165 1.304h1.287L20.107 8.71l-.735-.77zM16.92 9.186h-2.33v-.77h2.268v-.77H14.59v-.712h2.33L18.084 8 16.92 9.185z"
18435
+ }))));
18436
+ };
18437
+
18438
+ var VisaCard = function VisaCard() {
18439
+ return /*#__PURE__*/react.createElement("svg", {
18440
+ xmlns: "http://www.w3.org/2000/svg",
18441
+ width: "24",
18442
+ height: "16",
18443
+ viewBox: "0 0 24 16"
18444
+ }, /*#__PURE__*/react.createElement("g", {
18445
+ fill: "none",
18446
+ fillRule: "nonzero"
18447
+ }, /*#__PURE__*/react.createElement("path", {
18448
+ fill: "#FCFCFC",
18449
+ d: "M22.684 16H1.38C.627 16 0 15.39 0 14.656V1.344C0 .61.627 0 1.379 0H22.62C23.373 0 24 .61 24 1.344v13.374c0 .671-.564 1.282-1.316 1.282z"
18450
+ }), ' ', /*#__PURE__*/react.createElement("path", {
18451
+ fill: "#005098",
18452
+ d: "M8.889 10.726l.948-5.393h1.482l-.949 5.393zM15.704 5.452a3.658 3.658 0 0 0-1.304-.237c-1.481 0-2.489.71-2.489 1.778 0 .77.711 1.185 1.304 1.481.592.237.77.415.77.652 0 .355-.474.533-.889.533-.592 0-.889-.059-1.363-.296l-.177-.06-.178 1.186c.355.178 1.007.296 1.659.296 1.54 0 2.548-.71 2.548-1.837 0-.592-.415-1.067-1.244-1.481-.534-.237-.83-.415-.83-.652 0-.237.237-.474.83-.474.474 0 .83.118 1.126.178l.118.059.119-1.126M19.496 5.333H18.37c-.355 0-.592.119-.77.474l-2.193 4.919h1.541s.237-.652.296-.83h1.897c.059.178.178.83.178.83h1.362l-1.185-5.393zM17.66 8.77l.593-1.481s.118-.296.178-.533l.118.474s.296 1.303.356 1.54h-1.245zM7.644 5.333L6.222 9.007l-.178-.77C5.748 7.348 4.92 6.459 4.03 5.985l1.303 4.682h1.541l2.311-5.393h-1.54"
18453
+ }), /*#__PURE__*/react.createElement("path", {
18454
+ fill: "#F6A500",
18455
+ d: "M4.919 5.333h-2.37v.119c1.836.474 3.08 1.54 3.555 2.844L5.57 5.807c-.118-.414-.355-.474-.651-.474"
18456
+ }), /*#__PURE__*/react.createElement("path", {
18457
+ fill: "#0A5296",
18458
+ d: "M23.937 3.23H0V1.316C0 .598.627 0 1.379 0H22.62C23.373 0 24 .598 24 1.316V3.23h-.063z"
18459
+ }), /*#__PURE__*/react.createElement("path", {
18460
+ fill: "#F4A428",
18461
+ d: "M.063 13H24v1.8c0 .655-.625 1.2-1.375 1.2H1.375C.625 16 0 15.455 0 14.8V13h.063z"
18462
+ })));
18463
+ };
18464
+
18465
+ var MasterCard = function MasterCard() {
18466
+ return /*#__PURE__*/react.createElement("svg", {
18467
+ width: "24px",
18468
+ height: "16px",
18469
+ viewBox: "0 0 24 16",
18470
+ version: "1.1",
18471
+ xmlns: "http://www.w3.org/2000/svg"
18472
+ }, /*#__PURE__*/react.createElement("g", {
18473
+ id: "Parcours-1C-B",
18474
+ stroke: "none",
18475
+ strokeWidth: "1",
18476
+ fill: "none",
18477
+ fillRule: "evenodd"
18478
+ }, /*#__PURE__*/react.createElement("g", {
18479
+ id: "mobile-1C-Paiement-V1",
18480
+ transform: "translate(-269.000000, -313.000000)"
18481
+ }, /*#__PURE__*/react.createElement("g", {
18482
+ id: "mastercard",
18483
+ transform: "translate(269.000000, 313.000000)"
18484
+ }, /*#__PURE__*/react.createElement("rect", {
18485
+ id: "Rectangle",
18486
+ fill: "#FFFFFF",
18487
+ x: "0",
18488
+ y: "0",
18489
+ width: "24",
18490
+ height: "16",
18491
+ rx: "1"
18492
+ }), /*#__PURE__*/react.createElement("g", {
18493
+ id: "Group-6",
18494
+ transform: "translate(4.000000, 3.000000)"
18495
+ }, /*#__PURE__*/react.createElement("circle", {
18496
+ id: "Oval-4-Copy",
18497
+ fill: "#EA001B",
18498
+ cx: "5.05263158",
18499
+ cy: "5.05263158",
18500
+ r: "5.05263158"
18501
+ }), /*#__PURE__*/react.createElement("circle", {
18502
+ id: "Oval-4",
18503
+ fillOpacity: "0.25",
18504
+ fill: "#F79F1A",
18505
+ cx: "10.9473684",
18506
+ cy: "5.05263158",
18507
+ r: "5.05263158"
18508
+ }), /*#__PURE__*/react.createElement("circle", {
18509
+ id: "Oval-4-Copy-2",
18510
+ fillOpacity: "0.9",
18511
+ fill: "#F79F1A",
18512
+ cx: "10.9473684",
18513
+ cy: "5.05263158",
18514
+ r: "5.05263158"
18515
+ }), /*#__PURE__*/react.createElement("circle", {
18516
+ id: "Oval-4-Copy-3",
18517
+ fillOpacity: "0.3",
18518
+ fill: "#EA001B",
18519
+ cx: "5.05263158",
18520
+ cy: "5.05263158",
18521
+ r: "5.05263158"
18522
+ }))))));
18523
+ };
18524
+
18525
+ var CbCard = function CbCard() {
18526
+ return /*#__PURE__*/react.createElement("svg", {
18527
+ xmlns: "http://www.w3.org/2000/svg",
18528
+ width: "24",
18529
+ height: "16",
18530
+ viewBox: "0 0 24 16"
18531
+ }, /*#__PURE__*/react.createElement("defs", null, /*#__PURE__*/react.createElement("linearGradient", {
18532
+ id: "cardcb",
18533
+ x1: "5.842%",
18534
+ x2: "95.393%",
18535
+ y1: "81.753%",
18536
+ y2: "17.344%"
18537
+ }, /*#__PURE__*/react.createElement("stop", {
18538
+ offset: "0%",
18539
+ stopColor: "#39B54A"
18540
+ }), ' ', /*#__PURE__*/react.createElement("stop", {
18541
+ offset: "100%",
18542
+ stopColor: "#0A5296"
18543
+ }))), /*#__PURE__*/react.createElement("g", {
18544
+ fill: "none",
18545
+ fillRule: "nonzero"
18546
+ }, /*#__PURE__*/react.createElement("path", {
18547
+ fill: "url(#cardcb)",
18548
+ d: "M22.621 16H1.38C.627 16 0 15.392 0 14.662V1.338C0 .608.627 0 1.379 0H22.62C23.373 0 24 .608 24 1.338v13.324c-.063.73-.627 1.338-1.379 1.338z"
18549
+ }), /*#__PURE__*/react.createElement("g", {
18550
+ fill: "#FFF"
18551
+ }, /*#__PURE__*/react.createElement("path", {
18552
+ d: "M19.094 4.03h-6.437V8h6.498c1.165 0 2.084-.889 2.084-2.015-.06-1.066-.98-1.955-2.145-1.955zM19.094 8.593h-6.437v3.97h6.498c1.165 0 2.084-.889 2.084-2.015-.06-1.067-.98-1.955-2.145-1.955zM7.017 8.06h4.966c-.245-2.371-2.391-4.267-4.966-4.267-2.758 0-5.027 2.074-5.027 4.681s2.269 4.682 5.027 4.682c2.698 0 4.904-2.015 5.027-4.563H7.017v-.534z"
18553
+ }))));
18554
+ };
18555
+
18556
+ var s$4 = {"cardContainer":"_1N3yO","card":"_83cGn"};
18557
+
18558
+ var Cards = function Cards(_ref) {
18559
+ var cards = _ref.cards;
18560
+ // We transform to a Set and back to avoid duplicate values (ex : amex, amex)
18561
+ var uniqueCards = Array.from(new Set(cards));
18562
+ return /*#__PURE__*/react.createElement("div", {
18563
+ "data-testid": "card-logos",
18564
+ className: classnames(s$4.cardContainer, STATIC_CUSTOMISATION_CLASSES.cardContainer)
18565
+ }, uniqueCards.map(function (card) {
18566
+ return /*#__PURE__*/react.createElement("div", {
18567
+ key: card,
18568
+ className: s$4.card,
18569
+ "data-testid": "card-logo-" + card
18570
+ }, card === 'cb' && /*#__PURE__*/react.createElement(CbCard, null), card === 'amex' && /*#__PURE__*/react.createElement(AmexCard, null), card === 'mastercard' && /*#__PURE__*/react.createElement(MasterCard, null), card === 'visa' && /*#__PURE__*/react.createElement(VisaCard, null));
18571
+ }));
18572
+ };
18573
+
18574
+ var s$5 = {"list":"_180ro","listItem":"_1HqCO","bullet":"_3B8wx"};
18404
18575
 
18405
18576
  var Info = function Info() {
18406
18577
  return /*#__PURE__*/react.createElement("div", {
18407
- className: classnames(s$4.list, STATIC_CUSTOMISATION_CLASSES.info),
18578
+ className: classnames(s$5.list, STATIC_CUSTOMISATION_CLASSES.info),
18408
18579
  "data-testid": "modal-info-element"
18409
18580
  }, /*#__PURE__*/react.createElement("div", {
18410
- className: s$4.listItem
18581
+ className: s$5.listItem
18411
18582
  }, /*#__PURE__*/react.createElement("div", {
18412
- className: s$4.bullet
18583
+ className: s$5.bullet
18413
18584
  }, "1"), /*#__PURE__*/react.createElement("div", {
18414
18585
  className: STATIC_CUSTOMISATION_CLASSES.infoMessage
18415
18586
  }, /*#__PURE__*/react.createElement(MemoizedFormattedMessage, {
@@ -18421,9 +18592,9 @@
18421
18592
  }
18422
18593
  }
18423
18594
  }))), /*#__PURE__*/react.createElement("div", {
18424
- className: s$4.listItem
18595
+ className: s$5.listItem
18425
18596
  }, /*#__PURE__*/react.createElement("div", {
18426
- className: s$4.bullet
18597
+ className: s$5.bullet
18427
18598
  }, "2"), /*#__PURE__*/react.createElement("div", {
18428
18599
  className: STATIC_CUSTOMISATION_CLASSES.infoMessage
18429
18600
  }, /*#__PURE__*/react.createElement(MemoizedFormattedMessage, {
@@ -18435,9 +18606,9 @@
18435
18606
  }
18436
18607
  }
18437
18608
  }))), /*#__PURE__*/react.createElement("div", {
18438
- className: s$4.listItem
18609
+ className: s$5.listItem
18439
18610
  }, /*#__PURE__*/react.createElement("div", {
18440
- className: s$4.bullet
18611
+ className: s$5.bullet
18441
18612
  }, "3"), /*#__PURE__*/react.createElement("div", {
18442
18613
  className: STATIC_CUSTOMISATION_CLASSES.infoMessage
18443
18614
  }, /*#__PURE__*/react.createElement(MemoizedFormattedMessage, {
@@ -18451,12 +18622,21 @@
18451
18622
  }))));
18452
18623
  };
18453
18624
 
18625
+ var COLORS;
18626
+
18627
+ (function (COLORS) {
18628
+ COLORS["ALMA"] = "#FF414D";
18629
+ COLORS["MONOCHROME"] = "#00425D";
18630
+ })(COLORS || (COLORS = {}));
18631
+
18454
18632
  function LogoIcon(_ref) {
18455
- var _ref$color = _ref.color,
18456
- color = _ref$color === void 0 ? '#00425D' : _ref$color,
18457
- _ref$underlineColor = _ref.underlineColor,
18458
- underlineColor = _ref$underlineColor === void 0 ? '#00425D' : _ref$underlineColor,
18459
- className = _ref.className;
18633
+ var className = _ref.className,
18634
+ _ref$color = _ref.color,
18635
+ color = _ref$color === void 0 ? COLORS.MONOCHROME : _ref$color,
18636
+ _ref$monochrome = _ref.monochrome,
18637
+ monochrome = _ref$monochrome === void 0 ? true : _ref$monochrome,
18638
+ underlineColor = _ref.underlineColor;
18639
+ var defaultUnderlineColor = monochrome ? COLORS.MONOCHROME : COLORS.ALMA;
18460
18640
  return /*#__PURE__*/react.createElement("svg", {
18461
18641
  className: className,
18462
18642
  width: "35",
@@ -18480,26 +18660,26 @@
18480
18660
  y: "20",
18481
18661
  width: "40",
18482
18662
  height: "3",
18483
- fill: underlineColor
18663
+ fill: underlineColor || defaultUnderlineColor
18484
18664
  }));
18485
18665
  }
18486
18666
 
18487
- var s$5 = {"logo":"_3Oyv_"};
18667
+ var s$6 = {"logo":"_3Oyv_"};
18488
18668
 
18489
18669
  var Logo = function Logo() {
18490
18670
  return /*#__PURE__*/react.createElement("div", {
18491
- className: s$5.logo
18671
+ className: s$6.logo
18492
18672
  }, /*#__PURE__*/react.createElement(LogoIcon, {
18493
18673
  underlineColor: "#FF414D"
18494
18674
  }));
18495
18675
  };
18496
18676
 
18497
- var s$6 = {"title":"_3ERx-"};
18677
+ var s$7 = {"title":"_3ERx-"};
18498
18678
 
18499
18679
  var Title = function Title(_ref) {
18500
18680
  var isSomePlanDeferred = _ref.isSomePlanDeferred;
18501
18681
  return /*#__PURE__*/react.createElement("div", {
18502
- className: classnames(s$6.title, STATIC_CUSTOMISATION_CLASSES.title),
18682
+ className: classnames(s$7.title, STATIC_CUSTOMISATION_CLASSES.title),
18503
18683
  "data-testid": "modal-title-element"
18504
18684
  }, isSomePlanDeferred ? /*#__PURE__*/react.createElement(MemoizedFormattedMessage, {
18505
18685
  id: 'eligibility-modal.title-deferred',
@@ -18520,43 +18700,50 @@
18520
18700
  }));
18521
18701
  };
18522
18702
 
18523
- var s$7 = {"container":"_21g6u","block":"_3zaP5","left":"_2SBRC"};
18703
+ var s$8 = {"container":"_21g6u","block":"_3zaP5","left":"_2SBRC"};
18524
18704
 
18525
18705
  var DesktopModal = function DesktopModal(_ref) {
18526
18706
  var children = _ref.children,
18527
- isSomePlanDeferred = _ref.isSomePlanDeferred;
18707
+ isSomePlanDeferred = _ref.isSomePlanDeferred,
18708
+ cards = _ref.cards;
18528
18709
  return /*#__PURE__*/react.createElement("div", {
18529
- className: s$7.container,
18710
+ className: s$8.container,
18530
18711
  "data-testid": "modal-container"
18531
18712
  }, /*#__PURE__*/react.createElement("div", {
18532
- className: classnames([s$7.block, s$7.left, STATIC_CUSTOMISATION_CLASSES.leftSide])
18713
+ className: classnames([s$8.block, s$8.left, STATIC_CUSTOMISATION_CLASSES.leftSide])
18533
18714
  }, /*#__PURE__*/react.createElement(Title, {
18534
18715
  isSomePlanDeferred: isSomePlanDeferred
18535
- }), /*#__PURE__*/react.createElement(Info, null), /*#__PURE__*/react.createElement(Logo, null)), /*#__PURE__*/react.createElement("div", {
18536
- className: classnames(s$7.block, STATIC_CUSTOMISATION_CLASSES.rightSide)
18716
+ }), /*#__PURE__*/react.createElement(Info, null), cards && /*#__PURE__*/react.createElement(Cards, {
18717
+ cards: cards
18718
+ }), /*#__PURE__*/react.createElement(Logo, null)), /*#__PURE__*/react.createElement("div", {
18719
+ className: classnames(s$8.block, STATIC_CUSTOMISATION_CLASSES.rightSide)
18537
18720
  }, children));
18538
18721
  };
18539
18722
 
18540
- var s$8 = {"noEligibility":"_17qNJ","loader":"_2oTJq"};
18723
+ var s$9 = {"noEligibility":"_17qNJ","loader":"_2oTJq"};
18541
18724
 
18542
- var s$9 = {"container":"_2G7Ch"};
18725
+ var s$a = {"container":"_2G7Ch"};
18543
18726
 
18544
18727
  var MobileModal = function MobileModal(_ref) {
18545
18728
  var children = _ref.children,
18546
- isSomePlanDeferred = _ref.isSomePlanDeferred;
18729
+ isSomePlanDeferred = _ref.isSomePlanDeferred,
18730
+ cards = _ref.cards;
18547
18731
  return /*#__PURE__*/react.createElement("div", {
18548
- className: s$9.container,
18732
+ className: s$a.container,
18549
18733
  "data-testid": "modal-container"
18550
18734
  }, /*#__PURE__*/react.createElement(Title, {
18551
18735
  isSomePlanDeferred: isSomePlanDeferred
18552
- }), children, /*#__PURE__*/react.createElement(Info, null), /*#__PURE__*/react.createElement(Logo, null));
18736
+ }), children, /*#__PURE__*/react.createElement(Info, null), cards && /*#__PURE__*/react.createElement(Cards, {
18737
+ cards: cards
18738
+ }), /*#__PURE__*/react.createElement(Logo, null));
18553
18739
  };
18554
18740
 
18555
18741
  var EligibilityModal = function EligibilityModal(_ref) {
18556
18742
  var initialPlanIndex = _ref.initialPlanIndex,
18557
18743
  onClose = _ref.onClose,
18558
18744
  eligibilityPlans = _ref.eligibilityPlans,
18559
- status = _ref.status;
18745
+ status = _ref.status,
18746
+ cards = _ref.cards;
18560
18747
 
18561
18748
  var _useState = react.useState(initialPlanIndex || 0),
18562
18749
  currentPlanIndex = _useState[0],
@@ -18579,11 +18766,12 @@
18579
18766
  scrollable: true,
18580
18767
  isOpen: true
18581
18768
  }, /*#__PURE__*/react.createElement(ModalComponent, {
18582
- isSomePlanDeferred: isSomePlanDeferred
18769
+ isSomePlanDeferred: isSomePlanDeferred,
18770
+ cards: cards
18583
18771
  }, status === apiStatus.PENDING && /*#__PURE__*/react.createElement("div", {
18584
- className: s$8.loader
18772
+ className: s$9.loader
18585
18773
  }, /*#__PURE__*/react.createElement(LoadingIndicator, null)), status === apiStatus.SUCCESS && eligiblePlans.length === 0 && /*#__PURE__*/react.createElement("div", {
18586
- className: s$8.noEligibility
18774
+ className: s$9.noEligibility
18587
18775
  }, /*#__PURE__*/react.createElement(MemoizedFormattedMessage, {
18588
18776
  id: "eligibility-modal.no-eligibility",
18589
18777
  defaultMessage: "Oups, il semblerait que la simulation n'ait pas fonctionn\xE9."
@@ -18604,7 +18792,8 @@
18604
18792
  var purchaseAmount = _ref.purchaseAmount,
18605
18793
  apiData = _ref.apiData,
18606
18794
  configPlans = _ref.configPlans,
18607
- onClose = _ref.onClose;
18795
+ onClose = _ref.onClose,
18796
+ cards = _ref.cards;
18608
18797
 
18609
18798
  var _useFetchEligibility = useFetchEligibility(purchaseAmount, apiData, configPlans),
18610
18799
  eligibilityPlans = _useFetchEligibility[0],
@@ -18614,21 +18803,22 @@
18614
18803
  initialPlanIndex: 0,
18615
18804
  onClose: onClose,
18616
18805
  eligibilityPlans: eligibilityPlans,
18617
- status: status
18806
+ status: status,
18807
+ cards: cards
18618
18808
  });
18619
18809
  };
18620
18810
 
18621
- var s$a = {"loadingIndicator":"_2SwwZ","line1":"_2qODo","line2":"_2YO01"};
18811
+ var s$b = {"loadingIndicator":"_2SwwZ","line1":"_2qODo","line2":"_2YO01"};
18622
18812
 
18623
18813
  var Loader = function Loader(_ref) {
18624
18814
  var className = _ref.className;
18625
18815
  return /*#__PURE__*/react.createElement("div", {
18626
- className: classnames(s$a.loadingIndicator, className),
18816
+ className: classnames(s$b.loadingIndicator, className),
18627
18817
  "data-testid": "loader"
18628
18818
  }, /*#__PURE__*/react.createElement("div", {
18629
- className: s$a.line1
18819
+ className: s$b.line1
18630
18820
  }), /*#__PURE__*/react.createElement("div", {
18631
- className: s$a.line2
18821
+ className: s$b.line2
18632
18822
  }));
18633
18823
  };
18634
18824
 
@@ -18721,7 +18911,7 @@
18721
18911
  activeOption: prefix$1 + '-active-option'
18722
18912
  };
18723
18913
 
18724
- var s$b = {"widgetButton":"_TSkFv","logo":"_LJ4nZ","primaryContainer":"_bMClc","paymentPlans":"_17c_S","plan":"_2Kqjn","active":"_3dG_J","notEligible":"_3O1bg","info":"_25GrF","loader":"_30j1O","error":"_R0YlN","errorText":"_2kGhu","errorButton":"_73d_Y","pending":"_1ZDMS","clickable":"_UksZa","unClickable":"_1lr-q"};
18914
+ var s$c = {"widgetButton":"_TSkFv","logo":"_LJ4nZ","primaryContainer":"_bMClc","paymentPlans":"_17c_S","plan":"_2Kqjn","active":"_3dG_J","polychrome":"_2icEF","notEligible":"_3O1bg","info":"_25GrF","loader":"_30j1O","error":"_R0YlN","errorText":"_2kGhu","errorButton":"_73d_Y","pending":"_1ZDMS","clickable":"_UksZa","unClickable":"_1lr-q"};
18725
18915
 
18726
18916
  var VERY_LONG_TIME_IN_MS = 1000 * 3600 * 24 * 365;
18727
18917
  var DEFAULT_TRANSITION_TIME = 5500;
@@ -18729,12 +18919,14 @@
18729
18919
  var PaymentPlanWidget = function PaymentPlanWidget(_ref) {
18730
18920
  var _cx, _cx3;
18731
18921
 
18732
- var purchaseAmount = _ref.purchaseAmount,
18733
- apiData = _ref.apiData,
18922
+ var apiData = _ref.apiData,
18734
18923
  configPlans = _ref.configPlans,
18735
- transitionDelay = _ref.transitionDelay,
18736
18924
  hideIfNotEligible = _ref.hideIfNotEligible,
18737
- suggestedPaymentPlan = _ref.suggestedPaymentPlan;
18925
+ monochrome = _ref.monochrome,
18926
+ purchaseAmount = _ref.purchaseAmount,
18927
+ suggestedPaymentPlan = _ref.suggestedPaymentPlan,
18928
+ cards = _ref.cards,
18929
+ transitionDelay = _ref.transitionDelay;
18738
18930
 
18739
18931
  var _useFetchEligibility = useFetchEligibility(purchaseAmount, apiData, configPlans),
18740
18932
  eligibilityPlans = _useFetchEligibility[0],
@@ -18814,7 +19006,7 @@
18814
19006
 
18815
19007
  if (status === apiStatus.PENDING) {
18816
19008
  return /*#__PURE__*/react.createElement("div", {
18817
- className: classnames(s$b.widgetButton, s$b.pending)
19009
+ className: classnames(s$c.widgetButton, s$c.pending)
18818
19010
  }, /*#__PURE__*/react.createElement(Loader, null));
18819
19011
  }
18820
19012
 
@@ -18832,32 +19024,35 @@
18832
19024
 
18833
19025
  return /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement("div", {
18834
19026
  onClick: handleOpenModal,
18835
- className: classnames(s$b.widgetButton, (_cx = {}, _cx[s$b.clickable] = eligiblePlans.length > 0, _cx[s$b.unClickable] = eligiblePlans.length === 0, _cx), STATIC_CUSTOMISATION_CLASSES$1.container),
19027
+ className: classnames(s$c.widgetButton, (_cx = {}, _cx[s$c.clickable] = eligiblePlans.length > 0, _cx[s$c.unClickable] = eligiblePlans.length === 0, _cx), STATIC_CUSTOMISATION_CLASSES$1.container),
18836
19028
  "data-testid": "widget-button"
18837
19029
  }, /*#__PURE__*/react.createElement("div", {
18838
- className: classnames(s$b.primaryContainer, STATIC_CUSTOMISATION_CLASSES$1.eligibilityLine)
19030
+ className: classnames(s$c.primaryContainer, STATIC_CUSTOMISATION_CLASSES$1.eligibilityLine)
18839
19031
  }, /*#__PURE__*/react.createElement(LogoIcon, {
18840
- className: s$b.logo
19032
+ className: s$c.logo,
19033
+ monochrome: monochrome
18841
19034
  }), /*#__PURE__*/react.createElement("div", {
18842
- className: classnames(s$b.paymentPlans, STATIC_CUSTOMISATION_CLASSES$1.eligibilityOptions)
19035
+ className: classnames(s$c.paymentPlans, STATIC_CUSTOMISATION_CLASSES$1.eligibilityOptions)
18843
19036
  }, eligibilityPlans.map(function (eligibilityPlan, key) {
18844
19037
  var _cx2;
18845
19038
 
19039
+ var isCurrent = key === current;
18846
19040
  return /*#__PURE__*/react.createElement("div", {
18847
19041
  key: key,
18848
19042
  onMouseEnter: function onMouseEnter() {
18849
19043
  return onHover(key);
18850
19044
  },
18851
19045
  onMouseOut: onLeave,
18852
- className: classnames(s$b.plan, (_cx2 = {}, _cx2[classnames(s$b.active, STATIC_CUSTOMISATION_CLASSES$1.activeOption)] = current === key, _cx2[classnames(s$b.notEligible, STATIC_CUSTOMISATION_CLASSES$1.notEligibleOption)] = !eligibilityPlan.eligible, _cx2))
19046
+ className: classnames(s$c.plan, (_cx2 = {}, _cx2[classnames(s$c.active, STATIC_CUSTOMISATION_CLASSES$1.activeOption)] = isCurrent, _cx2[s$c.polychrome] = !monochrome && isCurrent, _cx2[classnames(s$c.notEligible, STATIC_CUSTOMISATION_CLASSES$1.notEligibleOption)] = !eligibilityPlan.eligible, _cx2))
18853
19047
  }, paymentPlanShorthandName(eligibilityPlan));
18854
19048
  }))), /*#__PURE__*/react.createElement("div", {
18855
- className: classnames(s$b.info, (_cx3 = {}, _cx3[classnames(s$b.notEligible, STATIC_CUSTOMISATION_CLASSES$1.notEligibleOption)] = eligibilityPlans[current] && !eligibilityPlans[current].eligible, _cx3), STATIC_CUSTOMISATION_CLASSES$1.paymentInfo)
19049
+ className: classnames(s$c.info, (_cx3 = {}, _cx3[classnames(s$c.notEligible, STATIC_CUSTOMISATION_CLASSES$1.notEligibleOption)] = eligibilityPlans[current] && !eligibilityPlans[current].eligible, _cx3), STATIC_CUSTOMISATION_CLASSES$1.paymentInfo)
18856
19050
  }, eligibilityPlans.length !== 0 && paymentPlanInfoText(eligibilityPlans[current]))), isOpen && /*#__PURE__*/react.createElement(EligibilityModal, {
18857
19051
  initialPlanIndex: getIndexWithinEligiblePlans(current),
18858
19052
  onClose: closeModal,
18859
19053
  eligibilityPlans: eligiblePlans,
18860
- status: status
19054
+ status: status,
19055
+ cards: cards
18861
19056
  }));
18862
19057
  };
18863
19058
 
@@ -18883,20 +19078,25 @@
18883
19078
  plans = options.plans,
18884
19079
  transitionDelay = options.transitionDelay,
18885
19080
  hideIfNotEligible = options.hideIfNotEligible,
19081
+ _options$monochrome = options.monochrome,
19082
+ monochrome = _options$monochrome === void 0 ? true : _options$monochrome,
18886
19083
  suggestedPaymentPlan = options.suggestedPaymentPlan,
18887
19084
  _options$locale = options.locale,
18888
- locale = _options$locale === void 0 ? Locale.en : _options$locale;
19085
+ locale = _options$locale === void 0 ? Locale.en : _options$locale,
19086
+ cards = options.cards;
18889
19087
 
18890
19088
  if (containerDiv) {
18891
19089
  reactDom.render( /*#__PURE__*/react.createElement(Provider$1, {
18892
19090
  locale: locale
18893
19091
  }, /*#__PURE__*/react.createElement(PaymentPlanWidget, {
18894
- purchaseAmount: purchaseAmount,
18895
19092
  apiData: this.apiData,
18896
19093
  configPlans: plans,
18897
- transitionDelay: transitionDelay,
18898
19094
  hideIfNotEligible: hideIfNotEligible,
18899
- suggestedPaymentPlan: suggestedPaymentPlan
19095
+ monochrome: monochrome,
19096
+ purchaseAmount: purchaseAmount,
19097
+ suggestedPaymentPlan: suggestedPaymentPlan,
19098
+ cards: cards,
19099
+ transitionDelay: transitionDelay
18900
19100
  })), document.querySelector(container));
18901
19101
  }
18902
19102
  }
@@ -18907,7 +19107,8 @@
18907
19107
  _purchaseAmount = options.purchaseAmount,
18908
19108
  _plans = options.plans,
18909
19109
  _options$locale2 = options.locale,
18910
- _locale = _options$locale2 === void 0 ? Locale.en : _options$locale2;
19110
+ _locale = _options$locale2 === void 0 ? Locale.en : _options$locale2,
19111
+ _cards = options.cards;
18911
19112
 
18912
19113
  var close = function close() {
18913
19114
  return containerDiv && reactDom.unmountComponentAtNode(containerDiv);
@@ -18920,7 +19121,8 @@
18920
19121
  purchaseAmount: _purchaseAmount,
18921
19122
  apiData: _this.apiData,
18922
19123
  configPlans: _plans,
18923
- onClose: close
19124
+ onClose: close,
19125
+ cards: _cards
18924
19126
  })), document.querySelector(_container));
18925
19127
  }; // if clickableSelector is provided, add an onClick event handler to open the Modal.
18926
19128