@reevit/react 0.4.2 → 0.4.3

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 CHANGED
@@ -109,6 +109,16 @@ interface ReevitTheme {
109
109
  fontFamily?: string;
110
110
  /** Whether to use dark mode */
111
111
  darkMode?: boolean;
112
+ /** Custom logo URL to display in checkout header */
113
+ logoUrl?: string;
114
+ /** PSP selector background color */
115
+ pspSelectorBgColor?: string;
116
+ /** PSP selector text color */
117
+ pspSelectorTextColor?: string;
118
+ /** PSP selector border color */
119
+ pspSelectorBorderColor?: string;
120
+ /** Use border-only style for PSP selector (no filled background) */
121
+ pspSelectorUseBorder?: boolean;
112
122
  }
113
123
  interface CheckoutProviderOption {
114
124
  provider: string;
@@ -180,16 +190,19 @@ interface PaymentMethodSelectorProps {
180
190
  onSelect: (method: PaymentMethod) => void;
181
191
  disabled?: boolean;
182
192
  provider?: string;
193
+ layout?: 'grid' | 'list';
194
+ showLabel?: boolean;
183
195
  }
184
- declare function PaymentMethodSelector({ methods, selectedMethod, onSelect, disabled, provider, }: PaymentMethodSelectorProps): react_jsx_runtime.JSX.Element;
196
+ declare function PaymentMethodSelector({ methods, selectedMethod, onSelect, disabled, provider, layout, showLabel, }: PaymentMethodSelectorProps): react_jsx_runtime.JSX.Element;
185
197
 
186
198
  interface MobileMoneyFormProps {
187
199
  onSubmit: (data: MobileMoneyFormData) => void;
188
- onCancel: () => void;
200
+ onCancel?: () => void;
189
201
  isLoading?: boolean;
190
202
  initialPhone?: string;
203
+ hideCancel?: boolean;
191
204
  }
192
- declare function MobileMoneyForm({ onSubmit, onCancel, isLoading, initialPhone, }: MobileMoneyFormProps): react_jsx_runtime.JSX.Element;
205
+ declare function MobileMoneyForm({ onSubmit, onCancel, isLoading, initialPhone, hideCancel, }: MobileMoneyFormProps): react_jsx_runtime.JSX.Element;
193
206
 
194
207
  /**
195
208
  * useReevit hook
@@ -291,12 +304,13 @@ interface HubtelBridgeProps {
291
304
  hubtelSessionToken?: string;
292
305
  /** Basic auth credential (legacy - credentials exposed to client, deprecated) */
293
306
  basicAuth?: string;
307
+ preferredMethod?: PaymentMethod;
294
308
  onSuccess: (result: PaymentResult) => void;
295
309
  onError: (error: PaymentError) => void;
296
310
  onClose: () => void;
297
311
  autoStart?: boolean;
298
312
  }
299
- declare function HubtelBridge({ paymentId, publicKey, merchantAccount, amount, reference, phone, description, callbackUrl, hubtelSessionToken, basicAuth, onSuccess, onError, onClose, autoStart, }: HubtelBridgeProps): react_jsx_runtime.JSX.Element;
313
+ declare function HubtelBridge({ paymentId, publicKey, merchantAccount, amount, reference, phone, description, callbackUrl, hubtelSessionToken, basicAuth, preferredMethod, onSuccess, onError, onClose, autoStart, }: HubtelBridgeProps): react_jsx_runtime.JSX.Element;
300
314
  /**
301
315
  * Opens Hubtel checkout modal directly
302
316
  * Uses the @hubteljs/checkout npm package
@@ -309,6 +323,7 @@ declare function openHubtelPopup(config: {
309
323
  callbackUrl?: string;
310
324
  customerPhoneNumber?: string;
311
325
  basicAuth?: string;
326
+ preferredMethod?: PaymentMethod;
312
327
  onSuccess?: (data: Record<string, unknown>) => void;
313
328
  onError?: (data: Record<string, unknown>) => void;
314
329
  onClose?: () => void;
package/dist/index.d.ts CHANGED
@@ -109,6 +109,16 @@ interface ReevitTheme {
109
109
  fontFamily?: string;
110
110
  /** Whether to use dark mode */
