@insforge/react 0.1.2 → 0.1.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/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.mjs
CHANGED
|
@@ -376,100 +376,142 @@ function AuthDivider({ text = "or", className }) {
|
|
|
376
376
|
className
|
|
377
377
|
), children: /* @__PURE__ */ jsx("span", { className: "text-sm font-semibold font-manrope text-[#A3A3A3] leading-normal", children: text }) });
|
|
378
378
|
}
|
|
379
|
-
var
|
|
379
|
+
var OAUTH_PROVIDER_CONFIG = {
|
|
380
380
|
google: {
|
|
381
381
|
name: "Google",
|
|
382
|
-
svg: /* @__PURE__ */ jsxs("svg", { width: "18", height: "18", viewBox: "0 0 18 18", fill: "none",
|
|
382
|
+
svg: /* @__PURE__ */ jsxs("svg", { width: "18", height: "18", viewBox: "0 0 18 18", fill: "none", children: [
|
|
383
383
|
/* @__PURE__ */ jsx(
|
|
384
384
|
"path",
|
|
385
385
|
{
|
|
386
|
-
d: "M17.64 9.
|
|
386
|
+
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",
|
|
387
387
|
fill: "#4285F4"
|
|
388
388
|
}
|
|
389
389
|
),
|
|
390
390
|
/* @__PURE__ */ jsx(
|
|
391
391
|
"path",
|
|
392
392
|
{
|
|
393
|
-
d: "
|
|
393
|
+
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",
|
|
394
394
|
fill: "#34A853"
|
|
395
395
|
}
|
|
396
396
|
),
|
|
397
397
|
/* @__PURE__ */ jsx(
|
|
398
398
|
"path",
|
|
399
399
|
{
|
|
400
|
-
d: "M3.
|
|
400
|
+
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",
|
|
401
401
|
fill: "#FBBC05"
|
|
402
402
|
}
|
|
403
403
|
),
|
|
404
404
|
/* @__PURE__ */ jsx(
|
|
405
405
|
"path",
|
|
406
406
|
{
|
|
407
|
-
d: "
|
|
407
|
+
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",
|
|
408
408
|
fill: "#EA4335"
|
|
409
409
|
}
|
|
410
410
|
)
|
|
411
411
|
] }),
|
|
412
|
-
className: "
|
|
412
|
+
className: "insforge-oauth-google"
|
|
413
413
|
},
|
|
414
414
|
github: {
|
|
415
415
|
name: "GitHub",
|
|
416
|
-
svg: /* @__PURE__ */ jsx("svg", { width: "18", height: "18", viewBox: "0 0
|
|
416
|
+
svg: /* @__PURE__ */ jsx("svg", { width: "18", height: "18", viewBox: "0 0 16 16", fill: "currentColor", children: /* @__PURE__ */ 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" }) }),
|
|
417
|
+
className: "insforge-oauth-github"
|
|
418
|
+
},
|
|
419
|
+
discord: {
|
|
420
|
+
name: "Discord",
|
|
421
|
+
svg: /* @__PURE__ */ jsx("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsx(
|
|
417
422
|
"path",
|
|
418
423
|
{
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
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",
|
|
422
|
-
fill: "currentColor"
|
|
424
|
+
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",
|
|
425
|
+
fill: "#5865F2"
|
|
423
426
|
}
|
|
424
427
|
) }),
|
|
425
|
-
className: "
|
|
428
|
+
className: "insforge-oauth-discord"
|
|
426
429
|
},
|
|
427
|
-
|
|
428
|
-
name: "
|
|
429
|
-
svg: /* @__PURE__ */ jsx("svg", { width: "18", height: "18", viewBox: "0 0
|
|
430
|
+
facebook: {
|
|
431
|
+
name: "Facebook",
|
|
432
|
+
svg: /* @__PURE__ */ jsx("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsx(
|
|
430
433
|
"path",
|
|
431
434
|
{
|
|
432
|
-
d: "
|
|
433
|
-
fill: "#
|
|
435
|
+
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",
|
|
436
|
+
fill: "#1877F2"
|
|
434
437
|
}
|
|
435
438
|
) }),
|
|
436
|
-
className: "
|
|
439
|
+
className: "insforge-oauth-facebook"
|
|
437
440
|
},
|
|
438
|
-
|
|
439
|
-
name: "
|
|
440
|
-
svg: /* @__PURE__ */ jsx("svg", { width: "18", height: "18", viewBox: "0 0
|
|
441
|
+
linkedin: {
|
|
442
|
+
name: "LinkedIn",
|
|
443
|
+
svg: /* @__PURE__ */ jsx("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsx(
|
|
441
444
|
"path",
|
|
442
445
|
{
|
|
443
|
-
d: "
|
|
444
|
-
fill: "
|
|
446
|
+
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",
|
|
447
|
+
fill: "#0A66C2"
|
|
445
448
|
}
|
|
446
449
|
) }),
|
|
447
|
-
className: "
|
|
450
|
+
className: "insforge-oauth-linkedin"
|
|
448
451
|
},
|
|
449
452
|
microsoft: {
|
|
450
453
|
name: "Microsoft",
|
|
451
|
-
svg: /* @__PURE__ */ jsxs("svg", { width: "18", height: "18", viewBox: "0 0 23 23", fill: "none",
|
|
454
|
+
svg: /* @__PURE__ */ jsxs("svg", { width: "18", height: "18", viewBox: "0 0 23 23", fill: "none", children: [
|
|
452
455
|
/* @__PURE__ */ jsx("path", { d: "M0 0h11v11H0z", fill: "#F25022" }),
|
|
453
456
|
/* @__PURE__ */ jsx("path", { d: "M12 0h11v11H12z", fill: "#7FBA00" }),
|
|
454
457
|
/* @__PURE__ */ jsx("path", { d: "M0 12h11v11H0z", fill: "#00A4EF" }),
|
|
455
458
|
/* @__PURE__ */ jsx("path", { d: "M12 12h11v11H12z", fill: "#FFB900" })
|
|
456
459
|
] }),
|
|
457
|
-
className: "
|
|
460
|
+
className: "insforge-oauth-microsoft"
|
|
458
461
|
},
|
|
459
|
-
|
|
460
|
-
name: "
|
|
461
|
-
svg: /* @__PURE__ */ jsx("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "
|
|
462
|
+
apple: {
|
|
463
|
+
name: "Apple",
|
|
464
|
+
svg: /* @__PURE__ */ jsx("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ 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" }) }),
|
|
465
|
+
className: "insforge-oauth-apple"
|
|
466
|
+
},
|
|
467
|
+
x: {
|
|
468
|
+
name: "X",
|
|
469
|
+
svg: /* @__PURE__ */ jsx("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ 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" }) }),
|
|
470
|
+
className: "insforge-oauth-x"
|
|
471
|
+
},
|
|
472
|
+
instagram: {
|
|
473
|
+
name: "Instagram",
|
|
474
|
+
svg: /* @__PURE__ */ jsxs("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", children: [
|
|
475
|
+
/* @__PURE__ */ jsx(
|
|
476
|
+
"path",
|
|
477
|
+
{
|
|
478
|
+
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",
|
|
479
|
+
fill: "url(#instagram-gradient)"
|
|
480
|
+
}
|
|
481
|
+
),
|
|
482
|
+
/* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsxs("linearGradient", { id: "instagram-gradient", x1: "0%", y1: "100%", x2: "100%", y2: "0%", children: [
|
|
483
|
+
/* @__PURE__ */ jsx("stop", { offset: "0%", stopColor: "#FD5949" }),
|
|
484
|
+
/* @__PURE__ */ jsx("stop", { offset: "50%", stopColor: "#D6249F" }),
|
|
485
|
+
/* @__PURE__ */ jsx("stop", { offset: "100%", stopColor: "#285AEB" })
|
|
486
|
+
] }) })
|
|
487
|
+
] }),
|
|
488
|
+
className: "insforge-oauth-instagram"
|
|
489
|
+
},
|
|
490
|
+
tiktok: {
|
|
491
|
+
name: "TikTok",
|
|
492
|
+
svg: /* @__PURE__ */ jsx("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsx(
|
|
462
493
|
"path",
|
|
463
494
|
{
|
|
464
|
-
d: "
|
|
465
|
-
fill: "
|
|
495
|
+
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",
|
|
496
|
+
fill: "currentColor"
|
|
497
|
+
}
|
|
498
|
+
) }),
|
|
499
|
+
className: "insforge-oauth-tiktok"
|
|
500
|
+
},
|
|
501
|
+
spotify: {
|
|
502
|
+
name: "Spotify",
|
|
503
|
+
svg: /* @__PURE__ */ jsx("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsx(
|
|
504
|
+
"path",
|
|
505
|
+
{
|
|
506
|
+
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",
|
|
507
|
+
fill: "#1DB954"
|
|
466
508
|
}
|
|
467
509
|
) }),
|
|
468
|
-
className: "
|
|
510
|
+
className: "insforge-oauth-spotify"
|
|
469
511
|
}
|
|
470
512
|
};
|
|
471
513
|
function getProviderConfig(provider) {
|
|
472
|
-
return
|
|
514
|
+
return OAUTH_PROVIDER_CONFIG[provider] || null;
|
|
473
515
|
}
|
|
474
516
|
function AuthOAuthButton({
|
|
475
517
|
provider,
|