@coinbase/cdp-react 0.0.23 → 0.0.25

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 (107) hide show
  1. package/README.md +2 -2
  2. package/dist/assets/AmountInput.css +1 -1
  3. package/dist/assets/AuthButton.css +1 -1
  4. package/dist/assets/Button.css +1 -1
  5. package/dist/assets/ButtonBase.css +1 -0
  6. package/dist/assets/CoinbaseFooter.css +1 -0
  7. package/dist/assets/ExchangeAmountInput.css +1 -1
  8. package/dist/assets/Fund.css +1 -0
  9. package/dist/assets/FundAmountInput.css +1 -0
  10. package/dist/assets/FundErrorScreen.css +1 -0
  11. package/dist/assets/FundForm.css +1 -0
  12. package/dist/assets/FundModal.css +1 -0
  13. package/dist/assets/FundPaymentMethods.css +1 -0
  14. package/dist/assets/FundPresetAmountInputs.css +1 -0
  15. package/dist/assets/FundTitle.css +1 -0
  16. package/dist/assets/FundTransactionStatus.css +1 -0
  17. package/dist/assets/Input.css +1 -1
  18. package/dist/assets/Modal.css +1 -1
  19. package/dist/assets/Select.css +1 -0
  20. package/dist/assets/ThemeProvider.css +1 -1
  21. package/dist/components/Fund/FundForm.d.ts +18 -0
  22. package/dist/components/Fund/FundForm.js +156 -0
  23. package/dist/components/Fund/FundProvider.d.ts +6 -0
  24. package/dist/components/Fund/FundProvider.js +128 -0
  25. package/dist/components/Fund/FundTitle.d.ts +5 -0
  26. package/dist/components/Fund/FundTitle.js +17 -0
  27. package/dist/components/Fund/components/FundAmountInput.d.ts +5 -0
  28. package/dist/components/Fund/components/FundAmountInput.js +58 -0
  29. package/dist/components/Fund/components/FundErrorScreen.d.ts +6 -0
  30. package/dist/components/Fund/components/FundErrorScreen.js +118 -0
  31. package/dist/components/Fund/components/FundPaymentMethods.d.ts +6 -0
  32. package/dist/components/Fund/components/FundPaymentMethods.js +55 -0
  33. package/dist/components/Fund/components/FundPresetAmountInputs.d.ts +6 -0
  34. package/dist/components/Fund/components/FundPresetAmountInputs.js +41 -0
  35. package/dist/components/Fund/components/FundTransactionStatus.d.ts +8 -0
  36. package/dist/components/Fund/components/FundTransactionStatus.js +106 -0
  37. package/dist/components/Fund/hooks/useBuyUrl.d.ts +14 -0
  38. package/dist/components/Fund/hooks/useBuyUrl.js +65 -0
  39. package/dist/components/Fund/hooks/useEmitLifecycleStatus.d.ts +5 -0
  40. package/dist/components/Fund/hooks/useEmitLifecycleStatus.js +14 -0
  41. package/dist/components/Fund/hooks/useExchangeRate.d.ts +11 -0
  42. package/dist/components/Fund/hooks/useExchangeRate.js +62 -0
  43. package/dist/components/Fund/hooks/usePaymentMethods.d.ts +11 -0
  44. package/dist/components/Fund/hooks/usePaymentMethods.js +112 -0
  45. package/dist/components/Fund/hooks/usePopupMonitor.d.ts +3 -0
  46. package/dist/components/Fund/hooks/usePopupMonitor.js +17 -0
  47. package/dist/components/Fund/hooks/useSetupOnrampEventListeners.d.ts +1 -0
  48. package/dist/components/Fund/hooks/useSetupOnrampEventListeners.js +56 -0
  49. package/dist/components/Fund/index.d.ts +10 -0
  50. package/dist/components/Fund/index.js +30 -0
  51. package/dist/components/Fund/types.d.ts +218 -0
  52. package/dist/components/Fund/types.js +1 -0
  53. package/dist/components/Fund/useFundReducer.d.ts +9 -0
  54. package/dist/components/Fund/useFundReducer.js +104 -0
  55. package/dist/components/Fund/utils/buildPaymentMethods.d.ts +5 -0
  56. package/dist/components/Fund/utils/buildPaymentMethods.js +57 -0
  57. package/dist/components/Fund/utils/setupOnrampEventListeners.d.ts +9 -0
  58. package/dist/components/Fund/utils/setupOnrampEventListeners.js +19 -0
  59. package/dist/components/Fund/utils/subscribeToWindowMessage.d.ts +14 -0
  60. package/dist/components/Fund/utils/subscribeToWindowMessage.js +24 -0
  61. package/dist/components/FundModal/index.d.ts +9 -0
  62. package/dist/components/FundModal/index.js +92 -0
  63. package/dist/components/SignIn/SignInFooter.d.ts +1 -1
  64. package/dist/components/SignIn/SignInFooter.js +4 -15
  65. package/dist/components/forms/ExchangeAmountInput/index.js +93 -65
  66. package/dist/components/forms/ExchangeAmountInput/types.d.ts +2 -1
  67. package/dist/components/forms/ExchangeAmountInput/useExchangeAmountInput.js +42 -38
  68. package/dist/components/forms/Input/index.d.ts +6 -2
  69. package/dist/components/forms/Input/index.js +27 -12
  70. package/dist/components/forms/PhoneNumberInput/index.d.ts +2 -2
  71. package/dist/components/forms/Select/index.d.ts +21 -0
  72. package/dist/components/forms/Select/index.js +74 -0
  73. package/dist/components/ui/Button/index.d.ts +4 -5
  74. package/dist/components/ui/Button/index.js +35 -56
  75. package/dist/components/ui/ButtonBase/index.d.ts +8 -0
  76. package/dist/components/ui/ButtonBase/index.js +45 -0
  77. package/dist/components/ui/CoinbaseFooter/index.d.ts +2 -0
  78. package/dist/components/ui/CoinbaseFooter/index.js +19 -0
  79. package/dist/components/ui/LoadingSkeleton/index.d.ts +3 -2
  80. package/dist/components/ui/LoadingSkeleton/index.js +9 -15
  81. package/dist/components/ui/LoadingSpinner/index.d.ts +9 -2
  82. package/dist/components/ui/LoadingSpinner/index.js +39 -17
  83. package/dist/icons/IconAppleLogo.d.ts +2 -0
  84. package/dist/icons/IconAppleLogo.js +10 -0
  85. package/dist/icons/IconCheck.d.ts +2 -0
  86. package/dist/icons/IconCheck.js +14 -0
  87. package/dist/icons/IconChevronDown.d.ts +2 -0
  88. package/dist/icons/IconChevronDown.js +14 -0
  89. package/dist/icons/IconCoinbaseMark.d.ts +2 -0
  90. package/dist/icons/IconCoinbaseMark.js +13 -0
  91. package/dist/icons/IconCreditCard.d.ts +2 -0
  92. package/dist/icons/IconCreditCard.js +10 -0
  93. package/dist/icons/IconExclamationTriangle.d.ts +2 -0
  94. package/dist/icons/IconExclamationTriangle.js +14 -0
  95. package/dist/icons/index.d.ts +3 -0
  96. package/dist/icons/index.js +20 -14
  97. package/dist/index.d.ts +2 -0
  98. package/dist/index.js +86 -69
  99. package/dist/theme/theme.d.ts +120 -2
  100. package/dist/theme/tokens.d.ts +346 -0
  101. package/dist/theme/tokens.js +76 -8
  102. package/dist/utils/formatFiat.d.ts +1 -0
  103. package/dist/utils/formatFiat.js +13 -0
  104. package/dist/utils/openPopup.d.ts +7 -0
  105. package/dist/utils/openPopup.js +15 -0
  106. package/package.json +7 -6
  107. package/dist/assets/SignInFooter.css +0 -1
