@miden-npm/react 2.1.2 → 2.1.4

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.
package/dist/index.cjs CHANGED
@@ -1700,7 +1700,7 @@ function BaseCard({
1700
1700
  onClose,
1701
1701
  caller = "buzapay"
1702
1702
  }) {
1703
- return caller === "buzapay" ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "checkout-card-miden w-full h-screen flex flex-col items-center justify-center text-white", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "flex w-1/2", children: [
1703
+ return caller === "buzapay" ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "checkout-card-miden w-full h-screen flex flex-col items-center justify-center text-white", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "flex w-[95%] sm:w-[85%] md:w-[70%] lg:w-[60%] xl:w-1/2", children: [
1704
1704
  showBackButton && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(BaseBack, { back: () => onBack?.() }),
1705
1705
  /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "flex gap-2 w-full", children: [
1706
1706
  /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "flex flex-col gap-8 w-full", children: [
@@ -1714,12 +1714,12 @@ function BaseCard({
1714
1714
  "div",
1715
1715
  {
1716
1716
  onClick: onClose,
1717
- className: "close-icon flex flex-col items-center justify-center self-start cursor-pointer hover:bg-gray-500",
1717
+ className: "hidden sm:flex close-icon flex-col items-center justify-center self-start cursor-pointer hover:bg-gray-500",
1718
1718
  children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "text-white", children: "x" })
1719
1719
  }
1720
1720
  )
1721
1721
  ] })
1722
- ] }) }) : /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "checkout-card-miden w-full h-screen flex flex-col items-center justify-center text-white", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "flex w-1/2", children: [
1722
+ ] }) }) : /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "checkout-card-miden w-full h-screen flex flex-col items-center justify-center text-white", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "flex w-[95%] sm:w-[85%] md:w-[70%] lg:w-[60%] xl:w-1/2", children: [
1723
1723
  showBackButton && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(BaseBack, { back: () => onBack?.() }),
1724
1724
  /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "flex gap-2 w-full", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "flex flex-col gap-8 w-full", children: [
1725
1725
  /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "bg-white rounded-xl", children }),
@@ -3323,7 +3323,7 @@ function PayByCard({
3323
3323
  validationError: billingErrors.address2 ?? ""
3324
3324
  }
3325
3325
  ) }),
3326
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
3326
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "col-span-2 sm:col-span-1", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
3327
3327
  BaseSelect,
3328
3328
  {
3329
3329
  label: "Select Country",
@@ -3348,8 +3348,8 @@ function PayByCard({
3348
3348
  },
3349
3349
  validationError: billingErrors.country ?? ""
3350
3350
  }
3351
- ),
3352
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
3351
+ ) }),
3352
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "col-span-2 sm:col-span-1", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
3353
3353
  BaseSelect,
3354
3354
  {
3355
3355
  label: "Select State",
@@ -3365,8 +3365,8 @@ function PayByCard({
3365
3365
  },
3366
3366
  validationError: billingErrors.state ?? ""
3367
3367
  }
3368
- ),
3369
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
3368
+ ) }),
3369
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "col-span-2 sm:col-span-1", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
3370
3370
  BaseInput,
3371
3371
  {
3372
3372
  label: "City",
@@ -3380,8 +3380,8 @@ function PayByCard({
3380
3380
  },
3381
3381
  validationError: billingErrors.city ?? ""
3382
3382
  }
3383
- ),
3384
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
3383
+ ) }),
3384
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "col-span-2 sm:col-span-1", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
3385
3385
  BaseInput,
3386
3386
  {
3387
3387
  label: "Postal Code",
@@ -3395,7 +3395,7 @@ function PayByCard({
3395
3395
  },
3396
3396
  validationError: billingErrors.postalCode ?? ""
3397
3397
  }
3398
- ),
3398
+ ) }),
3399
3399
  /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "col-span-2", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
3400
3400
  BaseInput,
