@funkit/connect 8.3.1-next.0 → 8.4.0
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/CHANGELOG.md +125 -0
- package/dist/{chunk-5JRQC2VM.js → chunk-4WY7FNYP.js} +14 -0
- package/dist/{chunk-CUWQELX3.js → chunk-UUHLEWAL.js} +4 -2
- package/dist/{chunk-VWSYBHAK.js → chunk-Z4QDKBBG.js} +4 -2
- package/dist/clients/fanatics.css +4064 -3651
- package/dist/clients/fanatics.d.ts +6 -0
- package/dist/clients/fanatics.js +118 -43
- package/dist/components/Box/Box.d.ts +45 -45
- package/dist/components/FunCheckoutHistory/FunDirectExecutionHistoryBottomBar.d.ts +1 -0
- package/dist/components/FunCheckoutHistory/FunTxSummarySections.d.ts +7 -0
- package/dist/components/FunCheckoutHistory/TotalTimeItem.d.ts +6 -0
- package/dist/components/FunCheckoutHistory/YouSendItem.d.ts +6 -0
- package/dist/components/FunCheckoutHistory/useCustomStatusAnimationAboveTopbar.d.ts +1 -3
- package/dist/components/FunCheckoutModalHeightAnimationWrapper/FunCheckoutModalHeightAnimationWrapper.d.ts +3 -1
- package/dist/components/FunInfoBanner/InfoBanner.d.ts +1 -1
- package/dist/components/FunPaymentMethodItem/FunPaymentMethodItem.d.ts +1 -0
- package/dist/components/FunPayments/FunPaymentMethods.d.ts +7 -0
- package/dist/components/Icons/New/CircleBitcoinIcon.d.ts +4 -0
- package/dist/components/Icons/New/DollarIcon.d.ts +3 -1
- package/dist/components/Tabs/Tabs.d.ts +1 -0
- package/dist/consts/customers.d.ts +1 -1
- package/dist/consts/layout.d.ts +0 -1
- package/dist/css/sprinkles.css.d.ts +91 -45
- package/dist/domains/asset.d.ts +1 -1
- package/dist/domains/meld.d.ts +0 -6
- package/dist/hooks/queries/useFops.d.ts +4 -2
- package/dist/hooks/queries/useSwappedDefaultCurrency.d.ts +5 -0
- package/dist/hooks/track/CheckoutModalEvent.d.ts +7 -0
- package/dist/hooks/useCheckoutDirectExecutionHistory.d.ts +1 -0
- package/dist/hooks/useStepQueryReadiness.d.ts +32 -0
- package/dist/index.css +4090 -3671
- package/dist/index.js +3894 -3058
- package/dist/modals/CheckoutModal/ConfirmationStep/useCheckoutConfirmation.d.ts +1 -0
- package/dist/modals/CheckoutModal/FunCheckoutStep.d.ts +2 -1
- package/dist/modals/CheckoutModal/LoadingAccount.d.ts +1 -1
- package/dist/modals/CheckoutModal/MeldQuotes/MeldQuotes.d.ts +1 -1
- package/dist/modals/CheckoutModal/SourceChange/CryptoCashToggle.d.ts +5 -1
- package/dist/modals/CheckoutModal/SourceChange/FormOfPaymentsList.d.ts +10 -0
- package/dist/modals/CheckoutModal/SourceChange/SourceChange.d.ts +10 -0
- package/dist/modals/CheckoutModal/SourceChange/SourceChangeLoading.d.ts +4 -0
- package/dist/modals/CheckoutModal/SourceChange/{DefaultSourceList.d.ts → SourceList.d.ts} +3 -3
- package/dist/modals/CheckoutModal/SourceChange/sourceChange.css.d.ts +2 -1
- package/dist/modals/CheckoutModal/stepTransition.d.ts +7 -0
- package/dist/providers/FunkitCheckoutContext/index.d.ts +1 -0
- package/dist/providers/FunkitConfigContext.d.ts +14 -0
- package/dist/providers/FunkitProvider.d.ts +1 -0
- package/dist/providers/FunkitThemeProvider.d.ts +69 -0
- package/dist/themes/baseTheme.js +1 -1
- package/dist/themes/darkTheme.js +2 -2
- package/dist/themes/lightTheme.js +2 -2
- package/dist/utils/across.d.ts +5 -0
- package/dist/utils/depositCutoff.d.ts +9 -0
- package/dist/utils/directExecution.d.ts +16 -0
- package/dist/utils/flags/config.d.ts +2 -2
- package/dist/utils/lighter.d.ts +1 -1
- package/dist/utils/sanitizeHtml.d.ts +7 -0
- package/dist/utils/sanitizeUrl.d.ts +10 -0
- package/dist/utils/tokenIconUrl.d.ts +1 -1
- package/dist/utils/transfer.d.ts +2 -1
- package/dist/wallets/walletConnectors/index.js +24 -24
- package/package.json +4 -4
- package/dist/atoms/activeCheckout.d.ts +0 -183
- package/dist/atoms/activeWithdrawal.d.ts +0 -21
- package/dist/atoms/bridgeProviders/acrossAdapter.d.ts +0 -109
- package/dist/atoms/bridgeProviders/index.d.ts +0 -25
- package/dist/atoms/bridgeProviders/registry.d.ts +0 -12
- package/dist/atoms/bridgeProviders/relayAdapter.d.ts +0 -60
- package/dist/atoms/bridgeProviders/types.d.ts +0 -182
- package/dist/atoms/checkoutProgress.d.ts +0 -22
- package/dist/atoms/directExecution.d.ts +0 -70
- package/dist/atoms/funkitCheckout.d.ts +0 -18
- package/dist/atoms/funkitProvider/index.d.ts +0 -24
- package/dist/atoms/generalWallet.d.ts +0 -45
- package/dist/atoms/i18n.d.ts +0 -6
- package/dist/atoms/modalState.d.ts +0 -30
- package/dist/atoms/quote.d.ts +0 -98
- package/dist/atoms/stepTransition.d.ts +0 -6
- package/dist/atoms/store.d.ts +0 -1
- package/dist/atoms/track/index.d.ts +0 -10
- package/dist/atoms/utils.d.ts +0 -2
- package/dist/atoms/wagmi.d.ts +0 -4
- package/dist/atoms/walletClient.d.ts +0 -15391
- package/dist/chunk-A24XIU2M.js +0 -299
- package/dist/chunk-CMS4F5PL.js +0 -209
- package/dist/chunk-FBCU3TQA.js +0 -204
- package/dist/chunk-GRQP5R23.js +0 -209
- package/dist/chunk-MGQZMUZ2.js +0 -288
- package/dist/chunk-OTMBU2BL.js +0 -204
- package/dist/domains/across.d.ts +0 -29
- package/dist/domains/track.d.ts +0 -14
- package/dist/hooks/useUsableWalletAssetsForCheckout.d.ts +0 -2
- package/dist/modals/CheckoutModal/SelectAsset.d.ts +0 -14
- package/dist/modals/CheckoutModal/SourceChange/FanaticsSourceList.d.ts +0 -15
- package/dist/wallets/walletConnectors/chunk-3ZWIUCOI.js +0 -96
- package/dist/wallets/walletConnectors/chunk-4SC3PZVM.js +0 -70
- package/dist/wallets/walletConnectors/chunk-5AV2NSL3.js +0 -98
- package/dist/wallets/walletConnectors/chunk-5FWURLPF.js +0 -218
- package/dist/wallets/walletConnectors/chunk-6677RKVT.js +0 -69
- package/dist/wallets/walletConnectors/chunk-75A4Q5E5.js +0 -92
- package/dist/wallets/walletConnectors/chunk-ENLR4LXN.js +0 -94
- package/dist/wallets/walletConnectors/chunk-FT5BX7TL.js +0 -103
- package/dist/wallets/walletConnectors/chunk-GEMN6DM5.js +0 -106
- package/dist/wallets/walletConnectors/chunk-GXTI2PZD.js +0 -100
- package/dist/wallets/walletConnectors/chunk-LGT6IAXI.js +0 -93
- package/dist/wallets/walletConnectors/chunk-N7475PGA.js +0 -110
- package/dist/wallets/walletConnectors/chunk-O6YFVGVQ.js +0 -99
- package/dist/wallets/walletConnectors/chunk-OCM5YHT5.js +0 -92
- package/dist/wallets/walletConnectors/chunk-PRGCIJ7Y.js +0 -87
- package/dist/wallets/walletConnectors/chunk-RNIMZDHW.js +0 -95
- package/dist/wallets/walletConnectors/chunk-TLOROKED.js +0 -96
- package/dist/wallets/walletConnectors/chunk-WNQ3NPHX.js +0 -66
package/dist/chunk-FBCU3TQA.js
DELETED
|
@@ -1,204 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import {
|
|
3
|
-
baseTheme
|
|
4
|
-
} from "./chunk-MGQZMUZ2.js";
|
|
5
|
-
|
|
6
|
-
// src/themes/lightTheme.ts
|
|
7
|
-
var accentColors = {
|
|
8
|
-
blue: { accentColor: "#31A3F8", accentColorForeground: "#31A3F859" },
|
|
9
|
-
green: { accentColor: "#66CC00", accentColorForeground: "#FFF" },
|
|
10
|
-
orange: { accentColor: "#F6851B", accentColorForeground: "#FFF" },
|
|
11
|
-
pink: { accentColor: "#FF5CA0", accentColorForeground: "#FFF" },
|
|
12
|
-
purple: { accentColor: "#5F5AFA", accentColorForeground: "#FFF" },
|
|
13
|
-
red: { accentColor: "#F34126", accentColorForeground: "#FFF" },
|
|
14
|
-
white: { accentColor: "#000000", accentColorForeground: "#FFF" }
|
|
15
|
-
};
|
|
16
|
-
var defaultAccentColor = accentColors.white;
|
|
17
|
-
var lightTheme = ({
|
|
18
|
-
accentColor = defaultAccentColor.accentColor,
|
|
19
|
-
accentColorForeground = defaultAccentColor.accentColorForeground,
|
|
20
|
-
customColors,
|
|
21
|
-
customShadows,
|
|
22
|
-
...baseThemeOptions
|
|
23
|
-
} = {}) => ({
|
|
24
|
-
...baseTheme(baseThemeOptions),
|
|
25
|
-
colors: {
|
|
26
|
-
accentColor,
|
|
27
|
-
accentColorForeground,
|
|
28
|
-
actionButtonBorder: "rgba(0, 0, 0, 0.04)",
|
|
29
|
-
connectButtonBackground: "#FFF",
|
|
30
|
-
connectButtonBackgroundError: "#C60000",
|
|
31
|
-
connectButtonText: "#25292E",
|
|
32
|
-
connectButtonTextError: "#FFF",
|
|
33
|
-
connectionIndicator: "#30E000",
|
|
34
|
-
error: accentColors.red.accentColor,
|
|
35
|
-
errorBackground: "#F2E6E4",
|
|
36
|
-
errorBorder: "rgba(243, 65, 38, 0.2)",
|
|
37
|
-
generalBorder: "#F7F7F7",
|
|
38
|
-
// strokeColor in figma
|
|
39
|
-
generalBorderDim: "rgba(0, 0, 0, 0.03)",
|
|
40
|
-
menuItemBackground: "#FCFCFC",
|
|
41
|
-
selectedOptionBorder: "#F7F7F7",
|
|
42
|
-
focusedOptionBorder: "#737373",
|
|
43
|
-
standby: "#F6851B",
|
|
44
|
-
success: "#66CC00",
|
|
45
|
-
delayedStatusIcon: customColors?.secondaryText ?? "#737373",
|
|
46
|
-
// backward compatibility
|
|
47
|
-
chainIconBorder: "#fff",
|
|
48
|
-
// FUNKIT COLORS
|
|
49
|
-
// modal backgrounds
|
|
50
|
-
modalBackdrop: "rgba(0, 0, 0, 0.2)",
|
|
51
|
-
modalTopbarIcon: "#000",
|
|
52
|
-
modalBackground: "#FFF",
|
|
53
|
-
modalBorder: "#F7F7F7",
|
|
54
|
-
offBackground: "#F7F7F7",
|
|
55
|
-
offBackgroundInverse: "#333333",
|
|
56
|
-
hoverState: "#F0F0F0",
|
|
57
|
-
lightStroke: "#F7F7F7",
|
|
58
|
-
mediumStroke: "#F0F0F0",
|
|
59
|
-
heavyStroke: "#E5E5E5",
|
|
60
|
-
strokeColor: "#E8E8E8",
|
|
61
|
-
//Text
|
|
62
|
-
primaryText: "#000",
|
|
63
|
-
secondaryText: "#737373",
|
|
64
|
-
tertiaryText: "rgba(0, 0, 0, 0.35)",
|
|
65
|
-
textSelection: "rgba(0, 0, 0, 0.10)",
|
|
66
|
-
// input
|
|
67
|
-
inputBackground: "#FFFFFF",
|
|
68
|
-
inputBorderBase: "#F0F0F0",
|
|
69
|
-
inputBorderHover: "#E5E5E5",
|
|
70
|
-
// tab
|
|
71
|
-
activeTabBorderColor: "#F7F7F7",
|
|
72
|
-
activeTabBackground: "#F7F7F7",
|
|
73
|
-
// button
|
|
74
|
-
actionColor: "#000",
|
|
75
|
-
actionColorHover: "rgba(0, 0, 0, 0.7)",
|
|
76
|
-
actionColorDisabled: "rgba(0, 0, 0, 0.50)",
|
|
77
|
-
buttonPrimary: accentColor,
|
|
78
|
-
buttonDisabled: "#31A3F826",
|
|
79
|
-
buttonWarning: accentColors.red.accentColor,
|
|
80
|
-
buttonSuccess: "#2EA200",
|
|
81
|
-
buttonTextPrimary: "#FFFFFF",
|
|
82
|
-
buttonTextHover: "#FFF",
|
|
83
|
-
buttonTextDisabled: "#FFF",
|
|
84
|
-
transparent: "transparent",
|
|
85
|
-
buttonBackgroundTertiary: "#F7F7F7",
|
|
86
|
-
buttonBackgroundHoverTertiary: "#F0F0F0",
|
|
87
|
-
buttonBackgroundDisabledTertiary: "transparent",
|
|
88
|
-
buttonTextTertiary: "#000",
|
|
89
|
-
buttonTextDisabledTertiary: "rgba(0, 0, 0, 0.5)",
|
|
90
|
-
buttonBackground: "#000",
|
|
91
|
-
buttonBackgroundHover: "#333333",
|
|
92
|
-
buttonBackgroundPressed: "#000",
|
|
93
|
-
buttonBackgroundDisabled: "rgba(0, 0, 0, 0.5)",
|
|
94
|
-
buttonTextSecondaryDisabled: "rgba(0, 0, 0, 0.5)",
|
|
95
|
-
buttonTextSecondary: "#000000",
|
|
96
|
-
buttonIconBackgroundHover: "#F7F7F7",
|
|
97
|
-
buttonIconBackgroundPressed: "#F0F0F0",
|
|
98
|
-
buttonIconStroke: "rgba(0, 0, 0, 0.35)",
|
|
99
|
-
buttonBorderTertiary: "transparent",
|
|
100
|
-
buttonBorderFocusedTertiary: "rgba(0, 0, 0, 0.35)",
|
|
101
|
-
buttonFocusedOutline: "none",
|
|
102
|
-
buttonBorderGradient: "none",
|
|
103
|
-
buttonHoverBorderGradient: "none",
|
|
104
|
-
buttonDisabledBorderGradient: "none",
|
|
105
|
-
// TODO: Make common colors when refactoring the design system
|
|
106
|
-
inputAmountQuickOptionBaseBackground: "#F7F7F7",
|
|
107
|
-
inputAmountQuickOptionHoverBackground: "#F0F0F0",
|
|
108
|
-
inputAmountQuickOptionActiveBackground: "#F0F0F0",
|
|
109
|
-
inputAmountQuickOptionDisabledBackground: "#F7F7F7",
|
|
110
|
-
inputAmountQuickOptionBaseBorder: "#F7F7F7",
|
|
111
|
-
inputAmountQuickOptionHoverBorder: "rgba(0, 0, 0, 0.35)",
|
|
112
|
-
inputAmountQuickOptionActiveBorder: "rgba(0, 0, 0, 0.35)",
|
|
113
|
-
inputAmountQuickOptionFocusedBorder: "rgba(0, 0, 0, 0.35)",
|
|
114
|
-
inputAmountFiatDecimalsColor: customColors?.inputAmountFiatDecimalsColor ?? "none",
|
|
115
|
-
youPayYouReceiveBackground: "#FFF",
|
|
116
|
-
// modalBackground
|
|
117
|
-
youPayYouReceiveBorder: "#F0F0F0",
|
|
118
|
-
// mediumStroke
|
|
119
|
-
youPayYouReceivePrimaryText: "#000",
|
|
120
|
-
// primaryText
|
|
121
|
-
youPayYouReceiveSecondaryText: "#737373",
|
|
122
|
-
// secondaryText
|
|
123
|
-
// badges
|
|
124
|
-
badgeBackgroundSuccess: "rgba(124, 242, 136, 0.1)",
|
|
125
|
-
badgeBorderSuccess: "rgba(124, 242, 136, 0.2)",
|
|
126
|
-
badgeTextSuccess: "rgb(124, 242, 136)",
|
|
127
|
-
newBadgeBackground: "linear-gradient(180deg, #ECFFEA 0%, #E4FFE9 100%)",
|
|
128
|
-
newBadgeBorder: "rgba(122, 221, 122, 0.5)",
|
|
129
|
-
newBadgeText: "#028320",
|
|
130
|
-
approvedBadgeBackground: "linear-gradient(180deg, #ECFFEA 0%, #E4FFE9 100%)",
|
|
131
|
-
approvedBadgeBorder: "rgba(109, 216, 109, 0.5)",
|
|
132
|
-
approvedBadgeText: "#028320",
|
|
133
|
-
failedBadgeBackground: "rgba(255, 61, 61, 0.08)",
|
|
134
|
-
failedBadgeBorder: "rgba(0, 0, 0, 0.03)",
|
|
135
|
-
failedBadgeText: "#C2341E",
|
|
136
|
-
announceGradientFrom: "#595959",
|
|
137
|
-
announceGradientTo: "#9C9C9C",
|
|
138
|
-
fiatPendingGradientFrom: "#454545",
|
|
139
|
-
fiatPendingGradientTo: "#747474",
|
|
140
|
-
fiatSuccessBackgroundFill: "rgba(102, 204, 0, 0.16)",
|
|
141
|
-
fiatFailedBackgroundFill: "rgba(255, 61, 61, 0.12)",
|
|
142
|
-
fiatStatusIconBorder: "rgba(0, 0, 0, 0.03)",
|
|
143
|
-
fiatAccountIconFill: "#E7F3FE",
|
|
144
|
-
fiatAccountGradientFrom: "#055DF5",
|
|
145
|
-
fiatAccountGradientTo: "#4C8DFD",
|
|
146
|
-
modalHeaderDivider: "#F7F7F7",
|
|
147
|
-
// lightStroke
|
|
148
|
-
modalFooterDivider: "#F7F7F7",
|
|
149
|
-
// lightStroke
|
|
150
|
-
spinnerBackground: customColors?.mediumStroke ?? "rgba(255, 255, 255, 0.3)",
|
|
151
|
-
// 30% buttonTextPrimary
|
|
152
|
-
spinnerIndicator: customColors?.primaryText ?? "#FFF",
|
|
153
|
-
// 100% buttonTextPrimary
|
|
154
|
-
spinnerBackgroundVerifyAccount: "rgba(255, 255, 255, 0.3)",
|
|
155
|
-
// 30% buttonTextPrimary
|
|
156
|
-
spinnerIndicatorVerifyAccount: customColors?.primaryText ?? "#FFF",
|
|
157
|
-
// 100% buttonTextPrimary
|
|
158
|
-
// Override colors
|
|
159
|
-
...customColors || {},
|
|
160
|
-
// option Boxes
|
|
161
|
-
optionBoxBackground: customColors?.optionBoxBackground ?? customColors?.modalBackground ?? "#FFF",
|
|
162
|
-
// keeps gradient in SourcePaymentMethodItem if optionBoxBackground differs from modal background
|
|
163
|
-
optionBoxBackgroundUninteractive: customColors?.optionBoxBackgroundUninteractive ?? "transparent",
|
|
164
|
-
dropdownActiveItemBackgroundBase: customColors?.dropdownActiveItemBackgroundBase ?? customColors?.modalBackground ?? "#FFF",
|
|
165
|
-
dropdownActiveItemBackgroundHover: customColors?.dropdownActiveItemBackgroundHover ?? customColors?.offBackground ?? "#F7F7F7",
|
|
166
|
-
dropdownActiveItemBackgroundDisabled: customColors?.dropdownActiveItemBackgroundDisabled ?? "transparent",
|
|
167
|
-
txSummaryBoxBackground: customColors?.txSummaryBoxBackground ?? customColors?.modalBackground ?? "#FFF",
|
|
168
|
-
txSummaryBoxBorder: customColors?.txSummaryBoxBorder ?? customColors?.lightStroke ?? "#F7F7F7"
|
|
169
|
-
},
|
|
170
|
-
shadows: {
|
|
171
|
-
connectButton: "0px 4px 12px rgba(0, 0, 0, 0.1)",
|
|
172
|
-
dialog: "0px 8px 32px rgba(0, 0, 0, 0.32)",
|
|
173
|
-
selectedOption: "0px 2px 6px rgba(0, 0, 0, 0.24)",
|
|
174
|
-
selectedWallet: "0px 2px 6px rgba(0, 0, 0, 0.12)",
|
|
175
|
-
dropdown: "0px 0px 0px 1px rgba(0, 0, 0, 0.05), 0px 2px 6px 0px rgba(0, 0, 0, 0.03), 0px 4px 42px 0px rgba(0, 0, 0, 0.06)",
|
|
176
|
-
notification: "0px 0px 0px 1px rgba(0, 0, 0, 0.06), 0px 2px 6px 0px rgba(0, 0, 0, 0.05), 0px 4px 42px 0px rgba(0, 0, 0, 0.06)",
|
|
177
|
-
qrCode: "0px 0px 0px 1px rgba(0, 0, 0, 0.10), 0px 1px 4px 0px rgba(0, 0, 0, 0.04), 0px 4px 24px 0px rgba(8, 7, 7, 0.10)",
|
|
178
|
-
buttonShadow: "none",
|
|
179
|
-
buttonShadowTertiary: customShadows?.buttonShadow ?? "none",
|
|
180
|
-
buttonFocusedShadow: "0px 0px 0px 2px rgba(0, 0, 0, 0.25)",
|
|
181
|
-
buttonFocusedShadowTertiary: "0px 0px 0px 2px rgba(0, 0, 0, 0.25)",
|
|
182
|
-
buttonHoverShadow: "none",
|
|
183
|
-
buttonHoverShadowTertiary: "none",
|
|
184
|
-
buttonDisabledShadow: "none",
|
|
185
|
-
buttonDisabledShadowTertiary: customShadows?.buttonDisabledShadow ?? "none",
|
|
186
|
-
buttonInnerShadow: "none",
|
|
187
|
-
buttonInnerShadowTertiary: customShadows?.buttonInnerShadow ?? "none",
|
|
188
|
-
buttonFocusedInnerShadow: "none",
|
|
189
|
-
buttonFocusedInnerShadowTertiary: customShadows?.buttonFocusedInnerShadow ?? "none",
|
|
190
|
-
buttonHoverInnerShadow: "none",
|
|
191
|
-
buttonHoverInnerShadowTertiary: customShadows?.buttonHoverInnerShadow ?? "none",
|
|
192
|
-
buttonDisabledInnerShadow: "none",
|
|
193
|
-
buttonDisabledInnerShadowTertiary: customShadows?.buttonDisabledInnerShadow ?? "none",
|
|
194
|
-
selectedDropdownItem: "none",
|
|
195
|
-
// Override shadows
|
|
196
|
-
...customShadows || {}
|
|
197
|
-
},
|
|
198
|
-
moonpayTheme: "light"
|
|
199
|
-
});
|
|
200
|
-
lightTheme.accentColors = accentColors;
|
|
201
|
-
|
|
202
|
-
export {
|
|
203
|
-
lightTheme
|
|
204
|
-
};
|
package/dist/chunk-GRQP5R23.js
DELETED
|
@@ -1,209 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import {
|
|
3
|
-
baseTheme
|
|
4
|
-
} from "./chunk-A24XIU2M.js";
|
|
5
|
-
|
|
6
|
-
// src/themes/darkTheme.ts
|
|
7
|
-
var accentColors = {
|
|
8
|
-
blue: { accentColor: "#3898FF", accentColorForeground: "#FFF" },
|
|
9
|
-
green: { accentColor: "#66CC00", accentColorForeground: "#000" },
|
|
10
|
-
orange: { accentColor: "#F6851B", accentColorForeground: "#000" },
|
|
11
|
-
pink: { accentColor: "#FF7AB8", accentColorForeground: "#000" },
|
|
12
|
-
purple: { accentColor: "#7A70FF", accentColorForeground: "#FFF" },
|
|
13
|
-
red: { accentColor: "#F34126", accentColorForeground: "#FFF" },
|
|
14
|
-
white: { accentColor: "#FFF", accentColorForeground: "#000" }
|
|
15
|
-
};
|
|
16
|
-
var defaultAccentColor = accentColors.white;
|
|
17
|
-
var darkTheme = ({
|
|
18
|
-
accentColor = defaultAccentColor.accentColor,
|
|
19
|
-
accentColorForeground = defaultAccentColor.accentColorForeground,
|
|
20
|
-
customColors,
|
|
21
|
-
customShadows,
|
|
22
|
-
...baseThemeOptions
|
|
23
|
-
} = {}) => ({
|
|
24
|
-
...baseTheme(baseThemeOptions),
|
|
25
|
-
colors: {
|
|
26
|
-
accentColor,
|
|
27
|
-
accentColorForeground,
|
|
28
|
-
actionButtonBorder: "rgba(255, 255, 255, 0.04)",
|
|
29
|
-
connectButtonBackground: "#000",
|
|
30
|
-
connectButtonBackgroundError: "#C60000",
|
|
31
|
-
connectButtonText: "#FFF",
|
|
32
|
-
connectButtonTextError: "#FFF",
|
|
33
|
-
connectionIndicator: "#30E000",
|
|
34
|
-
error: accentColors.red.accentColor,
|
|
35
|
-
errorBackground: "#F2E6E4",
|
|
36
|
-
errorBorder: "rgba(243, 65, 38, 0.2)",
|
|
37
|
-
generalBorder: "#292929",
|
|
38
|
-
// strokeColor in figma
|
|
39
|
-
generalBorderDim: "rgba(255, 255, 255, 0.04)",
|
|
40
|
-
menuItemBackground: "rgba(255, 255, 255, 0.03)",
|
|
41
|
-
selectedOptionBorder: "rgba(224, 232, 255, 0.1)",
|
|
42
|
-
focusedOptionBorder: "#8C8C8C",
|
|
43
|
-
standby: "#F6851B",
|
|
44
|
-
success: "#66CC00",
|
|
45
|
-
delayedStatusIcon: customColors?.secondaryText ?? "#8C8C8C",
|
|
46
|
-
// backward compatibility
|
|
47
|
-
chainIconBorder: "#fff",
|
|
48
|
-
// FUNKIT COLORS
|
|
49
|
-
// modal backgrounds
|
|
50
|
-
modalBackdrop: "rgba(0, 0, 0, 0.2)",
|
|
51
|
-
modalBackground: "#000000",
|
|
52
|
-
modalBorder: "#292929",
|
|
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)",
|
|
58
|
-
offBackground: "#1F1F1F",
|
|
59
|
-
offBackgroundInverse: "#F2F2F2",
|
|
60
|
-
hoverState: "#333333",
|
|
61
|
-
lightStroke: "#333333",
|
|
62
|
-
mediumStroke: "#333333",
|
|
63
|
-
heavyStroke: "rgba(117, 117, 117, 0.40)",
|
|
64
|
-
strokeColor: "#333333",
|
|
65
|
-
//Text
|
|
66
|
-
primaryText: "#FFF",
|
|
67
|
-
secondaryText: "#8C8C8C",
|
|
68
|
-
tertiaryText: "rgba(255, 255, 255, 0.35)",
|
|
69
|
-
textSelection: "rgba(255, 255, 255, 0.10)",
|
|
70
|
-
// input
|
|
71
|
-
inputBackground: "#000000",
|
|
72
|
-
inputBorderBase: "#333333",
|
|
73
|
-
inputBorderHover: "#525252",
|
|
74
|
-
// tab
|
|
75
|
-
activeTabBorderColor: "#333333",
|
|
76
|
-
activeTabBackground: "#333333",
|
|
77
|
-
// button
|
|
78
|
-
actionColor: "#FFF",
|
|
79
|
-
actionColorHover: "rgba(255, 255, 255, 0.8)",
|
|
80
|
-
actionColorDisabled: "rgba(255, 255, 255, 0.65)",
|
|
81
|
-
buttonPrimary: accentColor,
|
|
82
|
-
buttonDisabled: "rgba(255, 255, 255, 0.20)",
|
|
83
|
-
buttonTextPrimary: "#000000",
|
|
84
|
-
buttonTextHover: "#000000",
|
|
85
|
-
buttonTextDisabled: "#000000",
|
|
86
|
-
buttonWarning: accentColors.red.accentColor,
|
|
87
|
-
buttonSuccess: "#2EA200",
|
|
88
|
-
transparent: "transparent",
|
|
89
|
-
buttonBackgroundTertiary: "#333333",
|
|
90
|
-
buttonBackgroundHoverTertiary: "#333333",
|
|
91
|
-
buttonBackgroundDisabledTertiary: "transparent",
|
|
92
|
-
buttonTextTertiary: "#FFF",
|
|
93
|
-
buttonTextDisabledTertiary: "rgba(255, 255, 255, 0.65)",
|
|
94
|
-
buttonBackground: "#FFF",
|
|
95
|
-
buttonBackgroundHover: "#f2f2f2",
|
|
96
|
-
buttonBackgroundPressed: "#FFF",
|
|
97
|
-
buttonBackgroundDisabled: "rgba(255, 255, 255, 0.65)",
|
|
98
|
-
buttonTextSecondaryDisabled: "rgba(255, 255, 255, 0.65)",
|
|
99
|
-
buttonTextSecondary: "#FFFFFF",
|
|
100
|
-
buttonIconBackgroundHover: "#333333",
|
|
101
|
-
buttonIconBackgroundPressed: "#333333",
|
|
102
|
-
buttonIconStroke: "rgba(255, 255, 255, 0.35)",
|
|
103
|
-
buttonBorderTertiary: "transparent",
|
|
104
|
-
buttonBorderFocusedTertiary: "rgba(255, 255, 255, 0.35)",
|
|
105
|
-
buttonFocusedOutline: "none",
|
|
106
|
-
buttonBorderGradient: "none",
|
|
107
|
-
buttonHoverBorderGradient: "none",
|
|
108
|
-
buttonDisabledBorderGradient: "none",
|
|
109
|
-
// TODO: Make common colors when refactoring the design system
|
|
110
|
-
inputAmountQuickOptionBaseBackground: "#1F1F1F",
|
|
111
|
-
inputAmountQuickOptionHoverBackground: "#333333",
|
|
112
|
-
inputAmountQuickOptionActiveBackground: "#333333",
|
|
113
|
-
inputAmountQuickOptionDisabledBackground: "#333333",
|
|
114
|
-
inputAmountQuickOptionBaseBorder: "#f2f2f2",
|
|
115
|
-
inputAmountQuickOptionHoverBorder: "rgba(255, 255, 255, 0.35)",
|
|
116
|
-
inputAmountQuickOptionActiveBorder: "rgba(255, 255, 255, 0.35)",
|
|
117
|
-
inputAmountQuickOptionFocusedBorder: "rgba(255, 255, 255, 0.35)",
|
|
118
|
-
inputAmountFiatDecimalsColor: customColors?.inputAmountFiatDecimalsColor ?? "none",
|
|
119
|
-
youPayYouReceiveBackground: "#000000",
|
|
120
|
-
// modalBackground
|
|
121
|
-
youPayYouReceiveBorder: "#333333",
|
|
122
|
-
// mediumStroke
|
|
123
|
-
youPayYouReceivePrimaryText: "#FFF",
|
|
124
|
-
// primaryText
|
|
125
|
-
youPayYouReceiveSecondaryText: "#8C8C8C",
|
|
126
|
-
// secondaryText
|
|
127
|
-
// badges
|
|
128
|
-
badgeBackgroundSuccess: "rgba(124, 242, 136, 0.1)",
|
|
129
|
-
badgeBorderSuccess: "rgba(124, 242, 136, 0.2)",
|
|
130
|
-
badgeTextSuccess: "rgb(124, 242, 136)",
|
|
131
|
-
newBadgeBackground: "linear-gradient(180deg, rgba(57, 76, 56, 0.55) 0%, rgba(61, 81, 65, 0.55) 100%)",
|
|
132
|
-
newBadgeBorder: "rgba(122, 221, 122, 0.3)",
|
|
133
|
-
newBadgeText: "#A4FF9A",
|
|
134
|
-
approvedBadgeBackground: "linear-gradient(180deg, rgba(236, 255, 234, 0.20) 0%, rgba(228, 255, 233, 0.20) 100%)",
|
|
135
|
-
approvedBadgeBorder: "rgba(109, 216, 109, 0.08)",
|
|
136
|
-
approvedBadgeText: "#8FFFA9",
|
|
137
|
-
failedBadgeBackground: "rgba(255, 61, 61, 0.18)",
|
|
138
|
-
failedBadgeBorder: "rgba(255, 255, 255, 0.10)",
|
|
139
|
-
failedBadgeText: "#F88877",
|
|
140
|
-
announceGradientFrom: "#AAAAAA",
|
|
141
|
-
announceGradientTo: "#BEBEBE",
|
|
142
|
-
fiatPendingGradientFrom: "#AAAAAA",
|
|
143
|
-
fiatPendingGradientTo: "#BEBEBE",
|
|
144
|
-
fiatSuccessBackgroundFill: "rgba(102, 204, 0, 0.30)",
|
|
145
|
-
fiatFailedBackgroundFill: "rgba(255, 61, 61, 0.30)",
|
|
146
|
-
fiatStatusIconBorder: "rgba(255, 255, 255, 0.06)",
|
|
147
|
-
fiatAccountIconFill: "#002F5E",
|
|
148
|
-
fiatAccountGradientFrom: "#3A82FE",
|
|
149
|
-
fiatAccountGradientTo: "#73A7FF",
|
|
150
|
-
modalHeaderDivider: "#333333",
|
|
151
|
-
// lightStroke
|
|
152
|
-
modalFooterDivider: "#333333",
|
|
153
|
-
// lightStroke
|
|
154
|
-
spinnerBackground: customColors?.mediumStroke ?? "rgba(0, 0, 0, 0.3)",
|
|
155
|
-
// 30% buttonTextPrimary
|
|
156
|
-
spinnerIndicator: customColors?.primaryText ?? "#000",
|
|
157
|
-
// 100% buttonTextPrimary
|
|
158
|
-
spinnerBackgroundVerifyAccount: "rgba(0, 0, 0, 0.3)",
|
|
159
|
-
// 30% buttonTextPrimary
|
|
160
|
-
spinnerIndicatorVerifyAccount: customColors?.primaryText ?? "#000",
|
|
161
|
-
// 100% buttonTextPrimary
|
|
162
|
-
// Override colors
|
|
163
|
-
...customColors || {},
|
|
164
|
-
// option Boxes
|
|
165
|
-
optionBoxBackground: customColors?.optionBoxBackground ?? customColors?.modalBackground ?? "#000",
|
|
166
|
-
// keeps gradient in SourcePaymentMethodItem if optionBoxBackground differs from modal background
|
|
167
|
-
optionBoxBackgroundUninteractive: customColors?.optionBoxBackgroundUninteractive ?? "transparent",
|
|
168
|
-
dropdownActiveItemBackgroundBase: customColors?.dropdownActiveItemBackgroundBase ?? customColors?.modalBackground ?? "#000000",
|
|
169
|
-
dropdownActiveItemBackgroundHover: customColors?.dropdownActiveItemBackgroundHover ?? customColors?.offBackground ?? "#1F1F1F",
|
|
170
|
-
dropdownActiveItemBackgroundDisabled: customColors?.dropdownActiveItemBackgroundDisabled ?? "transparent",
|
|
171
|
-
txSummaryBoxBackground: customColors?.txSummaryBoxBackground ?? customColors?.modalBackground ?? "#000",
|
|
172
|
-
txSummaryBoxBorder: customColors?.txSummaryBoxBorder ?? customColors?.lightStroke ?? "#333333",
|
|
173
|
-
counterRingColor: customColors?.counterRingColor ?? accentColor
|
|
174
|
-
},
|
|
175
|
-
shadows: {
|
|
176
|
-
connectButton: "0px 4px 12px rgba(0, 0, 0, 0.1)",
|
|
177
|
-
dialog: "0px 8px 32px rgba(0, 0, 0, 0.32)",
|
|
178
|
-
selectedOption: "0px 2px 6px rgba(0, 0, 0, 0.24)",
|
|
179
|
-
selectedWallet: "0px 2px 6px rgba(0, 0, 0, 0.24)",
|
|
180
|
-
dropdown: "0px 0px 0px 1px rgba(255, 255, 255, 0.16), 0px 2px 6px rgba(0, 0, 0, 0.03), 0px 4px 42px rgba(0, 0, 0, 0.06)",
|
|
181
|
-
notification: "0px 0px 0px 1px rgba(255, 255, 255, 0.20), 0px 2px 6px 0px rgba(0, 0, 0, 0.05), 0px 4px 42px 0px rgba(0, 0, 0, 0.06)",
|
|
182
|
-
qrCode: "0px 0px 0px 1px rgba(255, 255, 255, 0.16)",
|
|
183
|
-
buttonShadow: "none",
|
|
184
|
-
buttonShadowTertiary: "none",
|
|
185
|
-
buttonHoverShadow: "none",
|
|
186
|
-
buttonHoverShadowTertiary: "none",
|
|
187
|
-
buttonFocusedShadow: "0px 0px 0px 2px rgba(255, 255, 255, 0.25)",
|
|
188
|
-
buttonFocusedShadowTertiary: "0px 0px 0px 2px rgba(255, 255, 255, 0.25)",
|
|
189
|
-
buttonDisabledShadow: "none",
|
|
190
|
-
buttonDisabledShadowTertiary: "none",
|
|
191
|
-
buttonInnerShadow: "none",
|
|
192
|
-
buttonInnerShadowTertiary: customShadows?.buttonInnerShadow ?? "none",
|
|
193
|
-
buttonFocusedInnerShadow: "none",
|
|
194
|
-
buttonFocusedInnerShadowTertiary: customShadows?.buttonFocusedInnerShadow ?? "none",
|
|
195
|
-
buttonHoverInnerShadow: "none",
|
|
196
|
-
buttonHoverInnerShadowTertiary: customShadows?.buttonHoverInnerShadow ?? "none",
|
|
197
|
-
buttonDisabledInnerShadow: "none",
|
|
198
|
-
buttonDisabledInnerShadowTertiary: customShadows?.buttonDisabledInnerShadow ?? "none",
|
|
199
|
-
selectedDropdownItem: "none",
|
|
200
|
-
// Override shadows
|
|
201
|
-
...customShadows || {}
|
|
202
|
-
},
|
|
203
|
-
moonpayTheme: "dark"
|
|
204
|
-
});
|
|
205
|
-
darkTheme.accentColors = accentColors;
|
|
206
|
-
|
|
207
|
-
export {
|
|
208
|
-
darkTheme
|
|
209
|
-
};
|