@insforge/react 0.3.5 → 0.4.5

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 (66) hide show
  1. package/README.md +476 -604
  2. package/dist/atoms.cjs +837 -0
  3. package/dist/atoms.cjs.map +1 -0
  4. package/dist/atoms.d.cts +253 -0
  5. package/dist/atoms.d.ts +111 -245
  6. package/dist/atoms.js +412 -468
  7. package/dist/atoms.js.map +1 -1
  8. package/dist/components.cjs +2000 -0
  9. package/dist/components.cjs.map +1 -0
  10. package/dist/components.d.cts +258 -0
  11. package/dist/components.d.ts +71 -123
  12. package/dist/components.js +1040 -1428
  13. package/dist/components.js.map +1 -1
  14. package/dist/forms.cjs +1194 -0
  15. package/dist/forms.cjs.map +1 -0
  16. package/dist/forms.d.cts +135 -0
  17. package/dist/forms.d.ts +113 -163
  18. package/dist/forms.js +657 -943
  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 +2461 -0
  26. package/dist/index.cjs.map +1 -0
  27. package/dist/{index.d.mts → index.d.cts} +37 -22
  28. package/dist/index.d.ts +34 -19
  29. package/dist/index.js +1142 -1497
  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.d.mts → router.d.cts} +0 -11
  40. package/dist/router.d.ts +0 -11
  41. package/dist/router.js +10 -16
  42. package/dist/router.js.map +1 -1
  43. package/dist/styles.css +864 -2
  44. package/dist/types.cjs +4 -0
  45. package/dist/{types.mjs.map → types.cjs.map} +1 -1
  46. package/dist/types.d.cts +32 -0
  47. package/dist/types.d.ts +11 -613
  48. package/dist/types.js +0 -1
  49. package/package.json +111 -98
  50. package/dist/atoms.d.mts +0 -387
  51. package/dist/atoms.mjs +0 -861
  52. package/dist/atoms.mjs.map +0 -1
  53. package/dist/components.d.mts +0 -310
  54. package/dist/components.mjs +0 -2327
  55. package/dist/components.mjs.map +0 -1
  56. package/dist/forms.d.mts +0 -185
  57. package/dist/forms.mjs +0 -1468
  58. package/dist/forms.mjs.map +0 -1
  59. package/dist/hooks.mjs.map +0 -1
  60. package/dist/index.mjs +0 -2724
  61. package/dist/index.mjs.map +0 -1
  62. package/dist/lib.mjs.map +0 -1
  63. package/dist/router.mjs.map +0 -1
  64. package/dist/types.d.mts +0 -634
  65. package/dist/types.mjs +0 -3
  66. package/src/styles.css +0 -15
package/dist/atoms.js CHANGED
@@ -1,243 +1,174 @@
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, useCallback, useContext } from 'react';
4
+ import { useSearchParams } from 'react-router-dom';
5
+ import '@insforge/sdk';
9
6
 
10
7
  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
- ] }) })
8
+ return /* @__PURE__ */ jsxs("div", { className: "if-authBranding if-internal-ab4k9w", children: [
9
+ /* @__PURE__ */ jsx("p", { className: "if-authBranding-text", children: "Secured by" }),
10
+ /* @__PURE__ */ jsx("a", { href: "https://insforge.dev", target: "_blank", rel: "noopener noreferrer", children: /* @__PURE__ */ jsxs(
11
+ "svg",
12
+ {
13
+ width: "83",
14
+ height: "20",
15
+ viewBox: "0 0 83 20",
16
+ fill: "none",
17
+ xmlns: "http://www.w3.org/2000/svg",
18
+ children: [
19
+ /* @__PURE__ */ jsx(
20
+ "path",
21
+ {
22
+ 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",
23
+ fill: "url(#paint0_linear_2976_9475)"
24
+ }
25
+ ),
26
+ /* @__PURE__ */ jsx(
27
+ "path",
28
+ {
29
+ d: "M12.8858 6.44922L16.6 10.168V18.668L8.64108 10.6992L12.8858 6.44922Z",
30
+ fill: "url(#paint1_linear_2976_9475)"
31
+ }
32
+ ),
33
+ /* @__PURE__ */ jsx(
34
+ "path",
35
+ {
36
+ 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",
37
+ fill: "black"
38
+ }
39
+ ),
40
+ /* @__PURE__ */ jsxs("defs", { children: [
41
+ /* @__PURE__ */ jsxs(
42
+ "linearGradient",
43
+ {
44
+ id: "paint0_linear_2976_9475",
45
+ x1: "1.85883",
46
+ y1: "1.92425",
47
+ x2: "24.3072",
48
+ y2: "9.64016",
49
+ gradientUnits: "userSpaceOnUse",
50
+ children: [
51
+ /* @__PURE__ */ jsx("stop", {}),
52
+ /* @__PURE__ */ jsx("stop", { offset: "1", stopOpacity: "0.4" })
53
+ ]
54
+ }
55
+ ),
56
+ /* @__PURE__ */ jsxs(
57
+ "linearGradient",
58
+ {
59
+ id: "paint1_linear_2976_9475",
60
+ x1: "25.6475",
61
+ y1: "8.65468",
62
+ x2: "10.7901",
63
+ y2: "8.65468",
64
+ gradientUnits: "userSpaceOnUse",
65
+ children: [
66
+ /* @__PURE__ */ jsx("stop", {}),
67
+ /* @__PURE__ */ jsx("stop", { offset: "1", stopOpacity: "0.4" })
68
+ ]
69
+ }
70
+ )
71
+ ] })
72
+ ]
73
+ }
74
+ ) })
68
75
  ] });
