@reevit/react 0.6.0 → 0.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.
- package/README.md +14 -0
- package/dist/index.js +45 -11
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +45 -11
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +457 -237
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -293,6 +293,20 @@ function MpesaPayment() {
|
|
|
293
293
|
| Monnify | NG | Card, Bank Transfer, USSD |
|
|
294
294
|
| M-Pesa | KE, TZ | Mobile Money (STK Push) |
|
|
295
295
|
|
|
296
|
+
## Release Notes
|
|
297
|
+
|
|
298
|
+
### v0.7.0
|
|
299
|
+
|
|
300
|
+
- Redesigned checkout UI with premium visual polish
|
|
301
|
+
- New typography system: Grato Classic for body, ABC Repro Mono for amounts
|
|
302
|
+
- Layered shadow system for natural depth
|
|
303
|
+
- Replaced emoji icons with inline SVG icons (consistent cross-platform rendering)
|
|
304
|
+
- New loading animation (three-dot pulse), success glow effect, and countdown bar
|
|
305
|
+
- Improved dark mode contrast and surfaces
|
|
306
|
+
- Mobile bottom-sheet pattern with touch-friendly targets (44px+)
|
|
307
|
+
- Smoother animations with cubic-bezier easing curves
|
|
308
|
+
- Removed external Google Fonts dependency (zero network requests for fonts)
|
|
309
|
+
|
|
296
310
|
## License
|
|
297
311
|
|
|
298
312
|
MIT © [Reevit](https://reevit.io)
|
package/dist/index.js
CHANGED
|
@@ -817,30 +817,47 @@ function detectCountryFromCurrency(currency) {
|
|
|
817
817
|
};
|
|
818
818
|
return currencyToCountry[currency.toUpperCase()] || "GH";
|
|
819
819
|
}
|
|
820
|
+
var MethodIcons = {
|
|
821
|
+
card: () => /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
822
|
+
/* @__PURE__ */ jsxRuntime.jsx("rect", { x: "1", y: "4", width: "22", height: "16", rx: "3" }),
|
|
823
|
+
/* @__PURE__ */ jsxRuntime.jsx("line", { x1: "1", y1: "10", x2: "23", y2: "10" }),
|
|
824
|
+
/* @__PURE__ */ jsxRuntime.jsx("line", { x1: "5", y1: "15", x2: "9", y2: "15" })
|
|
825
|
+
] }),
|
|
826
|
+
mobile_money: () => /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
827
|
+
/* @__PURE__ */ jsxRuntime.jsx("rect", { x: "5", y: "2", width: "14", height: "20", rx: "3" }),
|
|
828
|
+
/* @__PURE__ */ jsxRuntime.jsx("line", { x1: "12", y1: "18", x2: "12", y2: "18.01", strokeWidth: "2", strokeLinecap: "round" })
|
|
829
|
+
] }),
|
|
830
|
+
bank_transfer: () => /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
831
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M3 21h18" }),
|
|
832
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M3 10h18" }),
|
|
833
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 3l9 7H3l9-7z" }),
|
|
834
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M6 10v8" }),
|
|
835
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M10 10v8" }),
|
|
836
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M14 10v8" }),
|
|
837
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M18 10v8" })
|
|
838
|
+
] }),
|
|
839
|
+
apple_pay: () => /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M17.05 20.28c-.98.95-2.05.88-3.08.4-1.09-.5-2.08-.48-3.24 0-1.44.62-2.2.44-3.06-.4C2.79 15.25 3.51 7.59 9.05 7.31c1.35.07 2.29.74 3.08.8 1.18-.24 2.31-.93 3.57-.84 1.51.12 2.65.72 3.4 1.8-3.12 1.87-2.38 5.98.48 7.13-.57 1.5-1.31 2.99-2.53 4.09zM12.03 7.25c-.15-2.23 1.66-4.07 3.74-4.25.29 2.58-2.34 4.5-3.74 4.25z" }) }),
|
|
840
|
+
google_pay: () => /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12.24 10.285V14.4h6.806c-.275 1.765-2.056 5.174-6.806 5.174-4.095 0-7.439-3.389-7.439-7.574s3.345-7.574 7.439-7.574c2.33 0 3.891.989 4.785 1.849l3.254-3.138C18.189 1.186 15.479 0 12.24 0c-6.635 0-12 5.365-12 12s5.365 12 12 12c6.926 0 11.52-4.869 11.52-11.726 0-.788-.085-1.39-.189-1.989H12.24z", fill: "currentColor" }) })
|
|
841
|
+
};
|
|
820
842
|
var methodConfig = {
|
|
821
843
|
card: {
|
|
822
844
|
label: "Card",
|
|
823
|
-
icon: "\u{1F4B3}",
|
|
824
845
|
description: "Pay with Visa, Mastercard, or other cards"
|
|
825
846
|
},
|
|
826
847
|
mobile_money: {
|
|
827
848
|
label: "Mobile Money",
|
|
828
|
-
icon: "\u{1F4F1}",
|
|
829
849
|
description: "MTN, Telecel, AirtelTigo Money"
|
|
830
850
|
},
|
|
831
851
|
bank_transfer: {
|
|
832
852
|
label: "Bank Transfer",
|
|
833
|
-
icon: "\u{1F3E6}",
|
|
834
853
|
description: "Pay directly from your bank account"
|
|
835
854
|
},
|
|
836
855
|
apple_pay: {
|
|
837
856
|
label: "Apple Pay",
|
|
838
|
-
icon: "\u{1F34E}",
|
|
839
857
|
description: "Pay with Apple Pay"
|
|
840
858
|
},
|
|
841
859
|
google_pay: {
|
|
842
860
|
label: "Google Pay",
|
|
843
|
-
icon: "\u{1F916}",
|
|
844
861
|
description: "Pay with Google Pay"
|
|
845
862
|
}
|
|
846
863
|
};
|
|
@@ -890,7 +907,6 @@ function PaymentMethodSelector({
|
|
|
890
907
|
),
|
|
891
908
|
style: selectedTheme?.backgroundColor ? { backgroundColor: selectedTheme.backgroundColor } : void 0,
|
|
892
909
|
children: methods.map((method, index) => {
|
|
893
|
-
const config = methodConfig[method];
|
|
894
910
|
const isSelected = selectedMethod === method;
|
|
895
911
|
const methodLabel = getMethodLabel(method);
|
|
896
912
|
const methodDescription = getMethodDescription(method);
|
|
@@ -921,7 +937,7 @@ function PaymentMethodSelector({
|
|
|
921
937
|
className: "reevit-method-option__logo-img"
|
|
922
938
|
},
|
|
923
939
|
i
|
|
924
|
-
)) }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "reevit-method-option__icon", children:
|
|
940
|
+
)) }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "reevit-method-option__icon", children: MethodIcons[method]() }) }),
|
|
925
941
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "reevit-method-option__content", children: [
|
|
926
942
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "reevit-method-option__label", style: selectedTheme?.textColor ? { color: selectedTheme.textColor } : void 0, children: methodLabel }),
|
|
927
943
|
!isGrid && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "reevit-method-option__description", style: selectedTheme?.descriptionColor ? { color: selectedTheme.descriptionColor } : void 0, children: methodDescription })
|
|
@@ -2481,7 +2497,11 @@ function ReevitCheckout({
|
|
|
2481
2497
|
const renderContent = () => {
|
|
2482
2498
|
if (status === "loading" || status === "processing") {
|
|
2483
2499
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "reevit-loading reevit-animate-fade-in", children: [
|
|
2484
|
-
/* @__PURE__ */ jsxRuntime.
|
|
2500
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "reevit-dot-pulse", children: [
|
|
2501
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "reevit-dot-pulse__dot" }),
|
|
2502
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "reevit-dot-pulse__dot" }),
|
|
2503
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "reevit-dot-pulse__dot" })
|
|
2504
|
+
] }),
|
|
2485
2505
|
/* @__PURE__ */ jsxRuntime.jsx("p", { children: status === "loading" ? "Preparing checkout..." : "Processing payment..." })
|
|
2486
2506
|
] });
|
|
2487
2507
|
}
|
|
@@ -2497,12 +2517,22 @@ function ReevitCheckout({
|
|
|
2497
2517
|
"Reference: ",
|
|
2498
2518
|
result.reference
|
|
2499
2519
|
] }),
|
|
2500
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "reevit-success__redirect", children: "Redirecting in a moment..." })
|
|
2520
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "reevit-success__redirect", children: "Redirecting in a moment..." }),
|
|
2521
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2522
|
+
"div",
|
|
2523
|
+
{
|
|
2524
|
+
className: "reevit-success__countdown",
|
|
2525
|
+
style: { animationDuration: `${successDelayMs}ms` }
|
|
2526
|
+
}
|
|
2527
|
+
)
|
|
2501
2528
|
] });
|
|
2502
2529
|
}
|
|
2503
2530
|
if (status === "failed" && error && !error.recoverable) {
|
|
2504
2531
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "reevit-error reevit-animate-fade-in", children: [
|
|
2505
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "reevit-error__icon", children: "
|
|
2532
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "reevit-error__icon", children: /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
2533
|
+
/* @__PURE__ */ jsxRuntime.jsx("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
|
|
2534
|
+
/* @__PURE__ */ jsxRuntime.jsx("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
|
|
2535
|
+
] }) }),
|
|
2506
2536
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { children: "Payment Failed" }),
|
|
2507
2537
|
/* @__PURE__ */ jsxRuntime.jsx("p", { children: error.message }),
|
|
2508
2538
|
/* @__PURE__ */ jsxRuntime.jsx("button", { className: "reevit-btn reevit-btn--primary", onClick: handleBack, children: "Try Again" })
|
|
@@ -2624,7 +2654,11 @@ function ReevitCheckout({
|
|
|
2624
2654
|
);
|
|
2625
2655
|
default:
|
|
2626
2656
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "reevit-error", children: [
|
|
2627
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "reevit-error__icon", children: "
|
|
2657
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "reevit-error__icon", children: /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
2658
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z" }),
|
|
2659
|
+
/* @__PURE__ */ jsxRuntime.jsx("line", { x1: "12", y1: "9", x2: "12", y2: "13" }),
|
|
2660
|
+
/* @__PURE__ */ jsxRuntime.jsx("line", { x1: "12", y1: "17", x2: "12.01", y2: "17" })
|
|
2661
|
+
] }) }),
|
|
2628
2662
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { children: "Provider Not Supported" }),
|
|
2629
2663
|
/* @__PURE__ */ jsxRuntime.jsxs("p", { children: [
|
|
2630
2664
|
"Provider (",
|