3401
3401
  {
@@ -3617,7 +3617,7 @@ var PayByTransfer = ({
3617
3617
  caller
3618
3618
  );
3619
3619
  if (response?.isSuccessful) {
3620
- setPaymentAccountDetails(response.data);
3620
+ setPaymentAccountDetails(response);
3621
3621
  startTimer();
3622
3622
  setMessage("Virtual account generated successfully for payment.");
3623
3623
  setIsMakingPayment(true);
@@ -3820,7 +3820,14 @@ var PayByTransfer = ({
3820
3820
  BaseLabelInfo,
3821
3821
  {
3822
3822
  label: "Bank Name",
3823
- value: `${paymentAccountDetails?.bank} ${paymentAccountDetails?.accountName}`
3823
+ value: paymentAccountDetails?.bank
3824
+ }
3825
+ ),
3826
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
3827
+ BaseLabelInfo,
3828
+ {
3829
+ label: "Account Name",
3830
+ value: paymentAccountDetails?.accountName
3824
3831
  }
3825
3832
  ),
3826
3833
  /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "flex items-center justify-between", children: [
@@ -4426,7 +4433,7 @@ function BzpCheckoutCard({
4426
4433
  {
4427
4434
  className: checkoutState === "SUCCESS" || checkoutState === "USED" && paymentType === "BANK_TRANSFER" ? "col-span-3" : "col-span-2",
4428
4435
  children: [
4429
- checkoutState === "PENDING" && /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex items-center justify-between px-12 py-8", children: [
4436
+ checkoutState === "PENDING" && /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex flex-col gap-6 sm:flex-row sm:items-center justify-between p-6 sm:px-10 sm:py-8", children: [
4430
4437
  paymentObject.logoUrl ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
4431
4438
  BaseImage,
4432
4439
  {
@@ -4445,15 +4452,15 @@ function BzpCheckoutCard({
4445
4452
  }
4446
4453
  ),
4447
4454
  /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex flex-col gap-1", children: [
4448
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { className: "text-body-2xs font-regular text-sub-copy text-right", children: paymentObject.merchantName }),
4449
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("p", { className: "text-body-2xs font-regular text-sub-copy text-right", children: [
4455
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { className: "text-body-2xs font-regular text-sub-copy sm:text-right", children: paymentObject.merchantName }),
4456
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("p", { className: "text-body-2xs font-regular text-sub-copy sm:text-right", children: [
4450
4457
  "Pay:",
4451
4458
  " ",
4452
4459
  /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "text-orange-500 font-extrabold", children: formatAmount(paymentObject.amount, paymentObject.currency) })
4453
4460
  ] })
4454
4461
  ] })
4455
4462
  ] }),
4456
- checkoutState === "PENDING" && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "max-h-[32rem] overflow-y-scroll px-10 pb-10 pt-2", children: paymentType === "CARD" ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
4463
+ checkoutState === "PENDING" && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "max-h-[32rem] overflow-y-scroll px-6 sm:px-10 pb-10 pt-2", children: paymentType === "CARD" ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
4457
4464
  PayByCard,
4458
4465
  {
4459
4466
  secretKey,
@@ -4788,7 +4795,7 @@ function MidenCheckoutCard({
4788
4795
  /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(IconMidenLogo, {}),
4789
4796
  /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(IconClose, { color: "black", className: "cursor-pointer" })
4790
4797
  ] }),
4791
- checkoutState === "PENDING" && /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "px-14 pt-4 pb-8 flex flex-col gap-6 max-h-[32rem] overflow-y-scroll", children: [
4798
+ checkoutState === "PENDING" && /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "px-6 md:px-10 lg:px-14 pt-4 pb-8 flex flex-col gap-6 max-h-[32rem] overflow-y-scroll", children: [
4792
4799
  /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "flex items-center justify-between py-3 px-4 bg-[#F8FDFF] border border-[#DAE4E8] rounded-lg", children: [
4793
4800
  /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
4794
4801
  BaseLabelInfo,