@b3dotfun/sdk 0.1.2-alpha.0 → 0.1.2-alpha.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 (126) hide show
  1. package/dist/cjs/anyspend/react/components/AnySpend.d.ts +3 -0
  2. package/dist/cjs/anyspend/react/components/AnySpend.js +12 -6
  3. package/dist/cjs/anyspend/react/components/AnySpendCustomExactIn.d.ts +3 -0
  4. package/dist/cjs/anyspend/react/components/AnySpendCustomExactIn.js +10 -4
  5. package/dist/cjs/anyspend/react/components/AnySpendDeposit.d.ts +4 -1
  6. package/dist/cjs/anyspend/react/components/AnySpendDeposit.js +19 -4
  7. package/dist/cjs/anyspend/react/components/QRDeposit.d.ts +4 -1
  8. package/dist/cjs/anyspend/react/components/QRDeposit.js +12 -4
  9. package/dist/cjs/anyspend/react/components/common/CryptoPaySection.d.ts +3 -1
  10. package/dist/cjs/anyspend/react/components/common/CryptoPaySection.js +7 -5
  11. package/dist/cjs/anyspend/react/components/common/CryptoPaymentMethod.d.ts +3 -1
  12. package/dist/cjs/anyspend/react/components/common/CryptoPaymentMethod.js +4 -3
  13. package/dist/cjs/anyspend/react/components/common/CryptoReceiveSection.d.ts +3 -1
  14. package/dist/cjs/anyspend/react/components/common/CryptoReceiveSection.js +7 -6
  15. package/dist/cjs/anyspend/react/components/common/FeeDetailPanel.d.ts +3 -1
  16. package/dist/cjs/anyspend/react/components/common/FeeDetailPanel.js +15 -6
  17. package/dist/cjs/anyspend/react/components/common/FiatPaymentMethod.d.ts +3 -1
  18. package/dist/cjs/anyspend/react/components/common/FiatPaymentMethod.js +10 -6
  19. package/dist/cjs/anyspend/react/components/common/OrderDetails.d.ts +3 -0
  20. package/dist/cjs/anyspend/react/components/common/OrderDetails.js +7 -4
  21. package/dist/cjs/anyspend/react/components/common/OrderDetailsCollapsible.d.ts +2 -0
  22. package/dist/cjs/anyspend/react/components/common/OrderDetailsCollapsible.js +3 -2
  23. package/dist/cjs/anyspend/react/components/common/OrderHistory.js +2 -1
  24. package/dist/cjs/anyspend/react/components/common/PanelOnramp.d.ts +3 -1
  25. package/dist/cjs/anyspend/react/components/common/PanelOnramp.js +2 -2
  26. package/dist/cjs/anyspend/react/components/common/PanelOnrampPayment.d.ts +2 -0
  27. package/dist/cjs/anyspend/react/components/common/PanelOnrampPayment.js +20 -7
  28. package/dist/cjs/anyspend/react/components/common/PointsDetailPanel.d.ts +3 -1
  29. package/dist/cjs/anyspend/react/components/common/PointsDetailPanel.js +3 -2
  30. package/dist/cjs/anyspend/react/components/common/RecipientSelection.d.ts +6 -1
  31. package/dist/cjs/anyspend/react/components/common/RecipientSelection.js +5 -2
  32. package/dist/cjs/anyspend/react/components/common/TabSection.d.ts +3 -1
  33. package/dist/cjs/anyspend/react/components/common/TabSection.js +16 -7
  34. package/dist/cjs/anyspend/react/components/common/TransferCryptoDetails.d.ts +2 -0
  35. package/dist/cjs/anyspend/react/components/common/TransferCryptoDetails.js +3 -2
  36. package/dist/cjs/anyspend/react/components/common/WarningText.d.ts +8 -7
  37. package/dist/cjs/anyspend/react/components/common/WarningText.js +5 -6
  38. package/dist/cjs/anyspend/react/components/index.d.ts +1 -0
  39. package/dist/cjs/anyspend/react/components/types/classes.d.ts +390 -0
  40. package/dist/cjs/anyspend/react/components/types/classes.js +6 -0
  41. package/dist/cjs/global-account/react/stores/useModalStore.d.ts +3 -0
  42. package/dist/esm/anyspend/react/components/AnySpend.d.ts +3 -0
  43. package/dist/esm/anyspend/react/components/AnySpend.js +12 -6
  44. package/dist/esm/anyspend/react/components/AnySpendCustomExactIn.d.ts +3 -0
  45. package/dist/esm/anyspend/react/components/AnySpendCustomExactIn.js +10 -4
  46. package/dist/esm/anyspend/react/components/AnySpendDeposit.d.ts +4 -1
  47. package/dist/esm/anyspend/react/components/AnySpendDeposit.js +19 -4
  48. package/dist/esm/anyspend/react/components/QRDeposit.d.ts +4 -1
  49. package/dist/esm/anyspend/react/components/QRDeposit.js +12 -4
  50. package/dist/esm/anyspend/react/components/common/CryptoPaySection.d.ts +3 -1
  51. package/dist/esm/anyspend/react/components/common/CryptoPaySection.js +7 -5
  52. package/dist/esm/anyspend/react/components/common/CryptoPaymentMethod.d.ts +3 -1
  53. package/dist/esm/anyspend/react/components/common/CryptoPaymentMethod.js +4 -3
  54. package/dist/esm/anyspend/react/components/common/CryptoReceiveSection.d.ts +3 -1
  55. package/dist/esm/anyspend/react/components/common/CryptoReceiveSection.js +7 -6
  56. package/dist/esm/anyspend/react/components/common/FeeDetailPanel.d.ts +3 -1
  57. package/dist/esm/anyspend/react/components/common/FeeDetailPanel.js +15 -6
  58. package/dist/esm/anyspend/react/components/common/FiatPaymentMethod.d.ts +3 -1
  59. package/dist/esm/anyspend/react/components/common/FiatPaymentMethod.js +10 -6
  60. package/dist/esm/anyspend/react/components/common/OrderDetails.d.ts +3 -0
  61. package/dist/esm/anyspend/react/components/common/OrderDetails.js +7 -4
  62. package/dist/esm/anyspend/react/components/common/OrderDetailsCollapsible.d.ts +2 -0
  63. package/dist/esm/anyspend/react/components/common/OrderDetailsCollapsible.js +3 -2
  64. package/dist/esm/anyspend/react/components/common/OrderHistory.js +2 -1
  65. package/dist/esm/anyspend/react/components/common/PanelOnramp.d.ts +3 -1
  66. package/dist/esm/anyspend/react/components/common/PanelOnramp.js +2 -2
  67. package/dist/esm/anyspend/react/components/common/PanelOnrampPayment.d.ts +2 -0
  68. package/dist/esm/anyspend/react/components/common/PanelOnrampPayment.js +20 -7
  69. package/dist/esm/anyspend/react/components/common/PointsDetailPanel.d.ts +3 -1
  70. package/dist/esm/anyspend/react/components/common/PointsDetailPanel.js +3 -2
  71. package/dist/esm/anyspend/react/components/common/RecipientSelection.d.ts +6 -1
  72. package/dist/esm/anyspend/react/components/common/RecipientSelection.js +5 -2
  73. package/dist/esm/anyspend/react/components/common/TabSection.d.ts +3 -1
  74. package/dist/esm/anyspend/react/components/common/TabSection.js +16 -7
  75. package/dist/esm/anyspend/react/components/common/TransferCryptoDetails.d.ts +2 -0
  76. package/dist/esm/anyspend/react/components/common/TransferCryptoDetails.js +3 -2
  77. package/dist/esm/anyspend/react/components/common/WarningText.d.ts +8 -7
  78. package/dist/esm/anyspend/react/components/common/WarningText.js +5 -6
  79. package/dist/esm/anyspend/react/components/index.d.ts +1 -0
  80. package/dist/esm/anyspend/react/components/types/classes.d.ts +390 -0
  81. package/dist/esm/anyspend/react/components/types/classes.js +5 -0
  82. package/dist/esm/global-account/react/stores/useModalStore.d.ts +3 -0
  83. package/dist/types/anyspend/react/components/AnySpend.d.ts +3 -0
  84. package/dist/types/anyspend/react/components/AnySpendCustomExactIn.d.ts +3 -0
  85. package/dist/types/anyspend/react/components/AnySpendDeposit.d.ts +4 -1
  86. package/dist/types/anyspend/react/components/QRDeposit.d.ts +4 -1
  87. package/dist/types/anyspend/react/components/common/CryptoPaySection.d.ts +3 -1
  88. package/dist/types/anyspend/react/components/common/CryptoPaymentMethod.d.ts +3 -1
  89. package/dist/types/anyspend/react/components/common/CryptoReceiveSection.d.ts +3 -1
  90. package/dist/types/anyspend/react/components/common/FeeDetailPanel.d.ts +3 -1
  91. package/dist/types/anyspend/react/components/common/FiatPaymentMethod.d.ts +3 -1
  92. package/dist/types/anyspend/react/components/common/OrderDetails.d.ts +3 -0
  93. package/dist/types/anyspend/react/components/common/OrderDetailsCollapsible.d.ts +2 -0
  94. package/dist/types/anyspend/react/components/common/PanelOnramp.d.ts +3 -1
  95. package/dist/types/anyspend/react/components/common/PanelOnrampPayment.d.ts +2 -0
  96. package/dist/types/anyspend/react/components/common/PointsDetailPanel.d.ts +3 -1
  97. package/dist/types/anyspend/react/components/common/RecipientSelection.d.ts +6 -1
  98. package/dist/types/anyspend/react/components/common/TabSection.d.ts +3 -1
  99. package/dist/types/anyspend/react/components/common/TransferCryptoDetails.d.ts +2 -0
  100. package/dist/types/anyspend/react/components/common/WarningText.d.ts +8 -7
  101. package/dist/types/anyspend/react/components/index.d.ts +1 -0
  102. package/dist/types/anyspend/react/components/types/classes.d.ts +390 -0
  103. package/dist/types/global-account/react/stores/useModalStore.d.ts +3 -0
  104. package/package.json +1 -1
  105. package/src/anyspend/react/components/AnySpend.tsx +41 -20
  106. package/src/anyspend/react/components/AnySpendCustomExactIn.tsx +31 -13
  107. package/src/anyspend/react/components/AnySpendDeposit.tsx +171 -52
  108. package/src/anyspend/react/components/QRDeposit.tsx +91 -35
  109. package/src/anyspend/react/components/common/CryptoPaySection.tsx +31 -19
  110. package/src/anyspend/react/components/common/CryptoPaymentMethod.tsx +14 -4
  111. package/src/anyspend/react/components/common/CryptoReceiveSection.tsx +43 -23
  112. package/src/anyspend/react/components/common/FeeDetailPanel.tsx +53 -32
  113. package/src/anyspend/react/components/common/FiatPaymentMethod.tsx +26 -13
  114. package/src/anyspend/react/components/common/OrderDetails.tsx +16 -3
  115. package/src/anyspend/react/components/common/OrderDetailsCollapsible.tsx +5 -1
  116. package/src/anyspend/react/components/common/OrderHistory.tsx +2 -1
  117. package/src/anyspend/react/components/common/PanelOnramp.tsx +4 -1
  118. package/src/anyspend/react/components/common/PanelOnrampPayment.tsx +118 -40
  119. package/src/anyspend/react/components/common/PointsDetailPanel.tsx +28 -14
  120. package/src/anyspend/react/components/common/RecipientSelection.tsx +20 -5
  121. package/src/anyspend/react/components/common/TabSection.tsx +21 -12
  122. package/src/anyspend/react/components/common/TransferCryptoDetails.tsx +12 -4
  123. package/src/anyspend/react/components/common/WarningText.tsx +10 -10
  124. package/src/anyspend/react/components/index.ts +16 -0
  125. package/src/anyspend/react/components/types/classes.ts +476 -0
  126. package/src/global-account/react/stores/useModalStore.ts +3 -0
