flowlink-auth 2.7.8 → 2.8.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/dist/ErrorBox.js +2 -1026
- package/dist/SignIn.js +23 -1057
- package/dist/SignUp.js +351 -1129
- package/dist/api.js +2 -11
- package/dist/createAuthMiddleware.js +6 -5910
- package/dist/index.js +275 -261
- package/dist/init.js +1 -2
- package/dist/provider.js +23 -1075
- package/dist/securityUtils.js +0 -1
- package/dist/useAuth.js +2 -1050
- package/package.json +2 -2
- package/src/SignUp.jsx +342 -335
package/dist/index.js
CHANGED
|
@@ -4145,19 +4145,25 @@ function SignUp({ agency = { name: "MyApp", logo: "" } }) {
|
|
|
4145
4145
|
const toastId = useRef2(0);
|
|
4146
4146
|
const [toasts, setToasts] = useState3([]);
|
|
4147
4147
|
useEffect2(() => {
|
|
4148
|
+
const meta = document.createElement("meta");
|
|
4149
|
+
meta.name = "viewport";
|
|
4150
|
+
meta.content = "width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no";
|
|
4151
|
+
document.head.appendChild(meta);
|
|
4148
4152
|
return () => {
|
|
4149
4153
|
if (redirectTimer.current) clearTimeout(redirectTimer.current);
|
|
4150
|
-
|
|
4154
|
+
const existing = document.querySelector('meta[name="viewport"]');
|
|
4155
|
+
if (existing && existing.content === meta.content) {
|
|
4156
|
+
document.head.removeChild(existing);
|
|
4157
|
+
}
|
|
4158
|
+
toasts.forEach((t) => {
|
|
4159
|
+
if (t._timer) clearTimeout(t._timer);
|
|
4160
|
+
});
|
|
4151
4161
|
};
|
|
4152
4162
|
}, []);
|
|
4153
4163
|
function showToast(type, message, ms = 5e3) {
|
|
4154
4164
|
const id = ++toastId.current;
|
|
4155
|
-
const
|
|
4156
|
-
|
|
4157
|
-
setToasts((prev) => {
|
|
4158
|
-
const next = [t, ...prev].slice(0, 6);
|
|
4159
|
-
return next;
|
|
4160
|
-
});
|
|
4165
|
+
const t = { id, type, message, _timer: null };
|
|
4166
|
+
setToasts((prev) => [t, ...prev].slice(0, 6));
|
|
4161
4167
|
const timer = setTimeout(() => {
|
|
4162
4168
|
setToasts((prev) => prev.filter((x) => x.id !== id));
|
|
4163
4169
|
}, ms);
|
|
@@ -4166,7 +4172,7 @@ function SignUp({ agency = { name: "MyApp", logo: "" } }) {
|
|
|
4166
4172
|
function removeToast(id) {
|
|
4167
4173
|
setToasts((prev) => {
|
|
4168
4174
|
prev.forEach((t) => {
|
|
4169
|
-
if (t.id === id) clearTimeout(t._timer);
|
|
4175
|
+
if (t.id === id && t._timer) clearTimeout(t._timer);
|
|
4170
4176
|
});
|
|
4171
4177
|
return prev.filter((x) => x.id !== id);
|
|
4172
4178
|
});
|
|
@@ -4208,8 +4214,8 @@ function SignUp({ agency = { name: "MyApp", logo: "" } }) {
|
|
|
4208
4214
|
body: JSON.stringify({ name: name.trim(), email: email.trim(), password })
|
|
4209
4215
|
});
|
|
4210
4216
|
const data = await res.json().catch(async () => {
|
|
4211
|
-
const
|
|
4212
|
-
return { _raw:
|
|
4217
|
+
const txt = await res.text().catch(() => "");
|
|
4218
|
+
return { _raw: txt };
|
|
4213
4219
|
});
|
|
4214
4220
|
if (!res.ok) {
|
|
4215
4221
|
const errMsg = data?.error || data?._raw || `Signup failed (${res.status})`;
|
|
@@ -4240,9 +4246,7 @@ function SignUp({ agency = { name: "MyApp", logo: "" } }) {
|
|
|
4240
4246
|
const callbackUrl = encodeURIComponent(`${typeof window !== "undefined" ? window.location.origin : ""}/signup`);
|
|
4241
4247
|
const sdkBase = baseUrl || (typeof window !== "undefined" ? window.location.origin.replace(/\/+$/, "") : "");
|
|
4242
4248
|
const startUrl = `${sdkBase}/sdk/auth/start?rid=${rid}&source=${encodeURIComponent(provider)}&callbackUrl=${callbackUrl}`;
|
|
4243
|
-
if (!publishableKey)
|
|
4244
|
-
throw new Error("Missing publishable key (client side).");
|
|
4245
|
-
}
|
|
4249
|
+
if (!publishableKey) throw new Error("Missing publishable key (client side).");
|
|
4246
4250
|
const res = await fetch(startUrl, {
|
|
4247
4251
|
method: "GET",
|
|
4248
4252
|
headers: { "x-publishable-key": publishableKey }
|
|
@@ -4265,18 +4269,17 @@ function SignUp({ agency = { name: "MyApp", logo: "" } }) {
|
|
|
4265
4269
|
if (e && typeof e.preventDefault === "function") e.preventDefault();
|
|
4266
4270
|
startOAuthFlow("github");
|
|
4267
4271
|
};
|
|
4268
|
-
return /* @__PURE__ */ React3.createElement("div", { style:
|
|
4272
|
+
return /* @__PURE__ */ React3.createElement("div", { style: styles.overlay }, /* @__PURE__ */ React3.createElement("div", { style: styles.toastContainer, "aria-live": "polite", "aria-atomic": "true" }, toasts.map((t) => /* @__PURE__ */ React3.createElement(
|
|
4269
4273
|
"div",
|
|
4270
4274
|
{
|
|
4271
4275
|
key: t.id,
|
|
4272
4276
|
role: "status",
|
|
4273
|
-
"aria-live": "polite",
|
|
4274
4277
|
style: {
|
|
4275
|
-
...toastBase,
|
|
4276
|
-
...t.type === "error" ? toastError : t.type === "success" ? toastSuccess : toastInfo
|
|
4278
|
+
...styles.toastBase,
|
|
4279
|
+
...t.type === "error" ? styles.toastError : t.type === "success" ? styles.toastSuccess : styles.toastInfo
|
|
4277
4280
|
},
|
|
4278
4281
|
onMouseEnter: () => {
|
|
4279
|
-
clearTimeout(t._timer);
|
|
4282
|
+
if (t._timer) clearTimeout(t._timer);
|
|
4280
4283
|
},
|
|
4281
4284
|
onMouseLeave: () => {
|
|
4282
4285
|
const timer = setTimeout(() => removeToast(t.id), 3e3);
|
|
@@ -4284,13 +4287,13 @@ function SignUp({ agency = { name: "MyApp", logo: "" } }) {
|
|
|
4284
4287
|
}
|
|
4285
4288
|
},
|
|
4286
4289
|
/* @__PURE__ */ React3.createElement("div", { style: { flex: 1 } }, t.message),
|
|
4287
|
-
/* @__PURE__ */ React3.createElement("button", { "aria-label": "Dismiss", onClick: () => removeToast(t.id), style: toastCloseBtn }, "\u2715")
|
|
4288
|
-
))), /* @__PURE__ */ React3.createElement("div", { style:
|
|
4290
|
+
/* @__PURE__ */ React3.createElement("button", { "aria-label": "Dismiss", onClick: () => removeToast(t.id), style: styles.toastCloseBtn }, "\u2715")
|
|
4291
|
+
))), /* @__PURE__ */ React3.createElement("div", { style: styles.modal, role: "dialog", "aria-modal": "true", "aria-labelledby": "signup-title" }, /* @__PURE__ */ React3.createElement("div", { style: styles.modalInner }, /* @__PURE__ */ React3.createElement("header", { style: styles.header }, /* @__PURE__ */ React3.createElement("div", { style: styles.brandRow }, /* @__PURE__ */ React3.createElement("div", { style: styles.logo, "aria-hidden": true }, /* @__PURE__ */ React3.createElement("div", { style: styles.logoCircle })), /* @__PURE__ */ React3.createElement("div", null, /* @__PURE__ */ React3.createElement("h1", { id: "signup-title", style: styles.title }, "Sign up to ", agency?.name || "App"), /* @__PURE__ */ React3.createElement("div", { style: styles.subtitle }, "Welcome \u2014 create your account.")))), /* @__PURE__ */ React3.createElement("section", { style: styles.oauthSection }, /* @__PURE__ */ React3.createElement(
|
|
4289
4292
|
"button",
|
|
4290
4293
|
{
|
|
4291
4294
|
onClick: handleGoogle,
|
|
4292
4295
|
type: "button",
|
|
4293
|
-
style: { ...oauthButton, ...oauthGoogle },
|
|
4296
|
+
style: { ...styles.oauthButton, ...styles.oauthGoogle },
|
|
4294
4297
|
disabled: loading || loadingOauth.google,
|
|
4295
4298
|
"aria-disabled": loading || loadingOauth.google
|
|
4296
4299
|
},
|
|
@@ -4301,13 +4304,13 @@ function SignUp({ agency = { name: "MyApp", logo: "" } }) {
|
|
|
4301
4304
|
{
|
|
4302
4305
|
onClick: handleGithub,
|
|
4303
4306
|
type: "button",
|
|
4304
|
-
style: { ...oauthButton, ...oauthGithub },
|
|
4307
|
+
style: { ...styles.oauthButton, ...styles.oauthGithub },
|
|
4305
4308
|
disabled: loading || loadingOauth.github,
|
|
4306
4309
|
"aria-disabled": loading || loadingOauth.github
|
|
4307
4310
|
},
|
|
4308
4311
|
/* @__PURE__ */ React3.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__ */ React3.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" })),
|
|
4309
4312
|
/* @__PURE__ */ React3.createElement("span", null, loadingOauth.github ? "Loading..." : "Continue with GitHub")
|
|
4310
|
-
)), /* @__PURE__ */ React3.createElement("div", { style: dividerRow }, /* @__PURE__ */ React3.createElement("div", { style: line }), /* @__PURE__ */ React3.createElement("div", { style: orText }, "or"), /* @__PURE__ */ React3.createElement("div", { style: line })), /* @__PURE__ */ React3.createElement("form", { onSubmit: submit, style: form }, /* @__PURE__ */ React3.createElement("label", { style:
|
|
4313
|
+
)), /* @__PURE__ */ React3.createElement("div", { style: styles.dividerRow }, /* @__PURE__ */ React3.createElement("div", { style: styles.line }), /* @__PURE__ */ React3.createElement("div", { style: styles.orText }, "or"), /* @__PURE__ */ React3.createElement("div", { style: styles.line })), /* @__PURE__ */ React3.createElement("form", { onSubmit: submit, style: styles.form }, /* @__PURE__ */ React3.createElement("label", { style: styles.label, htmlFor: "name" }, /* @__PURE__ */ React3.createElement("span", { style: styles.labelText }, "Name"), /* @__PURE__ */ React3.createElement(
|
|
4311
4314
|
"input",
|
|
4312
4315
|
{
|
|
4313
4316
|
id: "name",
|
|
@@ -4315,10 +4318,10 @@ function SignUp({ agency = { name: "MyApp", logo: "" } }) {
|
|
|
4315
4318
|
value: name,
|
|
4316
4319
|
onChange: (e) => setName(e.target.value),
|
|
4317
4320
|
placeholder: "Your name",
|
|
4318
|
-
style:
|
|
4321
|
+
style: styles.input,
|
|
4319
4322
|
autoComplete: "name"
|
|
4320
4323
|
}
|
|
4321
|
-
)), /* @__PURE__ */ React3.createElement("label", { style:
|
|
4324
|
+
)), /* @__PURE__ */ React3.createElement("label", { style: styles.label, htmlFor: "email" }, /* @__PURE__ */ React3.createElement("span", { style: styles.labelText }, "Email address"), /* @__PURE__ */ React3.createElement(
|
|
4322
4325
|
"input",
|
|
4323
4326
|
{
|
|
4324
4327
|
id: "email",
|
|
@@ -4327,10 +4330,10 @@ function SignUp({ agency = { name: "MyApp", logo: "" } }) {
|
|
|
4327
4330
|
onChange: (e) => setEmail(e.target.value),
|
|
4328
4331
|
required: true,
|
|
4329
4332
|
placeholder: "you@example.com",
|
|
4330
|
-
style:
|
|
4333
|
+
style: styles.input,
|
|
4331
4334
|
autoComplete: "email"
|
|
4332
4335
|
}
|
|
4333
|
-
)), /* @__PURE__ */ React3.createElement("label", { style:
|
|
4336
|
+
)), /* @__PURE__ */ React3.createElement("label", { style: styles.label, htmlFor: "password" }, /* @__PURE__ */ React3.createElement("span", { style: styles.labelText }, "Password"), /* @__PURE__ */ React3.createElement(
|
|
4334
4337
|
"input",
|
|
4335
4338
|
{
|
|
4336
4339
|
id: "password",
|
|
@@ -4339,251 +4342,262 @@ function SignUp({ agency = { name: "MyApp", logo: "" } }) {
|
|
|
4339
4342
|
onChange: (e) => setPassword(e.target.value),
|
|
4340
4343
|
required: true,
|
|
4341
4344
|
placeholder: "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022",
|
|
4342
|
-
style:
|
|
4345
|
+
style: styles.input,
|
|
4343
4346
|
autoComplete: "new-password"
|
|
4344
4347
|
}
|
|
4345
4348
|
)), /* @__PURE__ */ React3.createElement(
|
|
4346
4349
|
"button",
|
|
4347
4350
|
{
|
|
4348
4351
|
type: "submit",
|
|
4349
|
-
style: submitButton,
|
|
4352
|
+
style: styles.submitButton,
|
|
4350
4353
|
disabled: loading,
|
|
4351
4354
|
"aria-disabled": loading
|
|
4352
4355
|
},
|
|
4353
4356
|
loading ? "Signing up..." : "Sign Up"
|
|
4354
|
-
))), /* @__PURE__ */ React3.createElement("div", { style: modalFooter }, /* @__PURE__ */ React3.createElement("div", { style: belowRow }, /* @__PURE__ */ React3.createElement("span", { style: muted }, "Already have an account? "), /* @__PURE__ */ React3.createElement(import_link.default, { href: "/sign-in", style: link }, "Sign in")), /* @__PURE__ */ React3.createElement("div", { style: dividerThin }), /* @__PURE__ */ React3.createElement("div", { style: secured }, /* @__PURE__ */ React3.createElement("div", { style: securedText }, "Secured by auth")))));
|
|
4357
|
+
))), /* @__PURE__ */ React3.createElement("div", { style: styles.modalFooter }, /* @__PURE__ */ React3.createElement("div", { style: styles.belowRow }, /* @__PURE__ */ React3.createElement("span", { style: styles.muted }, "Already have an account? "), /* @__PURE__ */ React3.createElement(import_link.default, { href: "/sign-in", style: styles.link }, "Sign in")), /* @__PURE__ */ React3.createElement("div", { style: styles.dividerThin }), /* @__PURE__ */ React3.createElement("div", { style: styles.secured }, /* @__PURE__ */ React3.createElement("div", { style: styles.securedText }, "Secured by auth")))));
|
|
4355
4358
|
}
|
|
4356
|
-
var
|
|
4357
|
-
|
|
4358
|
-
|
|
4359
|
-
|
|
4360
|
-
|
|
4361
|
-
|
|
4362
|
-
|
|
4363
|
-
|
|
4364
|
-
|
|
4365
|
-
|
|
4366
|
-
|
|
4367
|
-
|
|
4368
|
-
|
|
4369
|
-
|
|
4370
|
-
|
|
4371
|
-
|
|
4372
|
-
|
|
4373
|
-
|
|
4374
|
-
|
|
4375
|
-
|
|
4376
|
-
|
|
4377
|
-
|
|
4378
|
-
|
|
4379
|
-
|
|
4380
|
-
|
|
4381
|
-
|
|
4382
|
-
|
|
4383
|
-
|
|
4384
|
-
|
|
4385
|
-
|
|
4386
|
-
|
|
4387
|
-
|
|
4388
|
-
|
|
4389
|
-
|
|
4390
|
-
|
|
4391
|
-
|
|
4392
|
-
|
|
4393
|
-
|
|
4394
|
-
|
|
4395
|
-
|
|
4396
|
-
}
|
|
4397
|
-
|
|
4398
|
-
|
|
4399
|
-
|
|
4400
|
-
|
|
4401
|
-
|
|
4402
|
-
|
|
4403
|
-
|
|
4404
|
-
|
|
4405
|
-
|
|
4406
|
-
|
|
4407
|
-
|
|
4408
|
-
|
|
4409
|
-
|
|
4410
|
-
|
|
4411
|
-
|
|
4412
|
-
|
|
4413
|
-
|
|
4414
|
-
|
|
4415
|
-
|
|
4416
|
-
|
|
4417
|
-
|
|
4418
|
-
|
|
4419
|
-
|
|
4420
|
-
|
|
4421
|
-
|
|
4422
|
-
|
|
4423
|
-
|
|
4424
|
-
|
|
4425
|
-
|
|
4426
|
-
|
|
4427
|
-
|
|
4428
|
-
|
|
4429
|
-
|
|
4430
|
-
|
|
4431
|
-
|
|
4432
|
-
|
|
4433
|
-
|
|
4434
|
-
|
|
4435
|
-
|
|
4436
|
-
|
|
4437
|
-
|
|
4438
|
-
|
|
4439
|
-
|
|
4440
|
-
|
|
4441
|
-
|
|
4442
|
-
|
|
4443
|
-
|
|
4444
|
-
|
|
4445
|
-
|
|
4446
|
-
|
|
4447
|
-
|
|
4448
|
-
|
|
4449
|
-
|
|
4450
|
-
|
|
4451
|
-
|
|
4452
|
-
|
|
4453
|
-
|
|
4454
|
-
}
|
|
4455
|
-
|
|
4456
|
-
|
|
4457
|
-
|
|
4458
|
-
|
|
4459
|
-
|
|
4460
|
-
|
|
4461
|
-
|
|
4462
|
-
|
|
4463
|
-
|
|
4464
|
-
|
|
4465
|
-
|
|
4466
|
-
|
|
4467
|
-
|
|
4468
|
-
|
|
4469
|
-
|
|
4470
|
-
|
|
4471
|
-
|
|
4472
|
-
|
|
4473
|
-
|
|
4474
|
-
|
|
4475
|
-
|
|
4476
|
-
|
|
4477
|
-
|
|
4478
|
-
|
|
4479
|
-
}
|
|
4480
|
-
|
|
4481
|
-
|
|
4482
|
-
|
|
4483
|
-
|
|
4484
|
-
|
|
4485
|
-
|
|
4486
|
-
|
|
4487
|
-
|
|
4488
|
-
|
|
4489
|
-
|
|
4490
|
-
|
|
4491
|
-
|
|
4492
|
-
|
|
4493
|
-
|
|
4494
|
-
|
|
4495
|
-
|
|
4496
|
-
|
|
4497
|
-
|
|
4498
|
-
|
|
4499
|
-
|
|
4500
|
-
|
|
4501
|
-
|
|
4502
|
-
|
|
4503
|
-
|
|
4504
|
-
|
|
4505
|
-
|
|
4506
|
-
|
|
4507
|
-
|
|
4508
|
-
|
|
4509
|
-
|
|
4510
|
-
|
|
4511
|
-
|
|
4512
|
-
|
|
4513
|
-
|
|
4514
|
-
|
|
4515
|
-
|
|
4516
|
-
|
|
4517
|
-
|
|
4518
|
-
|
|
4519
|
-
|
|
4520
|
-
|
|
4521
|
-
|
|
4522
|
-
|
|
4523
|
-
|
|
4524
|
-
|
|
4525
|
-
|
|
4526
|
-
|
|
4527
|
-
|
|
4528
|
-
|
|
4529
|
-
|
|
4530
|
-
}
|
|
4531
|
-
|
|
4532
|
-
|
|
4533
|
-
|
|
4534
|
-
|
|
4535
|
-
|
|
4536
|
-
|
|
4537
|
-
|
|
4538
|
-
|
|
4539
|
-
}
|
|
4540
|
-
|
|
4541
|
-
|
|
4542
|
-
|
|
4543
|
-
|
|
4544
|
-
|
|
4545
|
-
|
|
4546
|
-
|
|
4547
|
-
|
|
4548
|
-
|
|
4549
|
-
|
|
4550
|
-
|
|
4551
|
-
|
|
4552
|
-
|
|
4553
|
-
|
|
4554
|
-
|
|
4555
|
-
|
|
4556
|
-
|
|
4557
|
-
|
|
4558
|
-
|
|
4559
|
-
|
|
4560
|
-
|
|
4561
|
-
|
|
4562
|
-
|
|
4563
|
-
|
|
4564
|
-
|
|
4565
|
-
|
|
4566
|
-
|
|
4567
|
-
|
|
4568
|
-
|
|
4569
|
-
|
|
4570
|
-
|
|
4571
|
-
|
|
4572
|
-
|
|
4573
|
-
|
|
4574
|
-
|
|
4575
|
-
|
|
4576
|
-
|
|
4577
|
-
|
|
4578
|
-
|
|
4579
|
-
|
|
4580
|
-
|
|
4581
|
-
|
|
4582
|
-
|
|
4583
|
-
|
|
4584
|
-
|
|
4585
|
-
|
|
4586
|
-
|
|
4359
|
+
var styles = {
|
|
4360
|
+
overlay: {
|
|
4361
|
+
position: "fixed",
|
|
4362
|
+
inset: 0,
|
|
4363
|
+
display: "block",
|
|
4364
|
+
// use block + scrolling container for zoom resilience
|
|
4365
|
+
padding: 20,
|
|
4366
|
+
background: "linear-gradient(180deg, rgba(2,6,23,0.22), rgba(2,6,23,0.32))",
|
|
4367
|
+
backdropFilter: "blur(6px)",
|
|
4368
|
+
overflowY: "auto",
|
|
4369
|
+
// allow page scroll when zoomed
|
|
4370
|
+
WebkitOverflowScrolling: "touch",
|
|
4371
|
+
minHeight: "100vh",
|
|
4372
|
+
zIndex: 9999
|
|
4373
|
+
},
|
|
4374
|
+
// modal: reduced width (not too wide), centered with margin auto, allows internal scroll
|
|
4375
|
+
modal: {
|
|
4376
|
+
width: "100%",
|
|
4377
|
+
maxWidth: 460,
|
|
4378
|
+
// reduced width per request
|
|
4379
|
+
margin: "40px auto",
|
|
4380
|
+
// vertical margin so modal isn't glued to top when zoomed
|
|
4381
|
+
borderRadius: 14,
|
|
4382
|
+
background: "linear-gradient(180deg, rgba(15,19,24,0.85), rgba(10,12,16,0.85))",
|
|
4383
|
+
// translucent neutral
|
|
4384
|
+
border: "1px solid rgba(99,102,106,0.12)",
|
|
4385
|
+
// visible neutral border
|
|
4386
|
+
boxShadow: "0 18px 48px rgba(2,6,23,0.55), inset 0 1px 0 rgba(255,255,255,0.02)",
|
|
4387
|
+
overflow: "hidden",
|
|
4388
|
+
display: "flex",
|
|
4389
|
+
flexDirection: "column",
|
|
4390
|
+
maxHeight: "calc(100vh - 80px)"
|
|
4391
|
+
// keep inside viewport
|
|
4392
|
+
},
|
|
4393
|
+
modalInner: {
|
|
4394
|
+
padding: 18,
|
|
4395
|
+
display: "flex",
|
|
4396
|
+
flexDirection: "column",
|
|
4397
|
+
gap: 12,
|
|
4398
|
+
overflowY: "auto"
|
|
4399
|
+
},
|
|
4400
|
+
header: {
|
|
4401
|
+
paddingBottom: 6,
|
|
4402
|
+
borderBottom: "1px solid rgba(148,163,184,0.04)"
|
|
4403
|
+
},
|
|
4404
|
+
brandRow: {
|
|
4405
|
+
display: "flex",
|
|
4406
|
+
alignItems: "center",
|
|
4407
|
+
gap: 12
|
|
4408
|
+
},
|
|
4409
|
+
logo: {
|
|
4410
|
+
width: 44,
|
|
4411
|
+
height: 44,
|
|
4412
|
+
display: "flex",
|
|
4413
|
+
alignItems: "center",
|
|
4414
|
+
justifyContent: "center"
|
|
4415
|
+
},
|
|
4416
|
+
logoCircle: {
|
|
4417
|
+
width: 36,
|
|
4418
|
+
height: 36,
|
|
4419
|
+
borderRadius: 999,
|
|
4420
|
+
background: "linear-gradient(135deg,#2f3438,#11151a)",
|
|
4421
|
+
boxShadow: "0 4px 12px rgba(2,6,23,0.6)"
|
|
4422
|
+
},
|
|
4423
|
+
title: {
|
|
4424
|
+
margin: 0,
|
|
4425
|
+
fontSize: 18,
|
|
4426
|
+
fontWeight: 600,
|
|
4427
|
+
color: "#e6e6e6"
|
|
4428
|
+
},
|
|
4429
|
+
subtitle: {
|
|
4430
|
+
fontSize: 13,
|
|
4431
|
+
color: "rgba(230,230,230,0.72)",
|
|
4432
|
+
marginTop: 4
|
|
4433
|
+
},
|
|
4434
|
+
oauthSection: {
|
|
4435
|
+
marginTop: 8,
|
|
4436
|
+
display: "flex",
|
|
4437
|
+
gap: 8
|
|
4438
|
+
},
|
|
4439
|
+
oauthButton: {
|
|
4440
|
+
flex: 1,
|
|
4441
|
+
display: "inline-flex",
|
|
4442
|
+
alignItems: "center",
|
|
4443
|
+
justifyContent: "center",
|
|
4444
|
+
padding: "10px 12px",
|
|
4445
|
+
borderRadius: 10,
|
|
4446
|
+
border: "1px solid rgba(148,163,184,0.08)",
|
|
4447
|
+
fontSize: 14,
|
|
4448
|
+
cursor: "pointer",
|
|
4449
|
+
userSelect: "none",
|
|
4450
|
+
gap: 8,
|
|
4451
|
+
minHeight: 40,
|
|
4452
|
+
background: "transparent",
|
|
4453
|
+
color: "#fff"
|
|
4454
|
+
},
|
|
4455
|
+
oauthGoogle: {
|
|
4456
|
+
background: "linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01))"
|
|
4457
|
+
},
|
|
4458
|
+
oauthGithub: {
|
|
4459
|
+
background: "linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.00))"
|
|
4460
|
+
},
|
|
4461
|
+
dividerRow: {
|
|
4462
|
+
display: "flex",
|
|
4463
|
+
alignItems: "center",
|
|
4464
|
+
gap: 10,
|
|
4465
|
+
marginTop: 12
|
|
4466
|
+
},
|
|
4467
|
+
line: {
|
|
4468
|
+
flex: 1,
|
|
4469
|
+
height: 1,
|
|
4470
|
+
background: "rgba(148,163,184,0.06)"
|
|
4471
|
+
},
|
|
4472
|
+
orText: {
|
|
4473
|
+
fontSize: 13,
|
|
4474
|
+
color: "rgba(230,230,230,0.65)",
|
|
4475
|
+
padding: "0 8px"
|
|
4476
|
+
},
|
|
4477
|
+
form: {
|
|
4478
|
+
display: "flex",
|
|
4479
|
+
flexDirection: "column",
|
|
4480
|
+
gap: 10,
|
|
4481
|
+
marginTop: 6
|
|
4482
|
+
},
|
|
4483
|
+
label: {
|
|
4484
|
+
display: "flex",
|
|
4485
|
+
flexDirection: "column",
|
|
4486
|
+
gap: 6
|
|
4487
|
+
},
|
|
4488
|
+
labelText: {
|
|
4489
|
+
fontSize: 13,
|
|
4490
|
+
color: "rgba(230,230,230,0.68)"
|
|
4491
|
+
},
|
|
4492
|
+
input: {
|
|
4493
|
+
width: "100%",
|
|
4494
|
+
padding: "10px 12px",
|
|
4495
|
+
borderRadius: 10,
|
|
4496
|
+
background: "rgba(255,255,255,0.02)",
|
|
4497
|
+
color: "#e6e6e6",
|
|
4498
|
+
border: "1px solid rgba(148,163,184,0.10)",
|
|
4499
|
+
fontSize: 14,
|
|
4500
|
+
outline: "none",
|
|
4501
|
+
boxSizing: "border-box",
|
|
4502
|
+
transition: "box-shadow 120ms, border-color 120ms"
|
|
4503
|
+
},
|
|
4504
|
+
submitButton: {
|
|
4505
|
+
marginTop: 6,
|
|
4506
|
+
width: "100%",
|
|
4507
|
+
padding: "10px 12px",
|
|
4508
|
+
borderRadius: 10,
|
|
4509
|
+
background: "linear-gradient(180deg,#475569,#94a3b8)",
|
|
4510
|
+
border: "none",
|
|
4511
|
+
color: "#fff",
|
|
4512
|
+
fontWeight: 600,
|
|
4513
|
+
cursor: "pointer",
|
|
4514
|
+
fontSize: 15,
|
|
4515
|
+
display: "inline-flex",
|
|
4516
|
+
alignItems: "center",
|
|
4517
|
+
justifyContent: "center",
|
|
4518
|
+
minHeight: 44
|
|
4519
|
+
},
|
|
4520
|
+
modalFooter: {
|
|
4521
|
+
padding: "12px 18px 18px 18px",
|
|
4522
|
+
borderTop: "1px solid rgba(148,163,184,0.03)",
|
|
4523
|
+
display: "flex",
|
|
4524
|
+
flexDirection: "column",
|
|
4525
|
+
gap: 8
|
|
4526
|
+
},
|
|
4527
|
+
belowRow: {
|
|
4528
|
+
textAlign: "center",
|
|
4529
|
+
display: "flex",
|
|
4530
|
+
justifyContent: "center",
|
|
4531
|
+
gap: 8,
|
|
4532
|
+
alignItems: "center"
|
|
4533
|
+
},
|
|
4534
|
+
muted: {
|
|
4535
|
+
color: "rgba(230,230,230,0.66)",
|
|
4536
|
+
fontSize: 13
|
|
4537
|
+
},
|
|
4538
|
+
link: {
|
|
4539
|
+
color: "#9fb0d9",
|
|
4540
|
+
textDecoration: "none",
|
|
4541
|
+
fontWeight: 600
|
|
4542
|
+
},
|
|
4543
|
+
dividerThin: {
|
|
4544
|
+
height: 1,
|
|
4545
|
+
background: "rgba(148,163,184,0.04)",
|
|
4546
|
+
marginTop: 6,
|
|
4547
|
+
marginBottom: 6
|
|
4548
|
+
},
|
|
4549
|
+
secured: {
|
|
4550
|
+
textAlign: "center"
|
|
4551
|
+
},
|
|
4552
|
+
securedText: {
|
|
4553
|
+
color: "rgba(230,230,230,0.9)",
|
|
4554
|
+
fontSize: 13,
|
|
4555
|
+
fontWeight: 600
|
|
4556
|
+
},
|
|
4557
|
+
/* Toasts: black background */
|
|
4558
|
+
toastContainer: {
|
|
4559
|
+
position: "fixed",
|
|
4560
|
+
top: 18,
|
|
4561
|
+
right: 18,
|
|
4562
|
+
width: 360,
|
|
4563
|
+
maxWidth: "calc(100% - 36px)",
|
|
4564
|
+
display: "flex",
|
|
4565
|
+
flexDirection: "column",
|
|
4566
|
+
gap: 10,
|
|
4567
|
+
zIndex: 6e4
|
|
4568
|
+
},
|
|
4569
|
+
toastBase: {
|
|
4570
|
+
display: "flex",
|
|
4571
|
+
gap: 10,
|
|
4572
|
+
alignItems: "center",
|
|
4573
|
+
padding: "10px 12px",
|
|
4574
|
+
borderRadius: 10,
|
|
4575
|
+
boxShadow: "0 8px 20px rgba(2,6,23,0.6)",
|
|
4576
|
+
color: "#fff",
|
|
4577
|
+
fontSize: 13,
|
|
4578
|
+
minWidth: 120
|
|
4579
|
+
},
|
|
4580
|
+
toastError: {
|
|
4581
|
+
background: "#000000",
|
|
4582
|
+
border: "1px solid rgba(255,255,255,0.06)"
|
|
4583
|
+
},
|
|
4584
|
+
toastSuccess: {
|
|
4585
|
+
background: "#000000",
|
|
4586
|
+
border: "1px solid rgba(255,255,255,0.06)"
|
|
4587
|
+
},
|
|
4588
|
+
toastInfo: {
|
|
4589
|
+
background: "#000000",
|
|
4590
|
+
border: "1px solid rgba(255,255,255,0.06)"
|
|
4591
|
+
},
|
|
4592
|
+
toastCloseBtn: {
|
|
4593
|
+
marginLeft: 8,
|
|
4594
|
+
background: "transparent",
|
|
4595
|
+
border: "none",
|
|
4596
|
+
color: "rgba(255,255,255,0.7)",
|
|
4597
|
+
cursor: "pointer",
|
|
4598
|
+
fontSize: 14,
|
|
4599
|
+
lineHeight: 1
|
|
4600
|
+
}
|
|
4587
4601
|
};
|
|
4588
4602
|
export {
|
|
4589
4603
|
provider_default as FlowlinkAuthProvider,
|