111
111
  darkMode?: boolean;
112
+ /** Custom logo URL to display in checkout header */
113
+ logoUrl?: string;
114
+ /** PSP selector background color */
115
+ pspSelectorBgColor?: string;
116
+ /** PSP selector text color */
117
+ pspSelectorTextColor?: string;
118
+ /** PSP selector border color */
119
+ pspSelectorBorderColor?: string;
120
+ /** Use border-only style for PSP selector (no filled background) */
121
+ pspSelectorUseBorder?: boolean;
112
122
  }
113
123
  interface CheckoutProviderOption {
114
124
  provider: string;
@@ -180,16 +190,19 @@ interface PaymentMethodSelectorProps {
180
190
  onSelect: (method: PaymentMethod) => void;
181
191
  disabled?: boolean;
182
192
  provider?: string;
193
+ layout?: 'grid' | 'list';
194
+ showLabel?: boolean;
183
195
  }
184
- declare function PaymentMethodSelector({ methods, selectedMethod, onSelect, disabled, provider, }: PaymentMethodSelectorProps): react_jsx_runtime.JSX.Element;
196
+ declare function PaymentMethodSelector({ methods, selectedMethod, onSelect, disabled, provider, layout, showLabel, }: PaymentMethodSelectorProps): react_jsx_runtime.JSX.Element;
185
197
 
186
198
  interface MobileMoneyFormProps {
187
199
  onSubmit: (data: MobileMoneyFormData) => void;
188
- onCancel: () => void;
200
+ onCancel?: () => void;
189
201
  isLoading?: boolean;
190
202
  initialPhone?: string;
203
+ hideCancel?: boolean;
191
204
  }
192
- declare function MobileMoneyForm({ onSubmit, onCancel, isLoading, initialPhone, }: MobileMoneyFormProps): react_jsx_runtime.JSX.Element;
205
+ declare function MobileMoneyForm({ onSubmit, onCancel, isLoading, initialPhone, hideCancel, }: MobileMoneyFormProps): react_jsx_runtime.JSX.Element;
193
206
 
194
207
  /**
195
208
  * useReevit hook
@@ -291,12 +304,13 @@ interface HubtelBridgeProps {
291
304
  hubtelSessionToken?: string;
292
305
  /** Basic auth credential (legacy - credentials exposed to client, deprecated) */
293
306
  basicAuth?: string;
307
+ preferredMethod?: PaymentMethod;
294
308
  onSuccess: (result: PaymentResult) => void;
295
309
  onError: (error: PaymentError) => void;
296
310
  onClose: () => void;
297
311
  autoStart?: boolean;
298
312
  }
299
- declare function HubtelBridge({ paymentId, publicKey, merchantAccount, amount, reference, phone, description, callbackUrl, hubtelSessionToken, basicAuth, onSuccess, onError, onClose, autoStart, }: HubtelBridgeProps): react_jsx_runtime.JSX.Element;
313
+ declare function HubtelBridge({ paymentId, publicKey, merchantAccount, amount, reference, phone, description, callbackUrl, hubtelSessionToken, basicAuth, preferredMethod, onSuccess, onError, onClose, autoStart, }: HubtelBridgeProps): react_jsx_runtime.JSX.Element;
300
314
  /**
301
315
  * Opens Hubtel checkout modal directly
302
316
  * Uses the @hubteljs/checkout npm package
@@ -309,6 +323,7 @@ declare function openHubtelPopup(config: {
309
323
  callbackUrl?: string;
310
324
  customerPhoneNumber?: string;
311
325
  basicAuth?: string;
326
+ preferredMethod?: PaymentMethod;
312
327
  onSuccess?: (data: Record<string, unknown>) => void;
313
328
  onError?: (data: Record<string, unknown>) => void;
314
329
  onClose?: () => void;