@insforge/react 0.1.2 → 0.1.4
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/atoms.js +76 -34
- package/dist/atoms.js.map +1 -1
- package/dist/atoms.mjs +76 -34
- package/dist/atoms.mjs.map +1 -1
- package/dist/forms.js +76 -34
- package/dist/forms.js.map +1 -1
- package/dist/forms.mjs +76 -34
- package/dist/forms.mjs.map +1 -1
- package/dist/index.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +85 -42
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +85 -43
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/forms.js
CHANGED
|
@@ -378,100 +378,142 @@ function AuthDivider({ text = "or", className }) {
|
|
|
378
378
|
className
|
|
379
379
|
), children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-semibold font-manrope text-[#A3A3A3] leading-normal", children: text }) });
|
|
380
380
|
}
|
|
381
|
-
var
|
|
381
|
+
var OAUTH_PROVIDER_CONFIG = {
|
|
382
382
|
google: {
|
|
383
383
|
name: "Google",
|
|
384
|
-
svg: /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "18", height: "18", viewBox: "0 0 18 18", fill: "none",
|
|
384
|
+
svg: /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "18", height: "18", viewBox: "0 0 18 18", fill: "none", children: [
|
|
385
385
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
386
386
|
"path",
|
|
387
387
|
{
|
|
388
|
-
d: "M17.64 9.
|
|
388
|
+
d: "M17.64 9.2c0-.637-.057-1.251-.164-1.84H9v3.481h4.844c-.209 1.125-.843 2.078-1.796 2.717v2.258h2.908c1.702-1.567 2.684-3.874 2.684-6.615z",
|
|
389
389
|
fill: "#4285F4"
|
|
390
390
|
}
|
|
391
391
|
),
|
|
392
392
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
393
393
|
"path",
|
|
394
394
|
{
|
|
395
|
-
d: "
|
|
395
|
+
d: "M9 18c2.43 0 4.467-.806 5.956-2.184l-2.908-2.258c-.806.54-1.837.86-3.048.86-2.344 0-4.328-1.584-5.036-3.711H.957v2.332C2.438 15.983 5.482 18 9 18z",
|
|
396
396
|
fill: "#34A853"
|
|
397
397
|
}
|
|
398
398
|
),
|
|
399
399
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
400
400
|
"path",
|
|
401
401
|
{
|
|
402
|
-
d: "M3.
|
|
402
|
+
d: "M3.964 10.707c-.18-.54-.282-1.117-.282-1.707 0-.593.102-1.17.282-1.709V4.958H.957C.347 6.173 0 7.548 0 9c0 1.452.348 2.827.957 4.042l3.007-2.335z",
|
|
403
403
|
fill: "#FBBC05"
|
|
404
404
|
}
|
|
405
405
|
),
|
|
406
406
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
407
407
|
"path",
|
|
408
408
|
{
|
|
409
|
-
d: "
|
|
409
|
+
d: "M9 3.58c1.321 0 2.508.454 3.44 1.345l2.582-2.58C13.463.891 11.426 0 9 0 5.482 0 2.438 2.017.957 4.958L3.964 7.29C4.672 5.163 6.656 3.58 9 3.58z",
|
|
410
410
|
fill: "#EA4335"
|
|
411
411
|
}
|
|
412
412
|
)
|
|
413
413
|
] }),
|
|
414
|
-
className: "
|
|
414
|
+
className: "insforge-oauth-google"
|
|
415
415
|
},
|
|
416
416
|
github: {
|
|
417
417
|
name: "GitHub",
|
|
418
|
-
svg: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "18", height: "18", viewBox: "0 0
|
|
418
|
+
svg: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "18", height: "18", viewBox: "0 0 16 16", fill: "currentColor", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z" }) }),
|
|
419
|
+
className: "insforge-oauth-github"
|
|
420
|
+
},
|
|
421
|
+
discord: {
|
|
422
|
+
name: "Discord",
|
|
423
|
+
svg: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
419
424
|
"path",
|
|
420
425
|
{
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
d: "M9 0C4.0275 0 0 4.13211 0 9.22838C0 13.3065 2.5785 16.7648 6.15375 17.9841C6.60375 18.0709 6.76875 17.7853 6.76875 17.5403C6.76875 17.3212 6.76125 16.7405 6.7575 15.9712C4.254 16.5277 3.726 14.7332 3.726 14.7332C3.3165 13.6681 2.72475 13.3832 2.72475 13.3832C1.9095 12.8111 2.78775 12.8229 2.78775 12.8229C3.6915 12.887 4.16625 13.7737 4.16625 13.7737C4.96875 15.1847 6.273 14.777 6.7875 14.5414C6.8685 13.9443 7.10025 13.5381 7.3575 13.3073C5.35875 13.0764 3.258 12.2829 3.258 8.74868C3.258 7.74377 3.60675 6.92392 4.18425 6.28123C4.083 6.04805 3.77925 5.10916 4.263 3.83423C4.263 3.83423 5.01675 3.58633 6.738 4.78364C7.458 4.57864 8.223 4.47614 8.988 4.47177C9.753 4.47614 10.518 4.57864 11.238 4.78364C12.948 3.58633 13.7017 3.83423 13.7017 3.83423C14.1855 5.10916 13.8818 6.04805 13.7917 6.28123C14.3655 6.92392 14.7142 7.74377 14.7142 8.74868C14.7142 12.2923 12.6105 13.0725 10.608 13.2995C10.923 13.5765 11.2155 14.1423 11.2155 15.0071C11.2155 16.242 11.205 17.2344 11.205 17.5341C11.205 17.7759 11.3625 18.0647 11.823 17.9723C15.4237 16.7609 18 13.3002 18 9.22838C18 4.13211 13.9703 0 9 0Z",
|
|
424
|
-
fill: "currentColor"
|
|
426
|
+
d: "M20.317 4.37a19.791 19.791 0 00-4.885-1.515.074.074 0 00-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 00-5.487 0 12.64 12.64 0 00-.617-1.25.077.077 0 00-.079-.037A19.736 19.736 0 003.677 4.37a.07.07 0 00-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 00.031.057 19.9 19.9 0 005.993 3.03.078.078 0 00.084-.028c.462-.63.874-1.295 1.226-1.994a.076.076 0 00-.041-.106 13.107 13.107 0 01-1.872-.892.077.077 0 01-.008-.128 10.2 10.2 0 00.372-.292.074.074 0 01.077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 01.078.01c.12.098.246.198.373.292a.077.077 0 01-.006.127 12.299 12.299 0 01-1.873.892.077.077 0 00-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 00.084.028 19.839 19.839 0 006.002-3.03.077.077 0 00.032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 00-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418z",
|
|
427
|
+
fill: "#5865F2"
|
|
425
428
|
}
|
|
426
429
|
) }),
|
|
427
|
-
className: "
|
|
430
|
+
className: "insforge-oauth-discord"
|
|
428
431
|
},
|
|
429
|
-
|
|
430
|
-
name: "
|
|
431
|
-
svg: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "18", height: "18", viewBox: "0 0
|
|
432
|
+
facebook: {
|
|
433
|
+
name: "Facebook",
|
|
434
|
+
svg: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
432
435
|
"path",
|
|
433
436
|
{
|
|
434
|
-
d: "
|
|
435
|
-
fill: "#
|
|
437
|
+
d: "M24 12.073C24 5.405 18.627 0 12 0S0 5.405 0 12.073C0 18.1 4.388 23.094 10.125 24v-8.437H7.078v-3.49h3.047v-2.66c0-3.025 1.792-4.697 4.533-4.697 1.312 0 2.686.236 2.686.236v2.971H15.83c-1.49 0-1.955.93-1.955 1.886v2.264h3.328l-.532 3.49h-2.796V24C19.612 23.094 24 18.1 24 12.073z",
|
|
438
|
+
fill: "#1877F2"
|
|
436
439
|
}
|
|
437
440
|
) }),
|
|
438
|
-
className: "
|
|
441
|
+
className: "insforge-oauth-facebook"
|
|
439
442
|
},
|
|
440
|
-
|
|
441
|
-
name: "
|
|
442
|
-
svg: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "18", height: "18", viewBox: "0 0
|
|
443
|
+
linkedin: {
|
|
444
|
+
name: "LinkedIn",
|
|
445
|
+
svg: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
443
446
|
"path",
|
|
444
447
|
{
|
|
445
|
-
d: "
|
|
446
|
-
fill: "
|
|
448
|
+
d: "M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.062 2.062 0 01-2.063-2.065 2.064 2.064 0 112.063 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z",
|
|
449
|
+
fill: "#0A66C2"
|
|
447
450
|
}
|
|
448
451
|
) }),
|
|
449
|
-
className: "
|
|
452
|
+
className: "insforge-oauth-linkedin"
|
|
450
453
|
},
|
|
451
454
|
microsoft: {
|
|
452
455
|
name: "Microsoft",
|
|
453
|
-
svg: /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "18", height: "18", viewBox: "0 0 23 23", fill: "none",
|
|
456
|
+
svg: /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "18", height: "18", viewBox: "0 0 23 23", fill: "none", children: [
|
|
454
457
|
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M0 0h11v11H0z", fill: "#F25022" }),
|
|
455
458
|
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 0h11v11H12z", fill: "#7FBA00" }),
|
|
456
459
|
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M0 12h11v11H0z", fill: "#00A4EF" }),
|
|
457
460
|
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 12h11v11H12z", fill: "#FFB900" })
|
|
458
461
|
] }),
|
|
459
|
-
className: "
|
|
462
|
+
className: "insforge-oauth-microsoft"
|
|
460
463
|
},
|
|
461
|
-
|
|
462
|
-
name: "
|
|
463
|
-
svg: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "
|
|
464
|
+
apple: {
|
|
465
|
+
name: "Apple",
|
|
466
|
+
svg: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M17.05 20.28c-.98.95-2.05.8-3.08.35-1.09-.46-2.09-.48-3.24 0-1.44.62-2.2.44-3.06-.35C2.79 15.25 3.51 7.59 9.05 7.31c1.35.07 2.29.74 3.08.8 1.18-.24 2.31-.93 3.57-.84 1.51.12 2.65.72 3.4 1.8-3.12 1.87-2.38 5.98.48 7.13-.57 1.5-1.31 2.99-2.54 4.09l.01-.01zM12.03 7.25c-.15-2.23 1.66-4.07 3.74-4.25.29 2.58-2.34 4.5-3.74 4.25z" }) }),
|
|
467
|
+
className: "insforge-oauth-apple"
|
|
468
|
+
},
|
|
469
|
+
x: {
|
|
470
|
+
name: "X",
|
|
471
|
+
svg: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z" }) }),
|
|
472
|
+
className: "insforge-oauth-x"
|
|
473
|
+
},
|
|
474
|
+
instagram: {
|
|
475
|
+
name: "Instagram",
|
|
476
|
+
svg: /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", children: [
|
|
477
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
478
|
+
"path",
|
|
479
|
+
{
|
|
480
|
+
d: "M12 2.163c3.204 0 3.584.012 4.85.07 3.252.148 4.771 1.691 4.919 4.919.058 1.265.069 1.645.069 4.849 0 3.205-.012 3.584-.069 4.849-.149 3.225-1.664 4.771-4.919 4.919-1.266.058-1.644.07-4.85.07-3.204 0-3.584-.012-4.849-.07-3.26-.149-4.771-1.699-4.919-4.92-.058-1.265-.07-1.644-.07-4.849 0-3.204.013-3.583.07-4.849.149-3.227 1.664-4.771 4.919-4.919 1.266-.057 1.645-.069 4.849-.069zM12 0C8.741 0 8.333.014 7.053.072 2.695.272.273 2.69.073 7.052.014 8.333 0 8.741 0 12c0 3.259.014 3.668.072 4.948.2 4.358 2.618 6.78 6.98 6.98C8.333 23.986 8.741 24 12 24c3.259 0 3.668-.014 4.948-.072 4.354-.2 6.782-2.618 6.979-6.98.059-1.28.073-1.689.073-4.948 0-3.259-.014-3.667-.072-4.947-.196-4.354-2.617-6.78-6.979-6.98C15.668.014 15.259 0 12 0zm0 5.838a6.162 6.162 0 100 12.324 6.162 6.162 0 000-12.324zM12 16a4 4 0 110-8 4 4 0 010 8zm6.406-11.845a1.44 1.44 0 100 2.881 1.44 1.44 0 000-2.881z",
|
|
481
|
+
fill: "url(#instagram-gradient)"
|
|
482
|
+
}
|
|
483
|
+
),
|
|
484
|
+
/* @__PURE__ */ jsxRuntime.jsx("defs", { children: /* @__PURE__ */ jsxRuntime.jsxs("linearGradient", { id: "instagram-gradient", x1: "0%", y1: "100%", x2: "100%", y2: "0%", children: [
|
|
485
|
+
/* @__PURE__ */ jsxRuntime.jsx("stop", { offset: "0%", stopColor: "#FD5949" }),
|
|
486
|
+
/* @__PURE__ */ jsxRuntime.jsx("stop", { offset: "50%", stopColor: "#D6249F" }),
|
|
487
|
+
/* @__PURE__ */ jsxRuntime.jsx("stop", { offset: "100%", stopColor: "#285AEB" })
|
|
488
|
+
] }) })
|
|
489
|
+
] }),
|
|
490
|
+
className: "insforge-oauth-instagram"
|
|
491
|
+
},
|
|
492
|
+
tiktok: {
|
|
493
|
+
name: "TikTok",
|
|
494
|
+
svg: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
464
495
|
"path",
|
|
465
496
|
{
|
|
466
|
-
d: "
|
|
467
|
-
fill: "
|
|
497
|
+
d: "M19.589 6.686a4.793 4.793 0 01-3.77-4.245V2h-3.445v13.672a2.896 2.896 0 01-5.201 1.743l-.002-.001.002.001a2.895 2.895 0 013.183-4.51v-3.5a6.329 6.329 0 00-5.394 10.692 6.33 6.33 0 0010.857-4.424V8.687a8.182 8.182 0 004.773 1.526V6.79a4.831 4.831 0 01-1.003-.104z",
|
|
498
|
+
fill: "currentColor"
|
|
499
|
+
}
|
|
500
|
+
) }),
|
|
501
|
+
className: "insforge-oauth-tiktok"
|
|
502
|
+
},
|
|
503
|
+
spotify: {
|
|
504
|
+
name: "Spotify",
|
|
505
|
+
svg: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
506
|
+
"path",
|
|
507
|
+
{
|
|
508
|
+
d: "M12 0C5.4 0 0 5.4 0 12s5.4 12 12 12 12-5.4 12-12S18.66 0 12 0zm5.521 17.34c-.24.359-.66.48-1.021.24-2.82-1.74-6.36-2.101-10.561-1.141-.418.122-.779-.179-.899-.539-.12-.421.18-.78.54-.9 4.56-1.021 8.52-.6 11.64 1.32.42.18.479.659.301 1.02zm1.44-3.3c-.301.42-.841.6-1.262.3-3.239-1.98-8.159-2.58-11.939-1.38-.479.12-1.02-.12-1.14-.6-.12-.48.12-1.021.6-1.141C9.6 9.9 15 10.561 18.72 12.84c.361.181.54.78.241 1.2zm.12-3.36C15.24 8.4 8.82 8.16 5.16 9.301c-.6.179-1.2-.181-1.38-.721-.18-.601.18-1.2.72-1.381 4.26-1.26 11.28-1.02 15.721 1.621.539.3.719 1.02.419 1.56-.299.421-1.02.599-1.559.3z",
|
|
509
|
+
fill: "#1DB954"
|
|
468
510
|
}
|
|
469
511
|
) }),
|
|
470
|
-
className: "
|
|
512
|
+
className: "insforge-oauth-spotify"
|
|
471
513
|
}
|
|
472
514
|
};
|
|
473
515
|
function getProviderConfig(provider) {
|
|
474
|
-
return
|
|
516
|
+
return OAUTH_PROVIDER_CONFIG[provider] || null;
|
|
475
517
|
}
|
|
476
518
|
function AuthOAuthButton({
|
|
477
519
|
provider,
|