@openfort/react 1.5.1 → 1.6.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/build/components/Common/Chain/styles.d.ts +10 -0
- package/build/components/Common/Chain/styles.js +103 -1
- package/build/components/Common/Chain/styles.js.map +1 -1
- package/build/components/Common/Modal/index.js +2 -0
- package/build/components/Common/Modal/index.js.map +1 -1
- package/build/components/Common/SolanaChain/index.d.ts +5 -4
- package/build/components/Common/SolanaChain/index.js +9 -17
- package/build/components/Common/SolanaChain/index.js.map +1 -1
- package/build/components/ConnectModal/index.js +2 -0
- package/build/components/ConnectModal/index.js.map +1 -1
- package/build/components/Openfort/OpenfortProvider.js +4 -0
- package/build/components/Openfort/OpenfortProvider.js.map +1 -1
- package/build/components/Openfort/context.d.ts +4 -1
- package/build/components/Openfort/types.d.ts +22 -0
- package/build/components/Openfort/types.js +1 -0
- package/build/components/Openfort/types.js.map +1 -1
- package/build/components/Pages/Buy/styles.js +10 -10
- package/build/components/Pages/Connected/EthereumConnected.js +7 -1
- package/build/components/Pages/Connected/EthereumConnected.js.map +1 -1
- package/build/components/Pages/Deposit/TestnetNotice.js +15 -3
- package/build/components/Pages/Deposit/TestnetNotice.js.map +1 -1
- package/build/components/Pages/Deposit/index.js +1 -2
- package/build/components/Pages/Deposit/index.js.map +1 -1
- package/build/components/Pages/Deposit/sources.d.ts +3 -0
- package/build/components/Pages/Deposit/sources.js +4 -1
- package/build/components/Pages/Deposit/sources.js.map +1 -1
- package/build/components/Pages/Deposit/useFundingTarget.d.ts +6 -4
- package/build/components/Pages/Deposit/useFundingTarget.js +18 -7
- package/build/components/Pages/Deposit/useFundingTarget.js.map +1 -1
- package/build/components/Pages/DepositCex/index.js +2 -1
- package/build/components/Pages/DepositCex/index.js.map +1 -1
- package/build/components/Pages/Send/EthereumSend.js +10 -4
- package/build/components/Pages/Send/EthereumSend.js.map +1 -1
- package/build/components/Pages/Send/SolanaSend.js +9 -4
- package/build/components/Pages/Send/SolanaSend.js.map +1 -1
- package/build/components/Pages/Send/styles.d.ts +0 -1
- package/build/components/Pages/Send/styles.js +2 -13
- package/build/components/Pages/Send/styles.js.map +1 -1
- package/build/components/Pages/SendConfirmation/ConfirmationSummary.d.ts +27 -0
- package/build/components/Pages/SendConfirmation/ConfirmationSummary.js +15 -0
- package/build/components/Pages/SendConfirmation/ConfirmationSummary.js.map +1 -0
- package/build/components/Pages/SendConfirmation/SolanaSendConfirmation.js +3 -3
- package/build/components/Pages/SendConfirmation/index.js +14 -30
- package/build/components/Pages/SendConfirmation/index.js.map +1 -1
- package/build/components/Pages/SendConfirmation/styles.d.ts +7 -1
- package/build/components/Pages/SendConfirmation/styles.js +49 -17
- package/build/components/Pages/SendConfirmation/styles.js.map +1 -1
- package/build/components/Pages/SignMessage/index.d.ts +2 -0
- package/build/components/Pages/SignMessage/index.js +81 -0
- package/build/components/Pages/SignMessage/index.js.map +1 -0
- package/build/components/Pages/SignMessage/styles.d.ts +14 -0
- package/build/components/Pages/SignMessage/styles.js +82 -0
- package/build/components/Pages/SignMessage/styles.js.map +1 -0
- package/build/hooks/openfort/useSignMessage.d.ts +27 -0
- package/build/hooks/openfort/useSignMessage.js +52 -0
- package/build/hooks/openfort/useSignMessage.js.map +1 -0
- package/build/hooks/openfort/useUI.d.ts +6 -1
- package/build/hooks/openfort/useUI.js +12 -2
- package/build/hooks/openfort/useUI.js.map +1 -1
- package/build/index.d.ts +2 -1
- package/build/index.js +1 -0
- package/build/index.js.map +1 -1
- package/build/localizations/locales/en-US.js +1 -1
- package/build/utils/rpc.d.ts +6 -0
- package/build/utils/rpc.js +12 -1
- package/build/utils/rpc.js.map +1 -1
- package/build/version.d.ts +1 -1
- package/build/version.js +1 -1
- package/build/wagmi/components/ChainSelect/index.js +1 -93
- package/build/wagmi/components/ChainSelect/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { type SignTypedDataPayload } from '../../components/Openfort/types';
|
|
2
|
+
/**
|
|
3
|
+
* Hook for signing messages with a confirmation modal (EVM only).
|
|
4
|
+
*
|
|
5
|
+
* Opens the Openfort "Sign message" screen, shows the message (or EIP-712 typed
|
|
6
|
+
* data) to the user, and resolves with the signature once they confirm. Rejects
|
|
7
|
+
* if the user dismisses the modal.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```tsx
|
|
11
|
+
* const { signMessage, signTypedData, isPending } = useSignMessage()
|
|
12
|
+
*
|
|
13
|
+
* const signature = await signMessage('I hereby vote for foobar')
|
|
14
|
+
*
|
|
15
|
+
* const typedSignature = await signTypedData({
|
|
16
|
+
* domain: { name: 'Ether Mail', version: '1', chainId: 1, verifyingContract: '0x…' },
|
|
17
|
+
* types: { Person: [{ name: 'name', type: 'string' }] },
|
|
18
|
+
* primaryType: 'Person',
|
|
19
|
+
* message: { name: 'Cow' },
|
|
20
|
+
* })
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
export declare function useSignMessage(): {
|
|
24
|
+
signMessage: (message: string) => Promise<`0x${string}`>;
|
|
25
|
+
signTypedData: (typedData: SignTypedDataPayload) => Promise<`0x${string}`>;
|
|
26
|
+
isPending: boolean;
|
|
27
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { useState, useCallback } from 'react';
|
|
2
|
+
import { routes } from '../../components/Openfort/types.js';
|
|
3
|
+
import { useOpenfort } from '../../components/Openfort/useOpenfort.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Hook for signing messages with a confirmation modal (EVM only).
|
|
7
|
+
*
|
|
8
|
+
* Opens the Openfort "Sign message" screen, shows the message (or EIP-712 typed
|
|
9
|
+
* data) to the user, and resolves with the signature once they confirm. Rejects
|
|
10
|
+
* if the user dismisses the modal.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```tsx
|
|
14
|
+
* const { signMessage, signTypedData, isPending } = useSignMessage()
|
|
15
|
+
*
|
|
16
|
+
* const signature = await signMessage('I hereby vote for foobar')
|
|
17
|
+
*
|
|
18
|
+
* const typedSignature = await signTypedData({
|
|
19
|
+
* domain: { name: 'Ether Mail', version: '1', chainId: 1, verifyingContract: '0x…' },
|
|
20
|
+
* types: { Person: [{ name: 'name', type: 'string' }] },
|
|
21
|
+
* primaryType: 'Person',
|
|
22
|
+
* message: { name: 'Cow' },
|
|
23
|
+
* })
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
function useSignMessage() {
|
|
27
|
+
const { setSignRequest, setRoute, setOpen } = useOpenfort();
|
|
28
|
+
const [isPending, setIsPending] = useState(false);
|
|
29
|
+
const request = useCallback((args) => new Promise((resolve, reject) => {
|
|
30
|
+
setIsPending(true);
|
|
31
|
+
// setOpen(true) resets route/history, so it MUST run before setRoute.
|
|
32
|
+
setOpen(true);
|
|
33
|
+
setSignRequest({
|
|
34
|
+
...args,
|
|
35
|
+
resolve: (signature) => {
|
|
36
|
+
setIsPending(false);
|
|
37
|
+
resolve(signature);
|
|
38
|
+
},
|
|
39
|
+
reject: (reason) => {
|
|
40
|
+
setIsPending(false);
|
|
41
|
+
reject(reason);
|
|
42
|
+
},
|
|
43
|
+
});
|
|
44
|
+
setRoute(routes.SIGN_MESSAGE);
|
|
45
|
+
}), [setSignRequest, setRoute, setOpen]);
|
|
46
|
+
const signMessage = useCallback((message) => request({ kind: 'message', message }), [request]);
|
|
47
|
+
const signTypedData = useCallback((typedData) => request({ kind: 'typedData', typedData }), [request]);
|
|
48
|
+
return { signMessage, signTypedData, isPending };
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export { useSignMessage };
|
|
52
|
+
//# sourceMappingURL=useSignMessage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSignMessage.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type Asset } from '../../components/Openfort/types';
|
|
1
2
|
/**
|
|
2
3
|
* Hook for controlling Openfort UI modal and navigation
|
|
3
4
|
*
|
|
@@ -35,7 +36,11 @@ export declare function useUI(): {
|
|
|
35
36
|
openSwitchNetworks: () => void;
|
|
36
37
|
openProviders: () => void;
|
|
37
38
|
openWallets: () => void;
|
|
38
|
-
openSend: (
|
|
39
|
+
openSend: (tx?: {
|
|
40
|
+
to: string;
|
|
41
|
+
amount: string;
|
|
42
|
+
asset?: Asset;
|
|
43
|
+
}) => void;
|
|
39
44
|
openReceive: () => void;
|
|
40
45
|
openFunding: () => void;
|
|
41
46
|
openBuy: () => void;
|
|
@@ -68,7 +68,7 @@ function isAccountId(id) {
|
|
|
68
68
|
*/
|
|
69
69
|
function useUI() {
|
|
70
70
|
var _a;
|
|
71
|
-
const { open, setOpen, setRoute, setConnector, connector, chainType } = useOpenfort();
|
|
71
|
+
const { open, setOpen, setRoute, setConnector, setSendForm, connector, chainType } = useOpenfort();
|
|
72
72
|
const { isLoading, user, needsRecovery, embeddedAccounts, activeEmbeddedAddress, embeddedState } = useOpenfortCore();
|
|
73
73
|
const bridge = useEthereumBridge();
|
|
74
74
|
const strategy = useConnectionStrategy();
|
|
@@ -100,6 +100,16 @@ function useUI() {
|
|
|
100
100
|
else
|
|
101
101
|
setRoute(routes.CONNECTED);
|
|
102
102
|
}
|
|
103
|
+
/**
|
|
104
|
+
* Prefill the send form and jump straight to the confirmation (preview) screen
|
|
105
|
+
* for the active chain, skipping asset/amount/recipient entry.
|
|
106
|
+
*/
|
|
107
|
+
const openSendPreview = (tx) => {
|
|
108
|
+
var _a;
|
|
109
|
+
setSendForm({ recipient: tx.to, amount: tx.amount, asset: (_a = tx.asset) !== null && _a !== void 0 ? _a : { type: 'native', balance: BigInt(0) } });
|
|
110
|
+
setOpen(true);
|
|
111
|
+
setRoute(chainType === ChainTypeEnum.SVM ? routes.SOL_SEND_CONFIRMATION : routes.SEND_CONFIRMATION);
|
|
112
|
+
};
|
|
103
113
|
const gotoAndOpen = (route) => {
|
|
104
114
|
const safeList = isConnected ? safeRoutes.connected : safeRoutes.disconnected;
|
|
105
115
|
const fallback = isConnected ? routes.CONNECTED : routes.PROVIDERS;
|
|
@@ -123,7 +133,7 @@ function useUI() {
|
|
|
123
133
|
openSwitchNetworks: () => gotoAndOpen(routes.ETH_SWITCH_NETWORK),
|
|
124
134
|
openProviders: () => gotoAndOpen(routes.PROVIDERS),
|
|
125
135
|
openWallets: () => gotoAndOpen({ route: routes.CONNECTORS, connectType: 'linkIfUserConnectIfNoUser' }),
|
|
126
|
-
openSend: () => gotoAndOpen(routes.SEND),
|
|
136
|
+
openSend: (tx) => tx ? openSendPreview(tx) : gotoAndOpen(routes.SEND),
|
|
127
137
|
openReceive: () => gotoAndOpen(routes.RECEIVE),
|
|
128
138
|
openFunding: () => gotoAndOpen(routes.DEPOSIT),
|
|
129
139
|
openBuy: () => gotoAndOpen(routes.BUY),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useUI.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useUI.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/build/index.d.ts
CHANGED
|
@@ -44,7 +44,7 @@ export { default as Avatar } from './components/Common/Avatar';
|
|
|
44
44
|
export { default as ChainIcon } from './components/Common/Chain';
|
|
45
45
|
export { OpenfortButton } from './components/ConnectButton';
|
|
46
46
|
export { OpenfortProvider } from './components/Openfort/OpenfortProvider';
|
|
47
|
-
export type { CustomizableRoutes, MultiChainAsset } from './components/Openfort/types';
|
|
47
|
+
export type { CustomizableRoutes, MultiChainAsset, SignTypedDataPayload } from './components/Openfort/types';
|
|
48
48
|
export { FundingMethod, LinkWalletOnSignUpOption, UIAuthProvider as AuthProvider } from './components/Openfort/types';
|
|
49
49
|
export { embeddedWalletId } from './constants/openfort';
|
|
50
50
|
export { OpenfortError, OpenfortReactErrorType, OpenfortReactErrorType as OpenfortErrorType, } from './core/errors';
|
|
@@ -64,6 +64,7 @@ export type { FundingSession, FundingTarget, PaymentMethod, PaymentMethodInput,
|
|
|
64
64
|
export { useFunding } from './hooks/openfort/useFunding';
|
|
65
65
|
export { useGrantPermissions } from './hooks/openfort/useGrantPermissions';
|
|
66
66
|
export { useRevokePermissions } from './hooks/openfort/useRevokePermissions';
|
|
67
|
+
export { useSignMessage } from './hooks/openfort/useSignMessage';
|
|
67
68
|
export { useUI } from './hooks/openfort/useUI';
|
|
68
69
|
export { useUser } from './hooks/openfort/useUser';
|
|
69
70
|
export type { UserWallet } from './hooks/openfort/walletTypes';
|
package/build/index.js
CHANGED
|
@@ -17,6 +17,7 @@ export { use7702Authorization } from './hooks/openfort/use7702Authorization.js';
|
|
|
17
17
|
export { useFunding } from './hooks/openfort/useFunding.js';
|
|
18
18
|
export { useGrantPermissions } from './hooks/openfort/useGrantPermissions.js';
|
|
19
19
|
export { useRevokePermissions } from './hooks/openfort/useRevokePermissions.js';
|
|
20
|
+
export { useSignMessage } from './hooks/openfort/useSignMessage.js';
|
|
20
21
|
export { useUI } from './hooks/openfort/useUI.js';
|
|
21
22
|
export { useUser } from './hooks/openfort/useUser.js';
|
|
22
23
|
export { invalidateBalance } from './hooks/useBalance.js';
|
package/build/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -86,7 +86,7 @@ const enUS = {
|
|
|
86
86
|
injectionScreen_notconnected_h1: `Login to {{ CONNECTORNAME }}`,
|
|
87
87
|
injectionScreen_notconnected_p: `To continue, please login to your {{ CONNECTORNAME }} extension.`,
|
|
88
88
|
profileScreen_heading: 'Connected',
|
|
89
|
-
buyScreen_heading: 'Add funds',
|
|
89
|
+
buyScreen_heading: 'Add funds from card',
|
|
90
90
|
buyScreen_subheading: 'Select an amount and token to top up.',
|
|
91
91
|
buyScreen_payWithCard_title: 'Pay with card',
|
|
92
92
|
buyScreen_payWithCard_description: 'Use Stripe or Google Pay for a quick card purchase.',
|
package/build/utils/rpc.d.ts
CHANGED
|
@@ -6,6 +6,12 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import type { Chain } from 'viem';
|
|
8
8
|
import type { SolanaCluster } from '../solana/types';
|
|
9
|
+
/**
|
|
10
|
+
* Whether an EVM chain id is a testnet. Reads viem's chain metadata (`testnet`)
|
|
11
|
+
* for the chains the SDK bundles, falling back to a small extra set. Use this to
|
|
12
|
+
* key behaviour off the wallet's active chain rather than the publishable key.
|
|
13
|
+
*/
|
|
14
|
+
export declare function isTestnetChainId(chainId: number): boolean;
|
|
9
15
|
export declare function getDefaultEthereumRpcUrl(chainId: number): string;
|
|
10
16
|
/**
|
|
11
17
|
* Get default Solana RPC URL for a cluster.
|
package/build/utils/rpc.js
CHANGED
|
@@ -17,6 +17,17 @@ const KNOWN_CHAINS = {
|
|
|
17
17
|
[optimismSepolia.id]: optimismSepolia,
|
|
18
18
|
[arbitrumSepolia.id]: arbitrumSepolia,
|
|
19
19
|
};
|
|
20
|
+
/** Testnets not in {@link KNOWN_CHAINS} but still worth recognizing (deprecated/uncommon). */
|
|
21
|
+
const EXTRA_TESTNET_CHAIN_IDS = new Set([5, 80001, 97, 4002]);
|
|
22
|
+
/**
|
|
23
|
+
* Whether an EVM chain id is a testnet. Reads viem's chain metadata (`testnet`)
|
|
24
|
+
* for the chains the SDK bundles, falling back to a small extra set. Use this to
|
|
25
|
+
* key behaviour off the wallet's active chain rather than the publishable key.
|
|
26
|
+
*/
|
|
27
|
+
function isTestnetChainId(chainId) {
|
|
28
|
+
var _a;
|
|
29
|
+
return ((_a = KNOWN_CHAINS[chainId]) === null || _a === void 0 ? void 0 : _a.testnet) === true || EXTRA_TESTNET_CHAIN_IDS.has(chainId);
|
|
30
|
+
}
|
|
20
31
|
/**
|
|
21
32
|
* Default Solana RPC URLs by cluster.
|
|
22
33
|
* Production apps should provide their own RPCs via walletConfig.solana.rpcUrls.
|
|
@@ -93,5 +104,5 @@ function buildChainFromConfig(chainId, rpcUrls) {
|
|
|
93
104
|
});
|
|
94
105
|
}
|
|
95
106
|
|
|
96
|
-
export { buildChainFromConfig, getChainName, getDefaultEthereumRpcUrl, getDefaultSolanaRpcUrl, getNativeCurrency };
|
|
107
|
+
export { buildChainFromConfig, getChainName, getDefaultEthereumRpcUrl, getDefaultSolanaRpcUrl, getNativeCurrency, isTestnetChainId };
|
|
97
108
|
//# sourceMappingURL=rpc.js.map
|
package/build/utils/rpc.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rpc.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"rpc.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/build/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const OPENFORT_VERSION = "1.
|
|
1
|
+
export declare const OPENFORT_VERSION = "1.6.0";
|
package/build/version.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
2
|
import { motion } from 'framer-motion';
|
|
3
3
|
import { useState, useEffect } from 'react';
|
|
4
|
-
import { css } from 'styled-components';
|
|
5
4
|
import { useChainId } from 'wagmi';
|
|
6
5
|
import Chain from '../../../components/Common/Chain/index.js';
|
|
6
|
+
import { SwitchChainButton } from '../../../components/Common/Chain/styles.js';
|
|
7
7
|
import Tooltip from '../../../components/Common/Tooltip/index.js';
|
|
8
8
|
import { routes } from '../../../components/Openfort/types.js';
|
|
9
9
|
import { useOpenfort } from '../../../components/Openfort/useOpenfort.js';
|
|
@@ -15,98 +15,6 @@ import { useSwitchChainFiltered } from '../../useSwitchChainFiltered.js';
|
|
|
15
15
|
import ChainSelectDropdown from '../ChainSelectDropdown/index.js';
|
|
16
16
|
|
|
17
17
|
const Container = styled(motion.div) ``;
|
|
18
|
-
const SwitchChainButton = styled(motion.button) `
|
|
19
|
-
--color: var(
|
|
20
|
-
--ck-dropdown-button-color,
|
|
21
|
-
var(--ck-button-primary-color, var(--ck-body-color))
|
|
22
|
-
);
|
|
23
|
-
--background: var(
|
|
24
|
-
--ck-dropdown-button-background,
|
|
25
|
-
var(--ck-secondary-button-background, var(--ck-body-background-secondary))
|
|
26
|
-
);
|
|
27
|
-
--box-shadow: var(
|
|
28
|
-
--ck-dropdown-button-box-shadow,
|
|
29
|
-
var(
|
|
30
|
-
--ck-secondary-button-box-shadow,
|
|
31
|
-
var(--ck-button-primary-box-shadow),
|
|
32
|
-
none
|
|
33
|
-
)
|
|
34
|
-
);
|
|
35
|
-
|
|
36
|
-
--hover-color: var(--ck-dropdown-button-hover-color, var(--color));
|
|
37
|
-
--hover-background: var(
|
|
38
|
-
--ck-dropdown-button-hover-background,
|
|
39
|
-
var(--background)
|
|
40
|
-
);
|
|
41
|
-
--hover-box-shadow: var(
|
|
42
|
-
--ck-dropdown-button-hover-box-shadow,
|
|
43
|
-
var(--box-shadow)
|
|
44
|
-
);
|
|
45
|
-
|
|
46
|
-
--active-color: var(--ck-dropdown-button-active-color, var(--hover-color));
|
|
47
|
-
--active-background: var(
|
|
48
|
-
--ck-dropdown-button-active-background,
|
|
49
|
-
var(--hover-background)
|
|
50
|
-
);
|
|
51
|
-
--active-box-shadow: var(
|
|
52
|
-
--ck-dropdown-button-active-box-shadow,
|
|
53
|
-
var(--hover-box-shadow)
|
|
54
|
-
);
|
|
55
|
-
|
|
56
|
-
appearance: none;
|
|
57
|
-
user-select: none;
|
|
58
|
-
position: relative;
|
|
59
|
-
display: flex;
|
|
60
|
-
align-items: center;
|
|
61
|
-
justify-content: space-between;
|
|
62
|
-
border-radius: 15px;
|
|
63
|
-
width: 52px;
|
|
64
|
-
height: 30px;
|
|
65
|
-
padding: 2px 6px 2px 3px;
|
|
66
|
-
font-size: 16px;
|
|
67
|
-
line-height: 19px;
|
|
68
|
-
font-weight: 500;
|
|
69
|
-
text-decoration: none;
|
|
70
|
-
white-space: nowrap;
|
|
71
|
-
transform: translateZ(0px);
|
|
72
|
-
|
|
73
|
-
transition: 100ms ease;
|
|
74
|
-
transition-property: transform, background-color, box-shadow, color;
|
|
75
|
-
|
|
76
|
-
color: var(--color);
|
|
77
|
-
background: var(--background);
|
|
78
|
-
box-shadow: var(--box-shadow);
|
|
79
|
-
|
|
80
|
-
svg {
|
|
81
|
-
position: relative;
|
|
82
|
-
display: block;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
${(props) => props.disabled
|
|
86
|
-
? css `
|
|
87
|
-
width: auto;
|
|
88
|
-
padding: 3px;
|
|
89
|
-
position: relative;
|
|
90
|
-
left: -22px;
|
|
91
|
-
`
|
|
92
|
-
: css `
|
|
93
|
-
cursor: pointer;
|
|
94
|
-
|
|
95
|
-
@media only screen and (min-width: ${defaultTheme.mobileWidth + 1}px) {
|
|
96
|
-
&:hover,
|
|
97
|
-
&:focus-visible {
|
|
98
|
-
color: var(--hover-color);
|
|
99
|
-
background: var(--hover-background);
|
|
100
|
-
box-shadow: var(--hover-box-shadow);
|
|
101
|
-
}
|
|
102
|
-
&:active {
|
|
103
|
-
color: var(--active-color);
|
|
104
|
-
background: var(--active-background);
|
|
105
|
-
box-shadow: var(--active-box-shadow);
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
`}
|
|
109
|
-
`;
|
|
110
18
|
const ChevronDown = ({ ...props }) => (jsx("svg", { "aria-hidden": "true", width: "11", height: "6", viewBox: "0 0 11 6", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, children: jsx("path", { d: "M1.5 1L5.5 5L9.5 1", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }));
|
|
111
19
|
const ChainSelector = () => {
|
|
112
20
|
var _a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|