@reevit/react 0.4.7 → 0.4.9
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.d.mts +38 -13
- package/dist/index.d.ts +38 -13
- package/dist/index.js +200 -138
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +200 -138
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +128 -169
- package/package.json +5 -2
package/dist/index.d.mts
CHANGED
|
@@ -97,22 +97,16 @@ interface PaymentError {
|
|
|
97
97
|
details?: Record<string, unknown>;
|
|
98
98
|
}
|
|
99
99
|
interface ReevitTheme {
|
|
100
|
-
/** Primary
|
|
100
|
+
/** Primary color (main text, headings, important elements) */
|
|
101
101
|
primaryColor?: string;
|
|
102
|
-
/** Primary
|
|
102
|
+
/** Primary foreground color (sub text, descriptions, muted elements) */
|
|
103
103
|
primaryForegroundColor?: string;
|
|
104
|
-
/** Background color */
|
|
104
|
+
/** Background color (applies to entire checkout: header, body, footer) */
|
|
105
105
|
backgroundColor?: string;
|
|
106
|
-
/**
|
|
107
|
-
|
|
108
|
-
/** Text color */
|
|
109
|
-
textColor?: string;
|
|
110
|
-
/** Muted text color */
|
|
111
|
-
mutedTextColor?: string;
|
|
106
|
+
/** Border color (borders, dividers) */
|
|
107
|
+
borderColor?: string;
|
|
112
108
|
/** Border radius for inputs and buttons */
|
|
113
109
|
borderRadius?: string;
|
|
114
|
-
/** Font family to use */
|
|
115
|
-
fontFamily?: string;
|
|
116
110
|
/** Whether to use dark mode */
|
|
117
111
|
darkMode?: boolean;
|
|
118
112
|
/** Custom logo URL to display in checkout header */
|
|
@@ -127,12 +121,29 @@ interface ReevitTheme {
|
|
|
127
121
|
pspSelectorBorderColor?: string;
|
|
128
122
|
/** Use border-only style for PSP selector (no filled background) */
|
|
129
123
|
pspSelectorUseBorder?: boolean;
|
|
124
|
+
/** Selected PSP background color */
|
|
125
|
+
selectedBackgroundColor?: string;
|
|
126
|
+
/** Selected PSP primary text color */
|
|
127
|
+
selectedTextColor?: string;
|
|
128
|
+
/** Selected PSP description/muted text color */
|
|
129
|
+
selectedDescriptionColor?: string;
|
|
130
|
+
/** Selected PSP border color */
|
|
131
|
+
selectedBorderColor?: string;
|
|
130
132
|
}
|
|
131
133
|
interface CheckoutProviderOption {
|
|
132
134
|
provider: string;
|
|
133
135
|
name: string;
|
|
134
136
|
methods: PaymentMethod[];
|
|
135
137
|
countries?: string[];
|
|
138
|
+
/** Brand colors for selected state styling */
|
|
139
|
+
branding?: {
|
|
140
|
+
/** Background color when selected */
|
|
141
|
+
backgroundColor?: string;
|
|
142
|
+
/** Primary/accent color */
|
|
143
|
+
primaryColor?: string;
|
|
144
|
+
/** Text color on primary background */
|
|
145
|
+
primaryForegroundColor?: string;
|
|
146
|
+
};
|
|
136
147
|
}
|
|
137
148
|
interface MobileMoneyFormData {
|
|
138
149
|
phone: string;
|
|
@@ -159,7 +170,7 @@ interface PaymentIntent {
|
|
|
159
170
|
/** Currency code */
|
|
160
171
|
currency: string;
|
|
161
172
|
/** Payment status */
|
|
162
|
-
status: 'pending' | 'processing' | 'succeeded' | 'failed' | 'cancelled';
|
|
173
|
+
status: 'pending' | 'requires_action' | 'processing' | 'succeeded' | 'failed' | 'canceled' | 'cancelled';
|
|
163
174
|
/** Recommended PSP based on routing rules */
|
|
164
175
|
recommendedPsp: 'paystack' | 'hubtel' | 'flutterwave' | 'monnify' | 'mpesa' | 'stripe';
|
|
165
176
|
/** Available payment methods for this intent */
|
|
@@ -200,8 +211,17 @@ interface PaymentMethodSelectorProps {
|
|
|
200
211
|
provider?: string;
|
|
201
212
|
layout?: 'grid' | 'list';
|
|
202
213
|
showLabel?: boolean;
|
|
214
|
+
/** Country code for dynamic logos (e.g., 'GH', 'NG', 'KE') */
|
|
215
|
+
country?: string;
|
|
216
|
+
/** Selected theme colors for method items */
|
|
217
|
+
selectedTheme?: {
|
|
218
|
+
backgroundColor?: string;
|
|
219
|
+
textColor?: string;
|
|
220
|
+
descriptionColor?: string;
|
|
221
|
+
borderColor?: string;
|
|
222
|
+
};
|
|
203
223
|
}
|
|
204
|
-
declare function PaymentMethodSelector({ methods, selectedMethod, onSelect, disabled, provider, layout, showLabel, }: PaymentMethodSelectorProps): react_jsx_runtime.JSX.Element;
|
|
224
|
+
declare function PaymentMethodSelector({ methods, selectedMethod, onSelect, disabled, provider, layout, showLabel, country, selectedTheme, }: PaymentMethodSelectorProps): react_jsx_runtime.JSX.Element;
|
|
205
225
|
|
|
206
226
|
interface MobileMoneyFormProps {
|
|
207
227
|
onSubmit: (data: MobileMoneyFormData) => void;
|
|
@@ -595,6 +615,11 @@ interface PaymentIntentResponse {
|
|
|
595
615
|
status: string;
|
|
596
616
|
client_secret: string;
|
|
597
617
|
psp_public_key?: string;
|
|
618
|
+
psp_credentials?: {
|
|
619
|
+
merchantAccount?: string | number;
|
|
620
|
+
basicAuth?: string;
|
|
621
|
+
[key: string]: unknown;
|
|
622
|
+
};
|
|
598
623
|
amount: number;
|
|
599
624
|
currency: string;
|
|
600
625
|
fee_amount: number;
|
package/dist/index.d.ts
CHANGED
|
@@ -97,22 +97,16 @@ interface PaymentError {
|
|
|
97
97
|
details?: Record<string, unknown>;
|
|
98
98
|
}
|
|
99
99
|
interface ReevitTheme {
|
|
100
|
-
/** Primary
|
|
100
|
+
/** Primary color (main text, headings, important elements) */
|
|
101
101
|
primaryColor?: string;
|
|
102
|
-
/** Primary
|
|
102
|
+
/** Primary foreground color (sub text, descriptions, muted elements) */
|
|
103
103
|
primaryForegroundColor?: string;
|
|
104
|
-
/** Background color */
|
|
104
|
+
/** Background color (applies to entire checkout: header, body, footer) */
|
|
105
105
|
backgroundColor?: string;
|
|
106
|
-
/**
|
|
107
|
-
|
|
108
|
-
/** Text color */
|
|
109
|
-
textColor?: string;
|
|
110
|
-
/** Muted text color */
|
|
111
|
-
mutedTextColor?: string;
|
|
106
|
+
/** Border color (borders, dividers) */
|
|
107
|
+
borderColor?: string;
|
|
112
108
|
/** Border radius for inputs and buttons */
|
|
113
109
|
borderRadius?: string;
|
|
114
|
-
/** Font family to use */
|
|
115
|
-
fontFamily?: string;
|
|
116
110
|
/** Whether to use dark mode */
|
|
117
111
|
darkMode?: boolean;
|
|
118
112
|
/** Custom logo URL to display in checkout header */
|
|
@@ -127,12 +121,29 @@ interface ReevitTheme {
|
|
|
127
121
|
pspSelectorBorderColor?: string;
|
|
128
122
|
/** Use border-only style for PSP selector (no filled background) */
|
|
129
123
|
pspSelectorUseBorder?: boolean;
|
|
124
|
+
/** Selected PSP background color */
|
|
125
|
+
selectedBackgroundColor?: string;
|
|
126
|
+
/** Selected PSP primary text color */
|
|
127
|
+
selectedTextColor?: string;
|
|
128
|
+
/** Selected PSP description/muted text color */
|
|
129
|
+
selectedDescriptionColor?: string;
|
|
130
|
+
/** Selected PSP border color */
|
|
131
|
+
selectedBorderColor?: string;
|
|
130
132
|
}
|
|
131
133
|
interface CheckoutProviderOption {
|
|
132
134
|
provider: string;
|
|
133
135
|
name: string;
|
|
134
136
|
methods: PaymentMethod[];
|
|
135
137
|
countries?: string[];
|
|
138
|
+
/** Brand colors for selected state styling */
|
|
139
|
+
branding?: {
|
|
140
|
+
/** Background color when selected */
|
|
141
|
+
backgroundColor?: string;
|
|
142
|
+
/** Primary/accent color */
|
|
143
|
+
primaryColor?: string;
|
|
144
|
+
/** Text color on primary background */
|
|
145
|
+
primaryForegroundColor?: string;
|
|
146
|
+
};
|
|
136
147
|
}
|
|
137
148
|
interface MobileMoneyFormData {
|
|
138
149
|
phone: string;
|
|
@@ -159,7 +170,7 @@ interface PaymentIntent {
|
|
|
159
170
|
/** Currency code */
|
|
160
171
|
currency: string;
|
|
161
172
|
/** Payment status */
|
|
162
|
-
status: 'pending' | 'processing' | 'succeeded' | 'failed' | 'cancelled';
|
|
173
|
+
status: 'pending' | 'requires_action' | 'processing' | 'succeeded' | 'failed' | 'canceled' | 'cancelled';
|
|
163
174
|
/** Recommended PSP based on routing rules */
|
|
164
175
|
recommendedPsp: 'paystack' | 'hubtel' | 'flutterwave' | 'monnify' | 'mpesa' | 'stripe';
|
|
165
176
|
/** Available payment methods for this intent */
|
|
@@ -200,8 +211,17 @@ interface PaymentMethodSelectorProps {
|
|
|
200
211
|
provider?: string;
|
|
201
212
|
layout?: 'grid' | 'list';
|
|
202
213
|
showLabel?: boolean;
|
|
214
|
+
/** Country code for dynamic logos (e.g., 'GH', 'NG', 'KE') */
|
|
215
|
+
country?: string;
|
|
216
|
+
/** Selected theme colors for method items */
|
|
217
|
+
selectedTheme?: {
|
|
218
|
+
backgroundColor?: string;
|
|
219
|
+
textColor?: string;
|
|
220
|
+
descriptionColor?: string;
|
|
221
|
+
borderColor?: string;
|
|
222
|
+
};
|
|
203
223
|
}
|
|
204
|
-
declare function PaymentMethodSelector({ methods, selectedMethod, onSelect, disabled, provider, layout, showLabel, }: PaymentMethodSelectorProps): react_jsx_runtime.JSX.Element;
|
|
224
|
+
declare function PaymentMethodSelector({ methods, selectedMethod, onSelect, disabled, provider, layout, showLabel, country, selectedTheme, }: PaymentMethodSelectorProps): react_jsx_runtime.JSX.Element;
|
|
205
225
|
|
|
206
226
|
interface MobileMoneyFormProps {
|
|
207
227
|
onSubmit: (data: MobileMoneyFormData) => void;
|
|
@@ -595,6 +615,11 @@ interface PaymentIntentResponse {
|
|
|
595
615
|
status: string;
|
|
596
616
|
client_secret: string;
|
|
597
617
|
psp_public_key?: string;
|
|
618
|
+
psp_credentials?: {
|
|
619
|
+
merchantAccount?: string | number;
|
|
620
|
+
basicAuth?: string;
|
|
621
|
+
[key: string]: unknown;
|
|
622
|
+
};
|
|
598
623
|
amount: number;
|
|
599
624
|
currency: string;
|
|
600
625
|
fee_amount: number;
|