@insforge/react 0.3.5 → 0.4.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.
Files changed (63) hide show
  1. package/README.md +485 -604
  2. package/dist/atoms.cjs +818 -0
  3. package/dist/atoms.cjs.map +1 -0
  4. package/dist/atoms.d.cts +222 -0
  5. package/dist/atoms.d.ts +72 -237
  6. package/dist/atoms.js +382 -456
  7. package/dist/atoms.js.map +1 -1
  8. package/dist/components.cjs +2254 -0
  9. package/dist/components.cjs.map +1 -0
  10. package/dist/{components.d.mts → components.d.cts} +10 -32
  11. package/dist/components.d.ts +9 -31
  12. package/dist/components.js +1046 -1180
  13. package/dist/components.js.map +1 -1
  14. package/dist/forms.cjs +1287 -0
  15. package/dist/forms.cjs.map +1 -0
  16. package/dist/forms.d.cts +138 -0
  17. package/dist/forms.d.ts +115 -162
  18. package/dist/forms.js +728 -921
  19. package/dist/forms.js.map +1 -1
  20. package/dist/{hooks.mjs → hooks.cjs} +15 -13
  21. package/dist/hooks.cjs.map +1 -0
  22. package/dist/{hooks.d.mts → hooks.d.cts} +1 -1
  23. package/dist/hooks.js +9 -15
  24. package/dist/hooks.js.map +1 -1
  25. package/dist/index.cjs +2674 -0
  26. package/dist/index.cjs.map +1 -0
  27. package/dist/{index.d.mts → index.d.cts} +10 -10
  28. package/dist/index.d.ts +4 -4
  29. package/dist/index.js +1093 -1235
  30. package/dist/index.js.map +1 -1
  31. package/dist/{lib.mjs → lib.cjs} +13 -11
  32. package/dist/lib.cjs.map +1 -0
  33. package/dist/{lib.d.mts → lib.d.cts} +1 -8
  34. package/dist/lib.d.ts +1 -8
  35. package/dist/lib.js +4 -17
  36. package/dist/lib.js.map +1 -1
  37. package/dist/{router.mjs → router.cjs} +14 -16
  38. package/dist/router.cjs.map +1 -0
  39. package/dist/router.js +10 -16
  40. package/dist/router.js.map +1 -1
  41. package/dist/styles.css +655 -2
  42. package/dist/types.cjs +4 -0
  43. package/dist/{types.mjs.map → types.cjs.map} +1 -1
  44. package/dist/{types.d.mts → types.d.cts} +2 -2
  45. package/dist/types.d.ts +2 -2
  46. package/dist/types.js +0 -1
  47. package/package.json +106 -98
  48. package/dist/atoms.d.mts +0 -387
  49. package/dist/atoms.mjs +0 -861
  50. package/dist/atoms.mjs.map +0 -1
  51. package/dist/components.mjs +0 -2327
  52. package/dist/components.mjs.map +0 -1
  53. package/dist/forms.d.mts +0 -185
  54. package/dist/forms.mjs +0 -1468
  55. package/dist/forms.mjs.map +0 -1
  56. package/dist/hooks.mjs.map +0 -1
  57. package/dist/index.mjs +0 -2724
  58. package/dist/index.mjs.map +0 -1
  59. package/dist/lib.mjs.map +0 -1
  60. package/dist/router.mjs.map +0 -1
  61. package/dist/types.mjs +0 -3
  62. package/src/styles.css +0 -15
  63. /package/dist/{router.d.mts → router.d.cts} +0 -0
package/dist/atoms.js CHANGED
@@ -1,243 +1,182 @@
1
- 'use strict';
2
-
3
- var jsxRuntime = require('react/jsx-runtime');
4
- var clsx = require('clsx');
5
- var tailwindMerge = require('tailwind-merge');
6
- var lucideReact = require('lucide-react');
7
- var react = require('react');
8
- var sdk = require('@insforge/sdk');
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
2
+ import { AlertTriangle, Check, EyeOff, Eye, Loader2, CircleCheck } from 'lucide-react';
3
+ import { createContext, useState, useRef, useEffect, useContext } from 'react';
4
+ import { createClient } from '@insforge/sdk';
9
5
 