@@ -11,6 +11,7 @@ export declare const colorsBase: {
11
11
  readonly gray900: "#1a1d21";
12
12
  readonly red500: "#cf202f";
13
13
  readonly green500: "#098551";
14
+ readonly amber500: "#ed702f";
14
15
  };
15
16
  export declare const colorsSemantic: {
16
17
  readonly bg: {
@@ -63,6 +64,9 @@ export declare const colorsSemantic: {
63
64
  readonly negative: {
64
65
  readonly value: "#cf202f";
65
66
  };
67
+ readonly warning: {
68
+ readonly value: "#ed702f";
69
+ };
66
70
  };
67
71
  readonly line: {
68
72
  readonly default: {
@@ -235,6 +239,116 @@ export declare const colorsComponents: {
235
239
  };
236
240
  };
237
241
  };
242
+ readonly select: {
243
+ readonly label: {
244
+ readonly default: {
245
+ readonly value: "{colors.fg.default}";
246
+ };
247
+ };
248
+ readonly trigger: {
249
+ readonly bg: {
250
+ readonly default: {
251
+ readonly value: "{colors.bg.default}";
252
+ };
253
+ };
254
+ readonly border: {
255
+ readonly default: {
256
+ readonly value: "{colors.line.heavy}";
257
+ };
258
+ readonly focus: {
259
+ readonly value: "{colors.line.primary}";
260
+ };
261
+ readonly error: {
262
+ readonly value: "{colors.line.negative}";
263
+ };
264
+ readonly success: {
265
+ readonly value: "{colors.line.positive}";
266
+ };
267
+ };
268
+ readonly placeholder: {
269
+ readonly default: {
270
+ readonly value: "{colors.fg.muted}";
271
+ };
272
+ };
273
+ readonly text: {
274
+ readonly default: {
275
+ readonly value: "{colors.fg.default}";
276
+ };
277
+ };
278
+ readonly errorText: {
279
+ readonly default: {
280
+ readonly value: "{colors.fg.negative}";
281
+ };
282
+ };
283
+ readonly successText: {
284
+ readonly default: {
285
+ readonly value: "{colors.fg.positive}";
286
+ };
287
+ };
288
+ };
289
+ readonly list: {
290
+ readonly bg: {
291
+ readonly default: {
292
+ readonly value: "{colors.bg.default}";
293
+ };
294
+ };
295
+ readonly border: {
296
+ readonly default: {
297
+ readonly value: "{colors.line.heavy}";
298
+ };
299
+ readonly focus: {
300
+ readonly value: "{colors.line.primary}";
301
+ };
302
+ readonly error: {
303
+ readonly value: "{colors.line.negative}";
304
+ };
305
+ readonly success: {
306
+ readonly value: "{colors.line.positive}";
307
+ };
308
+ };
309
+ readonly item: {
310
+ readonly bg: {
311
+ readonly default: {
312
+ readonly value: "{colors.bg.default}";
313
+ };
314
+ readonly highlight: {
315
+ readonly value: "{colors.bg.secondary}";
316
+ };
317
+ };
318
+ readonly text: {
319
+ readonly default: {
320
+ readonly value: "{colors.fg.default}";
321
+ };
322
+ readonly muted: {
323
+ readonly value: "{colors.fg.muted}";
324
+ };
325
+ readonly onHighlight: {
326
+ readonly value: "{colors.fg.default}";
327
+ };
328
+ readonly mutedOnHighlight: {
329
+ readonly value: "{colors.fg.muted}";
330
+ };
331
+ };
332
+ };
333
+ };
334
+ };
335
+ readonly code: {
336
+ readonly bg: {
337
+ readonly default: {
338
+ readonly value: "{colors.bg.alternate}";
339
+ };
340
+ };
341
+ readonly border: {
342
+ readonly default: {
343
+ readonly value: "{colors.line.heavy}";
344
+ };
345
+ };
346
+ readonly text: {
347
+ readonly default: {
348
+ readonly value: "{colors.fg.default}";
349
+ };
350
+ };
351
+ };
238
352
  };
239
353
  export declare const colors: {
240
354
  readonly page: {
@@ -389,6 +503,116 @@ export declare const colors: {
389
503
  };
390
504
  };
391
505
  };
506
+ readonly select: {
507
+ readonly label: {
508
+ readonly default: {
509
+ readonly value: "{colors.fg.default}";
510
+ };
511
+ };
512
+ readonly trigger: {
513
+ readonly bg: {
514
+ readonly default: {
515
+ readonly value: "{colors.bg.default}";
516
+ };
517
+ };
518
+ readonly border: {
519
+ readonly default: {
520
+ readonly value: "{colors.line.heavy}";
521
+ };
522
+ readonly focus: {
523
+ readonly value: "{colors.line.primary}";
524
+ };
525
+ readonly error: {
526
+ readonly value: "{colors.line.negative}";
527
+ };
528
+ readonly success: {
529
+ readonly value: "{colors.line.positive}";
530
+ };
531
+ };
532
+ readonly placeholder: {
533
+ readonly default: {
534
+ readonly value: "{colors.fg.muted}";
535
+ };
536
+ };
537
+ readonly text: {
538
+ readonly default: {
539
+ readonly value: "{colors.fg.default}";
540
+ };
541
+ };
542
+ readonly errorText: {
543
+ readonly default: {
544
+ readonly value: "{colors.fg.negative}";
545
+ };
546
+ };
547
+ readonly successText: {
548
+ readonly default: {
549
+ readonly value: "{colors.fg.positive}";
550
+ };
551
+ };
552
+ };
553
+ readonly list: {
554
+ readonly bg: {
555
+ readonly default: {
556
+ readonly value: "{colors.bg.default}";
557
+ };
558
+ };
559
+ readonly border: {
560
+ readonly default: {
561
+ readonly value: "{colors.line.heavy}";
562
+ };
563
+ readonly focus: {
564
+ readonly value: "{colors.line.primary}";
565
+ };
566
+ readonly error: {
567
+ readonly value: "{colors.line.negative}";
568
+ };
569
+ readonly success: {
570
+ readonly value: "{colors.line.positive}";
571
+ };
572
+ };
573
+ readonly item: {
574
+ readonly bg: {
575
+ readonly default: {
576
+ readonly value: "{colors.bg.default}";
577
+ };
578
+ readonly highlight: {
579
+ readonly value: "{colors.bg.secondary}";
580
+ };
581
+ };
582
+ readonly text: {
583
+ readonly default: {
584
+ readonly value: "{colors.fg.default}";
585
+ };
586
+ readonly muted: {
587
+ readonly value: "{colors.fg.muted}";
588
+ };
589
+ readonly onHighlight: {
590
+ readonly value: "{colors.fg.default}";
591
+ };
592
+ readonly mutedOnHighlight: {
593
+ readonly value: "{colors.fg.muted}";
594
+ };
595
+ };
596
+ };
597
+ };
598
+ };
599
+ readonly code: {
600
+ readonly bg: {
601
+ readonly default: {
602
+ readonly value: "{colors.bg.alternate}";
603
+ };
604
+ };
605
+ readonly border: {
606
+ readonly default: {
607
+ readonly value: "{colors.line.heavy}";
608
+ };
609
+ };
610
+ readonly text: {
611
+ readonly default: {
612
+ readonly value: "{colors.fg.default}";
613
+ };
614
+ };
615
+ };
392
616
  readonly bg: {
393
617
  readonly default: {
394
618
  readonly value: "#ffffff";
@@ -439,6 +663,9 @@ export declare const colors: {
439
663
  readonly negative: {
440
664
  readonly value: "#cf202f";
441
665
  };
666
+ readonly warning: {
667
+ readonly value: "#ed702f";
668
+ };
442
669
  };
443
670
  readonly line: {
444
671
  readonly default: {
@@ -460,6 +687,9 @@ export declare const colors: {
460
687
  };
461
688
  export declare const font: {
462
689
  readonly family: {
690
+ readonly mono: {
691
+ readonly value: "\"DM Mono\", monospace";
692
+ };
463
693
  readonly sans: {
464
694
  readonly value: "\"DM Sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"";
465
695
  };
@@ -624,6 +854,116 @@ export declare const tokens: {
624
854
  };
625
855
  };
626
856
  };
857
+ readonly select: {
858
+ readonly label: {
859
+ readonly default: {
860
+ readonly value: "{colors.fg.default}";
861
+ };
862
+ };
863
+ readonly trigger: {
864
+ readonly bg: {
865
+ readonly default: {
866
+ readonly value: "{colors.bg.default}";
867
+ };
868
+ };
869
+ readonly border: {
870
+ readonly default: {
871
+ readonly value: "{colors.line.heavy}";
872
+ };
873
+ readonly focus: {
874
+ readonly value: "{colors.line.primary}";
875
+ };
876
+ readonly error: {
877
+ readonly value: "{colors.line.negative}";
878
+ };
879
+ readonly success: {
880
+ readonly value: "{colors.line.positive}";
881
+ };
882
+ };
883
+ readonly placeholder: {
884
+ readonly default: {
885
+ readonly value: "{colors.fg.muted}";
886
+ };
887
+ };
888
+ readonly text: {
889
+ readonly default: {
890
+ readonly value: "{colors.fg.default}";
891
+ };
892
+ };
893
+ readonly errorText: {
894
+ readonly default: {
895
+ readonly value: "{colors.fg.negative}";
896
+ };
897
+ };
898
+ readonly successText: {
899
+ readonly default: {
900
+ readonly value: "{colors.fg.positive}";
901
+ };
902
+ };
903
+ };
904
+ readonly list: {
905
+ readonly bg: {
906
+ readonly default: {
907
+ readonly value: "{colors.bg.default}";
908
+ };
909
+ };
910
+ readonly border: {
911
+ readonly default: {
912
+ readonly value: "{colors.line.heavy}";
913
+ };
914
+ readonly focus: {
915
+ readonly value: "{colors.line.primary}";
916
+ };
917
+ readonly error: {
918
+ readonly value: "{colors.line.negative}";
919
+ };
920
+ readonly success: {
921
+ readonly value: "{colors.line.positive}";
922
+ };
923
+ };
924
+ readonly item: {
925
+ readonly bg: {
926
+ readonly default: {
927
+ readonly value: "{colors.bg.default}";
928
+ };
929
+ readonly highlight: {
930
+ readonly value: "{colors.bg.secondary}";
931
+ };
932
+ };
933
+ readonly text: {
934
+ readonly default: {
935
+ readonly value: "{colors.fg.default}";
936
+ };
937
+ readonly muted: {
938
+ readonly value: "{colors.fg.muted}";
939
+ };
940
+ readonly onHighlight: {
941
+ readonly value: "{colors.fg.default}";
942
+ };
943
+ readonly mutedOnHighlight: {
944
+ readonly value: "{colors.fg.muted}";
945
+ };
946
+ };
947
+ };
948
+ };
949
+ };
950
+ readonly code: {
951
+ readonly bg: {
952
+ readonly default: {
953
+ readonly value: "{colors.bg.alternate}";
954
+ };
955
+ };
956
+ readonly border: {
957
+ readonly default: {
958
+ readonly value: "{colors.line.heavy}";
959
+ };
960
+ };
961
+ readonly text: {
962
+ readonly default: {
963
+ readonly value: "{colors.fg.default}";
964
+ };
965
+ };
966
+ };
627
967
  readonly bg: {
628
968
  readonly default: {
629
969
  readonly value: "#ffffff";
@@ -674,6 +1014,9 @@ export declare const tokens: {
674
1014
  readonly negative: {
675
1015
  readonly value: "#cf202f";
676
1016
  };
1017
+ readonly warning: {
1018
+ readonly value: "#ed702f";
1019
+ };
677
1020
  };
678
1021
  readonly line: {
679
1022
  readonly default: {
@@ -695,6 +1038,9 @@ export declare const tokens: {
695
1038
  };
696
1039
  font: {
697
1040
  readonly family: {
1041
+ readonly mono: {
1042
+ readonly value: "\"DM Mono\", monospace";
1043
+ };
698
1044
  readonly sans: {
699
1045
  readonly value: "\"DM Sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"";
700
1046
  };
@@ -13,8 +13,9 @@ const e = {
13
13
  gray900: "#1a1d21",
14
14
  // contextual
15
15
  red500: "#cf202f",
16
- green500: "#098551"
17
- }, a = {
16
+ green500: "#098551",
17
+ amber500: "#ed702f"
18
+ }, l = {
18
19
  bg: {
19
20
  default: { value: e.white },
20
21
  // background
@@ -42,8 +43,10 @@ const e = {
42
43
  // text on secondary color
43
44
  positive: { value: e.green500 },
44
45
  // positive color text
45
- negative: { value: e.red500 }
46
+ negative: { value: e.red500 },
46
47
  // negative color text
48
+ warning: { value: e.amber500 }
49
+ // warning color text
47
50
  },
48
51
  line: {
49
52
  default: { value: e.gray200 },
@@ -57,7 +60,7 @@ const e = {
57
60
  negative: { value: "{colors.fg.negative}" }
58
61
  // negative line color
59
62
  }
60
- }, l = {
63
+ }, a = {
61
64
  page: {
62
65
  bg: {
63
66
  default: { value: "{colors.bg.default}" }
@@ -140,12 +143,77 @@ const e = {
140
143
  successText: {
141
144
  default: { value: "{colors.fg.positive}" }
142
145
  }
146
+ },
147
+ select: {
148
+ label: {
149
+ default: { value: "{colors.fg.default}" }
150
+ },
151
+ trigger: {
152
+ bg: {
153
+ default: { value: "{colors.bg.default}" }
154
+ },
155
+ border: {
156
+ default: { value: "{colors.line.heavy}" },
157
+ focus: { value: "{colors.line.primary}" },
158
+ error: { value: "{colors.line.negative}" },
159
+ success: { value: "{colors.line.positive}" }
160
+ },
161
+ placeholder: {
162
+ default: { value: "{colors.fg.muted}" }
163
+ },
164
+ text: {
165
+ default: { value: "{colors.fg.default}" }
166
+ },
167
+ errorText: {
168
+ default: { value: "{colors.fg.negative}" }
169
+ },
170
+ successText: {
171
+ default: { value: "{colors.fg.positive}" }
172
+ }
173
+ },
174
+ list: {
175
+ bg: {
176
+ default: { value: "{colors.bg.default}" }
177
+ },
178
+ border: {
179
+ default: { value: "{colors.line.heavy}" },
180
+ focus: { value: "{colors.line.primary}" },
181
+ error: { value: "{colors.line.negative}" },
182
+ success: { value: "{colors.line.positive}" }
183
+ },
184
+ item: {
185
+ bg: {
186
+ default: { value: "{colors.bg.default}" },
187
+ highlight: { value: "{colors.bg.secondary}" }
188
+ },
189
+ text: {
190
+ default: { value: "{colors.fg.default}" },
191
+ muted: { value: "{colors.fg.muted}" },
192
+ onHighlight: { value: "{colors.fg.default}" },
193
+ mutedOnHighlight: { value: "{colors.fg.muted}" }
194
+ }
195
+ }
196
+ }
197
+ },
198
+ code: {
199
+ bg: {
200
+ default: { value: "{colors.bg.alternate}" }
201
+ },
202
+ border: {
203
+ default: { value: "{colors.line.heavy}" }
204
+ },
205
+ text: {
206
+ default: { value: "{colors.fg.default}" }
207
+ }
143
208
  }
144
209
  }, o = {
145
- ...a,
146
- ...l
210
+ ...l,
211
+ ...a
147
212
  }, r = {
148
213
  family: {
214
+ mono: {
215
+ value: '"DM Mono", monospace'
216
+ },
149
217
  sans: {
150
218
  value: '"DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"'
151
219
  }
@@ -160,8 +228,8 @@ const e = {
160
228
  export {
161
229
  o as colors,
162
230
  e as colorsBase,
163
- l as colorsComponents,
164
- a as colorsSemantic,
231
+ a as colorsComponents,
232
+ l as colorsSemantic,
165
233
  r as font,
166
234
  u as tokens
167
235
  };
@@ -0,0 +1 @@
1
+ export declare const formatFiat: (value: number, currency?: string, decimalPlaces?: number, locale?: string) => string;
@@ -0,0 +1,13 @@
1
+ import { DEFAULT_LOCALE as n } from "../data/locale.js";
2
+ const F = (t, i = "USD", r = 2, m = n) => {
3
+ const o = Math.floor(t) === t;
4
+ return new Intl.NumberFormat(m, {
5
+ style: "currency",
6
+ currency: i,
7
+ minimumFractionDigits: o ? 0 : r,
8
+ maximumFractionDigits: o ? 0 : r
9
+ }).format(t);
10
+ };
11
+ export {
12
+ F as formatFiat
13
+ };
@@ -0,0 +1,7 @@
1
+ export type OpenPopupParams = {
2
+ url: string;
3
+ height: number;
4
+ width: number;
5
+ target?: string;
6
+ };
7
+ export declare const openPopup: ({ url, target, height, width }: OpenPopupParams) => Window | null;
@@ -0,0 +1,15 @@
1
+ const l = ({ url: d, target: r, height: e, width: n }) => {
2
+ const o = window.screenLeft !== void 0 ? window.screenLeft : window.screenX, t = window.screenTop !== void 0 ? window.screenTop : window.screenY, s = o >= 0 && o < window.screen.width && t >= 0 && t < window.screen.height;
3
+ let i, w;
4
+ if (s)
5
+ i = Math.round((window.screen.width - n) / 2), w = Math.round((window.screen.height - e) / 2);
6
+ else {
7
+ const h = window.outerWidth || window.innerWidth || document.documentElement.clientWidth || window.screen.width, u = window.outerHeight || window.innerHeight || document.documentElement.clientHeight || window.screen.height;
8
+ i = Math.round(o + (h - n) / 2), w = Math.round(t + (u - e) / 2);
9
+ }
10
+ const c = `width=${n},height=${e},resizable,scrollbars=yes,status=1,left=${i},top=${w}`;
11
+ return window.open(d, r, c);
12
+ };
13
+ export {
14
+ l as openPopup
15
+ };
package/package.json CHANGED
@@ -1,20 +1,21 @@
1
1
  {
2
2
  "name": "@coinbase/cdp-react",
3
- "version": "0.0.23",
3
+ "version": "0.0.25",
4
4
  "type": "module",
5
5
  "dependencies": {
6
6
  "@internationalized/number": "3.6.4",
7
7
  "@radix-ui/react-dialog": "^1.1.14",
8
8
  "@radix-ui/react-form": "^0.1.7",
9
9
  "@radix-ui/react-one-time-password-field": "^0.1.7",
10
+ "@radix-ui/react-select": "^2.2.6",
10
11
  "big.js": "7.0.1",
11
12
  "libphonenumber-js": "^1.12.10",
12
13
  "react-transition-state": "2.3.0"
13
14
  },
14
15
  "peerDependencies": {
15
16
  "react": ">=18.2.0",
16
- "@coinbase/cdp-core": "^0.0.23",
17
- "@coinbase/cdp-hooks": "^0.0.23"
17
+ "@coinbase/cdp-core": "^0.0.25",
18
+ "@coinbase/cdp-hooks": "^0.0.25"
18
19
  },
19
20
  "devDependencies": {
20
21
  "@size-limit/preset-big-lib": "^11.2.0",
@@ -44,8 +45,8 @@
44
45
  "vite": "^7.0.4",
45
46
  "vite-plugin-dts": "^4.5.4",
46
47
  "vite-plugin-lib-inject-css": "^2.2.2",
47
- "@coinbase/cdp-core": "^0.0.23",
48
- "@coinbase/cdp-hooks": "^0.0.23"
48
+ "@coinbase/cdp-core": "^0.0.25",
49
+ "@coinbase/cdp-hooks": "^0.0.25"
49
50
  },
50
51
  "size-limit": [
51
52
  {
@@ -53,7 +54,7 @@
53
54
  "path": "./dist/index.js",
54
55
  "import": "*",
55
56
  "running": false,
56
- "limit": "70 KB"
57
+ "limit": "100 KB"
57
58
  },
58
59
  {
59
60
  "name": "single-component",
@@ -1 +0,0 @@
1
- .SignInFooter-module__footer___DLNrl{color:var(--cdp-web-colors-page-text-muted);display:flex;align-items:center;justify-content:center;gap:.5em;line-height:1;padding:1em 2em 0}.SignInFooter-module__footer___DLNrl:first-child{border-top:0}.SignInFooter-module__footer___DLNrl p{display:flex;align-items:center;font-size:.75em;gap:.25em;margin:0}.SignInFooter-module__icon___hFhfx{height:auto;width:.75em}.SignInFooter-module__coinbase-icon___NeFOp{height:1em;width:auto}