kaleido-ui 0.1.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/README.md +188 -0
- package/dist/css/kaleido-ui.css +197 -0
- package/dist/native/index.cjs +322 -0
- package/dist/native/index.d.cts +212 -0
- package/dist/native/index.d.ts +212 -0
- package/dist/native/index.js +283 -0
- package/dist/tailwind/index.cjs +235 -0
- package/dist/tailwind/index.d.cts +182 -0
- package/dist/tailwind/index.d.ts +182 -0
- package/dist/tailwind/index.js +212 -0
- package/dist/tokens/index.cjs +132 -0
- package/dist/tokens/index.d.cts +107 -0
- package/dist/tokens/index.d.ts +107 -0
- package/dist/tokens/index.js +99 -0
- package/dist/web/index.cjs +1276 -0
- package/dist/web/index.d.cts +308 -0
- package/dist/web/index.d.ts +308 -0
- package/dist/web/index.js +1191 -0
- package/native/index.d.ts +1 -0
- package/native/index.js +1 -0
- package/package.json +124 -0
- package/tailwind/index.d.ts +1 -0
- package/tailwind/index.js +1 -0
- package/tokens/index.d.ts +1 -0
- package/tokens/index.js +1 -0
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
export { AmountInput, AssetSelector, Balance, CryptoAddressInput, NetworkSelector, QRCode, SeedPhrase, ThemeProvider, TransactionItem, TransactionList, useTheme } from '@tetherto/wdk-uikit-react-native';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Brand configuration for WDK ThemeProvider.
|
|
7
|
+
*
|
|
8
|
+
* Usage:
|
|
9
|
+
* <ThemeProvider brandConfig={kaleidoswapBrandConfig}>
|
|
10
|
+
*/
|
|
11
|
+
declare const kaleidoswapBrandConfig: {
|
|
12
|
+
primaryColor: "#2BEE79";
|
|
13
|
+
secondaryColor: "#1FA855";
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Full custom theme tokens for more granular control.
|
|
17
|
+
*/
|
|
18
|
+
declare const kaleidoswapTokens: {
|
|
19
|
+
readonly colors: {
|
|
20
|
+
readonly primary: "#2BEE79";
|
|
21
|
+
readonly primaryDark: "#1FA855";
|
|
22
|
+
readonly primaryFg: "#102217";
|
|
23
|
+
readonly background: "#102217";
|
|
24
|
+
readonly surface: "#162E21";
|
|
25
|
+
readonly surfaceHighlight: "#243E30";
|
|
26
|
+
readonly border: "#244A35";
|
|
27
|
+
readonly textPrimary: "#FFFFFF";
|
|
28
|
+
readonly textSecondary: "#92C9A8";
|
|
29
|
+
readonly success: "#2BEE79";
|
|
30
|
+
readonly warning: "#F59E0B";
|
|
31
|
+
readonly error: "#F94040";
|
|
32
|
+
readonly info: "#4290FF";
|
|
33
|
+
readonly network: {
|
|
34
|
+
readonly bitcoin: "#F7931A";
|
|
35
|
+
readonly rgb: "#DD352E";
|
|
36
|
+
readonly arkade: "#7C3AED";
|
|
37
|
+
readonly spark: "#FF6D00";
|
|
38
|
+
readonly lightning: "#F6C343";
|
|
39
|
+
};
|
|
40
|
+
readonly tx: {
|
|
41
|
+
readonly sent: "#F94040";
|
|
42
|
+
readonly receive: "#2BEE79";
|
|
43
|
+
readonly swap: "#4290FF";
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
interface KaleidoThemeProviderProps {
|
|
49
|
+
children: ReactNode;
|
|
50
|
+
/** Override the default brand config */
|
|
51
|
+
brandConfig?: typeof kaleidoswapBrandConfig;
|
|
52
|
+
/** Default theme mode */
|
|
53
|
+
defaultMode?: 'light' | 'dark';
|
|
54
|
+
}
|
|
55
|
+
declare function KaleidoThemeProvider({ children, brandConfig, defaultMode, }: KaleidoThemeProviderProps): react_jsx_runtime.JSX.Element;
|
|
56
|
+
|
|
57
|
+
type StatusType = 'success' | 'pending' | 'failed' | 'completed' | 'error';
|
|
58
|
+
interface StatusBadgeProps {
|
|
59
|
+
status: StatusType;
|
|
60
|
+
style?: any;
|
|
61
|
+
}
|
|
62
|
+
declare function StatusBadge({ status, style }: StatusBadgeProps): react_jsx_runtime.JSX.Element;
|
|
63
|
+
|
|
64
|
+
type NetworkType = 'L1' | 'LN' | 'RGB20' | 'RGB21' | 'RGB-L1' | 'RGB-LN' | 'Spark' | 'Arkade';
|
|
65
|
+
interface NetworkBadgeProps {
|
|
66
|
+
network: NetworkType;
|
|
67
|
+
style?: any;
|
|
68
|
+
}
|
|
69
|
+
declare function NetworkBadge({ network, style }: NetworkBadgeProps): react_jsx_runtime.JSX.Element;
|
|
70
|
+
|
|
71
|
+
declare const variantConfig: {
|
|
72
|
+
readonly error: {
|
|
73
|
+
readonly bg: "#EF44441A";
|
|
74
|
+
readonly borderColor: "#EF444433";
|
|
75
|
+
readonly iconColor: "#F87171";
|
|
76
|
+
};
|
|
77
|
+
readonly warning: {
|
|
78
|
+
readonly bg: "#F59E0B1A";
|
|
79
|
+
readonly borderColor: "#F59E0B33";
|
|
80
|
+
readonly iconColor: "#FBBF24";
|
|
81
|
+
};
|
|
82
|
+
readonly info: {
|
|
83
|
+
readonly bg: "#3B82F61A";
|
|
84
|
+
readonly borderColor: "#3B82F633";
|
|
85
|
+
readonly iconColor: "#60A5FA";
|
|
86
|
+
};
|
|
87
|
+
readonly success: {
|
|
88
|
+
readonly bg: "#2BEE791A";
|
|
89
|
+
readonly borderColor: "#2BEE7933";
|
|
90
|
+
readonly iconColor: "#2BEE79";
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
interface AlertBannerProps {
|
|
94
|
+
variant?: keyof typeof variantConfig;
|
|
95
|
+
children: ReactNode;
|
|
96
|
+
style?: any;
|
|
97
|
+
}
|
|
98
|
+
declare function AlertBanner({ variant, children, style }: AlertBannerProps): react_jsx_runtime.JSX.Element;
|
|
99
|
+
|
|
100
|
+
interface SectionLabelProps {
|
|
101
|
+
children: ReactNode;
|
|
102
|
+
style?: any;
|
|
103
|
+
}
|
|
104
|
+
declare function SectionLabel({ children, style }: SectionLabelProps): react_jsx_runtime.JSX.Element;
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* KaleidoSwap Color Tokens
|
|
108
|
+
*
|
|
109
|
+
* Single source of truth for all color constants across web and native.
|
|
110
|
+
*/
|
|
111
|
+
declare const colors: {
|
|
112
|
+
/** Brand */
|
|
113
|
+
readonly primary: "#2BEE79";
|
|
114
|
+
readonly primaryDark: "#1FA855";
|
|
115
|
+
readonly primaryFg: "#102217";
|
|
116
|
+
/** Surfaces (dark theme — the default) */
|
|
117
|
+
readonly bgDark: "#102217";
|
|
118
|
+
readonly surfaceDark: "#162E21";
|
|
119
|
+
readonly surfaceHighlight: "#243E30";
|
|
120
|
+
readonly surfaceBorder: "#244A35";
|
|
121
|
+
readonly surfaceDarker: "#0B1810";
|
|
122
|
+
/** Surfaces (light theme) */
|
|
123
|
+
readonly bgLight: "#F6F8F7";
|
|
124
|
+
readonly surfaceLight: "#FFFFFF";
|
|
125
|
+
/** Text */
|
|
126
|
+
readonly textPrimary: "#FFFFFF";
|
|
127
|
+
readonly textSecondary: "#92C9A8";
|
|
128
|
+
readonly textMuted: "rgba(255,255,255,0.5)";
|
|
129
|
+
readonly textDimmed: "rgba(255,255,255,0.35)";
|
|
130
|
+
/** Semantic */
|
|
131
|
+
readonly success: "#2BEE79";
|
|
132
|
+
readonly warning: "#F59E0B";
|
|
133
|
+
readonly error: "#F94040";
|
|
134
|
+
readonly info: "#4290FF";
|
|
135
|
+
/** Network / Layer */
|
|
136
|
+
readonly network: {
|
|
137
|
+
readonly bitcoin: "#F7931A";
|
|
138
|
+
readonly rgb: "#DD352E";
|
|
139
|
+
readonly arkade: "#7C3AED";
|
|
140
|
+
readonly spark: "#FF6D00";
|
|
141
|
+
readonly lightning: "#F6C343";
|
|
142
|
+
};
|
|
143
|
+
/** Transaction direction */
|
|
144
|
+
readonly tx: {
|
|
145
|
+
readonly sent: "#F94040";
|
|
146
|
+
readonly receive: "#2BEE79";
|
|
147
|
+
readonly swap: "#4290FF";
|
|
148
|
+
};
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* KaleidoSwap Typography Tokens
|
|
153
|
+
*/
|
|
154
|
+
declare const fontFamily: {
|
|
155
|
+
readonly display: "'Geist Sans', system-ui, -apple-system, sans-serif";
|
|
156
|
+
readonly mono: "'Geist Mono', monospace";
|
|
157
|
+
};
|
|
158
|
+
/**
|
|
159
|
+
* Type scale — [fontSize, lineHeight]
|
|
160
|
+
*/
|
|
161
|
+
declare const typeScale: {
|
|
162
|
+
readonly xxs: readonly ["10px", "14px"];
|
|
163
|
+
readonly tiny: readonly ["11px", "16px"];
|
|
164
|
+
readonly caption: readonly ["13px", "18px"];
|
|
165
|
+
readonly body: readonly ["15px", "22px"];
|
|
166
|
+
readonly subhead: readonly ["17px", "24px"];
|
|
167
|
+
readonly title: readonly ["20px", "28px"];
|
|
168
|
+
readonly headline: readonly ["28px", "34px"];
|
|
169
|
+
readonly display: readonly ["36px", "40px"];
|
|
170
|
+
};
|
|
171
|
+
declare const fontWeight: {
|
|
172
|
+
readonly normal: "400";
|
|
173
|
+
readonly medium: "500";
|
|
174
|
+
readonly semibold: "600";
|
|
175
|
+
readonly bold: "700";
|
|
176
|
+
};
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* KaleidoSwap Border Radius Tokens
|
|
180
|
+
*/
|
|
181
|
+
declare const radius: {
|
|
182
|
+
readonly sm: "8px";
|
|
183
|
+
readonly md: "12px";
|
|
184
|
+
readonly lg: "16px";
|
|
185
|
+
readonly xl: "20px";
|
|
186
|
+
readonly card: "20px";
|
|
187
|
+
readonly panel: "22px";
|
|
188
|
+
readonly pill: "24px";
|
|
189
|
+
readonly nav: "14px";
|
|
190
|
+
readonly full: "9999px";
|
|
191
|
+
};
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* KaleidoSwap Shadow Tokens
|
|
195
|
+
*/
|
|
196
|
+
declare const shadow: {
|
|
197
|
+
readonly glow: "0 0 20px rgba(43, 238, 121, 0.15)";
|
|
198
|
+
readonly glowStrong: "0 0 30px rgba(43, 238, 121, 0.3)";
|
|
199
|
+
readonly glowSubtle: "0 0 15px rgba(43, 238, 121, 0.15)";
|
|
200
|
+
readonly glowAccent: "0 4px 30px rgba(43, 238, 121, 0.25)";
|
|
201
|
+
};
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* KaleidoSwap Transition Tokens
|
|
205
|
+
*/
|
|
206
|
+
declare const transition: {
|
|
207
|
+
readonly fast: "150ms ease-out";
|
|
208
|
+
readonly default: "200ms ease-out";
|
|
209
|
+
readonly slow: "300ms ease-out";
|
|
210
|
+
};
|
|
211
|
+
|
|
212
|
+
export { AlertBanner, KaleidoThemeProvider, NetworkBadge, type NetworkType, SectionLabel, StatusBadge, type StatusType, colors, fontFamily, fontWeight, kaleidoswapBrandConfig, kaleidoswapTokens, radius, shadow, transition, typeScale };
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
export { AmountInput, AssetSelector, Balance, CryptoAddressInput, NetworkSelector, QRCode, SeedPhrase, ThemeProvider, TransactionItem, TransactionList, useTheme } from '@tetherto/wdk-uikit-react-native';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Brand configuration for WDK ThemeProvider.
|
|
7
|
+
*
|
|
8
|
+
* Usage:
|
|
9
|
+
* <ThemeProvider brandConfig={kaleidoswapBrandConfig}>
|
|
10
|
+
*/
|
|
11
|
+
declare const kaleidoswapBrandConfig: {
|
|
12
|
+
primaryColor: "#2BEE79";
|
|
13
|
+
secondaryColor: "#1FA855";
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Full custom theme tokens for more granular control.
|
|
17
|
+
*/
|
|
18
|
+
declare const kaleidoswapTokens: {
|
|
19
|
+
readonly colors: {
|
|
20
|
+
readonly primary: "#2BEE79";
|
|
21
|
+
readonly primaryDark: "#1FA855";
|
|
22
|
+
readonly primaryFg: "#102217";
|
|
23
|
+
readonly background: "#102217";
|
|
24
|
+
readonly surface: "#162E21";
|
|
25
|
+
readonly surfaceHighlight: "#243E30";
|
|
26
|
+
readonly border: "#244A35";
|
|
27
|
+
readonly textPrimary: "#FFFFFF";
|
|
28
|
+
readonly textSecondary: "#92C9A8";
|
|
29
|
+
readonly success: "#2BEE79";
|
|
30
|
+
readonly warning: "#F59E0B";
|
|
31
|
+
readonly error: "#F94040";
|
|
32
|
+
readonly info: "#4290FF";
|
|
33
|
+
readonly network: {
|
|
34
|
+
readonly bitcoin: "#F7931A";
|
|
35
|
+
readonly rgb: "#DD352E";
|
|
36
|
+
readonly arkade: "#7C3AED";
|
|
37
|
+
readonly spark: "#FF6D00";
|
|
38
|
+
readonly lightning: "#F6C343";
|
|
39
|
+
};
|
|
40
|
+
readonly tx: {
|
|
41
|
+
readonly sent: "#F94040";
|
|
42
|
+
readonly receive: "#2BEE79";
|
|
43
|
+
readonly swap: "#4290FF";
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
interface KaleidoThemeProviderProps {
|
|
49
|
+
children: ReactNode;
|
|
50
|
+
/** Override the default brand config */
|
|
51
|
+
brandConfig?: typeof kaleidoswapBrandConfig;
|
|
52
|
+
/** Default theme mode */
|
|
53
|
+
defaultMode?: 'light' | 'dark';
|
|
54
|
+
}
|
|
55
|
+
declare function KaleidoThemeProvider({ children, brandConfig, defaultMode, }: KaleidoThemeProviderProps): react_jsx_runtime.JSX.Element;
|
|
56
|
+
|
|
57
|
+
type StatusType = 'success' | 'pending' | 'failed' | 'completed' | 'error';
|
|
58
|
+
interface StatusBadgeProps {
|
|
59
|
+
status: StatusType;
|
|
60
|
+
style?: any;
|
|
61
|
+
}
|
|
62
|
+
declare function StatusBadge({ status, style }: StatusBadgeProps): react_jsx_runtime.JSX.Element;
|
|
63
|
+
|
|
64
|
+
type NetworkType = 'L1' | 'LN' | 'RGB20' | 'RGB21' | 'RGB-L1' | 'RGB-LN' | 'Spark' | 'Arkade';
|
|
65
|
+
interface NetworkBadgeProps {
|
|
66
|
+
network: NetworkType;
|
|
67
|
+
style?: any;
|
|
68
|
+
}
|
|
69
|
+
declare function NetworkBadge({ network, style }: NetworkBadgeProps): react_jsx_runtime.JSX.Element;
|
|
70
|
+
|
|
71
|
+
declare const variantConfig: {
|
|
72
|
+
readonly error: {
|
|
73
|
+
readonly bg: "#EF44441A";
|
|
74
|
+
readonly borderColor: "#EF444433";
|
|
75
|
+
readonly iconColor: "#F87171";
|
|
76
|
+
};
|
|
77
|
+
readonly warning: {
|
|
78
|
+
readonly bg: "#F59E0B1A";
|
|
79
|
+
readonly borderColor: "#F59E0B33";
|
|
80
|
+
readonly iconColor: "#FBBF24";
|
|
81
|
+
};
|
|
82
|
+
readonly info: {
|
|
83
|
+
readonly bg: "#3B82F61A";
|
|
84
|
+
readonly borderColor: "#3B82F633";
|
|
85
|
+
readonly iconColor: "#60A5FA";
|
|
86
|
+
};
|
|
87
|
+
readonly success: {
|
|
88
|
+
readonly bg: "#2BEE791A";
|
|
89
|
+
readonly borderColor: "#2BEE7933";
|
|
90
|
+
readonly iconColor: "#2BEE79";
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
interface AlertBannerProps {
|
|
94
|
+
variant?: keyof typeof variantConfig;
|
|
95
|
+
children: ReactNode;
|
|
96
|
+
style?: any;
|
|
97
|
+
}
|
|
98
|
+
declare function AlertBanner({ variant, children, style }: AlertBannerProps): react_jsx_runtime.JSX.Element;
|
|
99
|
+
|
|
100
|
+
interface SectionLabelProps {
|
|
101
|
+
children: ReactNode;
|
|
102
|
+
style?: any;
|
|
103
|
+
}
|
|
104
|
+
declare function SectionLabel({ children, style }: SectionLabelProps): react_jsx_runtime.JSX.Element;
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* KaleidoSwap Color Tokens
|
|
108
|
+
*
|
|
109
|
+
* Single source of truth for all color constants across web and native.
|
|
110
|
+
*/
|
|
111
|
+
declare const colors: {
|
|
112
|
+
/** Brand */
|
|
113
|
+
readonly primary: "#2BEE79";
|
|
114
|
+
readonly primaryDark: "#1FA855";
|
|
115
|
+
readonly primaryFg: "#102217";
|
|
116
|
+
/** Surfaces (dark theme — the default) */
|
|
117
|
+
readonly bgDark: "#102217";
|
|
118
|
+
readonly surfaceDark: "#162E21";
|
|
119
|
+
readonly surfaceHighlight: "#243E30";
|
|
120
|
+
readonly surfaceBorder: "#244A35";
|
|
121
|
+
readonly surfaceDarker: "#0B1810";
|
|
122
|
+
/** Surfaces (light theme) */
|
|
123
|
+
readonly bgLight: "#F6F8F7";
|
|
124
|
+
readonly surfaceLight: "#FFFFFF";
|
|
125
|
+
/** Text */
|
|
126
|
+
readonly textPrimary: "#FFFFFF";
|
|
127
|
+
readonly textSecondary: "#92C9A8";
|
|
128
|
+
readonly textMuted: "rgba(255,255,255,0.5)";
|
|
129
|
+
readonly textDimmed: "rgba(255,255,255,0.35)";
|
|
130
|
+
/** Semantic */
|
|
131
|
+
readonly success: "#2BEE79";
|
|
132
|
+
readonly warning: "#F59E0B";
|
|
133
|
+
readonly error: "#F94040";
|
|
134
|
+
readonly info: "#4290FF";
|
|
135
|
+
/** Network / Layer */
|
|
136
|
+
readonly network: {
|
|
137
|
+
readonly bitcoin: "#F7931A";
|
|
138
|
+
readonly rgb: "#DD352E";
|
|
139
|
+
readonly arkade: "#7C3AED";
|
|
140
|
+
readonly spark: "#FF6D00";
|
|
141
|
+
readonly lightning: "#F6C343";
|
|
142
|
+
};
|
|
143
|
+
/** Transaction direction */
|
|
144
|
+
readonly tx: {
|
|
145
|
+
readonly sent: "#F94040";
|
|
146
|
+
readonly receive: "#2BEE79";
|
|
147
|
+
readonly swap: "#4290FF";
|
|
148
|
+
};
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* KaleidoSwap Typography Tokens
|
|
153
|
+
*/
|
|
154
|
+
declare const fontFamily: {
|
|
155
|
+
readonly display: "'Geist Sans', system-ui, -apple-system, sans-serif";
|
|
156
|
+
readonly mono: "'Geist Mono', monospace";
|
|
157
|
+
};
|
|
158
|
+
/**
|
|
159
|
+
* Type scale — [fontSize, lineHeight]
|
|
160
|
+
*/
|
|
161
|
+
declare const typeScale: {
|
|
162
|
+
readonly xxs: readonly ["10px", "14px"];
|
|
163
|
+
readonly tiny: readonly ["11px", "16px"];
|
|
164
|
+
readonly caption: readonly ["13px", "18px"];
|
|
165
|
+
readonly body: readonly ["15px", "22px"];
|
|
166
|
+
readonly subhead: readonly ["17px", "24px"];
|
|
167
|
+
readonly title: readonly ["20px", "28px"];
|
|
168
|
+
readonly headline: readonly ["28px", "34px"];
|
|
169
|
+
readonly display: readonly ["36px", "40px"];
|
|
170
|
+
};
|
|
171
|
+
declare const fontWeight: {
|
|
172
|
+
readonly normal: "400";
|
|
173
|
+
readonly medium: "500";
|
|
174
|
+
readonly semibold: "600";
|
|
175
|
+
readonly bold: "700";
|
|
176
|
+
};
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* KaleidoSwap Border Radius Tokens
|
|
180
|
+
*/
|
|
181
|
+
declare const radius: {
|
|
182
|
+
readonly sm: "8px";
|
|
183
|
+
readonly md: "12px";
|
|
184
|
+
readonly lg: "16px";
|
|
185
|
+
readonly xl: "20px";
|
|
186
|
+
readonly card: "20px";
|
|
187
|
+
readonly panel: "22px";
|
|
188
|
+
readonly pill: "24px";
|
|
189
|
+
readonly nav: "14px";
|
|
190
|
+
readonly full: "9999px";
|
|
191
|
+
};
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* KaleidoSwap Shadow Tokens
|
|
195
|
+
*/
|
|
196
|
+
declare const shadow: {
|
|
197
|
+
readonly glow: "0 0 20px rgba(43, 238, 121, 0.15)";
|
|
198
|
+
readonly glowStrong: "0 0 30px rgba(43, 238, 121, 0.3)";
|
|
199
|
+
readonly glowSubtle: "0 0 15px rgba(43, 238, 121, 0.15)";
|
|
200
|
+
readonly glowAccent: "0 4px 30px rgba(43, 238, 121, 0.25)";
|
|
201
|
+
};
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* KaleidoSwap Transition Tokens
|
|
205
|
+
*/
|
|
206
|
+
declare const transition: {
|
|
207
|
+
readonly fast: "150ms ease-out";
|
|
208
|
+
readonly default: "200ms ease-out";
|
|
209
|
+
readonly slow: "300ms ease-out";
|
|
210
|
+
};
|
|
211
|
+
|
|
212
|
+
export { AlertBanner, KaleidoThemeProvider, NetworkBadge, type NetworkType, SectionLabel, StatusBadge, type StatusType, colors, fontFamily, fontWeight, kaleidoswapBrandConfig, kaleidoswapTokens, radius, shadow, transition, typeScale };
|
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
// src/native/provider.tsx
|
|
2
|
+
import { ThemeProvider } from "@tetherto/wdk-uikit-react-native";
|
|
3
|
+
|
|
4
|
+
// src/tokens/colors.ts
|
|
5
|
+
var colors = {
|
|
6
|
+
/** Brand */
|
|
7
|
+
primary: "#2BEE79",
|
|
8
|
+
primaryDark: "#1FA855",
|
|
9
|
+
primaryFg: "#102217",
|
|
10
|
+
/** Surfaces (dark theme — the default) */
|
|
11
|
+
bgDark: "#102217",
|
|
12
|
+
surfaceDark: "#162E21",
|
|
13
|
+
surfaceHighlight: "#243E30",
|
|
14
|
+
surfaceBorder: "#244A35",
|
|
15
|
+
surfaceDarker: "#0B1810",
|
|
16
|
+
/** Surfaces (light theme) */
|
|
17
|
+
bgLight: "#F6F8F7",
|
|
18
|
+
surfaceLight: "#FFFFFF",
|
|
19
|
+
/** Text */
|
|
20
|
+
textPrimary: "#FFFFFF",
|
|
21
|
+
textSecondary: "#92C9A8",
|
|
22
|
+
textMuted: "rgba(255,255,255,0.5)",
|
|
23
|
+
textDimmed: "rgba(255,255,255,0.35)",
|
|
24
|
+
/** Semantic */
|
|
25
|
+
success: "#2BEE79",
|
|
26
|
+
warning: "#F59E0B",
|
|
27
|
+
error: "#F94040",
|
|
28
|
+
info: "#4290FF",
|
|
29
|
+
/** Network / Layer */
|
|
30
|
+
network: {
|
|
31
|
+
bitcoin: "#F7931A",
|
|
32
|
+
rgb: "#DD352E",
|
|
33
|
+
arkade: "#7C3AED",
|
|
34
|
+
spark: "#FF6D00",
|
|
35
|
+
lightning: "#F6C343"
|
|
36
|
+
},
|
|
37
|
+
/** Transaction direction */
|
|
38
|
+
tx: {
|
|
39
|
+
sent: "#F94040",
|
|
40
|
+
receive: "#2BEE79",
|
|
41
|
+
swap: "#4290FF"
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
// src/native/theme.ts
|
|
46
|
+
var kaleidoswapBrandConfig = {
|
|
47
|
+
primaryColor: colors.primary,
|
|
48
|
+
secondaryColor: colors.primaryDark
|
|
49
|
+
};
|
|
50
|
+
var kaleidoswapTokens = {
|
|
51
|
+
colors: {
|
|
52
|
+
primary: colors.primary,
|
|
53
|
+
primaryDark: colors.primaryDark,
|
|
54
|
+
primaryFg: colors.primaryFg,
|
|
55
|
+
background: colors.bgDark,
|
|
56
|
+
surface: colors.surfaceDark,
|
|
57
|
+
surfaceHighlight: colors.surfaceHighlight,
|
|
58
|
+
border: colors.surfaceBorder,
|
|
59
|
+
textPrimary: colors.textPrimary,
|
|
60
|
+
textSecondary: colors.textSecondary,
|
|
61
|
+
success: colors.success,
|
|
62
|
+
warning: colors.warning,
|
|
63
|
+
error: colors.error,
|
|
64
|
+
info: colors.info,
|
|
65
|
+
network: colors.network,
|
|
66
|
+
tx: colors.tx
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
// src/native/provider.tsx
|
|
71
|
+
import { jsx } from "react/jsx-runtime";
|
|
72
|
+
function KaleidoThemeProvider({
|
|
73
|
+
children,
|
|
74
|
+
brandConfig,
|
|
75
|
+
defaultMode = "dark"
|
|
76
|
+
}) {
|
|
77
|
+
return /* @__PURE__ */ jsx(
|
|
78
|
+
ThemeProvider,
|
|
79
|
+
{
|
|
80
|
+
brandConfig: brandConfig ?? kaleidoswapBrandConfig,
|
|
81
|
+
defaultMode,
|
|
82
|
+
children
|
|
83
|
+
}
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// src/native/index.ts
|
|
88
|
+
import {
|
|
89
|
+
AmountInput,
|
|
90
|
+
AssetSelector,
|
|
91
|
+
NetworkSelector,
|
|
92
|
+
Balance,
|
|
93
|
+
CryptoAddressInput,
|
|
94
|
+
QRCode,
|
|
95
|
+
TransactionItem,
|
|
96
|
+
TransactionList,
|
|
97
|
+
SeedPhrase,
|
|
98
|
+
ThemeProvider as ThemeProvider2,
|
|
99
|
+
useTheme
|
|
100
|
+
} from "@tetherto/wdk-uikit-react-native";
|
|
101
|
+
|
|
102
|
+
// src/native/components/status-badge.tsx
|
|
103
|
+
import { View, Text, StyleSheet } from "react-native";
|
|
104
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
105
|
+
var statusConfig = {
|
|
106
|
+
success: { color: colors.primary, bg: `${colors.primary}1A`, borderColor: `${colors.primary}33`, label: "Success" },
|
|
107
|
+
completed: { color: colors.primary, bg: `${colors.primary}1A`, borderColor: `${colors.primary}33`, label: "Completed" },
|
|
108
|
+
pending: { color: "#EAB308", bg: "#EAB3081A", borderColor: "#EAB30833", label: "Pending" },
|
|
109
|
+
failed: { color: "#EF4444", bg: "#EF44441A", borderColor: "#EF444433", label: "Failed" },
|
|
110
|
+
error: { color: "#EF4444", bg: "#EF44441A", borderColor: "#EF444433", label: "Error" }
|
|
111
|
+
};
|
|
112
|
+
function StatusBadge({ status, style }) {
|
|
113
|
+
const config = statusConfig[status];
|
|
114
|
+
return /* @__PURE__ */ jsx2(View, { style: [styles.container, { backgroundColor: config.bg, borderColor: config.borderColor }, style], children: /* @__PURE__ */ jsx2(Text, { style: [styles.label, { color: config.color }], children: config.label }) });
|
|
115
|
+
}
|
|
116
|
+
var styles = StyleSheet.create({
|
|
117
|
+
container: {
|
|
118
|
+
flexDirection: "row",
|
|
119
|
+
alignItems: "center",
|
|
120
|
+
paddingHorizontal: 10,
|
|
121
|
+
paddingVertical: 4,
|
|
122
|
+
borderRadius: 9999,
|
|
123
|
+
borderWidth: 1
|
|
124
|
+
},
|
|
125
|
+
label: {
|
|
126
|
+
fontSize: 12,
|
|
127
|
+
fontWeight: "600"
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
// src/native/components/network-badge.tsx
|
|
132
|
+
import { View as View2, Text as Text2, StyleSheet as StyleSheet2 } from "react-native";
|
|
133
|
+
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
134
|
+
var networkConfig = {
|
|
135
|
+
L1: { color: colors.network.bitcoin, label: "L1" },
|
|
136
|
+
LN: { color: colors.network.lightning, label: "LN" },
|
|
137
|
+
RGB20: { color: colors.network.rgb, label: "RGB" },
|
|
138
|
+
RGB21: { color: colors.network.rgb, label: "RGB21" },
|
|
139
|
+
"RGB-L1": { color: colors.network.rgb, label: "RGB L1" },
|
|
140
|
+
"RGB-LN": { color: colors.network.rgb, label: "RGB LN" },
|
|
141
|
+
Spark: { color: colors.network.spark, label: "Spark" },
|
|
142
|
+
Arkade: { color: colors.network.arkade, label: "Arkade" }
|
|
143
|
+
};
|
|
144
|
+
function NetworkBadge({ network, style }) {
|
|
145
|
+
const config = networkConfig[network];
|
|
146
|
+
return /* @__PURE__ */ jsx3(View2, { style: [styles2.container, { backgroundColor: `${config.color}1A`, borderColor: `${config.color}33` }, style], children: /* @__PURE__ */ jsx3(Text2, { style: [styles2.label, { color: config.color }], children: config.label }) });
|
|
147
|
+
}
|
|
148
|
+
var styles2 = StyleSheet2.create({
|
|
149
|
+
container: {
|
|
150
|
+
flexDirection: "row",
|
|
151
|
+
alignItems: "center",
|
|
152
|
+
justifyContent: "center",
|
|
153
|
+
paddingHorizontal: 8,
|
|
154
|
+
paddingVertical: 2,
|
|
155
|
+
borderRadius: 9999,
|
|
156
|
+
borderWidth: 1
|
|
157
|
+
},
|
|
158
|
+
label: {
|
|
159
|
+
fontSize: 10,
|
|
160
|
+
fontWeight: "700"
|
|
161
|
+
}
|
|
162
|
+
});
|
|
163
|
+
|
|
164
|
+
// src/native/components/alert-banner.tsx
|
|
165
|
+
import { View as View3, Text as Text3, StyleSheet as StyleSheet3 } from "react-native";
|
|
166
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
167
|
+
var variantConfig = {
|
|
168
|
+
error: { bg: "#EF44441A", borderColor: "#EF444433", iconColor: "#F87171" },
|
|
169
|
+
warning: { bg: "#F59E0B1A", borderColor: "#F59E0B33", iconColor: "#FBBF24" },
|
|
170
|
+
info: { bg: "#3B82F61A", borderColor: "#3B82F633", iconColor: "#60A5FA" },
|
|
171
|
+
success: { bg: `${colors.primary}1A`, borderColor: `${colors.primary}33`, iconColor: colors.primary }
|
|
172
|
+
};
|
|
173
|
+
function AlertBanner({ variant = "info", children, style }) {
|
|
174
|
+
const config = variantConfig[variant];
|
|
175
|
+
return /* @__PURE__ */ jsx4(View3, { style: [styles3.container, { backgroundColor: config.bg, borderColor: config.borderColor }, style], children: typeof children === "string" ? /* @__PURE__ */ jsx4(Text3, { style: styles3.text, children }) : children });
|
|
176
|
+
}
|
|
177
|
+
var styles3 = StyleSheet3.create({
|
|
178
|
+
container: {
|
|
179
|
+
borderRadius: 12,
|
|
180
|
+
borderWidth: 1,
|
|
181
|
+
padding: 12,
|
|
182
|
+
flexDirection: "row",
|
|
183
|
+
alignItems: "flex-start",
|
|
184
|
+
gap: 8
|
|
185
|
+
},
|
|
186
|
+
text: {
|
|
187
|
+
fontSize: 14,
|
|
188
|
+
color: "#FFFFFF",
|
|
189
|
+
flex: 1
|
|
190
|
+
}
|
|
191
|
+
});
|
|
192
|
+
|
|
193
|
+
// src/native/components/section-label.tsx
|
|
194
|
+
import { Text as Text4, StyleSheet as StyleSheet4 } from "react-native";
|
|
195
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
196
|
+
function SectionLabel({ children, style }) {
|
|
197
|
+
return /* @__PURE__ */ jsx5(Text4, { style: [styles4.label, style], children: typeof children === "string" ? children.toUpperCase() : children });
|
|
198
|
+
}
|
|
199
|
+
var styles4 = StyleSheet4.create({
|
|
200
|
+
label: {
|
|
201
|
+
fontSize: 10,
|
|
202
|
+
fontWeight: "900",
|
|
203
|
+
letterSpacing: 2.2,
|
|
204
|
+
color: "rgba(255, 255, 255, 0.3)"
|
|
205
|
+
}
|
|
206
|
+
});
|
|
207
|
+
|
|
208
|
+
// src/tokens/typography.ts
|
|
209
|
+
var fontFamily = {
|
|
210
|
+
display: "'Geist Sans', system-ui, -apple-system, sans-serif",
|
|
211
|
+
mono: "'Geist Mono', monospace"
|
|
212
|
+
};
|
|
213
|
+
var typeScale = {
|
|
214
|
+
xxs: ["10px", "14px"],
|
|
215
|
+
tiny: ["11px", "16px"],
|
|
216
|
+
caption: ["13px", "18px"],
|
|
217
|
+
body: ["15px", "22px"],
|
|
218
|
+
subhead: ["17px", "24px"],
|
|
219
|
+
title: ["20px", "28px"],
|
|
220
|
+
headline: ["28px", "34px"],
|
|
221
|
+
display: ["36px", "40px"]
|
|
222
|
+
};
|
|
223
|
+
var fontWeight = {
|
|
224
|
+
normal: "400",
|
|
225
|
+
medium: "500",
|
|
226
|
+
semibold: "600",
|
|
227
|
+
bold: "700"
|
|
228
|
+
};
|
|
229
|
+
|
|
230
|
+
// src/tokens/radius.ts
|
|
231
|
+
var radius = {
|
|
232
|
+
sm: "8px",
|
|
233
|
+
md: "12px",
|
|
234
|
+
lg: "16px",
|
|
235
|
+
xl: "20px",
|
|
236
|
+
card: "20px",
|
|
237
|
+
panel: "22px",
|
|
238
|
+
pill: "24px",
|
|
239
|
+
nav: "14px",
|
|
240
|
+
full: "9999px"
|
|
241
|
+
};
|
|
242
|
+
|
|
243
|
+
// src/tokens/shadows.ts
|
|
244
|
+
var shadow = {
|
|
245
|
+
glow: "0 0 20px rgba(43, 238, 121, 0.15)",
|
|
246
|
+
glowStrong: "0 0 30px rgba(43, 238, 121, 0.3)",
|
|
247
|
+
glowSubtle: "0 0 15px rgba(43, 238, 121, 0.15)",
|
|
248
|
+
glowAccent: "0 4px 30px rgba(43, 238, 121, 0.25)"
|
|
249
|
+
};
|
|
250
|
+
|
|
251
|
+
// src/tokens/transitions.ts
|
|
252
|
+
var transition = {
|
|
253
|
+
fast: "150ms ease-out",
|
|
254
|
+
default: "200ms ease-out",
|
|
255
|
+
slow: "300ms ease-out"
|
|
256
|
+
};
|
|
257
|
+
export {
|
|
258
|
+
AlertBanner,
|
|
259
|
+
AmountInput,
|
|
260
|
+
AssetSelector,
|
|
261
|
+
Balance,
|
|
262
|
+
CryptoAddressInput,
|
|
263
|
+
KaleidoThemeProvider,
|
|
264
|
+
NetworkBadge,
|
|
265
|
+
NetworkSelector,
|
|
266
|
+
QRCode,
|
|
267
|
+
SectionLabel,
|
|
268
|
+
SeedPhrase,
|
|
269
|
+
StatusBadge,
|
|
270
|
+
ThemeProvider2 as ThemeProvider,
|
|
271
|
+
TransactionItem,
|
|
272
|
+
TransactionList,
|
|
273
|
+
colors,
|
|
274
|
+
fontFamily,
|
|
275
|
+
fontWeight,
|
|
276
|
+
kaleidoswapBrandConfig,
|
|
277
|
+
kaleidoswapTokens,
|
|
278
|
+
radius,
|
|
279
|
+
shadow,
|
|
280
|
+
transition,
|
|
281
|
+
typeScale,
|
|
282
|
+
useTheme
|
|
283
|
+
};
|