10
6
  function AuthBranding() {
11
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-[#FAFAFA] px-2 py-4 flex flex-row justify-center items-center gap-1", children: [
12
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-medium text-black font-manrope", children: "Secured by" }),
13
- /* @__PURE__ */ jsxRuntime.jsx("a", { href: "https://insforge.dev", target: "_blank", rel: "noopener noreferrer", children: /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "83", height: "20", viewBox: "0 0 83 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
14
- /* @__PURE__ */ jsxRuntime.jsx(
15
- "path",
16
- {
17
- d: "M2.16783 8.46797C1.9334 8.23325 1.9334 7.85269 2.16783 7.61797L8.11049 1.66797L16.6 1.66797L6.41259 11.868C6.17815 12.1027 5.79807 12.1027 5.56363 11.868L2.16783 8.46797Z",
18
- fill: "url(#paint0_linear_2976_9475)"
19
- }
20
- ),
21
- /* @__PURE__ */ jsxRuntime.jsx(
22
- "path",
23
- {
24
- d: "M12.8858 6.44922L16.6 10.168V18.668L8.64108 10.6992L12.8858 6.44922Z",
25
- fill: "url(#paint1_linear_2976_9475)"
26
- }
27
- ),
28
- /* @__PURE__ */ jsxRuntime.jsx(
29
- "path",
30
- {
31
- d: "M67.5439 6.48828C68.2894 6.48828 68.9145 6.67064 69.418 7.03516C69.5229 7.10943 69.6214 7.1907 69.7158 7.27637V6.70703H71.248V14.959C71.248 15.1583 71.2381 15.3485 71.2188 15.5283C71.2042 15.7129 71.1774 15.8925 71.1387 16.0674C71.0225 16.5776 70.7998 16.9957 70.4707 17.3213C70.1415 17.6518 69.7321 17.8972 69.2432 18.0576C68.7592 18.2179 68.2222 18.2988 67.6318 18.2988C67.1962 18.2988 66.7768 18.2308 66.375 18.0947C65.9782 17.9587 65.6202 17.7614 65.3008 17.5039C64.9813 17.2512 64.7199 16.9446 64.5166 16.585L66.1289 15.7832C66.2789 16.0698 66.4888 16.2819 66.7598 16.418C67.0356 16.5589 67.3289 16.6289 67.6387 16.6289C68.0016 16.6289 68.3258 16.5628 68.6113 16.4316C68.8969 16.3053 69.1176 16.116 69.2725 15.8633C69.4321 15.6155 69.5077 15.3047 69.498 14.9307V14.1797C69.4665 14.2037 69.4359 14.229 69.4033 14.252C68.8855 14.6164 68.2441 14.7988 67.4795 14.7988C66.7582 14.7988 66.1281 14.6165 65.5908 14.252C65.0537 13.8875 64.637 13.3915 64.3418 12.7646C64.0467 12.1378 63.8994 11.4307 63.8994 10.6436C63.8994 9.84651 64.0465 9.13673 64.3418 8.51465C64.6419 7.88768 65.0663 7.39481 65.6133 7.03516C66.1601 6.67077 66.8036 6.48836 67.5439 6.48828ZM37.5 6.48828C38.1099 6.48828 38.6496 6.58294 39.1191 6.77246C39.5935 6.96201 39.9762 7.2321 40.2666 7.58203C40.5569 7.93184 40.7359 8.34227 40.8037 8.81348L39.0176 9.13477C38.974 8.79951 38.8218 8.53424 38.5605 8.33984C38.304 8.14547 37.96 8.03605 37.5293 8.01172C37.1178 7.98742 36.7859 8.05051 36.5342 8.20117C36.2825 8.34698 36.1562 8.55398 36.1562 8.82129C36.1563 8.97184 36.208 9.10017 36.3096 9.20703C36.4112 9.31394 36.614 9.42141 36.9189 9.52832C37.2288 9.63524 37.6889 9.76635 38.2988 9.92188C38.9232 10.0823 39.4222 10.2666 39.7949 10.4756C40.1722 10.6796 40.4428 10.9254 40.6074 11.2119C40.7768 11.4987 40.8623 11.8466 40.8623 12.2549C40.8623 13.047 40.574 13.6691 39.998 14.1211C39.4268 14.5731 38.6348 14.7988 37.623 14.7988C36.6551 14.7988 35.8687 14.5799 35.2637 14.1426C34.6587 13.7052 34.2909 13.0908 34.1602 12.2988L35.9463 12.0215C36.0383 12.4102 36.2411 12.7169 36.5557 12.9404C36.8703 13.164 37.2678 13.2754 37.7471 13.2754C38.1681 13.2754 38.4922 13.1926 38.7197 13.0273C38.9521 12.8572 39.0684 12.6266 39.0684 12.335C39.0684 12.1552 39.0245 12.0122 38.9375 11.9053C38.8552 11.7935 38.6713 11.686 38.3857 11.584C38.1001 11.4819 37.6618 11.3528 37.0713 11.1973C36.4131 11.0223 35.8901 10.8359 35.5029 10.6367C35.1158 10.4327 34.8374 10.192 34.668 9.91504C34.4985 9.63801 34.4141 9.30188 34.4141 8.9082C34.4141 8.41746 34.5423 7.98943 34.7988 7.625C35.0553 7.26073 35.4135 6.98146 35.873 6.78711C36.3329 6.58784 36.8755 6.48828 37.5 6.48828ZM53.3047 6.48828C54.0937 6.48828 54.7815 6.66572 55.3672 7.02051C55.9527 7.37528 56.4072 7.86634 56.7314 8.49316C57.0558 9.11525 57.2187 9.83193 57.2188 10.6436C57.2188 11.46 57.0537 12.1817 56.7246 12.8086C56.4003 13.4307 55.9451 13.9196 55.3594 14.2744C54.7737 14.6242 54.0888 14.7988 53.3047 14.7988C52.5205 14.7988 51.8357 14.6214 51.25 14.2666C50.6643 13.9118 50.2091 13.4238 49.8848 12.8018C49.5653 12.1748 49.4053 11.4552 49.4053 10.6436C49.4053 9.81735 49.5703 9.09279 49.8994 8.4707C50.2286 7.8488 50.6859 7.36255 51.2715 7.0127C51.8572 6.66281 52.5351 6.48828 53.3047 6.48828ZM76.7471 6.48828C77.5603 6.48828 78.25 6.68053 78.8164 7.06445C79.3876 7.44351 79.812 7.97991 80.0879 8.6748C80.3638 9.36976 80.4672 10.189 80.3994 11.1318H74.7256C74.7843 11.6972 74.949 12.1516 75.2227 12.4951C75.5711 12.9325 76.0792 13.1513 76.7471 13.1514C77.1779 13.1514 77.5486 13.0567 77.8584 12.8672C78.173 12.6728 78.4146 12.3928 78.584 12.0283L80.3125 12.5537C80.0124 13.2633 79.5473 13.8153 78.918 14.209C78.2936 14.6025 77.6036 14.7988 76.8486 14.7988C76.0549 14.7988 75.358 14.6263 74.7578 14.2812C74.1576 13.9362 73.6875 13.458 73.3486 12.8457C73.0147 12.2334 72.8477 11.5284 72.8477 10.7314C72.8477 9.87126 73.0127 9.12495 73.3418 8.49316C73.671 7.85651 74.1282 7.36263 74.7139 7.0127C75.2995 6.6628 75.9775 6.48832 76.7471 6.48828ZM23.3301 14.5801H21.5801V4.08203H23.3301V14.5801ZM29.6152 6.48047C30.1959 6.48052 30.6753 6.5781 31.0527 6.77246C31.4301 6.96681 31.7305 7.21443 31.9531 7.51562C32.1758 7.81695 32.3398 8.13831 32.4463 8.47852C32.5528 8.81873 32.6213 9.14205 32.6504 9.44824C32.6843 9.74946 32.7012 9.99508 32.7012 10.1846V14.5801H30.9287V10.7891C30.9287 10.5413 30.9118 10.2669 30.8779 9.96582C30.844 9.66449 30.7645 9.37469 30.6387 9.09766C30.5177 8.81592 30.3337 8.58503 30.0869 8.40527C29.8449 8.22551 29.5157 8.13579 29.0996 8.13574C28.8769 8.13574 28.6563 8.17221 28.4385 8.24512C28.2206 8.31802 28.0219 8.4442 27.8428 8.62402C27.6685 8.79899 27.5284 9.04249 27.4219 9.35352C27.3154 9.65965 27.2617 10.0532 27.2617 10.5342V14.5801H25.4902V6.70703H27.0518V7.58301C27.2521 7.34675 27.486 7.14172 27.7559 6.96973C28.2593 6.64409 28.8794 6.48047 29.6152 6.48047ZM48.748 5.83887H44.2021V8.45605H47.876V10.2061H44.2021V14.5801H42.4521V4.08203H48.748V5.83887ZM62.5137 6.67773C62.7606 6.65829 63.001 6.66815 63.2334 6.70703V8.34766C63.001 8.27961 62.7317 8.25695 62.4268 8.28125C62.1267 8.30557 61.8553 8.39134 61.6133 8.53711C61.3715 8.66829 61.1733 8.83606 61.0186 9.04004C60.8686 9.24404 60.7572 9.47701 60.6846 9.73926C60.612 9.99685 60.5752 10.2768 60.5752 10.5781V14.5801H58.8184V6.70703H60.3652V7.96582C60.4243 7.85986 60.4888 7.75824 60.5605 7.66211C60.7251 7.4434 60.9219 7.26302 61.1494 7.12207C61.3429 6.99098 61.5559 6.88926 61.7881 6.81641C62.0251 6.73869 62.267 6.69235 62.5137 6.67773ZM67.8057 8.0625C67.3362 8.06252 66.9485 8.17982 66.6436 8.41309C66.3389 8.64144 66.1139 8.95232 65.9688 9.3457C65.8235 9.7345 65.751 10.1673 65.751 10.6436C65.751 11.1247 65.8215 11.5624 65.9619 11.9561C66.1071 12.3447 66.3269 12.6535 66.6221 12.8818C66.9174 13.1103 67.293 13.2246 67.748 13.2246C68.2174 13.2246 68.5953 13.1171 68.8809 12.9033C69.1711 12.6846 69.3811 12.3808 69.5117 11.9922C69.6473 11.6034 69.7158 11.1539 69.7158 10.6436C69.7158 10.1284 69.6473 9.67886 69.5117 9.29492C69.381 8.90617 69.1753 8.60445 68.8945 8.39062C68.6138 8.17213 68.2508 8.0625 67.8057 8.0625ZM53.3047 8.13574C52.8351 8.13574 52.4475 8.24222 52.1426 8.45605C51.8425 8.66504 51.6198 8.95977 51.4746 9.33887C51.3295 9.71303 51.2568 10.148 51.2568 10.6436C51.2568 11.4066 51.4288 12.0168 51.7725 12.4736C52.121 12.9256 52.6318 13.1514 53.3047 13.1514C54.0017 13.1514 54.5196 12.9177 54.8584 12.4512C55.1971 11.9846 55.3672 11.3822 55.3672 10.6436C55.3672 9.8807 55.1951 9.27324 54.8516 8.82129C54.5079 8.36444 53.9921 8.13575 53.3047 8.13574ZM76.8203 8.02637C76.1039 8.02637 75.5712 8.25013 75.2227 8.69727C74.9987 8.98144 74.8476 9.35094 74.7676 9.80566H78.6221C78.5589 9.29301 78.4236 8.89686 78.2139 8.61719C77.9186 8.22359 77.4543 8.02645 76.8203 8.02637Z",
32
- fill: "black"
33
- }
34
- ),
35
- /* @__PURE__ */ jsxRuntime.jsxs("defs", { children: [
36
- /* @__PURE__ */ jsxRuntime.jsxs(
37
- "linearGradient",
38
- {
39
- id: "paint0_linear_2976_9475",
40
- x1: "1.85883",
41
- y1: "1.92425",
42
- x2: "24.3072",
43
- y2: "9.64016",
44
- gradientUnits: "userSpaceOnUse",
45
- children: [
46
- /* @__PURE__ */ jsxRuntime.jsx("stop", {}),
47
- /* @__PURE__ */ jsxRuntime.jsx("stop", { offset: "1", stopOpacity: "0.4" })
48
- ]
49
- }
50
- ),
51
- /* @__PURE__ */ jsxRuntime.jsxs(
52
- "linearGradient",
53
- {
54
- id: "paint1_linear_2976_9475",
55
- x1: "25.6475",
56
- y1: "8.65468",
57
- x2: "10.7901",
58
- y2: "8.65468",
59
- gradientUnits: "userSpaceOnUse",
60
- children: [
61
- /* @__PURE__ */ jsxRuntime.jsx("stop", {}),
62
- /* @__PURE__ */ jsxRuntime.jsx("stop", { offset: "1", stopOpacity: "0.4" })
63
- ]
64
- }
65
- )
66
- ] })
67
- ] }) })
7
+ return /* @__PURE__ */ jsxs("div", { className: "if-authBranding if-internal-ab4k9w", children: [
8
+ /* @__PURE__ */ jsx("p", { className: "if-authBranding-text", children: "Secured by" }),
9
+ /* @__PURE__ */ jsx("a", { href: "https://insforge.dev", target: "_blank", rel: "noopener noreferrer", children: /* @__PURE__ */ jsxs(
10
+ "svg",
11
+ {
12
+ width: "83",
13
+ height: "20",
14
+ viewBox: "0 0 83 20",
15
+ fill: "none",
16
+ xmlns: "http://www.w3.org/2000/svg",
17
+ children: [
18
+ /* @__PURE__ */ jsx(
19
+ "path",
20
+ {
21
+ d: "M2.16783 8.46797C1.9334 8.23325 1.9334 7.85269 2.16783 7.61797L8.11049 1.66797L16.6 1.66797L6.41259 11.868C6.17815 12.1027 5.79807 12.1027 5.56363 11.868L2.16783 8.46797Z",
22
+ fill: "url(#paint0_linear_2976_9475)"
23
+ }
24
+ ),
25
+ /* @__PURE__ */ jsx(
26
+ "path",
27
+ {
28
+ d: "M12.8858 6.44922L16.6 10.168V18.668L8.64108 10.6992L12.8858 6.44922Z",
29
+ fill: "url(#paint1_linear_2976_9475)"
30
+ }
31
+ ),
32
+ /* @__PURE__ */ jsx(
33
+ "path",
34
+ {
35
+ d: "M67.5439 6.48828C68.2894 6.48828 68.9145 6.67064 69.418 7.03516C69.5229 7.10943 69.6214 7.1907 69.7158 7.27637V6.70703H71.248V14.959C71.248 15.1583 71.2381 15.3485 71.2188 15.5283C71.2042 15.7129 71.1774 15.8925 71.1387 16.0674C71.0225 16.5776 70.7998 16.9957 70.4707 17.3213C70.1415 17.6518 69.7321 17.8972 69.2432 18.0576C68.7592 18.2179 68.2222 18.2988 67.6318 18.2988C67.1962 18.2988 66.7768 18.2308 66.375 18.0947C65.9782 17.9587 65.6202 17.7614 65.3008 17.5039C64.9813 17.2512 64.7199 16.9446 64.5166 16.585L66.1289 15.7832C66.2789 16.0698 66.4888 16.2819 66.7598 16.418C67.0356 16.5589 67.3289 16.6289 67.6387 16.6289C68.0016 16.6289 68.3258 16.5628 68.6113 16.4316C68.8969 16.3053 69.1176 16.116 69.2725 15.8633C69.4321 15.6155 69.5077 15.3047 69.498 14.9307V14.1797C69.4665 14.2037 69.4359 14.229 69.4033 14.252C68.8855 14.6164 68.2441 14.7988 67.4795 14.7988C66.7582 14.7988 66.1281 14.6165 65.5908 14.252C65.0537 13.8875 64.637 13.3915 64.3418 12.7646C64.0467 12.1378 63.8994 11.4307 63.8994 10.6436C63.8994 9.84651 64.0465 9.13673 64.3418 8.51465C64.6419 7.88768 65.0663 7.39481 65.6133 7.03516C66.1601 6.67077 66.8036 6.48836 67.5439 6.48828ZM37.5 6.48828C38.1099 6.48828 38.6496 6.58294 39.1191 6.77246C39.5935 6.96201 39.9762 7.2321 40.2666 7.58203C40.5569 7.93184 40.7359 8.34227 40.8037 8.81348L39.0176 9.13477C38.974 8.79951 38.8218 8.53424 38.5605 8.33984C38.304 8.14547 37.96 8.03605 37.5293 8.01172C37.1178 7.98742 36.7859 8.05051 36.5342 8.20117C36.2825 8.34698 36.1562 8.55398 36.1562 8.82129C36.1563 8.97184 36.208 9.10017 36.3096 9.20703C36.4112 9.31394 36.614 9.42141 36.9189 9.52832C37.2288 9.63524 37.6889 9.76635 38.2988 9.92188C38.9232 10.0823 39.4222 10.2666 39.7949 10.4756C40.1722 10.6796 40.4428 10.9254 40.6074 11.2119C40.7768 11.4987 40.8623 11.8466 40.8623 12.2549C40.8623 13.047 40.574 13.6691 39.998 14.1211C39.4268 14.5731 38.6348 14.7988 37.623 14.7988C36.6551 14.7988 35.8687 14.5799 35.2637 14.1426C34.6587 13.7052 34.2909 13.0908 34.1602 12.2988L35.9463 12.0215C36.0383 12.4102 36.2411 12.7169 36.5557 12.9404C36.8703 13.164 37.2678 13.2754 37.7471 13.2754C38.1681 13.2754 38.4922 13.1926 38.7197 13.0273C38.9521 12.8572 39.0684 12.6266 39.0684 12.335C39.0684 12.1552 39.0245 12.0122 38.9375 11.9053C38.8552 11.7935 38.6713 11.686 38.3857 11.584C38.1001 11.4819 37.6618 11.3528 37.0713 11.1973C36.4131 11.0223 35.8901 10.8359 35.5029 10.6367C35.1158 10.4327 34.8374 10.192 34.668 9.91504C34.4985 9.63801 34.4141 9.30188 34.4141 8.9082C34.4141 8.41746 34.5423 7.98943 34.7988 7.625C35.0553 7.26073 35.4135 6.98146 35.873 6.78711C36.3329 6.58784 36.8755 6.48828 37.5 6.48828ZM53.3047 6.48828C54.0937 6.48828 54.7815 6.66572 55.3672 7.02051C55.9527 7.37528 56.4072 7.86634 56.7314 8.49316C57.0558 9.11525 57.2187 9.83193 57.2188 10.6436C57.2188 11.46 57.0537 12.1817 56.7246 12.8086C56.4003 13.4307 55.9451 13.9196 55.3594 14.2744C54.7737 14.6242 54.0888 14.7988 53.3047 14.7988C52.5205 14.7988 51.8357 14.6214 51.25 14.2666C50.6643 13.9118 50.2091 13.4238 49.8848 12.8018C49.5653 12.1748 49.4053 11.4552 49.4053 10.6436C49.4053 9.81735 49.5703 9.09279 49.8994 8.4707C50.2286 7.8488 50.6859 7.36255 51.2715 7.0127C51.8572 6.66281 52.5351 6.48828 53.3047 6.48828ZM76.7471 6.48828C77.5603 6.48828 78.25 6.68053 78.8164 7.06445C79.3876 7.44351 79.812 7.97991 80.0879 8.6748C80.3638 9.36976 80.4672 10.189 80.3994 11.1318H74.7256C74.7843 11.6972 74.949 12.1516 75.2227 12.4951C75.5711 12.9325 76.0792 13.1513 76.7471 13.1514C77.1779 13.1514 77.5486 13.0567 77.8584 12.8672C78.173 12.6728 78.4146 12.3928 78.584 12.0283L80.3125 12.5537C80.0124 13.2633 79.5473 13.8153 78.918 14.209C78.2936 14.6025 77.6036 14.7988 76.8486 14.7988C76.0549 14.7988 75.358 14.6263 74.7578 14.2812C74.1576 13.9362 73.6875 13.458 73.3486 12.8457C73.0147 12.2334 72.8477 11.5284 72.8477 10.7314C72.8477 9.87126 73.0127 9.12495 73.3418 8.49316C73.671 7.85651 74.1282 7.36263 74.7139 7.0127C75.2995 6.6628 75.9775 6.48832 76.7471 6.48828ZM23.3301 14.5801H21.5801V4.08203H23.3301V14.5801ZM29.6152 6.48047C30.1959 6.48052 30.6753 6.5781 31.0527 6.77246C31.4301 6.96681 31.7305 7.21443 31.9531 7.51562C32.1758 7.81695 32.3398 8.13831 32.4463 8.47852C32.5528 8.81873 32.6213 9.14205 32.6504 9.44824C32.6843 9.74946 32.7012 9.99508 32.7012 10.1846V14.5801H30.9287V10.7891C30.9287 10.5413 30.9118 10.2669 30.8779 9.96582C30.844 9.66449 30.7645 9.37469 30.6387 9.09766C30.5177 8.81592 30.3337 8.58503 30.0869 8.40527C29.8449 8.22551 29.5157 8.13579 29.0996 8.13574C28.8769 8.13574 28.6563 8.17221 28.4385 8.24512C28.2206 8.31802 28.0219 8.4442 27.8428 8.62402C27.6685 8.79899 27.5284 9.04249 27.4219 9.35352C27.3154 9.65965 27.2617 10.0532 27.2617 10.5342V14.5801H25.4902V6.70703H27.0518V7.58301C27.2521 7.34675 27.486 7.14172 27.7559 6.96973C28.2593 6.64409 28.8794 6.48047 29.6152 6.48047ZM48.748 5.83887H44.2021V8.45605H47.876V10.2061H44.2021V14.5801H42.4521V4.08203H48.748V5.83887ZM62.5137 6.67773C62.7606 6.65829 63.001 6.66815 63.2334 6.70703V8.34766C63.001 8.27961 62.7317 8.25695 62.4268 8.28125C62.1267 8.30557 61.8553 8.39134 61.6133 8.53711C61.3715 8.66829 61.1733 8.83606 61.0186 9.04004C60.8686 9.24404 60.7572 9.47701 60.6846 9.73926C60.612 9.99685 60.5752 10.2768 60.5752 10.5781V14.5801H58.8184V6.70703H60.3652V7.96582C60.4243 7.85986 60.4888 7.75824 60.5605 7.66211C60.7251 7.4434 60.9219 7.26302 61.1494 7.12207C61.3429 6.99098 61.5559 6.88926 61.7881 6.81641C62.0251 6.73869 62.267 6.69235 62.5137 6.67773ZM67.8057 8.0625C67.3362 8.06252 66.9485 8.17982 66.6436 8.41309C66.3389 8.64144 66.1139 8.95232 65.9688 9.3457C65.8235 9.7345 65.751 10.1673 65.751 10.6436C65.751 11.1247 65.8215 11.5624 65.9619 11.9561C66.1071 12.3447 66.3269 12.6535 66.6221 12.8818C66.9174 13.1103 67.293 13.2246 67.748 13.2246C68.2174 13.2246 68.5953 13.1171 68.8809 12.9033C69.1711 12.6846 69.3811 12.3808 69.5117 11.9922C69.6473 11.6034 69.7158 11.1539 69.7158 10.6436C69.7158 10.1284 69.6473 9.67886 69.5117 9.29492C69.381 8.90617 69.1753 8.60445 68.8945 8.39062C68.6138 8.17213 68.2508 8.0625 67.8057 8.0625ZM53.3047 8.13574C52.8351 8.13574 52.4475 8.24222 52.1426 8.45605C51.8425 8.66504 51.6198 8.95977 51.4746 9.33887C51.3295 9.71303 51.2568 10.148 51.2568 10.6436C51.2568 11.4066 51.4288 12.0168 51.7725 12.4736C52.121 12.9256 52.6318 13.1514 53.3047 13.1514C54.0017 13.1514 54.5196 12.9177 54.8584 12.4512C55.1971 11.9846 55.3672 11.3822 55.3672 10.6436C55.3672 9.8807 55.1951 9.27324 54.8516 8.82129C54.5079 8.36444 53.9921 8.13575 53.3047 8.13574ZM76.8203 8.02637C76.1039 8.02637 75.5712 8.25013 75.2227 8.69727C74.9987 8.98144 74.8476 9.35094 74.7676 9.80566H78.6221C78.5589 9.29301 78.4236 8.89686 78.2139 8.61719C77.9186 8.22359 77.4543 8.02645 76.8203 8.02637Z",
36
+ fill: "black"
37
+ }
38
+ ),
39
+ /* @__PURE__ */ jsxs("defs", { children: [
40
+ /* @__PURE__ */ jsxs(
41
+ "linearGradient",
42
+ {
43
+ id: "paint0_linear_2976_9475",
44
+ x1: "1.85883",
45
+ y1: "1.92425",
46
+ x2: "24.3072",
47
+ y2: "9.64016",
48
+ gradientUnits: "userSpaceOnUse",
49
+ children: [
50
+ /* @__PURE__ */ jsx("stop", {}),
51
+ /* @__PURE__ */ jsx("stop", { offset: "1", stopOpacity: "0.4" })
52
+ ]
53
+ }
54
+ ),
55
+ /* @__PURE__ */ jsxs(
56
+ "linearGradient",
57
+ {
58
+ id: "paint1_linear_2976_9475",
59
+ x1: "25.6475",
60
+ y1: "8.65468",
61
+ x2: "10.7901",
62
+ y2: "8.65468",
63
+ gradientUnits: "userSpaceOnUse",
64
+ children: [
65
+ /* @__PURE__ */ jsx("stop", {}),
66
+ /* @__PURE__ */ jsx("stop", { offset: "1", stopOpacity: "0.4" })
67
+ ]
68
+ }
69
+ )
70
+ ] })
71
+ ]
72
+ }
73
+ ) })
68
74
  ] });