69
76
  }
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
- );
77
+ function AuthContainer({ children }) {
78
+ return /* @__PURE__ */ jsxs("div", { className: "if-authContainer if-internal-a8f3d2", children: [
79
+ /* @__PURE__ */ jsx("div", { className: "if-authCard if-internal-b2k9x1", children }),
80
+ /* @__PURE__ */ jsx(AuthBranding, {})
81
+ ] });
90
82
  }
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 })
83
+ function AuthHeader({ title, subtitle }) {
84
+ return /* @__PURE__ */ jsxs("div", { className: "if-authHeader if-internal-h3m7w5", children: [
85
+ /* @__PURE__ */ jsx("h1", { className: "if-authHeader-title if-internal-t4p1k9", children: title }),
86
+ subtitle && /* @__PURE__ */ jsx("p", { className: "if-authHeader-subtitle if-internal-s7q2m3", children: subtitle })
108
87
  ] });
109
88
  }
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
- );
89
+ function AuthErrorBanner({ error }) {
90
+ if (!error) {
91
+ return null;
92
+ }
93
+ return /* @__PURE__ */ jsx("div", { className: "if-errorBanner if-internal-eb2m7k", children: /* @__PURE__ */ jsxs("div", { className: "if-errorBanner-content", children: [
94
+ /* @__PURE__ */ jsx(AlertTriangle, { className: "if-errorBanner-icon" }),
95
+ /* @__PURE__ */ jsx("span", { className: "if-errorBanner-text", children: error })
96
+ ] }) });
125
97
  }
126
- function AuthFormField({
127
- label,
128
- id,
129
- appearance = {},
130
- ...props
131
- }) {
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
- )
98
+ function AuthFormField({ label, id, ...props }) {
99
+ return /* @__PURE__ */ jsxs("div", { className: "if-formField if-internal-f9n6p2", children: [
100
+ /* @__PURE__ */ jsx("label", { htmlFor: id, className: "if-formField-label if-internal-l3k8m1", children: label }),
101
+ /* @__PURE__ */ jsx("input", { id, className: "if-formField-input if-internal-i2v8k4", ...props })
162
102
  ] });
163
103
  }
164
104
  function AuthPasswordStrengthIndicator({
165
105
  password,
166
- config,
167
- appearance = {}
106
+ config
168
107
  }) {
169
108
  const requirements = createRequirements(config);
170
- return /* @__PURE__ */ jsxRuntime.jsx(
109
+ 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
110
  "div",
172
111
  {
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(
112
+ className: `if-passwordStrength-requirement ${req.test(password) ? "met" : "unmet"}`,
113
+ children: [
114
+ /* @__PURE__ */ jsx(
176
115
  "div",
177
116
  {
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" })
117
+ style: {
118
+ display: "flex",
119
+ alignItems: "center",
120
+ justifyContent: "center",
121
+ width: "1rem",
122
+ height: "1rem",
123
+ borderRadius: "50%",
124
+ border: "2px solid",
125
+ borderColor: req.test(password) ? "transparent" : "#9ca3af",
126
+ backgroundColor: req.test(password) ? "#059669" : "white",
127
+ transition: "all 0.2s"
128
+ },
129
+ children: req.test(password) && /* @__PURE__ */ jsx(Check, { style: { width: "0.75rem", height: "0.75rem", color: "white" } })
183
130
  }
184
131
  ),
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
- );
132
+ /* @__PURE__ */ jsx("span", { children: req.label })
133
+ ]
134
+ },
135
+ req.label
136
+ )) }) });
198
137
  }
