@coinbase/cdp-react 0.0.10 → 0.0.12
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 +4 -4
- package/dist/assets/Button.css +1 -1
- package/dist/assets/Error.css +1 -1
- package/dist/assets/Field.css +1 -1
- package/dist/assets/Input.css +1 -1
- package/dist/assets/LoadingSkeleton.css +1 -1
- package/dist/assets/LoadingSpinner.css +1 -1
- package/dist/assets/OTP.css +1 -1
- package/dist/assets/SignIn.css +1 -1
- package/dist/assets/SignInDescription.css +1 -0
- package/dist/assets/SignInForm.css +1 -0
- package/dist/assets/SignInImage.css +1 -0
- package/dist/assets/SignInModal.css +1 -1
- package/dist/assets/SignInTitle.css +1 -0
- package/dist/assets/SignOutButton.css +1 -1
- package/dist/assets/VisuallyHidden.css +1 -1
- package/dist/components/AuthButton/index.d.ts +7 -1
- package/dist/components/AuthButton/index.js +51 -31
- package/dist/components/Button/index.js +38 -22
- package/dist/components/Field/index.js +11 -11
- package/dist/components/LoadingSpinner/index.js +7 -7
- package/dist/components/OTP/index.js +26 -25
- package/dist/components/SignIn/SignInDescription.js +20 -18
- package/dist/components/SignIn/SignInForm.js +113 -102
- package/dist/components/SignIn/SignInImage.js +13 -11
- package/dist/components/SignIn/SignInTitle.js +12 -11
- package/dist/components/SignIn/index.js +22 -21
- package/dist/components/SignInModal/index.js +29 -29
- package/dist/components/SignOutButton/index.js +7 -7
- package/dist/components/ThemeProvider/index.d.ts +1 -3
- package/dist/components/ThemeProvider/index.js +7 -7
- package/dist/components/VisuallyHidden/index.js +4 -4
- package/dist/index.js +45 -39
- package/dist/theme/cssVariables.d.ts +5 -0
- package/dist/theme/cssVariables.js +10 -0
- package/dist/theme/index.d.ts +1 -0
- package/dist/theme/index.js +14 -8
- package/dist/theme/theme.d.ts +237 -33
- package/dist/theme/theme.js +3 -3
- package/dist/theme/tokens.d.ts +679 -45
- package/dist/theme/tokens.js +142 -43
- package/dist/theme/utils.d.ts +14 -2
- package/dist/theme/utils.js +23 -14
- package/package.json +9 -5
- package/dist/chunks/SignIn.module.Dl3CqKQ_.js +0 -20
package/dist/index.js
CHANGED
|
@@ -1,48 +1,54 @@
|
|
|
1
1
|
import { CDPReactProvider as e, useAppConfig as t } from "./components/CDPReactProvider/index.js";
|
|
2
2
|
import { AuthButton as m } from "./components/AuthButton/index.js";
|
|
3
|
-
import { SignIn as
|
|
3
|
+
import { SignIn as i } from "./components/SignIn/index.js";
|
|
4
4
|
import { useSignInReducer as x } from "./components/SignIn/useSignInReducer.js";
|
|
5
|
-
import { SignOutButton as
|
|
6
|
-
import { SignInModal as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
5
|
+
import { SignOutButton as c } from "./components/SignOutButton/index.js";
|
|
6
|
+
import { SignInModal as l } from "./components/SignInModal/index.js";
|
|
7
|
+
import { ThemeProvider as g, useTheme as S } from "./components/ThemeProvider/index.js";
|
|
8
|
+
import { cssVariables as C } from "./theme/cssVariables.js";
|
|
9
|
+
import { theme as d } from "./theme/theme.js";
|
|
10
|
+
import { colors as T, colorsBase as b, colorsComponents as v, colorsSemantic as A, font as B, tokens as E } from "./theme/tokens.js";
|
|
11
|
+
import { flattenTokensObject as D, themeToCssVariables as M } from "./theme/utils.js";
|
|
12
|
+
import { IconCheckCircle as R } from "./icons/IconCheckCircle.js";
|
|
13
|
+
import { IconExclamationCircle as j } from "./icons/IconExclamationCircle.js";
|
|
14
|
+
import { IconLock as L } from "./icons/IconLock.js";
|
|
15
|
+
import { IconXMark as q } from "./icons/IconXMark.js";
|
|
16
|
+
import { isEmailInvalid as y } from "./utils/isEmailInvalid.js";
|
|
17
|
+
import { isApiError as G } from "./utils/isApiError.js";
|
|
18
|
+
import { SignInDescription as J } from "./components/SignIn/SignInDescription.js";
|
|
19
|
+
import { SignInForm as N } from "./components/SignIn/SignInForm.js";
|
|
20
|
+
import { SignInImage as U } from "./components/SignIn/SignInImage.js";
|
|
21
|
+
import { SignInTitle as Y } from "./components/SignIn/SignInTitle.js";
|
|
22
|
+
import { useSignInContext as _ } from "./components/SignIn/SignInProvider.js";
|
|
22
23
|
export {
|
|
23
24
|
m as AuthButton,
|
|
24
25
|
e as CDPReactProvider,
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
26
|
+
R as IconCheckCircle,
|
|
27
|
+
j as IconExclamationCircle,
|
|
28
|
+
L as IconLock,
|
|
29
|
+
q as IconXMark,
|
|
30
|
+
i as SignIn,
|
|
31
|
+
J as SignInDescription,
|
|
32
|
+
N as SignInForm,
|
|
33
|
+
U as SignInImage,
|
|
34
|
+
l as SignInModal,
|
|
35
|
+
Y as SignInTitle,
|
|
36
|
+
c as SignOutButton,
|
|
37
|
+
g as ThemeProvider,
|
|
38
|
+
T as colors,
|
|
39
|
+
b as colorsBase,
|
|
40
|
+
v as colorsComponents,
|
|
41
|
+
A as colorsSemantic,
|
|
42
|
+
C as cssVariables,
|
|
43
|
+
D as flattenTokensObject,
|
|
44
|
+
B as font,
|
|
45
|
+
G as isApiError,
|
|
46
|
+
y as isEmailInvalid,
|
|
47
|
+
d as theme,
|
|
48
|
+
M as themeToCssVariables,
|
|
49
|
+
E as tokens,
|
|
44
50
|
t as useAppConfig,
|
|
45
|
-
|
|
51
|
+
_ as useSignInContext,
|
|
46
52
|
x as useSignInReducer,
|
|
47
|
-
|
|
53
|
+
S as useTheme
|
|
48
54
|
};
|
package/dist/theme/index.d.ts
CHANGED
package/dist/theme/index.js
CHANGED
|
@@ -1,10 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { cssVariables as r } from "./cssVariables.js";
|
|
2
|
+
import { theme as t } from "./theme.js";
|
|
3
|
+
import { colors as a, colorsBase as c, colorsComponents as l, colorsSemantic as n, font as f, tokens as p } from "./tokens.js";
|
|
4
|
+
import { flattenTokensObject as b, themeToCssVariables as i } from "./utils.js";
|
|
4
5
|
export {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
a as colors,
|
|
7
|
+
c as colorsBase,
|
|
8
|
+
l as colorsComponents,
|
|
9
|
+
n as colorsSemantic,
|
|
10
|
+
r as cssVariables,
|
|
11
|
+
b as flattenTokensObject,
|
|
12
|
+
f as font,
|
|
13
|
+
t as theme,
|
|
14
|
+
i as themeToCssVariables,
|
|
15
|
+
p as tokens
|
|
10
16
|
};
|
package/dist/theme/theme.d.ts
CHANGED
|
@@ -1,38 +1,242 @@
|
|
|
1
|
-
|
|
1
|
+
import { colorsSemantic, colorsComponents, font } from './tokens';
|
|
2
|
+
import { Flattened } from './utils';
|
|
3
|
+
export declare const theme: Flattened<{
|
|
2
4
|
colors: {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
5
|
+
readonly page: {
|
|
6
|
+
readonly bg: {
|
|
7
|
+
readonly default: {
|
|
8
|
+
readonly value: "{colors.bg.default}";
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
readonly border: {
|
|
12
|
+
readonly default: {
|
|
13
|
+
readonly value: "{colors.line.default}";
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
readonly text: {
|
|
17
|
+
readonly default: {
|
|
18
|
+
readonly value: "{colors.fg.default}";
|
|
19
|
+
};
|
|
20
|
+
readonly muted: {
|
|
21
|
+
readonly value: "{colors.fg.muted}";
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
readonly cta: {
|
|
26
|
+
readonly primary: {
|
|
27
|
+
readonly bg: {
|
|
28
|
+
readonly default: {
|
|
29
|
+
readonly value: "{colors.bg.primary}";
|
|
30
|
+
};
|
|
31
|
+
readonly hover: {
|
|
32
|
+
readonly value: "{colors.bg.primary}";
|
|
33
|
+
readonly modify: {
|
|
34
|
+
readonly type: "alpha";
|
|
35
|
+
readonly value: "0.9";
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
readonly border: {
|
|
40
|
+
readonly focus: {
|
|
41
|
+
readonly value: "{colors.line.primary}";
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
readonly text: {
|
|
45
|
+
readonly default: {
|
|
46
|
+
readonly value: "{colors.fg.onPrimary}";
|
|
47
|
+
};
|
|
48
|
+
readonly hover: {
|
|
49
|
+
readonly value: "{colors.fg.onPrimary}";
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
readonly secondary: {
|
|
54
|
+
readonly bg: {
|
|
55
|
+
readonly default: {
|
|
56
|
+
readonly value: "{colors.bg.secondary}";
|
|
57
|
+
};
|
|
58
|
+
readonly hover: {
|
|
59
|
+
readonly value: "{colors.bg.secondary}";
|
|
60
|
+
readonly modify: {
|
|
61
|
+
readonly type: "alpha";
|
|
62
|
+
readonly value: "0.9";
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
readonly border: {
|
|
67
|
+
readonly focus: {
|
|
68
|
+
readonly value: "{colors.line.primary}";
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
readonly text: {
|
|
72
|
+
readonly default: {
|
|
73
|
+
readonly value: "{colors.fg.onSecondary}";
|
|
74
|
+
};
|
|
75
|
+
readonly hover: {
|
|
76
|
+
readonly value: "{colors.fg.onSecondary}";
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
readonly link: {
|
|
82
|
+
readonly primary: {
|
|
83
|
+
readonly text: {
|
|
84
|
+
readonly default: {
|
|
85
|
+
readonly value: "{colors.fg.primary}";
|
|
86
|
+
};
|
|
87
|
+
readonly hover: {
|
|
88
|
+
readonly value: "{colors.fg.primary}";
|
|
89
|
+
readonly modify: {
|
|
90
|
+
readonly type: "alpha";
|
|
91
|
+
readonly value: "0.9";
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
readonly secondary: {
|
|
97
|
+
readonly text: {
|
|
98
|
+
readonly default: {
|
|
99
|
+
readonly value: "{colors.fg.default}";
|
|
100
|
+
};
|
|
101
|
+
readonly hover: {
|
|
102
|
+
readonly value: "{colors.fg.default}";
|
|
103
|
+
readonly modify: {
|
|
104
|
+
readonly type: "alpha";
|
|
105
|
+
readonly value: "0.9";
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
readonly input: {
|
|
112
|
+
readonly bg: {
|
|
113
|
+
readonly default: {
|
|
114
|
+
readonly value: "{colors.bg.default}";
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
readonly border: {
|
|
118
|
+
readonly default: {
|
|
119
|
+
readonly value: "{colors.line.heavy}";
|
|
120
|
+
};
|
|
121
|
+
readonly focus: {
|
|
122
|
+
readonly value: "{colors.line.primary}";
|
|
123
|
+
};
|
|
124
|
+
readonly error: {
|
|
125
|
+
readonly value: "{colors.line.negative}";
|
|
126
|
+
};
|
|
127
|
+
};
|
|
128
|
+
readonly label: {
|
|
129
|
+
readonly default: {
|
|
130
|
+
readonly value: "{colors.fg.default}";
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
readonly placeholder: {
|
|
134
|
+
readonly default: {
|
|
135
|
+
readonly value: "{colors.fg.muted}";
|
|
136
|
+
};
|
|
137
|
+
};
|
|
138
|
+
readonly text: {
|
|
139
|
+
readonly default: {
|
|
140
|
+
readonly value: "{colors.fg.default}";
|
|
141
|
+
};
|
|
142
|
+
};
|
|
143
|
+
readonly errorText: {
|
|
144
|
+
readonly default: {
|
|
145
|
+
readonly value: "{colors.fg.negative}";
|
|
146
|
+
};
|
|
147
|
+
};
|
|
148
|
+
};
|
|
149
|
+
readonly bg: {
|
|
150
|
+
readonly default: {
|
|
151
|
+
readonly value: "#ffffff";
|
|
152
|
+
};
|
|
153
|
+
readonly alternate: {
|
|
154
|
+
readonly value: "#eef0f3";
|
|
155
|
+
};
|
|
156
|
+
readonly overlay: {
|
|
157
|
+
readonly value: "{colors.bg.alternate}";
|
|
158
|
+
readonly modify: {
|
|
159
|
+
readonly type: "alpha";
|
|
160
|
+
readonly value: 0.33;
|
|
161
|
+
};
|
|
162
|
+
};
|
|
163
|
+
readonly skeleton: {
|
|
164
|
+
readonly value: "{colors.fg.default}";
|
|
165
|
+
readonly modify: {
|
|
166
|
+
readonly type: "alpha";
|
|
167
|
+
readonly value: 0.1;
|
|
168
|
+
};
|
|
169
|
+
};
|
|
170
|
+
readonly primary: {
|
|
171
|
+
readonly value: "#0052ff";
|
|
172
|
+
};
|
|
173
|
+
readonly secondary: {
|
|
174
|
+
readonly value: "#eef0f3";
|
|
175
|
+
};
|
|
176
|
+
};
|
|
177
|
+
readonly fg: {
|
|
178
|
+
readonly default: {
|
|
179
|
+
readonly value: "#0a0b0d";
|
|
180
|
+
};
|
|
181
|
+
readonly muted: {
|
|
182
|
+
readonly value: "#5b616e";
|
|
183
|
+
};
|
|
184
|
+
readonly primary: {
|
|
185
|
+
readonly value: "#0052ff";
|
|
186
|
+
};
|
|
187
|
+
readonly onPrimary: {
|
|
188
|
+
readonly value: "#ffffff";
|
|
189
|
+
};
|
|
190
|
+
readonly onSecondary: {
|
|
191
|
+
readonly value: "#0a0b0d";
|
|
192
|
+
};
|
|
193
|
+
readonly positive: {
|
|
194
|
+
readonly value: "#008531";
|
|
195
|
+
};
|
|
196
|
+
readonly negative: {
|
|
197
|
+
readonly value: "#cf202f";
|
|
198
|
+
};
|
|
199
|
+
};
|
|
200
|
+
readonly line: {
|
|
201
|
+
readonly default: {
|
|
202
|
+
readonly value: "#dcdfe4";
|
|
203
|
+
};
|
|
204
|
+
readonly heavy: {
|
|
205
|
+
readonly value: "#9397a0";
|
|
206
|
+
};
|
|
207
|
+
readonly primary: {
|
|
208
|
+
readonly value: "{colors.fg.primary}";
|
|
209
|
+
};
|
|
210
|
+
readonly positive: {
|
|
211
|
+
readonly value: "{colors.fg.positive}";
|
|
212
|
+
};
|
|
213
|
+
readonly negative: {
|
|
214
|
+
readonly value: "{colors.fg.negative}";
|
|
215
|
+
};
|
|
216
|
+
};
|
|
31
217
|
};
|
|
32
|
-
|
|
33
|
-
|
|
218
|
+
font: {
|
|
219
|
+
readonly family: {
|
|
220
|
+
readonly sans: {
|
|
221
|
+
readonly value: "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"";
|
|
222
|
+
};
|
|
223
|
+
};
|
|
224
|
+
readonly size: {
|
|
225
|
+
readonly base: {
|
|
226
|
+
readonly value: 16;
|
|
227
|
+
};
|
|
228
|
+
};
|
|
34
229
|
};
|
|
35
|
-
fontSizeBase: number;
|
|
36
230
|
}>;
|
|
37
|
-
export type
|
|
231
|
+
export type SemanticColors = Flattened<{
|
|
232
|
+
colors: typeof colorsSemantic;
|
|
233
|
+
}>;
|
|
234
|
+
export type ComponentColors = Flattened<{
|
|
235
|
+
colors: typeof colorsComponents;
|
|
236
|
+
}>;
|
|
237
|
+
export type FontTokens = Flattened<{
|
|
238
|
+
font: typeof font;
|
|
239
|
+
}>;
|
|
240
|
+
export type ColorTokens = SemanticColors | ComponentColors;
|
|
241
|
+
export type Theme = ColorTokens & FontTokens;
|
|
38
242
|
export type ButtonVariant = "primary" | "secondary" | "transparentPrimary" | "transparentSecondary";
|
package/dist/theme/theme.js
CHANGED