69
75
  }
70
- function cn(...inputs) {
71
- return tailwindMerge.twMerge(clsx.clsx(inputs));
72
- }
73
- function AuthContainer({ children, appearance = {} }) {
74
- return /* @__PURE__ */ jsxRuntime.jsxs(
75
- "div",
76
- {
77
- className: cn(
78
- "w-full max-w-[400px] rounded-xl overflow-hidden shadow-lg",
79
- appearance.containerClassName
80
- ),
81
- children: [
82
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(
83
- "bg-white p-6 flex flex-col justify-center items-stretch gap-6",
84
- appearance.cardClassName
85
- ), children }),
86
- /* @__PURE__ */ jsxRuntime.jsx(AuthBranding, {})
87
- ]
88
- }
89
- );
76
+ function AuthContainer({ children }) {
77
+ return /* @__PURE__ */ jsxs("div", { className: "if-authContainer if-internal-a8f3d2", children: [
78
+ /* @__PURE__ */ jsx("div", { className: "if-authCard if-internal-b2k9x1", children }),
79
+ /* @__PURE__ */ jsx(AuthBranding, {})
80
+ ] });
90
81
  }
91
- function AuthHeader({
92
- title,
93
- subtitle,
94
- appearance = {}
95
- }) {
96
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn(
97
- "flex flex-col justify-start items-start gap-2",
98
- appearance.containerClassName
99
- ), children: [
100
- /* @__PURE__ */ jsxRuntime.jsx("h1", { className: cn(
101
- "text-2xl font-semibold text-black leading-8",
102
- appearance.titleClassName
103
- ), children: title }),
104
- subtitle && /* @__PURE__ */ jsxRuntime.jsx("p", { className: cn(
105
- "text-sm font-normal text-[#828282] leading-6",
106
- appearance.subtitleClassName
107
- ), children: subtitle })
82
+ function AuthHeader({ title, subtitle }) {
83
+ return /* @__PURE__ */ jsxs("div", { className: "if-authHeader if-internal-h3m7w5", children: [
84
+ /* @__PURE__ */ jsx("h1", { className: "if-authHeader-title if-internal-t4p1k9", children: title }),
85
+ subtitle && /* @__PURE__ */ jsx("p", { className: "if-authHeader-subtitle if-internal-s7q2m3", children: subtitle })
108
86
  ] });
109
87
  }
110
- function AuthErrorBanner({ error, className }) {
111
- if (!error) return null;
112
- return /* @__PURE__ */ jsxRuntime.jsxs(
113
- "div",
114
- {
115
- className: cn(
116
- "flex items-center gap-2 mb-4 pl-3 py-2 pr-2 bg-red-50 border-2 border-red-600 rounded",
117
- className
118
- ),
119
- children: [
120
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.AlertTriangle, { className: "w-6 h-6 text-red-500 shrink-0" }),
121
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-red-600 flex-1", children: error })
122
- ]
123
- }
124
- );
88
+ function AuthErrorBanner({ error }) {
89
+ if (!error) {
90
+ return null;
91
+ }
92
+ return /* @__PURE__ */ jsx("div", { className: "if-errorBanner if-internal-eb2m7k", children: /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "0.5rem" }, children: [
93
+ /* @__PURE__ */ jsx(
94
+ AlertTriangle,
95
+ {
96
+ style: { width: "1.5rem", height: "1.5rem", flexShrink: 0, color: "#dc2626" }
97
+ }
98
+ ),
99
+ /* @__PURE__ */ jsx("span", { className: "if-errorBanner-text", children: error })
100
+ ] }) });
125
101
  }
