flowlink-auth 2.8.1 → 2.8.3

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
@@ -24,7 +24,7 @@ function SignUp({ agency = { name: "MyApp", logo: "" } }) {
24
24
  useEffect(() => {
25
25
  const meta = document.createElement("meta");
26
26
  meta.name = "viewport";
27
- meta.content = "width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no";
27
+ meta.content = "width=device-width, initial-scale=1, maximum-scale=1";
28
28
  document.head.appendChild(meta);
29
29
  return () => {
30
30
  if (redirectTimer.current) clearTimeout(redirectTimer.current);
@@ -40,7 +40,10 @@ function SignUp({ agency = { name: "MyApp", logo: "" } }) {
40
40
  function showToast(type, message, ms = 5e3) {
41
41
  const id = ++toastId.current;
42
42
  const t = { id, type, message, _timer: null };
43
- setToasts((prev) => [t, ...prev].slice(0, 6));
43
+ setToasts((prev) => {
44
+ const next = [t, ...prev].slice(0, 6);
45
+ return next;
46
+ });
44
47
  const timer = setTimeout(() => {
45
48
  setToasts((prev) => prev.filter((x) => x.id !== id));
46
49
  }, ms);
@@ -91,8 +94,8 @@ function SignUp({ agency = { name: "MyApp", logo: "" } }) {
91
94
  body: JSON.stringify({ name: name.trim(), email: email.trim(), password })
92
95
  });
93
96
  const data = await res.json().catch(async () => {
94
- const txt = await res.text().catch(() => "");
95
- return { _raw: txt };
97
+ const text = await res.text().catch(() => "");
98
+ return { _raw: text };
96
99
  });
97
100
  if (!res.ok) {
98
101
  const errMsg = data?.error || data?._raw || `Signup failed (${res.status})`;
@@ -123,7 +126,9 @@ function SignUp({ agency = { name: "MyApp", logo: "" } }) {
123
126
  const callbackUrl = encodeURIComponent(`${typeof window !== "undefined" ? window.location.origin : ""}/signup`);
124
127
  const sdkBase = baseUrl || (typeof window !== "undefined" ? window.location.origin.replace(/\/+$/, "") : "");
125
128
  const startUrl = `${sdkBase}/sdk/auth/start?rid=${rid}&source=${encodeURIComponent(provider)}&callbackUrl=${callbackUrl}`;
126
- if (!publishableKey) throw new Error("Missing publishable key (client side).");
129
+ if (!publishableKey) {
130
+ throw new Error("Missing publishable key (client side).");
131
+ }
127
132
  const res = await fetch(startUrl, {
128
133
  method: "GET",
129
134
  headers: { "x-publishable-key": publishableKey }
@@ -146,14 +151,15 @@ function SignUp({ agency = { name: "MyApp", logo: "" } }) {
146
151
  if (e && typeof e.preventDefault === "function") e.preventDefault();
147
152
  startOAuthFlow("github");
148
153
  };
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(
154
+ return /* @__PURE__ */ React.createElement("div", { style: overlay }, /* @__PURE__ */ React.createElement("div", { style: toastContainer, "aria-live": "polite", "aria-atomic": "true" }, toasts.map((t) => /* @__PURE__ */ React.createElement(
150
155
  "div",
151
156
  {
152
157
  key: t.id,
153
158
  role: "status",
159
+ "aria-live": "polite",
154
160
  style: {
155
- ...styles.toastBase,
156
- ...t.type === "error" ? styles.toastError : t.type === "success" ? styles.toastSuccess : styles.toastInfo
161
+ ...toastBase,
162
+ ...t.type === "error" ? toastError : t.type === "success" ? toastSuccess : toastInfo
157
163
  },
158
164
  onMouseEnter: () => {
159
165
  if (t._timer) clearTimeout(t._timer);
@@ -164,13 +170,13 @@ function SignUp({ agency = { name: "MyApp", logo: "" } }) {
164
170
  }
165
171
  },
166
172
  /* @__PURE__ */ React.createElement("div", { style: { flex: 1 } }, t.message),
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(
173
+ /* @__PURE__ */ React.createElement("button", { "aria-label": "Dismiss", onClick: () => removeToast(t.id), style: toastCloseBtn }, "\u2715")
174
+ ))), /* @__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(
169
175
  "button",
170
176
  {
171
177
  onClick: handleGoogle,
172
178
  type: "button",
173
- style: { ...styles.oauthButton, ...styles.oauthGoogle },
179
+ style: { ...oauthButton, ...oauthGoogle },
174
180
  disabled: loading || loadingOauth.google,
175
181
  "aria-disabled": loading || loadingOauth.google
176
182
  },
@@ -181,13 +187,13 @@ function SignUp({ agency = { name: "MyApp", logo: "" } }) {
181
187
  {
182
188
  onClick: handleGithub,
183
189
  type: "button",
184
- style: { ...styles.oauthButton, ...styles.oauthGithub },
190
+ style: { ...oauthButton, ...oauthGithub },
185
191
  disabled: loading || loadingOauth.github,
186
192
  "aria-disabled": loading || loadingOauth.github
187
193
  },
188
194
  /* @__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" })),
189
195
  /* @__PURE__ */ React.createElement("span", null, loadingOauth.github ? "Loading..." : "Continue with GitHub")
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(
196
+ )), /* @__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(
191
197
  "input",
192
198
  {
193
199
  id: "name",
@@ -195,10 +201,10 @@ function SignUp({ agency = { name: "MyApp", logo: "" } }) {
195
201
  value: name,
196
202
  onChange: (e) => setName(e.target.value),
197
203
  placeholder: "Your name",
198
- style: styles.input,
204
+ style: input,
199
205
  autoComplete: "name"
200
206
  }
201
- )), /* @__PURE__ */ React.createElement("label", { style: styles.label, htmlFor: "email" }, /* @__PURE__ */ React.createElement("span", { style: styles.labelText }, "Email address"), /* @__PURE__ */ React.createElement(
207
+ )), /* @__PURE__ */ React.createElement("label", { style: label, htmlFor: "email" }, /* @__PURE__ */ React.createElement("span", { style: labelText }, "Email address"), /* @__PURE__ */ React.createElement(
202
208
  "input",
203
209
  {
204
210
  id: "email",
@@ -207,10 +213,10 @@ function SignUp({ agency = { name: "MyApp", logo: "" } }) {
207
213
  onChange: (e) => setEmail(e.target.value),
208
214
  required: true,
209
215
  placeholder: "you@example.com",
210
- style: styles.input,
216
+ style: input,
211
217
  autoComplete: "email"
212
218
  }
213
- )), /* @__PURE__ */ React.createElement("label", { style: styles.label, htmlFor: "password" }, /* @__PURE__ */ React.createElement("span", { style: styles.labelText }, "Password"), /* @__PURE__ */ React.createElement(
219
+ )), /* @__PURE__ */ React.createElement("label", { style: label, htmlFor: "password" }, /* @__PURE__ */ React.createElement("span", { style: labelText }, "Password"), /* @__PURE__ */ React.createElement(
214
220
  "input",
215
221
  {
216
222
  id: "password",
@@ -219,262 +225,253 @@ function SignUp({ agency = { name: "MyApp", logo: "" } }) {
219
225
  onChange: (e) => setPassword(e.target.value),
220
226
  required: true,
221
227
  placeholder: "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022",
222
- style: styles.input,
228
+ style: input,
223
229
  autoComplete: "new-password"
224
230
  }
225
231
  )), /* @__PURE__ */ React.createElement(
226
232
  "button",
227
233
  {
228
234
  type: "submit",
229
- style: styles.submitButton,
235
+ style: submitButton,
230
236
  disabled: loading,
231
237
  "aria-disabled": loading
232
238
  },
233
239
  loading ? "Signing up..." : "Sign Up"
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")))));
240
+ ))), /* @__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")))));
235
241
  }
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
- }
242
+ const overlay = {
243
+ position: "fixed",
244
+ inset: 0,
245
+ display: "block",
246
+ // page scroll model
247
+ padding: 20,
248
+ background: "linear-gradient(180deg, rgba(2,6,23,0.22), rgba(2,6,23,0.32))",
249
+ backdropFilter: "blur(6px)",
250
+ overflowY: "auto",
251
+ WebkitOverflowScrolling: "touch",
252
+ minHeight: "100vh",
253
+ zIndex: 9999
254
+ };
255
+ const modal = {
256
+ width: "100%",
257
+ maxWidth: 460,
258
+ // reduced width per request
259
+ margin: "40px auto",
260
+ borderRadius: 14,
261
+ background: "linear-gradient(180deg, rgba(15,19,24,0.6), rgba(10,12,16,0.6))",
262
+ border: "1px solid rgba(99,102,106,0.12)",
263
+ boxShadow: "0 20px 50px 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
+ };
269
+ const modalInner = {
270
+ padding: 18,
271
+ display: "flex",
272
+ flexDirection: "column",
273
+ gap: 12,
274
+ overflowY: "auto"
275
+ };
276
+ const header = {
277
+ paddingBottom: 6,
278
+ borderBottom: "1px solid rgba(148,163,184,0.04)"
279
+ };
280
+ const brandRow = {
281
+ display: "flex",
282
+ alignItems: "center",
283
+ gap: 12
284
+ };
285
+ const logo = {
286
+ width: 44,
287
+ height: 44,
288
+ display: "flex",
289
+ alignItems: "center",
290
+ justifyContent: "center"
291
+ };
292
+ const logoCircle = {
293
+ width: 36,
294
+ height: 36,
295
+ borderRadius: 999,
296
+ background: "linear-gradient(135deg,#2f3438,#11151a)",
297
+ boxShadow: "0 4px 12px rgba(2,6,23,0.6)"
298
+ };
299
+ const title = {
300
+ margin: 0,
301
+ fontSize: 18,
302
+ fontWeight: 600,
303
+ color: "#e6e6e6"
304
+ };
305
+ const subtitle = {
306
+ fontSize: 13,
307
+ color: "rgba(230,230,230,0.72)",
308
+ marginTop: 4
309
+ };
310
+ const oauthSection = {
311
+ marginTop: 8,
312
+ display: "flex",
313
+ gap: 8
314
+ };
315
+ const oauthButton = {
316
+ flex: 1,
317
+ display: "inline-flex",
318
+ alignItems: "center",
319
+ justifyContent: "center",
320
+ padding: "10px 12px",
321
+ borderRadius: 10,
322
+ border: "1px solid rgba(148,163,184,0.08)",
323
+ fontSize: 14,
324
+ cursor: "pointer",
325
+ userSelect: "none",
326
+ gap: 8,
327
+ minHeight: 40
328
+ };
329
+ const oauthGoogle = {
330
+ background: "linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01))",
331
+ color: "#fff"
332
+ };
333
+ const oauthGithub = {
334
+ background: "linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.00))",
335
+ color: "#fff"
336
+ };
337
+ const dividerRow = {
338
+ display: "flex",
339
+ alignItems: "center",
340
+ gap: 10,
341
+ marginTop: 12
342
+ };
343
+ const line = {
344
+ flex: 1,
345
+ height: 1,
346
+ background: "rgba(148,163,184,0.06)"
347
+ };
348
+ const orText = {
349
+ fontSize: 13,
350
+ color: "rgba(230,230,230,0.65)",
351
+ padding: "0 8px"
352
+ };
353
+ const form = {
354
+ display: "flex",
355
+ flexDirection: "column",
356
+ gap: 10,
357
+ marginTop: 6
358
+ };
359
+ const label = {
360
+ display: "flex",
361
+ flexDirection: "column",
362
+ gap: 6
363
+ };
364
+ const labelText = {
365
+ fontSize: 13,
366
+ color: "rgba(230,230,230,0.68)"
367
+ };
368
+ const input = {
369
+ width: "100%",
370
+ padding: "10px 12px",
371
+ borderRadius: 10,
372
+ background: "rgba(255,255,255,0.02)",
373
+ color: "#e6e6e6",
374
+ border: "1px solid rgba(148,163,184,0.10)",
375
+ fontSize: 14,
376
+ outline: "none",
377
+ boxSizing: "border-box",
378
+ transition: "box-shadow 120ms, border-color 120ms"
379
+ };
380
+ const submitButton = {
381
+ marginTop: 6,
382
+ width: "100%",
383
+ padding: "10px 12px",
384
+ borderRadius: 10,
385
+ background: "linear-gradient(180deg,#475569,#94a3b8)",
386
+ border: "none",
387
+ color: "#fff",
388
+ fontWeight: 600,
389
+ cursor: "pointer",
390
+ fontSize: 15,
391
+ display: "inline-flex",
392
+ alignItems: "center",
393
+ justifyContent: "center",
394
+ minHeight: 44
395
+ };
396
+ const modalFooter = {
397
+ padding: "12px 18px 18px 18px",
398
+ borderTop: "1px solid rgba(148,163,184,0.03)",
399
+ display: "flex",
400
+ flexDirection: "column",
401
+ gap: 8
402
+ };
403
+ const belowRow = {
404
+ textAlign: "center",
405
+ display: "flex",
406
+ justifyContent: "center",
407
+ gap: 8,
408
+ alignItems: "center"
409
+ };
410
+ const muted = {
411
+ color: "rgba(230,230,230,0.66)",
412
+ fontSize: 13
413
+ };
414
+ const link = {
415
+ color: "#9fb0d9",
416
+ textDecoration: "none",
417
+ fontWeight: 600
418
+ };
419
+ const dividerThin = {
420
+ height: 1,
421
+ background: "rgba(148,163,184,0.04)",
422
+ marginTop: 6,
423
+ marginBottom: 6
424
+ };
425
+ const secured = {
426
+ textAlign: "center"
427
+ };
428
+ const securedText = {
429
+ color: "rgba(230,230,230,0.9)",
430
+ fontSize: 13,
431
+ fontWeight: 600
432
+ };
433
+ const toastContainer = {
434
+ position: "fixed",
435
+ top: 18,
436
+ right: 18,
437
+ width: 360,
438
+ maxWidth: "calc(100% - 36px)",
439
+ display: "flex",
440
+ flexDirection: "column",
441
+ gap: 10,
442
+ zIndex: 6e4
443
+ };
444
+ const toastBase = {
445
+ display: "flex",
446
+ gap: 10,
447
+ alignItems: "center",
448
+ padding: "10px 12px",
449
+ borderRadius: 10,
450
+ boxShadow: "0 8px 20px rgba(2,6,23,0.6)",
451
+ color: "#fff",
452
+ fontSize: 13,
453
+ minWidth: 120
454
+ };
455
+ const toastError = {
456
+ background: "#000000",
457
+ border: "1px solid rgba(255,255,255,0.06)"
458
+ };
459
+ const toastSuccess = {
460
+ background: "#000000",
461
+ border: "1px solid rgba(255,255,255,0.06)"
462
+ };
463
+ const toastInfo = {
464
+ background: "#000000",
465
+ border: "1px solid rgba(255,255,255,0.06)"
466
+ };
467
+ const toastCloseBtn = {
468
+ marginLeft: 8,
469
+ background: "transparent",
470
+ border: "none",
471
+ color: "rgba(255,255,255,0.7)",
472
+ cursor: "pointer",
473
+ fontSize: 14,
474
+ lineHeight: 1
478
475
  };
479
476
  export {
480
477
  SignUp as default
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flowlink-auth",
3
- "version": "2.8.1",
3
+ "version": "2.8.3",
4
4
  "description": "Custom auth library",
5
5
  "main": "dist/index.js",
6
6
  "types": "src/index.d.ts",