@w3payments/react 1.1.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.
Files changed (50) hide show
  1. package/README.md +308 -0
  2. package/dist/assets/3.svg +1 -0
  3. package/dist/assets/io.svg +1 -0
  4. package/dist/assets/main.css +1 -0
  5. package/dist/assets/vite.svg +1 -0
  6. package/dist/assets/w.svg +1 -0
  7. package/dist/components/PaymentButton.d.ts +18 -0
  8. package/dist/components/PaymentButton.d.ts.map +1 -0
  9. package/dist/components/PaymentFooter.d.ts +10 -0
  10. package/dist/components/PaymentFooter.d.ts.map +1 -0
  11. package/dist/components/PaymentHeader.d.ts +10 -0
  12. package/dist/components/PaymentHeader.d.ts.map +1 -0
  13. package/dist/components/PaymentInput.d.ts +23 -0
  14. package/dist/components/PaymentInput.d.ts.map +1 -0
  15. package/dist/components/PaymentMethodGroup.d.ts +14 -0
  16. package/dist/components/PaymentMethodGroup.d.ts.map +1 -0
  17. package/dist/components/PaymentMethodOption.d.ts +16 -0
  18. package/dist/components/PaymentMethodOption.d.ts.map +1 -0
  19. package/dist/components/PaymentMethodSelection.d.ts +14 -0
  20. package/dist/components/PaymentMethodSelection.d.ts.map +1 -0
  21. package/dist/components/PaymentSummary.d.ts +13 -0
  22. package/dist/components/PaymentSummary.d.ts.map +1 -0
  23. package/dist/components/W3PaymentWidget.d.ts +63 -0
  24. package/dist/components/W3PaymentWidget.d.ts.map +1 -0
  25. package/dist/components/W3PaymentsProvider.d.ts +24 -0
  26. package/dist/components/W3PaymentsProvider.d.ts.map +1 -0
  27. package/dist/components/index.d.ts +12 -0
  28. package/dist/components/index.d.ts.map +1 -0
  29. package/dist/context/W3PaymentsContext.d.ts +31 -0
  30. package/dist/context/W3PaymentsContext.d.ts.map +1 -0
  31. package/dist/hooks/index.d.ts +8 -0
  32. package/dist/hooks/index.d.ts.map +1 -0
  33. package/dist/hooks/useW3Payments.d.ts +32 -0
  34. package/dist/hooks/useW3Payments.d.ts.map +1 -0
  35. package/dist/http/W3PaymentsClient.d.ts +16 -0
  36. package/dist/http/W3PaymentsClient.d.ts.map +1 -0
  37. package/dist/index-B9KdNmCT.cjs +94 -0
  38. package/dist/index-Cu_k1Q9p.js +13544 -0
  39. package/dist/index.d.ts +6 -0
  40. package/dist/index.js +67 -0
  41. package/dist/index.mjs +5815 -0
  42. package/dist/main.d.ts +10 -0
  43. package/dist/main.d.ts.map +1 -0
  44. package/dist/types.d.ts +48 -0
  45. package/dist/types.d.ts.map +1 -0
  46. package/dist/utils/numbers.d.ts +16 -0
  47. package/dist/utils/numbers.d.ts.map +1 -0
  48. package/dist/utils/theme.d.ts +6 -0
  49. package/dist/utils/theme.d.ts.map +1 -0
  50. package/package.json +112 -0