126
102
  function AuthFormField({
127
103
  label,
128
104
  id,
129
- appearance = {},
130
105
  ...props
131
106
  }) {
132
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn(
133
- "flex flex-col justify-center items-stretch gap-1",
134
- appearance.containerClassName
135
- ), children: [
136
- /* @__PURE__ */ jsxRuntime.jsx(
137
- "label",
138
- {
139
- htmlFor: id,
140
- className: cn(
141
- "text-sm font-normal text-black leading-6",
142
- appearance.labelClassName
143
- ),
144
- children: label
145
- }
146
- ),
147
- /* @__PURE__ */ jsxRuntime.jsx(
148
- "input",
149
- {
150
- id,
151
- className: cn(
152
- "w-full flex items-center gap-2 self-stretch",
153
- "pl-3 pr-2 py-2 rounded-sm border border-[#D4D4D4] bg-white",
154
- "text-sm font-normal leading-5",
155
- "placeholder:text-[#A3A3A3] placeholder:font-sm placeholder:font-normal",
156
- "focus:outline-none focus:border-black",
157
- appearance.inputClassName
158
- ),
159
- ...props
160
- }
161
- )
107
+ return /* @__PURE__ */ jsxs("div", { className: "if-formField if-internal-f9n6p2", children: [
108
+ /* @__PURE__ */ jsx("label", { htmlFor: id, className: "if-formField-label if-internal-l3k8m1", children: label }),
109
+ /* @__PURE__ */ jsx("input", { id, className: "if-formField-input if-internal-i2v8k4", ...props })
162
110
  ] });
163
111
  }
164
112
  function AuthPasswordStrengthIndicator({
165
113
  password,
166
- config,
167
- appearance = {}
114
+ config
168
115
  }) {
169
116
  const requirements = createRequirements(config);
170
- return /* @__PURE__ */ jsxRuntime.jsx(
117
+ return /* @__PURE__ */ jsx("div", { className: "if-passwordStrength if-internal-ps6w3k", children: /* @__PURE__ */ jsx("div", { className: "if-passwordStrength-requirements", children: requirements.map((req) => /* @__PURE__ */ jsxs(
171
118
  "div",
172
119
  {
173
- className: cn("mt-3 flex flex-col gap-3", appearance.containerClassName),
174
- children: requirements.map((req) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
175
- /* @__PURE__ */ jsxRuntime.jsx(
120
+ className: `if-passwordStrength-requirement ${req.test(password) ? "met" : "unmet"}`,
121
+ children: [
122
+ /* @__PURE__ */ jsx(
176
123
  "div",
177
124
  {
178
- className: cn(
179
- "flex items-center justify-center w-4 h-4 rounded-full border-2 transition-colors",
180
- req.test(password) ? "bg-[#059669] border-transparent" : "border-neutral-400 bg-white"
181
- ),
182
- children: req.test(password) && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "w-3 h-3 text-white" })
125
+ style: {
126
+ display: "flex",
127
+ alignItems: "center",
128
+ justifyContent: "center",
129
+ width: "1rem",
130
+ height: "1rem",
131
+ borderRadius: "50%",
132
+ border: "2px solid",
133
+ borderColor: req.test(password) ? "transparent" : "#9ca3af",
134
+ backgroundColor: req.test(password) ? "#059669" : "white",
135
+ transition: "all 0.2s"
136
+ },
137
+ children: req.test(password) && /* @__PURE__ */ jsx(Check, { style: { width: "0.75rem", height: "0.75rem", color: "white" } })
183
138
  }
184
139
  ),
185
- /* @__PURE__ */ jsxRuntime.jsx(
186
- "span",
187
- {
188
- className: cn(
189
- "text-sm font-normal leading-5 text-[#525252]",
190
- appearance.requirementClassName
191
- ),
192
- children: req.label
193
- }
194
- )
195
- ] }, req.label))
196
- }
197
- );
140
+ /* @__PURE__ */ jsx("span", { children: req.label })
141
+ ]
142
+ },
143
+ req.label
144
+ )) }) });
198
145
  }