199
138
  function createRequirements(config) {
200
139
  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) {
140
+ if (config.passwordMinLength) {
207
141
  requirements.push({
208
- label: "At least 1 Uppercase letter",
209
- test: (pwd) => /[A-Z]/.test(pwd)
142
+ label: `At least ${config.passwordMinLength} characters`,
143
+ test: (password) => password.length >= config.passwordMinLength
210
144
  });
211
145
  }
212
- if (requireLowercase) {
146
+ if (config.requireLowercase) {
213
147
  requirements.push({
214
- label: "At least 1 Lowercase letter",
215
- test: (pwd) => /[a-z]/.test(pwd)
148
+ label: "Contains lowercase letter",
149
+ test: (password) => /[a-z]/.test(password)
216
150
  });
217
151
  }
218
- if (requireNumber) {
152
+ if (config.requireUppercase) {
219
153
  requirements.push({
220
- label: "At least 1 Number",
221
- test: (pwd) => /\d/.test(pwd)
154
+ label: "Contains uppercase letter",
155
+ test: (password) => /[A-Z]/.test(password)
222
156
  });
223
157
  }
224
- if (requireSpecialChar) {
158
+ if (config.requireNumber) {
225
159
  requirements.push({
226
- label: "Special character (e.g. !?<>@#$%)",
227
- test: (pwd) => /[!@#$%^&*()_+\-=[\]{};\\|,.<>/?]/.test(pwd)
160
+ label: "Contains number",
161
+ test: (password) => /\d/.test(password)
162
+ });
163
+ }
164
+ if (config.requireSpecialChar) {
165
+ requirements.push({
166
+ label: "Contains special character",
167
+ test: (password) => /[!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?]/.test(password)
228
168
  });
229
169
  }
230
- requirements.push({
231
- label: `${minLength} characters or more`,
232
- test: (pwd) => pwd.length >= minLength
233
- });
234
170
  return requirements;
235
171
  }
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
172
  function AuthPasswordField({
242
173
  label,
243
174
  id,
@@ -245,187 +176,125 @@ function AuthPasswordField({
245
176
  authConfig,
246
177
  forgotPasswordLink,
247
178
  value,
248
- appearance = {},
249
179
  onFocus,
250
180
  ...props
251
181
  }) {
252
- const [showPassword, setShowPassword] = react.useState(false);
253
- const [showStrength, setShowStrength] = react.useState(false);
182
+ const [showPassword, setShowPassword] = useState(false);
183
+ const [showStrength, setShowStrength] = useState(false);
254
184
  const handleFocus = (e) => {
255
185
  if (showStrengthIndicator) {
256
186
  setShowStrength(true);
257
187
  }
258
188
  onFocus?.(e);
259
189
  };
260
- return /* @__PURE__ */ jsxRuntime.jsxs(
261
- "div",
262
- {
263
- className: cn(
264
- "flex flex-col justify-center items-stretch gap-1",
265
- appearance.containerClassName
190
+ return /* @__PURE__ */ jsxs("div", { className: "if-passwordField if-internal-p5w9m7", children: [
191
+ (label || forgotPasswordLink) && /* @__PURE__ */ jsxs("div", { className: "if-passwordField-labelRow", children: [
192
+ /* @__PURE__ */ jsx("label", { htmlFor: id, className: "if-passwordField-label", children: label }),
193
+ forgotPasswordLink && /* @__PURE__ */ jsx("a", { href: forgotPasswordLink.href, className: "if-passwordField-forgotLink", children: forgotPasswordLink.text || "Forget Password?" })
194
+ ] }),
195
+ /* @__PURE__ */ jsxs("div", { className: "if-passwordField-inputWrapper", children: [
196
+ /* @__PURE__ */ jsx(
197
+ "input",
198
+ {
199
+ id,
200
+ type: showPassword ? "text" : "password",
201
+ className: "if-passwordField-input",
202
+ value,
203
+ onFocus: handleFocus,
204
+ ...props
205
+ }
266
206
  ),
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
- );
207
+ /* @__PURE__ */ jsx(
208
+ "button",
209
+ {
210
+ type: "button",
211
+ onClick: () => setShowPassword(!showPassword),
212
+ className: "if-passwordField-toggleButton",
213
+ "aria-label": showPassword ? "Hide password" : "Show password",
214
+ children: showPassword ? /* @__PURE__ */ jsx(EyeOff, { size: 20 }) : /* @__PURE__ */ jsx(Eye, { size: 20 })
215
+ }
216
+ )
217
+ ] }),
218
+ showStrengthIndicator && showStrength && /* @__PURE__ */ jsx(AuthPasswordStrengthIndicator, { password: String(value || ""), config: authConfig })
219
+ ] });
329
220
  }
330
221
  function AuthSubmitButton({
331
222
  children,
332
223
  isLoading = false,
333
224
  confirmed = false,
334
225
  disabled = false,
335
- className
226
+ type = "submit",
227
+ onClick
336
228
  }) {
337
- return /* @__PURE__ */ jsxRuntime.jsxs(
229
+ return /* @__PURE__ */ jsxs(
338
230
  "button",
339
231
  {
340
- 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
- ),
232
+ type,
233
+ className: "if-submitButton if-internal-b8p3m4",
350
234
  disabled: disabled || isLoading || confirmed,
235
+ onClick,
351
236
  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 }),
237
+ isLoading && /* @__PURE__ */ jsx(Loader2, { className: "if-submitButton-icon if-submitButton-spinner", size: 20 }),
238
+ confirmed && /* @__PURE__ */ jsx(CircleCheck, { className: "if-submitButton-icon", size: 20 }),
354
239
  children
355
240
  ]
356
241
  }
357
242
  );
358
243
  }
359
- function AuthLink({ text, linkText, href, appearance = {} }) {
360
- const currentSearch = typeof window !== "undefined" ? window.location.search : "";
244
+ function AuthLink({ text, linkText, href }) {
245
+ const [searchParams] = useSearchParams();
246
+ const currentSearch = searchParams.toString();
361
247
  const finalHref = (() => {
362
- if (!currentSearch) return href;
248
+ if (!currentSearch) {
249
+ return href;
250
+ }
363
251
  try {
364
252
  const url = new URL(href, window.location.origin);
365
- const currentParams = new URLSearchParams(currentSearch);
366
- currentParams.forEach((value, key) => {
367
- if (!url.searchParams.has(key)) {
368
- url.searchParams.set(key, value);
369
- }
370
- });
253
+ url.search = currentSearch;
371
254
  return url.pathname + url.search;
372
255
  } catch {
373
256
  return href;
374
257
  }
375
258
  })();
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
- )
259
+ return /* @__PURE__ */ jsxs("p", { className: "if-authLink if-internal-al5w9p", children: [
260
+ text && /* @__PURE__ */ jsx("span", { className: "if-authLink-text", children: text }),
261
+ text && " ",
262
+ /* @__PURE__ */ jsx("a", { href: finalHref, className: "if-authLink-link", children: linkText })
393
263
  ] });
394
264
  }
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 }) });
265
+ function AuthDivider({ text = "or" }) {
266
+ return /* @__PURE__ */ jsxs("div", { className: "if-authDivider if-internal-ad7k3m", children: [
267
+ /* @__PURE__ */ jsx("div", { className: "if-authDivider-line" }),
268
+ /* @__PURE__ */ jsx("span", { className: "if-authDivider-text", children: text }),
269
+ /* @__PURE__ */ jsx("div", { className: "if-authDivider-line" })
270
+ ] });
402
271
  }
403
272
  var OAUTH_PROVIDER_CONFIG = {
404
273
  google: {
405
274
  name: "Google",
406
- svg: /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "18", height: "18", viewBox: "0 0 18 18", fill: "none", children: [
407
- /* @__PURE__ */ jsxRuntime.jsx(
275
+ svg: /* @__PURE__ */ jsxs("svg", { width: "18", height: "18", viewBox: "0 0 18 18", fill: "none", children: [
276
+ /* @__PURE__ */ jsx(
408
277
  "path",
409
278
  {
410
279
  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
280
  fill: "#4285F4"
412
281
  }
413
282
  ),
414
- /* @__PURE__ */ jsxRuntime.jsx(
283
+ /* @__PURE__ */ jsx(
415
284
  "path",
416
285
  {
417
286
  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
287
  fill: "#34A853"
419
288
  }
420
289
  ),
421
- /* @__PURE__ */ jsxRuntime.jsx(
290
+ /* @__PURE__ */ jsx(
422
291
  "path",
423
292
  {
424
293
  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
294
  fill: "#FBBC05"
426
295
  }
427
296
  ),
428
- /* @__PURE__ */ jsxRuntime.jsx(
297
+ /* @__PURE__ */ jsx(
429
298
  "path",
430
299
  {
431
300
  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 +306,12 @@ var OAUTH_PROVIDER_CONFIG = {
437
306
  },
438
307
  github: {
439
308
  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" }) }),
309
+ 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
310
  className: "insforge-oauth-github"
442
311
  },
443
312
  discord: {
444
313
  name: "Discord",
445
- svg: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx(
314
+ svg: /* @__PURE__ */ jsx("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsx(
446
315
  "path",
447
316
  {
448
317
  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 +322,7 @@ var OAUTH_PROVIDER_CONFIG = {
453
322
  },
454
323
  facebook: {
455
324
  name: "Facebook",
456
- svg: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx(
325
+ svg: /* @__PURE__ */ jsx("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsx(
457
326
  "path",
458
327
  {
459
328
  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 +333,7 @@ var OAUTH_PROVIDER_CONFIG = {
464
333
  },
465
334
  linkedin: {
466
335
  name: "LinkedIn",
467
- svg: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx(
336
+ svg: /* @__PURE__ */ jsx("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsx(
468
337
  "path",
469
338
  {
470
339
  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 +344,45 @@ var OAUTH_PROVIDER_CONFIG = {
475
344
  },
476
345
  microsoft: {
477
346
  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" })
347
+ svg: /* @__PURE__ */ jsxs("svg", { width: "18", height: "18", viewBox: "0 0 23 23", fill: "none", children: [
348
+ /* @__PURE__ */ jsx("path", { d: "M0 0h11v11H0z", fill: "#F25022" }),
349
+ /* @__PURE__ */ jsx("path", { d: "M12 0h11v11H12z", fill: "#7FBA00" }),
350
+ /* @__PURE__ */ jsx("path", { d: "M0 12h11v11H0z", fill: "#00A4EF" }),
351
+ /* @__PURE__ */ jsx("path", { d: "M12 12h11v11H12z", fill: "#FFB900" })
483
352
  ] }),
484
353
  className: "insforge-oauth-microsoft"
485
354
  },
486
355
  apple: {
487
356
  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" }) }),
357
+ 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
358
  className: "insforge-oauth-apple"
490
359
  },
491
360
  x: {
492
361
  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" }) }),
362
+ 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
363
  className: "insforge-oauth-x"
495
364
  },
496
365
  instagram: {
497
366
  name: "Instagram",
498
- svg: /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", children: [
499
- /* @__PURE__ */ jsxRuntime.jsx(
367
+ svg: /* @__PURE__ */ jsxs("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", children: [
368
+ /* @__PURE__ */ jsx(
500
369
  "path",
501
370
  {
502
371
  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
372
  fill: "url(#instagram-gradient)"
504
373
  }
505
374
  ),
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" })
375
+ /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsxs("linearGradient", { id: "instagram-gradient", x1: "0%", y1: "100%", x2: "100%", y2: "0%", children: [
376
+ /* @__PURE__ */ jsx("stop", { offset: "0%", stopColor: "#FD5949" }),
377
+ /* @__PURE__ */ jsx("stop", { offset: "50%", stopColor: "#D6249F" }),
378
+ /* @__PURE__ */ jsx("stop", { offset: "100%", stopColor: "#285AEB" })
510
379
  ] }) })
511
380
  ] }),
512
381
  className: "insforge-oauth-instagram"
513
382
  },
514
383
  tiktok: {
515
384
  name: "TikTok",
516
- svg: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx(
385
+ svg: /* @__PURE__ */ jsx("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsx(
517
386
  "path",
518
387
  {
519
388
  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 +393,7 @@ var OAUTH_PROVIDER_CONFIG = {
524
393
  },
525
394
  spotify: {
526
395
  name: "Spotify",
527
- svg: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx(
396
+ svg: /* @__PURE__ */ jsx("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsx(
528
397
  "path",
529
398
  {
530
399
  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 +412,39 @@ function AuthOAuthButton({
543
412
  disabled,
544
413
  loading,
545
414
  displayMode = "full",
546
- style,
547
- className
415
+ style
548
416
  }) {
549
417
  const config = getProviderConfig(provider);
550
418
  if (!config) {
551
419
  return null;
552
420
  }
553
421
  const getButtonText = () => {
554
- if (loading) return "Authenticating...";
555
- if (displayMode === "full") return `Continue with ${config.name}`;
556
- if (displayMode === "short") return config.name;
422
+ if (displayMode === "full") {
423
+ return `Continue with ${config.name}`;
424
+ }
425
+ if (displayMode === "short") {
426
+ return config.name;
427
+ }
557
428
  return "";
558
429
  };
559
- return /* @__PURE__ */ jsxRuntime.jsxs(
430
+ const className = [
431
+ "if-oauthButton",
432
+ "if-internal-o4k7w2",
433
+ displayMode === "full" && "if-oauthButton-full",
434
+ displayMode === "short" && "if-oauthButton-short",
435
+ displayMode === "icon" && "if-oauthButton-icon-only"
436
+ ].filter(Boolean).join(" ");
437
+ return /* @__PURE__ */ jsxs(
560
438
  "button",
561
439
  {
562
440
  type: "button",
563
441
  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
- ),
442
+ className,
578
443
  disabled: disabled || loading,
579
444
  style,
580
445
  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() })
446
+ loading ? /* @__PURE__ */ jsx(Loader2, { className: "if-oauthButton-icon if-submitButton-spinner", size: 18 }) : /* @__PURE__ */ jsx("span", { className: "if-oauthButton-icon", children: config.svg }),
447
+ getButtonText() && /* @__PURE__ */ jsx("span", { children: getButtonText() })
583
448
  ]
584
449
  }
585
450
  );
@@ -588,16 +453,19 @@ function AuthOAuthProviders({
588
453
  providers,
589
454
  onClick,
590
455
  disabled,
591
- loading,
592
- appearance = {}
456
+ loading
593
457
  }) {
594
458
  if (!providers || providers.length === 0) {
595
459
  return null;
596
460
  }
597
461
  const count = providers.length;
598
462
  const getDisplayMode = () => {
599
- if (count === 1) return "full";
600
- if (count === 2 || count === 4) return "short";
463
+ if (count === 1) {
464
+ return "full";
465
+ }
466
+ if (count === 2 || count === 4) {
467
+ return "short";
468
+ }
601
469
  return "icon";
602
470
  };
603
471
  const getGridColumnStyle = (index) => {
@@ -633,22 +501,30 @@ function AuthOAuthProviders({
633
501
  return { gridColumn: "span 2 / span 2" };
634
502
  }
635
503
  };
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,
504
+ return /* @__PURE__ */ jsx(
505
+ "div",
641
506
  {
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
- )) });
507
+ className: "if-oauthProviders if-internal-op3m8k",
508
+ style: {
509
+ display: "grid",
510
+ gridTemplateColumns: "repeat(6, 1fr)",
511
+ gap: "0.75rem",
512
+ width: "100%"
513
+ },
514
+ children: providers.map((provider, index) => /* @__PURE__ */ jsx(
515
+ AuthOAuthButton,
516
+ {
517
+ provider,
518
+ onClick,
519
+ disabled,
520
+ loading: loading === provider,
521
+ displayMode: getDisplayMode(),
522
+ style: getGridColumnStyle(index)
523
+ },
524
+ provider
525
+ ))
526
+ }
527
+ );
652
528
  }
653
529
  function AuthVerificationCodeInput({
654
530
  length = 6,
@@ -656,13 +532,16 @@ function AuthVerificationCodeInput({
656
532
  email,
657
533
  onChange,
658
534
  disabled = false,
659
- onComplete,
660
- appearance = {}
535
+ onComplete
661
536
  }) {
662
- const inputRefs = react.useRef([]);
537
+ const inputRefs = useRef([]);
663
538
  const handleChange = (index, digit) => {
664
- if (digit.length > 1) return;
665
- if (digit && !/^\d$/.test(digit)) return;
539
+ if (digit.length > 1) {
540
+ return;
541
+ }
542
+ if (digit && !/^\d$/.test(digit)) {
543
+ return;
544
+ }
666
545
  const newValue = value.split("");
667
546
  newValue[index] = digit;
668
547
  const updatedValue = newValue.join("");
@@ -698,17 +577,14 @@ function AuthVerificationCodeInput({
698
577
  }
699
578
  }
700
579
  };
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: [
580
+ return /* @__PURE__ */ jsxs("div", { className: "if-verificationCode if-internal-vc8m4p", children: [
581
+ /* @__PURE__ */ jsxs("p", { className: "if-verificationCode-description", children: [
706
582
  "We've sent a verification code to your inbox at",
707
583
  " ",
708
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-semibold text-black leading-5", children: email }),
584
+ /* @__PURE__ */ jsx("span", { className: "if-verificationCode-email", children: email }),
709
585
  ". Enter it below to proceed."
710
586
  ] }),
711
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-row gap-3 justify-center items-center", children: Array.from({ length }).map((_, index) => /* @__PURE__ */ jsxRuntime.jsx(
587
+ /* @__PURE__ */ jsx("div", { className: "if-verificationCode-inputContainer", children: Array.from({ length }).map((_, index) => /* @__PURE__ */ jsx(
712
588
  "input",
713
589
  {
714
590
  ref: (el) => {
@@ -722,25 +598,16 @@ function AuthVerificationCodeInput({
722
598
  onKeyDown: (e) => handleKeyDown(index, e),
723
599
  onPaste: handlePaste,
724
600
  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
- ),
601
+ className: "if-verificationCode-input",
733
602
  autoComplete: "one-time-code"
734
603
  },
735
604
  index
736
605
  )) })
737
606
  ] });
738
607
  }
739
- var InsforgeContext = react.createContext(
740
- void 0
741
- );
608
+ var InsforgeContext = createContext(void 0);
742
609
  function useInsforge() {
743
- const context = react.useContext(InsforgeContext);
610
+ const context = useContext(InsforgeContext);
744
611
  if (!context) {
745
612
  throw new Error("useInsforge must be used within InsforgeProvider");
746
613
  }
@@ -748,29 +615,27 @@ function useInsforge() {
748
615
  }
749
616
  function AuthEmailVerificationStep({
750
617
  email,
751
- description,
752
618
  method = "code",
753
619
  onVerifyCode
754
620
  }) {
755
- 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("");
621
+ const { sendVerificationEmail } = useInsforge();
622
+ const [resendDisabled, setResendDisabled] = useState(true);
623
+ const [resendCountdown, setResendCountdown] = useState(60);
624
+ const [isSending, setIsSending] = useState(false);
625
+ const [verificationCode, setVerificationCode] = useState("");
626
+ const [isVerifying, setIsVerifying] = useState(false);
763
627
  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(() => {
628
+ useEffect(() => {
765
629
  const sendInitialEmail = async () => {
766
630
  try {
767
- await insforge.auth.sendVerificationEmail({ email });
768
- } catch {
631
+ await sendVerificationEmail(email);
632
+ } catch (error) {
633
+ console.error("Failed to send verification email:", error);
769
634
  }
770
635
  };
771
636
  void sendInitialEmail();
772
- }, [email, method, insforge.auth]);
773
- react.useEffect(() => {
637
+ }, [email, sendVerificationEmail]);
638
+ useEffect(() => {
774
639
  if (resendCountdown > 0) {
775
640
  const timer = setInterval(() => {
776
641
  setResendCountdown((prev) => {
@@ -788,9 +653,8 @@ function AuthEmailVerificationStep({
788
653
  setResendDisabled(true);
789
654
  setResendCountdown(60);
790
655
  setIsSending(true);
791
- setVerificationError("");
792
656
  try {
793
- await insforge.auth.sendVerificationEmail({ email });
657
+ await sendVerificationEmail(email);
794
658
  } catch {
795
659
  setResendDisabled(false);
796
660
  setResendCountdown(0);
@@ -798,59 +662,153 @@ function AuthEmailVerificationStep({
798
662
  setIsSending(false);
799
663
  }
800
664
  };
801
- const handleVerifyCode = async (code) => {
802
- if (!onVerifyCode) {
665
+ const handleSubmit = async () => {
666
+ if (!onVerifyCode || verificationCode.length !== 6) {
803
667
  return;
804
668
  }
805
669
  setIsVerifying(true);
806
- setVerificationError("");
807
670
  try {
808
- await onVerifyCode(code);
809
- } catch (error) {
810
- setVerificationError(
811
- error instanceof Error ? error.message : "Invalid verification code. Please try again."
812
- );
813
- setVerificationCode("");
671
+ await onVerifyCode(verificationCode);
814
672
  } finally {
815
673
  setIsVerifying(false);
674
+ setVerificationCode("");
816
675
  }
817
676
  };
818
- 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: [
677
+ const displayDescription = defaultDescription;
678
+ const isLinkMethod = method === "link";
679
+ return /* @__PURE__ */ jsxs("div", { className: "if-verificationStep", children: [
680
+ /* @__PURE__ */ jsx("p", { className: "if-verificationStep-description", children: displayDescription.split("{email}").map((part, index, array) => /* @__PURE__ */ jsxs("span", { children: [
821
681
  part,
822
- index < array.length - 1 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium text-black dark:text-white", children: email })
682
+ index < array.length - 1 && /* @__PURE__ */ jsx("span", { className: "if-verificationCode-email", children: email })
823
683
  ] }, 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(
684
+ !isLinkMethod && /* @__PURE__ */ jsxs("div", { className: "if-verificationStep-codeContainer", children: [
685
+ /* @__PURE__ */ jsx("div", { className: "if-verificationStep-codeInputWrapper", children: /* @__PURE__ */ jsx(
830
686
  AuthVerificationCodeInput,
831
687
  {
832
688
  value: verificationCode,
833
689
  onChange: setVerificationCode,
834
690
  email,
835
- disabled: isVerifying,
836
- onComplete: (code) => {
837
- void handleVerifyCode(code);
691
+ disabled: isVerifying
692
+ }
693
+ ) }),
694
+ /* @__PURE__ */ jsx(
695
+ AuthSubmitButton,
696
+ {
697
+ type: "button",
698
+ isLoading: isVerifying,
699
+ disabled: isVerifying || verificationCode.length !== 6,
700
+ onClick: () => {
701
+ void handleSubmit();
702
+ },
703
+ children: isVerifying ? "Verifying..." : "Verify Code"
704
+ }
705
+ )
706
+ ] }),
707
+ /* @__PURE__ */ jsxs("div", { className: "if-verificationStep-resendContainer", children: [
708
+ "Didn't receive the email?",
709
+ " ",
710
+ /* @__PURE__ */ jsx(
711
+ "button",
712
+ {
713
+ onClick: () => {
714
+ void handleResend();
715
+ },
716
+ disabled: resendDisabled || isSending,
717
+ className: "if-verificationStep-resendButton",
718
+ children: isSending ? "Sending..." : resendDisabled ? `Retry in (${resendCountdown}s)` : "Click to resend"
719
+ }
720
+ )
721
+ ] })
722
+ ] });
723
+ }
724
+ function AuthResetPasswordVerificationStep({
725
+ email,
726
+ method,
727
+ onVerifyCode,
728
+ onResendEmail
729
+ }) {
730
+ const [resendDisabled, setResendDisabled] = useState(true);
731
+ const [resendCountdown, setResendCountdown] = useState(60);
732
+ const [isSending, setIsSending] = useState(false);
733
+ const [verificationCode, setVerificationCode] = useState("");
734
+ const [isVerifying, setIsVerifying] = useState(false);
735
+ useEffect(() => {
736
+ if (resendCountdown > 0) {
737
+ const timer = setInterval(() => {
738
+ setResendCountdown((prev) => {
739
+ if (prev <= 1) {
740
+ setResendDisabled(false);
741
+ return 0;
838
742
  }
743
+ return prev - 1;
744
+ });
745
+ }, 1e3);
746
+ return () => clearInterval(timer);
747
+ }
748
+ }, [resendCountdown]);
749
+ const handleResend = useCallback(async () => {
750
+ setResendDisabled(true);
751
+ setResendCountdown(60);
752
+ setIsSending(true);
753
+ try {
754
+ await onResendEmail();
755
+ } catch {
756
+ setResendDisabled(false);
757
+ setResendCountdown(0);
758
+ } finally {
759
+ setIsSending(false);
760
+ }
761
+ }, [onResendEmail]);
762
+ const handleSubmit = async () => {
763
+ if (!onVerifyCode || verificationCode.length !== 6) {
764
+ return;
765
+ }
766
+ setIsVerifying(true);
767
+ try {
768
+ await onVerifyCode(verificationCode);
769
+ } finally {
770
+ setIsVerifying(false);
771
+ setVerificationCode("");
772
+ }
773
+ };
774
+ const isLinkMethod = method === "link";
775
+ const description = isLinkMethod ? `We've sent a password reset link to ${email}. Please check your email and click the link to reset your password. The link will expire in 10 minutes.` : `We've sent a 6-digit verification code to ${email}. Please enter it below to reset your password. The code will expire in 10 minutes.`;
776
+ return /* @__PURE__ */ jsxs("div", { className: "if-verificationStep", children: [
777
+ /* @__PURE__ */ jsx("p", { className: "if-verificationStep-description", children: description }),
778
+ !isLinkMethod && /* @__PURE__ */ jsxs("div", { className: "if-verificationStep-codeContainer", children: [
779
+ /* @__PURE__ */ jsx("div", { className: "if-verificationStep-codeInputWrapper", children: /* @__PURE__ */ jsx(
780
+ AuthVerificationCodeInput,
781
+ {
782
+ value: verificationCode,
783
+ onChange: setVerificationCode,
784
+ email,
785
+ disabled: isVerifying
839
786
  }
840
- ),
841
- isVerifying && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-neutral-600 dark:text-neutral-400 text-center", children: "Verifying..." })
787
+ ) }),
788
+ /* @__PURE__ */ jsx(
789
+ AuthSubmitButton,
790
+ {
791
+ type: "button",
792
+ isLoading: isVerifying,
793
+ disabled: isVerifying || verificationCode.length !== 6,
794
+ onClick: () => {
795
+ void handleSubmit();
796
+ },
797
+ children: isVerifying ? "Verifying..." : "Continue"
798
+ }
799
+ )
842
800
  ] }),
843
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full text-sm text-center text-neutral-600 dark:text-neutral-400", children: [
801
+ /* @__PURE__ */ jsxs("div", { className: "if-verificationStep-resendContainer", children: [
844
802
  "Didn't receive the email?",
845
803
  " ",
846
- /* @__PURE__ */ jsxRuntime.jsx(
804
+ /* @__PURE__ */ jsx(
847
805
  "button",
848
806
  {
849
807
  onClick: () => {
850
808
  void handleResend();
851
809
  },
852
810
  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",
811
+ className: "if-verificationStep-resendButton",
854
812
  children: isSending ? "Sending..." : resendDisabled ? `Retry in (${resendCountdown}s)` : "Click to resend"
855
813
  }
856
814
  )
@@ -858,20 +816,6 @@ function AuthEmailVerificationStep({
858
816
  ] });
859
817
  }
860
818
 
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;
819
+ export { AuthBranding, AuthContainer, AuthDivider, AuthEmailVerificationStep, AuthErrorBanner, AuthFormField, AuthHeader, AuthLink, AuthOAuthButton, AuthOAuthProviders, AuthPasswordField, AuthPasswordStrengthIndicator, AuthResetPasswordVerificationStep, AuthSubmitButton, AuthVerificationCodeInput };
876
820
  //# sourceMappingURL=atoms.js.map
877
821
  //# sourceMappingURL=atoms.js.map