@@ -12,6 +12,7 @@ import {
12
12
  } from "@b3dotfun/sdk/global-account/react";
13
13
  import { cn } from "@b3dotfun/sdk/shared/utils/cn";
14
14
  import { formatUnits } from "@b3dotfun/sdk/shared/utils/number";
15
+ import type { AnySpendCustomExactInClasses } from "./types/classes";
15
16
  import invariant from "invariant";
16
17
  import { ArrowDown, Loader2 } from "lucide-react";
17
18
  import { motion } from "motion/react";
@@ -74,6 +75,8 @@ export interface AnySpendCustomExactInProps {
74
75
  customRecipientLabel?: string;
75
76
  /** Custom label for the return home button (overrides "Return to Home" / "Close") */
76
77
  returnHomeLabel?: string;
78
+ /** Custom class names for styling specific elements */
79
+ classes?: AnySpendCustomExactInClasses;
77
80
  }
78
81
 
79
82
  export function AnySpendCustomExactIn(props: AnySpendCustomExactInProps) {
@@ -108,6 +111,7 @@ function AnySpendCustomExactInInner({
108
111
  returnToHomeUrl,
109
112
  customRecipientLabel,
110
113
  returnHomeLabel,
114
+ classes,
111
115
  }: AnySpendCustomExactInProps) {
112
116
  const actionLabel = customExactInConfig?.action ?? "Custom Execution";
113
117
 
@@ -327,7 +331,12 @@ function AnySpendCustomExactInInner({
327
331
  );
328
332
 
329
333
  const mainView = (
330
- <div className="anyspend-custom-exact-in-container mx-auto flex w-[460px] max-w-full flex-col items-center gap-2">
334
+ <div
335
+ className={
336
+ classes?.container ||
337
+ "anyspend-custom-exact-in-container mx-auto flex w-[460px] max-w-full flex-col items-center gap-2"
338
+ }
339
+ >
331
340
  {headerContent}
332
341
 
333
342
  <div className="relative flex w-full max-w-[calc(100vw-32px)] flex-col gap-2">
@@ -382,9 +391,10 @@ function AnySpendCustomExactInInner({
382
391
  >
383
392
  <Button
384
393
  variant="ghost"
385
- className={cn(
386
- "swap-direction-button border-as-stroke bg-as-surface-primary z-10 h-10 w-10 cursor-default rounded-xl border-2 sm:h-8 sm:w-8 sm:rounded-xl",
387
- )}
394
+ className={
395
+ classes?.swapDirectionButton ||
396
+ "swap-direction-button border-as-stroke bg-as-surface-primary z-10 h-10 w-10 cursor-default rounded-xl border-2 sm:h-8 sm:w-8 sm:rounded-xl"
397
+ }
388
398
  >
389
399
  <div className="relative flex items-center justify-center transition-opacity">
390
400
  <ArrowDown className="text-as-primary/50 h-5 w-5" />
@@ -430,10 +440,15 @@ function AnySpendCustomExactInInner({
430
440
  accentColor={"hsl(var(--as-brand))"}
431
441
  disabled={btnInfo.disable}
432
442
  onClick={onMainButtonClick}
433
- className={cn(
434
- "as-main-button relative w-full",
435
- btnInfo.error ? "!bg-as-red" : btnInfo.disable ? "!bg-as-on-surface-2" : "!bg-as-brand",
436
- )}
443
+ className={
444
+ (btnInfo.error && classes?.mainButtonError) ||
445
+ (btnInfo.disable && classes?.mainButtonDisabled) ||
446
+ classes?.mainButton ||
447
+ cn(
448
+ "as-main-button relative w-full",
449
+ btnInfo.error ? "!bg-as-red" : btnInfo.disable ? "!bg-as-on-surface-2" : "!bg-as-brand",
450
+ )
451
+ }
437
452
  textClassName={cn(btnInfo.error ? "text-white" : btnInfo.disable ? "text-as-secondary" : "text-white")}
438
453
  >
439
454
  <div className="flex items-center justify-center gap-2">
@@ -445,7 +460,7 @@ function AnySpendCustomExactInInner({
445
460
 
446
461
  {/* Gas indicator - show when source chain has gas data */}
447
462
  {gasPriceData && !isLoadingGas && paymentType === "crypto" && (
448
- <GasIndicator gasPrice={gasPriceData} className="mt-2 w-full" />
463
+ <GasIndicator gasPrice={gasPriceData} className={classes?.gasIndicator || "mt-2 w-full"} />
449
464
  )}
450
465
 
451
466
  {mainFooter ? mainFooter : null}
@@ -628,10 +643,13 @@ function AnySpendCustomExactInInner({
628
643
  return (
629
644
  <StyleRoot>
630
645
  <div
631
- className={cn(
632
- "anyspend-container font-inter bg-as-surface-primary mx-auto w-full max-w-[460px] p-6",
633
- mode === "page" && "border-as-border-secondary overflow-hidden rounded-2xl border shadow-xl",
634
- )}
646
+ className={
647
+ classes?.root ||
648
+ cn(
649
+ "anyspend-container font-inter bg-as-surface-primary mx-auto w-full max-w-[460px] p-6",
650
+ mode === "page" && "border-as-border-secondary overflow-hidden rounded-2xl border shadow-xl",
651
+ )
652
+ }
635
653
  >
636
654
  <TransitionPanel
637
655
  activeIndex={
@@ -18,6 +18,7 @@ import { ChainWarningText } from "./common/WarningText";
18
18
  import { CreditCardIcon } from "./icons/CreditCardIcon";
19
19
  import { QrCodeIcon } from "./icons/QrCodeIcon";
20
20
  import { QRDeposit } from "./QRDeposit";
21
+ import type { AnySpendAllClasses } from "./types/classes";
21
22
 
22
23
  export interface DepositContractConfig {
23
24
  /** Custom function ABI JSON string */
@@ -116,6 +117,8 @@ export interface AnySpendDepositProps {
116
117
  * Defaults to false.
117
118
  */
118
119
  isCustomDeposit?: boolean;
120
+ /** Custom class names for styling specific elements */
121
+ classes?: AnySpendAllClasses;
119
122
  }
120
123
 
121
124
  // Default supported chains
@@ -238,7 +241,10 @@ export function AnySpendDeposit({
238
241
  customRecipientLabel,
239
242
  returnHomeLabel,
240
243
  isCustomDeposit = false,
244
+ classes,
241
245
  }: AnySpendDepositProps) {
246
+ // Extract deposit-specific classes for convenience
247
+ const depositClasses = classes?.deposit;
242
248
  const { connectedEOAWallet } = useAccountWallet();
243
249
  const eoaAddress = connectedEOAWallet?.getAccount()?.address;
244
250
 
@@ -368,16 +374,22 @@ export function AnySpendDeposit({
368
374
  if (step === "select-chain") {
369
375
  return (
370
376
  <div
371
- className={cn(
372
- "anyspend-deposit anyspend-deposit-chain-selection font-inter bg-as-surface-primary relative mx-auto w-full max-w-[460px]",
373
- mode === "page" && "border-as-border-secondary overflow-hidden rounded-2xl border shadow-xl",
374
- )}
377
+ className={
378
+ depositClasses?.chainSelection ||
379
+ cn(
380
+ "anyspend-deposit anyspend-deposit-chain-selection font-inter bg-as-surface-primary relative mx-auto w-full max-w-[460px]",
381
+ mode === "page" && "border-as-border-secondary overflow-hidden rounded-2xl border shadow-xl",
382
+ )
383
+ }
375
384
  >
376
385
  {/* Close button */}
377
386
  {onClose && (
378
387
  <button
379
388
  onClick={onClose}
380
- className="anyspend-deposit-close-button text-as-secondary hover:text-as-primary absolute right-4 top-4 z-10"
389
+ className={
390
+ depositClasses?.closeButton ||
391
+ "anyspend-deposit-close-button text-as-secondary hover:text-as-primary absolute right-4 top-4 z-10"
392
+ }
381
393
  >
382
394
  <svg className="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
383
395
  <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M6 18L18 6M6 6l12 12" />
@@ -386,19 +398,35 @@ export function AnySpendDeposit({
386
398
  )}
387
399
  {/* Balance header */}
388
400
  {!isBalanceLoading && totalBalance > 0 && (
389
- <div className="anyspend-deposit-balance border-theme-border-secondary border-b p-5">
390
- <p className="anyspend-deposit-balance-label text-as-secondary text-sm">Your Balance</p>
391
- <p className="anyspend-deposit-balance-value text-as-primary text-3xl font-semibold">
401
+ <div
402
+ className={
403
+ depositClasses?.balanceContainer || "anyspend-deposit-balance border-theme-border-secondary border-b p-5"
404
+ }
405
+ >
406
+ <p className={depositClasses?.balanceLabel || "anyspend-deposit-balance-label text-as-secondary text-sm"}>
407
+ Your Balance
408
+ </p>
409
+ <p
410
+ className={
411
+ depositClasses?.balanceValue || "anyspend-deposit-balance-value text-as-primary text-3xl font-semibold"
412
+ }
413
+ >
392
414
  {formatDecimal(totalBalance)} <span className="text-sm">USD</span>
393
415
  </p>
394
416
  </div>
395
417
  )}
396
- <div className="anyspend-deposit-options flex flex-col gap-2 p-6">
418
+ <div className={depositClasses?.optionsContainer || "anyspend-deposit-options flex flex-col gap-2 p-6"}>
397
419
  {/* Loading state */}
398
420
  {isBalanceLoading && (
399
- <div className="anyspend-deposit-chains-skeleton flex flex-col gap-2">
421
+ <div className={depositClasses?.chainsSkeleton || "anyspend-deposit-chains-skeleton flex flex-col gap-2"}>
400
422
  {[1, 2].map((_, i) => (
401
- <div key={i} className="border-border-primary flex items-center justify-between rounded-xl border p-4">
423
+ <div
424
+ key={i}
425
+ className={
426
+ depositClasses?.skeletonItem ||
427
+ "border-border-primary flex items-center justify-between rounded-xl border p-4"
428
+ }
429
+ >
402
430
  <div className="flex items-center gap-3">
403
431
  <Skeleton className="h-6 w-6 rounded-full" />
404
432
  <div className="flex flex-col gap-1">
@@ -414,93 +442,163 @@ export function AnySpendDeposit({
414
442
 
415
443
  {/* Top chains with balance */}
416
444
  {topChainsWithBalance.length > 0 && (
417
- <div className="anyspend-deposit-chains flex flex-col gap-2">
445
+ <div className={depositClasses?.chainsContainer || "anyspend-deposit-chains flex flex-col gap-2"}>
418
446
  {topChainsWithBalance.map(chain => (
419
447
  <button
420
448
  key={chain.id}
421
449
  onClick={() => handleSelectChain(chain.id)}
422
- className="anyspend-deposit-chain-button border-border-primary hover:border-as-brand hover:bg-as-surface-secondary flex w-full items-center justify-between rounded-xl border p-4 text-left shadow-sm transition-all"
450
+ className={
451
+ depositClasses?.chainButton ||
452
+ "anyspend-deposit-chain-button border-border-primary hover:border-as-brand hover:bg-as-surface-secondary flex w-full items-center justify-between rounded-xl border p-4 text-left shadow-sm transition-all"
453
+ }
423
454
  >
424
- <div className="anyspend-deposit-chain-content">
425
- <div className="anyspend-deposit-chain-info">
426
- <span className="anyspend-deposit-chain-name text-as-primary flex items-center gap-1.5 font-medium">
455
+ <div className={depositClasses?.chainContent || "anyspend-deposit-chain-content"}>
456
+ <div className={depositClasses?.chainInfo || "anyspend-deposit-chain-info"}>
457
+ <span
458
+ className={
459
+ depositClasses?.chainName ||
460
+ "anyspend-deposit-chain-name text-as-primary flex items-center gap-1.5 font-medium"
461
+ }
462
+ >
427
463
  Deposit from {chain.name}
428
- <ChainIcon chainId={chain.id} className="h-5 w-5" />
464
+ <ChainIcon chainId={chain.id} className={depositClasses?.chainIcon || "h-5 w-5"} />
429
465
  </span>
430
- <p className="anyspend-deposit-chain-balance text-as-secondary text-xs">
466
+ <p
467
+ className={
468
+ depositClasses?.chainBalance || "anyspend-deposit-chain-balance text-as-secondary text-xs"
469
+ }
470
+ >
431
471
  {formatUsd(chain.balance)} available
432
472
  </p>
433
473
  </div>
434
474
  </div>
435
- <ChevronRight className="anyspend-deposit-chain-chevron text-as-secondary h-5 w-5" />
475
+ <ChevronRight
476
+ className={
477
+ depositClasses?.chainChevron || "anyspend-deposit-chain-chevron text-as-secondary h-5 w-5"
478
+ }
479
+ />
436
480
  </button>
437
481
  ))}
438
482
  </div>
439
483
  )}
440
484
 
441
485
  {/* General deposit options */}
442
- <div className="anyspend-deposit-general-options flex flex-col gap-2">
486
+ <div className={depositClasses?.generalOptions || "anyspend-deposit-general-options flex flex-col gap-2"}>
443
487
  {/* Deposit Crypto - any chain */}
444
488
  <button
445
489
  onClick={handleSelectCrypto}
446
- className="anyspend-deposit-option-button anyspend-deposit-crypto-button border-border-primary hover:border-as-brand hover:bg-as-surface-secondary flex w-full items-center justify-between rounded-xl border p-4 text-left shadow-sm transition-all"
490
+ className={
491
+ depositClasses?.cryptoButton ||
492
+ "anyspend-deposit-option-button anyspend-deposit-crypto-button border-border-primary hover:border-as-brand hover:bg-as-surface-secondary flex w-full items-center justify-between rounded-xl border p-4 text-left shadow-sm transition-all"
493
+ }
447
494
  >
448
- <div className="anyspend-deposit-option-content">
449
- <div className="anyspend-deposit-option-info">
450
- <span className="anyspend-deposit-option-title text-as-primary font-medium">Deposit Crypto</span>
451
- <p className="anyspend-deposit-option-description text-as-secondary text-xs">
495
+ <div className={depositClasses?.optionContent || "anyspend-deposit-option-content"}>
496
+ <div className={depositClasses?.optionInfo || "anyspend-deposit-option-info"}>
497
+ <span
498
+ className={
499
+ depositClasses?.optionTitle || "anyspend-deposit-option-title text-as-primary font-medium"
500
+ }
501
+ >
502
+ Deposit Crypto
503
+ </span>
504
+ <p
505
+ className={
506
+ depositClasses?.optionDescription ||
507
+ "anyspend-deposit-option-description text-as-secondary text-xs"
508
+ }
509
+ >
452
510
  Swap from any token on any chain
453
511
  </p>
454
512
  </div>
455
513
  </div>
456
- <ChevronRight className="anyspend-deposit-option-chevron text-as-secondary h-5 w-5" />
514
+ <ChevronRight
515
+ className={depositClasses?.optionChevron || "anyspend-deposit-option-chevron text-as-secondary h-5 w-5"}
516
+ />
457
517
  </button>
458
518
 
459
- <div className="anyspend-deposit-divider flex items-center gap-3">
460
- <div className="bg-as-stroke h-px flex-1" />
461
- <span className="anyspend-deposit-divider-text text-as-secondary text-sm">More options</span>
462
- <div className="bg-as-stroke h-px flex-1" />
519
+ <div className={depositClasses?.divider || "anyspend-deposit-divider flex items-center gap-3"}>
520
+ <div className={depositClasses?.dividerLine || "bg-as-stroke h-px flex-1"} />
521
+ <span
522
+ className={depositClasses?.dividerText || "anyspend-deposit-divider-text text-as-secondary text-sm"}
523
+ >
524
+ More options
525
+ </span>
526
+ <div className={depositClasses?.dividerLine || "bg-as-stroke h-px flex-1"} />
463
527
  </div>
464
528
 
465
529
  {/* Deposit with QR Code */}
466
530
  <button
467
531
  onClick={handleSelectQrDeposit}
468
- className="anyspend-deposit-option-button anyspend-deposit-qr-button border-border-primary hover:border-as-brand hover:bg-as-surface-secondary flex w-full items-center justify-between rounded-xl border p-4 text-left shadow-sm transition-all"
532
+ className={
533
+ depositClasses?.qrButton ||
534
+ "anyspend-deposit-option-button anyspend-deposit-qr-button border-border-primary hover:border-as-brand hover:bg-as-surface-secondary flex w-full items-center justify-between rounded-xl border p-4 text-left shadow-sm transition-all"
535
+ }
469
536
  >
470
- <div className="anyspend-deposit-option-content flex items-center gap-3">
471
- <QrCodeIcon className="anyspend-deposit-option-icon h-10 w-10" />
472
- <div className="anyspend-deposit-option-info">
473
- <span className="anyspend-deposit-option-title text-as-primary font-medium">
537
+ <div
538
+ className={depositClasses?.optionContent || "anyspend-deposit-option-content flex items-center gap-3"}
539
+ >
540
+ <QrCodeIcon className={depositClasses?.optionIcon || "anyspend-deposit-option-icon h-10 w-10"} />
541
+ <div className={depositClasses?.optionInfo || "anyspend-deposit-option-info"}>
542
+ <span
543
+ className={
544
+ depositClasses?.optionTitle || "anyspend-deposit-option-title text-as-primary font-medium"
545
+ }
546
+ >
474
547
  Deposit with QR Code
475
548
  </span>
476
- <p className="anyspend-deposit-option-description text-as-secondary text-xs">
549
+ <p
550
+ className={
551
+ depositClasses?.optionDescription ||
552
+ "anyspend-deposit-option-description text-as-secondary text-xs"
553
+ }
554
+ >
477
555
  Send tokens directly to deposit address
478
556
  </p>
479
557
  </div>
480
558
  </div>
481
- <ChevronRight className="anyspend-deposit-option-chevron text-as-secondary h-5 w-5" />
559
+ <ChevronRight
560
+ className={depositClasses?.optionChevron || "anyspend-deposit-option-chevron text-as-secondary h-5 w-5"}
561
+ />
482
562
  </button>
483
563
 
484
564
  {/* Fund with Fiat */}
485
565
  <button
486
566
  onClick={handleSelectFiat}
487
- className="anyspend-deposit-option-button anyspend-deposit-fiat-button border-border-primary hover:border-as-brand hover:bg-as-surface-secondary flex w-full items-center justify-between rounded-xl border p-4 text-left transition-all"
567
+ className={
568
+ depositClasses?.fiatButton ||
569
+ "anyspend-deposit-option-button anyspend-deposit-fiat-button border-border-primary hover:border-as-brand hover:bg-as-surface-secondary flex w-full items-center justify-between rounded-xl border p-4 text-left transition-all"
570
+ }
488
571
  >
489
- <div className="anyspend-deposit-option-content flex items-center gap-3">
490
- <CreditCardIcon className="anyspend-deposit-option-icon h-10 w-10" />
491
- <div className="anyspend-deposit-option-info">
492
- <span className="anyspend-deposit-option-title text-as-primary font-medium">Fund with Fiat</span>
493
- <p className="anyspend-deposit-option-description text-as-secondary text-xs">
572
+ <div
573
+ className={depositClasses?.optionContent || "anyspend-deposit-option-content flex items-center gap-3"}
574
+ >
575
+ <CreditCardIcon className={depositClasses?.optionIcon || "anyspend-deposit-option-icon h-10 w-10"} />
576
+ <div className={depositClasses?.optionInfo || "anyspend-deposit-option-info"}>
577
+ <span
578
+ className={
579
+ depositClasses?.optionTitle || "anyspend-deposit-option-title text-as-primary font-medium"
580
+ }
581
+ >
582
+ Fund with Fiat
583
+ </span>
584
+ <p
585
+ className={
586
+ depositClasses?.optionDescription ||
587
+ "anyspend-deposit-option-description text-as-secondary text-xs"
588
+ }
589
+ >
494
590
  Pay with card or bank transfer
495
591
  </p>
496
592
  </div>
497
593
  </div>
498
- <ChevronRight className="anyspend-deposit-option-chevron text-as-secondary h-5 w-5" />
594
+ <ChevronRight
595
+ className={depositClasses?.optionChevron || "anyspend-deposit-option-chevron text-as-secondary h-5 w-5"}
596
+ />
499
597
  </button>
500
598
  </div>
501
599
 
502
600
  {/* Chain-specific warning */}
503
- <ChainWarningText chainId={destinationTokenChainId} className="mt-2" />
601
+ <ChainWarningText chainId={destinationTokenChainId} classes={classes?.chainWarningText || { root: "mt-2" }} />
504
602
  </div>
505
603
  </div>
506
604
  );
@@ -517,23 +615,32 @@ export function AnySpendDeposit({
517
615
  depositContractConfig={depositContractConfig}
518
616
  onBack={handleBack}
519
617
  onClose={onClose ?? handleBack}
618
+ classes={classes?.qrDeposit}
520
619
  />
521
620
  );
522
621
  }
523
622
 
524
623
  // Deposit view
525
624
  return (
526
- <div className="anyspend-deposit anyspend-deposit-form relative">
625
+ <div className={depositClasses?.form || "anyspend-deposit anyspend-deposit-form relative"}>
527
626
  {/* Back button - only show if we came from chain selection */}
528
627
  {shouldShowChainSelection && (
529
628
  <button
530
629
  onClick={handleBack}
531
- className="anyspend-deposit-back-button text-as-secondary hover:text-as-primary absolute left-4 top-4 z-10 flex items-center gap-1"
630
+ className={
631
+ depositClasses?.backButton ||
632
+ "anyspend-deposit-back-button text-as-secondary hover:text-as-primary absolute left-4 top-4 z-10 flex items-center gap-1"
633
+ }
532
634
  >
533
- <svg className="anyspend-deposit-back-icon h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
635
+ <svg
636
+ className={depositClasses?.backIcon || "anyspend-deposit-back-icon h-5 w-5"}
637
+ fill="none"
638
+ viewBox="0 0 24 24"
639
+ stroke="currentColor"
640
+ >
534
641
  <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M15 19l-7-7 7-7" />
535
642
  </svg>
536
- <span className="anyspend-deposit-back-text text-sm">Back</span>
643
+ <span className={depositClasses?.backText || "anyspend-deposit-back-text text-sm"}>Back</span>
537
644
  </button>
538
645
  )}
539
646
 
@@ -541,7 +648,10 @@ export function AnySpendDeposit({
541
648
  {onClose && (
542
649
  <button
543
650
  onClick={onClose}
544
- className="anyspend-deposit-close-button text-as-secondary hover:text-as-primary absolute right-4 top-4 z-10"
651
+ className={
652
+ depositClasses?.closeButton ||
653
+ "anyspend-deposit-close-button text-as-secondary hover:text-as-primary absolute right-4 top-4 z-10"
654
+ }
545
655
  >
546
656
  <svg className="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
547
657
  <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M6 18L18 6M6 6l12 12" />
@@ -549,7 +659,11 @@ export function AnySpendDeposit({
549
659
  </button>
550
660
  )}
551
661
 
552
- <div className={cn("anyspend-deposit-form-content", shouldShowChainSelection && "pt-8")}>
662
+ <div
663
+ className={
664
+ depositClasses?.formContent || cn("anyspend-deposit-form-content", shouldShowChainSelection && "pt-8")
665
+ }
666
+ >
553
667
  {isCustomDeposit ? (
554
668
  <AnySpendCustomExactIn
555
669
  key={selectedChainId}
@@ -574,6 +688,7 @@ export function AnySpendDeposit({
574
688
  returnToHomeUrl={returnToHomeUrl}
575
689
  customRecipientLabel={customRecipientLabel}
576
690
  returnHomeLabel={returnHomeLabel}
691
+ classes={classes?.customExactIn}
577
692
  />
578
693
  ) : (
579
694
  <AnySpend
@@ -594,12 +709,16 @@ export function AnySpendDeposit({
594
709
  returnToHomeUrl={returnToHomeUrl}
595
710
  customRecipientLabel={customRecipientLabel}
596
711
  returnHomeLabel={returnHomeLabel}
712
+ classes={classes?.anySpend}
597
713
  />
598
714
  )}
599
715
  </div>
600
716
 
601
717
  {/* Chain-specific warning */}
602
- <ChainWarningText chainId={destinationTokenChainId} className="px-4 pb-4" />
718
+ <ChainWarningText
719
+ chainId={destinationTokenChainId}
720
+ classes={classes?.chainWarningText || { root: "px-4 pb-4" }}
721
+ />
603
722
  </div>
604
723
  );
605
724
  }