199
146
  function createRequirements(config) {
200
147
  const requirements = [];
201
- const minLength = config.passwordMinLength;
202
- const requireUppercase = config.requireUppercase;
203
- const requireLowercase = config.requireLowercase;
204
- const requireNumber = config.requireNumber;
205
- const requireSpecialChar = config.requireSpecialChar;
206
- if (requireUppercase) {
148
+ if (config.passwordMinLength) {
149
+ requirements.push({
150
+ label: `At least ${config.passwordMinLength} characters`,
151
+ test: (password) => password.length >= config.passwordMinLength
152
+ });
153
+ }
154
+ if (config.requireLowercase) {
207
155
  requirements.push({
208
- label: "At least 1 Uppercase letter",
209
- test: (pwd) => /[A-Z]/.test(pwd)
156
+ label: "Contains lowercase letter",
157
+ test: (password) => /[a-z]/.test(password)
210
158
  });
211
159
  }
212
- if (requireLowercase) {
160
+ if (config.requireUppercase) {
213
161
  requirements.push({
214
- label: "At least 1 Lowercase letter",
215
- test: (pwd) => /[a-z]/.test(pwd)
162
+ label: "Contains uppercase letter",
163
+ test: (password) => /[A-Z]/.test(password)
216
164
  });
217
165
  }
218
- if (requireNumber) {
166
+ if (config.requireNumber) {
219
167
  requirements.push({
220
- label: "At least 1 Number",
221
- test: (pwd) => /\d/.test(pwd)
168
+ label: "Contains number",
169
+ test: (password) => /\d/.test(password)
222
170
  });
223
171
  }
224
- if (requireSpecialChar) {
172
+ if (config.requireSpecialChar) {
225
173
  requirements.push({
226
- label: "Special character (e.g. !?<>@#$%)",
227
- test: (pwd) => /[!@#$%^&*()_+\-=[\]{};\\|,.<>/?]/.test(pwd)
174
+ label: "Contains special character",
175
+ test: (password) => /[!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?]/.test(password)
228
176
  });
229
177
  }
230
- requirements.push({
231
- label: `${minLength} characters or more`,
232
- test: (pwd) => pwd.length >= minLength
233
- });
234
178
  return requirements;
235
179
  }
236
- function validatePasswordStrength(password, config) {
237
- if (!password) return false;
238
- const requirements = createRequirements(config);
239
- return requirements.every((req) => req.test(password));
240
- }
241
180
  function AuthPasswordField({
242
181
  label,
243
182
  id,
@@ -245,121 +184,78 @@ function AuthPasswordField({
245
184
  authConfig,
246
185
  forgotPasswordLink,
247
186
  value,
248
- appearance = {},
249
187
  onFocus,
250
188
  ...props
251
189
  }) {
252
- const [showPassword, setShowPassword] = react.useState(false);
253
- const [showStrength, setShowStrength] = react.useState(false);
190
+ const [showPassword, setShowPassword] = useState(false);
191
+ const [showStrength, setShowStrength] = useState(false);
254
192
  const handleFocus = (e) => {
255
193
  if (showStrengthIndicator) {
256
194
  setShowStrength(true);
257
195
  }
258
196
  onFocus?.(e);
259
197
  };
260
- return /* @__PURE__ */ jsxRuntime.jsxs(
261
- "div",
262
- {
263
- className: cn(
264
- "flex flex-col justify-center items-stretch gap-1",
265
- appearance.containerClassName
198
+ return /* @__PURE__ */ jsxs("div", { className: "if-passwordField if-internal-p5w9m7", children: [
199
+ (label || forgotPasswordLink) && /* @__PURE__ */ jsxs("div", { className: "if-passwordField-labelRow", children: [
200
+ /* @__PURE__ */ jsx("label", { htmlFor: id, className: "if-passwordField-label", children: label }),
201
+ forgotPasswordLink && /* @__PURE__ */ jsx("a", { href: forgotPasswordLink.href, className: "if-passwordField-forgotLink", children: forgotPasswordLink.text || "Forget Password?" })
202
+ ] }),
203
+ /* @__PURE__ */ jsxs("div", { className: "if-passwordField-inputWrapper", children: [
204
+ /* @__PURE__ */ jsx(
205
+ "input",
206
+ {
207
+ id,
208
+ type: showPassword ? "text" : "password",
209
+ className: "if-passwordField-input",
210
+ value,
211
+ onFocus: handleFocus,
212
+ ...props
213
+ }
266
214
  ),
267
- children: [
268
- (label || forgotPasswordLink) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between items-center", children: [
269
- /* @__PURE__ */ jsxRuntime.jsx(
270
- "label",
271
- {
272
- htmlFor: id,
273
- className: cn(
274
- "text-sm font-normal text-black leading-6",
275
- appearance.labelClassName
276
- ),
277
- children: label
278
- }
279
- ),
280
- forgotPasswordLink && /* @__PURE__ */ jsxRuntime.jsx(
281
- "a",
282
- {
283
- href: forgotPasswordLink.href,
284
- className: "text-right text-sm font-normal text-[#737373] leading-6",
285
- children: forgotPasswordLink.text || "Forget Password?"
286
- }
287
- )
288
- ] }),
289
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
290
- /* @__PURE__ */ jsxRuntime.jsx(
291
- "input",
292
- {
293
- id,
294
- type: showPassword ? "text" : "password",
295
- className: cn(
296
- "w-full flex items-center gap-2 self-stretch",
297
- "pl-3 py-2 pr-8 rounded border border-[#D4D4D4] bg-white",
298
- "text-sm font-normal leading-5",
299
- "placeholder:text-[#A3A3A3] placeholder:font-sm placeholder:font-normal",
300
- "focus:outline-none focus:border-black",
301
- appearance.inputClassName
302
- ),
303
- value,
304
- onFocus: handleFocus,
305
- ...props
306
- }
307
- ),
308
- /* @__PURE__ */ jsxRuntime.jsx(
309
- "button",
310
- {
311
- type: "button",
312
- onClick: () => setShowPassword(!showPassword),
313
- className: "absolute right-2 top-1/2 -translate-y-1/2 bg-transparent border-none text-[#A6A6A6] cursor-pointer transition-colors hover:text-gray-600 flex items-center justify-center",
314
- "aria-label": showPassword ? "Hide password" : "Show password",
315
- children: showPassword ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.EyeOff, { size: 20 }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Eye, { size: 20 })
316
- }
317
- )
318
- ] }),
319
- showStrengthIndicator && showStrength && /* @__PURE__ */ jsxRuntime.jsx(
320
- AuthPasswordStrengthIndicator,
321
- {
322
- password: String(value || ""),
323
- config: authConfig
324
- }
325
- )
326
- ]
327
- }
328
- );
215
+ /* @__PURE__ */ jsx(
216
+ "button",
217
+ {
218
+ type: "button",
219
+ onClick: () => setShowPassword(!showPassword),
220
+ className: "if-passwordField-toggleButton",
221
+ "aria-label": showPassword ? "Hide password" : "Show password",
222
+ children: showPassword ? /* @__PURE__ */ jsx(EyeOff, { size: 20 }) : /* @__PURE__ */ jsx(Eye, { size: 20 })
223
+ }
224
+ )
225
+ ] }),
226
+ showStrengthIndicator && showStrength && /* @__PURE__ */ jsx(AuthPasswordStrengthIndicator, { password: String(value || ""), config: authConfig })
227
+ ] });
329
228
  }
330
229
  function AuthSubmitButton({
331
230
  children,
332
231
  isLoading = false,
333
232
  confirmed = false,
334
- disabled = false,
335
- className
233
+ disabled = false
336
234
  }) {
337
- return /* @__PURE__ */ jsxRuntime.jsxs(
235
+ return /* @__PURE__ */ jsxs(
338
236
  "button",
339
237
  {
340
238
  type: "submit",
341
- className: cn(
342
- "rounded-sm bg-black w-full flex mt-4 px-4 py-2",
343
- "justify-center items-center gap-2.5 self-stretch",
344
- "text-white font-semibold font-manrope text-base leading-normal",
345
- "border-none cursor-pointer transition-colors",
346
- "hover:bg-gray-800",
347
- "disabled:opacity-50 disabled:cursor-not-allowed",
348
- className
349
- ),
239
+ className: "if-submitButton if-internal-b8p3m4",
350
240
  disabled: disabled || isLoading || confirmed,
351
241
  children: [
352
- isLoading && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "w-5 h-5 animate-spin", size: 20 }),
353
- confirmed && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CircleCheck, { className: "w-5 h-5", size: 20 }),
242
+ isLoading && /* @__PURE__ */ jsx(Loader2, { className: "if-submitButton-icon if-submitButton-spinner", size: 20 }),
243
+ confirmed && /* @__PURE__ */ jsx(CircleCheck, { className: "if-submitButton-icon", size: 20 }),
354
244
  children
355
245
  ]
356
246
  }
357
247
  );
