@funkit/connect 8.2.0 → 8.2.1-next.2

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 (57) hide show
  1. package/CHANGELOG.md +59 -2
  2. package/dist/{chunk-WIDI2TYC.js → chunk-BP7VOYBS.js} +51 -2
  3. package/dist/{chunk-JIC2XXGY.js → chunk-KKGSXLMH.js} +12 -2
  4. package/dist/{chunk-QHRAQNOB.js → chunk-MYPFORR2.js} +12 -2
  5. package/dist/clients/fanatics.css +4375 -3286
  6. package/dist/clients/fanatics.d.ts +18 -7
  7. package/dist/clients/fanatics.js +739 -337
  8. package/dist/components/AsyncImage/useAsyncImage.d.ts +2 -0
  9. package/dist/components/Box/Box.d.ts +47 -47
  10. package/dist/components/Dialog/Dialog.d.ts +3 -1
  11. package/dist/components/Dialog/DialogContent.css.d.ts +9 -0
  12. package/dist/components/FunCheckoutHistory/FunDirectExecutionHistoryBottomBar.d.ts +10 -0
  13. package/dist/components/FunInput/FunInput.d.ts +4 -0
  14. package/dist/components/FunOptionBox/FunOptionBox.css.d.ts +1 -1
  15. package/dist/components/FunPayments/FunPaymentMethods.d.ts +7 -0
  16. package/dist/components/FunSelectBrokerage/FunBrokerageItem.d.ts +4 -1
  17. package/dist/components/FunSkeletonLoader/FunSkeletonBlock.d.ts +8 -3
  18. package/dist/components/FunTransactionSummary/FunTxSummaryComponents.d.ts +1 -0
  19. package/dist/components/HelpAlert/HelpAlert.d.ts +1 -0
  20. package/dist/components/Icons/ApplePayIcon.d.ts +4 -0
  21. package/dist/components/Icons/FanaticsCreditCardIcon.d.ts +4 -0
  22. package/dist/components/Icons/GooglePayIcon.d.ts +4 -0
  23. package/dist/components/Icons/RevolutPayIcon.d.ts +4 -0
  24. package/dist/components/Icons/SepaBankIcon.d.ts +4 -0
  25. package/dist/components/Icons/VenmoIcon.d.ts +4 -0
  26. package/dist/components/Tabs/Tabs.d.ts +2 -2
  27. package/dist/components/Text/Text.d.ts +1 -0
  28. package/dist/components/TransactionStatus/AnimatedSpinner/AnimatedSpinner.d.ts +10 -0
  29. package/dist/components/TransactionStatus/AnimatedSpinner/AnimatedSpinnerLoading.d.ts +6 -0
  30. package/dist/components/TransactionStatus/AnimatedText.d.ts +10 -0
  31. package/dist/components/TransactionStatus/DotsDivider.d.ts +2 -0
  32. package/dist/components/TransactionStatus/StepSpinner.d.ts +17 -0
  33. package/dist/components/TransactionStatus/TransactionStatus.d.ts +5 -7
  34. package/dist/components/TransactionStatus/TransactionStatusLoading.d.ts +6 -0
  35. package/dist/css/sprinkles.css.d.ts +241 -49
  36. package/dist/domains/paymentMethods.d.ts +8 -1
  37. package/dist/hooks/useCheckoutTimeEstimate.d.ts +1 -1
  38. package/dist/index.css +4458 -3331
  39. package/dist/index.js +4275 -3096
  40. package/dist/modals/CheckoutModal/ConfirmationStep/CheckoutPrimaryInfo.d.ts +2 -1
  41. package/dist/modals/CheckoutModal/InputAmount/state.d.ts +2 -0
  42. package/dist/modals/CheckoutModal/{SelectAsset.d.ts → SelectAsset/SelectAsset.d.ts} +3 -3
  43. package/dist/modals/CheckoutModal/SelectAsset/SelectAssetInfoSection.d.ts +12 -0
  44. package/dist/modals/CheckoutModal/SelectAsset/SelectAssetList.d.ts +24 -0
  45. package/dist/modals/CheckoutModal/stepTransition.d.ts +1 -1
  46. package/dist/modals/ProfileDetails/FunProfileViews/Home/HomeCheckoutDisplayRow.css.d.ts +1 -1
  47. package/dist/providers/FunkitConfigContext.d.ts +94 -11
  48. package/dist/providers/FunkitThemeProvider.d.ts +291 -3
  49. package/dist/themes/baseTheme.js +1 -1
  50. package/dist/themes/darkTheme.js +2 -2
  51. package/dist/themes/lightTheme.js +2 -2
  52. package/dist/utils/checkout.d.ts +6 -0
  53. package/dist/utils/customer.d.ts +2 -3
  54. package/dist/utils/flags/config.d.ts +2 -2
  55. package/dist/wallets/walletConnectors/index.js +7 -7
  56. package/package.json +4 -4
  57. package/dist/hooks/useUsableWalletAssetsForCheckout.d.ts +0 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,64 @@
