@talken/talkenkit 2.7.1 → 2.7.3
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/LICENSE +9 -0
- package/dist/chunk-PUVP4PUZ.js +85 -0
- package/dist/chunk-V22G3VGP.js +84 -0
- package/dist/components/ConfirmationModal/ConfirmationThemeContext.d.ts +12 -0
- package/dist/components/RainbowKitProvider/RainbowKitProvider.d.ts +10 -3
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1057 -987
- package/dist/themes/baseTheme.d.ts +16 -0
- package/dist/themes/darkTheme.d.ts +16 -1
- package/dist/themes/darkTheme.js +1 -1
- package/dist/themes/lightTheme.d.ts +16 -1
- package/dist/themes/lightTheme.js +1 -1
- package/dist/wallets/walletConnectors/index.js +64 -64
- package/package.json +11 -12
package/LICENSE
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Rainbow
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
baseTheme
|
|
4
|
+
} from "./chunk-DQLAW7KN.js";
|
|
5
|
+
|
|
6
|
+
// src/themes/darkTheme.ts
|
|
7
|
+
var darkGrey = "#1A1B1F";
|
|
8
|
+
var accentColors = {
|
|
9
|
+
blue: { accentColor: "#3898FF", accentColorForeground: "#FFF" },
|
|
10
|
+
green: { accentColor: "#4BD166", accentColorForeground: darkGrey },
|
|
11
|
+
orange: { accentColor: "#FF983D", accentColorForeground: darkGrey },
|
|
12
|
+
pink: { accentColor: "#FF7AB8", accentColorForeground: darkGrey },
|
|
13
|
+
purple: { accentColor: "#7A70FF", accentColorForeground: "#FFF" },
|
|
14
|
+
red: { accentColor: "#FF6257", accentColorForeground: "#FFF" }
|
|
15
|
+
};
|
|
16
|
+
var defaultAccentColor = accentColors.blue;
|
|
17
|
+
var darkTheme = ({
|
|
18
|
+
accentColor = defaultAccentColor.accentColor,
|
|
19
|
+
accentColorForeground = defaultAccentColor.accentColorForeground,
|
|
20
|
+
confirmation,
|
|
21
|
+
...baseThemeOptions
|
|
22
|
+
} = {}) => ({
|
|
23
|
+
...baseTheme(baseThemeOptions),
|
|
24
|
+
confirmation: {
|
|
25
|
+
background: "#02021e",
|
|
26
|
+
border: "#2b2b58",
|
|
27
|
+
labelText: "#6767c3",
|
|
28
|
+
primaryText: "#ffffff",
|
|
29
|
+
secondaryText: "#7a8499",
|
|
30
|
+
buttonCancel: "#14143a",
|
|
31
|
+
buttonCancelText: "#ffffff",
|
|
32
|
+
buttonConfirm: "#061f9f",
|
|
33
|
+
buttonConfirmText: "#ffffff",
|
|
34
|
+
tooltipBackground: "#0f0f29",
|
|
35
|
+
tooltipText: "#7a8499",
|
|
36
|
+
systemRed: "#ff4d4f",
|
|
37
|
+
systemGreen: "#00a906",
|
|
38
|
+
...confirmation
|
|
39
|
+
},
|
|
40
|
+
colors: {
|
|
41
|
+
accentColor,
|
|
42
|
+
accentColorForeground,
|
|
43
|
+
actionButtonBorder: "rgba(255, 255, 255, 0.04)",
|
|
44
|
+
actionButtonBorderMobile: "rgba(255, 255, 255, 0.08)",
|
|
45
|
+
actionButtonSecondaryBackground: "rgba(255, 255, 255, 0.08)",
|
|
46
|
+
closeButton: "rgba(224, 232, 255, 0.6)",
|
|
47
|
+
closeButtonBackground: "rgba(255, 255, 255, 0.08)",
|
|
48
|
+
connectButtonBackground: darkGrey,
|
|
49
|
+
connectButtonBackgroundError: "#FF494A",
|
|
50
|
+
connectButtonInnerBackground: "linear-gradient(0deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.15))",
|
|
51
|
+
connectButtonText: "#FFF",
|
|
52
|
+
connectButtonTextError: "#FFF",
|
|
53
|
+
connectionIndicator: "#30E000",
|
|
54
|
+
downloadBottomCardBackground: "linear-gradient(126deg, rgba(0, 0, 0, 0) 9.49%, rgba(120, 120, 120, 0.2) 71.04%), #1A1B1F",
|
|
55
|
+
downloadTopCardBackground: "linear-gradient(126deg, rgba(120, 120, 120, 0.2) 9.49%, rgba(0, 0, 0, 0) 71.04%), #1A1B1F",
|
|
56
|
+
error: "#FF494A",
|
|
57
|
+
generalBorder: "rgba(255, 255, 255, 0.08)",
|
|
58
|
+
generalBorderDim: "rgba(255, 255, 255, 0.04)",
|
|
59
|
+
menuItemBackground: "rgba(224, 232, 255, 0.1)",
|
|
60
|
+
modalBackdrop: "rgba(0, 0, 0, 0.5)",
|
|
61
|
+
modalBackground: "#1A1B1F",
|
|
62
|
+
modalBorder: "rgba(255, 255, 255, 0.08)",
|
|
63
|
+
modalText: "#FFF",
|
|
64
|
+
modalTextDim: "rgba(224, 232, 255, 0.3)",
|
|
65
|
+
modalTextSecondary: "rgba(255, 255, 255, 0.6)",
|
|
66
|
+
profileAction: "rgba(224, 232, 255, 0.1)",
|
|
67
|
+
profileActionHover: "rgba(224, 232, 255, 0.2)",
|
|
68
|
+
profileForeground: "rgba(224, 232, 255, 0.05)",
|
|
69
|
+
selectedOptionBorder: "rgba(224, 232, 255, 0.1)",
|
|
70
|
+
standby: "#FFD641"
|
|
71
|
+
},
|
|
72
|
+
shadows: {
|
|
73
|
+
connectButton: "0px 4px 12px rgba(0, 0, 0, 0.1)",
|
|
74
|
+
dialog: "0px 8px 32px rgba(0, 0, 0, 0.32)",
|
|
75
|
+
profileDetailsAction: "0px 2px 6px rgba(37, 41, 46, 0.04)",
|
|
76
|
+
selectedOption: "0px 2px 6px rgba(0, 0, 0, 0.24)",
|
|
77
|
+
selectedWallet: "0px 2px 6px rgba(0, 0, 0, 0.24)",
|
|
78
|
+
walletLogo: "0px 2px 16px rgba(0, 0, 0, 0.16)"
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
darkTheme.accentColors = accentColors;
|
|
82
|
+
|
|
83
|
+
export {
|
|
84
|
+
darkTheme
|
|
85
|
+
};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
baseTheme
|
|
4
|
+
} from "./chunk-DQLAW7KN.js";
|
|
5
|
+
|
|
6
|
+
// src/themes/lightTheme.ts
|
|
7
|
+
var accentColors = {
|
|
8
|
+
blue: { accentColor: "#0E76FD", accentColorForeground: "#FFF" },
|
|
9
|
+
green: { accentColor: "#1DB847", accentColorForeground: "#FFF" },
|
|
10
|
+
orange: { accentColor: "#FF801F", accentColorForeground: "#FFF" },
|
|
11
|
+
pink: { accentColor: "#FF5CA0", accentColorForeground: "#FFF" },
|
|
12
|
+
purple: { accentColor: "#5F5AFA", accentColorForeground: "#FFF" },
|
|
13
|
+
red: { accentColor: "#FA423C", accentColorForeground: "#FFF" }
|
|
14
|
+
};
|
|
15
|
+
var defaultAccentColor = accentColors.blue;
|
|
16
|
+
var lightTheme = ({
|
|
17
|
+
accentColor = defaultAccentColor.accentColor,
|
|
18
|
+
accentColorForeground = defaultAccentColor.accentColorForeground,
|
|
19
|
+
confirmation,
|
|
20
|
+
...baseThemeOptions
|
|
21
|
+
} = {}) => ({
|
|
22
|
+
...baseTheme(baseThemeOptions),
|
|
23
|
+
confirmation: {
|
|
24
|
+
background: "#ffffff",
|
|
25
|
+
border: "#e6e6e6",
|
|
26
|
+
labelText: "#3e3e3e",
|
|
27
|
+
primaryText: "#000000",
|
|
28
|
+
secondaryText: "#7a8499",
|
|
29
|
+
buttonCancel: "#f3f3ff",
|
|
30
|
+
buttonCancelText: "#000000",
|
|
31
|
+
buttonConfirm: "#061f9f",
|
|
32
|
+
buttonConfirmText: "#ffffff",
|
|
33
|
+
tooltipBackground: "#f6f6f6",
|
|
34
|
+
tooltipText: "#7a8499",
|
|
35
|
+
systemRed: "#ff4d4f",
|
|
36
|
+
systemGreen: "#00a906",
|
|
37
|
+
...confirmation
|
|
38
|
+
},
|
|
39
|
+
colors: {
|
|
40
|
+
accentColor,
|
|
41
|
+
accentColorForeground,
|
|
42
|
+
actionButtonBorder: "rgba(0, 0, 0, 0.04)",
|
|
43
|
+
actionButtonBorderMobile: "rgba(0, 0, 0, 0.06)",
|
|
44
|
+
actionButtonSecondaryBackground: "rgba(0, 0, 0, 0.06)",
|
|
45
|
+
closeButton: "rgba(60, 66, 66, 0.8)",
|
|
46
|
+
closeButtonBackground: "rgba(0, 0, 0, 0.06)",
|
|
47
|
+
connectButtonBackground: "#FFF",
|
|
48
|
+
connectButtonBackgroundError: "#FF494A",
|
|
49
|
+
connectButtonInnerBackground: "linear-gradient(0deg, rgba(0, 0, 0, 0.03), rgba(0, 0, 0, 0.06))",
|
|
50
|
+
connectButtonText: "#25292E",
|
|
51
|
+
connectButtonTextError: "#FFF",
|
|
52
|
+
connectionIndicator: "#30E000",
|
|
53
|
+
downloadBottomCardBackground: "linear-gradient(126deg, rgba(255, 255, 255, 0) 9.49%, rgba(171, 171, 171, 0.04) 71.04%), #FFFFFF",
|
|
54
|
+
downloadTopCardBackground: "linear-gradient(126deg, rgba(171, 171, 171, 0.2) 9.49%, rgba(255, 255, 255, 0) 71.04%), #FFFFFF",
|
|
55
|
+
error: "#FF494A",
|
|
56
|
+
generalBorder: "rgba(0, 0, 0, 0.06)",
|
|
57
|
+
generalBorderDim: "rgba(0, 0, 0, 0.03)",
|
|
58
|
+
menuItemBackground: "rgba(60, 66, 66, 0.1)",
|
|
59
|
+
modalBackdrop: "rgba(0, 0, 0, 0.3)",
|
|
60
|
+
modalBackground: "#FFF",
|
|
61
|
+
modalBorder: "transparent",
|
|
62
|
+
modalText: "#25292E",
|
|
63
|
+
modalTextDim: "rgba(60, 66, 66, 0.3)",
|
|
64
|
+
modalTextSecondary: "rgba(60, 66, 66, 0.6)",
|
|
65
|
+
profileAction: "#FFF",
|
|
66
|
+
profileActionHover: "rgba(255, 255, 255, 0.5)",
|
|
67
|
+
profileForeground: "rgba(60, 66, 66, 0.06)",
|
|
68
|
+
selectedOptionBorder: "rgba(60, 66, 66, 0.1)",
|
|
69
|
+
standby: "#FFD641"
|
|
70
|
+
},
|
|
71
|
+
shadows: {
|
|
72
|
+
connectButton: "0px 4px 12px rgba(0, 0, 0, 0.1)",
|
|
73
|
+
dialog: "0px 8px 32px rgba(0, 0, 0, 0.32)",
|
|
74
|
+
profileDetailsAction: "0px 2px 6px rgba(37, 41, 46, 0.04)",
|
|
75
|
+
selectedOption: "0px 2px 6px rgba(0, 0, 0, 0.24)",
|
|
76
|
+
selectedWallet: "0px 2px 6px rgba(0, 0, 0, 0.12)",
|
|
77
|
+
walletLogo: "0px 2px 16px rgba(0, 0, 0, 0.16)"
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
lightTheme.accentColors = accentColors;
|
|
81
|
+
|
|
82
|
+
export {
|
|
83
|
+
lightTheme
|
|
84
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React, { type ReactNode } from 'react';
|
|
2
|
+
import type { ConfirmationThemeColors } from '../../themes/baseTheme';
|
|
3
|
+
export type { ConfirmationThemeColors };
|
|
4
|
+
export declare function ConfirmationThemeProvider({ theme, children, }: {
|
|
5
|
+
theme?: ConfirmationThemeColors;
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
}): React.JSX.Element;
|
|
8
|
+
/**
|
|
9
|
+
* Build inline style overrides from the consumer-provided theme.
|
|
10
|
+
* Maps ConfirmationThemeColors keys to vanilla-extract CSS variable names.
|
|
11
|
+
*/
|
|
12
|
+
export declare function useConfirmationThemeStyle(): React.CSSProperties | undefined;
|
|
@@ -3,6 +3,7 @@ import type { Chain } from 'wagmi/chains';
|
|
|
3
3
|
import type { ThemeVars } from '../../css/sprinkles.css';
|
|
4
4
|
import type { Locale } from '../../locales';
|
|
5
5
|
import type { SolanaConfig } from '../../solana/config';
|
|
6
|
+
import type { ConfirmationThemeColors } from '../ConfirmationModal/ConfirmationThemeContext';
|
|
6
7
|
import { type DisclaimerComponent } from './AppContext';
|
|
7
8
|
import { type AvatarComponent } from './AvatarContext';
|
|
8
9
|
import { type ModalSizes } from './ModalSizeContext';
|
|
@@ -10,9 +11,15 @@ import { type MobileMode } from './RainbowKitConfigProvider';
|
|
|
10
11
|
export declare const useThemeRootProps: () => {
|
|
11
12
|
"data-rk": string;
|
|
12
13
|
};
|
|
13
|
-
export type Theme = ThemeVars
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
export type Theme = (ThemeVars & {
|
|
15
|
+
confirmation?: ConfirmationThemeColors;
|
|
16
|
+
}) | {
|
|
17
|
+
lightMode: ThemeVars & {
|
|
18
|
+
confirmation?: ConfirmationThemeColors;
|
|
19
|
+
};
|
|
20
|
+
darkMode: ThemeVars & {
|
|
21
|
+
confirmation?: ConfirmationThemeColors;
|
|
22
|
+
};
|
|
16
23
|
};
|
|
17
24
|
export interface RainbowKitProviderProps {
|
|
18
25
|
initialChain?: Chain | number;
|
package/dist/index.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ export { RainbowKitAuthenticationProvider, createAuthenticationAdapter, } from '
|
|
|
12
12
|
export type { Wallet, WalletList, WalletDetailsParams, RainbowKitWalletConnectParameters, } from './wallets/Wallet';
|
|
13
13
|
export type { Theme } from './components/RainbowKitProvider/RainbowKitProvider';
|
|
14
14
|
export type { ModalThemeMode } from './components/RainbowKitProvider/ModalThemeModeContext';
|
|
15
|
+
export type { ConfirmationThemeColors } from './components/ConfirmationModal/ConfirmationThemeContext';
|
|
15
16
|
export { useModalThemeMode, useModalThemeClass, } from './components/RainbowKitProvider/ModalThemeModeContext';
|
|
16
17
|
export type { AuthenticationStatus, AuthenticationConfig, } from './components/RainbowKitProvider/AuthenticationContext';
|
|
17
18
|
export type { Locale } from './locales/';
|