package/README.md ADDED
@@ -0,0 +1,308 @@
1
+ # W3 Payments React
2
+
3
+ React components for crypto onramping and payments. Currently focused on fiat-to-crypto and crypto-to-crypto onramp flows with MeshPay integration.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm install @w3payments/react @w3payments/core @w3payments/common
9
+ ```
10
+
11
+ ## Quick Start
12
+
13
+ ### 1. Backend Setup (Required)
14
+
15
+ The widget requires a secure backend to create payment sessions. Create an Express server:
16
+
17
+ ```typescript
18
+ // server.ts
19
+ import express from 'express';
20
+ import cors from 'cors';
21
+ import { W3Payments } from '@w3payments/core';
22
+ import type { CreatePaymentOptions } from '@w3payments/common';
23
+
24
+ const app = express();
25
+ app.use(cors());
26
+ app.use(express.json());
27
+
28
+ // Initialize W3Payments with your credentials
29
+ const w3payments = new W3Payments({
30
+ config: {
31
+ environment: 'sandbox', // or 'production'
32
+ meshpay: {
33
+ clientId: process.env.MESH_CLIENT_ID!,
34
+ clientSecret: process.env.MESH_CLIENT_SECRET!,
35
+ },
36
+ },
37
+ });
38
+
39
+ await w3payments.initialize();
40
+
41
+ // Create payment endpoint
42
+ app.post('/api/payments/create', async (req, res) => {
43
+ try {
44
+ // Validate request body matches expected CreatePaymentOptions type
45
+ const paymentOptions: CreatePaymentOptions = req.body;
46
+ const session = await w3payments.paymentIntents.create(paymentOptions);
47
+ res.json(session);
48
+ } catch (error) {
49
+ res.status(500).json({
50
+ error: error instanceof Error ? error.message : 'Payment creation failed'
51
+ });
52
+ }
53
+ });
54
+
55
+ // Payment status endpoint
56
+ app.get('/api/payments/:sessionId', async (req, res) => {
57
+ try {
58
+ const { sessionId } = req.params;
59
+ const { vendorId } = req.query;
60
+
61
+ if (!vendorId || typeof vendorId !== 'string') {
62
+ return res.status(400).json({ error: 'vendorId is required' });
63
+ }
64
+
65
+ const status = await w3payments.paymentIntents.retrieve(sessionId, vendorId);
66
+ res.json(status);
67
+ } catch (error) {
68
+ res.status(500).json({
69
+ error: error instanceof Error ? error.message : 'Status retrieval failed'
70
+ });
71
+ }
72
+ });
73
+
74
+ app.listen(3001);
75
+ ```
76
+
77
+ **Credentials**: MeshPay credentials are provided by the W3 Payments team during onboarding.
78
+
79
+ ### 2. React Integration
80
+
81
+ Add the payment widget to your React app:
82
+
83
+ ```tsx
84
+ import { W3PaymentsProvider, W3PaymentWidget } from '@w3payments/react';
85
+
86
+ export function PaymentPage() {
87
+ return (
88
+ <div style={{ width: '400px', height: '600px' }}>
89
+ <W3PaymentsProvider
90
+ endpoint="http://localhost:3001/api/payments"
91
+ environment="sandbox"
92
+ >
93
+ <W3PaymentWidget
94
+ title="Fund Wallet"
95
+ targetCurrency="USDC"
96
+ targetNetwork="solana"
97
+ destinations={[{
98
+ address: "your_wallet_or_contract_address",
99
+ networkId: "solana",
100
+ symbol: "USDC"
101
+ }]}
102
+ onComplete={(result) => {
103
+ console.log('Payment completed:', result.transactionId);
104
+ // Update UI, redirect, etc.
105
+ }}
106
+ onError={(error) => {
107
+ console.error('Payment failed:', error.message);
108
+ // Show error to user
109
+ }}
110
+ />
111
+ </W3PaymentsProvider>
112
+ </div>
113
+ );
114
+ }
115
+ ```
116
+
117
+ ## Configuration
118
+
119
+ ### Required Props
120
+
121
+ **destinations** - Where payments will be sent:
122
+ ```tsx
123
+ destinations={[{
124
+ address: "contract_or_wallet_address",
125
+ networkId: "solana", // bitcoin, ethereum, solana, polygon, etc.
126
+ symbol: "USDC" // Currency symbol
127
+ }]}
128
+ ```
129
+
130
+ ### Payment Method Filtering
131
+
132
+ Control which payment options are available:
133
+
134
+ ```tsx
135
+ // Show specific wallet currencies
136
+ walletFilter={['BTC', 'ETH', 'USDC']}
137
+
138
+ // Show specific exchanges
139
+ exchangeFilter={['coinbase', 'kraken', 'binance']}
140
+
141
+ // Show fiat payment methods
142
+ fiatFilter={['ACH']}
143
+
144
+ // Target specific currency (auto-converts if needed)
145
+ targetCurrency="USDC"
146
+ targetNetwork="solana"
147
+ ```
148
+
149
+ ### Event Handling
150
+
151
+ ```tsx
152
+ <W3PaymentWidget
153
+ onInitiate={(data) => {
154
+ // User clicked payment button - log for analytics
155
+ console.log(`Starting ${data.currency} payment for ${data.amount}`);
156
+ }}
157
+
158
+ onComplete={(data) => {
159
+ // Payment successful - update your app state
160
+ updateUserBalance(data.amount);
161
+ redirectToSuccess();
162
+ }}
163
+
164
+ onError={(error) => {
165
+ // Payment failed - show user-friendly error
166
+ showErrorMessage(error.message);
167
+ }}
168
+ />
169
+ ```
170
+
171
+ ## Use Cases
172
+
173
+ ### Crypto Onramping (Coming Soon with IronPay)
174
+ ```tsx
175
+ // Buy crypto with fiat (ACH, bank transfer) - IronPay integration in progress
176
+ <W3PaymentWidget
177
+ title="Buy Crypto"
178
+ targetCurrency="USDC"
179
+ targetNetwork="solana"
180
+ fiatFilter={['ACH']} // Will be available with IronPay
181
+ destinations={[{ address: userWallet, networkId: "solana", symbol: "USDC" }]}
182
+ />
183
+ ```
184
+
185
+ ### Crypto-to-Crypto Transfers (Available Now)
186
+ ```tsx
187
+ // Transfer between different cryptocurrencies
188
+ <W3PaymentWidget
189
+ title="Fund Wallet"
190
+ targetCurrency="USDC"
191
+ targetNetwork="solana"
192
+ walletFilter={['BTC', 'ETH']} // Pay with BTC/ETH, receive USDC
193
+ destinations={[{ address: userWallet, networkId: "solana", symbol: "USDC" }]}
194
+ />
195
+ ```
196
+
197
+ ### Coming Soon
198
+
199
+ ```tsx
200
+ // Auto-Converting Payments - COMING SOON
201
+ <W3PaymentWidget
202
+ title="Pay with Any Currency"
203
+ targetCurrency="ETH"
204
+ autoConvert={true} // Not yet available
205
+ destinations={[{ address: receiverWallet, networkId: "ethereum", symbol: "ETH" }]}
206
+ />
207
+
208
+ // Staking with Auto-Yield - COMING SOON
209
+ <W3PaymentWidget
210
+ title="Stake & Earn"
211
+ autoYield={true} // Not yet available
212
+ destinations={[{ address: stakingContract, networkId: "solana", symbol: "USDC" }]}
213
+ />
214
+
215
+ // Crypto Offramping - COMING SOON
216
+ <W3PaymentWidget
217
+ title="Cash Out"
218
+ targetCurrency="USD" // Fiat offramp not yet available
219
+ destinations={[{ address: bankAccount, networkId: "fiat", symbol: "USD" }]}
220
+ />
221
+ ```
222
+
223
+ ## Current Features
224
+
225
+ ### MeshPay Integration
226
+ Secure crypto-to-crypto transfers and exchange integrations through MeshPay's infrastructure.
227
+
228
+ ### Multi-Currency Support
229
+ Support for major cryptocurrencies (BTC, ETH, USDC, SOL) across multiple networks (Bitcoin, Ethereum, Solana).
230
+
231
+ ### Smart Payment Routing
232
+ Automatically routes payments through the most efficient available methods based on your target currency and network.
233
+
234
+ ## Planned Features (Coming Soon)
235
+
236
+ ### IronPay Integration
237
+ Fiat-to-crypto onramping with ACH bank transfers and direct USD purchasing (integration in progress).
238
+
239
+ ### Auto Conversion
240
+ Automatic currency conversions between any supported payment methods and target currencies at optimal rates.
241
+
242
+ ### Auto Yield
243
+ Automatic routing through yield-generating opportunities (staking, lending pools) while maintaining the same user experience.
244
+
245
+ ### Cross-Chain Support
246
+ Seamless payments across Bitcoin, Ethereum, Solana, Polygon with automatic bridging.
247
+
248
+ ### Crypto Offramping
249
+ Direct crypto-to-fiat conversions with bank account deposits.
250
+
251
+ ## Styling
252
+
253
+ Override default colors with CSS variables:
254
+
255
+ ```css
256
+ .w3-widget {
257
+ --color-primary: #6366f1;
258
+ --color-background: #ffffff;
259
+ --color-border: #e5e7eb;
260
+ --color-text: #111827;
261
+ --color-text-muted: #6b7280;
262
+ }
263
+
264
+ /* Dark theme */
265
+ [data-theme="dark"] .w3-widget {
266
+ --color-primary: #818cf8;
267
+ --color-background: #1f2937;
268
+ --color-border: #374151;
269
+ --color-text: #f9fafb;
270
+ }
271
+ ```
272
+
273
+ ## How It Works
274
+
275
+ 1. **Payment Initiation**: User selects amount and payment method
276
+ 2. **Secure Session**: Widget calls your backend to create payment session
277
+ 3. **Smart Routing**: W3Payments optimizes vendor selection, conversions, and yield
278
+ 4. **User Flow**: User completes payment in vendor's secure interface
279
+ 5. **Auto Processing**: Auto conversions, bridging, and yield optimization happen automatically
280
+ 6. **Completion**: Widget receives result and calls your success/error handlers
281
+
282
+ The widget abstracts all complexity - multi-vendor routing, currency conversions, cross-chain bridging, and yield optimization happen seamlessly behind the scenes.
283
+
284
+ ## Roadmap
285
+
286
+ **Current**: Onramping, basic payments, MeshPay integration
287
+ **Coming Soon**: Offramping, auto-yield optimization, additional vendor integrations
288
+ **Future**: Advanced DeFi integrations, institutional-grade APIs, white-label solutions
289
+
290
+ ## Framework Support
291
+
292
+ This is the React implementation. Other frameworks coming soon:
293
+ - `@w3payments/vue` - Vue 3 components
294
+ - `@w3payments/angular` - Angular components
295
+ - `@w3payments/nextjs` - Next.js integration
296
+
297
+ Full SDK and REST API also in development for non-JavaScript environments.
298
+
299
+ ## Development
300
+
301
+ Test the widget with Storybook:
302
+
303
+ ```bash
304
+ cd packages/react
305
+ npm run storybook
306
+ ```
307
+
308
+ Make sure your backend server is running for end-to-end payment testing.
@@ -0,0 +1 @@
1
+ <svg width="24" height="23.5" viewBox="0 0 48 47" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M43.9654 0H3.55466C1.75037 0 0.28833 1.46203 0.28833 3.26633V43.677C0.28833 45.4813 1.75037 46.9434 3.55466 46.9434H43.9654C45.7697 46.9434 47.2317 45.4813 47.2317 43.677V3.26633C47.2317 1.46203 45.7697 0 43.9654 0ZM39.785 30.1883C39.785 35.0097 35.8638 38.9309 31.0425 38.9309H10.8906C9.77276 38.9309 8.86468 38.0248 8.86468 36.905C8.86468 35.7852 9.77078 34.8791 10.8906 34.8791H31.0425C33.6302 34.8791 35.7352 32.7741 35.7352 30.1864C35.7352 27.5986 33.6302 25.4936 31.0425 25.4936H23.0419C21.9241 25.4936 21.016 24.5875 21.016 23.4677C21.016 22.348 21.9221 21.4419 23.0419 21.4419H31.0425C33.6302 21.4419 35.7352 19.3368 35.7352 16.7491C35.7352 14.1614 33.6302 12.0563 31.0425 12.0563H10.8906C9.77276 12.0563 8.86468 11.1502 8.86468 10.0305C8.86468 8.9107 9.77078 8.00459 10.8906 8.00459H31.0425C35.8638 8.00459 39.785 11.9258 39.785 16.7471C39.785 19.4437 38.5564 21.8593 36.6315 23.4638C38.5564 25.0683 39.785 27.4839 39.785 30.1804V30.1883Z" fill="white" class="group-hover:fill-[#FF3223]"></path></svg>
@@ -0,0 +1 @@
1
+ <svg width="14.5" height="11" viewBox="0 0 29 22" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15.4597 5.22243C16.6803 3.79799 16.2708 4.07496 18.1384 2.86616C18.6825 2.60897 18.8744 2.06096 18.7141 1.47535C18.5539 0.889747 17.9129 0.632558 17.4658 0.816549C15.6714 1.691 14.8523 2.698 14.2608 3.44781C13.9066 3.87515 13.7939 4.52802 14.1144 5.00283C14.4349 5.47963 15.0422 5.58844 15.4597 5.22243Z" fill="white"></path><path d="M28.2084 10.9678C28.1055 10.3169 27.4586 10.123 27.0412 10.2694C26.6257 10.4158 26.3685 10.8926 26.3685 11.4782C26.3685 12.687 26.1449 13.969 25.7275 15.1759C25.0232 17.0811 23.5176 19.0575 22.4295 19.3127C22.3979 19.2395 22.3346 18.9467 22.3346 18.5807C22.3346 16.8239 23.3594 13.4547 25.9194 9.97664C26.2716 9.53744 26.2083 8.84302 25.7908 8.43943C25.407 8.03584 24.7996 8.10904 24.4455 8.58583C23.8401 9.41082 23.306 10.2398 22.8351 11.0588C22.8054 11.0747 22.7777 11.0925 22.748 11.1122C15.7702 15.9831 12.1241 19.2791 9.72427 19.2791C9.72427 19.1683 9.75592 18.9863 9.97948 18.3631L13.3091 9.72143C13.5327 9.17144 13.3091 8.51263 12.8284 8.29303C12.3476 8.03584 11.7719 8.29303 11.58 8.84302L8.09012 17.8863C7.44912 19.5343 7.99318 21.5107 9.72229 21.5107C12.1221 21.5107 15.3706 18.9506 21.0862 14.8969C20.6391 16.2442 20.4096 17.4985 20.4096 18.5827C20.4096 19.9003 20.9536 21.5127 22.3623 21.5127C24.1863 21.5127 26.5228 18.8042 27.516 15.9831C27.7395 15.3242 28.0126 14.1708 28.0759 13.6782C28.1392 13.1856 28.3054 11.6207 28.2025 10.9698L28.2084 10.9678Z" fill="white"></path><path d="M1.16597 19.376C0.576406 19.376 0.0996094 19.8528 0.0996094 20.4423C0.0996094 21.0319 0.576406 21.5087 1.16597 21.5087C1.75553 21.5087 2.23232 21.0319 2.23232 20.4423C2.23232 19.8528 1.75553 19.376 1.16597 19.376Z" fill="white"></path></svg>
@@ -0,0 +1 @@
1
+ @layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-border-style:solid;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-blue-500:oklch(62.3% .214 259.815);--color-blue-700:oklch(48.8% .243 264.376);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-md:28rem;--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-3xl:1.875rem;--text-3xl--line-height: 1.2 ;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-wide:.025em;--radius-lg:var(--radius-w3-lg);--animate-spin:spin 1s linear infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-w3-primary:#2563eb;--color-w3-secondary:#64748b;--color-w3-background:#fff;--color-w3-surface:#f8fafc;--color-w3-border:#e2e8f0;--color-w3-text:#0f172a;--color-w3-text-muted:#64748b;--color-w3-success:#16a34a;--color-w3-warning:#d97706;--color-w3-error:#dc2626;--color-w3-info:#0284c7;--radius-w3-default:.5rem;--radius-w3-sm:.25rem;--radius-w3-lg:.75rem;--shadow-w3-default:0 1px 3px #0000001a,0 1px 2px #0000000f;--shadow-w3-md:0 4px 6px #00000012,0 2px 4px #0000000f;--shadow-w3-lg:0 10px 15px #0000001a,0 4px 6px #0000000d;--spacing-w3-widget-padding:1.5rem;--spacing-w3-card-padding:1rem;--color-primary:var(--color-w3-primary);--color-background:var(--color-w3-background);--color-border:var(--color-w3-border);--color-text:var(--color-w3-text)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-none{pointer-events:none}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:calc(var(--spacing)*0)}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.m-0{margin:calc(var(--spacing)*0)}.mx-2{margin-inline:calc(var(--spacing)*2)}.mx-auto{margin-inline:auto}.mt-0\.5{margin-top:calc(var(--spacing)*.5)}.mt-4{margin-top:calc(var(--spacing)*4)}.mb-0\.5{margin-bottom:calc(var(--spacing)*.5)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.ml-1{margin-left:calc(var(--spacing)*1)}.flex{display:flex}.grid{display:grid}.aspect-square{aspect-ratio:1}.h-2\.5{height:calc(var(--spacing)*2.5)}.h-3{height:calc(var(--spacing)*3)}.h-16{height:calc(var(--spacing)*16)}.h-\[0\.65rem\]{height:.65rem}.h-\[70vh\]{height:70vh}.h-\[max\(0\.7rem\,min\(1rem\,2\.5vw\)\)\]{height:max(.7rem,min(1rem,2.5vw))}.h-\[max\(0\.8rem\,1\.8vw\)\]{height:max(.8rem,1.8vw)}.h-\[max\(1rem\,2vw\)\]{height:max(1rem,2vw)}.h-full{height:100%}.h-screen{height:100vh}.max-h-\[600px\]{max-height:600px}.min-h-screen{min-height:100vh}.w-3{width:calc(var(--spacing)*3)}.w-16{width:calc(var(--spacing)*16)}.w-\[0\.65rem\]{width:.65rem}.w-\[max\(0\.7rem\,min\(1rem\,2\.5vw\)\)\]{width:max(.7rem,min(1rem,2.5vw))}.w-\[max\(0\.8rem\,1\.8vw\)\]{width:max(.8rem,1.8vw)}.w-\[max\(1rem\,2vw\)\]{width:max(1rem,2vw)}.w-auto{width:auto}.w-full{width:100%}.max-w-md{max-width:var(--container-md)}.flex-1{flex:1}.flex-shrink-0{flex-shrink:0}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-spin{animation:var(--animate-spin)}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-0{gap:calc(var(--spacing)*0)}.gap-0\.5{gap:calc(var(--spacing)*.5)}.gap-1{gap:calc(var(--spacing)*1)}.gap-1\.5{gap:calc(var(--spacing)*1.5)}.gap-2{gap:calc(var(--spacing)*2)}.gap-3{gap:calc(var(--spacing)*3)}.gap-\[0\.5\%\]{gap:.5%}.gap-\[max\(0\.25rem\,1\%\)\]{gap:max(.25rem,1%)}:where(.space-y-0>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*0)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*0)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-x-4>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*4)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-x-reverse)))}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-\[var\(--border-radius\)\]{border-radius:var(--border-radius)}.rounded-lg{border-radius:var(--radius-lg)}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-none{--tw-border-style:none;border-style:none}.border-\[var\(--color-border\)\]{border-color:var(--color-border)}.border-\[var\(--color-border-light\)\]{border-color:var(--color-border-light)}.border-\[var\(--color-primary\)\]{border-color:var(--color-primary)}.border-gray-100{border-color:var(--color-gray-100)}.border-w3-border{border-color:var(--color-w3-border)}.bg-\[var\(--color-background\)\]{background-color:var(--color-background)}.bg-\[var\(--color-primary\)\]{background-color:var(--color-primary)}.bg-\[var\(--color-primary-light\)\]{background-color:var(--color-primary-light)}.bg-background{background-color:var(--color-background)}.bg-blue-500{background-color:var(--color-blue-500)}.bg-gray-100{background-color:var(--color-gray-100)}.bg-gray-300{background-color:var(--color-gray-300)}.bg-primary{background-color:var(--color-primary)}.bg-w3-primary{background-color:var(--color-w3-primary)}.bg-w3-secondary{background-color:var(--color-w3-secondary)}.bg-white{background-color:var(--color-white)}.bg-white\/50{background-color:#ffffff80}@supports (color:color-mix(in lab,red,red)){.bg-white\/50{background-color:color-mix(in oklab,var(--color-white)50%,transparent)}}.object-contain{object-fit:contain}.p-4{padding:calc(var(--spacing)*4)}.p-8{padding:calc(var(--spacing)*8)}.px-1{padding-inline:calc(var(--spacing)*1)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-\[max\(0\.75rem\,2\%\)\]{padding-inline:max(.75rem,2%)}.px-\[var\(--spacing\)\]{padding-inline:var(--spacing)}.py-0\.5{padding-block:calc(var(--spacing)*.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-\[calc\(var\(--spacing\)\*0\.5\)\]{padding-block:calc(var(--spacing)*.5)}.py-\[calc\(var\(--spacing\)\*0\.375\)\]{padding-block:calc(var(--spacing)*.375)}.py-\[max\(0\.5rem\,1\.5\%\)\]{padding-block:max(.5rem,1.5%)}.py-\[var\(--spacing\)\]{padding-block:var(--spacing)}.pt-\[calc\(var\(--spacing\)\*0\.75\)\]{padding-top:calc(var(--spacing)*.75)}.pb-1{padding-bottom:calc(var(--spacing)*1)}.text-center{text-align:center}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-\[0\.5rem\]{font-size:.5rem}.text-\[0\.6rem\]{font-size:.6rem}.text-\[0\.7rem\]{font-size:.7rem}.text-\[0\.8rem\]{font-size:.8rem}.text-\[0\.45rem\]{font-size:.45rem}.text-\[0\.65rem\]{font-size:.65rem}.text-\[length\:max\(0\.7rem\,min\(1rem\,2\.5vw\)\)\]{font-size:max(.7rem,min(1rem,2.5vw))}.text-\[length\:max\(0\.45rem\,min\(0\.7rem\,1\.8vw\)\)\]{font-size:max(.45rem,min(.7rem,1.8vw))}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.text-\[var\(--color-primary\)\]{color:var(--color-primary)}.text-\[var\(--color-text\)\]{color:var(--color-text)}.text-\[var\(--color-text-muted\)\]{color:var(--color-text-muted)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-white{color:var(--color-white)}.uppercase{text-transform:uppercase}.opacity-25{opacity:.25}.opacity-30{opacity:.3}.opacity-60{opacity:.6}.opacity-75{opacity:.75}.opacity-80{opacity:.8}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:var(--shadow-w3-lg);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-black\/10{--tw-shadow-color:#0000001a}@supports (color:color-mix(in lab,red,red)){.shadow-black\/10{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-black)10%,transparent)var(--tw-shadow-alpha),transparent)}}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-200{--tw-duration:.2s;transition-duration:.2s}@media(hover:hover){.group-hover\:fill-\[\#BF1B1B\]:is(:where(.group):hover *){fill:#bf1b1b}.group-hover\:fill-\[\#FF3223\]:is(:where(.group):hover *){fill:#ff3223}.hover\:border-\[var\(--color-border-light\)\]:hover{border-color:var(--color-border-light)}.hover\:bg-\[var\(--color-primary-hover\)\]:hover{background-color:var(--color-primary-hover)}.hover\:bg-blue-700:hover{background-color:var(--color-blue-700)}}}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
@@ -0,0 +1 @@
1
+ <svg width="24" height="23.5" viewBox="0 0 48 47" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M43.972 0H3.56125C1.75696 0 0.294922 1.46203 0.294922 3.26633V43.677C0.294922 45.4813 1.75696 46.9434 3.56125 46.9434H43.972C45.7763 46.9434 47.2383 45.4813 47.2383 43.677V3.26633C47.2383 1.46203 45.7763 0 43.972 0ZM39.7896 30.1883C39.7896 35.0097 35.8685 38.9309 31.0471 38.9309C28.3506 38.9309 25.9349 37.7023 24.3304 35.7773C22.726 37.7023 20.3104 38.9309 17.6138 38.9309C12.7924 38.9309 8.87127 35.0097 8.87127 30.1883V10.0384C8.87127 8.92059 9.77737 8.0125 10.8971 8.0125C12.0169 8.0125 12.923 8.91861 12.923 10.0384V30.1903C12.923 32.7781 15.028 34.8831 17.6158 34.8831C20.2035 34.8831 22.3085 32.7781 22.3085 30.1903V22.1897C22.3085 21.0719 23.2146 20.1638 24.3344 20.1638C25.4542 20.1638 26.3603 21.0699 26.3603 22.1897V30.1903C26.3603 32.7781 28.4653 34.8831 31.053 34.8831C33.6408 34.8831 35.7458 32.7781 35.7458 30.1903V10.0384C35.7458 8.92059 36.6519 8.0125 37.7717 8.0125C38.8914 8.0125 39.7975 8.91861 39.7975 10.0384V30.1903L39.7896 30.1883Z" fill="white" class="group-hover:fill-[#BF1B1B]"></path></svg>
@@ -0,0 +1,18 @@
1
+ import { default as React } from 'react';
2
+ export interface PaymentButtonProps {
3
+ /** Amount to display on the button */
4
+ amount: string;
5
+ /** Currency symbol (e.g., '$', '€') */
6
+ currencySymbol?: string;
7
+ /** Whether the button is disabled */
8
+ disabled?: boolean;
9
+ /** Loading state */
10
+ loading?: boolean;
11
+ /** Click handler */
12
+ onClick?: () => void;
13
+ /** Custom button text (overrides "Pay" prefix) */
14
+ text?: string;
15
+ }
16
+ export declare const PaymentButton: React.FC<PaymentButtonProps>;
17
+ export default PaymentButton;
18
+ //# sourceMappingURL=PaymentButton.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PaymentButton.d.ts","sourceRoot":"","sources":["../../lib/components/PaymentButton.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,WAAW,kBAAkB;IACjC,sCAAsC;IACtC,MAAM,EAAE,MAAM,CAAC;IACf,uCAAuC;IACvC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,qCAAqC;IACrC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,oBAAoB;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,oBAAoB;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,kDAAkD;IAClD,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAiFtD,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { default as React } from 'react';
2
+ export interface PaymentFooterProps {
3
+ /** Custom branding text (default: "Payments") */
4
+ brandingText?: string;
5
+ /** Show secured indicator (default: true) */
6
+ showSecured?: boolean;
7
+ }
8
+ export declare const PaymentFooter: React.FC<PaymentFooterProps>;
9
+ export default PaymentFooter;
10
+ //# sourceMappingURL=PaymentFooter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PaymentFooter.d.ts","sourceRoot":"","sources":["../../lib/components/PaymentFooter.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,WAAW,kBAAkB;IACjC,iDAAiD;IACjD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,6CAA6C;IAC7C,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAyFtD,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { default as React } from 'react';
2
+ export interface PaymentHeaderProps {
3
+ /** Title text for the header */
4
+ title?: string;
5
+ /** Logo URL for the header */
6
+ logo?: string;
7
+ }
8
+ export declare const PaymentHeader: React.FC<PaymentHeaderProps>;
9
+ export default PaymentHeader;
10
+ //# sourceMappingURL=PaymentHeader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PaymentHeader.d.ts","sourceRoot":"","sources":["../../lib/components/PaymentHeader.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,WAAW,kBAAkB;IACjC,gCAAgC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,8BAA8B;IAC9B,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CA4BtD,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -0,0 +1,23 @@
1
+ import { default as React } from 'react';
2
+ import { Currency } from '@w3payments/common';
3
+ export interface PaymentInputProps {
4
+ /** Additional CSS classes */
5
+ className?: string;
6
+ /** Title text (e.g., "Paying for this or that") */
7
+ title?: string;
8
+ /** Subtitle text */
9
+ subtext?: string;
10
+ /** Current amount value */
11
+ amount: string;
12
+ /** Currency for the payment */
13
+ currency: Currency;
14
+ /** Whether amount input is editable */
15
+ editable?: boolean;
16
+ /** USD conversion rate (amount * rate = USD) */
17
+ usdConversion?: number;
18
+ /** Callback when amount changes */
19
+ onAmountChange?: (amount: string) => void;
20
+ }
21
+ export declare const PaymentInput: React.FC<PaymentInputProps>;
22
+ export default PaymentInput;
23
+ //# sourceMappingURL=PaymentInput.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PaymentInput.d.ts","sourceRoot":"","sources":["../../lib/components/PaymentInput.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAmB,MAAM,OAAO,CAAC;AACxC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAEnD,MAAM,WAAW,iBAAiB;IAChC,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mDAAmD;IACnD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oBAAoB;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,2BAA2B;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,+BAA+B;IAC/B,QAAQ,EAAE,QAAQ,CAAC;IACnB,uCAAuC;IACvC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,gDAAgD;IAChD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,mCAAmC;IACnC,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CAC3C;AAED,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAwIpD,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { default as React } from 'react';
2
+ export interface PaymentMethodGroupProps {
3
+ /** Group label/title */
4
+ label: string;
5
+ /** Optional description for the group */
6
+ description?: string;
7
+ /** Child elements (PaymentMethodOptions) */
8
+ children: React.ReactNode;
9
+ /** Show disabled payment methods at the end of the list (default: true) */
10
+ showDisabled?: boolean;
11
+ }
12
+ export declare const PaymentMethodGroup: React.FC<PaymentMethodGroupProps>;
13
+ export default PaymentMethodGroup;
14
+ //# sourceMappingURL=PaymentMethodGroup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PaymentMethodGroup.d.ts","sourceRoot":"","sources":["../../lib/components/PaymentMethodGroup.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAmC,MAAM,OAAO,CAAC;AAExD,MAAM,WAAW,uBAAuB;IACtC,wBAAwB;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,yCAAyC;IACzC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,4CAA4C;IAC5C,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,2EAA2E;IAC3E,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAgEhE,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { default as React } from 'react';
2
+ import { PaymentMethodDisplayData } from '../types';
3
+ /**
4
+ * PaymentMethodOption component props
5
+ */
6
+ export interface PaymentMethodOptionProps {
7
+ /** Payment method display data */
8
+ data: PaymentMethodDisplayData;
9
+ /** Whether this option is selected */
10
+ selected?: boolean;
11
+ /** Click handler */
12
+ onClick?: () => void;
13
+ }
14
+ export declare const PaymentMethodOption: React.FC<PaymentMethodOptionProps>;
15
+ export default PaymentMethodOption;
16
+ //# sourceMappingURL=PaymentMethodOption.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PaymentMethodOption.d.ts","sourceRoot":"","sources":["../../lib/components/PaymentMethodOption.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAExD;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC,kCAAkC;IAClC,IAAI,EAAE,wBAAwB,CAAC;IAC/B,sCAAsC;IACtC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,oBAAoB;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CAyFlE,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { default as React } from 'react';
2
+ export interface PaymentMethodSelectionProps {
3
+ /** Currently selected payment method ID */
4
+ selectedMethodId?: string;
5
+ /** Callback when a payment method is selected */
6
+ onMethodSelect?: (methodId: string) => void;
7
+ /** Child elements (PaymentMethodGroups) */
8
+ children: React.ReactNode;
9
+ /** Title for the selection section */
10
+ title?: string;
11
+ }
12
+ export declare const PaymentMethodSelection: React.FC<PaymentMethodSelectionProps>;
13
+ export default PaymentMethodSelection;
14
+ //# sourceMappingURL=PaymentMethodSelection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PaymentMethodSelection.d.ts","sourceRoot":"","sources":["../../lib/components/PaymentMethodSelection.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,WAAW,2BAA2B;IAC1C,2CAA2C;IAC3C,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,iDAAiD;IACjD,cAAc,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C,2CAA2C;IAC3C,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,sCAAsC;IACtC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,sBAAsB,EAAE,KAAK,CAAC,EAAE,CAAC,2BAA2B,CAyBxE,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { default as React } from 'react';
2
+ import { PaymentMethodDisplayData } from '../types';
3
+ export interface PaymentSummaryProps {
4
+ /** Selected payment method */
5
+ selectedMethod?: PaymentMethodDisplayData;
6
+ /** Processing fee percentage */
7
+ processingFee?: number;
8
+ /** Processing time description */
9
+ processingTime?: string;
10
+ }
11
+ export declare const PaymentSummary: React.FC<PaymentSummaryProps>;
12
+ export default PaymentSummary;
13
+ //# sourceMappingURL=PaymentSummary.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PaymentSummary.d.ts","sourceRoot":"","sources":["../../lib/components/PaymentSummary.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAExD,MAAM,WAAW,mBAAmB;IAClC,8BAA8B;IAC9B,cAAc,CAAC,EAAE,wBAAwB,CAAC;IAC1C,gCAAgC;IAChC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,kCAAkC;IAClC,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAoGxD,CAAC;AAEF,eAAe,cAAc,CAAC"}
@@ -0,0 +1,63 @@
1
+ import { default as React } from 'react';
2
+ import { CryptoDestination } from '@w3payments/common';
3
+ export interface PaymentInitiateData {
4
+ amount: string;
5
+ currency: string;
6
+ paymentMethodId: string;
7
+ userId?: string;
8
+ }
9
+ export interface PaymentCompleteData {
10
+ amount: string;
11
+ currency: string;
12
+ paymentMethodId: string;
13
+ transactionId: string;
14
+ vendorId: string;
15
+ status: 'pending' | 'processing' | 'completed' | 'failed' | 'expired';
16
+ userId?: string;
17
+ checkoutData?: Record<string, any>;
18
+ }
19
+ export interface PaymentErrorData {
20
+ code?: string;
21
+ message: string;
22
+ transactionId?: string;
23
+ vendorId?: string;
24
+ userId?: string;
25
+ details?: unknown;
26
+ }
27
+ export interface W3PaymentWidgetProps {
28
+ /** Widget title (displayed in header) */
29
+ title?: string;
30
+ /** Widget logo URL (displayed in header) */
31
+ logo?: string;
32
+ /** User ID from the merchant's system */
33
+ userId?: string;
34
+ /** Transaction ID from the merchant's system */
35
+ transactionId?: string;
36
+ /** Whether the payment amount input is editable (default: true) */
37
+ editable?: boolean;
38
+ /** Payment currency code (default: 'USD') */
39
+ currency?: string;
40
+ /** USD conversion rate for the selected currency (amount * rate = USD) */
41
+ usdConversion?: number;
42
+ /** Target currency to receive (e.g., 'USDC', 'BTC'). Filters payment methods to only show those supporting this currency */
43
+ targetCurrency?: string;
44
+ /** Target network to receive on (e.g., 'ethereum', 'solana', 'bitcoin'). Works with targetCurrency to filter methods */
45
+ targetNetwork?: string;
46
+ /** Crypto destinations where payments will be sent */
47
+ destinations?: CryptoDestination[];
48
+ /** Filter for wallet payment methods. Format: ['BTC', 'ETH'] for main networks, ['BTC-ETH'] for BTC on Ethereum */
49
+ walletFilter?: string[];
50
+ /** Filter for exchange payment methods. Format: ['exchangeTypeA', 'exchangeTypeB'] */
51
+ exchangeFilter?: string[];
52
+ /** Filter for fiat payment methods. Format: ['ACH'] */
53
+ fiatFilter?: string[];
54
+ /** Called when payment is initiated (Buy button clicked) */
55
+ onInitiate?: (data: PaymentInitiateData) => void | Promise<void>;
56
+ /** Called when payment completes successfully */
57
+ onComplete?: (data: PaymentCompleteData) => void;
58
+ /** Called when payment fails */
59
+ onError?: (error: PaymentErrorData) => void;
60
+ }
61
+ export declare const W3PaymentWidget: React.FC<W3PaymentWidgetProps>;
62
+ export default W3PaymentWidget;
63
+ //# sourceMappingURL=W3PaymentWidget.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"W3PaymentWidget.d.ts","sourceRoot":"","sources":["../../lib/components/W3PaymentWidget.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAA4B,MAAM,OAAO,CAAC;AACjD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAW5D,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,EAAE,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,EAAE,MAAM,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,SAAS,GAAG,YAAY,GAAG,WAAW,GAAG,QAAQ,GAAG,SAAS,CAAC;IACtE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CACpC;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,oBAAoB;IACnC,yCAAyC;IACzC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4CAA4C;IAC5C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,yCAAyC;IACzC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,gDAAgD;IAChD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,mEAAmE;IACnE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,0EAA0E;IAC1E,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,4HAA4H;IAC5H,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,wHAAwH;IACxH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,sDAAsD;IACtD,YAAY,CAAC,EAAE,iBAAiB,EAAE,CAAC;IACnC,mHAAmH;IACnH,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,sFAAsF;IACtF,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,uDAAuD;IACvD,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,4DAA4D;IAC5D,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,mBAAmB,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACjE,iDAAiD;IACjD,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,mBAAmB,KAAK,IAAI,CAAC;IACjD,gCAAgC;IAChC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,IAAI,CAAC;CAC7C;AAED,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CA0T1D,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -0,0 +1,24 @@
1
+ import { default as React, ReactNode } from 'react';
2
+ import { W3ThemeInput } from '@w3payments/common';
3
+ import { PaymentEvent } from '../types';
4
+ /**
5
+ * W3PaymentsProvider component props
6
+ */
7
+ export interface W3PaymentsProviderProps {
8
+ /** Server endpoint for W3Payments API */
9
+ endpoint: string;
10
+ /** Environment for payment adapters */
11
+ environment?: 'sandbox' | 'production';
12
+ /** Optional theme configuration */
13
+ theme?: W3ThemeInput;
14
+ /** Child components that will have access to payment context */
15
+ children: ReactNode;
16
+ /** Optional callback for payment events */
17
+ onPaymentEvent?: (event: PaymentEvent) => void;
18
+ }
19
+ /**
20
+ * W3PaymentsProvider component - HTTP client wrapper
21
+ */
22
+ export declare const W3PaymentsProvider: React.FC<W3PaymentsProviderProps>;
23
+ export default W3PaymentsProvider;
24
+ //# sourceMappingURL=W3PaymentsProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"W3PaymentsProvider.d.ts","sourceRoot":"","sources":["../../lib/components/W3PaymentsProvider.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAA6B,MAAM,OAAO,CAAC;AAClD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAQ5C;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,yCAAyC;IACzC,QAAQ,EAAE,MAAM,CAAC;IACjB,uCAAuC;IACvC,WAAW,CAAC,EAAE,SAAS,GAAG,YAAY,CAAC;IACvC,mCAAmC;IACnC,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,gEAAgE;IAChE,QAAQ,EAAE,SAAS,CAAC;IACpB,2CAA2C;IAC3C,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,CAAC;CAChD;AAED;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAwGhE,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Component Exports
3
+ *
4
+ * Central export point for React components in the W3 Payments React library.
5
+ */
6
+ export { W3PaymentsProvider } from './W3PaymentsProvider';
7
+ export { W3PaymentWidget } from './W3PaymentWidget';
8
+ export { PaymentMethodOption } from './PaymentMethodOption';
9
+ export type { W3PaymentsProviderProps } from './W3PaymentsProvider';
10
+ export type { W3PaymentWidgetProps, PaymentInitiateData, PaymentCompleteData, PaymentErrorData, } from './W3PaymentWidget';
11
+ export type { PaymentMethodOptionProps } from './PaymentMethodOption';
12
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../lib/components/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAG5D,YAAY,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AACpE,YAAY,EACV,oBAAoB,EACpB,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,GACjB,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC"}