1
1
  # @funkit/connect
2
2
 
3
+ ## 8.2.1-next.2
4
+
5
+ ### Patch Changes
6
+
7
+ - b7886e5: feat(connect): migrate EnableFiatDeposit flag to statsig
8
+ - Updated dependencies [b7886e5]
9
+ - @funkit/utils@1.1.25-next.0
10
+ - @funkit/api-base@2.1.2-next.2
11
+
12
+ ## 8.2.1-next.1
13
+
14
+ ### Patch Changes
15
+
16
+ - fcf7c8b: refactor(connect): select asset screen - minor refactor and breaking up into smaller components
17
+ - 68d2aaf: feat(connect): add theme level variables to modal header icon buttons
18
+ - 074e0f5: fix(connect): custom payment method icon for connected wallet users
19
+ - d1a72f7: feat(connect): preload remote S3 url
20
+ - 6cea746: feat(connect): add instant time estimate label via config
21
+ - cade95a: geist mono font for amounts in fanatics theme
22
+ - 7d6b623: new skeletons for fanatics
23
+ - 88aed38: fix(connect): select asset screen - padding issue for navigateOnAssetClick variant
24
+ - 14355da: feat(connect): ability to display step vs animated progress
25
+ - Updated dependencies [4f6433f]
26
+ - @funkit/api-base@2.1.2-next.1
27
+
28
+ ## 8.2.1-next.0
29
+
30
+ ### Patch Changes
31
+
32
+ - 87c0f00: feat(connect): split decimal based on locale
33
+ - 761464a: feat(connect): fanatics checkout history
34
+ - 29ac86d: Add configurable props to custom source banner component
35
+ - 203029c: feat(connect): add theme level control to set font size for you send you receive component
36
+ - 4833bc1: Do not unnecessarily fetch Lighter accounts
37
+ - ad0a860: fix(connect): input screen decimal color check
38
+ - 9ffd984: feat(connect): ability to pass custom icons to payment method icons
39
+ - d9821eb: swapped based use cash tab UI implementation
40
+ - 2f4c5c2: feat(connect): add theme styling for cash crypto toggle
41
+ - 9f3ff5c: fix(connect): transparent caret color bug
42
+ - 0b0e4e8: fanatics modal mobile view improvements
43
+ - 9f98ac4: feat(connect): add dynamic chain icon mask on FunAvatar component
44
+ - 49376c3: fix: getBalance computation no longer relies on deprecated field
45
+ - 0d1a649: feat(connect): customizable payment method icons
46
+ - 38be23d: feat: new inputAmountFiatDecimalsColor theme variable
47
+ - ce0e7ff: fix(connect): cdn url path
48
+ - ff96c90: feat(connect): hide destination field in payment summary for simplifiedUi config
49
+ - aabec47: feat(connect): ui customization to hide secondary token symbol on FunAssetItem
50
+ - 1f1c515: chore(connect): fanatics confirmation step
51
+ - cc8ed95: feat(connect): fanatics connect exchange screen
52
+ - a677e72: refactor(connect): break up TransactionStatus into separate files
53
+ - 52208da: fix(connect): fix stale value with flush sync
54
+ - 5bba47b: fix(connect): update default theme value horizontal padding on confirmation screen
55
+ - 0c04e6e: chore: deprecate unused hook useUsableWalletAssetsForCheckout
56
+ - 2f67612: fix font sizes for fanatics
57
+ - Updated dependencies [c939c70]
58
+ - Updated dependencies [78f741f]
59
+ - @funkit/fun-relay@2.2.3-next.0
60
+ - @funkit/api-base@2.1.2-next.0
61
+
3
62
  ## 8.2.0
