@flopay/shared 1.1.3 → 1.1.5

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 CHANGED
@@ -41,11 +41,15 @@ import {
41
41
  SDK_VERSION,
42
42
  DEFAULT_APPEARANCE,
43
43
  NIGHT_APPEARANCE,
44
+ THEMES,
44
45
  CURRENCY_MAP,
45
46
  getCurrencyByCountry,
46
47
  isValidPublishableKey,
47
48
  } from '@flopay/shared';
48
49
 
50
+ // Pick a coherent theme bundle and pass both halves to your checkout
51
+ const { appearance, buttonsLayout } = THEMES['glass-dark'];
52
+
49
53
  import type {
50
54
  FloPayConfig,
51
55
  FloPayEnvironment,
@@ -77,7 +81,10 @@ throw validationError('Email is required', 'email');
77
81
  | `FloPayAppearance` | Theme config: `theme` (`'default'`/`'flat'`/`'night'`/`'none'`), `variables?`, `rules?` |
78
82
  | `FloPayThemeVariables` | CSS custom property overrides: `colorPrimary`, `colorBackground`, `colorText`, `colorDanger`, `borderRadius`, `fontFamily`, `fontSizeBase`, `spacingUnit` |
79
83
  | `ButtonsLayoutStyles` | Style overrides for the `buttons` layout: `cardButton`, `cardButtonFontSize`, `cardFormContainer`, `cardInputBorder`, `cardInputColor`, `cardInputPlaceholderColor`, `cardInputFontSize`, `cardInputBackground`, `nameInput`, `backButton`, `backButtonFontSize`, `backButtonIcon`, `submitButton`, `submitButtonFontSize`, `title`, `titleFontSize`, `errorBanner` |
80
- | `ButtonsLayoutTheme` | Theme preset name: `'default'` / `'minimal'` / `'rounded'` / `'dark'` |
84
+ | `ButtonsLayoutTheme` | Theme preset name: `'default'` / `'minimal'` / `'rounded'` / `'dark'` / `'modern-light'` / `'modern-dark'` / `'bold-light'` / `'bold-dark'` / `'glass-light'` / `'glass-dark'` |
85
+ | `ThemeBundle` | A coherent theme bundle: `{ appearance: FloPayAppearance, buttonsLayout: ButtonsLayoutStyles }` |
86
+ | `ThemeBundleId` | Bundle id: `'modern-light'` / `'modern-dark'` / `'bold-light'` / `'bold-dark'` / `'glass-light'` / `'glass-dark'` |
87
+ | `ThemeId` | Accepted by the React components' `theme` prop: `'classic'` ∪ `ThemeBundleId` |
81
88
  | `CheckoutMode` | Checkout mode: `'full'` / `'auto'` / `'confirm'` |
82
89
  | `CheckoutSession` | Session object: `id`, `clientSecret`, `mode`, `status`, `amount`, `currency`, `customer?`, `checkoutMode?`, `products?` (unified `CheckoutSessionProduct[]`), `successUrl?`, `cancelUrl?`, `coupons?`, `subtotalAmount?` / `discountAmount?` / `totalAmount?` (cart-currency major units; populated by billing API ≥ v1.1.2), `gateways?` (map keyed by gateway code — `stripe`, `paypal`, …), `accountData?`, `tagsData?` |
83
90
  | `CheckoutSessionProduct` | Unified product from session response: `uuid`, `checkoutSessionId`, `type` (`'item'`/`'subscription'`), `code?`, `name?`, `description?`, `quantity`, `totalAmount?`, `overrideAmount?`, `currency?`, `metadata?` |
@@ -139,6 +146,19 @@ throw validationError('Email is required', 'email');
139
146
  | `DEFAULT_APPEARANCE` | Default theme (primary `#4A49FF`, white background, Poppins font) |
140
147
  | `FLAT_APPEARANCE` | Flat theme (minimal borders, 4px radius) |
141
148
  | `NIGHT_APPEARANCE` | Dark theme (dark background `#1A1A2E`, light text) |
149
+ | `MODERN_LIGHT_APPEARANCE` | Clean & airy light — Inter, FloPay-blue primary `#1785E0`, slate text, `14px` radius, soft input shadows |
150
+ | `MODERN_DARK_APPEARANCE` | Clean & airy dark — Inter, sky-blue primary `#60A5FA`, deep-blue surface `#0B1220`, `14px` radius |
151
+ | `BOLD_LIGHT_APPEARANCE` | Bold & vibrant light — Inter, saturated FloPay blue `#1785E0`, 2px borders, 600+ font weight, gradient-ready |
152
+ | `BOLD_DARK_APPEARANCE` | Bold & vibrant dark — Inter, sky `#60A5FA` on deep-blue `#0C2B4D`, accented borders |
153
+ | `GLASS_LIGHT_APPEARANCE` | Glass / elevated light — translucent inputs with backdrop blur, FloPay-blue primary `#1785E0`, `16px` radius |
154
+ | `GLASS_DARK_APPEARANCE` | Glass / elevated dark — translucent inputs with backdrop blur, `#60A5FA` on slate `#0F172A` |
155
+ | `BUTTONS_LAYOUT_DEFAULT` / `_MINIMAL` / `_ROUNDED` / `_DARK` | Original buttons-layout style presets (back-compat) |
156
+ | `BUTTONS_LAYOUT_MODERN_LIGHT` / `_MODERN_DARK` | Wrapper styles paired with the modern appearance bundles |
157
+ | `BUTTONS_LAYOUT_BOLD_LIGHT` / `_BOLD_DARK` | Wrapper styles paired with the bold appearance bundles |
158
+ | `BUTTONS_LAYOUT_GLASS_LIGHT` / `_GLASS_DARK` | Wrapper styles paired with the glass appearance bundles |
159
+ | `THEMES` | `Record<ThemeBundleId, ThemeBundle>` — pick `THEMES['glass-dark']` to get `{ appearance, buttonsLayout }` |
160
+ | `resolveTheme(id)` | Resolve a `ThemeId` (`'classic'` ∪ `ThemeBundleId`) to its `ThemeBundle`; `'classic'` and missing ids return `undefined` |
161
+ | `resolveButtonsLayoutTheme(name)` | Map a `ButtonsLayoutTheme` name to its `ButtonsLayoutStyles` preset |
142
162
  | `ELEMENT_TYPES` | `['payment', 'card', 'cardNumber', 'cardExpiry', 'cardCvc', 'address']` |
143
163
  | `SUPPORTED_CARD_BRANDS` | `['visa', 'mastercard', 'mastercard_debit', 'amex', 'discover']` |
144
164
  | `CURRENCY_MAP` | Country code to `CurrencyInfo` mapping (EU, GB, US, CA, NZ, AU) |
package/dist/index.cjs CHANGED
@@ -23,9 +23,17 @@ __export(index_exports, {
23
23
  BILLING_API_URL: () => BILLING_API_URL,
24
24
  BILLING_API_URL_PRODUCTION: () => BILLING_API_URL_PRODUCTION,
25
25
  BILLING_API_URL_STAGING: () => BILLING_API_URL_STAGING,
26
+ BOLD_DARK_APPEARANCE: () => BOLD_DARK_APPEARANCE,
27
+ BOLD_LIGHT_APPEARANCE: () => BOLD_LIGHT_APPEARANCE,
28
+ BUTTONS_LAYOUT_BOLD_DARK: () => BUTTONS_LAYOUT_BOLD_DARK,
29
+ BUTTONS_LAYOUT_BOLD_LIGHT: () => BUTTONS_LAYOUT_BOLD_LIGHT,
26
30
  BUTTONS_LAYOUT_DARK: () => BUTTONS_LAYOUT_DARK,
27
31
  BUTTONS_LAYOUT_DEFAULT: () => BUTTONS_LAYOUT_DEFAULT,
32
+ BUTTONS_LAYOUT_GLASS_DARK: () => BUTTONS_LAYOUT_GLASS_DARK,
33
+ BUTTONS_LAYOUT_GLASS_LIGHT: () => BUTTONS_LAYOUT_GLASS_LIGHT,
28
34
  BUTTONS_LAYOUT_MINIMAL: () => BUTTONS_LAYOUT_MINIMAL,
35
+ BUTTONS_LAYOUT_MODERN_DARK: () => BUTTONS_LAYOUT_MODERN_DARK,
36
+ BUTTONS_LAYOUT_MODERN_LIGHT: () => BUTTONS_LAYOUT_MODERN_LIGHT,
29
37
  BUTTONS_LAYOUT_ROUNDED: () => BUTTONS_LAYOUT_ROUNDED,
30
38
  CA_PROVINCES: () => CA_PROVINCES,
31
39
  COUNTRY_OPTIONS: () => COUNTRY_OPTIONS,
@@ -37,9 +45,14 @@ __export(index_exports, {
37
45
  ELEMENT_TYPES: () => ELEMENT_TYPES,
38
46
  FLAT_APPEARANCE: () => FLAT_APPEARANCE,
39
47
  FloPayError: () => FloPayError,
48
+ GLASS_DARK_APPEARANCE: () => GLASS_DARK_APPEARANCE,
49
+ GLASS_LIGHT_APPEARANCE: () => GLASS_LIGHT_APPEARANCE,
50
+ MODERN_DARK_APPEARANCE: () => MODERN_DARK_APPEARANCE,
51
+ MODERN_LIGHT_APPEARANCE: () => MODERN_LIGHT_APPEARANCE,
40
52
  NIGHT_APPEARANCE: () => NIGHT_APPEARANCE,
41
53
  SDK_VERSION: () => SDK_VERSION,
42
54
  SUPPORTED_CARD_BRANDS: () => SUPPORTED_CARD_BRANDS,
55
+ THEMES: () => THEMES,
43
56
  US_STATES: () => US_STATES,
44
57
  apiError: () => apiError,
45
58
  authenticationError: () => authenticationError,
@@ -68,6 +81,7 @@ __export(index_exports, {
68
81
  resolveBillingApiUrl: () => resolveBillingApiUrl,
69
82
  resolveButtonsLayoutTheme: () => resolveButtonsLayoutTheme,
70
83
  resolveSessionCurrency: () => resolveSessionCurrency,
84
+ resolveTheme: () => resolveTheme,
71
85
  validationError: () => validationError
72
86
  });
73
87
  module.exports = __toCommonJS(index_exports);
@@ -137,7 +151,7 @@ function getFloPayEnvironment() {
137
151
  }
138
152
 
139
153
  // src/constants.ts
140
- var SDK_VERSION = "1.1.3";
154
+ var SDK_VERSION = "1.1.5";
141
155
  var BILLING_API_URL_STAGING = "https://api.stage.flopay.com";
142
156
  var BILLING_API_URL_PRODUCTION = "https://api.flopay.com";
143
157
  var DEFAULT_API_BASE_URL = BILLING_API_URL_STAGING;
@@ -185,6 +199,249 @@ var NIGHT_APPEARANCE = {
185
199
  spacingUnit: "4px"
186
200
  }
187
201
  };
202
+ var MODERN_LIGHT_APPEARANCE = {
203
+ theme: "default",
204
+ variables: {
205
+ colorPrimary: "#1785E0",
206
+ colorBackground: "#FFFFFF",
207
+ colorText: "#0F172A",
208
+ colorDanger: "#EF4444",
209
+ borderRadius: "12px",
210
+ fontFamily: "Inter, system-ui, sans-serif",
211
+ fontSizeBase: "15px",
212
+ spacingUnit: "5px"
213
+ },
214
+ rules: {
215
+ ".Input": {
216
+ padding: "14px 16px",
217
+ border: "1.5px solid #E5E7EB",
218
+ boxShadow: "0 1px 2px rgba(15,23,42,0.04)"
219
+ },
220
+ ".Input:focus": {
221
+ borderColor: "#1785E0",
222
+ boxShadow: "0 0 0 4px rgba(23,133,224,0.12)"
223
+ },
224
+ ".Label": {
225
+ fontWeight: "500",
226
+ color: "#475569",
227
+ marginBottom: "6px"
228
+ },
229
+ ".Tab": {
230
+ padding: "12px 16px",
231
+ borderRadius: "12px",
232
+ border: "1.5px solid #E5E7EB"
233
+ },
234
+ ".Tab:hover": {
235
+ borderColor: "#CBD5E1"
236
+ },
237
+ ".Tab--selected": {
238
+ borderColor: "#1785E0",
239
+ boxShadow: "0 0 0 1px #1785E0"
240
+ }
241
+ }
242
+ };
243
+ var MODERN_DARK_APPEARANCE = {
244
+ theme: "night",
245
+ variables: {
246
+ colorPrimary: "#60A5FA",
247
+ colorBackground: "#0B1220",
248
+ colorText: "#F1F5F9",
249
+ colorDanger: "#F87171",
250
+ borderRadius: "12px",
251
+ fontFamily: "Inter, system-ui, sans-serif",
252
+ fontSizeBase: "15px",
253
+ spacingUnit: "5px"
254
+ },
255
+ rules: {
256
+ ".Input": {
257
+ backgroundColor: "#111827",
258
+ padding: "14px 16px",
259
+ border: "1.5px solid #1F2937",
260
+ color: "#F1F5F9",
261
+ boxShadow: "none"
262
+ },
263
+ ".Input:focus": {
264
+ borderColor: "#60A5FA",
265
+ boxShadow: "0 0 0 4px rgba(96,165,250,0.18)"
266
+ },
267
+ ".Label": {
268
+ fontWeight: "500",
269
+ color: "#94A3B8",
270
+ marginBottom: "6px"
271
+ },
272
+ ".Tab": {
273
+ padding: "12px 16px",
274
+ borderRadius: "12px",
275
+ border: "1.5px solid #1F2937",
276
+ backgroundColor: "#111827",
277
+ color: "#F1F5F9"
278
+ },
279
+ ".Tab:hover": {
280
+ borderColor: "#374151"
281
+ },
282
+ ".Tab--selected": {
283
+ borderColor: "#60A5FA",
284
+ boxShadow: "0 0 0 1px #60A5FA"
285
+ }
286
+ }
287
+ };
288
+ var BOLD_LIGHT_APPEARANCE = {
289
+ theme: "default",
290
+ variables: {
291
+ colorPrimary: "#1785E0",
292
+ colorBackground: "#FFFFFF",
293
+ colorText: "#0C2B4D",
294
+ colorDanger: "#DC2626",
295
+ borderRadius: "12px",
296
+ fontFamily: "Inter, system-ui, sans-serif",
297
+ fontSizeBase: "16px",
298
+ spacingUnit: "5px"
299
+ },
300
+ rules: {
301
+ ".Input": {
302
+ padding: "14px 16px",
303
+ border: "2px solid #E5E7EB"
304
+ },
305
+ ".Input:focus": {
306
+ borderColor: "#1785E0",
307
+ boxShadow: "0 0 0 3px rgba(23,133,224,0.2)"
308
+ },
309
+ ".Label": {
310
+ fontWeight: "600",
311
+ color: "#0C2B4D"
312
+ },
313
+ ".Tab": {
314
+ padding: "14px 18px",
315
+ border: "2px solid #E5E7EB",
316
+ fontWeight: "600"
317
+ },
318
+ ".Tab--selected": {
319
+ borderColor: "#1785E0",
320
+ boxShadow: "0 0 0 1px #1785E0"
321
+ }
322
+ }
323
+ };
324
+ var BOLD_DARK_APPEARANCE = {
325
+ theme: "night",
326
+ variables: {
327
+ colorPrimary: "#60A5FA",
328
+ colorBackground: "#0C2B4D",
329
+ colorText: "#FFFFFF",
330
+ colorDanger: "#F87171",
331
+ borderRadius: "12px",
332
+ fontFamily: "Inter, system-ui, sans-serif",
333
+ fontSizeBase: "16px",
334
+ spacingUnit: "5px"
335
+ },
336
+ rules: {
337
+ ".Input": {
338
+ backgroundColor: "#1E3A8A",
339
+ padding: "14px 16px",
340
+ border: "2px solid #1E40AF",
341
+ color: "#FFFFFF"
342
+ },
343
+ ".Input:focus": {
344
+ borderColor: "#60A5FA",
345
+ boxShadow: "0 0 0 3px rgba(96,165,250,0.25)"
346
+ },
347
+ ".Label": {
348
+ fontWeight: "600",
349
+ color: "#DBEAFE"
350
+ },
351
+ ".Tab": {
352
+ padding: "14px 18px",
353
+ border: "2px solid #1E40AF",
354
+ backgroundColor: "#1E3A8A",
355
+ color: "#FFFFFF",
356
+ fontWeight: "600"
357
+ },
358
+ ".Tab--selected": {
359
+ borderColor: "#60A5FA",
360
+ boxShadow: "0 0 0 1px #60A5FA"
361
+ }
362
+ }
363
+ };
364
+ var GLASS_LIGHT_APPEARANCE = {
365
+ theme: "default",
366
+ variables: {
367
+ colorPrimary: "#1785E0",
368
+ colorBackground: "#FFFFFF",
369
+ colorText: "#1E293B",
370
+ colorDanger: "#EF4444",
371
+ borderRadius: "16px",
372
+ fontFamily: "Inter, system-ui, sans-serif",
373
+ fontSizeBase: "15px",
374
+ spacingUnit: "5px"
375
+ },
376
+ rules: {
377
+ ".Input": {
378
+ backgroundColor: "rgba(255,255,255,0.6)",
379
+ backdropFilter: "blur(10px)",
380
+ padding: "14px 16px",
381
+ border: "1px solid rgba(255,255,255,0.6)",
382
+ boxShadow: "inset 0 1px 0 rgba(255,255,255,0.5), 0 1px 3px rgba(23,133,224,0.08)"
383
+ },
384
+ ".Input:focus": {
385
+ borderColor: "rgba(23,133,224,0.5)",
386
+ boxShadow: "0 0 0 3px rgba(23,133,224,0.15)"
387
+ },
388
+ ".Label": {
389
+ fontWeight: "500",
390
+ color: "#475569"
391
+ },
392
+ ".Tab": {
393
+ padding: "12px 16px",
394
+ backgroundColor: "rgba(255,255,255,0.5)",
395
+ border: "1px solid rgba(255,255,255,0.6)",
396
+ borderRadius: "14px"
397
+ },
398
+ ".Tab--selected": {
399
+ borderColor: "rgba(23,133,224,0.6)",
400
+ boxShadow: "0 0 0 1px rgba(23,133,224,0.6)"
401
+ }
402
+ }
403
+ };
404
+ var GLASS_DARK_APPEARANCE = {
405
+ theme: "night",
406
+ variables: {
407
+ colorPrimary: "#60A5FA",
408
+ colorBackground: "#0F172A",
409
+ colorText: "#F1F5F9",
410
+ colorDanger: "#F87171",
411
+ borderRadius: "16px",
412
+ fontFamily: "Inter, system-ui, sans-serif",
413
+ fontSizeBase: "15px",
414
+ spacingUnit: "5px"
415
+ },
416
+ rules: {
417
+ ".Input": {
418
+ backgroundColor: "rgba(15,23,42,0.6)",
419
+ backdropFilter: "blur(10px)",
420
+ padding: "14px 16px",
421
+ border: "1px solid rgba(255,255,255,0.08)",
422
+ color: "#F1F5F9"
423
+ },
424
+ ".Input:focus": {
425
+ borderColor: "rgba(96,165,250,0.5)",
426
+ boxShadow: "0 0 0 3px rgba(96,165,250,0.2)"
427
+ },
428
+ ".Label": {
429
+ fontWeight: "500",
430
+ color: "#94A3B8"
431
+ },
432
+ ".Tab": {
433
+ padding: "12px 16px",
434
+ backgroundColor: "rgba(15,23,42,0.6)",
435
+ border: "1px solid rgba(255,255,255,0.08)",
436
+ borderRadius: "14px",
437
+ color: "#F1F5F9"
438
+ },
439
+ ".Tab--selected": {
440
+ borderColor: "rgba(96,165,250,0.6)",
441
+ boxShadow: "0 0 0 1px rgba(96,165,250,0.6)"
442
+ }
443
+ }
444
+ };
188
445
  var BUTTONS_LAYOUT_DEFAULT = {};
189
446
  var BUTTONS_LAYOUT_MINIMAL = {
190
447
  cardButton: {
@@ -263,6 +520,268 @@ var BUTTONS_LAYOUT_DARK = {
263
520
  color: "#f9fafb"
264
521
  }
265
522
  };
523
+ var BUTTONS_LAYOUT_MODERN_LIGHT = {
524
+ cardFormContainer: {
525
+ backgroundColor: "#FAFAFA",
526
+ borderRadius: "20px",
527
+ border: "1px solid #E5E7EB",
528
+ boxShadow: "0 8px 24px rgba(15,23,42,0.04)",
529
+ padding: "24px"
530
+ },
531
+ cardButton: {
532
+ backgroundColor: "#FFFFFF",
533
+ borderRadius: "14px",
534
+ border: "1.5px solid #E5E7EB",
535
+ boxShadow: "0 1px 2px rgba(15,23,42,0.04)",
536
+ padding: "14px 18px"
537
+ },
538
+ cardInputBorder: "#E5E7EB",
539
+ nameInput: {
540
+ backgroundColor: "#FFFFFF",
541
+ border: "1.5px solid #E5E7EB",
542
+ borderRadius: "14px",
543
+ padding: "14px 16px"
544
+ },
545
+ submitButton: {
546
+ backgroundColor: "#1785E0",
547
+ borderRadius: "14px",
548
+ padding: "16px 24px",
549
+ boxShadow: "0 4px 14px rgba(23,133,224,0.25)",
550
+ fontWeight: "600"
551
+ },
552
+ title: {
553
+ color: "#0F172A",
554
+ fontWeight: "600"
555
+ },
556
+ titleFontSize: "20px",
557
+ backButton: { color: "#64748B" },
558
+ backButtonIcon: { backgroundColor: "#F1F5F9" }
559
+ };
560
+ var BUTTONS_LAYOUT_MODERN_DARK = {
561
+ cardFormContainer: {
562
+ backgroundColor: "#111827",
563
+ borderRadius: "20px",
564
+ border: "1px solid #1F2937",
565
+ boxShadow: "0 8px 24px rgba(0,0,0,0.2)",
566
+ padding: "24px"
567
+ },
568
+ cardButton: {
569
+ backgroundColor: "#0B1220",
570
+ borderRadius: "14px",
571
+ border: "1.5px solid #1F2937",
572
+ color: "#F1F5F9",
573
+ padding: "14px 18px"
574
+ },
575
+ cardInputBorder: "#1F2937",
576
+ cardInputBackground: "#111827",
577
+ cardInputColor: "#F1F5F9",
578
+ cardInputPlaceholderColor: "#64748B",
579
+ nameInput: {
580
+ backgroundColor: "#111827",
581
+ border: "1.5px solid #1F2937",
582
+ borderRadius: "14px",
583
+ padding: "14px 16px",
584
+ color: "#F1F5F9"
585
+ },
586
+ submitButton: {
587
+ backgroundColor: "#60A5FA",
588
+ borderRadius: "14px",
589
+ padding: "16px 24px",
590
+ boxShadow: "0 4px 14px rgba(96,165,250,0.3)",
591
+ fontWeight: "600",
592
+ color: "#0B1220"
593
+ },
594
+ title: {
595
+ color: "#F1F5F9",
596
+ fontWeight: "600"
597
+ },
598
+ titleFontSize: "20px",
599
+ backButton: { color: "#94A3B8" },
600
+ backButtonIcon: { backgroundColor: "#1F2937" },
601
+ countrySelect: { backgroundColor: "#111827", color: "#F1F5F9" },
602
+ zipInput: { backgroundColor: "#111827", color: "#F1F5F9" }
603
+ };
604
+ var BUTTONS_LAYOUT_BOLD_LIGHT = {
605
+ cardFormContainer: {
606
+ backgroundColor: "#EFF6FF",
607
+ borderRadius: "20px",
608
+ border: "2px solid #1785E0",
609
+ padding: "24px"
610
+ },
611
+ cardButton: {
612
+ backgroundColor: "#FFFFFF",
613
+ borderRadius: "12px",
614
+ border: "2px solid #1785E0",
615
+ color: "#1785E0",
616
+ fontWeight: "700",
617
+ padding: "14px 18px"
618
+ },
619
+ cardInputBorder: "#E5E7EB",
620
+ nameInput: {
621
+ backgroundColor: "#FFFFFF",
622
+ border: "2px solid #E5E7EB",
623
+ borderRadius: "12px",
624
+ padding: "14px 16px",
625
+ fontWeight: "500"
626
+ },
627
+ submitButton: {
628
+ background: "linear-gradient(135deg, #1785E0 0%, #0EA5E9 100%)",
629
+ borderRadius: "9999px",
630
+ padding: "16px 24px",
631
+ boxShadow: "0 10px 25px rgba(23,133,224,0.35)",
632
+ fontWeight: "700",
633
+ color: "#FFFFFF",
634
+ border: "none"
635
+ },
636
+ submitButtonFontSize: "17px",
637
+ title: {
638
+ color: "#0C2B4D",
639
+ fontWeight: "800",
640
+ letterSpacing: "-0.02em"
641
+ },
642
+ titleFontSize: "22px",
643
+ backButton: { color: "#1785E0", fontWeight: "600" },
644
+ backButtonIcon: { backgroundColor: "#DBEAFE" }
645
+ };
646
+ var BUTTONS_LAYOUT_BOLD_DARK = {
647
+ cardFormContainer: {
648
+ backgroundColor: "#1E3A8A",
649
+ borderRadius: "20px",
650
+ border: "2px solid #60A5FA",
651
+ padding: "24px"
652
+ },
653
+ cardButton: {
654
+ backgroundColor: "#0C2B4D",
655
+ borderRadius: "12px",
656
+ border: "2px solid #60A5FA",
657
+ color: "#60A5FA",
658
+ fontWeight: "700",
659
+ padding: "14px 18px"
660
+ },
661
+ cardInputBorder: "#1E40AF",
662
+ cardInputBackground: "#1E3A8A",
663
+ cardInputColor: "#FFFFFF",
664
+ cardInputPlaceholderColor: "#60A5FA",
665
+ nameInput: {
666
+ backgroundColor: "#1E3A8A",
667
+ border: "2px solid #1E40AF",
668
+ borderRadius: "12px",
669
+ padding: "14px 16px",
670
+ fontWeight: "500",
671
+ color: "#FFFFFF"
672
+ },
673
+ submitButton: {
674
+ background: "linear-gradient(135deg, #60A5FA 0%, #38BDF8 100%)",
675
+ borderRadius: "9999px",
676
+ padding: "16px 24px",
677
+ boxShadow: "0 10px 25px rgba(96,165,250,0.35)",
678
+ fontWeight: "700",
679
+ color: "#FFFFFF",
680
+ border: "none"
681
+ },
682
+ submitButtonFontSize: "17px",
683
+ title: {
684
+ color: "#FFFFFF",
685
+ fontWeight: "800",
686
+ letterSpacing: "-0.02em"
687
+ },
688
+ titleFontSize: "22px",
689
+ backButton: { color: "#DBEAFE", fontWeight: "600" },
690
+ backButtonIcon: { backgroundColor: "#1E40AF" },
691
+ countrySelect: { backgroundColor: "#1E3A8A", color: "#FFFFFF" },
692
+ zipInput: { backgroundColor: "#1E3A8A", color: "#FFFFFF" }
693
+ };
694
+ var BUTTONS_LAYOUT_GLASS_LIGHT = {
695
+ cardFormContainer: {
696
+ background: "linear-gradient(135deg, #DBEAFE 0%, #BFDBFE 100%)",
697
+ borderRadius: "24px",
698
+ border: "1px solid rgba(255,255,255,0.6)",
699
+ boxShadow: "inset 0 1px 0 rgba(255,255,255,0.6), 0 12px 40px rgba(23,133,224,0.15)",
700
+ padding: "28px"
701
+ },
702
+ cardButton: {
703
+ backgroundColor: "rgba(255,255,255,0.7)",
704
+ backdropFilter: "blur(20px)",
705
+ borderRadius: "16px",
706
+ border: "1px solid rgba(255,255,255,0.6)",
707
+ boxShadow: "inset 0 1px 0 rgba(255,255,255,0.5), 0 4px 16px rgba(23,133,224,0.1)",
708
+ padding: "14px 18px"
709
+ },
710
+ cardInputBorder: "rgba(255,255,255,0.6)",
711
+ nameInput: {
712
+ backgroundColor: "rgba(255,255,255,0.6)",
713
+ backdropFilter: "blur(10px)",
714
+ border: "1px solid rgba(255,255,255,0.6)",
715
+ borderRadius: "14px",
716
+ padding: "14px 16px"
717
+ },
718
+ submitButton: {
719
+ backgroundColor: "rgba(23,133,224,0.95)",
720
+ backdropFilter: "blur(10px)",
721
+ borderRadius: "16px",
722
+ padding: "16px 24px",
723
+ boxShadow: "0 10px 30px rgba(23,133,224,0.3), inset 0 1px 0 rgba(255,255,255,0.2)",
724
+ fontWeight: "600",
725
+ color: "#FFFFFF"
726
+ },
727
+ title: {
728
+ color: "#1E293B",
729
+ fontWeight: "600",
730
+ letterSpacing: "-0.01em"
731
+ },
732
+ titleFontSize: "20px",
733
+ backButton: { color: "#1785E0", fontWeight: "500" },
734
+ backButtonIcon: { backgroundColor: "rgba(255,255,255,0.7)" }
735
+ };
736
+ var BUTTONS_LAYOUT_GLASS_DARK = {
737
+ cardFormContainer: {
738
+ background: "linear-gradient(135deg, #0C2B4D 0%, #0F172A 100%)",
739
+ borderRadius: "24px",
740
+ border: "1px solid rgba(255,255,255,0.08)",
741
+ boxShadow: "inset 0 1px 0 rgba(255,255,255,0.06), 0 20px 50px rgba(0,0,0,0.4)",
742
+ padding: "28px"
743
+ },
744
+ cardButton: {
745
+ backgroundColor: "rgba(15,23,42,0.6)",
746
+ backdropFilter: "blur(20px)",
747
+ borderRadius: "16px",
748
+ border: "1px solid rgba(255,255,255,0.08)",
749
+ boxShadow: "inset 0 1px 0 rgba(255,255,255,0.05), 0 4px 16px rgba(0,0,0,0.3)",
750
+ padding: "14px 18px",
751
+ color: "#F1F5F9"
752
+ },
753
+ cardInputBorder: "rgba(255,255,255,0.08)",
754
+ cardInputBackground: "rgba(15,23,42,0.6)",
755
+ cardInputColor: "#F1F5F9",
756
+ cardInputPlaceholderColor: "#64748B",
757
+ nameInput: {
758
+ backgroundColor: "rgba(15,23,42,0.6)",
759
+ backdropFilter: "blur(10px)",
760
+ border: "1px solid rgba(255,255,255,0.08)",
761
+ borderRadius: "14px",
762
+ padding: "14px 16px",
763
+ color: "#F1F5F9"
764
+ },
765
+ submitButton: {
766
+ backgroundColor: "rgba(96,165,250,0.9)",
767
+ backdropFilter: "blur(10px)",
768
+ borderRadius: "16px",
769
+ padding: "16px 24px",
770
+ boxShadow: "0 10px 30px rgba(96,165,250,0.35), inset 0 1px 0 rgba(255,255,255,0.15)",
771
+ fontWeight: "600",
772
+ color: "#0F172A"
773
+ },
774
+ title: {
775
+ color: "#F1F5F9",
776
+ fontWeight: "600",
777
+ letterSpacing: "-0.01em"
778
+ },
779
+ titleFontSize: "20px",
780
+ backButton: { color: "#60A5FA", fontWeight: "500" },
781
+ backButtonIcon: { backgroundColor: "rgba(255,255,255,0.08)" },
782
+ countrySelect: { backgroundColor: "rgba(15,23,42,0.6)", color: "#F1F5F9" },
783
+ zipInput: { backgroundColor: "rgba(15,23,42,0.6)", color: "#F1F5F9" }
784
+ };
266
785
  function resolveButtonsLayoutTheme(theme) {
267
786
  switch (theme) {
268
787
  case "minimal":
@@ -271,10 +790,34 @@ function resolveButtonsLayoutTheme(theme) {
271
790
  return BUTTONS_LAYOUT_ROUNDED;
272
791
  case "dark":
273
792
  return BUTTONS_LAYOUT_DARK;
793
+ case "modern-light":
794
+ return BUTTONS_LAYOUT_MODERN_LIGHT;
795
+ case "modern-dark":
796
+ return BUTTONS_LAYOUT_MODERN_DARK;
797
+ case "bold-light":
798
+ return BUTTONS_LAYOUT_BOLD_LIGHT;
799
+ case "bold-dark":
800
+ return BUTTONS_LAYOUT_BOLD_DARK;
801
+ case "glass-light":
802
+ return BUTTONS_LAYOUT_GLASS_LIGHT;
803
+ case "glass-dark":
804
+ return BUTTONS_LAYOUT_GLASS_DARK;
274
805
  default:
275
806
  return BUTTONS_LAYOUT_DEFAULT;
276
807
  }
277
808
  }
809
+ var THEMES = {
810
+ "modern-light": { appearance: MODERN_LIGHT_APPEARANCE, buttonsLayout: BUTTONS_LAYOUT_MODERN_LIGHT },
811
+ "modern-dark": { appearance: MODERN_DARK_APPEARANCE, buttonsLayout: BUTTONS_LAYOUT_MODERN_DARK },
812
+ "bold-light": { appearance: BOLD_LIGHT_APPEARANCE, buttonsLayout: BUTTONS_LAYOUT_BOLD_LIGHT },
813
+ "bold-dark": { appearance: BOLD_DARK_APPEARANCE, buttonsLayout: BUTTONS_LAYOUT_BOLD_DARK },
814
+ "glass-light": { appearance: GLASS_LIGHT_APPEARANCE, buttonsLayout: BUTTONS_LAYOUT_GLASS_LIGHT },
815
+ "glass-dark": { appearance: GLASS_DARK_APPEARANCE, buttonsLayout: BUTTONS_LAYOUT_GLASS_DARK }
816
+ };
817
+ function resolveTheme(id) {
818
+ if (!id || id === "classic") return void 0;
819
+ return THEMES[id];
820
+ }
278
821
  var ELEMENT_TYPES = [
279
822
  "payment",
280
823
  "card",
@@ -992,9 +1535,17 @@ function isValidSecretKey(key) {
992
1535
  BILLING_API_URL,
993
1536
  BILLING_API_URL_PRODUCTION,
994
1537
  BILLING_API_URL_STAGING,
1538
+ BOLD_DARK_APPEARANCE,
1539
+ BOLD_LIGHT_APPEARANCE,
1540
+ BUTTONS_LAYOUT_BOLD_DARK,
1541
+ BUTTONS_LAYOUT_BOLD_LIGHT,
995
1542
  BUTTONS_LAYOUT_DARK,
996
1543
  BUTTONS_LAYOUT_DEFAULT,
1544
+ BUTTONS_LAYOUT_GLASS_DARK,
1545
+ BUTTONS_LAYOUT_GLASS_LIGHT,
997
1546
  BUTTONS_LAYOUT_MINIMAL,
1547
+ BUTTONS_LAYOUT_MODERN_DARK,
1548
+ BUTTONS_LAYOUT_MODERN_LIGHT,
998
1549
  BUTTONS_LAYOUT_ROUNDED,
999
1550
  CA_PROVINCES,
1000
1551
  COUNTRY_OPTIONS,
@@ -1006,9 +1557,14 @@ function isValidSecretKey(key) {
1006
1557
  ELEMENT_TYPES,
1007
1558
  FLAT_APPEARANCE,
1008
1559
  FloPayError,
1560
+ GLASS_DARK_APPEARANCE,
1561
+ GLASS_LIGHT_APPEARANCE,
1562
+ MODERN_DARK_APPEARANCE,
1563
+ MODERN_LIGHT_APPEARANCE,
1009
1564
  NIGHT_APPEARANCE,
1010
1565
  SDK_VERSION,
1011
1566
  SUPPORTED_CARD_BRANDS,
1567
+ THEMES,
1012
1568
  US_STATES,
1013
1569
  apiError,
1014
1570
  authenticationError,
@@ -1037,6 +1593,7 @@ function isValidSecretKey(key) {
1037
1593
  resolveBillingApiUrl,
1038
1594
  resolveButtonsLayoutTheme,
1039
1595
  resolveSessionCurrency,
1596
+ resolveTheme,
1040
1597
  validationError
1041
1598
  });
1042
1599
  //# sourceMappingURL=index.cjs.map