@alma/widgets 2.6.0 → 2.7.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.
@@ -2155,6 +2155,7 @@ const STATIC_CUSTOMISATION_CLASSES = {
2155
2155
  scheduleDetails: prefix + '-schedule-details',
2156
2156
  scheduleTotal: prefix + '-schedule-total',
2157
2157
  scheduleCredit: prefix + '-schedule-credit',
2158
+ cardContainer: prefix + '-card-logos',
2158
2159
  summary: prefix + '-summary'
2159
2160
  };
2160
2161
 
@@ -2423,15 +2424,174 @@ const Schedule = ({
2423
2424
  }))));
2424
2425
  };
2425
2426
 
2426
- var s$4 = {"list":"_180ro","listItem":"_1HqCO","bullet":"_3B8wx"};
2427
+ const AmexCard = () => /*#__PURE__*/React.createElement("svg", {
2428
+ xmlns: "http://www.w3.org/2000/svg",
2429
+ width: "24",
2430
+ height: "16",
2431
+ viewBox: "0 0 24 16"
2432
+ }, /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
2433
+ id: "cardamex",
2434
+ x1: "10.914%",
2435
+ x2: "87.432%",
2436
+ y1: "86.279%",
2437
+ y2: "15.035%"
2438
+ }, /*#__PURE__*/React.createElement("stop", {
2439
+ offset: "0%",
2440
+ stopColor: "#3FA9F5"
2441
+ }), /*#__PURE__*/React.createElement("stop", {
2442
+ offset: "100%",
2443
+ stopColor: "#0071BC"
2444
+ }))), /*#__PURE__*/React.createElement("g", {
2445
+ fill: "none",
2446
+ fillRule: "evenodd"
2447
+ }, /*#__PURE__*/React.createElement("path", {
2448
+ fill: "url(#cardamex)",
2449
+ fillRule: "nonzero",
2450
+ 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"
2451
+ }), /*#__PURE__*/React.createElement("g", {
2452
+ fill: "#FFF"
2453
+ }, /*#__PURE__*/React.createElement("path", {
2454
+ 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"
2455
+ }), /*#__PURE__*/React.createElement("path", {
2456
+ fillRule: "nonzero",
2457
+ 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"
2458
+ }))));
2459
+
2460
+ const VisaCard = () => /*#__PURE__*/React.createElement("svg", {
2461
+ xmlns: "http://www.w3.org/2000/svg",
2462
+ width: "24",
2463
+ height: "16",
2464
+ viewBox: "0 0 24 16"
2465
+ }, /*#__PURE__*/React.createElement("g", {
2466
+ fill: "none",
2467
+ fillRule: "nonzero"
2468
+ }, /*#__PURE__*/React.createElement("path", {
2469
+ fill: "#FCFCFC",
2470
+ 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"
2471
+ }), ' ', /*#__PURE__*/React.createElement("path", {
2472
+ fill: "#005098",
2473
+ 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"
2474
+ }), /*#__PURE__*/React.createElement("path", {
2475
+ fill: "#F6A500",
2476
+ 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"
2477
+ }), /*#__PURE__*/React.createElement("path", {
2478
+ fill: "#0A5296",
2479
+ d: "M23.937 3.23H0V1.316C0 .598.627 0 1.379 0H22.62C23.373 0 24 .598 24 1.316V3.23h-.063z"
2480
+ }), /*#__PURE__*/React.createElement("path", {
2481
+ fill: "#F4A428",
2482
+ d: "M.063 13H24v1.8c0 .655-.625 1.2-1.375 1.2H1.375C.625 16 0 15.455 0 14.8V13h.063z"
2483
+ })));
2484
+
2485
+ const MasterCard = () => /*#__PURE__*/React.createElement("svg", {
2486
+ width: "24px",
2487
+ height: "16px",
2488
+ viewBox: "0 0 24 16",
2489
+ version: "1.1",
2490
+ xmlns: "http://www.w3.org/2000/svg"
2491
+ }, /*#__PURE__*/React.createElement("g", {
2492
+ id: "Parcours-1C-B",
2493
+ stroke: "none",
2494
+ strokeWidth: "1",
2495
+ fill: "none",
2496
+ fillRule: "evenodd"
2497
+ }, /*#__PURE__*/React.createElement("g", {
2498
+ id: "mobile-1C-Paiement-V1",
2499
+ transform: "translate(-269.000000, -313.000000)"
2500
+ }, /*#__PURE__*/React.createElement("g", {
2501
+ id: "mastercard",
2502
+ transform: "translate(269.000000, 313.000000)"
2503
+ }, /*#__PURE__*/React.createElement("rect", {
2504
+ id: "Rectangle",
2505
+ fill: "#FFFFFF",
2506
+ x: "0",
2507
+ y: "0",
2508
+ width: "24",
2509
+ height: "16",
2510
+ rx: "1"
2511
+ }), /*#__PURE__*/React.createElement("g", {
2512
+ id: "Group-6",
2513
+ transform: "translate(4.000000, 3.000000)"
2514
+ }, /*#__PURE__*/React.createElement("circle", {
2515
+ id: "Oval-4-Copy",
2516
+ fill: "#EA001B",
2517
+ cx: "5.05263158",
2518
+ cy: "5.05263158",
2519
+ r: "5.05263158"
2520
+ }), /*#__PURE__*/React.createElement("circle", {
2521
+ id: "Oval-4",
2522
+ fillOpacity: "0.25",
2523
+ fill: "#F79F1A",
2524
+ cx: "10.9473684",
2525
+ cy: "5.05263158",
2526
+ r: "5.05263158"
2527
+ }), /*#__PURE__*/React.createElement("circle", {
2528
+ id: "Oval-4-Copy-2",
2529
+ fillOpacity: "0.9",
2530
+ fill: "#F79F1A",
2531
+ cx: "10.9473684",
2532
+ cy: "5.05263158",
2533
+ r: "5.05263158"
2534
+ }), /*#__PURE__*/React.createElement("circle", {
2535
+ id: "Oval-4-Copy-3",
2536
+ fillOpacity: "0.3",
2537
+ fill: "#EA001B",
2538
+ cx: "5.05263158",
2539
+ cy: "5.05263158",
2540
+ r: "5.05263158"
2541
+ }))))));
2542
+
2543
+ const CbCard = () => /*#__PURE__*/React.createElement("svg", {
2544
+ xmlns: "http://www.w3.org/2000/svg",
2545
+ width: "24",
2546
+ height: "16",
2547
+ viewBox: "0 0 24 16"
2548
+ }, /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
2549
+ id: "cardcb",
2550
+ x1: "5.842%",
2551
+ x2: "95.393%",
2552
+ y1: "81.753%",
2553
+ y2: "17.344%"
2554
+ }, /*#__PURE__*/React.createElement("stop", {
2555
+ offset: "0%",
2556
+ stopColor: "#39B54A"
2557
+ }), ' ', /*#__PURE__*/React.createElement("stop", {
2558
+ offset: "100%",
2559
+ stopColor: "#0A5296"
2560
+ }))), /*#__PURE__*/React.createElement("g", {
2561
+ fill: "none",
2562
+ fillRule: "nonzero"
2563
+ }, /*#__PURE__*/React.createElement("path", {
2564
+ fill: "url(#cardcb)",
2565
+ 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"
2566
+ }), /*#__PURE__*/React.createElement("g", {
2567
+ fill: "#FFF"
2568
+ }, /*#__PURE__*/React.createElement("path", {
2569
+ 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"
2570
+ }))));
2571
+
2572
+ var s$4 = {"cardContainer":"_1N3yO","card":"_83cGn"};
2573
+
2574
+ const Cards = ({
2575
+ cards
2576
+ }) => {
2577
+ return /*#__PURE__*/React.createElement("div", {
2578
+ className: cx(s$4.cardContainer, STATIC_CUSTOMISATION_CLASSES.cardContainer)
2579
+ }, cards.map(card => /*#__PURE__*/React.createElement("div", {
2580
+ key: card,
2581
+ className: s$4.card,
2582
+ "data-testid": `card-logo-${card}`
2583
+ }, 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))));
2584
+ };
2585
+
2586
+ var s$5 = {"list":"_180ro","listItem":"_1HqCO","bullet":"_3B8wx"};
2427
2587
 