4
63
 
5
64
  ### Minor Changes
@@ -120,7 +179,6 @@
120
179
  Both hooks return purified checkout history items suitable for external use and include full JSDoc documentation with usage examples.
121
180
 
122
181
  - fa6cb1f: Add soft-close feature for checkout modal when transaction is in progress
123
-
124
182
  - When a transaction is in progress (checkoutProgress.step >= 1), the close button now hides the modal instead of closing it, preserving state
125
183
  - Added `useSoftHiddenCheckout` hook for managing soft-hidden checkout state
126
184
  - Added internal `onCheckoutConflict` handler to resolve conflicts when `beginCheckout` is called while a checkout is soft-hidden
@@ -423,7 +481,6 @@
423
481
  ### Minor Changes
424
482
 
425
483
  - fa6cb1f: Add soft-close feature for checkout modal when transaction is in progress
426
-
427
484
  - When a transaction is in progress (checkoutProgress.step >= 1), the close button now hides the modal instead of closing it, preserving state
428
485
  - Added `useSoftHiddenCheckout` hook for managing soft-hidden checkout state
429
486
  - Added internal `onCheckoutConflict` handler to resolve conflicts when `beginCheckout` is called while a checkout is soft-hidden
@@ -151,42 +151,70 @@ var baseTheme = ({
151
151
  modalOverlay: blurs[overlayBlur].modalOverlay
152
152
  },
153
153
  dimensions: {
154
+ connectExchangeIconSize: "48px",
155
+ dollarValueSkeletonHeight: "60px",
156
+ dollarValueSkeletonWidth: "160px",
154
157
  inputAmountQuickOptionButtonHeight: "36px",
155
158
  inputAmountMinHeight: "76px",
156
159
  modalBottomBarButtonHeight: "34px",
157
160
  modalTopBarHeight: "56px",
161
+ paymentAmountSkeletonBlockHeight: "10px",
162
+ paymentAmountSkeletonBlockWidth: "93px",
163
+ paymentAmountSkeletonCircleSize: "15px",
158
164
  selectAssetItemIconSize: "24px",
165
+ txBreakdownSkeletonWidth: "72px",
166
+ txSummaryLineSkeletonHeight: "14px",
167
+ txSummaryLineSkeletonWidth: "54px",
159
168
  ...customDimensions
160
169
  },
161
170
  fonts: typeof customFontFamily === "string" ? {
171
+ amountValue: customFontFamily,
162
172
  body: customFontFamily,
163
173
  buttonTextPrimary: customFontFamily,
164
174
  buttonTextSecondary: customFontFamily,
165
175
  buttonTextTertiary: customFontFamily,
166
- inputAmount: customFontFamily
176
+ header: customFontFamily,
177
+ inputAmount: customFontFamily,
178
+ txStatusDescription: customFontFamily,
179
+ txStatusTitle: customFontFamily
167
180
  } : {
181
+ amountValue: fontStacks[fontStack],
168
182
  body: fontStacks[fontStack],
169
183
  buttonTextPrimary: fontStacks[fontStack],
170
184
  buttonTextSecondary: fontStacks[fontStack],
171
185
  buttonTextTertiary: fontStacks[fontStack],
186
+ header: fontStacks[fontStack],
172
187
  inputAmount: fontStacks[fontStack],
188
+ txStatusDescription: fontStacks[fontStack],
189
+ txStatusTitle: fontStacks[fontStack],
173
190
  ...customFontFamily
174
191
  },
175
192
  fontWeight: {
176
193
  ...DEFAULT_FONT_WEIGHTS,
194
+ inputAmount: DEFAULT_FONT_WEIGHTS.medium,
177
195
  modalTopbarTitle: DEFAULT_FONT_WEIGHTS.medium,
178
196
  modalBottomBarButtonText: DEFAULT_FONT_WEIGHTS.medium,
179
197
  paymentMethodItemSubtitle: DEFAULT_FONT_WEIGHTS.regular,
180
198
  paymentMethodItemTitle: DEFAULT_FONT_WEIGHTS.medium,
181
199
  selectAssetItemSubtitle: DEFAULT_FONT_WEIGHTS.regular,
182
200
  selectAssetItemTitle: DEFAULT_FONT_WEIGHTS.medium,
201
+ transferTokenLabelFontWeight: DEFAULT_FONT_WEIGHTS.medium,
202
+ txBreakdown: DEFAULT_FONT_WEIGHTS.regular,
203
+ txStatusDescription: DEFAULT_FONT_WEIGHTS.regular,
204
+ txStatusTitle: DEFAULT_FONT_WEIGHTS.medium,
205
+ txSummaryLabel: DEFAULT_FONT_WEIGHTS.medium,
206
+ txSummaryValue: DEFAULT_FONT_WEIGHTS.medium,
183
207
  ...customFontWeights
184
208
  },
185
209
  fontSize: {
186
210
  ...FONT_SIZINGS[fontSizing],
211
+ body: FONT_SIZINGS[fontSizing][14],
212
+ "header-14": { fontSize: "14px", lineHeight: "14px" },
213
+ "header-36": { fontSize: "36px", lineHeight: "36px" },
187
214
  buttonTextPrimary: FONT_SIZINGS[fontSizing][12],
188
215
  buttonTextSecondary: FONT_SIZINGS[fontSizing][10],
189
216
  buttonTextTertiary: FONT_SIZINGS[fontSizing][12],
217
+ dollarValue: FONT_SIZINGS[fontSizing][40],
190
218
  inputAmount: FONT_SIZINGS[fontSizing][57],
191
219
  modalTopbarSubtitle: FONT_SIZINGS[fontSizing][10],
192
220
  modalTopbarTitle: FONT_SIZINGS[fontSizing][13],
@@ -195,6 +223,16 @@ var baseTheme = ({
195
223
  paymentMethodItemTitle: FONT_SIZINGS[fontSizing][12],
196
224
  selectAssetItemSubtitle: FONT_SIZINGS[fontSizing][10],
197
225
  selectAssetItemTitle: FONT_SIZINGS[fontSizing][13],
226
+ txBreakdown: FONT_SIZINGS[fontSizing][12],
227
+ txStatusDescription: FONT_SIZINGS[fontSizing][13],
228
+ txStatusTitle: FONT_SIZINGS[fontSizing][13],
229
+ txSummaryLabel: FONT_SIZINGS[fontSizing][12],
230
+ txSummaryValue: FONT_SIZINGS[fontSizing][12],
231
+ youPayYouReceivePrimaryFontSize: FONT_SIZINGS[fontSizing][12],
232
+ youPayYouReceiveSecondaryFontSize: FONT_SIZINGS[fontSizing][10],
233
+ transferTokenLabelFontSize: FONT_SIZINGS[fontSizing][12],
234
+ depositAddressFontSize: FONT_SIZINGS[fontSizing][10],
235
+ funFeatureListItemFontSize: FONT_SIZINGS[fontSizing][12],
198
236
  ...customFontSizings
199
237
  },
200
238
  radii: {
@@ -220,9 +258,12 @@ var baseTheme = ({
220
258
  borderWidths: {
221
259
  activeOptionBorderWidth: "1px",
222
260
  buttonTertiaryBorderWidth: "0px",
261
+ txSummaryBoxBorderWidth: "1px",
223
262
  ...customBorderWidths
224
263
  },
225
264
  spacing: {
265
+ confirmationStepMarginTop: "6px",
266
+ confirmationStepVerticalGap: "18px",
226
267
  modalBaseHorizontalPadding: "6px",
227
268
  modalBottomHorizontalPadding: "12px",
228
269
  modalPaddingBottomUpper: "16px",
@@ -233,11 +274,19 @@ var baseTheme = ({
233
274
  selectAssetItemTextGap: "0px",
234
275
  selectBrokerageItemPaddingX: "12px",
235
276
  selectBrokerageItemPaddingY: "11px",
277
+ txBreakdownMarginY: "18px",
278
+ txBreakdownPaddingX: "12px",
279
+ txSummaryBoxPaddingX: "12px",
280
+ txSummaryBoxPaddingY: "12px",
281
+ txSummaryLineItemPadding: "0px",
282
+ txSummaryDividerMarginX: "12px",
283
+ txSummaryDividerMarginY: "12px",
236
284
  youPayYouReceivePaddingY: "8px",
237
285
  ...customSpacings
238
286
  },
239
287
  textTransforms: {
240
- inputAmountQuickOptionButtonTextTransform: "none",
288
+ inputAmountQuickOptionButton: "none",
289
+ txStatusTitle: "none",
241
290
  ...customTextTransforms
242
291
  }
243
292
  });
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  baseTheme
4
- } from "./chunk-WIDI2TYC.js";
4
+ } from "./chunk-BP7VOYBS.js";
5
5
 
6
6
  // src/themes/darkTheme.ts
7
7
  var accentColors = {
@@ -51,6 +51,10 @@ var darkTheme = ({
51
51
  modalBackground: "#000000",
52
52
  modalBorder: "#292929",
53
53
  modalTopbarIcon: "#FFF",
54
+ modalTopbarIconBackground: customColors?.modalTopbarIconBackground ?? "transparent",
55
+ modalTopbarIconBackgroundHover: customColors?.modalTopbarIconBackgroundHover ?? customColors?.buttonIconBackgroundHover ?? "#333333",
56
+ modalTopbarIconBackgroundPressed: customColors?.modalTopbarIconBackgroundPressed ?? customColors?.buttonIconBackgroundPressed ?? "#333333",
57
+ modalTopbarIconStroke: customColors?.modalTopbarIconStroke ?? customColors?.buttonIconStroke ?? "rgba(255, 255, 255, 0.35)",
54
58
  offBackground: "#1F1F1F",
55
59
  offBackgroundInverse: "#F2F2F2",
56
60
  hoverState: "#333333",
@@ -67,6 +71,9 @@ var darkTheme = ({
67
71
  inputBackground: "#000000",
68
72
  inputBorderBase: "#333333",
69
73
  inputBorderHover: "#525252",
74
+ // tab
75
+ activeTabBorderColor: "#333333",
76
+ activeTabBackground: "#333333",
70
77
  // button
71
78
  actionColor: "#FFF",
72
79
  actionColorHover: "rgba(255, 255, 255, 0.8)",
@@ -108,6 +115,7 @@ var darkTheme = ({
108
115
  inputAmountQuickOptionHoverBorder: "rgba(255, 255, 255, 0.35)",
109
116
  inputAmountQuickOptionActiveBorder: "rgba(255, 255, 255, 0.35)",
110
117
  inputAmountQuickOptionFocusedBorder: "rgba(255, 255, 255, 0.35)",
118
+ inputAmountFiatDecimalsColor: customColors?.inputAmountFiatDecimalsColor ?? "none",
111
119
  youPayYouReceiveBackground: "#000000",
112
120
  // modalBackground
113
121
  youPayYouReceiveBorder: "#333333",
@@ -159,7 +167,9 @@ var darkTheme = ({
159
167
  optionBoxBackgroundUninteractive: customColors?.optionBoxBackgroundUninteractive ?? "transparent",
160
168
  dropdownActiveItemBackgroundBase: customColors?.dropdownActiveItemBackgroundBase ?? customColors?.modalBackground ?? "#000000",
161
169
  dropdownActiveItemBackgroundHover: customColors?.dropdownActiveItemBackgroundHover ?? customColors?.offBackground ?? "#1F1F1F",
162
- dropdownActiveItemBackgroundDisabled: customColors?.dropdownActiveItemBackgroundDisabled ?? "transparent"
170
+ dropdownActiveItemBackgroundDisabled: customColors?.dropdownActiveItemBackgroundDisabled ?? "transparent",
171
+ txSummaryBoxBackground: customColors?.txSummaryBoxBackground ?? customColors?.modalBackground ?? "#000",
172
+ txSummaryBoxBorder: customColors?.txSummaryBoxBorder ?? customColors?.lightStroke ?? "#333333"
163
173
  },
164
174
  shadows: {
165
175
  connectButton: "0px 4px 12px rgba(0, 0, 0, 0.1)",
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  baseTheme
4
- } from "./chunk-WIDI2TYC.js";
4
+ } from "./chunk-BP7VOYBS.js";
5
5
 
6
6
  // src/themes/lightTheme.ts
7
7
  var accentColors = {
@@ -49,6 +49,10 @@ var lightTheme = ({
49
49
  // modal backgrounds
50
50
  modalBackdrop: "rgba(0, 0, 0, 0.2)",
51
51
  modalTopbarIcon: "#000",
52
+ modalTopbarIconBackground: customColors?.modalTopbarIconBackground ?? "transparent",
53
+ modalTopbarIconBackgroundHover: customColors?.modalTopbarIconBackgroundHover ?? customColors?.buttonIconBackgroundHover ?? "#F7F7F7",
54
+ modalTopbarIconBackgroundPressed: customColors?.modalTopbarIconBackgroundPressed ?? customColors?.buttonIconBackgroundPressed ?? "#F0F0F0",
55
+ modalTopbarIconStroke: customColors?.modalTopbarIconStroke ?? customColors?.buttonIconStroke ?? "rgba(0, 0, 0, 0.35)",
52
56
  modalBackground: "#FFF",
53
57
  modalBorder: "#F7F7F7",
54
58
  offBackground: "#F7F7F7",
@@ -67,6 +71,9 @@ var lightTheme = ({
67
71
  inputBackground: "#FFFFFF",
68
72
  inputBorderBase: "#F0F0F0",
69
73
  inputBorderHover: "#E5E5E5",
74
+ // tab
75
+ activeTabBorderColor: "#F7F7F7",
76
+ activeTabBackground: "#F7F7F7",
70
77
  // button
71
78
  actionColor: "#000",
72
79
  actionColorHover: "rgba(0, 0, 0, 0.7)",
@@ -108,6 +115,7 @@ var lightTheme = ({
108
115
  inputAmountQuickOptionHoverBorder: "rgba(0, 0, 0, 0.35)",
109
116
  inputAmountQuickOptionActiveBorder: "rgba(0, 0, 0, 0.35)",
110
117
  inputAmountQuickOptionFocusedBorder: "rgba(0, 0, 0, 0.35)",
118
+ inputAmountFiatDecimalsColor: customColors?.inputAmountFiatDecimalsColor ?? "none",
111
119
  youPayYouReceiveBackground: "#FFF",
112
120
  // modalBackground
113
121
  youPayYouReceiveBorder: "#F0F0F0",
@@ -159,7 +167,9 @@ var lightTheme = ({
159
167
  optionBoxBackgroundUninteractive: customColors?.optionBoxBackgroundUninteractive ?? "transparent",
160
168
  dropdownActiveItemBackgroundBase: customColors?.dropdownActiveItemBackgroundBase ?? customColors?.modalBackground ?? "#FFF",
161
169
  dropdownActiveItemBackgroundHover: customColors?.dropdownActiveItemBackgroundHover ?? customColors?.offBackground ?? "#F7F7F7",
162
- dropdownActiveItemBackgroundDisabled: customColors?.dropdownActiveItemBackgroundDisabled ?? "transparent"
170
+ dropdownActiveItemBackgroundDisabled: customColors?.dropdownActiveItemBackgroundDisabled ?? "transparent",
171
+ txSummaryBoxBackground: customColors?.txSummaryBoxBackground ?? customColors?.modalBackground ?? "#FFF",
172
+ txSummaryBoxBorder: customColors?.txSummaryBoxBorder ?? customColors?.lightStroke ?? "#F7F7F7"
163
173
  },
164
174
  shadows: {
165
175
  connectButton: "0px 4px 12px rgba(0, 0, 0, 0.1)",