358
248
  }
359
- function AuthLink({ text, linkText, href, appearance = {} }) {
249
+ function AuthLink({
250
+ text,
251
+ linkText,
252
+ href
253
+ }) {
360
254
  const currentSearch = typeof window !== "undefined" ? window.location.search : "";
361
255
  const finalHref = (() => {
362
- if (!currentSearch) return href;
256
+ if (!currentSearch) {
257
+ return href;
258
+ }
363
259
  try {
364
260
  const url = new URL(href, window.location.origin);
365
261
  const currentParams = new URLSearchParams(currentSearch);
@@ -373,59 +269,45 @@ function AuthLink({ text, linkText, href, appearance = {} }) {
373
269
  return href;
374
270
  }
375
271
  })();
376
- return /* @__PURE__ */ jsxRuntime.jsxs("p", { className: cn(
377
- "text-center text-sm font-normal text-[#828282] leading-6",
378
- appearance.containerClassName
379
- ), children: [
380
- text,
381
- " ",
382
- /* @__PURE__ */ jsxRuntime.jsx(
383
- "a",
384
- {
385
- href: finalHref,
386
- className: cn(
387
- "text-sm font-medium text-black leading-6",
388
- appearance.linkClassName
389
- ),
390
- children: linkText
391
- }
392
- )
272
+ return /* @__PURE__ */ jsxs("p", { className: "if-authLink if-internal-al5w9p", children: [
273
+ text && /* @__PURE__ */ jsx("span", { className: "if-authLink-text", children: text }),
274
+ text && " ",
275
+ /* @__PURE__ */ jsx("a", { href: finalHref, className: "if-authLink-link", children: linkText })
393
276
  ] });
394
277
  }
395
- function AuthDivider({ text = "or", className }) {
396
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(
397
- "flex justify-center items-center gap-6 self-stretch",
398
- "before:content-[''] before:flex-1 before:h-px before:bg-[#E5E5E5]",
399
- "after:content-[''] after:flex-1 after:h-px after:bg-[#E5E5E5]",
400
- className
401
- ), children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-semibold font-manrope text-[#A3A3A3] leading-normal", children: text }) });
278
+ function AuthDivider({ text = "or" }) {
279
+ return /* @__PURE__ */ jsxs("div", { className: "if-authDivider if-internal-ad7k3m", children: [
280
+ /* @__PURE__ */ jsx("div", { className: "if-authDivider-line" }),
281
+ /* @__PURE__ */ jsx("span", { className: "if-authDivider-text", children: text }),
282
+ /* @__PURE__ */ jsx("div", { className: "if-authDivider-line" })
283
+ ] });
402
284
  }
403
285
  var OAUTH_PROVIDER_CONFIG = {
404
286
  google: {
405
287
  name: "Google",
406
- svg: /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "18", height: "18", viewBox: "0 0 18 18", fill: "none", children: [
407
- /* @__PURE__ */ jsxRuntime.jsx(
288
+ svg: /* @__PURE__ */ jsxs("svg", { width: "18", height: "18", viewBox: "0 0 18 18", fill: "none", children: [
289
+ /* @__PURE__ */ jsx(
408
290
  "path",
409
291
  {
410
292
  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",
411
293
  fill: "#4285F4"
412
294
  }
413
295
  ),
414
- /* @__PURE__ */ jsxRuntime.jsx(
296
+ /* @__PURE__ */ jsx(
415
297
  "path",
416
298
  {
417
299
  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",
418
300
  fill: "#34A853"
419
301
  }
420
302
  ),
421
- /* @__PURE__ */ jsxRuntime.jsx(
303
+ /* @__PURE__ */ jsx(
422
304
  "path",
423
305
  {
424
306
  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",
425
307
  fill: "#FBBC05"
426
308
  }
427
309
  ),
428
- /* @__PURE__ */ jsxRuntime.jsx(
310
+ /* @__PURE__ */ jsx(
429
311
  "path",
430
312
  {
431
313
  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",
@@ -437,12 +319,12 @@ var OAUTH_PROVIDER_CONFIG = {
437
319
  },
438
320
  github: {
439
321
  name: "GitHub",
440
- 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" }) }),
322
+ 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" }) }),
441
323
  className: "insforge-oauth-github"
442
324
  },
443
325
  discord: {
444
326
  name: "Discord",
445
- svg: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx(
327
+ svg: /* @__PURE__ */ jsx("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsx(
446
328
  "path",
447
329
  {
448
330
  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",
@@ -453,7 +335,7 @@ var OAUTH_PROVIDER_CONFIG = {
453
335
  },
454
336
  facebook: {
455
337
  name: "Facebook",
456
- svg: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx(
338
+ svg: /* @__PURE__ */ jsx("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsx(
457
339
  "path",
458
340
  {
459
341
  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",
@@ -464,7 +346,7 @@ var OAUTH_PROVIDER_CONFIG = {
464
346
  },
465
347
  linkedin: {
466
348
  name: "LinkedIn",
467
- svg: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx(
349
+ svg: /* @__PURE__ */ jsx("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsx(
468
350
  "path",
469
351
  {
470
352
  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",
@@ -475,45 +357,45 @@ var OAUTH_PROVIDER_CONFIG = {
475
357
  },
476
358
  microsoft: {
477
359
  name: "Microsoft",
478
- svg: /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "18", height: "18", viewBox: "0 0 23 23", fill: "none", children: [
479
- /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M0 0h11v11H0z", fill: "#F25022" }),
480
- /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 0h11v11H12z", fill: "#7FBA00" }),
481
- /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M0 12h11v11H0z", fill: "#00A4EF" }),
482
- /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 12h11v11H12z", fill: "#FFB900" })
360
+ svg: /* @__PURE__ */ jsxs("svg", { width: "18", height: "18", viewBox: "0 0 23 23", fill: "none", children: [
361
+ /* @__PURE__ */ jsx("path", { d: "M0 0h11v11H0z", fill: "#F25022" }),
362
+ /* @__PURE__ */ jsx("path", { d: "M12 0h11v11H12z", fill: "#7FBA00" }),
363
+ /* @__PURE__ */ jsx("path", { d: "M0 12h11v11H0z", fill: "#00A4EF" }),
364
+ /* @__PURE__ */ jsx("path", { d: "M12 12h11v11H12z", fill: "#FFB900" })
483
365
  ] }),
484
366
  className: "insforge-oauth-microsoft"
485
367
  },
486
368
  apple: {
487
369
  name: "Apple",
488
- 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" }) }),
370
+ 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" }) }),
489
371
  className: "insforge-oauth-apple"
490
372
  },
491
373
  x: {
492
374
  name: "X",
493
- 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" }) }),
375
+ 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" }) }),
494
376
  className: "insforge-oauth-x"
495
377
  },
496
378
  instagram: {
497
379
  name: "Instagram",
498
- svg: /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", children: [
499
- /* @__PURE__ */ jsxRuntime.jsx(
380
+ svg: /* @__PURE__ */ jsxs("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", children: [
381
+ /* @__PURE__ */ jsx(
500
382
  "path",
501
383
  {
502
384
  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",
503
385
  fill: "url(#instagram-gradient)"
504
386
  }
505
387
  ),
506
- /* @__PURE__ */ jsxRuntime.jsx("defs", { children: /* @__PURE__ */ jsxRuntime.jsxs("linearGradient", { id: "instagram-gradient", x1: "0%", y1: "100%", x2: "100%", y2: "0%", children: [
507
- /* @__PURE__ */ jsxRuntime.jsx("stop", { offset: "0%", stopColor: "#FD5949" }),
508
- /* @__PURE__ */ jsxRuntime.jsx("stop", { offset: "50%", stopColor: "#D6249F" }),
509
- /* @__PURE__ */ jsxRuntime.jsx("stop", { offset: "100%", stopColor: "#285AEB" })
388
+ /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsxs("linearGradient", { id: "instagram-gradient", x1: "0%", y1: "100%", x2: "100%", y2: "0%", children: [
389
+ /* @__PURE__ */ jsx("stop", { offset: "0%", stopColor: "#FD5949" }),
390
+ /* @__PURE__ */ jsx("stop", { offset: "50%", stopColor: "#D6249F" }),
391
+ /* @__PURE__ */ jsx("stop", { offset: "100%", stopColor: "#285AEB" })
510
392
  ] }) })
511
393
  ] }),
512
394
  className: "insforge-oauth-instagram"
513
395
  },
514
396
  tiktok: {
515
397
  name: "TikTok",
516
- svg: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx(
398
+ svg: /* @__PURE__ */ jsx("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsx(
517
399
  "path",
518
400
  {
519
401
  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",
@@ -524,7 +406,7 @@ var OAUTH_PROVIDER_CONFIG = {
524
406
  },
525
407
  spotify: {
526
408
  name: "Spotify",
527
- svg: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx(
409
+ svg: /* @__PURE__ */ jsx("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsx(
528
410
  "path",
529
411
  {
530
412
  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",
@@ -543,43 +425,39 @@ function AuthOAuthButton({
543
425
  disabled,
544
426
  loading,
545
427
  displayMode = "full",
546
- style,
547
- className
428
+ style
548
429
  }) {
549
430
  const config = getProviderConfig(provider);
550
431
  if (!config) {
551
432
  return null;
552
433
  }
553
434
  const getButtonText = () => {
554
- if (loading) return "Authenticating...";
555
- if (displayMode === "full") return `Continue with ${config.name}`;
556
- if (displayMode === "short") return config.name;
435
+ if (displayMode === "full") {
436
+ return `Continue with ${config.name}`;
437
+ }
438
+ if (displayMode === "short") {
439
+ return config.name;
440
+ }
557
441
  return "";
558
442
  };
559
- return /* @__PURE__ */ jsxRuntime.jsxs(
443
+ const className = [
444
+ "if-oauthButton",
445
+ "if-internal-o4k7w2",
446
+ displayMode === "full" && "if-oauthButton-full",
447
+ displayMode === "short" && "if-oauthButton-short",
448
+ displayMode === "icon" && "if-oauthButton-icon-only"
449
+ ].filter(Boolean).join(" ");
450
+ return /* @__PURE__ */ jsxs(
560
451
  "button",
561
452
  {
562
453
  type: "button",
563
454
  onClick: () => onClick(provider),
564
- className: cn(
565
- "flex w-full h-9 px-3 py-2",
566
- "flex-row justify-center items-center gap-3",
567
- "rounded-md border border-[#E4E4E7] bg-white",
568
- "shadow-[0_1px_2px_0_rgba(0,0,0,0.10)]",
569
- "text-[#09090B] text-center text-sm font-medium leading-5",
570
- "cursor-pointer transition-all duration-200",
571
- "hover:bg-[#f9fafb] hover:border-[#9ca3af]",
572
- "disabled:opacity-60 disabled:cursor-not-allowed",
573
- displayMode === "full" && "justify-center",
574
- displayMode === "short" && "justify-center px-2 gap-2",
575
- displayMode === "icon" && "justify-center gap-0",
576
- className
577
- ),
455
+ className,
578
456
  disabled: disabled || loading,
579
457
  style,
580
458
  children: [
581
- loading ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "w-[18px] h-[18px] animate-spin", size: 18 }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex items-center justify-center shrink-0", children: config.svg }),
582
- getButtonText() && /* @__PURE__ */ jsxRuntime.jsx("span", { children: getButtonText() })
459
+ loading ? /* @__PURE__ */ jsx(Loader2, { className: "if-oauthButton-icon if-submitButton-spinner", size: 18 }) : /* @__PURE__ */ jsx("span", { className: "if-oauthButton-icon", children: config.svg }),
460
+ getButtonText() && /* @__PURE__ */ jsx("span", { children: getButtonText() })
583
461
  ]
584
462
  }
585
463
  );
@@ -588,16 +466,19 @@ function AuthOAuthProviders({
588
466
  providers,
589
467
  onClick,
590
468
  disabled,
591
- loading,
592
- appearance = {}
469
+ loading
593
470
  }) {
594
471
  if (!providers || providers.length === 0) {
595
472
  return null;
596
473
  }
597
474
  const count = providers.length;
598
475
  const getDisplayMode = () => {
599
- if (count === 1) return "full";
600
- if (count === 2 || count === 4) return "short";
476
+ if (count === 1) {
477
+ return "full";
478
+ }
479
+ if (count === 2 || count === 4) {
480
+ return "short";
481
+ }
601
482
  return "icon";
602
483
  };
603
484
  const getGridColumnStyle = (index) => {
@@ -633,22 +514,30 @@ function AuthOAuthProviders({
633
514
  return { gridColumn: "span 2 / span 2" };
634
515
  }
635
516
  };
636
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(
637
- "grid gap-3 w-full grid-cols-6",
638
- appearance.containerClassName
639
- ), children: providers.map((provider, index) => /* @__PURE__ */ jsxRuntime.jsx(
640
- AuthOAuthButton,
517
+ return /* @__PURE__ */ jsx(
518
+ "div",
641
519
  {
642
- provider,
643
- onClick,
644
- disabled,
645
- loading: loading === provider,
646
- displayMode: getDisplayMode(),
647
- style: getGridColumnStyle(index),
648
- className: appearance.buttonClassName
649
- },
650
- provider
651
- )) });
520
+ className: "if-oauthProviders if-internal-op3m8k",
521
+ style: {
522
+ display: "grid",
523
+ gridTemplateColumns: "repeat(6, 1fr)",
524
+ gap: "0.75rem",
525
+ width: "100%"
526
+ },
527
+ children: providers.map((provider, index) => /* @__PURE__ */ jsx(
528
+ AuthOAuthButton,
529
+ {
530
+ provider,
531
+ onClick,
532
+ disabled,
533
+ loading: loading === provider,
534
+ displayMode: getDisplayMode(),
535
+ style: getGridColumnStyle(index)
536
+ },
537
+ provider
538
+ ))
539
+ }
540
+ );
652
541
  }
653
542
  function AuthVerificationCodeInput({
654
543
  length = 6,
@@ -656,13 +545,16 @@ function AuthVerificationCodeInput({
656
545
  email,
657
546
  onChange,
658
547
  disabled = false,
659
- onComplete,
660
- appearance = {}
548
+ onComplete
661
549
  }) {
662
- const inputRefs = react.useRef([]);
550
+ const inputRefs = useRef([]);
663
551
  const handleChange = (index, digit) => {
664
- if (digit.length > 1) return;
665
- if (digit && !/^\d$/.test(digit)) return;
552
+ if (digit.length > 1) {
553
+ return;
554
+ }
555
+ if (digit && !/^\d$/.test(digit)) {
556
+ return;
557
+ }
666
558
  const newValue = value.split("");
667
559
  newValue[index] = digit;
668
560
  const updatedValue = newValue.join("");
@@ -698,17 +590,14 @@ function AuthVerificationCodeInput({
698
590
  }
699
591
  }
700
592
  };
701
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn(
702
- "flex flex-col justify-center items-center gap-6",
703
- appearance.containerClassName
704
- ), children: [
705
- /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-sm font-normal text-[#525252] leading-5", children: [
593
+ return /* @__PURE__ */ jsxs("div", { className: "if-verificationCode if-internal-vc8m4p", children: [
594
+ /* @__PURE__ */ jsxs("p", { className: "if-verificationCode-description", children: [
706
595
  "We've sent a verification code to your inbox at",
707
596
  " ",
708
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-semibold text-black leading-5", children: email }),
597
+ /* @__PURE__ */ jsx("span", { className: "if-verificationCode-email", children: email }),
709
598
  ". Enter it below to proceed."
710
599
  ] }),
711
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-row gap-3 justify-center items-center", children: Array.from({ length }).map((_, index) => /* @__PURE__ */ jsxRuntime.jsx(
600
+ /* @__PURE__ */ jsx("div", { className: "if-verificationCode-inputContainer", children: Array.from({ length }).map((_, index) => /* @__PURE__ */ jsx(
712
601
  "input",
713
602
  {
714
603
  ref: (el) => {
@@ -722,25 +611,16 @@ function AuthVerificationCodeInput({
722
611
  onKeyDown: (e) => handleKeyDown(index, e),
723
612
  onPaste: handlePaste,
724
613
  disabled,
725
- className: cn(
726
- "w-full h-12 px-3 py-2 rounded border border-[#E0E0E0] bg-white",
727
- "text-center text-base font-semibold leading-5 text-black",
728
- "transition-all duration-200 outline-none",
729
- "focus:border-black focus:shadow-[0_0_0_2px_rgba(0,0,0,0.1)]",
730
- "disabled:bg-[#F5F5F5] disabled:cursor-not-allowed disabled:opacity-60",
731
- appearance.inputClassName
732
- ),
614
+ className: "if-verificationCode-input",
733
615
  autoComplete: "one-time-code"
734
616
  },
735
617
  index
736
618
  )) })
737
619
  ] });
738
620
  }
739
- var InsforgeContext = react.createContext(
740
- void 0
741
- );
621
+ var InsforgeContext = createContext(void 0);
742
622
  function useInsforge() {
743
- const context = react.useContext(InsforgeContext);
623
+ const context = useContext(InsforgeContext);
744
624
  if (!context) {
745
625
  throw new Error("useInsforge must be used within InsforgeProvider");
746
626
  }
@@ -753,15 +633,15 @@ function AuthEmailVerificationStep({
753
633
  onVerifyCode
754
634
  }) {
755
635
  const { baseUrl } = useInsforge();
756
- const [insforge] = react.useState(() => sdk.createClient({ baseUrl }));
757
- const [resendDisabled, setResendDisabled] = react.useState(true);
758
- const [resendCountdown, setResendCountdown] = react.useState(60);
759
- const [isSending, setIsSending] = react.useState(false);
760
- const [verificationCode, setVerificationCode] = react.useState("");
761
- const [isVerifying, setIsVerifying] = react.useState(false);
762
- const [verificationError, setVerificationError] = react.useState("");
636
+ const [insforge] = useState(() => createClient({ baseUrl }));
637
+ const [resendDisabled, setResendDisabled] = useState(true);
638
+ const [resendCountdown, setResendCountdown] = useState(60);
639
+ const [isSending, setIsSending] = useState(false);
640
+ const [verificationCode, setVerificationCode] = useState("");
641
+ const [isVerifying, setIsVerifying] = useState(false);
642
+ const [verificationError, setVerificationError] = useState("");
763
643
  const defaultDescription = method === "code" ? "We've sent a 6-digit verification code to {email}. Please enter it below to verify your account. The code will expire in 10 minutes." : "We've sent a verification link to {email}. Please check your email and click the link to verify your account. The link will expire in 10 minutes.";
764
- react.useEffect(() => {
644
+ useEffect(() => {
765
645
  const sendInitialEmail = async () => {
766
646
  try {
767
647
  await insforge.auth.sendVerificationEmail({ email });
@@ -770,7 +650,7 @@ function AuthEmailVerificationStep({
770
650
  };
771
651
  void sendInitialEmail();
772
652
  }, [email, method, insforge.auth]);
773
- react.useEffect(() => {
653
+ useEffect(() => {
774
654
  if (resendCountdown > 0) {
775
655
  const timer = setInterval(() => {
776
656
  setResendCountdown((prev) => {
@@ -816,62 +696,108 @@ function AuthEmailVerificationStep({
816
696
  }
817
697
  };
818
698
  const displayDescription = description || defaultDescription;
819
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-6 items-stretch", children: [
820
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-neutral-600 dark:text-neutral-400 leading-relaxed", children: displayDescription.split("{email}").map((part, index, array) => /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
699
+ return /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "1.5rem", alignItems: "stretch" }, children: [
700
+ /* @__PURE__ */ jsx("p", { className: "if-verificationCode-description", children: displayDescription.split("{email}").map((part, index, array) => /* @__PURE__ */ jsxs("span", { children: [
821
701
  part,
822
- index < array.length - 1 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium text-black dark:text-white", children: email })
702
+ index < array.length - 1 && /* @__PURE__ */ jsx("span", { className: "if-verificationCode-email", children: email })
823
703
  ] }, index)) }),
824
- verificationError && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "pl-3 py-2 pr-2 bg-red-50 border-2 border-red-600 rounded", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
825
- /* @__PURE__ */ jsxRuntime.jsx("svg", { className: "w-6 h-6 text-red-500 shrink-0", fill: "none", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z" }) }),
826
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-red-600 flex-1", children: verificationError })
827
- ] }) }),
828
- method === "code" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full bg-neutral-100 dark:bg-neutral-800 rounded-lg px-4 pt-4 pb-6 flex flex-col gap-4", children: [
829
- /* @__PURE__ */ jsxRuntime.jsx(
830
- AuthVerificationCodeInput,
704
+ verificationError && /* @__PURE__ */ jsx("div", { className: "if-errorBanner if-internal-eb2m7k", children: /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "0.5rem" }, children: [
705
+ /* @__PURE__ */ jsx(
706
+ "svg",
831
707
  {
832
- value: verificationCode,
833
- onChange: setVerificationCode,
834
- email,
835
- disabled: isVerifying,
836
- onComplete: (code) => {
837
- void handleVerifyCode(code);
838
- }
708
+ style: { width: "1.5rem", height: "1.5rem", flexShrink: 0, color: "#DC2626" },
709
+ fill: "none",
710
+ strokeLinecap: "round",
711
+ strokeLinejoin: "round",
712
+ strokeWidth: "2",
713
+ viewBox: "0 0 24 24",
714
+ stroke: "currentColor",
715
+ children: /* @__PURE__ */ jsx("path", { d: "M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z" })
839
716
  }
840
717
  ),
841
- isVerifying && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-neutral-600 dark:text-neutral-400 text-center", children: "Verifying..." })
842
- ] }),
843
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full text-sm text-center text-neutral-600 dark:text-neutral-400", children: [
844
- "Didn't receive the email?",
845
- " ",
846
- /* @__PURE__ */ jsxRuntime.jsx(
847
- "button",
848
- {
849
- onClick: () => {
850
- void handleResend();
851
- },
852
- disabled: resendDisabled || isSending,
853
- className: "text-black dark:text-white font-medium transition-colors disabled:cursor-not-allowed cursor-pointer hover:underline disabled:no-underline disabled:opacity-50",
854
- children: isSending ? "Sending..." : resendDisabled ? `Retry in (${resendCountdown}s)` : "Click to resend"
855
- }
856
- )
857
- ] })
718
+ /* @__PURE__ */ jsx("p", { className: "if-errorBanner-text", children: verificationError })
719
+ ] }) }),
720
+ method === "code" && /* @__PURE__ */ jsxs(
721
+ "div",
722
+ {
723
+ style: {
724
+ width: "100%",
725
+ backgroundColor: "#F5F5F5",
726
+ borderRadius: "0.5rem",
727
+ padding: "1rem 1rem 1.5rem",
728
+ display: "flex",
729
+ flexDirection: "column",
730
+ gap: "1rem"
731
+ },
732
+ children: [
733
+ /* @__PURE__ */ jsx(
734
+ AuthVerificationCodeInput,
735
+ {
736
+ value: verificationCode,
737
+ onChange: setVerificationCode,
738
+ email,
739
+ disabled: isVerifying,
740
+ onComplete: (code) => {
741
+ void handleVerifyCode(code);
742
+ }
743
+ }
744
+ ),
745
+ isVerifying && /* @__PURE__ */ jsx(
746
+ "p",
747
+ {
748
+ style: {
749
+ fontSize: "0.875rem",
750
+ color: "#828282",
751
+ textAlign: "center",
752
+ fontFamily: "var(--if-font-family)"
753
+ },
754
+ children: "Verifying..."
755
+ }
756
+ )
757
+ ]
758
+ }
759
+ ),
760
+ /* @__PURE__ */ jsxs(
761
+ "div",
762
+ {
763
+ style: {
764
+ width: "100%",
765
+ fontSize: "0.875rem",
766
+ textAlign: "center",
767
+ color: "#828282",
768
+ fontFamily: "var(--if-font-family)"
769
+ },
770
+ children: [
771
+ "Didn't receive the email?",
772
+ " ",
773
+ /* @__PURE__ */ jsx(
774
+ "button",
775
+ {
776
+ onClick: () => {
777
+ void handleResend();
778
+ },
779
+ disabled: resendDisabled || isSending,
780
+ style: {
781
+ color: "#000",
782
+ fontWeight: 500,
783
+ transition: "all 0.2s",
784
+ cursor: resendDisabled || isSending ? "not-allowed" : "pointer",
785
+ background: "none",
786
+ border: "none",
787
+ padding: 0,
788
+ textDecoration: resendDisabled || isSending ? "none" : "underline",
789
+ opacity: resendDisabled || isSending ? 0.5 : 1,
790
+ fontFamily: "var(--if-font-family)"
791
+ },
792
+ children: isSending ? "Sending..." : resendDisabled ? `Retry in (${resendCountdown}s)` : "Click to resend"
793
+ }
794
+ )
795
+ ]
796
+ }
797
+ )
858
798
  ] });
859
799
  }
860
800
 
861
- exports.AuthBranding = AuthBranding;
862
- exports.AuthContainer = AuthContainer;
863
- exports.AuthDivider = AuthDivider;
864
- exports.AuthEmailVerificationStep = AuthEmailVerificationStep;
865
- exports.AuthErrorBanner = AuthErrorBanner;
866
- exports.AuthFormField = AuthFormField;
867
- exports.AuthHeader = AuthHeader;
868
- exports.AuthLink = AuthLink;
869
- exports.AuthOAuthButton = AuthOAuthButton;
870
- exports.AuthOAuthProviders = AuthOAuthProviders;
871
- exports.AuthPasswordField = AuthPasswordField;
872
- exports.AuthPasswordStrengthIndicator = AuthPasswordStrengthIndicator;
873
- exports.AuthSubmitButton = AuthSubmitButton;
874
- exports.AuthVerificationCodeInput = AuthVerificationCodeInput;
875
- exports.validatePasswordStrength = validatePasswordStrength;
801
+ export { AuthBranding, AuthContainer, AuthDivider, AuthEmailVerificationStep, AuthErrorBanner, AuthFormField, AuthHeader, AuthLink, AuthOAuthButton, AuthOAuthProviders, AuthPasswordField, AuthPasswordStrengthIndicator, AuthSubmitButton, AuthVerificationCodeInput };
876
802
  //# sourceMappingURL=atoms.js.map
877
803
  //# sourceMappingURL=atoms.js.map