flowlink-auth 2.8.0 → 2.8.1
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/SignUp.js +275 -261
- package/dist/index.js +7 -4604
- package/package.json +1 -1
- package/dist/AuthClient.js +0 -2822
- package/dist/Protected.js +0 -2628
- package/dist/index.css +0 -694
package/dist/SignUp.js
CHANGED
|
@@ -22,19 +22,25 @@ function SignUp({ agency = { name: "MyApp", logo: "" } }) {
|
|
|
22
22
|
const toastId = useRef(0);
|
|
23
23
|
const [toasts, setToasts] = useState([]);
|
|
24
24
|
useEffect(() => {
|
|
25
|
+
const meta = document.createElement("meta");
|
|
26
|
+
meta.name = "viewport";
|
|
27
|
+
meta.content = "width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no";
|
|
28
|
+
document.head.appendChild(meta);
|
|
25
29
|
return () => {
|
|
26
30
|
if (redirectTimer.current) clearTimeout(redirectTimer.current);
|
|
27
|
-
|
|
31
|
+
const existing = document.querySelector('meta[name="viewport"]');
|
|
32
|
+
if (existing && existing.content === meta.content) {
|
|
33
|
+
document.head.removeChild(existing);
|
|
34
|
+
}
|
|
35
|
+
toasts.forEach((t) => {
|
|
36
|
+
if (t._timer) clearTimeout(t._timer);
|
|
37
|
+
});
|
|
28
38
|
};
|
|
29
39
|
}, []);
|
|
30
40
|
function showToast(type, message, ms = 5e3) {
|
|
31
41
|
const id = ++toastId.current;
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
setToasts((prev) => {
|
|
35
|
-
const next = [t, ...prev].slice(0, 6);
|
|
36
|
-
return next;
|
|
37
|
-
});
|
|
42
|
+
const t = { id, type, message, _timer: null };
|
|
43
|
+
setToasts((prev) => [t, ...prev].slice(0, 6));
|
|
38
44
|
const timer = setTimeout(() => {
|
|
39
45
|
setToasts((prev) => prev.filter((x) => x.id !== id));
|
|
40
46
|
}, ms);
|
|
@@ -43,7 +49,7 @@ function SignUp({ agency = { name: "MyApp", logo: "" } }) {
|
|
|
43
49
|
function removeToast(id) {
|
|
44
50
|
setToasts((prev) => {
|
|
45
51
|
prev.forEach((t) => {
|
|
46
|
-
if (t.id === id) clearTimeout(t._timer);
|
|
52
|
+
if (t.id === id && t._timer) clearTimeout(t._timer);
|
|
47
53
|
});
|
|
48
54
|
return prev.filter((x) => x.id !== id);
|
|
49
55
|
});
|
|
@@ -85,8 +91,8 @@ function SignUp({ agency = { name: "MyApp", logo: "" } }) {
|
|
|
85
91
|
body: JSON.stringify({ name: name.trim(), email: email.trim(), password })
|
|
86
92
|
});
|
|
87
93
|
const data = await res.json().catch(async () => {
|
|
88
|
-
const
|
|
89
|
-
return { _raw:
|
|
94
|
+
const txt = await res.text().catch(() => "");
|
|
95
|
+
return { _raw: txt };
|
|
90
96
|
});
|
|
91
97
|
if (!res.ok) {
|
|
92
98
|
const errMsg = data?.error || data?._raw || `Signup failed (${res.status})`;
|
|
@@ -117,9 +123,7 @@ function SignUp({ agency = { name: "MyApp", logo: "" } }) {
|
|
|
117
123
|
const callbackUrl = encodeURIComponent(`${typeof window !== "undefined" ? window.location.origin : ""}/signup`);
|
|
118
124
|
const sdkBase = baseUrl || (typeof window !== "undefined" ? window.location.origin.replace(/\/+$/, "") : "");
|
|
119
125
|
const startUrl = `${sdkBase}/sdk/auth/start?rid=${rid}&source=${encodeURIComponent(provider)}&callbackUrl=${callbackUrl}`;
|
|
120
|
-
if (!publishableKey)
|
|
121
|
-
throw new Error("Missing publishable key (client side).");
|
|
122
|
-
}
|
|
126
|
+
if (!publishableKey) throw new Error("Missing publishable key (client side).");
|
|
123
127
|
const res = await fetch(startUrl, {
|
|
124
128
|
method: "GET",
|
|
125
129
|
headers: { "x-publishable-key": publishableKey }
|
|
@@ -142,18 +146,17 @@ function SignUp({ agency = { name: "MyApp", logo: "" } }) {
|
|
|
142
146
|
if (e && typeof e.preventDefault === "function") e.preventDefault();
|
|
143
147
|
startOAuthFlow("github");
|
|
144
148
|
};
|
|
145
|
-
return /* @__PURE__ */ React.createElement("div", { style: overlay }, /* @__PURE__ */ React.createElement("div", { style: toastContainer }, toasts.map((t) => /* @__PURE__ */ React.createElement(
|
|
149
|
+
return /* @__PURE__ */ React.createElement("div", { style: styles.overlay }, /* @__PURE__ */ React.createElement("div", { style: styles.toastContainer, "aria-live": "polite", "aria-atomic": "true" }, toasts.map((t) => /* @__PURE__ */ React.createElement(
|
|
146
150
|
"div",
|
|
147
151
|
{
|
|
148
152
|
key: t.id,
|
|
149
153
|
role: "status",
|
|
150
|
-
"aria-live": "polite",
|
|
151
154
|
style: {
|
|
152
|
-
...toastBase,
|
|
153
|
-
...t.type === "error" ? toastError : t.type === "success" ? toastSuccess : toastInfo
|
|
155
|
+
...styles.toastBase,
|
|
156
|
+
...t.type === "error" ? styles.toastError : t.type === "success" ? styles.toastSuccess : styles.toastInfo
|
|
154
157
|
},
|
|
155
158
|
onMouseEnter: () => {
|
|
156
|
-
clearTimeout(t._timer);
|
|
159
|
+
if (t._timer) clearTimeout(t._timer);
|
|
157
160
|
},
|
|
158
161
|
onMouseLeave: () => {
|
|
159
162
|
const timer = setTimeout(() => removeToast(t.id), 3e3);
|
|
@@ -161,13 +164,13 @@ function SignUp({ agency = { name: "MyApp", logo: "" } }) {
|
|
|
161
164
|
}
|
|
162
165
|
},
|
|
163
166
|
/* @__PURE__ */ React.createElement("div", { style: { flex: 1 } }, t.message),
|
|
164
|
-
/* @__PURE__ */ React.createElement("button", { "aria-label": "Dismiss", onClick: () => removeToast(t.id), style: toastCloseBtn }, "\u2715")
|
|
165
|
-
))), /* @__PURE__ */ React.createElement("div", { style: modal }, /* @__PURE__ */ React.createElement("div", { style: modalInner }, /* @__PURE__ */ React.createElement("header", { style: header }, /* @__PURE__ */ React.createElement("div", { style: brandRow }, /* @__PURE__ */ React.createElement("div", { style: logo }, /* @__PURE__ */ React.createElement("div", { style: logoCircle
|
|
167
|
+
/* @__PURE__ */ React.createElement("button", { "aria-label": "Dismiss", onClick: () => removeToast(t.id), style: styles.toastCloseBtn }, "\u2715")
|
|
168
|
+
))), /* @__PURE__ */ React.createElement("div", { style: styles.modal, role: "dialog", "aria-modal": "true", "aria-labelledby": "signup-title" }, /* @__PURE__ */ React.createElement("div", { style: styles.modalInner }, /* @__PURE__ */ React.createElement("header", { style: styles.header }, /* @__PURE__ */ React.createElement("div", { style: styles.brandRow }, /* @__PURE__ */ React.createElement("div", { style: styles.logo, "aria-hidden": true }, /* @__PURE__ */ React.createElement("div", { style: styles.logoCircle })), /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("h1", { id: "signup-title", style: styles.title }, "Sign up to ", agency?.name || "App"), /* @__PURE__ */ React.createElement("div", { style: styles.subtitle }, "Welcome \u2014 create your account.")))), /* @__PURE__ */ React.createElement("section", { style: styles.oauthSection }, /* @__PURE__ */ React.createElement(
|
|
166
169
|
"button",
|
|
167
170
|
{
|
|
168
171
|
onClick: handleGoogle,
|
|
169
172
|
type: "button",
|
|
170
|
-
style: { ...oauthButton, ...oauthGoogle },
|
|
173
|
+
style: { ...styles.oauthButton, ...styles.oauthGoogle },
|
|
171
174
|
disabled: loading || loadingOauth.google,
|
|
172
175
|
"aria-disabled": loading || loadingOauth.google
|
|
173
176
|
},
|
|
@@ -178,13 +181,13 @@ function SignUp({ agency = { name: "MyApp", logo: "" } }) {
|
|
|
178
181
|
{
|
|
179
182
|
onClick: handleGithub,
|
|
180
183
|
type: "button",
|
|
181
|
-
style: { ...oauthButton, ...oauthGithub },
|
|
184
|
+
style: { ...styles.oauthButton, ...styles.oauthGithub },
|
|
182
185
|
disabled: loading || loadingOauth.github,
|
|
183
186
|
"aria-disabled": loading || loadingOauth.github
|
|
184
187
|
},
|
|
185
188
|
/* @__PURE__ */ React.createElement("svg", { width: 18, style: { marginRight: 10 }, xmlns: "http://www.w3.org/2000/svg", fill: "white", viewBox: "0 0 20 20", "aria-hidden": true }, /* @__PURE__ */ React.createElement("path", { fillRule: "evenodd", d: "M10 .333A9.911 9.911 0 0 0 6.866 19.65c.5.092.678-.215.678-.477 0-.237-.01-1.017-.014-1.845-2.757.6-3.338-1.169-3.338-1.169a2.627 2.627 0 0 0-1.1-1.451c-.9-.615.07-.6.07-.6a2.084 2.084 0 0 1 1.518 1.021 2.11 2.11 0 0 0 2.884.823c.044-.503.268-.973.63-1.325-2.2-.25-4.516-1.1-4.516-4.9A3.832 3.832 0 0 1 4.7 7.068a3.56 3.56 0 0 1 .095-2.623s.832-.266 2.726 1.016a9.409 9.409 0 0 1 4.962 0c1.89-1.282 2.717-1.016 2.717-1.016.366.83.402 1.768.1 2.623a3.827 3.827 0 0 1 1.02 2.659c0 3.807-2.319 4.644-4.525 4.889a2.366 2.366 0 0 1 .673 1.834c0 1.326-.012 2.394-.012 2.72 0 .263.18.572.681.475A9.911 9.911 0 0 0 10 .333Z", clipRule: "evenodd" })),
|
|
186
189
|
/* @__PURE__ */ React.createElement("span", null, loadingOauth.github ? "Loading..." : "Continue with GitHub")
|
|
187
|
-
)), /* @__PURE__ */ React.createElement("div", { style: dividerRow }, /* @__PURE__ */ React.createElement("div", { style: line }), /* @__PURE__ */ React.createElement("div", { style: orText }, "or"), /* @__PURE__ */ React.createElement("div", { style: line })), /* @__PURE__ */ React.createElement("form", { onSubmit: submit, style: form }, /* @__PURE__ */ React.createElement("label", { style: label, htmlFor: "name" }, /* @__PURE__ */ React.createElement("span", { style: labelText }, "Name"), /* @__PURE__ */ React.createElement(
|
|
190
|
+
)), /* @__PURE__ */ React.createElement("div", { style: styles.dividerRow }, /* @__PURE__ */ React.createElement("div", { style: styles.line }), /* @__PURE__ */ React.createElement("div", { style: styles.orText }, "or"), /* @__PURE__ */ React.createElement("div", { style: styles.line })), /* @__PURE__ */ React.createElement("form", { onSubmit: submit, style: styles.form }, /* @__PURE__ */ React.createElement("label", { style: styles.label, htmlFor: "name" }, /* @__PURE__ */ React.createElement("span", { style: styles.labelText }, "Name"), /* @__PURE__ */ React.createElement(
|
|
188
191
|
"input",
|
|
189
192
|
{
|
|
190
193
|
id: "name",
|
|
@@ -192,10 +195,10 @@ function SignUp({ agency = { name: "MyApp", logo: "" } }) {
|
|
|
192
195
|
value: name,
|
|
193
196
|
onChange: (e) => setName(e.target.value),
|
|
194
197
|
placeholder: "Your name",
|
|
195
|
-
style: input,
|
|
198
|
+
style: styles.input,
|
|
196
199
|
autoComplete: "name"
|
|
197
200
|
}
|
|
198
|
-
)), /* @__PURE__ */ React.createElement("label", { style: label, htmlFor: "email" }, /* @__PURE__ */ React.createElement("span", { style: labelText }, "Email address"), /* @__PURE__ */ React.createElement(
|
|
201
|
+
)), /* @__PURE__ */ React.createElement("label", { style: styles.label, htmlFor: "email" }, /* @__PURE__ */ React.createElement("span", { style: styles.labelText }, "Email address"), /* @__PURE__ */ React.createElement(
|
|
199
202
|
"input",
|
|
200
203
|
{
|
|
201
204
|
id: "email",
|
|
@@ -204,10 +207,10 @@ function SignUp({ agency = { name: "MyApp", logo: "" } }) {
|
|
|
204
207
|
onChange: (e) => setEmail(e.target.value),
|
|
205
208
|
required: true,
|
|
206
209
|
placeholder: "you@example.com",
|
|
207
|
-
style: input,
|
|
210
|
+
style: styles.input,
|
|
208
211
|
autoComplete: "email"
|
|
209
212
|
}
|
|
210
|
-
)), /* @__PURE__ */ React.createElement("label", { style: label, htmlFor: "password" }, /* @__PURE__ */ React.createElement("span", { style: labelText }, "Password"), /* @__PURE__ */ React.createElement(
|
|
213
|
+
)), /* @__PURE__ */ React.createElement("label", { style: styles.label, htmlFor: "password" }, /* @__PURE__ */ React.createElement("span", { style: styles.labelText }, "Password"), /* @__PURE__ */ React.createElement(
|
|
211
214
|
"input",
|
|
212
215
|
{
|
|
213
216
|
id: "password",
|
|
@@ -216,251 +219,262 @@ function SignUp({ agency = { name: "MyApp", logo: "" } }) {
|
|
|
216
219
|
onChange: (e) => setPassword(e.target.value),
|
|
217
220
|
required: true,
|
|
218
221
|
placeholder: "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022",
|
|
219
|
-
style: input,
|
|
222
|
+
style: styles.input,
|
|
220
223
|
autoComplete: "new-password"
|
|
221
224
|
}
|
|
222
225
|
)), /* @__PURE__ */ React.createElement(
|
|
223
226
|
"button",
|
|
224
227
|
{
|
|
225
228
|
type: "submit",
|
|
226
|
-
style: submitButton,
|
|
229
|
+
style: styles.submitButton,
|
|
227
230
|
disabled: loading,
|
|
228
231
|
"aria-disabled": loading
|
|
229
232
|
},
|
|
230
233
|
loading ? "Signing up..." : "Sign Up"
|
|
231
|
-
))), /* @__PURE__ */ React.createElement("div", { style: modalFooter }, /* @__PURE__ */ React.createElement("div", { style: belowRow }, /* @__PURE__ */ React.createElement("span", { style: muted }, "Already have an account? "), /* @__PURE__ */ React.createElement(Link, { href: "/sign-in", style: link }, "Sign in")), /* @__PURE__ */ React.createElement("div", { style: dividerThin }), /* @__PURE__ */ React.createElement("div", { style: secured }, /* @__PURE__ */ React.createElement("div", { style: securedText }, "Secured by auth")))));
|
|
234
|
+
))), /* @__PURE__ */ React.createElement("div", { style: styles.modalFooter }, /* @__PURE__ */ React.createElement("div", { style: styles.belowRow }, /* @__PURE__ */ React.createElement("span", { style: styles.muted }, "Already have an account? "), /* @__PURE__ */ React.createElement(Link, { href: "/sign-in", style: styles.link }, "Sign in")), /* @__PURE__ */ React.createElement("div", { style: styles.dividerThin }), /* @__PURE__ */ React.createElement("div", { style: styles.secured }, /* @__PURE__ */ React.createElement("div", { style: styles.securedText }, "Secured by auth")))));
|
|
232
235
|
}
|
|
233
|
-
const
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
}
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
236
|
+
const styles = {
|
|
237
|
+
overlay: {
|
|
238
|
+
position: "fixed",
|
|
239
|
+
inset: 0,
|
|
240
|
+
display: "block",
|
|
241
|
+
// use block + scrolling container for zoom resilience
|
|
242
|
+
padding: 20,
|
|
243
|
+
background: "linear-gradient(180deg, rgba(2,6,23,0.22), rgba(2,6,23,0.32))",
|
|
244
|
+
backdropFilter: "blur(6px)",
|
|
245
|
+
overflowY: "auto",
|
|
246
|
+
// allow page scroll when zoomed
|
|
247
|
+
WebkitOverflowScrolling: "touch",
|
|
248
|
+
minHeight: "100vh",
|
|
249
|
+
zIndex: 9999
|
|
250
|
+
},
|
|
251
|
+
// modal: reduced width (not too wide), centered with margin auto, allows internal scroll
|
|
252
|
+
modal: {
|
|
253
|
+
width: "100%",
|
|
254
|
+
maxWidth: 460,
|
|
255
|
+
// reduced width per request
|
|
256
|
+
margin: "40px auto",
|
|
257
|
+
// vertical margin so modal isn't glued to top when zoomed
|
|
258
|
+
borderRadius: 14,
|
|
259
|
+
background: "linear-gradient(180deg, rgba(15,19,24,0.85), rgba(10,12,16,0.85))",
|
|
260
|
+
// translucent neutral
|
|
261
|
+
border: "1px solid rgba(99,102,106,0.12)",
|
|
262
|
+
// visible neutral border
|
|
263
|
+
boxShadow: "0 18px 48px rgba(2,6,23,0.55), inset 0 1px 0 rgba(255,255,255,0.02)",
|
|
264
|
+
overflow: "hidden",
|
|
265
|
+
display: "flex",
|
|
266
|
+
flexDirection: "column",
|
|
267
|
+
maxHeight: "calc(100vh - 80px)"
|
|
268
|
+
// keep inside viewport
|
|
269
|
+
},
|
|
270
|
+
modalInner: {
|
|
271
|
+
padding: 18,
|
|
272
|
+
display: "flex",
|
|
273
|
+
flexDirection: "column",
|
|
274
|
+
gap: 12,
|
|
275
|
+
overflowY: "auto"
|
|
276
|
+
},
|
|
277
|
+
header: {
|
|
278
|
+
paddingBottom: 6,
|
|
279
|
+
borderBottom: "1px solid rgba(148,163,184,0.04)"
|
|
280
|
+
},
|
|
281
|
+
brandRow: {
|
|
282
|
+
display: "flex",
|
|
283
|
+
alignItems: "center",
|
|
284
|
+
gap: 12
|
|
285
|
+
},
|
|
286
|
+
logo: {
|
|
287
|
+
width: 44,
|
|
288
|
+
height: 44,
|
|
289
|
+
display: "flex",
|
|
290
|
+
alignItems: "center",
|
|
291
|
+
justifyContent: "center"
|
|
292
|
+
},
|
|
293
|
+
logoCircle: {
|
|
294
|
+
width: 36,
|
|
295
|
+
height: 36,
|
|
296
|
+
borderRadius: 999,
|
|
297
|
+
background: "linear-gradient(135deg,#2f3438,#11151a)",
|
|
298
|
+
boxShadow: "0 4px 12px rgba(2,6,23,0.6)"
|
|
299
|
+
},
|
|
300
|
+
title: {
|
|
301
|
+
margin: 0,
|
|
302
|
+
fontSize: 18,
|
|
303
|
+
fontWeight: 600,
|
|
304
|
+
color: "#e6e6e6"
|
|
305
|
+
},
|
|
306
|
+
subtitle: {
|
|
307
|
+
fontSize: 13,
|
|
308
|
+
color: "rgba(230,230,230,0.72)",
|
|
309
|
+
marginTop: 4
|
|
310
|
+
},
|
|
311
|
+
oauthSection: {
|
|
312
|
+
marginTop: 8,
|
|
313
|
+
display: "flex",
|
|
314
|
+
gap: 8
|
|
315
|
+
},
|
|
316
|
+
oauthButton: {
|
|
317
|
+
flex: 1,
|
|
318
|
+
display: "inline-flex",
|
|
319
|
+
alignItems: "center",
|
|
320
|
+
justifyContent: "center",
|
|
321
|
+
padding: "10px 12px",
|
|
322
|
+
borderRadius: 10,
|
|
323
|
+
border: "1px solid rgba(148,163,184,0.08)",
|
|
324
|
+
fontSize: 14,
|
|
325
|
+
cursor: "pointer",
|
|
326
|
+
userSelect: "none",
|
|
327
|
+
gap: 8,
|
|
328
|
+
minHeight: 40,
|
|
329
|
+
background: "transparent",
|
|
330
|
+
color: "#fff"
|
|
331
|
+
},
|
|
332
|
+
oauthGoogle: {
|
|
333
|
+
background: "linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01))"
|
|
334
|
+
},
|
|
335
|
+
oauthGithub: {
|
|
336
|
+
background: "linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.00))"
|
|
337
|
+
},
|
|
338
|
+
dividerRow: {
|
|
339
|
+
display: "flex",
|
|
340
|
+
alignItems: "center",
|
|
341
|
+
gap: 10,
|
|
342
|
+
marginTop: 12
|
|
343
|
+
},
|
|
344
|
+
line: {
|
|
345
|
+
flex: 1,
|
|
346
|
+
height: 1,
|
|
347
|
+
background: "rgba(148,163,184,0.06)"
|
|
348
|
+
},
|
|
349
|
+
orText: {
|
|
350
|
+
fontSize: 13,
|
|
351
|
+
color: "rgba(230,230,230,0.65)",
|
|
352
|
+
padding: "0 8px"
|
|
353
|
+
},
|
|
354
|
+
form: {
|
|
355
|
+
display: "flex",
|
|
356
|
+
flexDirection: "column",
|
|
357
|
+
gap: 10,
|
|
358
|
+
marginTop: 6
|
|
359
|
+
},
|
|
360
|
+
label: {
|
|
361
|
+
display: "flex",
|
|
362
|
+
flexDirection: "column",
|
|
363
|
+
gap: 6
|
|
364
|
+
},
|
|
365
|
+
labelText: {
|
|
366
|
+
fontSize: 13,
|
|
367
|
+
color: "rgba(230,230,230,0.68)"
|
|
368
|
+
},
|
|
369
|
+
input: {
|
|
370
|
+
width: "100%",
|
|
371
|
+
padding: "10px 12px",
|
|
372
|
+
borderRadius: 10,
|
|
373
|
+
background: "rgba(255,255,255,0.02)",
|
|
374
|
+
color: "#e6e6e6",
|
|
375
|
+
border: "1px solid rgba(148,163,184,0.10)",
|
|
376
|
+
fontSize: 14,
|
|
377
|
+
outline: "none",
|
|
378
|
+
boxSizing: "border-box",
|
|
379
|
+
transition: "box-shadow 120ms, border-color 120ms"
|
|
380
|
+
},
|
|
381
|
+
submitButton: {
|
|
382
|
+
marginTop: 6,
|
|
383
|
+
width: "100%",
|
|
384
|
+
padding: "10px 12px",
|
|
385
|
+
borderRadius: 10,
|
|
386
|
+
background: "linear-gradient(180deg,#475569,#94a3b8)",
|
|
387
|
+
border: "none",
|
|
388
|
+
color: "#fff",
|
|
389
|
+
fontWeight: 600,
|
|
390
|
+
cursor: "pointer",
|
|
391
|
+
fontSize: 15,
|
|
392
|
+
display: "inline-flex",
|
|
393
|
+
alignItems: "center",
|
|
394
|
+
justifyContent: "center",
|
|
395
|
+
minHeight: 44
|
|
396
|
+
},
|
|
397
|
+
modalFooter: {
|
|
398
|
+
padding: "12px 18px 18px 18px",
|
|
399
|
+
borderTop: "1px solid rgba(148,163,184,0.03)",
|
|
400
|
+
display: "flex",
|
|
401
|
+
flexDirection: "column",
|
|
402
|
+
gap: 8
|
|
403
|
+
},
|
|
404
|
+
belowRow: {
|
|
405
|
+
textAlign: "center",
|
|
406
|
+
display: "flex",
|
|
407
|
+
justifyContent: "center",
|
|
408
|
+
gap: 8,
|
|
409
|
+
alignItems: "center"
|
|
410
|
+
},
|
|
411
|
+
muted: {
|
|
412
|
+
color: "rgba(230,230,230,0.66)",
|
|
413
|
+
fontSize: 13
|
|
414
|
+
},
|
|
415
|
+
link: {
|
|
416
|
+
color: "#9fb0d9",
|
|
417
|
+
textDecoration: "none",
|
|
418
|
+
fontWeight: 600
|
|
419
|
+
},
|
|
420
|
+
dividerThin: {
|
|
421
|
+
height: 1,
|
|
422
|
+
background: "rgba(148,163,184,0.04)",
|
|
423
|
+
marginTop: 6,
|
|
424
|
+
marginBottom: 6
|
|
425
|
+
},
|
|
426
|
+
secured: {
|
|
427
|
+
textAlign: "center"
|
|
428
|
+
},
|
|
429
|
+
securedText: {
|
|
430
|
+
color: "rgba(230,230,230,0.9)",
|
|
431
|
+
fontSize: 13,
|
|
432
|
+
fontWeight: 600
|
|
433
|
+
},
|
|
434
|
+
/* Toasts: black background */
|
|
435
|
+
toastContainer: {
|
|
436
|
+
position: "fixed",
|
|
437
|
+
top: 18,
|
|
438
|
+
right: 18,
|
|
439
|
+
width: 360,
|
|
440
|
+
maxWidth: "calc(100% - 36px)",
|
|
441
|
+
display: "flex",
|
|
442
|
+
flexDirection: "column",
|
|
443
|
+
gap: 10,
|
|
444
|
+
zIndex: 6e4
|
|
445
|
+
},
|
|
446
|
+
toastBase: {
|
|
447
|
+
display: "flex",
|
|
448
|
+
gap: 10,
|
|
449
|
+
alignItems: "center",
|
|
450
|
+
padding: "10px 12px",
|
|
451
|
+
borderRadius: 10,
|
|
452
|
+
boxShadow: "0 8px 20px rgba(2,6,23,0.6)",
|
|
453
|
+
color: "#fff",
|
|
454
|
+
fontSize: 13,
|
|
455
|
+
minWidth: 120
|
|
456
|
+
},
|
|
457
|
+
toastError: {
|
|
458
|
+
background: "#000000",
|
|
459
|
+
border: "1px solid rgba(255,255,255,0.06)"
|
|
460
|
+
},
|
|
461
|
+
toastSuccess: {
|
|
462
|
+
background: "#000000",
|
|
463
|
+
border: "1px solid rgba(255,255,255,0.06)"
|
|
464
|
+
},
|
|
465
|
+
toastInfo: {
|
|
466
|
+
background: "#000000",
|
|
467
|
+
border: "1px solid rgba(255,255,255,0.06)"
|
|
468
|
+
},
|
|
469
|
+
toastCloseBtn: {
|
|
470
|
+
marginLeft: 8,
|
|
471
|
+
background: "transparent",
|
|
472
|
+
border: "none",
|
|
473
|
+
color: "rgba(255,255,255,0.7)",
|
|
474
|
+
cursor: "pointer",
|
|
475
|
+
fontSize: 14,
|
|
476
|
+
lineHeight: 1
|
|
477
|
+
}
|
|
464
478
|
};
|
|
465
479
|
export {
|
|
466
480
|
SignUp as default
|