@flopay/shared 1.1.4 → 1.1.6
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 +21 -1
- package/dist/index.cjs +558 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +73 -3
- package/dist/index.d.ts +73 -3
- package/dist/index.mjs +544 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -63,7 +63,7 @@ function getFloPayEnvironment() {
|
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
// src/constants.ts
|
|
66
|
-
var SDK_VERSION = "1.1.
|
|
66
|
+
var SDK_VERSION = "1.1.6";
|
|
67
67
|
var BILLING_API_URL_STAGING = "https://api.stage.flopay.com";
|
|
68
68
|
var BILLING_API_URL_PRODUCTION = "https://api.flopay.com";
|
|
69
69
|
var DEFAULT_API_BASE_URL = BILLING_API_URL_STAGING;
|
|
@@ -111,6 +111,249 @@ var NIGHT_APPEARANCE = {
|
|
|
111
111
|
spacingUnit: "4px"
|
|
112
112
|
}
|
|
113
113
|
};
|
|
114
|
+
var MODERN_LIGHT_APPEARANCE = {
|
|
115
|
+
theme: "default",
|
|
116
|
+
variables: {
|
|
117
|
+
colorPrimary: "#1785E0",
|
|
118
|
+
colorBackground: "#FFFFFF",
|
|
119
|
+
colorText: "#0F172A",
|
|
120
|
+
colorDanger: "#EF4444",
|
|
121
|
+
borderRadius: "12px",
|
|
122
|
+
fontFamily: "Inter, system-ui, sans-serif",
|
|
123
|
+
fontSizeBase: "15px",
|
|
124
|
+
spacingUnit: "5px"
|
|
125
|
+
},
|
|
126
|
+
rules: {
|
|
127
|
+
".Input": {
|
|
128
|
+
padding: "14px 16px",
|
|
129
|
+
border: "1.5px solid #E5E7EB",
|
|
130
|
+
boxShadow: "0 1px 2px rgba(15,23,42,0.04)"
|
|
131
|
+
},
|
|
132
|
+
".Input:focus": {
|
|
133
|
+
borderColor: "#1785E0",
|
|
134
|
+
boxShadow: "0 0 0 4px rgba(23,133,224,0.12)"
|
|
135
|
+
},
|
|
136
|
+
".Label": {
|
|
137
|
+
fontWeight: "500",
|
|
138
|
+
color: "#475569",
|
|
139
|
+
marginBottom: "6px"
|
|
140
|
+
},
|
|
141
|
+
".Tab": {
|
|
142
|
+
padding: "12px 16px",
|
|
143
|
+
borderRadius: "12px",
|
|
144
|
+
border: "1.5px solid #E5E7EB"
|
|
145
|
+
},
|
|
146
|
+
".Tab:hover": {
|
|
147
|
+
borderColor: "#CBD5E1"
|
|
148
|
+
},
|
|
149
|
+
".Tab--selected": {
|
|
150
|
+
borderColor: "#1785E0",
|
|
151
|
+
boxShadow: "0 0 0 1px #1785E0"
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
};
|
|
155
|
+
var MODERN_DARK_APPEARANCE = {
|
|
156
|
+
theme: "night",
|
|
157
|
+
variables: {
|
|
158
|
+
colorPrimary: "#60A5FA",
|
|
159
|
+
colorBackground: "#0B1220",
|
|
160
|
+
colorText: "#F1F5F9",
|
|
161
|
+
colorDanger: "#F87171",
|
|
162
|
+
borderRadius: "12px",
|
|
163
|
+
fontFamily: "Inter, system-ui, sans-serif",
|
|
164
|
+
fontSizeBase: "15px",
|
|
165
|
+
spacingUnit: "5px"
|
|
166
|
+
},
|
|
167
|
+
rules: {
|
|
168
|
+
".Input": {
|
|
169
|
+
backgroundColor: "#111827",
|
|
170
|
+
padding: "14px 16px",
|
|
171
|
+
border: "1.5px solid #1F2937",
|
|
172
|
+
color: "#F1F5F9",
|
|
173
|
+
boxShadow: "none"
|
|
174
|
+
},
|
|
175
|
+
".Input:focus": {
|
|
176
|
+
borderColor: "#60A5FA",
|
|
177
|
+
boxShadow: "0 0 0 4px rgba(96,165,250,0.18)"
|
|
178
|
+
},
|
|
179
|
+
".Label": {
|
|
180
|
+
fontWeight: "500",
|
|
181
|
+
color: "#94A3B8",
|
|
182
|
+
marginBottom: "6px"
|
|
183
|
+
},
|
|
184
|
+
".Tab": {
|
|
185
|
+
padding: "12px 16px",
|
|
186
|
+
borderRadius: "12px",
|
|
187
|
+
border: "1.5px solid #1F2937",
|
|
188
|
+
backgroundColor: "#111827",
|
|
189
|
+
color: "#F1F5F9"
|
|
190
|
+
},
|
|
191
|
+
".Tab:hover": {
|
|
192
|
+
borderColor: "#374151"
|
|
193
|
+
},
|
|
194
|
+
".Tab--selected": {
|
|
195
|
+
borderColor: "#60A5FA",
|
|
196
|
+
boxShadow: "0 0 0 1px #60A5FA"
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
};
|
|
200
|
+
var BOLD_LIGHT_APPEARANCE = {
|
|
201
|
+
theme: "default",
|
|
202
|
+
variables: {
|
|
203
|
+
colorPrimary: "#1785E0",
|
|
204
|
+
colorBackground: "#FFFFFF",
|
|
205
|
+
colorText: "#0C2B4D",
|
|
206
|
+
colorDanger: "#DC2626",
|
|
207
|
+
borderRadius: "12px",
|
|
208
|
+
fontFamily: "Inter, system-ui, sans-serif",
|
|
209
|
+
fontSizeBase: "16px",
|
|
210
|
+
spacingUnit: "5px"
|
|
211
|
+
},
|
|
212
|
+
rules: {
|
|
213
|
+
".Input": {
|
|
214
|
+
padding: "14px 16px",
|
|
215
|
+
border: "2px solid #E5E7EB"
|
|
216
|
+
},
|
|
217
|
+
".Input:focus": {
|
|
218
|
+
borderColor: "#1785E0",
|
|
219
|
+
boxShadow: "0 0 0 3px rgba(23,133,224,0.2)"
|
|
220
|
+
},
|
|
221
|
+
".Label": {
|
|
222
|
+
fontWeight: "600",
|
|
223
|
+
color: "#0C2B4D"
|
|
224
|
+
},
|
|
225
|
+
".Tab": {
|
|
226
|
+
padding: "14px 18px",
|
|
227
|
+
border: "2px solid #E5E7EB",
|
|
228
|
+
fontWeight: "600"
|
|
229
|
+
},
|
|
230
|
+
".Tab--selected": {
|
|
231
|
+
borderColor: "#1785E0",
|
|
232
|
+
boxShadow: "0 0 0 1px #1785E0"
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
};
|
|
236
|
+
var BOLD_DARK_APPEARANCE = {
|
|
237
|
+
theme: "night",
|
|
238
|
+
variables: {
|
|
239
|
+
colorPrimary: "#60A5FA",
|
|
240
|
+
colorBackground: "#0C2B4D",
|
|
241
|
+
colorText: "#FFFFFF",
|
|
242
|
+
colorDanger: "#F87171",
|
|
243
|
+
borderRadius: "12px",
|
|
244
|
+
fontFamily: "Inter, system-ui, sans-serif",
|
|
245
|
+
fontSizeBase: "16px",
|
|
246
|
+
spacingUnit: "5px"
|
|
247
|
+
},
|
|
248
|
+
rules: {
|
|
249
|
+
".Input": {
|
|
250
|
+
backgroundColor: "#1E3A8A",
|
|
251
|
+
padding: "14px 16px",
|
|
252
|
+
border: "2px solid #1E40AF",
|
|
253
|
+
color: "#FFFFFF"
|
|
254
|
+
},
|
|
255
|
+
".Input:focus": {
|
|
256
|
+
borderColor: "#60A5FA",
|
|
257
|
+
boxShadow: "0 0 0 3px rgba(96,165,250,0.25)"
|
|
258
|
+
},
|
|
259
|
+
".Label": {
|
|
260
|
+
fontWeight: "600",
|
|
261
|
+
color: "#DBEAFE"
|
|
262
|
+
},
|
|
263
|
+
".Tab": {
|
|
264
|
+
padding: "14px 18px",
|
|
265
|
+
border: "2px solid #1E40AF",
|
|
266
|
+
backgroundColor: "#1E3A8A",
|
|
267
|
+
color: "#FFFFFF",
|
|
268
|
+
fontWeight: "600"
|
|
269
|
+
},
|
|
270
|
+
".Tab--selected": {
|
|
271
|
+
borderColor: "#60A5FA",
|
|
272
|
+
boxShadow: "0 0 0 1px #60A5FA"
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
};
|
|
276
|
+
var GLASS_LIGHT_APPEARANCE = {
|
|
277
|
+
theme: "default",
|
|
278
|
+
variables: {
|
|
279
|
+
colorPrimary: "#1785E0",
|
|
280
|
+
colorBackground: "#FFFFFF",
|
|
281
|
+
colorText: "#1E293B",
|
|
282
|
+
colorDanger: "#EF4444",
|
|
283
|
+
borderRadius: "16px",
|
|
284
|
+
fontFamily: "Inter, system-ui, sans-serif",
|
|
285
|
+
fontSizeBase: "15px",
|
|
286
|
+
spacingUnit: "5px"
|
|
287
|
+
},
|
|
288
|
+
rules: {
|
|
289
|
+
".Input": {
|
|
290
|
+
backgroundColor: "rgba(255,255,255,0.6)",
|
|
291
|
+
backdropFilter: "blur(10px)",
|
|
292
|
+
padding: "14px 16px",
|
|
293
|
+
border: "1px solid rgba(255,255,255,0.6)",
|
|
294
|
+
boxShadow: "inset 0 1px 0 rgba(255,255,255,0.5), 0 1px 3px rgba(23,133,224,0.08)"
|
|
295
|
+
},
|
|
296
|
+
".Input:focus": {
|
|
297
|
+
borderColor: "rgba(23,133,224,0.5)",
|
|
298
|
+
boxShadow: "0 0 0 3px rgba(23,133,224,0.15)"
|
|
299
|
+
},
|
|
300
|
+
".Label": {
|
|
301
|
+
fontWeight: "500",
|
|
302
|
+
color: "#475569"
|
|
303
|
+
},
|
|
304
|
+
".Tab": {
|
|
305
|
+
padding: "12px 16px",
|
|
306
|
+
backgroundColor: "rgba(255,255,255,0.5)",
|
|
307
|
+
border: "1px solid rgba(255,255,255,0.6)",
|
|
308
|
+
borderRadius: "14px"
|
|
309
|
+
},
|
|
310
|
+
".Tab--selected": {
|
|
311
|
+
borderColor: "rgba(23,133,224,0.6)",
|
|
312
|
+
boxShadow: "0 0 0 1px rgba(23,133,224,0.6)"
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
};
|
|
316
|
+
var GLASS_DARK_APPEARANCE = {
|
|
317
|
+
theme: "night",
|
|
318
|
+
variables: {
|
|
319
|
+
colorPrimary: "#60A5FA",
|
|
320
|
+
colorBackground: "#0F172A",
|
|
321
|
+
colorText: "#F1F5F9",
|
|
322
|
+
colorDanger: "#F87171",
|
|
323
|
+
borderRadius: "16px",
|
|
324
|
+
fontFamily: "Inter, system-ui, sans-serif",
|
|
325
|
+
fontSizeBase: "15px",
|
|
326
|
+
spacingUnit: "5px"
|
|
327
|
+
},
|
|
328
|
+
rules: {
|
|
329
|
+
".Input": {
|
|
330
|
+
backgroundColor: "rgba(15,23,42,0.6)",
|
|
331
|
+
backdropFilter: "blur(10px)",
|
|
332
|
+
padding: "14px 16px",
|
|
333
|
+
border: "1px solid rgba(255,255,255,0.08)",
|
|
334
|
+
color: "#F1F5F9"
|
|
335
|
+
},
|
|
336
|
+
".Input:focus": {
|
|
337
|
+
borderColor: "rgba(96,165,250,0.5)",
|
|
338
|
+
boxShadow: "0 0 0 3px rgba(96,165,250,0.2)"
|
|
339
|
+
},
|
|
340
|
+
".Label": {
|
|
341
|
+
fontWeight: "500",
|
|
342
|
+
color: "#94A3B8"
|
|
343
|
+
},
|
|
344
|
+
".Tab": {
|
|
345
|
+
padding: "12px 16px",
|
|
346
|
+
backgroundColor: "rgba(15,23,42,0.6)",
|
|
347
|
+
border: "1px solid rgba(255,255,255,0.08)",
|
|
348
|
+
borderRadius: "14px",
|
|
349
|
+
color: "#F1F5F9"
|
|
350
|
+
},
|
|
351
|
+
".Tab--selected": {
|
|
352
|
+
borderColor: "rgba(96,165,250,0.6)",
|
|
353
|
+
boxShadow: "0 0 0 1px rgba(96,165,250,0.6)"
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
};
|
|
114
357
|
var BUTTONS_LAYOUT_DEFAULT = {};
|
|
115
358
|
var BUTTONS_LAYOUT_MINIMAL = {
|
|
116
359
|
cardButton: {
|
|
@@ -189,6 +432,268 @@ var BUTTONS_LAYOUT_DARK = {
|
|
|
189
432
|
color: "#f9fafb"
|
|
190
433
|
}
|
|
191
434
|
};
|
|
435
|
+
var BUTTONS_LAYOUT_MODERN_LIGHT = {
|
|
436
|
+
cardFormContainer: {
|
|
437
|
+
backgroundColor: "#FAFAFA",
|
|
438
|
+
borderRadius: "20px",
|
|
439
|
+
border: "1px solid #E5E7EB",
|
|
440
|
+
boxShadow: "0 8px 24px rgba(15,23,42,0.04)",
|
|
441
|
+
padding: "24px"
|
|
442
|
+
},
|
|
443
|
+
cardButton: {
|
|
444
|
+
backgroundColor: "#FFFFFF",
|
|
445
|
+
borderRadius: "14px",
|
|
446
|
+
border: "1.5px solid #E5E7EB",
|
|
447
|
+
boxShadow: "0 1px 2px rgba(15,23,42,0.04)",
|
|
448
|
+
padding: "14px 18px"
|
|
449
|
+
},
|
|
450
|
+
cardInputBorder: "#E5E7EB",
|
|
451
|
+
nameInput: {
|
|
452
|
+
backgroundColor: "#FFFFFF",
|
|
453
|
+
border: "1.5px solid #E5E7EB",
|
|
454
|
+
borderRadius: "14px",
|
|
455
|
+
padding: "14px 16px"
|
|
456
|
+
},
|
|
457
|
+
submitButton: {
|
|
458
|
+
backgroundColor: "#1785E0",
|
|
459
|
+
borderRadius: "14px",
|
|
460
|
+
padding: "16px 24px",
|
|
461
|
+
boxShadow: "0 4px 14px rgba(23,133,224,0.25)",
|
|
462
|
+
fontWeight: "600"
|
|
463
|
+
},
|
|
464
|
+
title: {
|
|
465
|
+
color: "#0F172A",
|
|
466
|
+
fontWeight: "600"
|
|
467
|
+
},
|
|
468
|
+
titleFontSize: "20px",
|
|
469
|
+
backButton: { color: "#64748B" },
|
|
470
|
+
backButtonIcon: { backgroundColor: "#F1F5F9" }
|
|
471
|
+
};
|
|
472
|
+
var BUTTONS_LAYOUT_MODERN_DARK = {
|
|
473
|
+
cardFormContainer: {
|
|
474
|
+
backgroundColor: "#111827",
|
|
475
|
+
borderRadius: "20px",
|
|
476
|
+
border: "1px solid #1F2937",
|
|
477
|
+
boxShadow: "0 8px 24px rgba(0,0,0,0.2)",
|
|
478
|
+
padding: "24px"
|
|
479
|
+
},
|
|
480
|
+
cardButton: {
|
|
481
|
+
backgroundColor: "#0B1220",
|
|
482
|
+
borderRadius: "14px",
|
|
483
|
+
border: "1.5px solid #1F2937",
|
|
484
|
+
color: "#F1F5F9",
|
|
485
|
+
padding: "14px 18px"
|
|
486
|
+
},
|
|
487
|
+
cardInputBorder: "#1F2937",
|
|
488
|
+
cardInputBackground: "#111827",
|
|
489
|
+
cardInputColor: "#F1F5F9",
|
|
490
|
+
cardInputPlaceholderColor: "#64748B",
|
|
491
|
+
nameInput: {
|
|
492
|
+
backgroundColor: "#111827",
|
|
493
|
+
border: "1.5px solid #1F2937",
|
|
494
|
+
borderRadius: "14px",
|
|
495
|
+
padding: "14px 16px",
|
|
496
|
+
color: "#F1F5F9"
|
|
497
|
+
},
|
|
498
|
+
submitButton: {
|
|
499
|
+
backgroundColor: "#60A5FA",
|
|
500
|
+
borderRadius: "14px",
|
|
501
|
+
padding: "16px 24px",
|
|
502
|
+
boxShadow: "0 4px 14px rgba(96,165,250,0.3)",
|
|
503
|
+
fontWeight: "600",
|
|
504
|
+
color: "#0B1220"
|
|
505
|
+
},
|
|
506
|
+
title: {
|
|
507
|
+
color: "#F1F5F9",
|
|
508
|
+
fontWeight: "600"
|
|
509
|
+
},
|
|
510
|
+
titleFontSize: "20px",
|
|
511
|
+
backButton: { color: "#94A3B8" },
|
|
512
|
+
backButtonIcon: { backgroundColor: "#1F2937" },
|
|
513
|
+
countrySelect: { backgroundColor: "#111827", color: "#F1F5F9" },
|
|
514
|
+
zipInput: { backgroundColor: "#111827", color: "#F1F5F9" }
|
|
515
|
+
};
|
|
516
|
+
var BUTTONS_LAYOUT_BOLD_LIGHT = {
|
|
517
|
+
cardFormContainer: {
|
|
518
|
+
backgroundColor: "#EFF6FF",
|
|
519
|
+
borderRadius: "20px",
|
|
520
|
+
border: "2px solid #1785E0",
|
|
521
|
+
padding: "24px"
|
|
522
|
+
},
|
|
523
|
+
cardButton: {
|
|
524
|
+
backgroundColor: "#FFFFFF",
|
|
525
|
+
borderRadius: "12px",
|
|
526
|
+
border: "2px solid #1785E0",
|
|
527
|
+
color: "#1785E0",
|
|
528
|
+
fontWeight: "700",
|
|
529
|
+
padding: "14px 18px"
|
|
530
|
+
},
|
|
531
|
+
cardInputBorder: "#E5E7EB",
|
|
532
|
+
nameInput: {
|
|
533
|
+
backgroundColor: "#FFFFFF",
|
|
534
|
+
border: "2px solid #E5E7EB",
|
|
535
|
+
borderRadius: "12px",
|
|
536
|
+
padding: "14px 16px",
|
|
537
|
+
fontWeight: "500"
|
|
538
|
+
},
|
|
539
|
+
submitButton: {
|
|
540
|
+
background: "linear-gradient(135deg, #1785E0 0%, #0EA5E9 100%)",
|
|
541
|
+
borderRadius: "9999px",
|
|
542
|
+
padding: "16px 24px",
|
|
543
|
+
boxShadow: "0 10px 25px rgba(23,133,224,0.35)",
|
|
544
|
+
fontWeight: "700",
|
|
545
|
+
color: "#FFFFFF",
|
|
546
|
+
border: "none"
|
|
547
|
+
},
|
|
548
|
+
submitButtonFontSize: "17px",
|
|
549
|
+
title: {
|
|
550
|
+
color: "#0C2B4D",
|
|
551
|
+
fontWeight: "800",
|
|
552
|
+
letterSpacing: "-0.02em"
|
|
553
|
+
},
|
|
554
|
+
titleFontSize: "22px",
|
|
555
|
+
backButton: { color: "#1785E0", fontWeight: "600" },
|
|
556
|
+
backButtonIcon: { backgroundColor: "#DBEAFE" }
|
|
557
|
+
};
|
|
558
|
+
var BUTTONS_LAYOUT_BOLD_DARK = {
|
|
559
|
+
cardFormContainer: {
|
|
560
|
+
backgroundColor: "#1E3A8A",
|
|
561
|
+
borderRadius: "20px",
|
|
562
|
+
border: "2px solid #60A5FA",
|
|
563
|
+
padding: "24px"
|
|
564
|
+
},
|
|
565
|
+
cardButton: {
|
|
566
|
+
backgroundColor: "#0C2B4D",
|
|
567
|
+
borderRadius: "12px",
|
|
568
|
+
border: "2px solid #60A5FA",
|
|
569
|
+
color: "#60A5FA",
|
|
570
|
+
fontWeight: "700",
|
|
571
|
+
padding: "14px 18px"
|
|
572
|
+
},
|
|
573
|
+
cardInputBorder: "#1E40AF",
|
|
574
|
+
cardInputBackground: "#1E3A8A",
|
|
575
|
+
cardInputColor: "#FFFFFF",
|
|
576
|
+
cardInputPlaceholderColor: "#60A5FA",
|
|
577
|
+
nameInput: {
|
|
578
|
+
backgroundColor: "#1E3A8A",
|
|
579
|
+
border: "2px solid #1E40AF",
|
|
580
|
+
borderRadius: "12px",
|
|
581
|
+
padding: "14px 16px",
|
|
582
|
+
fontWeight: "500",
|
|
583
|
+
color: "#FFFFFF"
|
|
584
|
+
},
|
|
585
|
+
submitButton: {
|
|
586
|
+
background: "linear-gradient(135deg, #60A5FA 0%, #38BDF8 100%)",
|
|
587
|
+
borderRadius: "9999px",
|
|
588
|
+
padding: "16px 24px",
|
|
589
|
+
boxShadow: "0 10px 25px rgba(96,165,250,0.35)",
|
|
590
|
+
fontWeight: "700",
|
|
591
|
+
color: "#FFFFFF",
|
|
592
|
+
border: "none"
|
|
593
|
+
},
|
|
594
|
+
submitButtonFontSize: "17px",
|
|
595
|
+
title: {
|
|
596
|
+
color: "#FFFFFF",
|
|
597
|
+
fontWeight: "800",
|
|
598
|
+
letterSpacing: "-0.02em"
|
|
599
|
+
},
|
|
600
|
+
titleFontSize: "22px",
|
|
601
|
+
backButton: { color: "#DBEAFE", fontWeight: "600" },
|
|
602
|
+
backButtonIcon: { backgroundColor: "#1E40AF" },
|
|
603
|
+
countrySelect: { backgroundColor: "#1E3A8A", color: "#FFFFFF" },
|
|
604
|
+
zipInput: { backgroundColor: "#1E3A8A", color: "#FFFFFF" }
|
|
605
|
+
};
|
|
606
|
+
var BUTTONS_LAYOUT_GLASS_LIGHT = {
|
|
607
|
+
cardFormContainer: {
|
|
608
|
+
background: "linear-gradient(135deg, #DBEAFE 0%, #BFDBFE 100%)",
|
|
609
|
+
borderRadius: "24px",
|
|
610
|
+
border: "1px solid rgba(255,255,255,0.6)",
|
|
611
|
+
boxShadow: "inset 0 1px 0 rgba(255,255,255,0.6), 0 12px 40px rgba(23,133,224,0.15)",
|
|
612
|
+
padding: "28px"
|
|
613
|
+
},
|
|
614
|
+
cardButton: {
|
|
615
|
+
backgroundColor: "rgba(255,255,255,0.7)",
|
|
616
|
+
backdropFilter: "blur(20px)",
|
|
617
|
+
borderRadius: "16px",
|
|
618
|
+
border: "1px solid rgba(255,255,255,0.6)",
|
|
619
|
+
boxShadow: "inset 0 1px 0 rgba(255,255,255,0.5), 0 4px 16px rgba(23,133,224,0.1)",
|
|
620
|
+
padding: "14px 18px"
|
|
621
|
+
},
|
|
622
|
+
cardInputBorder: "rgba(255,255,255,0.6)",
|
|
623
|
+
nameInput: {
|
|
624
|
+
backgroundColor: "rgba(255,255,255,0.6)",
|
|
625
|
+
backdropFilter: "blur(10px)",
|
|
626
|
+
border: "1px solid rgba(255,255,255,0.6)",
|
|
627
|
+
borderRadius: "14px",
|
|
628
|
+
padding: "14px 16px"
|
|
629
|
+
},
|
|
630
|
+
submitButton: {
|
|
631
|
+
backgroundColor: "rgba(23,133,224,0.95)",
|
|
632
|
+
backdropFilter: "blur(10px)",
|
|
633
|
+
borderRadius: "16px",
|
|
634
|
+
padding: "16px 24px",
|
|
635
|
+
boxShadow: "0 10px 30px rgba(23,133,224,0.3), inset 0 1px 0 rgba(255,255,255,0.2)",
|
|
636
|
+
fontWeight: "600",
|
|
637
|
+
color: "#FFFFFF"
|
|
638
|
+
},
|
|
639
|
+
title: {
|
|
640
|
+
color: "#1E293B",
|
|
641
|
+
fontWeight: "600",
|
|
642
|
+
letterSpacing: "-0.01em"
|
|
643
|
+
},
|
|
644
|
+
titleFontSize: "20px",
|
|
645
|
+
backButton: { color: "#1785E0", fontWeight: "500" },
|
|
646
|
+
backButtonIcon: { backgroundColor: "rgba(255,255,255,0.7)" }
|
|
647
|
+
};
|
|
648
|
+
var BUTTONS_LAYOUT_GLASS_DARK = {
|
|
649
|
+
cardFormContainer: {
|
|
650
|
+
background: "linear-gradient(135deg, #0C2B4D 0%, #0F172A 100%)",
|
|
651
|
+
borderRadius: "24px",
|
|
652
|
+
border: "1px solid rgba(255,255,255,0.08)",
|
|
653
|
+
boxShadow: "inset 0 1px 0 rgba(255,255,255,0.06), 0 20px 50px rgba(0,0,0,0.4)",
|
|
654
|
+
padding: "28px"
|
|
655
|
+
},
|
|
656
|
+
cardButton: {
|
|
657
|
+
backgroundColor: "rgba(15,23,42,0.6)",
|
|
658
|
+
backdropFilter: "blur(20px)",
|
|
659
|
+
borderRadius: "16px",
|
|
660
|
+
border: "1px solid rgba(255,255,255,0.08)",
|
|
661
|
+
boxShadow: "inset 0 1px 0 rgba(255,255,255,0.05), 0 4px 16px rgba(0,0,0,0.3)",
|
|
662
|
+
padding: "14px 18px",
|
|
663
|
+
color: "#F1F5F9"
|
|
664
|
+
},
|
|
665
|
+
cardInputBorder: "rgba(255,255,255,0.08)",
|
|
666
|
+
cardInputBackground: "rgba(15,23,42,0.6)",
|
|
667
|
+
cardInputColor: "#F1F5F9",
|
|
668
|
+
cardInputPlaceholderColor: "#64748B",
|
|
669
|
+
nameInput: {
|
|
670
|
+
backgroundColor: "rgba(15,23,42,0.6)",
|
|
671
|
+
backdropFilter: "blur(10px)",
|
|
672
|
+
border: "1px solid rgba(255,255,255,0.08)",
|
|
673
|
+
borderRadius: "14px",
|
|
674
|
+
padding: "14px 16px",
|
|
675
|
+
color: "#F1F5F9"
|
|
676
|
+
},
|
|
677
|
+
submitButton: {
|
|
678
|
+
backgroundColor: "rgba(96,165,250,0.9)",
|
|
679
|
+
backdropFilter: "blur(10px)",
|
|
680
|
+
borderRadius: "16px",
|
|
681
|
+
padding: "16px 24px",
|
|
682
|
+
boxShadow: "0 10px 30px rgba(96,165,250,0.35), inset 0 1px 0 rgba(255,255,255,0.15)",
|
|
683
|
+
fontWeight: "600",
|
|
684
|
+
color: "#0F172A"
|
|
685
|
+
},
|
|
686
|
+
title: {
|
|
687
|
+
color: "#F1F5F9",
|
|
688
|
+
fontWeight: "600",
|
|
689
|
+
letterSpacing: "-0.01em"
|
|
690
|
+
},
|
|
691
|
+
titleFontSize: "20px",
|
|
692
|
+
backButton: { color: "#60A5FA", fontWeight: "500" },
|
|
693
|
+
backButtonIcon: { backgroundColor: "rgba(255,255,255,0.08)" },
|
|
694
|
+
countrySelect: { backgroundColor: "rgba(15,23,42,0.6)", color: "#F1F5F9" },
|
|
695
|
+
zipInput: { backgroundColor: "rgba(15,23,42,0.6)", color: "#F1F5F9" }
|
|
696
|
+
};
|
|
192
697
|
function resolveButtonsLayoutTheme(theme) {
|
|
193
698
|
switch (theme) {
|
|
194
699
|
case "minimal":
|
|
@@ -197,10 +702,34 @@ function resolveButtonsLayoutTheme(theme) {
|
|
|
197
702
|
return BUTTONS_LAYOUT_ROUNDED;
|
|
198
703
|
case "dark":
|
|
199
704
|
return BUTTONS_LAYOUT_DARK;
|
|
705
|
+
case "modern-light":
|
|
706
|
+
return BUTTONS_LAYOUT_MODERN_LIGHT;
|
|
707
|
+
case "modern-dark":
|
|
708
|
+
return BUTTONS_LAYOUT_MODERN_DARK;
|
|
709
|
+
case "bold-light":
|
|
710
|
+
return BUTTONS_LAYOUT_BOLD_LIGHT;
|
|
711
|
+
case "bold-dark":
|
|
712
|
+
return BUTTONS_LAYOUT_BOLD_DARK;
|
|
713
|
+
case "glass-light":
|
|
714
|
+
return BUTTONS_LAYOUT_GLASS_LIGHT;
|
|
715
|
+
case "glass-dark":
|
|
716
|
+
return BUTTONS_LAYOUT_GLASS_DARK;
|
|
200
717
|
default:
|
|
201
718
|
return BUTTONS_LAYOUT_DEFAULT;
|
|
202
719
|
}
|
|
203
720
|
}
|
|
721
|
+
var THEMES = {
|
|
722
|
+
"modern-light": { appearance: MODERN_LIGHT_APPEARANCE, buttonsLayout: BUTTONS_LAYOUT_MODERN_LIGHT },
|
|
723
|
+
"modern-dark": { appearance: MODERN_DARK_APPEARANCE, buttonsLayout: BUTTONS_LAYOUT_MODERN_DARK },
|
|
724
|
+
"bold-light": { appearance: BOLD_LIGHT_APPEARANCE, buttonsLayout: BUTTONS_LAYOUT_BOLD_LIGHT },
|
|
725
|
+
"bold-dark": { appearance: BOLD_DARK_APPEARANCE, buttonsLayout: BUTTONS_LAYOUT_BOLD_DARK },
|
|
726
|
+
"glass-light": { appearance: GLASS_LIGHT_APPEARANCE, buttonsLayout: BUTTONS_LAYOUT_GLASS_LIGHT },
|
|
727
|
+
"glass-dark": { appearance: GLASS_DARK_APPEARANCE, buttonsLayout: BUTTONS_LAYOUT_GLASS_DARK }
|
|
728
|
+
};
|
|
729
|
+
function resolveTheme(id) {
|
|
730
|
+
if (!id || id === "classic") return void 0;
|
|
731
|
+
return THEMES[id];
|
|
732
|
+
}
|
|
204
733
|
var ELEMENT_TYPES = [
|
|
205
734
|
"payment",
|
|
206
735
|
"card",
|
|
@@ -917,9 +1446,17 @@ export {
|
|
|
917
1446
|
BILLING_API_URL,
|
|
918
1447
|
BILLING_API_URL_PRODUCTION,
|
|
919
1448
|
BILLING_API_URL_STAGING,
|
|
1449
|
+
BOLD_DARK_APPEARANCE,
|
|
1450
|
+
BOLD_LIGHT_APPEARANCE,
|
|
1451
|
+
BUTTONS_LAYOUT_BOLD_DARK,
|
|
1452
|
+
BUTTONS_LAYOUT_BOLD_LIGHT,
|
|
920
1453
|
BUTTONS_LAYOUT_DARK,
|
|
921
1454
|
BUTTONS_LAYOUT_DEFAULT,
|
|
1455
|
+
BUTTONS_LAYOUT_GLASS_DARK,
|
|
1456
|
+
BUTTONS_LAYOUT_GLASS_LIGHT,
|
|
922
1457
|
BUTTONS_LAYOUT_MINIMAL,
|
|
1458
|
+
BUTTONS_LAYOUT_MODERN_DARK,
|
|
1459
|
+
BUTTONS_LAYOUT_MODERN_LIGHT,
|
|
923
1460
|
BUTTONS_LAYOUT_ROUNDED,
|
|
924
1461
|
CA_PROVINCES,
|
|
925
1462
|
COUNTRY_OPTIONS,
|
|
@@ -931,9 +1468,14 @@ export {
|
|
|
931
1468
|
ELEMENT_TYPES,
|
|
932
1469
|
FLAT_APPEARANCE,
|
|
933
1470
|
FloPayError,
|
|
1471
|
+
GLASS_DARK_APPEARANCE,
|
|
1472
|
+
GLASS_LIGHT_APPEARANCE,
|
|
1473
|
+
MODERN_DARK_APPEARANCE,
|
|
1474
|
+
MODERN_LIGHT_APPEARANCE,
|
|
934
1475
|
NIGHT_APPEARANCE,
|
|
935
1476
|
SDK_VERSION,
|
|
936
1477
|
SUPPORTED_CARD_BRANDS,
|
|
1478
|
+
THEMES,
|
|
937
1479
|
US_STATES,
|
|
938
1480
|
apiError,
|
|
939
1481
|
authenticationError,
|
|
@@ -962,6 +1504,7 @@ export {
|
|
|
962
1504
|
resolveBillingApiUrl,
|
|
963
1505
|
resolveButtonsLayoutTheme,
|
|
964
1506
|
resolveSessionCurrency,
|
|
1507
|
+
resolveTheme,
|
|
965
1508
|
validationError
|
|
966
1509
|
};
|
|
967
1510
|
//# sourceMappingURL=index.mjs.map
|