2428
2588
  const Info = () => /*#__PURE__*/React.createElement("div", {
2429
- className: cx(s$4.list, STATIC_CUSTOMISATION_CLASSES.info),
2589
+ className: cx(s$5.list, STATIC_CUSTOMISATION_CLASSES.info),
2430
2590
  "data-testid": "modal-info-element"
2431
2591
  }, /*#__PURE__*/React.createElement("div", {
2432
- className: s$4.listItem
2592
+ className: s$5.listItem
2433
2593
  }, /*#__PURE__*/React.createElement("div", {
2434
- className: s$4.bullet
2594
+ className: s$5.bullet
2435
2595
  }, "1"), /*#__PURE__*/React.createElement("div", {
2436
2596
  className: STATIC_CUSTOMISATION_CLASSES.infoMessage
2437
2597
  }, /*#__PURE__*/React.createElement(FormattedMessage, {
@@ -2441,9 +2601,9 @@ const Info = () => /*#__PURE__*/React.createElement("div", {
2441
2601
  strong: (...chunks) => /*#__PURE__*/React.createElement("strong", null, chunks)
2442
2602
  }
2443
2603
  }))), /*#__PURE__*/React.createElement("div", {
2444
- className: s$4.listItem
2604
+ className: s$5.listItem
2445
2605
  }, /*#__PURE__*/React.createElement("div", {
2446
- className: s$4.bullet
2606
+ className: s$5.bullet
2447
2607
  }, "2"), /*#__PURE__*/React.createElement("div", {
2448
2608
  className: STATIC_CUSTOMISATION_CLASSES.infoMessage
2449
2609
  }, /*#__PURE__*/React.createElement(FormattedMessage, {
@@ -2453,9 +2613,9 @@ const Info = () => /*#__PURE__*/React.createElement("div", {
2453
2613
  strong: (...chunks) => /*#__PURE__*/React.createElement("strong", null, chunks)
2454
2614
  }
2455
2615
  }))), /*#__PURE__*/React.createElement("div", {
2456
- className: s$4.listItem
2616
+ className: s$5.listItem
2457
2617
  }, /*#__PURE__*/React.createElement("div", {
2458
- className: s$4.bullet
2618
+ className: s$5.bullet
2459
2619
  }, "3"), /*#__PURE__*/React.createElement("div", {
2460
2620
  className: STATIC_CUSTOMISATION_CLASSES.infoMessage
2461
2621
  }, /*#__PURE__*/React.createElement(FormattedMessage, {
@@ -2498,20 +2658,20 @@ function LogoIcon({
2498
2658
  }));
2499
2659
  }
2500
2660
 
2501
- var s$5 = {"logo":"_3Oyv_"};
2661
+ var s$6 = {"logo":"_3Oyv_"};
2502
2662
 
2503
2663
  const Logo = () => /*#__PURE__*/React.createElement("div", {
2504
- className: s$5.logo
2664
+ className: s$6.logo
2505
2665
  }, /*#__PURE__*/React.createElement(LogoIcon, {
2506
2666
  underlineColor: "#FF414D"
2507
2667
  }));
2508
2668
 
2509
- var s$6 = {"title":"_3ERx-"};
2669
+ var s$7 = {"title":"_3ERx-"};
2510
2670
 
2511
2671
  const Title = ({
2512
2672
  isSomePlanDeferred
2513
2673
  }) => /*#__PURE__*/React.createElement("div", {
2514
- className: cx(s$6.title, STATIC_CUSTOMISATION_CLASSES.title),
2674
+ className: cx(s$7.title, STATIC_CUSTOMISATION_CLASSES.title),
2515
2675
  "data-testid": "modal-title-element"
2516
2676
  }, isSomePlanDeferred ? /*#__PURE__*/React.createElement(FormattedMessage, {
2517
2677
  id: 'eligibility-modal.title-deferred',
@@ -2527,41 +2687,48 @@ const Title = ({
2527
2687
  }
2528
2688
  }));
2529
2689
 
2530
- var s$7 = {"container":"_21g6u","block":"_3zaP5","left":"_2SBRC"};
2690
+ var s$8 = {"container":"_21g6u","block":"_3zaP5","left":"_2SBRC"};
2531
2691
 
2532
2692
  const DesktopModal = ({
2533
2693
  children,
2534
- isSomePlanDeferred
2694
+ isSomePlanDeferred,
2695
+ cards
2535
2696
  }) => /*#__PURE__*/React.createElement("div", {
2536
- className: s$7.container,
2697
+ className: s$8.container,
2537
2698
  "data-testid": "modal-container"
2538
2699
  }, /*#__PURE__*/React.createElement("div", {
2539
- className: cx([s$7.block, s$7.left, STATIC_CUSTOMISATION_CLASSES.leftSide])
2700
+ className: cx([s$8.block, s$8.left, STATIC_CUSTOMISATION_CLASSES.leftSide])
2540
2701
  }, /*#__PURE__*/React.createElement(Title, {
2541
2702
  isSomePlanDeferred: isSomePlanDeferred
2542
- }), /*#__PURE__*/React.createElement(Info, null), /*#__PURE__*/React.createElement(Logo, null)), /*#__PURE__*/React.createElement("div", {
2543
- className: cx(s$7.block, STATIC_CUSTOMISATION_CLASSES.rightSide)
2703
+ }), /*#__PURE__*/React.createElement(Info, null), cards && /*#__PURE__*/React.createElement(Cards, {
2704
+ cards: cards
2705
+ }), /*#__PURE__*/React.createElement(Logo, null)), /*#__PURE__*/React.createElement("div", {
2706
+ className: cx(s$8.block, STATIC_CUSTOMISATION_CLASSES.rightSide)
2544
2707
  }, children));
2545
2708
 
2546
- var s$8 = {"noEligibility":"_17qNJ","loader":"_2oTJq"};
2709
+ var s$9 = {"noEligibility":"_17qNJ","loader":"_2oTJq"};
2547
2710
 
2548
- var s$9 = {"container":"_2G7Ch"};
2711
+ var s$a = {"container":"_2G7Ch"};
2549
2712
 
2550
2713
  const MobileModal = ({
2551
2714
  children,
2552
- isSomePlanDeferred
2715
+ isSomePlanDeferred,
2716
+ cards
2553
2717
  }) => /*#__PURE__*/React.createElement("div", {
2554
- className: s$9.container,
2718
+ className: s$a.container,
2555
2719
  "data-testid": "modal-container"
2556
2720
  }, /*#__PURE__*/React.createElement(Title, {
2557
2721
  isSomePlanDeferred: isSomePlanDeferred
2558
- }), children, /*#__PURE__*/React.createElement(Info, null), /*#__PURE__*/React.createElement(Logo, null));
2722
+ }), children, /*#__PURE__*/React.createElement(Info, null), cards && /*#__PURE__*/React.createElement(Cards, {
2723
+ cards: cards
2724
+ }), /*#__PURE__*/React.createElement(Logo, null));
2559
2725
 
2560
2726
  const EligibilityModal = ({
2561
2727
  initialPlanIndex,
2562
2728
  onClose,
2563
2729
  eligibilityPlans,
2564
- status
2730
+ status,
2731
+ cards
2565
2732
  }) => {
2566
2733
  const [currentPlanIndex, setCurrentPlanIndex] = useState(initialPlanIndex || 0);
2567
2734
  const isBigScreen = useMediaQuery({
@@ -2577,11 +2744,12 @@ const EligibilityModal = ({
2577
2744
  scrollable: true,
2578
2745
  isOpen: true
2579
2746
  }, /*#__PURE__*/React.createElement(ModalComponent, {
2580
- isSomePlanDeferred: isSomePlanDeferred
2747
+ isSomePlanDeferred: isSomePlanDeferred,
2748
+ cards: cards
2581
2749
  }, status === apiStatus.PENDING && /*#__PURE__*/React.createElement("div", {
2582
- className: s$8.loader
2750
+ className: s$9.loader
2583
2751
  }, /*#__PURE__*/React.createElement(LoadingIndicator, null)), status === apiStatus.SUCCESS && eligiblePlans.length === 0 && /*#__PURE__*/React.createElement("div", {
2584
- className: s$8.noEligibility
2752
+ className: s$9.noEligibility
2585
2753
  }, /*#__PURE__*/React.createElement(FormattedMessage, {
2586
2754
  id: "eligibility-modal.no-eligibility",
2587
2755
  defaultMessage: "Oups, il semblerait que la simulation n'ait pas fonctionn\u00E9."
@@ -2602,29 +2770,31 @@ const ModalContainer = ({
2602
2770
  purchaseAmount,
2603
2771
  apiData,
2604
2772
  configPlans,
2605
- onClose
2773
+ onClose,
2774
+ cards
2606
2775
  }) => {
2607
2776
  const [eligibilityPlans, status] = useFetchEligibility(purchaseAmount, apiData, configPlans);
2608
2777
  return /*#__PURE__*/React.createElement(EligibilityModal, {
2609
2778
  initialPlanIndex: 0,
2610
2779
  onClose: onClose,
2611
2780
  eligibilityPlans: eligibilityPlans,
2612
- status: status
2781
+ status: status,
2782
+ cards: cards
2613
2783
  });
2614
2784
  };
2615
2785
 
2616
- var s$a = {"loadingIndicator":"_2SwwZ","line1":"_2qODo","line2":"_2YO01"};
2786
+ var s$b = {"loadingIndicator":"_2SwwZ","line1":"_2qODo","line2":"_2YO01"};
2617
2787
 
2618
2788
  const Loader = ({
2619
2789
  className
2620
2790
  }) => {
2621
2791
  return /*#__PURE__*/React.createElement("div", {
2622
- className: cx(s$a.loadingIndicator, className),
2792
+ className: cx(s$b.loadingIndicator, className),
2623
2793
  "data-testid": "loader"
2624
2794
  }, /*#__PURE__*/React.createElement("div", {
2625
- className: s$a.line1
2795
+ className: s$b.line1
2626
2796
  }), /*#__PURE__*/React.createElement("div", {
2627
- className: s$a.line2
2797
+ className: s$b.line2
2628
2798
  }));
2629
2799
  };
2630
2800
 
@@ -2704,7 +2874,7 @@ const STATIC_CUSTOMISATION_CLASSES$1 = {
2704
2874
  activeOption: prefix$1 + '-active-option'
2705
2875
  };
2706
2876
 
2707
- 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"};
2877
+ var s$c = {"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"};
2708
2878
 
2709
2879
  const VERY_LONG_TIME_IN_MS = 1000 * 3600 * 24 * 365;
2710
2880
  const DEFAULT_TRANSITION_TIME = 5500;
@@ -2715,7 +2885,8 @@ const PaymentPlanWidget = ({
2715
2885
  configPlans,
2716
2886
  transitionDelay,
2717
2887
  hideIfNotEligible,
2718
- suggestedPaymentPlan
2888
+ suggestedPaymentPlan,
2889
+ cards
2719
2890
  }) => {
2720
2891
  const [eligibilityPlans, status] = useFetchEligibility(purchaseAmount, apiData, configPlans);
2721
2892
  const eligiblePlans = eligibilityPlans.filter(plan => plan.eligible);
@@ -2780,7 +2951,7 @@ const PaymentPlanWidget = ({
2780
2951
 
2781
2952
  if (status === apiStatus.PENDING) {
2782
2953
  return /*#__PURE__*/React.createElement("div", {
2783
- className: cx(s$b.widgetButton, s$b.pending)
2954
+ className: cx(s$c.widgetButton, s$c.pending)
2784
2955
  }, /*#__PURE__*/React.createElement(Loader, null));
2785
2956
  }
2786
2957
 
@@ -2798,36 +2969,37 @@ const PaymentPlanWidget = ({
2798
2969
 
2799
2970
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
2800
2971
  onClick: handleOpenModal,
2801
- className: cx(s$b.widgetButton, {
2802
- [s$b.clickable]: eligiblePlans.length > 0,
2803
- [s$b.unClickable]: eligiblePlans.length === 0
2972
+ className: cx(s$c.widgetButton, {
2973
+ [s$c.clickable]: eligiblePlans.length > 0,
2974
+ [s$c.unClickable]: eligiblePlans.length === 0
2804
2975
  }, STATIC_CUSTOMISATION_CLASSES$1.container),
2805
2976
  "data-testid": "widget-button"
2806
2977
  }, /*#__PURE__*/React.createElement("div", {
2807
- className: cx(s$b.primaryContainer, STATIC_CUSTOMISATION_CLASSES$1.eligibilityLine)
2978
+ className: cx(s$c.primaryContainer, STATIC_CUSTOMISATION_CLASSES$1.eligibilityLine)
2808
2979
  }, /*#__PURE__*/React.createElement(LogoIcon, {
2809
- className: s$b.logo
2980
+ className: s$c.logo
2810
2981
  }), /*#__PURE__*/React.createElement("div", {
2811
- className: cx(s$b.paymentPlans, STATIC_CUSTOMISATION_CLASSES$1.eligibilityOptions)
2982
+ className: cx(s$c.paymentPlans, STATIC_CUSTOMISATION_CLASSES$1.eligibilityOptions)
2812
2983
  }, eligibilityPlans.map((eligibilityPlan, key) => {
2813
2984
  return /*#__PURE__*/React.createElement("div", {
2814
2985
  key: key,
2815
2986
  onMouseEnter: () => onHover(key),
2816
2987
  onMouseOut: onLeave,
2817
- className: cx(s$b.plan, {
2818
- [cx(s$b.active, STATIC_CUSTOMISATION_CLASSES$1.activeOption)]: current === key,
2819
- [cx(s$b.notEligible, STATIC_CUSTOMISATION_CLASSES$1.notEligibleOption)]: !eligibilityPlan.eligible
2988
+ className: cx(s$c.plan, {
2989
+ [cx(s$c.active, STATIC_CUSTOMISATION_CLASSES$1.activeOption)]: current === key,
2990
+ [cx(s$c.notEligible, STATIC_CUSTOMISATION_CLASSES$1.notEligibleOption)]: !eligibilityPlan.eligible
2820
2991
  })
2821
2992
  }, paymentPlanShorthandName(eligibilityPlan));
2822
2993
  }))), /*#__PURE__*/React.createElement("div", {
2823
- className: cx(s$b.info, {
2824
- [cx(s$b.notEligible, STATIC_CUSTOMISATION_CLASSES$1.notEligibleOption)]: eligibilityPlans[current] && !eligibilityPlans[current].eligible
2994
+ className: cx(s$c.info, {
2995
+ [cx(s$c.notEligible, STATIC_CUSTOMISATION_CLASSES$1.notEligibleOption)]: eligibilityPlans[current] && !eligibilityPlans[current].eligible
2825
2996
  }, STATIC_CUSTOMISATION_CLASSES$1.paymentInfo)
2826
2997
  }, eligibilityPlans.length !== 0 && paymentPlanInfoText(eligibilityPlans[current]))), isOpen && /*#__PURE__*/React.createElement(EligibilityModal, {
2827
2998
  initialPlanIndex: getIndexWithinEligiblePlans(current),
2828
2999
  onClose: closeModal,
2829
3000
  eligibilityPlans: eligiblePlans,
2830
- status: status
3001
+ status: status,
3002
+ cards: cards
2831
3003
  }));
2832
3004
  };
2833
3005
 
@@ -2851,7 +3023,8 @@ class WidgetsController {
2851
3023
  transitionDelay,
2852
3024
  hideIfNotEligible,
2853
3025
  suggestedPaymentPlan,
2854
- locale = Locale.en
3026
+ locale = Locale.en,
3027
+ cards
2855
3028
  } = options;
2856
3029
 
2857
3030
  if (containerDiv) {
@@ -2863,7 +3036,8 @@ class WidgetsController {
2863
3036
  configPlans: plans,
2864
3037
  transitionDelay: transitionDelay,
2865
3038
  hideIfNotEligible: hideIfNotEligible,
2866
- suggestedPaymentPlan: suggestedPaymentPlan
3039
+ suggestedPaymentPlan: suggestedPaymentPlan,
3040
+ cards: cards
2867
3041
  })), document.querySelector(container));
2868
3042
  }
2869
3043
  }
@@ -2874,7 +3048,8 @@ class WidgetsController {
2874
3048
  clickableSelector,
2875
3049
  purchaseAmount,
2876
3050
  plans,
2877
- locale = Locale.en
3051
+ locale = Locale.en,
3052
+ cards
2878
3053
  } = options;
2879
3054
 
2880
3055
  const close = () => containerDiv && unmountComponentAtNode(containerDiv);
@@ -2886,7 +3061,8 @@ class WidgetsController {
2886
3061
  purchaseAmount: purchaseAmount,
2887
3062
  apiData: this.apiData,
2888
3063
  configPlans: plans,
2889
- onClose: close
3064
+ onClose: close,
3065
+ cards: cards
2890
3066
  })), document.querySelector(container));
2891
3067
  }; // if clickableSelector is provided, add an onClick event handler to open the Modal.
2892
3068