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 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
- toasts.forEach((t) => clearTimeout(t._timer));
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 created = Date.now();
33
- const t = { id, type, message, created, _timer: null };
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 text = await res.text().catch(() => "");
89
- return { _raw: text };
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, "aria-hidden": true })), /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("h1", { style: title }, "Sign up to ", agency?.name || "App"), /* @__PURE__ */ React.createElement("div", { style: subtitle }, "Welcome! Create your account.")))), /* @__PURE__ */ React.createElement("section", { style: oauthSection }, /* @__PURE__ */ React.createElement(
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 overlay = {
234
- position: "fixed",
235
- inset: 0,
236
- display: "flex",
237
- alignItems: "center",
238
- justifyContent: "center",
239
- padding: 20,
240
- background: "linear-gradient(180deg, rgba(2,6,23,0.22), rgba(2,6,23,0.32))",
241
- backdropFilter: "blur(6px)",
242
- minHeight: "100vh",
243
- zIndex: 9999
244
- };
245
- const modal = {
246
- width: "100%",
247
- maxWidth: 560,
248
- borderRadius: 14,
249
- background: "linear-gradient(180deg, rgba(15,19,24,0.6), rgba(10,12,16,0.6))",
250
- // translucent neutral so background peeks through
251
- border: "1px solid rgba(99,102,106,0.12)",
252
- // slightly stronger neutral border
253
- boxShadow: "0 20px 50px rgba(2,6,23,0.55), inset 0 1px 0 rgba(255,255,255,0.02)",
254
- overflow: "hidden",
255
- display: "flex",
256
- flexDirection: "column",
257
- transform: "translateY(-6px)"
258
- };
259
- const modalInner = {
260
- padding: 18,
261
- display: "flex",
262
- flexDirection: "column",
263
- gap: 12
264
- };
265
- const header = {
266
- paddingBottom: 6,
267
- borderBottom: "1px solid rgba(148,163,184,0.04)"
268
- };
269
- const brandRow = {
270
- display: "flex",
271
- alignItems: "center",
272
- gap: 12
273
- };
274
- const logo = {
275
- width: 44,
276
- height: 44,
277
- display: "flex",
278
- alignItems: "center",
279
- justifyContent: "center"
280
- };
281
- const logoCircle = {
282
- width: 36,
283
- height: 36,
284
- borderRadius: 999,
285
- background: "linear-gradient(135deg,#2f3438,#11151a)",
286
- boxShadow: "0 4px 12px rgba(2,6,23,0.6)"
287
- };
288
- const title = {
289
- margin: 0,
290
- fontSize: 18,
291
- fontWeight: 600,
292
- color: "#e6e6e6"
293
- };
294
- const subtitle = {
295
- fontSize: 13,
296
- color: "rgba(230,230,230,0.72)",
297
- marginTop: 4
298
- };
299
- const oauthSection = {
300
- marginTop: 8,
301
- display: "flex",
302
- gap: 8
303
- };
304
- const oauthButton = {
305
- flex: 1,
306
- display: "inline-flex",
307
- alignItems: "center",
308
- justifyContent: "center",
309
- padding: "10px 12px",
310
- borderRadius: 10,
311
- border: "1px solid rgba(148,163,184,0.08)",
312
- fontSize: 14,
313
- cursor: "pointer",
314
- userSelect: "none",
315
- gap: 8,
316
- minHeight: 40
317
- };
318
- const oauthGoogle = {
319
- background: "linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01))",
320
- color: "#fff"
321
- };
322
- const oauthGithub = {
323
- background: "linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.00))",
324
- color: "#fff"
325
- };
326
- const dividerRow = {
327
- display: "flex",
328
- alignItems: "center",
329
- gap: 10,
330
- marginTop: 12
331
- };
332
- const line = {
333
- flex: 1,
334
- height: 1,
335
- background: "rgba(148,163,184,0.06)"
336
- };
337
- const orText = {
338
- fontSize: 13,
339
- color: "rgba(230,230,230,0.65)",
340
- padding: "0 8px"
341
- };
342
- const form = {
343
- display: "flex",
344
- flexDirection: "column",
345
- gap: 10,
346
- marginTop: 6
347
- };
348
- const label = {
349
- display: "flex",
350
- flexDirection: "column",
351
- gap: 6
352
- };
353
- const labelText = {
354
- fontSize: 13,
355
- color: "rgba(230,230,230,0.68)"
356
- };
357
- const input = {
358
- width: "100%",
359
- padding: "10px 12px",
360
- borderRadius: 10,
361
- background: "rgba(255,255,255,0.02)",
362
- color: "#e6e6e6",
363
- border: "1px solid rgba(148,163,184,0.10)",
364
- fontSize: 14,
365
- outline: "none",
366
- boxSizing: "border-box",
367
- transition: "box-shadow 120ms, border-color 120ms"
368
- };
369
- const submitButton = {
370
- marginTop: 6,
371
- width: "100%",
372
- padding: "10px 12px",
373
- borderRadius: 10,
374
- background: "linear-gradient(180deg,#475569,#94a3b8)",
375
- border: "none",
376
- color: "#fff",
377
- fontWeight: 600,
378
- cursor: "pointer",
379
- fontSize: 15,
380
- display: "inline-flex",
381
- alignItems: "center",
382
- justifyContent: "center",
383
- minHeight: 44
384
- };
385
- const modalFooter = {
386
- padding: "12px 18px 18px 18px",
387
- borderTop: "1px solid rgba(148,163,184,0.03)",
388
- display: "flex",
389
- flexDirection: "column",
390
- gap: 8
391
- };
392
- const belowRow = {
393
- textAlign: "center",
394
- display: "flex",
395
- justifyContent: "center",
396
- gap: 8,
397
- alignItems: "center"
398
- };
399
- const muted = {
400
- color: "rgba(230,230,230,0.66)",
401
- fontSize: 13
402
- };
403
- const link = {
404
- color: "#9fb0d9",
405
- textDecoration: "none",
406
- fontWeight: 600
407
- };
408
- const dividerThin = {
409
- height: 1,
410
- background: "rgba(148,163,184,0.04)",
411
- marginTop: 6,
412
- marginBottom: 6
413
- };
414
- const secured = {
415
- textAlign: "center"
416
- };
417
- const securedText = {
418
- color: "rgba(230,230,230,0.9)",
419
- fontSize: 13,
420
- fontWeight: 600
421
- };
422
- const toastContainer = {
423
- position: "fixed",
424
- top: 18,
425
- right: 18,
426
- width: 360,
427
- maxWidth: "calc(100% - 36px)",
428
- display: "flex",
429
- flexDirection: "column",
430
- gap: 10,
431
- zIndex: 6e4
432
- };
433
- const toastBase = {
434
- display: "flex",
435
- gap: 10,
436
- alignItems: "center",
437
- padding: "10px 12px",
438
- borderRadius: 10,
439
- boxShadow: "0 8px 20px rgba(2,6,23,0.6)",
440
- color: "#fff",
441
- fontSize: 13,
442
- minWidth: 120
443
- };
444
- const toastError = {
445
- background: "#000000",
446
- border: "1px solid rgba(255,255,255,0.06)"
447
- };
448
- const toastSuccess = {
449
- background: "#000000",
450
- border: "1px solid rgba(255,255,255,0.06)"
451
- };
452
- const toastInfo = {
453
- background: "#000000",
454
- border: "1px solid rgba(255,255,255,0.06)"
455
- };
456
- const toastCloseBtn = {
457
- marginLeft: 8,
458
- background: "transparent",
459
- border: "none",
460
- color: "rgba(255,255,255,0.7)",
461
- cursor: "pointer",
462
- fontSize: 14,
463
- lineHeight: 1
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