thirdweb 5.110.1 → 5.110.2-nightly-630edadcec2c777cfd4bfef4871aff396e98291e-20251024000336
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/dist/cjs/contract/deployment/utils/create-2-factory.js +1 -0
- package/dist/cjs/contract/deployment/utils/create-2-factory.js.map +1 -1
- package/dist/cjs/react/core/design-system/index.js +68 -68
- package/dist/cjs/react/core/design-system/index.js.map +1 -1
- package/dist/cjs/react/web/ui/Bridge/payment-selection/FiatProviderSelection.js +2 -4
- package/dist/cjs/react/web/ui/Bridge/payment-selection/FiatProviderSelection.js.map +1 -1
- package/dist/cjs/react/web/ui/Bridge/payment-selection/PaymentSelection.js +1 -1
- package/dist/cjs/react/web/ui/Bridge/payment-selection/PaymentSelection.js.map +1 -1
- package/dist/cjs/react/web/ui/Bridge/payment-selection/TokenSelection.js +25 -22
- package/dist/cjs/react/web/ui/Bridge/payment-selection/TokenSelection.js.map +1 -1
- package/dist/cjs/react/web/ui/Bridge/payment-selection/WalletFiatSelection.js +22 -30
- package/dist/cjs/react/web/ui/Bridge/payment-selection/WalletFiatSelection.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/WalletEntryButton.js +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/WalletSelector.js +2 -2
- package/dist/cjs/react/web/ui/ConnectWallet/WalletSelector.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/ReceiveFunds.js +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/ReceiveFunds.js.map +1 -1
- package/dist/cjs/react/web/ui/components/modalElements.js +2 -1
- package/dist/cjs/react/web/ui/components/modalElements.js.map +1 -1
- package/dist/cjs/react/web/wallets/shared/ConnectingScreen.js +1 -1
- package/dist/cjs/stories/theme.stories.js +59 -0
- package/dist/cjs/stories/theme.stories.js.map +1 -0
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/version.js.map +1 -1
- package/dist/esm/contract/deployment/utils/create-2-factory.js +1 -0
- package/dist/esm/contract/deployment/utils/create-2-factory.js.map +1 -1
- package/dist/esm/react/core/design-system/index.js +68 -68
- package/dist/esm/react/core/design-system/index.js.map +1 -1
- package/dist/esm/react/web/ui/Bridge/payment-selection/FiatProviderSelection.js +2 -4
- package/dist/esm/react/web/ui/Bridge/payment-selection/FiatProviderSelection.js.map +1 -1
- package/dist/esm/react/web/ui/Bridge/payment-selection/PaymentSelection.js +1 -1
- package/dist/esm/react/web/ui/Bridge/payment-selection/PaymentSelection.js.map +1 -1
- package/dist/esm/react/web/ui/Bridge/payment-selection/TokenSelection.js +26 -23
- package/dist/esm/react/web/ui/Bridge/payment-selection/TokenSelection.js.map +1 -1
- package/dist/esm/react/web/ui/Bridge/payment-selection/WalletFiatSelection.js +24 -32
- package/dist/esm/react/web/ui/Bridge/payment-selection/WalletFiatSelection.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/WalletEntryButton.js +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/WalletSelector.js +2 -2
- package/dist/esm/react/web/ui/ConnectWallet/WalletSelector.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/ReceiveFunds.js +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/ReceiveFunds.js.map +1 -1
- package/dist/esm/react/web/ui/components/modalElements.js +2 -1
- package/dist/esm/react/web/ui/components/modalElements.js.map +1 -1
- package/dist/esm/react/web/wallets/shared/ConnectingScreen.js +1 -1
- package/dist/esm/stories/theme.stories.js +55 -0
- package/dist/esm/stories/theme.stories.js.map +1 -0
- package/dist/esm/version.js +1 -1
- package/dist/esm/version.js.map +1 -1
- package/dist/scripts/bridge-widget.js +78 -78
- package/dist/types/react/core/design-system/index.d.ts.map +1 -1
- package/dist/types/react/web/ui/Bridge/payment-selection/FiatProviderSelection.d.ts.map +1 -1
- package/dist/types/react/web/ui/Bridge/payment-selection/TokenSelection.d.ts.map +1 -1
- package/dist/types/react/web/ui/Bridge/payment-selection/WalletFiatSelection.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/ReceiveFunds.d.ts.map +1 -1
- package/dist/types/react/web/ui/components/modalElements.d.ts.map +1 -1
- package/dist/types/stories/theme.stories.d.ts +6 -0
- package/dist/types/stories/theme.stories.d.ts.map +1 -0
- package/dist/types/version.d.ts +1 -1
- package/dist/types/version.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/contract/deployment/utils/create-2-factory.ts +1 -0
- package/src/react/core/design-system/index.ts +70 -102
- package/src/react/web/ui/Bridge/payment-selection/FiatProviderSelection.tsx +2 -5
- package/src/react/web/ui/Bridge/payment-selection/PaymentSelection.tsx +1 -1
- package/src/react/web/ui/Bridge/payment-selection/TokenSelection.tsx +85 -89
- package/src/react/web/ui/Bridge/payment-selection/WalletFiatSelection.tsx +67 -100
- package/src/react/web/ui/ConnectWallet/WalletEntryButton.tsx +1 -1
- package/src/react/web/ui/ConnectWallet/WalletSelector.tsx +2 -2
- package/src/react/web/ui/ConnectWallet/screens/ReceiveFunds.tsx +3 -2
- package/src/react/web/ui/components/modalElements.tsx +2 -1
- package/src/react/web/wallets/shared/ConnectingScreen.tsx +1 -1
- package/src/stories/theme.stories.tsx +165 -0
- package/src/version.ts +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { PlusIcon } from "@radix-ui/react-icons";
|
|
3
3
|
import type { ThirdwebClient } from "../../../../../client/client.js";
|
|
4
4
|
import type { Wallet } from "../../../../../wallets/interfaces/wallet.js";
|
|
5
5
|
import { useCustomTheme } from "../../../../core/design-system/CustomThemeProvider.js";
|
|
@@ -12,7 +12,6 @@ import { CreditCardIcon } from "../../ConnectWallet/icons/CreditCardIcon.js";
|
|
|
12
12
|
import { WalletRow } from "../../ConnectWallet/screens/Buy/swap/WalletRow.js";
|
|
13
13
|
import { Container } from "../../components/basic.js";
|
|
14
14
|
import { Button } from "../../components/buttons.js";
|
|
15
|
-
import { Spacer } from "../../components/Spacer.js";
|
|
16
15
|
import { Text } from "../../components/text.js";
|
|
17
16
|
|
|
18
17
|
interface WalletFiatSelectionProps {
|
|
@@ -35,56 +34,39 @@ export function WalletFiatSelection({
|
|
|
35
34
|
const theme = useCustomTheme();
|
|
36
35
|
|
|
37
36
|
return (
|
|
38
|
-
|
|
37
|
+
<Container flex="column" gap="xs">
|
|
39
38
|
{paymentMethods.includes("crypto") && (
|
|
40
39
|
<>
|
|
41
|
-
{paymentMethods.length > 1 && (
|
|
42
|
-
<>
|
|
43
|
-
<Text color="primaryText" size="sm" weight={500}>
|
|
44
|
-
Pay with Crypto
|
|
45
|
-
</Text>
|
|
46
|
-
<Spacer y="sm" />
|
|
47
|
-
</>
|
|
48
|
-
)}
|
|
49
|
-
|
|
50
40
|
{/* Connected Wallets */}
|
|
51
41
|
{connectedWallets.length > 0 && (
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
style={{ height: iconSize.md, width: iconSize.md }}
|
|
81
|
-
/>
|
|
82
|
-
</Button>
|
|
83
|
-
);
|
|
84
|
-
})}
|
|
85
|
-
</Container>
|
|
86
|
-
<Spacer y="sm" />
|
|
87
|
-
</>
|
|
42
|
+
<Container flex="column" gap="sm">
|
|
43
|
+
{connectedWallets.map((wallet) => {
|
|
44
|
+
const account = wallet.getAccount();
|
|
45
|
+
if (!account?.address) {
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
48
|
+
return (
|
|
49
|
+
<Button
|
|
50
|
+
fullWidth
|
|
51
|
+
key={`${wallet.id}-${account.address}`}
|
|
52
|
+
onClick={() => onWalletSelected(wallet)}
|
|
53
|
+
style={{
|
|
54
|
+
borderRadius: radius.md,
|
|
55
|
+
justifyContent: "space-between",
|
|
56
|
+
padding: `${spacing.md} ${spacing.md}`,
|
|
57
|
+
}}
|
|
58
|
+
variant="secondary"
|
|
59
|
+
>
|
|
60
|
+
<WalletRow
|
|
61
|
+
address={account?.address}
|
|
62
|
+
client={client}
|
|
63
|
+
iconSize="lg"
|
|
64
|
+
textSize="sm"
|
|
65
|
+
/>
|
|
66
|
+
</Button>
|
|
67
|
+
);
|
|
68
|
+
})}
|
|
69
|
+
</Container>
|
|
88
70
|
)}
|
|
89
71
|
|
|
90
72
|
{/* Connect Another Wallet */}
|
|
@@ -92,11 +74,9 @@ export function WalletFiatSelection({
|
|
|
92
74
|
fullWidth
|
|
93
75
|
onClick={onConnectWallet}
|
|
94
76
|
style={{
|
|
95
|
-
backgroundColor: theme.colors.tertiaryBg,
|
|
96
|
-
border: `1px solid ${theme.colors.borderColor}`,
|
|
97
77
|
borderRadius: radius.md,
|
|
98
78
|
height: "auto",
|
|
99
|
-
padding: `${spacing.
|
|
79
|
+
padding: `${spacing.md} ${spacing.md}`,
|
|
100
80
|
textAlign: "left",
|
|
101
81
|
}}
|
|
102
82
|
variant="secondary"
|
|
@@ -109,23 +89,22 @@ export function WalletFiatSelection({
|
|
|
109
89
|
<Container
|
|
110
90
|
style={{
|
|
111
91
|
alignItems: "center",
|
|
112
|
-
border: `1px dashed ${theme.colors.
|
|
113
|
-
borderRadius: radius.
|
|
92
|
+
border: `1px dashed ${theme.colors.secondaryText}`,
|
|
93
|
+
borderRadius: radius.full,
|
|
114
94
|
display: "flex",
|
|
115
|
-
height: iconSize.lg
|
|
95
|
+
height: `${iconSize.lg}px`,
|
|
116
96
|
justifyContent: "center",
|
|
117
|
-
|
|
118
|
-
width: iconSize.lg,
|
|
97
|
+
width: `${iconSize.lg}px`,
|
|
119
98
|
}}
|
|
120
99
|
>
|
|
121
100
|
<PlusIcon
|
|
122
101
|
color={theme.colors.secondaryText}
|
|
123
|
-
height={iconSize
|
|
124
|
-
width={iconSize
|
|
102
|
+
height={iconSize["sm+"]}
|
|
103
|
+
width={iconSize["sm+"]}
|
|
125
104
|
/>
|
|
126
105
|
</Container>
|
|
127
106
|
<Container flex="column" gap="3xs" style={{ flex: 1 }}>
|
|
128
|
-
<Text color="primaryText" size="sm"
|
|
107
|
+
<Text color="primaryText" size="sm">
|
|
129
108
|
Connect a Wallet
|
|
130
109
|
</Text>
|
|
131
110
|
<Text color="secondaryText" size="xs">
|
|
@@ -138,49 +117,37 @@ export function WalletFiatSelection({
|
|
|
138
117
|
)}
|
|
139
118
|
|
|
140
119
|
{paymentMethods.includes("card") && (
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
borderRadius: radius.md,
|
|
157
|
-
height: "auto",
|
|
158
|
-
padding: `${spacing.sm} ${spacing.md}`,
|
|
159
|
-
textAlign: "left",
|
|
160
|
-
}}
|
|
161
|
-
variant="secondary"
|
|
120
|
+
<Button
|
|
121
|
+
fullWidth
|
|
122
|
+
onClick={onFiatSelected}
|
|
123
|
+
style={{
|
|
124
|
+
borderRadius: radius.md,
|
|
125
|
+
height: "auto",
|
|
126
|
+
padding: `${spacing.md} ${spacing.md}`,
|
|
127
|
+
textAlign: "left",
|
|
128
|
+
}}
|
|
129
|
+
variant="secondary"
|
|
130
|
+
>
|
|
131
|
+
<Container
|
|
132
|
+
flex="row"
|
|
133
|
+
gap="md"
|
|
134
|
+
style={{ alignItems: "center", width: "100%" }}
|
|
162
135
|
>
|
|
163
|
-
<
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
>
|
|
168
|
-
<
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
Pay with Card
|
|
175
|
-
</Text>
|
|
176
|
-
<Text color="secondaryText" size="xs">
|
|
177
|
-
Onramp and pay in one step
|
|
178
|
-
</Text>
|
|
179
|
-
</Container>
|
|
136
|
+
<CreditCardIcon
|
|
137
|
+
color={theme.colors.secondaryText}
|
|
138
|
+
size={iconSize.lg}
|
|
139
|
+
/>
|
|
140
|
+
<Container flex="column" gap="3xs" style={{ flex: 1 }}>
|
|
141
|
+
<Text color="primaryText" size="sm">
|
|
142
|
+
Pay with Card
|
|
143
|
+
</Text>
|
|
144
|
+
<Text color="secondaryText" size="xs">
|
|
145
|
+
Onramp and pay in one step
|
|
146
|
+
</Text>
|
|
180
147
|
</Container>
|
|
181
|
-
</
|
|
182
|
-
|
|
148
|
+
</Container>
|
|
149
|
+
</Button>
|
|
183
150
|
)}
|
|
184
|
-
|
|
151
|
+
</Container>
|
|
185
152
|
);
|
|
186
153
|
}
|
|
@@ -320,7 +320,7 @@ const WalletSelectorInner: React.FC<WalletSelectorProps> = (props) => {
|
|
|
320
320
|
bottomSection = (
|
|
321
321
|
<>
|
|
322
322
|
<Line />
|
|
323
|
-
<Container flex="column" gap="md"
|
|
323
|
+
<Container flex="column" gap="md" px="lg" py="md+">
|
|
324
324
|
{newToWallets}
|
|
325
325
|
{continueAsGuest}
|
|
326
326
|
</Container>
|
|
@@ -705,7 +705,7 @@ const ShowAllWalletsIcon = /* @__PURE__ */ StyledDiv(() => {
|
|
|
705
705
|
},
|
|
706
706
|
alignItems: "center",
|
|
707
707
|
backgroundColor: theme.colors.tertiaryBg,
|
|
708
|
-
border: `
|
|
708
|
+
border: `1px solid ${theme.colors.borderColor}`,
|
|
709
709
|
borderRadius: radius.md,
|
|
710
710
|
display: "grid",
|
|
711
711
|
gap: spacing["4xs"],
|
|
@@ -52,7 +52,7 @@ export function ReceiveFunds(props: {
|
|
|
52
52
|
)
|
|
53
53
|
}
|
|
54
54
|
qrCodeUri={address}
|
|
55
|
-
size={
|
|
55
|
+
size={350}
|
|
56
56
|
/>
|
|
57
57
|
</Container>
|
|
58
58
|
<Spacer y="xl" />
|
|
@@ -62,7 +62,7 @@ export function ReceiveFunds(props: {
|
|
|
62
62
|
className="tw-copy-address-button"
|
|
63
63
|
>
|
|
64
64
|
<Text color="primaryText" size="md">
|
|
65
|
-
{shortenString(address || "")}
|
|
65
|
+
{shortenString(address || "", false)}
|
|
66
66
|
</Text>
|
|
67
67
|
<CopyIcon
|
|
68
68
|
hasCopied={hasCopied}
|
|
@@ -76,6 +76,7 @@ export function ReceiveFunds(props: {
|
|
|
76
76
|
<Text
|
|
77
77
|
balance
|
|
78
78
|
center
|
|
79
|
+
size="sm"
|
|
79
80
|
className="receive_fund_screen_instruction"
|
|
80
81
|
multiline
|
|
81
82
|
>
|
|
@@ -10,9 +10,10 @@ export const ModalTitle = /* @__PURE__ */ StyledH2((_) => {
|
|
|
10
10
|
return {
|
|
11
11
|
color: theme.colors.primaryText,
|
|
12
12
|
fontSize: fontSize.lg,
|
|
13
|
-
fontWeight:
|
|
13
|
+
fontWeight: 500,
|
|
14
14
|
lineHeight: 1.3,
|
|
15
15
|
margin: 0,
|
|
16
|
+
letterSpacing: "-0.025em",
|
|
16
17
|
textAlign: "left",
|
|
17
18
|
};
|
|
18
19
|
});
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import type { Meta } from "@storybook/react-vite";
|
|
2
|
+
import {
|
|
3
|
+
darkThemeObj,
|
|
4
|
+
lightThemeObj,
|
|
5
|
+
type Theme,
|
|
6
|
+
} from "../react/core/design-system/index.js";
|
|
7
|
+
import { StyledDiv } from "../react/web/ui/design-system/elements.js";
|
|
8
|
+
|
|
9
|
+
const meta: Meta = {
|
|
10
|
+
title: "theme",
|
|
11
|
+
};
|
|
12
|
+
export default meta;
|
|
13
|
+
|
|
14
|
+
export function Dark() {
|
|
15
|
+
return <Variant theme={darkThemeObj} />;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export function Light() {
|
|
19
|
+
return <Variant theme={lightThemeObj} />;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function Variant(props: { theme: Theme }) {
|
|
23
|
+
return (
|
|
24
|
+
<div
|
|
25
|
+
style={{
|
|
26
|
+
display: "flex",
|
|
27
|
+
flexDirection: "column",
|
|
28
|
+
gap: "10px",
|
|
29
|
+
maxWidth: "700px",
|
|
30
|
+
margin: "0 auto",
|
|
31
|
+
backgroundColor: props.theme.colors.modalBg,
|
|
32
|
+
padding: "14px",
|
|
33
|
+
lineHeight: "1.5",
|
|
34
|
+
borderRadius: "8px",
|
|
35
|
+
}}
|
|
36
|
+
>
|
|
37
|
+
<ColorPairTest theme={props.theme} text="primaryText" />
|
|
38
|
+
<ColorPairTest theme={props.theme} text="secondaryText" />
|
|
39
|
+
<ColorPairTest theme={props.theme} text="accentText" />
|
|
40
|
+
<ColorPairTest theme={props.theme} text="danger" />
|
|
41
|
+
<ColorPairTest theme={props.theme} text="success" />
|
|
42
|
+
|
|
43
|
+
<ColorPairTest theme={props.theme} bg="tooltipBg" text="tooltipText" />
|
|
44
|
+
|
|
45
|
+
<ColorPairTest
|
|
46
|
+
theme={props.theme}
|
|
47
|
+
bg="accentButtonBg"
|
|
48
|
+
text="accentButtonText"
|
|
49
|
+
/>
|
|
50
|
+
|
|
51
|
+
<ColorPairTest
|
|
52
|
+
theme={props.theme}
|
|
53
|
+
bg="primaryButtonBg"
|
|
54
|
+
text="primaryButtonText"
|
|
55
|
+
/>
|
|
56
|
+
|
|
57
|
+
<ColorPairTest
|
|
58
|
+
theme={props.theme}
|
|
59
|
+
bg="selectedTextBg"
|
|
60
|
+
text="selectedTextColor"
|
|
61
|
+
/>
|
|
62
|
+
|
|
63
|
+
<ColorPairTest theme={props.theme} bg="skeletonBg" text="primaryText" />
|
|
64
|
+
|
|
65
|
+
<ColorPairTest theme={props.theme} bg="scrollbarBg" text="primaryText" />
|
|
66
|
+
|
|
67
|
+
<ColorPairTest
|
|
68
|
+
theme={props.theme}
|
|
69
|
+
bg="inputAutofillBg"
|
|
70
|
+
text="primaryText"
|
|
71
|
+
/>
|
|
72
|
+
|
|
73
|
+
<ColorPairTest
|
|
74
|
+
theme={props.theme}
|
|
75
|
+
bg="tertiaryBg"
|
|
76
|
+
hoverBg="secondaryButtonHoverBg"
|
|
77
|
+
text="primaryText"
|
|
78
|
+
/>
|
|
79
|
+
|
|
80
|
+
<ColorPairTest
|
|
81
|
+
theme={props.theme}
|
|
82
|
+
bg="secondaryButtonBg"
|
|
83
|
+
hoverBg="secondaryButtonHoverBg"
|
|
84
|
+
text="secondaryButtonText"
|
|
85
|
+
/>
|
|
86
|
+
|
|
87
|
+
<ColorPairTest
|
|
88
|
+
theme={props.theme}
|
|
89
|
+
hoverBg="secondaryIconHoverBg"
|
|
90
|
+
text="secondaryIconColor"
|
|
91
|
+
hoverText="secondaryIconHoverColor"
|
|
92
|
+
/>
|
|
93
|
+
|
|
94
|
+
<ColorPairTest
|
|
95
|
+
theme={props.theme}
|
|
96
|
+
bg="connectedButtonBg"
|
|
97
|
+
text="primaryText"
|
|
98
|
+
hoverBg="connectedButtonBgHover"
|
|
99
|
+
/>
|
|
100
|
+
|
|
101
|
+
<div
|
|
102
|
+
style={{
|
|
103
|
+
border: `1px solid ${props.theme.colors.borderColor}`,
|
|
104
|
+
padding: "20px",
|
|
105
|
+
borderRadius: "8px",
|
|
106
|
+
color: props.theme.colors.primaryText,
|
|
107
|
+
}}
|
|
108
|
+
>
|
|
109
|
+
border
|
|
110
|
+
</div>
|
|
111
|
+
|
|
112
|
+
<div
|
|
113
|
+
style={{
|
|
114
|
+
border: `1px solid ${props.theme.colors.separatorLine}`,
|
|
115
|
+
padding: "20px",
|
|
116
|
+
borderRadius: "8px",
|
|
117
|
+
color: props.theme.colors.primaryText,
|
|
118
|
+
}}
|
|
119
|
+
>
|
|
120
|
+
separatorLine
|
|
121
|
+
</div>
|
|
122
|
+
</div>
|
|
123
|
+
);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
function ColorPairTest(props: {
|
|
127
|
+
theme: Theme;
|
|
128
|
+
bg?: keyof Theme["colors"];
|
|
129
|
+
text: keyof Theme["colors"];
|
|
130
|
+
hoverBg?: keyof Theme["colors"];
|
|
131
|
+
hoverText?: keyof Theme["colors"];
|
|
132
|
+
}) {
|
|
133
|
+
return (
|
|
134
|
+
<HoverBg
|
|
135
|
+
style={{ display: "flex", flexDirection: "column", gap: "10px" }}
|
|
136
|
+
bg={props.bg ? props.theme.colors[props.bg] : undefined}
|
|
137
|
+
hoverBg={props.hoverBg ? props.theme.colors[props.hoverBg] : undefined}
|
|
138
|
+
text={props.theme.colors[props.text]}
|
|
139
|
+
>
|
|
140
|
+
{[props.bg, props.hoverBg, props.text].filter(Boolean).join(", ")}
|
|
141
|
+
</HoverBg>
|
|
142
|
+
);
|
|
143
|
+
}
|
|
144
|
+
const HoverBg = StyledDiv(
|
|
145
|
+
(props: {
|
|
146
|
+
bg?: string;
|
|
147
|
+
hoverBg?: string;
|
|
148
|
+
text: string;
|
|
149
|
+
hoverText?: string;
|
|
150
|
+
}) => {
|
|
151
|
+
return {
|
|
152
|
+
backgroundColor: props.bg ?? "transparent",
|
|
153
|
+
padding: "20px",
|
|
154
|
+
borderRadius: "8px",
|
|
155
|
+
fontSize: "16px",
|
|
156
|
+
fontWeight: 400,
|
|
157
|
+
color: props.text,
|
|
158
|
+
"&:hover": props.hoverBg
|
|
159
|
+
? {
|
|
160
|
+
backgroundColor: props.hoverBg,
|
|
161
|
+
}
|
|
162
|
+
: undefined,
|
|
163
|
+
};
|
|
164
|
+
},
|
|
165
|
+
);
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = "5.110.
|
|
1
|
+
export const version = "5.110.2-nightly-630edadcec2c777cfd4bfef4871aff396e98291e-20251024000336";
|