@reevit/react 0.5.0 → 0.5.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.
- package/README.md +1 -3
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -5
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +15 -8
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -54,7 +54,7 @@ function validatePhone(phone, network) {
|
|
|
54
54
|
const cleaned = phone.replace(/[\s-]/g, "");
|
|
55
55
|
const patterns = {
|
|
56
56
|
mtn: /^(0|233|\+233)?(24|54|55|59)\d{7}$/,
|
|
57
|
-
|
|
57
|
+
telecel: /^(0|233|\+233)?(20|50)\d{7}$/,
|
|
58
58
|
airteltigo: /^(0|233|\+233)?(26|27|56|57)\d{7}$/
|
|
59
59
|
};
|
|
60
60
|
if (network && patterns[network]) {
|
|
@@ -76,7 +76,7 @@ function detectNetwork(phone) {
|
|
|
76
76
|
const cleaned = phone.replace(/[\s-]/g, "");
|
|
77
77
|
const prefixes = {
|
|
78
78
|
mtn: ["024", "054", "055", "059", "23324", "23354", "23355", "23359"],
|
|
79
|
-
|
|
79
|
+
telecel: ["020", "050", "23320", "23350"],
|
|
80
80
|
airteltigo: ["026", "027", "056", "057", "23326", "23327", "23356", "23357"]
|
|
81
81
|
};
|
|
82
82
|
for (const [network, networkPrefixes] of Object.entries(prefixes)) {
|
|
@@ -700,7 +700,7 @@ var methodConfig = {
|
|
|
700
700
|
mobile_money: {
|
|
701
701
|
label: "Mobile Money",
|
|
702
702
|
icon: "\u{1F4F1}",
|
|
703
|
-
description: "MTN,
|
|
703
|
+
description: "MTN, Telecel, AirtelTigo Money"
|
|
704
704
|
},
|
|
705
705
|
bank_transfer: {
|
|
706
706
|
label: "Bank Transfer",
|
|
@@ -737,7 +737,7 @@ function PaymentMethodSelector({
|
|
|
737
737
|
const c = (country).toUpperCase();
|
|
738
738
|
if (method === "mobile_money") {
|
|
739
739
|
const mobileMoneyDescriptions = {
|
|
740
|
-
GH: "MTN,
|
|
740
|
+
GH: "MTN, Telecel, AirtelTigo Money",
|
|
741
741
|
KE: "M-Pesa, Airtel Money",
|
|
742
742
|
NG: "MTN MoMo, Airtel Money",
|
|
743
743
|
ZA: "Mobile Money"
|
|
@@ -813,7 +813,7 @@ function PaymentMethodSelector({
|
|
|
813
813
|
}
|
|
814
814
|
var networks = [
|
|
815
815
|
{ id: "mtn", name: "MTN", color: "#FFCC00" },
|
|
816
|
-
{ id: "
|
|
816
|
+
{ id: "telecel", name: "Telecel", color: "#E60000" },
|
|
817
817
|
{ id: "airteltigo", name: "AirtelTigo", color: "#E4002B" }
|
|
818
818
|
];
|
|
819
819
|
function MobileMoneyForm({
|