@sikka/hawa 0.26.27 → 0.26.29

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 (364) hide show
  1. package/dist/tooltip/index.js +1 -0
  2. package/dist/tooltip/index.js.map +1 -0
  3. package/dist/tooltip/index.mjs +1 -0
  4. package/dist/tooltip/index.mjs.map +1 -0
  5. package/package.json +1 -1
  6. package/dist/Chip-H5BnuDdx.d.ts +0 -36
  7. package/dist/Chip-hr2gRBJ-.d.mts +0 -36
  8. package/dist/DropdownMenu-EUL-D3I3.d.mts +0 -95
  9. package/dist/DropdownMenu-SPisqCzV.d.ts +0 -95
  10. package/dist/Radio-K1WGpnGA.d.ts +0 -75
  11. package/dist/Radio-hsrLKNxE.d.mts +0 -75
  12. package/dist/Toast-VBd4UvlM.d.mts +0 -26
  13. package/dist/Toast-pOd4uGZz.d.ts +0 -26
  14. package/dist/accordion/index.d.mts +0 -51
  15. package/dist/accordion/index.d.ts +0 -51
  16. package/dist/accordion/index.js +0 -271
  17. package/dist/accordion/index.mjs +0 -227
  18. package/dist/alert/index.d.mts +0 -29
  19. package/dist/alert/index.d.ts +0 -29
  20. package/dist/alert/index.js +0 -442
  21. package/dist/alert/index.mjs +0 -402
  22. package/dist/appLayout/index.d.mts +0 -126
  23. package/dist/appLayout/index.d.ts +0 -126
  24. package/dist/appLayout/index.js +0 -1326
  25. package/dist/appLayout/index.mjs +0 -1286
  26. package/dist/appMenubar/index.d.mts +0 -33
  27. package/dist/appMenubar/index.d.ts +0 -33
  28. package/dist/appMenubar/index.js +0 -281
  29. package/dist/appMenubar/index.mjs +0 -224
  30. package/dist/appStores/index.d.mts +0 -8
  31. package/dist/appStores/index.d.ts +0 -8
  32. package/dist/appStores/index.js +0 -75
  33. package/dist/appStores/index.mjs +0 -38
  34. package/dist/appTabs/index.d.mts +0 -18
  35. package/dist/appTabs/index.d.ts +0 -18
  36. package/dist/appTabs/index.js +0 -92
  37. package/dist/appTabs/index.mjs +0 -50
  38. package/dist/appTopbar/index.d.mts +0 -44
  39. package/dist/appTopbar/index.d.ts +0 -44
  40. package/dist/appTopbar/index.js +0 -483
  41. package/dist/appTopbar/index.mjs +0 -441
  42. package/dist/avatar/index.d.mts +0 -16
  43. package/dist/avatar/index.d.ts +0 -16
  44. package/dist/avatar/index.js +0 -162
  45. package/dist/avatar/index.mjs +0 -122
  46. package/dist/backToTop/index.d.mts +0 -15
  47. package/dist/backToTop/index.d.ts +0 -15
  48. package/dist/backToTop/index.js +0 -398
  49. package/dist/backToTop/index.mjs +0 -358
  50. package/dist/badge/index.d.mts +0 -13
  51. package/dist/badge/index.d.ts +0 -13
  52. package/dist/badge/index.js +0 -127
  53. package/dist/badge/index.mjs +0 -84
  54. package/dist/blocks/auth/index.d.mts +0 -202
  55. package/dist/blocks/auth/index.d.ts +0 -202
  56. package/dist/blocks/auth/index.js +0 -4197
  57. package/dist/blocks/auth/index.mjs +0 -3389
  58. package/dist/blocks/feedback/index.d.mts +0 -74
  59. package/dist/blocks/feedback/index.d.ts +0 -74
  60. package/dist/blocks/feedback/index.js +0 -1544
  61. package/dist/blocks/feedback/index.mjs +0 -558
  62. package/dist/blocks/index.d.mts +0 -480
  63. package/dist/blocks/index.d.ts +0 -480
  64. package/dist/blocks/index.js +0 -6700
  65. package/dist/blocks/index.mjs +0 -2550
  66. package/dist/blocks/misc/index.d.mts +0 -90
  67. package/dist/blocks/misc/index.d.ts +0 -90
  68. package/dist/blocks/misc/index.js +0 -1186
  69. package/dist/blocks/misc/index.mjs +0 -387
  70. package/dist/blocks/pricing/index.d.mts +0 -93
  71. package/dist/blocks/pricing/index.d.ts +0 -93
  72. package/dist/blocks/pricing/index.js +0 -1528
  73. package/dist/blocks/pricing/index.mjs +0 -677
  74. package/dist/breadcrumb/index.d.mts +0 -14
  75. package/dist/breadcrumb/index.d.ts +0 -14
  76. package/dist/breadcrumb/index.js +0 -63
  77. package/dist/breadcrumb/index.mjs +0 -26
  78. package/dist/button/index.d.mts +0 -16
  79. package/dist/button/index.d.ts +0 -16
  80. package/dist/button/index.js +0 -301
  81. package/dist/button/index.mjs +0 -260
  82. package/dist/card/index.d.mts +0 -17
  83. package/dist/card/index.d.ts +0 -17
  84. package/dist/card/index.js +0 -139
  85. package/dist/card/index.mjs +0 -92
  86. package/dist/carousel/index.d.mts +0 -15
  87. package/dist/carousel/index.d.ts +0 -15
  88. package/dist/carousel/index.js +0 -193
  89. package/dist/carousel/index.mjs +0 -151
  90. package/dist/checkbox/index.d.mts +0 -20
  91. package/dist/checkbox/index.d.ts +0 -20
  92. package/dist/checkbox/index.js +0 -184
  93. package/dist/checkbox/index.mjs +0 -142
  94. package/dist/chip/index.d.mts +0 -36
  95. package/dist/chip/index.d.ts +0 -36
  96. package/dist/chip/index.js +0 -129
  97. package/dist/chip/index.mjs +0 -87
  98. package/dist/chunk-2R7F2GL7.mjs +0 -82
  99. package/dist/chunk-4EGKGSGY.mjs +0 -129
  100. package/dist/chunk-5YXZXYLH.mjs +0 -67
  101. package/dist/chunk-65TG6EVD.mjs +0 -264
  102. package/dist/chunk-D22AALLE.mjs +0 -22
  103. package/dist/chunk-D36MPDGE.mjs +0 -476
  104. package/dist/chunk-F3DQJHTG.mjs +0 -3113
  105. package/dist/chunk-FQ6WVEHW.mjs +0 -151
  106. package/dist/chunk-GVJYACGA.mjs +0 -189
  107. package/dist/chunk-JNUGOUYJ.mjs +0 -154
  108. package/dist/chunk-KMCIHW76.mjs +0 -150
  109. package/dist/chunk-MQUAGP7K.mjs +0 -1098
  110. package/dist/chunk-NMS5LCSQ.mjs +0 -195
  111. package/dist/chunk-OY66MBXP.mjs +0 -163
  112. package/dist/chunk-R4HAAT6R.mjs +0 -131
  113. package/dist/chunk-SJ2Z6ZOG.mjs +0 -442
  114. package/dist/chunk-TGZRVRLP.mjs +0 -107
  115. package/dist/chunk-TWNGV3RE.mjs +0 -10
  116. package/dist/chunk-WUHNPHD5.mjs +0 -0
  117. package/dist/chunk-ZFXKCRJC.mjs +0 -11
  118. package/dist/chunk-ZS3FB3PO.mjs +0 -12
  119. package/dist/codeBlock/index.d.mts +0 -24
  120. package/dist/codeBlock/index.d.ts +0 -24
  121. package/dist/codeBlock/index.js +0 -517
  122. package/dist/codeBlock/index.mjs +0 -432
  123. package/dist/collapsible/index.d.mts +0 -8
  124. package/dist/collapsible/index.d.ts +0 -8
  125. package/dist/collapsible/index.js +0 -49
  126. package/dist/collapsible/index.mjs +0 -12
  127. package/dist/colorPicker/index.d.mts +0 -34
  128. package/dist/colorPicker/index.d.ts +0 -34
  129. package/dist/colorPicker/index.js +0 -276
  130. package/dist/colorPicker/index.mjs +0 -170
  131. package/dist/combobox/index.d.mts +0 -41
  132. package/dist/combobox/index.d.ts +0 -41
  133. package/dist/combobox/index.js +0 -749
  134. package/dist/combobox/index.mjs +0 -295
  135. package/dist/command/index.d.mts +0 -48
  136. package/dist/command/index.d.ts +0 -48
  137. package/dist/command/index.js +0 -485
  138. package/dist/command/index.mjs +0 -22
  139. package/dist/commonTypes-2IGtJ5cq.d.mts +0 -3
  140. package/dist/commonTypes-2IGtJ5cq.d.ts +0 -3
  141. package/dist/commonTypes-2k6FnHw5.d.mts +0 -4
  142. package/dist/commonTypes-2k6FnHw5.d.ts +0 -4
  143. package/dist/commonTypes-3k5cNB1s.d.mts +0 -4
  144. package/dist/commonTypes-3k5cNB1s.d.ts +0 -4
  145. package/dist/commonTypes-CKtkuNFH.d.mts +0 -11
  146. package/dist/commonTypes-CKtkuNFH.d.ts +0 -11
  147. package/dist/commonTypes-GhKAraJw.d.mts +0 -4
  148. package/dist/commonTypes-GhKAraJw.d.ts +0 -4
  149. package/dist/commonTypes-MxCJyrHv.d.mts +0 -8
  150. package/dist/commonTypes-MxCJyrHv.d.ts +0 -8
  151. package/dist/commonTypes-PBumfOBg.d.mts +0 -3
  152. package/dist/commonTypes-PBumfOBg.d.ts +0 -3
  153. package/dist/commonTypes-WPhcN3Vr.d.mts +0 -5
  154. package/dist/commonTypes-WPhcN3Vr.d.ts +0 -5
  155. package/dist/commonTypes-_11epZYh.d.mts +0 -4
  156. package/dist/commonTypes-_11epZYh.d.ts +0 -4
  157. package/dist/commonTypes-ko_NGEoT.d.mts +0 -3
  158. package/dist/commonTypes-ko_NGEoT.d.ts +0 -3
  159. package/dist/copyrights/index.d.mts +0 -17
  160. package/dist/copyrights/index.d.ts +0 -17
  161. package/dist/copyrights/index.js +0 -45
  162. package/dist/copyrights/index.mjs +0 -8
  163. package/dist/count/index.d.mts +0 -11
  164. package/dist/count/index.d.ts +0 -11
  165. package/dist/count/index.js +0 -45
  166. package/dist/count/index.mjs +0 -8
  167. package/dist/dataTable/index.d.mts +0 -41
  168. package/dist/dataTable/index.d.ts +0 -41
  169. package/dist/dataTable/index.js +0 -1313
  170. package/dist/dataTable/index.mjs +0 -1281
  171. package/dist/destroyableCard/index.d.mts +0 -12
  172. package/dist/destroyableCard/index.d.ts +0 -12
  173. package/dist/destroyableCard/index.js +0 -203
  174. package/dist/destroyableCard/index.mjs +0 -163
  175. package/dist/dialog/index.d.mts +0 -57
  176. package/dist/dialog/index.d.ts +0 -57
  177. package/dist/dialog/index.js +0 -368
  178. package/dist/dialog/index.mjs +0 -314
  179. package/dist/docsLayout/index.d.mts +0 -37
  180. package/dist/docsLayout/index.d.ts +0 -37
  181. package/dist/docsLayout/index.js +0 -927
  182. package/dist/docsLayout/index.mjs +0 -887
  183. package/dist/docsSidebar/index.d.mts +0 -11
  184. package/dist/docsSidebar/index.d.ts +0 -11
  185. package/dist/docsSidebar/index.js +0 -111
  186. package/dist/docsSidebar/index.mjs +0 -69
  187. package/dist/dropdownMenu/index.d.mts +0 -96
  188. package/dist/dropdownMenu/index.d.ts +0 -96
  189. package/dist/dropdownMenu/index.js +0 -420
  190. package/dist/dropdownMenu/index.mjs +0 -362
  191. package/dist/elements/index.d.mts +0 -788
  192. package/dist/elements/index.d.ts +0 -788
  193. package/dist/elements/index.js +0 -7832
  194. package/dist/elements/index.mjs +0 -3415
  195. package/dist/fileDropzone/index.d.mts +0 -37
  196. package/dist/fileDropzone/index.d.ts +0 -37
  197. package/dist/fileDropzone/index.js +0 -665
  198. package/dist/fileDropzone/index.mjs +0 -625
  199. package/dist/fileUploader/index.d.mts +0 -5
  200. package/dist/fileUploader/index.d.ts +0 -5
  201. package/dist/fileUploader/index.js +0 -62
  202. package/dist/fileUploader/index.mjs +0 -25
  203. package/dist/glow/index.d.mts +0 -16
  204. package/dist/glow/index.d.ts +0 -16
  205. package/dist/glow/index.js +0 -155
  206. package/dist/glow/index.mjs +0 -117
  207. package/dist/hooks/index.d.mts +0 -108
  208. package/dist/hooks/index.d.ts +0 -108
  209. package/dist/hooks/index.js +0 -459
  210. package/dist/hooks/index.mjs +0 -255
  211. package/dist/index.d.mts +0 -1932
  212. package/dist/index.d.ts +0 -1932
  213. package/dist/index.js +0 -12123
  214. package/dist/index.mjs +0 -11908
  215. package/dist/input/index.d.mts +0 -43
  216. package/dist/input/index.d.ts +0 -43
  217. package/dist/input/index.js +0 -293
  218. package/dist/input/index.mjs +0 -158
  219. package/dist/interfaceSettings/index.d.mts +0 -18
  220. package/dist/interfaceSettings/index.d.ts +0 -18
  221. package/dist/interfaceSettings/index.js +0 -420
  222. package/dist/interfaceSettings/index.mjs +0 -283
  223. package/dist/label/index.d.mts +0 -13
  224. package/dist/label/index.d.ts +0 -13
  225. package/dist/label/index.js +0 -142
  226. package/dist/label/index.mjs +0 -102
  227. package/dist/layout/index.d.mts +0 -256
  228. package/dist/layout/index.d.ts +0 -256
  229. package/dist/layout/index.js +0 -2627
  230. package/dist/layout/index.mjs +0 -1393
  231. package/dist/loading/index.d.mts +0 -15
  232. package/dist/loading/index.d.ts +0 -15
  233. package/dist/loading/index.js +0 -225
  234. package/dist/loading/index.mjs +0 -183
  235. package/dist/logos/index.d.mts +0 -27
  236. package/dist/logos/index.d.ts +0 -27
  237. package/dist/logos/index.js +0 -244
  238. package/dist/logos/index.mjs +0 -207
  239. package/dist/navbar/index.d.mts +0 -17
  240. package/dist/navbar/index.d.ts +0 -17
  241. package/dist/navbar/index.js +0 -166
  242. package/dist/navbar/index.mjs +0 -126
  243. package/dist/navigationMenu/index.d.mts +0 -39
  244. package/dist/navigationMenu/index.d.ts +0 -39
  245. package/dist/navigationMenu/index.js +0 -221
  246. package/dist/navigationMenu/index.mjs +0 -169
  247. package/dist/pagination/index.d.mts +0 -11
  248. package/dist/pagination/index.d.ts +0 -11
  249. package/dist/pagination/index.js +0 -160
  250. package/dist/pagination/index.mjs +0 -118
  251. package/dist/passwordInput/index.d.mts +0 -13
  252. package/dist/passwordInput/index.d.ts +0 -13
  253. package/dist/passwordInput/index.js +0 -577
  254. package/dist/passwordInput/index.mjs +0 -534
  255. package/dist/phoneInput/index.d.mts +0 -23
  256. package/dist/phoneInput/index.d.ts +0 -23
  257. package/dist/phoneInput/index.js +0 -2085
  258. package/dist/phoneInput/index.mjs +0 -2045
  259. package/dist/pinInput/index.d.mts +0 -20
  260. package/dist/pinInput/index.d.ts +0 -20
  261. package/dist/pinInput/index.js +0 -131
  262. package/dist/pinInput/index.mjs +0 -89
  263. package/dist/popover/index.d.mts +0 -23
  264. package/dist/popover/index.d.ts +0 -23
  265. package/dist/popover/index.js +0 -112
  266. package/dist/popover/index.mjs +0 -68
  267. package/dist/progress/index.d.mts +0 -6
  268. package/dist/progress/index.d.ts +0 -6
  269. package/dist/progress/index.js +0 -71
  270. package/dist/progress/index.mjs +0 -29
  271. package/dist/progressCircle/index.d.mts +0 -16
  272. package/dist/progressCircle/index.d.ts +0 -16
  273. package/dist/progressCircle/index.js +0 -159
  274. package/dist/progressCircle/index.mjs +0 -117
  275. package/dist/radio/index.d.mts +0 -39
  276. package/dist/radio/index.d.ts +0 -39
  277. package/dist/radio/index.js +0 -331
  278. package/dist/radio/index.mjs +0 -291
  279. package/dist/scrollArea/index.d.mts +0 -10
  280. package/dist/scrollArea/index.d.ts +0 -10
  281. package/dist/scrollArea/index.js +0 -90
  282. package/dist/scrollArea/index.mjs +0 -47
  283. package/dist/scrollIndicator/index.d.mts +0 -9
  284. package/dist/scrollIndicator/index.d.ts +0 -9
  285. package/dist/scrollIndicator/index.js +0 -80
  286. package/dist/scrollIndicator/index.mjs +0 -43
  287. package/dist/select/index.d.mts +0 -50
  288. package/dist/select/index.d.ts +0 -50
  289. package/dist/select/index.js +0 -325
  290. package/dist/select/index.mjs +0 -285
  291. package/dist/separator/index.d.mts +0 -10
  292. package/dist/separator/index.d.ts +0 -10
  293. package/dist/separator/index.js +0 -66
  294. package/dist/separator/index.mjs +0 -24
  295. package/dist/sheet/index.d.mts +0 -30
  296. package/dist/sheet/index.d.ts +0 -30
  297. package/dist/sheet/index.js +0 -201
  298. package/dist/sheet/index.mjs +0 -150
  299. package/dist/sidebar/index.d.mts +0 -48
  300. package/dist/sidebar/index.d.ts +0 -48
  301. package/dist/sidebar/index.js +0 -341
  302. package/dist/sidebar/index.mjs +0 -298
  303. package/dist/signature/index.d.mts +0 -27
  304. package/dist/signature/index.d.ts +0 -27
  305. package/dist/signature/index.js +0 -261
  306. package/dist/signature/index.mjs +0 -219
  307. package/dist/simpleTable/index.d.mts +0 -30
  308. package/dist/simpleTable/index.d.ts +0 -30
  309. package/dist/simpleTable/index.js +0 -253
  310. package/dist/simpleTable/index.mjs +0 -217
  311. package/dist/skeleton/index.d.mts +0 -10
  312. package/dist/skeleton/index.d.ts +0 -10
  313. package/dist/skeleton/index.js +0 -75
  314. package/dist/skeleton/index.mjs +0 -33
  315. package/dist/slider/index.d.mts +0 -6
  316. package/dist/slider/index.d.ts +0 -6
  317. package/dist/slider/index.js +0 -66
  318. package/dist/slider/index.mjs +0 -24
  319. package/dist/sortButton/index.d.mts +0 -10
  320. package/dist/sortButton/index.d.ts +0 -10
  321. package/dist/sortButton/index.js +0 -336
  322. package/dist/sortButton/index.mjs +0 -42
  323. package/dist/splitButton/index.d.mts +0 -52
  324. package/dist/splitButton/index.d.ts +0 -52
  325. package/dist/splitButton/index.js +0 -692
  326. package/dist/splitButton/index.mjs +0 -400
  327. package/dist/stats/index.d.mts +0 -19
  328. package/dist/stats/index.d.ts +0 -19
  329. package/dist/stats/index.js +0 -191
  330. package/dist/stats/index.mjs +0 -154
  331. package/dist/stopPropagationWrapper/index.d.mts +0 -5
  332. package/dist/stopPropagationWrapper/index.d.ts +0 -5
  333. package/dist/stopPropagationWrapper/index.js +0 -48
  334. package/dist/stopPropagationWrapper/index.mjs +0 -11
  335. package/dist/switch/index.d.mts +0 -12
  336. package/dist/switch/index.d.ts +0 -12
  337. package/dist/switch/index.js +0 -125
  338. package/dist/switch/index.mjs +0 -83
  339. package/dist/table/index.d.mts +0 -21
  340. package/dist/table/index.d.ts +0 -21
  341. package/dist/table/index.js +0 -172
  342. package/dist/table/index.mjs +0 -123
  343. package/dist/tabs/index.d.mts +0 -33
  344. package/dist/tabs/index.d.ts +0 -33
  345. package/dist/tabs/index.js +0 -200
  346. package/dist/tabs/index.mjs +0 -157
  347. package/dist/textTypes-559CaoOV.d.mts +0 -88
  348. package/dist/textTypes-559CaoOV.d.ts +0 -88
  349. package/dist/textarea/index.d.mts +0 -27
  350. package/dist/textarea/index.d.ts +0 -27
  351. package/dist/textarea/index.js +0 -229
  352. package/dist/textarea/index.mjs +0 -189
  353. package/dist/toast/index.d.mts +0 -26
  354. package/dist/toast/index.d.ts +0 -26
  355. package/dist/toast/index.js +0 -197
  356. package/dist/toast/index.mjs +0 -19
  357. package/dist/toaster/index.d.mts +0 -9
  358. package/dist/toaster/index.d.ts +0 -9
  359. package/dist/toaster/index.js +0 -350
  360. package/dist/toaster/index.mjs +0 -181
  361. package/dist/types/index.d.mts +0 -115
  362. package/dist/types/index.d.ts +0 -115
  363. package/dist/types/index.js +0 -18
  364. package/dist/types/index.mjs +0 -0
@@ -1,3389 +0,0 @@
1
- import {
2
- Input
3
- } from "../../chunk-R4HAAT6R.mjs";
4
- import {
5
- StopPropagationWrapper
6
- } from "../../chunk-ZS3FB3PO.mjs";
7
- import {
8
- Select
9
- } from "../../chunk-OY66MBXP.mjs";
10
- import "../../chunk-WUHNPHD5.mjs";
11
- import {
12
- EyeIcon,
13
- HiddenEyeIcon
14
- } from "../../chunk-GVJYACGA.mjs";
15
- import {
16
- Button,
17
- Card,
18
- CardContent,
19
- CardDescription,
20
- CardFooter,
21
- CardHeader,
22
- CardTitle,
23
- Label,
24
- Loading,
25
- cn
26
- } from "../../chunk-D36MPDGE.mjs";
27
-
28
- // blocks/auth/LoginForm.tsx
29
- import React5, { useState as useState3 } from "react";
30
- import { Controller, useForm } from "react-hook-form";
31
- import { zodResolver } from "@hookform/resolvers/zod";
32
- import { parsePhoneNumber } from "libphonenumber-js";
33
- import * as z from "zod";
34
-
35
- // elements/alert/Alert.tsx
36
- import React, { useRef, useState, useEffect } from "react";
37
- var Alert = ({
38
- variant = "normal",
39
- direction = "ltr",
40
- severity = "none",
41
- duration,
42
- icon,
43
- className,
44
- ...props
45
- }) => {
46
- const alertRef = useRef(null);
47
- const [closed, setClosed] = useState(false);
48
- useEffect(() => {
49
- if (duration) {
50
- const timeoutHide = setTimeout(() => {
51
- setClosed(true);
52
- }, duration);
53
- const timeoutDestroy = setTimeout(() => {
54
- setClosed(true);
55
- if (alertRef == null ? void 0 : alertRef.current) {
56
- alertRef == null ? void 0 : alertRef.current.removeChild(alertRef == null ? void 0 : alertRef.current.children[0]);
57
- }
58
- }, duration + 1e3);
59
- return () => {
60
- clearTimeout(timeoutHide);
61
- clearTimeout(timeoutDestroy);
62
- };
63
- }
64
- }, [duration]);
65
- let closeButtonStyle = {
66
- none: "",
67
- info: "",
68
- warning: "",
69
- error: "",
70
- success: "",
71
- hyper: "",
72
- oceanic: ""
73
- };
74
- let styleVariant = {
75
- none: "hawa-text-gray-700 hawa-bg-gray-100 dark:hawa-bg-gray-900 ",
76
- info: "hawa-text-info-foreground hawa-bg-info/90",
77
- warning: "hawa-text-warning-foreground hawa-bg-warning/90",
78
- error: "hawa-text-destructive-foreground hawa-bg-destructive/90",
79
- success: "hawa-text-success-foreground hawa-bg-success/90",
80
- hyper: "hawa-text-white hawa-bg-gradient-to-tl hawa-from-pink-700 hawa-via-red-500 hawa-to-yellow-600 ",
81
- oceanic: "hawa-text-white hawa-bg-gradient-to-bl hawa-from-green-500 hawa-via-blue-700 hawa-to-purple-500"
82
- };
83
- return /* @__PURE__ */ React.createElement("div", { ref: alertRef }, /* @__PURE__ */ React.createElement(
84
- "div",
85
- {
86
- "data-testid": "alert",
87
- "aria-label": "Alert",
88
- role: "alert",
89
- dir: direction,
90
- className: cn(
91
- "hawa-relative hawa-mb-4 hawa-flex hawa-flex-col hawa-rounded hawa-p-4 hawa-text-sm hawa-transition-all",
92
- styleVariant[severity],
93
- closed ? "hawa-opacity-0" : "hawa-opacity-100",
94
- className
95
- )
96
- },
97
- /* @__PURE__ */ React.createElement("div", { className: "hawa-flex hawa-flex-row" }, icon && /* @__PURE__ */ React.createElement(
98
- "div",
99
- {
100
- className: direction === "rtl" ? "hawa-pl-2 hawa-pt-1" : "hawa-pr-2 hawa-pt-1"
101
- },
102
- icon
103
- ), /* @__PURE__ */ React.createElement("div", { className: "hawa-flex hawa-flex-col" }, /* @__PURE__ */ React.createElement(
104
- "span",
105
- {
106
- className: cn(
107
- "hawa-font-bold",
108
- direction === "rtl" ? "hawa-ml-8" : "hawa-mr-8"
109
- )
110
- },
111
- props.title
112
- ), /* @__PURE__ */ React.createElement(
113
- "span",
114
- {
115
- className: cn(
116
- direction === "rtl" ? "hawa-ml-8" : "hawa-mr-8",
117
- props.persistent ? "hawa-w-full" : "hawa-w-[calc(100% - 40px)]"
118
- )
119
- },
120
- props.text
121
- ), props.actions && /* @__PURE__ */ React.createElement("div", { className: "hawa-mt-2 hawa-flex hawa-flex-row hawa-gap-2" }, props.actions.map((act, index) => /* @__PURE__ */ React.createElement(
122
- Button,
123
- {
124
- key: index,
125
- variant: act.variant,
126
- onClick: act.onClick()
127
- },
128
- act.label
129
- ))))),
130
- !props.persistent && /* @__PURE__ */ React.createElement(
131
- "button",
132
- {
133
- type: "button",
134
- "data-dismiss-target": "#alert-default",
135
- "aria-label": "Close",
136
- className: cn(
137
- "hawa-absolute hawa-top-2 hawa-inline-flex hawa-h-9 hawa-w-9 hawa-items-center hawa-justify-center hawa-rounded-inner hawa-p-1.5 hawa-transition-all hover:hawa-text-gray-900",
138
- closeButtonStyle[severity],
139
- direction === "rtl" ? "hawa-left-2" : "hawa-right-2"
140
- ),
141
- onClick: () => {
142
- if (props.onAlertClosed) {
143
- props.onAlertClosed();
144
- }
145
- setClosed(true);
146
- setTimeout(() => {
147
- if (alertRef == null ? void 0 : alertRef.current) {
148
- alertRef == null ? void 0 : alertRef.current.removeChild(alertRef == null ? void 0 : alertRef.current.children[0]);
149
- }
150
- }, 200);
151
- }
152
- },
153
- /* @__PURE__ */ React.createElement("span", { className: "hawa-sr-only" }, "Close"),
154
- /* @__PURE__ */ React.createElement(
155
- "svg",
156
- {
157
- "aria-label": "Close Icon",
158
- "aria-hidden": "true",
159
- className: "hawa-h-5 hawa-w-5",
160
- fill: "currentColor",
161
- viewBox: "0 0 20 20"
162
- },
163
- /* @__PURE__ */ React.createElement(
164
- "path",
165
- {
166
- fillRule: "evenodd",
167
- d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",
168
- clipRule: "evenodd"
169
- }
170
- )
171
- )
172
- )
173
- ));
174
- };
175
-
176
- // elements/phoneInput/PhoneInput.tsx
177
- import React2, { useState as useState2, useRef as useRef2, useEffect as useEffect2 } from "react";
178
-
179
- // countries.ts
180
- var countries = [
181
- {
182
- country_label: "Saudi Arabia",
183
- code: "SA",
184
- unicode: "🇸🇦",
185
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/SA.svg",
186
- label: "+966"
187
- },
188
- {
189
- country_label: "United Arab Emirates",
190
- code: "AE",
191
- unicode: "🇦🇪",
192
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/AE.svg",
193
- label: "+971"
194
- },
195
- {
196
- country_label: "Bahrain",
197
- code: "BH",
198
- unicode: "🇧🇭",
199
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/BH.svg",
200
- label: "+973"
201
- },
202
- {
203
- country_label: "Kuwait",
204
- code: "KW",
205
- unicode: "🇰🇼",
206
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/KW.svg",
207
- label: "+965"
208
- },
209
- {
210
- country_label: "Qatar",
211
- code: "QA",
212
- unicode: "🇶🇦",
213
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/QA.svg",
214
- label: "+974"
215
- },
216
- {
217
- country_label: "Oman",
218
- code: "OM",
219
- unicode: "🇴🇲",
220
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/OM.svg",
221
- label: "+968"
222
- },
223
- {
224
- country_label: "Andorra",
225
- value: "Andorra",
226
- code: "AD",
227
- unicode: "🇦🇩",
228
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/AD.svg",
229
- label: "+376"
230
- },
231
- {
232
- country_label: "Afghanistan",
233
- code: "AF",
234
- unicode: "🇦🇫",
235
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/AF.svg",
236
- label: "+93"
237
- },
238
- {
239
- country_label: "Antigua & Barbuda",
240
- code: "AG",
241
- unicode: "🇦🇬",
242
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/AG.svg",
243
- label: "+1268"
244
- },
245
- {
246
- country_label: "Anguilla",
247
- code: "AI",
248
- unicode: "🇦🇮",
249
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/AI.svg",
250
- label: "+1264"
251
- },
252
- {
253
- country_label: "Albania",
254
- code: "AL",
255
- unicode: "🇦🇱",
256
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/AL.svg",
257
- label: "+355"
258
- },
259
- {
260
- country_label: "Armenia",
261
- code: "AM",
262
- unicode: "🇦🇲",
263
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/AM.svg",
264
- label: "+374"
265
- },
266
- {
267
- country_label: "Angola",
268
- code: "AO",
269
- unicode: "🇦🇴",
270
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/AO.svg",
271
- label: "+244"
272
- },
273
- {
274
- country_label: "Antarctica",
275
- code: "AQ",
276
- unicode: "🇦🇶",
277
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/AQ.svg",
278
- label: "+672"
279
- },
280
- {
281
- country_label: "Argentina",
282
- code: "AR",
283
- unicode: "🇦🇷",
284
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/AR.svg",
285
- label: "+54"
286
- },
287
- {
288
- country_label: "American Samoa",
289
- code: "AS",
290
- unicode: "🇦🇸",
291
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/AS.svg",
292
- label: "+1684"
293
- },
294
- {
295
- country_label: "Austria",
296
- code: "AT",
297
- unicode: "🇦🇹",
298
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/AT.svg",
299
- label: "+43"
300
- },
301
- {
302
- country_label: "Australia",
303
- code: "AU",
304
- unicode: "🇦🇺",
305
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/AU.svg",
306
- label: "+61"
307
- },
308
- {
309
- country_label: "Aruba",
310
- code: "AW",
311
- unicode: "🇦🇼",
312
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/AW.svg",
313
- label: "+297"
314
- },
315
- {
316
- country_label: "\xC5land Islands",
317
- code: "AX",
318
- unicode: "🇦🇽",
319
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/AX.svg",
320
- label: "+358"
321
- },
322
- {
323
- country_label: "Azerbaijan",
324
- code: "AZ",
325
- unicode: "🇦🇿",
326
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/AZ.svg",
327
- label: "+994"
328
- },
329
- {
330
- country_label: "Bosnia & Herzegovina",
331
- code: "BA",
332
- unicode: "🇧🇦",
333
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/BA.svg",
334
- label: "+387"
335
- },
336
- {
337
- country_label: "Barbados",
338
- code: "BB",
339
- unicode: "🇧🇧",
340
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/BB.svg",
341
- label: "+1246"
342
- },
343
- {
344
- country_label: "Bangladesh",
345
- code: "BD",
346
- unicode: "🇧🇩",
347
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/BD.svg",
348
- label: "+880"
349
- },
350
- {
351
- country_label: "Belgium",
352
- code: "BE",
353
- unicode: "🇧🇪",
354
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/BE.svg",
355
- label: "+32"
356
- },
357
- {
358
- country_label: "Burkina Faso",
359
- code: "BF",
360
- unicode: "🇧🇫",
361
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/BF.svg",
362
- label: "+226"
363
- },
364
- {
365
- country_label: "Bulgaria",
366
- code: "BG",
367
- unicode: "🇧🇬",
368
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/BG.svg",
369
- label: "+359"
370
- },
371
- {
372
- country_label: "Burundi",
373
- code: "BI",
374
- unicode: "🇧🇮",
375
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/BI.svg",
376
- label: "+257"
377
- },
378
- {
379
- country_label: "Benin",
380
- code: "BJ",
381
- unicode: "🇧🇯",
382
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/BJ.svg",
383
- label: "+229"
384
- },
385
- {
386
- country_label: "St. Barth\xE9lemy",
387
- code: "BL",
388
- unicode: "🇧🇱",
389
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/BL.svg",
390
- label: "+590"
391
- },
392
- {
393
- country_label: "Bermuda",
394
- code: "BM",
395
- unicode: "🇧🇲",
396
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/BM.svg",
397
- label: "+1441"
398
- },
399
- {
400
- country_label: "Brunei",
401
- code: "BN",
402
- unicode: "🇧🇳",
403
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/BN.svg",
404
- label: "+673"
405
- },
406
- {
407
- country_label: "Bolivia",
408
- code: "BO",
409
- unicode: "🇧🇴",
410
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/BO.svg",
411
- label: "+591"
412
- },
413
- {
414
- country_label: "Brazil",
415
- code: "BR",
416
- unicode: "🇧🇷",
417
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/BR.svg",
418
- label: "+55"
419
- },
420
- {
421
- country_label: "Bahamas",
422
- code: "BS",
423
- unicode: "🇧🇸",
424
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/BS.svg",
425
- label: "+1242"
426
- },
427
- {
428
- country_label: "Bhutan",
429
- code: "BT",
430
- unicode: "🇧🇹",
431
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/BT.svg",
432
- label: "+975"
433
- },
434
- {
435
- country_label: "Botswana",
436
- code: "BW",
437
- unicode: "🇧🇼",
438
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/BW.svg",
439
- label: "+267"
440
- },
441
- {
442
- country_label: "Belarus",
443
- code: "BY",
444
- unicode: "🇧🇾",
445
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/BY.svg",
446
- label: "+375"
447
- },
448
- {
449
- country_label: "Belize",
450
- code: "BZ",
451
- unicode: "🇧🇿",
452
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/BZ.svg",
453
- label: "+501"
454
- },
455
- {
456
- country_label: "Canada",
457
- code: "CA",
458
- unicode: "🇨🇦",
459
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/CA.svg",
460
- label: "+1"
461
- },
462
- {
463
- country_label: "Cocos (Keeling) Islands",
464
- code: "CC",
465
- unicode: "🇨🇨",
466
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/CC.svg",
467
- label: "+61"
468
- },
469
- {
470
- country_label: "Congo - Kinshasa",
471
- code: "CD",
472
- unicode: "🇨🇩",
473
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/CD.svg",
474
- label: "+243"
475
- },
476
- {
477
- country_label: "Central African Republic",
478
- code: "CF",
479
- unicode: "🇨🇫",
480
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/CF.svg",
481
- label: "+236"
482
- },
483
- {
484
- country_label: "Congo - Brazzaville",
485
- code: "CG",
486
- unicode: "🇨🇬",
487
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/CG.svg",
488
- label: "+242"
489
- },
490
- {
491
- country_label: "Switzerland",
492
- code: "CH",
493
- unicode: "🇨🇭",
494
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/CH.svg",
495
- label: "+41"
496
- },
497
- {
498
- country_label: "C\xF4te d\u2019Ivoire",
499
- code: "CI",
500
- unicode: "🇨🇮",
501
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/CI.svg",
502
- label: "+225"
503
- },
504
- {
505
- country_label: "Cook Islands",
506
- code: "CK",
507
- unicode: "🇨🇰",
508
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/CK.svg",
509
- label: "+682"
510
- },
511
- {
512
- country_label: "Chile",
513
- code: "CL",
514
- unicode: "🇨🇱",
515
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/CL.svg",
516
- label: "+56"
517
- },
518
- {
519
- country_label: "Cameroon",
520
- code: "CM",
521
- unicode: "🇨🇲",
522
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/CM.svg",
523
- label: "+237"
524
- },
525
- {
526
- country_label: "China",
527
- code: "CN",
528
- unicode: "🇨🇳",
529
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/CN.svg",
530
- label: "+86"
531
- },
532
- {
533
- country_label: "Colombia",
534
- code: "CO",
535
- unicode: "🇨🇴",
536
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/CO.svg",
537
- label: "+57"
538
- },
539
- {
540
- country_label: "Costa Rica",
541
- code: "CR",
542
- unicode: "🇨🇷",
543
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/CR.svg",
544
- label: "+506"
545
- },
546
- {
547
- country_label: "Cuba",
548
- code: "CU",
549
- unicode: "🇨🇺",
550
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/CU.svg",
551
- label: "+53"
552
- },
553
- {
554
- country_label: "Cape Verde",
555
- code: "CV",
556
- unicode: "🇨🇻",
557
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/CV.svg",
558
- label: "+238"
559
- },
560
- {
561
- country_label: "Christmas Island",
562
- code: "CX",
563
- unicode: "🇨🇽",
564
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/CX.svg",
565
- label: "+61"
566
- },
567
- {
568
- country_label: "Cyprus",
569
- code: "CY",
570
- unicode: "🇨🇾",
571
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/CY.svg",
572
- label: "+357"
573
- },
574
- {
575
- country_label: "Czechia",
576
- code: "CZ",
577
- unicode: "🇨🇿",
578
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/CZ.svg",
579
- label: "+420"
580
- },
581
- {
582
- country_label: "Germany",
583
- code: "DE",
584
- unicode: "🇩🇪",
585
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/DE.svg",
586
- label: "+49"
587
- },
588
- {
589
- country_label: "Djibouti",
590
- code: "DJ",
591
- unicode: "🇩🇯",
592
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/DJ.svg",
593
- label: "+253"
594
- },
595
- {
596
- country_label: "Denmark",
597
- code: "DK",
598
- unicode: "🇩🇰",
599
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/DK.svg",
600
- label: "+45"
601
- },
602
- {
603
- country_label: "Dominica",
604
- code: "DM",
605
- unicode: "🇩🇲",
606
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/DM.svg",
607
- label: "+1767"
608
- },
609
- {
610
- country_label: "Dominican Republic",
611
- code: "DO",
612
- unicode: "🇩🇴",
613
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/DO.svg",
614
- label: "+1849"
615
- },
616
- {
617
- country_label: "Algeria",
618
- code: "DZ",
619
- unicode: "🇩🇿",
620
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/DZ.svg",
621
- label: "+213"
622
- },
623
- {
624
- country_label: "Ecuador",
625
- code: "EC",
626
- unicode: "🇪🇨",
627
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/EC.svg",
628
- label: "+593"
629
- },
630
- {
631
- country_label: "Estonia",
632
- code: "EE",
633
- unicode: "🇪🇪",
634
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/EE.svg",
635
- label: "+372"
636
- },
637
- {
638
- country_label: "Egypt",
639
- code: "EG",
640
- unicode: "🇪🇬",
641
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/EG.svg",
642
- label: "+20"
643
- },
644
- {
645
- country_label: "Eritrea",
646
- code: "ER",
647
- unicode: "🇪🇷",
648
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/ER.svg",
649
- label: "+291"
650
- },
651
- {
652
- country_label: "Spain",
653
- code: "ES",
654
- unicode: "🇪🇸",
655
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/ES.svg",
656
- label: "+34"
657
- },
658
- {
659
- country_label: "Ethiopia",
660
- code: "ET",
661
- unicode: "🇪🇹",
662
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/ET.svg",
663
- label: "+251"
664
- },
665
- {
666
- country_label: "Finland",
667
- code: "FI",
668
- unicode: "🇫🇮",
669
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/FI.svg",
670
- label: "+358"
671
- },
672
- {
673
- country_label: "Fiji",
674
- code: "FJ",
675
- unicode: "🇫🇯",
676
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/FJ.svg",
677
- label: "+679"
678
- },
679
- {
680
- country_label: "Falkland Islands",
681
- code: "FK",
682
- unicode: "🇫🇰",
683
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/FK.svg",
684
- label: "+500"
685
- },
686
- {
687
- country_label: "Micronesia",
688
- code: "FM",
689
- unicode: "🇫🇲",
690
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/FM.svg",
691
- label: "+691"
692
- },
693
- {
694
- country_label: "Faroe Islands",
695
- code: "FO",
696
- unicode: "🇫🇴",
697
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/FO.svg",
698
- label: "+298"
699
- },
700
- {
701
- country_label: "France",
702
- code: "FR",
703
- unicode: "🇫🇷",
704
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/FR.svg",
705
- label: "+33"
706
- },
707
- {
708
- country_label: "Gabon",
709
- code: "GA",
710
- unicode: "🇬🇦",
711
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/GA.svg",
712
- label: "+241"
713
- },
714
- {
715
- country_label: "United Kingdom",
716
- code: "GB",
717
- unicode: "🇬🇧",
718
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/GB.svg",
719
- label: "+44"
720
- },
721
- {
722
- country_label: "Grenada",
723
- code: "GD",
724
- unicode: "🇬🇩",
725
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/GD.svg",
726
- label: "+1473"
727
- },
728
- {
729
- country_label: "Georgia",
730
- code: "GE",
731
- unicode: "🇬🇪",
732
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/GE.svg",
733
- label: "+995"
734
- },
735
- {
736
- country_label: "French Guiana",
737
- code: "GF",
738
- unicode: "🇬🇫",
739
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/GF.svg",
740
- label: "+594"
741
- },
742
- {
743
- country_label: "Guernsey",
744
- code: "GG",
745
- unicode: "🇬🇬",
746
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/GG.svg",
747
- label: "+44"
748
- },
749
- {
750
- country_label: "Ghana",
751
- code: "GH",
752
- unicode: "🇬🇭",
753
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/GH.svg",
754
- label: "+233"
755
- },
756
- {
757
- country_label: "Gibraltar",
758
- code: "GI",
759
- unicode: "🇬🇮",
760
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/GI.svg",
761
- label: "+350"
762
- },
763
- {
764
- country_label: "Greenland",
765
- code: "GL",
766
- unicode: "🇬🇱",
767
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/GL.svg",
768
- label: "+299"
769
- },
770
- {
771
- country_label: "Gambia",
772
- code: "GM",
773
- unicode: "🇬🇲",
774
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/GM.svg",
775
- label: "+220"
776
- },
777
- {
778
- country_label: "Guinea",
779
- code: "GN",
780
- unicode: "🇬🇳",
781
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/GN.svg",
782
- label: "+224"
783
- },
784
- {
785
- country_label: "Guadeloupe",
786
- code: "GP",
787
- unicode: "🇬🇵",
788
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/GP.svg",
789
- label: "+590"
790
- },
791
- {
792
- country_label: "Equatorial Guinea",
793
- code: "GQ",
794
- unicode: "🇬🇶",
795
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/GQ.svg",
796
- label: "+240"
797
- },
798
- {
799
- country_label: "Greece",
800
- code: "GR",
801
- unicode: "🇬🇷",
802
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/GR.svg",
803
- label: "+30"
804
- },
805
- {
806
- country_label: "South Georgia & South Sandwich Islands",
807
- code: "GS",
808
- unicode: "🇬🇸",
809
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/GS.svg",
810
- label: "+500"
811
- },
812
- {
813
- country_label: "Guatemala",
814
- code: "GT",
815
- unicode: "🇬🇹",
816
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/GT.svg",
817
- label: "+502"
818
- },
819
- {
820
- country_label: "Guam",
821
- code: "GU",
822
- unicode: "🇬🇺",
823
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/GU.svg",
824
- label: "+1671"
825
- },
826
- {
827
- country_label: "Guinea-Bissau",
828
- code: "GW",
829
- unicode: "🇬🇼",
830
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/GW.svg",
831
- label: "+245"
832
- },
833
- {
834
- country_label: "Guyana",
835
- code: "GY",
836
- unicode: "🇬🇾",
837
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/GY.svg",
838
- label: "+595"
839
- },
840
- {
841
- country_label: "Hong Kong SAR China",
842
- code: "HK",
843
- unicode: "🇭🇰",
844
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/HK.svg",
845
- label: "+852"
846
- },
847
- {
848
- country_label: "Honduras",
849
- code: "HN",
850
- unicode: "🇭🇳",
851
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/HN.svg",
852
- label: "+504"
853
- },
854
- {
855
- country_label: "Croatia",
856
- code: "HR",
857
- unicode: "🇭🇷",
858
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/HR.svg",
859
- label: "+385"
860
- },
861
- {
862
- country_label: "Haiti",
863
- code: "HT",
864
- unicode: "🇭🇹",
865
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/HT.svg",
866
- label: "+509"
867
- },
868
- {
869
- country_label: "Hungary",
870
- code: "HU",
871
- unicode: "🇭🇺",
872
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/HU.svg",
873
- label: "+36"
874
- },
875
- {
876
- country_label: "Indonesia",
877
- code: "ID",
878
- unicode: "🇮🇩",
879
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/ID.svg",
880
- label: "+62"
881
- },
882
- {
883
- country_label: "Ireland",
884
- code: "IE",
885
- unicode: "🇮🇪",
886
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/IE.svg",
887
- label: "+353"
888
- },
889
- {
890
- country_label: "Israel",
891
- code: "IL",
892
- unicode: "🇮🇱",
893
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/IL.svg",
894
- label: "+972"
895
- },
896
- {
897
- country_label: "Isle of Man",
898
- code: "IM",
899
- unicode: "🇮🇲",
900
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/IM.svg",
901
- label: "+44"
902
- },
903
- {
904
- country_label: "India",
905
- code: "IN",
906
- unicode: "🇮🇳",
907
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/IN.svg",
908
- label: "+91"
909
- },
910
- {
911
- country_label: "British Indian Ocean Territory",
912
- code: "IO",
913
- unicode: "🇮🇴",
914
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/IO.svg",
915
- label: "+246"
916
- },
917
- {
918
- country_label: "Iraq",
919
- code: "IQ",
920
- unicode: "🇮🇶",
921
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/IQ.svg",
922
- label: "+964"
923
- },
924
- {
925
- country_label: "Iran",
926
- code: "IR",
927
- unicode: "🇮🇷",
928
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/IR.svg",
929
- label: "+98"
930
- },
931
- {
932
- country_label: "Iceland",
933
- code: "IS",
934
- unicode: "🇮🇸",
935
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/IS.svg",
936
- label: "+354"
937
- },
938
- {
939
- country_label: "Italy",
940
- code: "IT",
941
- unicode: "🇮🇹",
942
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/IT.svg",
943
- label: "+39"
944
- },
945
- {
946
- country_label: "Jersey",
947
- code: "JE",
948
- unicode: "🇯🇪",
949
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/JE.svg",
950
- label: "+44"
951
- },
952
- {
953
- country_label: "Jamaica",
954
- code: "JM",
955
- unicode: "🇯🇲",
956
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/JM.svg",
957
- label: "+1876"
958
- },
959
- {
960
- country_label: "Jordan",
961
- code: "JO",
962
- unicode: "🇯🇴",
963
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/JO.svg",
964
- label: "+962"
965
- },
966
- {
967
- country_label: "Japan",
968
- code: "JP",
969
- unicode: "🇯🇵",
970
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/JP.svg",
971
- label: "+81"
972
- },
973
- {
974
- country_label: "Kenya",
975
- code: "KE",
976
- unicode: "🇰🇪",
977
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/KE.svg",
978
- label: "+254"
979
- },
980
- {
981
- country_label: "Kyrgyzstan",
982
- code: "KG",
983
- unicode: "🇰🇬",
984
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/KG.svg",
985
- label: "+996"
986
- },
987
- {
988
- country_label: "Cambodia",
989
- code: "KH",
990
- unicode: "🇰🇭",
991
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/KH.svg",
992
- label: "+855"
993
- },
994
- {
995
- country_label: "Kiribati",
996
- code: "KI",
997
- unicode: "🇰🇮",
998
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/KI.svg",
999
- label: "+686"
1000
- },
1001
- {
1002
- country_label: "Comoros",
1003
- code: "KM",
1004
- unicode: "🇰🇲",
1005
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/KM.svg",
1006
- label: "+269"
1007
- },
1008
- {
1009
- country_label: "St. Kitts & Nevis",
1010
- code: "KN",
1011
- unicode: "🇰🇳",
1012
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/KN.svg",
1013
- label: "+1869"
1014
- },
1015
- {
1016
- country_label: "North Korea",
1017
- code: "KP",
1018
- unicode: "🇰🇵",
1019
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/KP.svg",
1020
- label: "+850"
1021
- },
1022
- {
1023
- country_label: "South Korea",
1024
- code: "KR",
1025
- unicode: "🇰🇷",
1026
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/KR.svg",
1027
- label: "+82"
1028
- },
1029
- {
1030
- country_label: "Cayman Islands",
1031
- code: "KY",
1032
- unicode: "🇰🇾",
1033
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/KY.svg",
1034
- label: "+ 345"
1035
- },
1036
- {
1037
- country_label: "Kazakhstan",
1038
- code: "KZ",
1039
- unicode: "🇰🇿",
1040
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/KZ.svg",
1041
- label: "+77"
1042
- },
1043
- {
1044
- country_label: "Laos",
1045
- code: "LA",
1046
- unicode: "🇱🇦",
1047
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/LA.svg",
1048
- label: "+856"
1049
- },
1050
- {
1051
- country_label: "Lebanon",
1052
- code: "LB",
1053
- unicode: "🇱🇧",
1054
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/LB.svg",
1055
- label: "+961"
1056
- },
1057
- {
1058
- country_label: "St. Lucia",
1059
- code: "LC",
1060
- unicode: "🇱🇨",
1061
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/LC.svg",
1062
- label: "+1758"
1063
- },
1064
- {
1065
- country_label: "Liechtenstein",
1066
- code: "LI",
1067
- unicode: "🇱🇮",
1068
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/LI.svg",
1069
- label: "+423"
1070
- },
1071
- {
1072
- country_label: "Sri Lanka",
1073
- code: "LK",
1074
- unicode: "🇱🇰",
1075
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/LK.svg",
1076
- label: "+94"
1077
- },
1078
- {
1079
- country_label: "Liberia",
1080
- code: "LR",
1081
- unicode: "🇱🇷",
1082
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/LR.svg",
1083
- label: "+231"
1084
- },
1085
- {
1086
- country_label: "Lesotho",
1087
- code: "LS",
1088
- unicode: "🇱🇸",
1089
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/LS.svg",
1090
- label: "+266"
1091
- },
1092
- {
1093
- country_label: "Lithuania",
1094
- code: "LT",
1095
- unicode: "🇱🇹",
1096
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/LT.svg",
1097
- label: "+370"
1098
- },
1099
- {
1100
- country_label: "Luxembourg",
1101
- code: "LU",
1102
- unicode: "🇱🇺",
1103
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/LU.svg",
1104
- label: "+352"
1105
- },
1106
- {
1107
- country_label: "Latvia",
1108
- code: "LV",
1109
- unicode: "🇱🇻",
1110
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/LV.svg",
1111
- label: "+371"
1112
- },
1113
- {
1114
- country_label: "Libya",
1115
- code: "LY",
1116
- unicode: "🇱🇾",
1117
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/LY.svg",
1118
- label: "+218"
1119
- },
1120
- {
1121
- country_label: "Morocco",
1122
- code: "MA",
1123
- unicode: "🇲🇦",
1124
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/MA.svg",
1125
- label: "+212"
1126
- },
1127
- {
1128
- country_label: "Monaco",
1129
- code: "MC",
1130
- unicode: "🇲🇨",
1131
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/MC.svg",
1132
- label: "+377"
1133
- },
1134
- {
1135
- country_label: "Moldova",
1136
- code: "MD",
1137
- unicode: "🇲🇩",
1138
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/MD.svg",
1139
- label: "+373"
1140
- },
1141
- {
1142
- country_label: "Montenegro",
1143
- code: "ME",
1144
- unicode: "🇲🇪",
1145
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/ME.svg",
1146
- label: "+382"
1147
- },
1148
- {
1149
- country_label: "St. Martin",
1150
- code: "MF",
1151
- unicode: "🇲🇫",
1152
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/MF.svg",
1153
- label: "+590"
1154
- },
1155
- {
1156
- country_label: "Madagascar",
1157
- code: "MG",
1158
- unicode: "🇲🇬",
1159
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/MG.svg",
1160
- label: "+261"
1161
- },
1162
- {
1163
- country_label: "Marshall Islands",
1164
- code: "MH",
1165
- unicode: "🇲🇭",
1166
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/MH.svg",
1167
- label: "+692"
1168
- },
1169
- {
1170
- country_label: "North Macedonia",
1171
- code: "MK",
1172
- unicode: "🇲🇰",
1173
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/MK.svg",
1174
- label: "+389"
1175
- },
1176
- {
1177
- country_label: "Mali",
1178
- code: "ML",
1179
- unicode: "🇲🇱",
1180
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/ML.svg",
1181
- label: "+223"
1182
- },
1183
- {
1184
- country_label: "Myanmar (Burma)",
1185
- code: "MM",
1186
- unicode: "🇲🇲",
1187
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/MM.svg",
1188
- label: "+95"
1189
- },
1190
- {
1191
- country_label: "Mongolia",
1192
- code: "MN",
1193
- unicode: "🇲🇳",
1194
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/MN.svg",
1195
- label: "+976"
1196
- },
1197
- {
1198
- country_label: "Macao SAR China",
1199
- code: "MO",
1200
- unicode: "🇲🇴",
1201
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/MO.svg",
1202
- label: "+853"
1203
- },
1204
- {
1205
- country_label: "Northern Mariana Islands",
1206
- code: "MP",
1207
- unicode: "🇲🇵",
1208
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/MP.svg",
1209
- label: "+1670"
1210
- },
1211
- {
1212
- country_label: "Martinique",
1213
- code: "MQ",
1214
- unicode: "🇲🇶",
1215
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/MQ.svg",
1216
- label: "+596"
1217
- },
1218
- {
1219
- country_label: "Mauritania",
1220
- code: "MR",
1221
- unicode: "🇲🇷",
1222
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/MR.svg",
1223
- label: "+222"
1224
- },
1225
- {
1226
- country_label: "Montserrat",
1227
- code: "MS",
1228
- unicode: "🇲🇸",
1229
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/MS.svg",
1230
- label: "+1664"
1231
- },
1232
- {
1233
- country_label: "Malta",
1234
- code: "MT",
1235
- unicode: "🇲🇹",
1236
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/MT.svg",
1237
- label: "+356"
1238
- },
1239
- {
1240
- country_label: "Mauritius",
1241
- code: "MU",
1242
- unicode: "🇲🇺",
1243
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/MU.svg",
1244
- label: "+230"
1245
- },
1246
- {
1247
- country_label: "Maldives",
1248
- code: "MV",
1249
- unicode: "🇲🇻",
1250
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/MV.svg",
1251
- label: "+960"
1252
- },
1253
- {
1254
- country_label: "Malawi",
1255
- code: "MW",
1256
- unicode: "🇲🇼",
1257
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/MW.svg",
1258
- label: "+265"
1259
- },
1260
- {
1261
- country_label: "Mexico",
1262
- code: "MX",
1263
- unicode: "🇲🇽",
1264
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/MX.svg",
1265
- label: "+52"
1266
- },
1267
- {
1268
- country_label: "Malaysia",
1269
- code: "MY",
1270
- unicode: "🇲🇾",
1271
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/MY.svg",
1272
- label: "+60"
1273
- },
1274
- {
1275
- country_label: "Mozambique",
1276
- code: "MZ",
1277
- unicode: "🇲🇿",
1278
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/MZ.svg",
1279
- label: "+258"
1280
- },
1281
- {
1282
- country_label: "Namibia",
1283
- code: "NA",
1284
- unicode: "🇳🇦",
1285
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/NA.svg",
1286
- label: "+264"
1287
- },
1288
- {
1289
- country_label: "New Caledonia",
1290
- code: "NC",
1291
- unicode: "🇳🇨",
1292
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/NC.svg",
1293
- label: "+687"
1294
- },
1295
- {
1296
- country_label: "Niger",
1297
- code: "NE",
1298
- unicode: "🇳🇪",
1299
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/NE.svg",
1300
- label: "+227"
1301
- },
1302
- {
1303
- country_label: "Norfolk Island",
1304
- code: "NF",
1305
- unicode: "🇳🇫",
1306
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/NF.svg",
1307
- label: "+672"
1308
- },
1309
- {
1310
- country_label: "Nigeria",
1311
- code: "NG",
1312
- unicode: "🇳🇬",
1313
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/NG.svg",
1314
- label: "+234"
1315
- },
1316
- {
1317
- country_label: "Nicaragua",
1318
- code: "NI",
1319
- unicode: "🇳🇮",
1320
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/NI.svg",
1321
- label: "+505"
1322
- },
1323
- {
1324
- country_label: "Netherlands",
1325
- code: "NL",
1326
- unicode: "🇳🇱",
1327
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/NL.svg",
1328
- label: "+31"
1329
- },
1330
- {
1331
- country_label: "Norway",
1332
- code: "NO",
1333
- unicode: "🇳🇴",
1334
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/NO.svg",
1335
- label: "+47"
1336
- },
1337
- {
1338
- country_label: "Nepal",
1339
- code: "NP",
1340
- unicode: "🇳🇵",
1341
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/NP.svg",
1342
- label: "+977"
1343
- },
1344
- {
1345
- country_label: "Nauru",
1346
- code: "NR",
1347
- unicode: "🇳🇷",
1348
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/NR.svg",
1349
- label: "+674"
1350
- },
1351
- {
1352
- country_label: "Niue",
1353
- code: "NU",
1354
- unicode: "🇳🇺",
1355
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/NU.svg",
1356
- label: "+683"
1357
- },
1358
- {
1359
- country_label: "New Zealand",
1360
- code: "NZ",
1361
- unicode: "🇳🇿",
1362
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/NZ.svg",
1363
- label: "+64"
1364
- },
1365
- {
1366
- country_label: "Panama",
1367
- code: "PA",
1368
- unicode: "🇵🇦",
1369
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/PA.svg",
1370
- label: "+507"
1371
- },
1372
- {
1373
- country_label: "Peru",
1374
- code: "PE",
1375
- unicode: "🇵🇪",
1376
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/PE.svg",
1377
- label: "+51"
1378
- },
1379
- {
1380
- country_label: "French Polynesia",
1381
- code: "PF",
1382
- unicode: "🇵🇫",
1383
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/PF.svg",
1384
- label: "+689"
1385
- },
1386
- {
1387
- country_label: "Papua New Guinea",
1388
- code: "PG",
1389
- unicode: "🇵🇬",
1390
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/PG.svg",
1391
- label: "+675"
1392
- },
1393
- {
1394
- country_label: "Philippines",
1395
- code: "PH",
1396
- unicode: "🇵🇭",
1397
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/PH.svg",
1398
- label: "+63"
1399
- },
1400
- {
1401
- country_label: "Pakistan",
1402
- code: "PK",
1403
- unicode: "🇵🇰",
1404
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/PK.svg",
1405
- label: "+92"
1406
- },
1407
- {
1408
- country_label: "Poland",
1409
- code: "PL",
1410
- unicode: "🇵🇱",
1411
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/PL.svg",
1412
- label: "+48"
1413
- },
1414
- {
1415
- country_label: "St. Pierre & Miquelon",
1416
- code: "PM",
1417
- unicode: "🇵🇲",
1418
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/PM.svg",
1419
- label: "+508"
1420
- },
1421
- {
1422
- country_label: "Pitcairn Islands",
1423
- code: "PN",
1424
- unicode: "🇵🇳",
1425
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/PN.svg",
1426
- label: "+872"
1427
- },
1428
- {
1429
- country_label: "Puerto Rico",
1430
- code: "PR",
1431
- unicode: "🇵🇷",
1432
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/PR.svg",
1433
- label: "+1939"
1434
- },
1435
- {
1436
- country_label: "Palestinian Territories",
1437
- code: "PS",
1438
- unicode: "🇵🇸",
1439
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/PS.svg",
1440
- label: "+970"
1441
- },
1442
- {
1443
- country_label: "Portugal",
1444
- code: "PT",
1445
- unicode: "🇵🇹",
1446
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/PT.svg",
1447
- label: "+351"
1448
- },
1449
- {
1450
- country_label: "Palau",
1451
- code: "PW",
1452
- unicode: "🇵🇼",
1453
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/PW.svg",
1454
- label: "+680"
1455
- },
1456
- {
1457
- country_label: "Paraguay",
1458
- code: "PY",
1459
- unicode: "🇵🇾",
1460
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/PY.svg",
1461
- label: "+595"
1462
- },
1463
- {
1464
- country_label: "R\xE9union",
1465
- code: "RE",
1466
- unicode: "🇷🇪",
1467
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/RE.svg",
1468
- label: "+262"
1469
- },
1470
- {
1471
- country_label: "Romania",
1472
- code: "RO",
1473
- unicode: "🇷🇴",
1474
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/RO.svg",
1475
- label: "+40"
1476
- },
1477
- {
1478
- country_label: "Serbia",
1479
- code: "RS",
1480
- unicode: "🇷🇸",
1481
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/RS.svg",
1482
- label: "+381"
1483
- },
1484
- {
1485
- country_label: "Russia",
1486
- code: "RU",
1487
- unicode: "🇷🇺",
1488
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/RU.svg",
1489
- label: "+7"
1490
- },
1491
- {
1492
- country_label: "Rwanda",
1493
- code: "RW",
1494
- unicode: "🇷🇼",
1495
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/RW.svg",
1496
- label: "+250"
1497
- },
1498
- {
1499
- country_label: "Solomon Islands",
1500
- code: "SB",
1501
- unicode: "🇸🇧",
1502
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/SB.svg",
1503
- label: "+677"
1504
- },
1505
- {
1506
- country_label: "Seychelles",
1507
- code: "SC",
1508
- unicode: "🇸🇨",
1509
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/SC.svg",
1510
- label: "+248"
1511
- },
1512
- {
1513
- country_label: "Sudan",
1514
- code: "SD",
1515
- unicode: "🇸🇩",
1516
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/SD.svg",
1517
- label: "+249"
1518
- },
1519
- {
1520
- country_label: "Sweden",
1521
- code: "SE",
1522
- unicode: "🇸🇪",
1523
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/SE.svg",
1524
- label: "+46"
1525
- },
1526
- {
1527
- country_label: "Singapore",
1528
- code: "SG",
1529
- unicode: "🇸🇬",
1530
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/SG.svg",
1531
- label: "+65"
1532
- },
1533
- {
1534
- country_label: "St. Helena",
1535
- code: "SH",
1536
- unicode: "🇸🇭",
1537
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/SH.svg",
1538
- label: "+290"
1539
- },
1540
- {
1541
- country_label: "Slovenia",
1542
- code: "SI",
1543
- unicode: "🇸🇮",
1544
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/SI.svg",
1545
- label: "+386"
1546
- },
1547
- {
1548
- country_label: "Svalbard & Jan Mayen",
1549
- code: "SJ",
1550
- unicode: "🇸🇯",
1551
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/SJ.svg",
1552
- label: "+47"
1553
- },
1554
- {
1555
- country_label: "Slovakia",
1556
- code: "SK",
1557
- unicode: "🇸🇰",
1558
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/SK.svg",
1559
- label: "+421"
1560
- },
1561
- {
1562
- country_label: "Sierra Leone",
1563
- code: "SL",
1564
- unicode: "🇸🇱",
1565
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/SL.svg",
1566
- label: "+232"
1567
- },
1568
- {
1569
- country_label: "San Marino",
1570
- code: "SM",
1571
- unicode: "🇸🇲",
1572
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/SM.svg",
1573
- label: "+378"
1574
- },
1575
- {
1576
- country_label: "Senegal",
1577
- code: "SN",
1578
- unicode: "🇸🇳",
1579
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/SN.svg",
1580
- label: "+221"
1581
- },
1582
- {
1583
- country_label: "Somalia",
1584
- code: "SO",
1585
- unicode: "🇸🇴",
1586
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/SO.svg",
1587
- label: "+252"
1588
- },
1589
- {
1590
- country_label: "Suriname",
1591
- code: "SR",
1592
- unicode: "🇸🇷",
1593
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/SR.svg",
1594
- label: "+597"
1595
- },
1596
- {
1597
- country_label: "South Sudan",
1598
- code: "SS",
1599
- unicode: "🇸🇸",
1600
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/SS.svg",
1601
- label: "+211"
1602
- },
1603
- {
1604
- country_label: "S\xE3o Tom\xE9 & Pr\xEDncipe",
1605
- code: "ST",
1606
- unicode: "🇸🇹",
1607
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/ST.svg",
1608
- label: "+239"
1609
- },
1610
- {
1611
- country_label: "El Salvador",
1612
- code: "SV",
1613
- unicode: "🇸🇻",
1614
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/SV.svg",
1615
- label: "+503"
1616
- },
1617
- {
1618
- country_label: "Syria",
1619
- code: "SY",
1620
- unicode: "🇸🇾",
1621
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/SY.svg",
1622
- label: "+963"
1623
- },
1624
- {
1625
- country_label: "Eswatini",
1626
- code: "SZ",
1627
- unicode: "🇸🇿",
1628
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/SZ.svg",
1629
- label: "+268"
1630
- },
1631
- {
1632
- country_label: "Turks & Caicos Islands",
1633
- code: "TC",
1634
- unicode: "🇹🇨",
1635
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/TC.svg",
1636
- label: "+1649"
1637
- },
1638
- {
1639
- country_label: "Chad",
1640
- code: "TD",
1641
- unicode: "🇹🇩",
1642
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/TD.svg",
1643
- label: "+235"
1644
- },
1645
- {
1646
- country_label: "Togo",
1647
- code: "TG",
1648
- unicode: "🇹🇬",
1649
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/TG.svg",
1650
- label: "+228"
1651
- },
1652
- {
1653
- country_label: "Thailand",
1654
- code: "TH",
1655
- unicode: "🇹🇭",
1656
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/TH.svg",
1657
- label: "+66"
1658
- },
1659
- {
1660
- country_label: "Tajikistan",
1661
- code: "TJ",
1662
- unicode: "🇹🇯",
1663
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/TJ.svg",
1664
- label: "+992"
1665
- },
1666
- {
1667
- country_label: "Tokelau",
1668
- code: "TK",
1669
- unicode: "🇹🇰",
1670
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/TK.svg",
1671
- label: "+690"
1672
- },
1673
- {
1674
- country_label: "Timor-Leste",
1675
- code: "TL",
1676
- unicode: "🇹🇱",
1677
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/TL.svg",
1678
- label: "+670"
1679
- },
1680
- {
1681
- country_label: "Turkmenistan",
1682
- code: "TM",
1683
- unicode: "🇹🇲",
1684
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/TM.svg",
1685
- label: "+993"
1686
- },
1687
- {
1688
- country_label: "Tunisia",
1689
- code: "TN",
1690
- unicode: "🇹🇳",
1691
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/TN.svg",
1692
- label: "+216"
1693
- },
1694
- {
1695
- country_label: "Tonga",
1696
- code: "TO",
1697
- unicode: "🇹🇴",
1698
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/TO.svg",
1699
- label: "+676"
1700
- },
1701
- {
1702
- country_label: "Turkey",
1703
- code: "TR",
1704
- unicode: "🇹🇷",
1705
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/TR.svg",
1706
- label: "+90"
1707
- },
1708
- {
1709
- country_label: "Trinidad & Tobago",
1710
- code: "TT",
1711
- unicode: "🇹🇹",
1712
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/TT.svg",
1713
- label: "+1868"
1714
- },
1715
- {
1716
- country_label: "Tuvalu",
1717
- code: "TV",
1718
- unicode: "🇹🇻",
1719
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/TV.svg",
1720
- label: "+688"
1721
- },
1722
- {
1723
- country_label: "Taiwan",
1724
- code: "TW",
1725
- unicode: "🇹🇼",
1726
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/TW.svg",
1727
- label: "+886"
1728
- },
1729
- {
1730
- country_label: "Tanzania",
1731
- code: "TZ",
1732
- unicode: "🇹🇿",
1733
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/TZ.svg",
1734
- label: "+255"
1735
- },
1736
- {
1737
- country_label: "Ukraine",
1738
- code: "UA",
1739
- unicode: "🇺🇦",
1740
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/UA.svg",
1741
- label: "+380"
1742
- },
1743
- {
1744
- country_label: "Uganda",
1745
- code: "UG",
1746
- unicode: "🇺🇬",
1747
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/UG.svg",
1748
- label: "+256"
1749
- },
1750
- {
1751
- country_label: "United States",
1752
- code: "US",
1753
- unicode: "🇺🇸",
1754
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/US.svg",
1755
- label: "+1"
1756
- },
1757
- {
1758
- country_label: "Uruguay",
1759
- code: "UY",
1760
- unicode: "🇺🇾",
1761
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/UY.svg",
1762
- label: "+598"
1763
- },
1764
- {
1765
- country_label: "Uzbekistan",
1766
- code: "UZ",
1767
- unicode: "🇺🇿",
1768
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/UZ.svg",
1769
- label: "+998"
1770
- },
1771
- {
1772
- country_label: "Vatican City",
1773
- code: "VA",
1774
- unicode: "🇻🇦",
1775
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/VA.svg",
1776
- label: "+379"
1777
- },
1778
- {
1779
- country_label: "St. Vincent & Grenadines",
1780
- code: "VC",
1781
- unicode: "🇻🇨",
1782
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/VC.svg",
1783
- label: "+1784"
1784
- },
1785
- {
1786
- country_label: "Venezuela",
1787
- code: "VE",
1788
- unicode: "🇻🇪",
1789
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/VE.svg",
1790
- label: "+58"
1791
- },
1792
- {
1793
- country_label: "British Virgin Islands",
1794
- code: "VG",
1795
- unicode: "🇻🇬",
1796
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/VG.svg",
1797
- label: "+1284"
1798
- },
1799
- {
1800
- country_label: "U.S. Virgin Islands",
1801
- code: "VI",
1802
- unicode: "🇻🇮",
1803
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/VI.svg",
1804
- label: "+1340"
1805
- },
1806
- {
1807
- country_label: "Vietnam",
1808
- code: "VN",
1809
- unicode: "🇻🇳",
1810
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/VN.svg",
1811
- label: "+84"
1812
- },
1813
- {
1814
- country_label: "Vanuatu",
1815
- code: "VU",
1816
- unicode: "🇻🇺",
1817
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/VU.svg",
1818
- label: "+678"
1819
- },
1820
- {
1821
- country_label: "Wallis & Futuna",
1822
- code: "WF",
1823
- unicode: "🇼🇫",
1824
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/WF.svg",
1825
- label: "+681"
1826
- },
1827
- {
1828
- country_label: "Samoa",
1829
- code: "WS",
1830
- unicode: "🇼🇸",
1831
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/WS.svg",
1832
- label: "+685"
1833
- },
1834
- {
1835
- country_label: "Yemen",
1836
- code: "YE",
1837
- unicode: "🇾🇪",
1838
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/YE.svg",
1839
- label: "+967"
1840
- },
1841
- {
1842
- country_label: "Mayotte",
1843
- code: "YT",
1844
- unicode: "🇾🇹",
1845
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/YT.svg",
1846
- label: "+262"
1847
- },
1848
- {
1849
- country_label: "South Africa",
1850
- code: "ZA",
1851
- unicode: "🇿🇦",
1852
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/ZA.svg",
1853
- label: "+27"
1854
- },
1855
- {
1856
- country_label: "Zambia",
1857
- code: "ZM",
1858
- unicode: "🇿🇲",
1859
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/ZM.svg",
1860
- label: "+260"
1861
- },
1862
- {
1863
- country_label: "Zimbabwe",
1864
- code: "ZW",
1865
- unicode: "🇿🇼",
1866
- image: "https://cdn.jsdelivr.net/npm/country-flag-emoji-json@2.0.0/dist/images/ZW.svg",
1867
- label: "+263"
1868
- }
1869
- ];
1870
- var countries_default = countries;
1871
-
1872
- // elements/phoneInput/PhoneInput.tsx
1873
- var PhoneInput = ({ labelProps, ...props }) => {
1874
- const [phoneNumber, setPhoneNumber] = useState2("");
1875
- const [countryCode, setCountryCode] = useState2(props.preferredCountry);
1876
- const inputRef = useRef2(null);
1877
- useEffect2(() => {
1878
- var _a;
1879
- if (inputRef.current) {
1880
- (_a = inputRef.current) == null ? void 0 : _a.focus();
1881
- }
1882
- }, []);
1883
- const handleInputChange = (e) => {
1884
- const validChars = /^[0-9-()]+$/;
1885
- const input = e.target.value;
1886
- if (input === "" || validChars.test(input)) {
1887
- setPhoneNumber(input);
1888
- }
1889
- if (props.handleChange) {
1890
- props.handleChange(`${countryCode == null ? void 0 : countryCode.label}-${e.target.value}`);
1891
- } else {
1892
- console.log("handleChange prop was not provided in <PhoneInput/>");
1893
- }
1894
- };
1895
- return /* @__PURE__ */ React2.createElement("div", { className: "hawa-flex hawa-h-fit hawa-w-full hawa-flex-col hawa-gap-2" }, props.label && /* @__PURE__ */ React2.createElement(Label, { ...labelProps }, props.label), /* @__PURE__ */ React2.createElement("div", { dir: "ltr", className: "hawa-flex hawa-w-full hawa-flex-row" }, /* @__PURE__ */ React2.createElement(
1896
- Select,
1897
- {
1898
- width: "fit",
1899
- hideHelperText: true,
1900
- phoneCode: true,
1901
- hideIndicator: true,
1902
- placeholder: "Code",
1903
- options: countries_default,
1904
- isMulti: false,
1905
- isSearchable: true,
1906
- isClearable: false,
1907
- defaultValue: props.preferredCountry,
1908
- value: countryCode == null ? void 0 : countryCode.label,
1909
- onChange: setCountryCode
1910
- }
1911
- ), /* @__PURE__ */ React2.createElement("div", { className: "hawa-relative hawa-flex hawa-h-fit hawa-w-full hawa-flex-col hawa-justify-center hawa-gap-0" }, /* @__PURE__ */ React2.createElement(
1912
- "input",
1913
- {
1914
- ref: inputRef,
1915
- id: "phone-number",
1916
- className: cn(
1917
- "hawa-block hawa-h-[40px] hawa-w-full hawa-rounded hawa-rounded-l-none hawa-border hawa-border-l-0 hawa-border-l-transparent hawa-bg-background hawa-p-2 hawa-text-sm hawa-transition-all"
1918
- ),
1919
- onChange: handleInputChange,
1920
- value: phoneNumber,
1921
- type: "tel",
1922
- placeholder: "531045453"
1923
- }
1924
- ))), /* @__PURE__ */ React2.createElement(
1925
- "p",
1926
- {
1927
- className: cn(
1928
- "hawa-my-0 hawa-text-start hawa-text-xs hawa-text-helper-color hawa-transition-all",
1929
- props.helperText ? "hawa-h-4 hawa-opacity-100" : "hawa-h-0 hawa-opacity-0"
1930
- )
1931
- },
1932
- props.helperText
1933
- ));
1934
- };
1935
-
1936
- // blocks/auth/AuthButtons.tsx
1937
- import React4 from "react";
1938
-
1939
- // elements/logos/Logos.tsx
1940
- import React3 from "react";
1941
- var Logos = {
1942
- hawa: (props) => /* @__PURE__ */ React3.createElement(
1943
- "svg",
1944
- {
1945
- xmlns: "http://www.w3.org/2000/svg",
1946
- xmlSpace: "preserve",
1947
- viewBox: "0 0 765 765",
1948
- ...props
1949
- },
1950
- /* @__PURE__ */ React3.createElement(
1951
- "path",
1952
- {
1953
- d: "M382.5 0C171.6 0 0 171.6 0 382.5V765h382.5C593.4 765 765 593.4 765 382.5S593.4 0 382.5 0zM281.6 305.7c98 0 177.7 79.7 177.7 177.7 0 98-79.7 177.7-177.7 177.7s-177.7-79.7-177.7-177.7c0-98 79.7-177.7 177.7-177.7zm246 314.5c23.2-41.6 35.6-88.7 35.6-136.7 0-155.3-126.3-281.6-281.6-281.6-48 0-95.1 12.4-136.8 35.6C194.9 156 285 104 382.5 104c153.6 0 278.6 125 278.6 278.6 0 97.3-52 187.5-133.5 237.6z",
1954
- fill: "currentColor"
1955
- }
1956
- )
1957
- ),
1958
- sikka: (props) => /* @__PURE__ */ React3.createElement(
1959
- "svg",
1960
- {
1961
- xmlns: "http://www.w3.org/2000/svg",
1962
- xmlnsXlink: "http://www.w3.org/1999/xlink",
1963
- xmlSpace: "preserve",
1964
- viewBox: "0 0 916.5 765",
1965
- fill: "currentColor",
1966
- ...props
1967
- },
1968
- /* @__PURE__ */ React3.createElement("defs", null, /* @__PURE__ */ React3.createElement("path", { id: "a", d: "M0 0h916.5v765H0z" })),
1969
- /* @__PURE__ */ React3.createElement("clipPath", { id: "b" }, /* @__PURE__ */ React3.createElement("use", { xlinkHref: "#a", overflow: "visible" })),
1970
- /* @__PURE__ */ React3.createElement("g", { clipPath: "url(#b)" }, /* @__PURE__ */ React3.createElement("defs", null, /* @__PURE__ */ React3.createElement("path", { id: "c", d: "M0 0h916.5v765H0z" })), /* @__PURE__ */ React3.createElement("clipPath", { id: "d" }, /* @__PURE__ */ React3.createElement("use", { xlinkHref: "#c", overflow: "visible" })), /* @__PURE__ */ React3.createElement("g", { clipPath: "url(#d)" }, /* @__PURE__ */ React3.createElement("path", { d: "M458.3 0h-31.9c-14.6 0-26.5 11.9-26.5 26.3v313.3L136.6 17.1C126 3.9 120.7 0 106.1 0H9.7C.5 0 0 7.9 0 17.1 0 21 1.3 26.3 4 29l288.7 353.6L4 736.1c-2.7 2.7-4 7.9-4 11.8 0 9.2.4 17.1 9.7 17.1h96.4c14.6 0 19.9-3.9 30.5-17.1l263.3-322.5v313.3c0 14.4 11.9 26.3 26.5 26.3h31.9M458.3 765h31.9c14.6 0 26.5-11.8 26.5-26.3V425.5L780 748c10.7 13.2 15.9 17.1 30.5 17.1h96.4c9.2 0 9.7-7.9 9.7-17.1 0-3.9-1.3-9.2-4-11.8L623.8 382.5 912.5 28.9c2.7-2.7 4-7.9 4-11.9 0-9.2-.5-17.1-9.7-17.1h-96.4c-14.6 0-19.9 3.9-30.5 17.1L516.7 339.5V26.3c0-14.4-11.9-26.3-26.5-26.3h-31.9" })))
1971
- ),
1972
- mail: (props) => /* @__PURE__ */ React3.createElement(
1973
- "svg",
1974
- {
1975
- stroke: "currentColor",
1976
- fill: "none",
1977
- strokeWidth: "2",
1978
- viewBox: "0 0 24 24",
1979
- strokeLinecap: "round",
1980
- strokeLinejoin: "round",
1981
- xmlns: "http://www.w3.org/2000/svg",
1982
- ...props
1983
- },
1984
- /* @__PURE__ */ React3.createElement("path", { d: "M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z" }),
1985
- /* @__PURE__ */ React3.createElement("polyline", { points: "22,6 12,13 2,6" })
1986
- ),
1987
- phone: (props) => /* @__PURE__ */ React3.createElement(
1988
- "svg",
1989
- {
1990
- stroke: "currentColor",
1991
- fill: "none",
1992
- strokeWidth: "2",
1993
- viewBox: "0 0 24 24",
1994
- "aria-hidden": "true",
1995
- xmlns: "http://www.w3.org/2000/svg",
1996
- ...props
1997
- },
1998
- /* @__PURE__ */ React3.createElement(
1999
- "path",
2000
- {
2001
- strokeLinecap: "round",
2002
- strokeLinejoin: "round",
2003
- d: "M10.5 1.5H8.25A2.25 2.25 0 006 3.75v16.5a2.25 2.25 0 002.25 2.25h7.5A2.25 2.25 0 0018 20.25V3.75a2.25 2.25 0 00-2.25-2.25H13.5m-3 0V3h3V1.5m-3 0h3m-3 18.75h3"
2004
- }
2005
- )
2006
- ),
2007
- twitter: (props) => /* @__PURE__ */ React3.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", ...props }, /* @__PURE__ */ React3.createElement(
2008
- "path",
2009
- {
2010
- fill: "currentColor",
2011
- d: "M21.543 7.104c.015.211.015.423.015.636 0 6.507-4.954 14.01-14.01 14.01v-.003A13.94 13.94 0 0 1 0 19.539a9.88 9.88 0 0 0 7.287-2.041 4.93 4.93 0 0 1-4.6-3.42 4.916 4.916 0 0 0 2.223-.084A4.926 4.926 0 0 1 .96 9.167v-.062a4.887 4.887 0 0 0 2.235.616A4.928 4.928 0 0 1 1.67 3.148a13.98 13.98 0 0 0 10.15 5.144 4.929 4.929 0 0 1 8.39-4.49 9.868 9.868 0 0 0 3.128-1.196 4.941 4.941 0 0 1-2.165 2.724A9.828 9.828 0 0 0 24 4.555a10.019 10.019 0 0 1-2.457 2.549z"
2012
- }
2013
- )),
2014
- instagram: (props) => /* @__PURE__ */ React3.createElement(
2015
- "svg",
2016
- {
2017
- xmlns: "http://www.w3.org/2000/svg",
2018
- fill: "currentColor",
2019
- viewBox: "0 0 16 16",
2020
- ...props
2021
- },
2022
- /* @__PURE__ */ React3.createElement("path", { d: "M8 0C5.829 0 5.556.01 4.703.048 3.85.088 3.269.222 2.76.42a3.917 3.917 0 0 0-1.417.923A3.927 3.927 0 0 0 .42 2.76C.222 3.268.087 3.85.048 4.7.01 5.555 0 5.827 0 8.001c0 2.172.01 2.444.048 3.297.04.852.174 1.433.372 1.942.205.526.478.972.923 1.417.444.445.89.719 1.416.923.51.198 1.09.333 1.942.372C5.555 15.99 5.827 16 8 16s2.444-.01 3.298-.048c.851-.04 1.434-.174 1.943-.372a3.916 3.916 0 0 0 1.416-.923c.445-.445.718-.891.923-1.417.197-.509.332-1.09.372-1.942C15.99 10.445 16 10.173 16 8s-.01-2.445-.048-3.299c-.04-.851-.175-1.433-.372-1.941a3.926 3.926 0 0 0-.923-1.417A3.911 3.911 0 0 0 13.24.42c-.51-.198-1.092-.333-1.943-.372C10.443.01 10.172 0 7.998 0h.003zm-.717 1.442h.718c2.136 0 2.389.007 3.232.046.78.035 1.204.166 1.486.275.373.145.64.319.92.599.28.28.453.546.598.92.11.281.24.705.275 1.485.039.843.047 1.096.047 3.231s-.008 2.389-.047 3.232c-.035.78-.166 1.203-.275 1.485a2.47 2.47 0 0 1-.599.919c-.28.28-.546.453-.92.598-.28.11-.704.24-1.485.276-.843.038-1.096.047-3.232.047s-2.39-.009-3.233-.047c-.78-.036-1.203-.166-1.485-.276a2.478 2.478 0 0 1-.92-.598 2.48 2.48 0 0 1-.6-.92c-.109-.281-.24-.705-.275-1.485-.038-.843-.046-1.096-.046-3.233 0-2.136.008-2.388.046-3.231.036-.78.166-1.204.276-1.486.145-.373.319-.64.599-.92.28-.28.546-.453.92-.598.282-.11.705-.24 1.485-.276.738-.034 1.024-.044 2.515-.045v.002zm4.988 1.328a.96.96 0 1 0 0 1.92.96.96 0 0 0 0-1.92zm-4.27 1.122a4.109 4.109 0 1 0 0 8.217 4.109 4.109 0 0 0 0-8.217zm0 1.441a2.667 2.667 0 1 1 0 5.334 2.667 2.667 0 0 1 0-5.334z" })
2023
- ),
2024
- microsoft: (props) => /* @__PURE__ */ React3.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", ...props }, /* @__PURE__ */ React3.createElement(
2025
- "path",
2026
- {
2027
- fill: "currentColor",
2028
- d: "M7.462 0H0v7.19h7.462V0zM16 0H8.538v7.19H16V0zM7.462 8.211H0V16h7.462V8.211zm8.538 0H8.538V16H16V8.211z"
2029
- }
2030
- )),
2031
- github: (props) => /* @__PURE__ */ React3.createElement(
2032
- "svg",
2033
- {
2034
- xmlns: "http://www.w3.org/2000/svg",
2035
- viewBox: "0 0 438.549 438.549",
2036
- ...props
2037
- },
2038
- /* @__PURE__ */ React3.createElement(
2039
- "path",
2040
- {
2041
- fill: "currentColor",
2042
- d: "M409.132 114.573c-19.608-33.596-46.205-60.194-79.798-79.8-33.598-19.607-70.277-29.408-110.063-29.408-39.781 0-76.472 9.804-110.063 29.408-33.596 19.605-60.192 46.204-79.8 79.8C9.803 148.168 0 184.854 0 224.63c0 47.78 13.94 90.745 41.827 128.906 27.884 38.164 63.906 64.572 108.063 79.227 5.14.954 8.945.283 11.419-1.996 2.475-2.282 3.711-5.14 3.711-8.562 0-.571-.049-5.708-.144-15.417a2549.81 2549.81 0 01-.144-25.406l-6.567 1.136c-4.187.767-9.469 1.092-15.846 1-6.374-.089-12.991-.757-19.842-1.999-6.854-1.231-13.229-4.086-19.13-8.559-5.898-4.473-10.085-10.328-12.56-17.556l-2.855-6.57c-1.903-4.374-4.899-9.233-8.992-14.559-4.093-5.331-8.232-8.945-12.419-10.848l-1.999-1.431c-1.332-.951-2.568-2.098-3.711-3.429-1.142-1.331-1.997-2.663-2.568-3.997-.572-1.335-.098-2.43 1.427-3.289 1.525-.859 4.281-1.276 8.28-1.276l5.708.853c3.807.763 8.516 3.042 14.133 6.851 5.614 3.806 10.229 8.754 13.846 14.842 4.38 7.806 9.657 13.754 15.846 17.847 6.184 4.093 12.419 6.136 18.699 6.136 6.28 0 11.704-.476 16.274-1.423 4.565-.952 8.848-2.383 12.847-4.285 1.713-12.758 6.377-22.559 13.988-29.41-10.848-1.14-20.601-2.857-29.264-5.14-8.658-2.286-17.605-5.996-26.835-11.14-9.235-5.137-16.896-11.516-22.985-19.126-6.09-7.614-11.088-17.61-14.987-29.979-3.901-12.374-5.852-26.648-5.852-42.826 0-23.035 7.52-42.637 22.557-58.817-7.044-17.318-6.379-36.732 1.997-58.24 5.52-1.715 13.706-.428 24.554 3.853 10.85 4.283 18.794 7.952 23.84 10.994 5.046 3.041 9.089 5.618 12.135 7.708 17.705-4.947 35.976-7.421 54.818-7.421s37.117 2.474 54.823 7.421l10.849-6.849c7.419-4.57 16.18-8.758 26.262-12.565 10.088-3.805 17.802-4.853 23.134-3.138 8.562 21.509 9.325 40.922 2.279 58.24 15.036 16.18 22.559 35.787 22.559 58.817 0 16.178-1.958 30.497-5.853 42.966-3.9 12.471-8.941 22.457-15.125 29.979-6.191 7.521-13.901 13.85-23.131 18.986-9.232 5.14-18.182 8.85-26.84 11.136-8.662 2.286-18.415 4.004-29.263 5.146 9.894 8.562 14.842 22.077 14.842 40.539v60.237c0 3.422 1.19 6.279 3.572 8.562 2.379 2.279 6.136 2.95 11.276 1.995 44.163-14.653 80.185-41.062 108.068-79.226 27.88-38.161 41.825-81.126 41.825-128.906-.01-39.771-9.818-76.454-29.414-110.049z"
2043
- }
2044
- )
2045
- ),
2046
- radix: (props) => /* @__PURE__ */ React3.createElement("svg", { viewBox: "0 0 25 25", fill: "none", ...props }, /* @__PURE__ */ React3.createElement(
2047
- "path",
2048
- {
2049
- d: "M12 25C7.58173 25 4 21.4183 4 17C4 12.5817 7.58173 9 12 9V25Z",
2050
- fill: "currentcolor"
2051
- }
2052
- ), /* @__PURE__ */ React3.createElement("path", { d: "M12 0H4V8H12V0Z", fill: "currentcolor" }), /* @__PURE__ */ React3.createElement(
2053
- "path",
2054
- {
2055
- d: "M17 8C19.2091 8 21 6.20914 21 4C21 1.79086 19.2091 0 17 0C14.7909 0 13 1.79086 13 4C13 6.20914 14.7909 8 17 8Z",
2056
- fill: "currentcolor"
2057
- }
2058
- )),
2059
- aria: (props) => /* @__PURE__ */ React3.createElement("svg", { role: "img", viewBox: "0 0 24 24", fill: "currentColor", ...props }, /* @__PURE__ */ React3.createElement("path", { d: "M13.966 22.624l-1.69-4.281H8.122l3.892-9.144 5.662 13.425zM8.884 1.376H0v21.248zm15.116 0h-8.884L24 22.624Z" })),
2060
- npm: (props) => /* @__PURE__ */ React3.createElement("svg", { viewBox: "0 0 24 24", ...props }, /* @__PURE__ */ React3.createElement(
2061
- "path",
2062
- {
2063
- d: "M1.763 0C.786 0 0 .786 0 1.763v20.474C0 23.214.786 24 1.763 24h20.474c.977 0 1.763-.786 1.763-1.763V1.763C24 .786 23.214 0 22.237 0zM5.13 5.323l13.837.019-.009 13.836h-3.464l.01-10.382h-3.456L12.04 19.17H5.113z",
2064
- fill: "currentColor"
2065
- }
2066
- )),
2067
- yarn: (props) => /* @__PURE__ */ React3.createElement("svg", { viewBox: "0 0 24 24", ...props }, /* @__PURE__ */ React3.createElement(
2068
- "path",
2069
- {
2070
- d: "M12 0C5.375 0 0 5.375 0 12s5.375 12 12 12 12-5.375 12-12S18.625 0 12 0zm.768 4.105c.183 0 .363.053.525.157.125.083.287.185.755 1.154.31-.088.468-.042.551-.019.204.056.366.19.463.375.477.917.542 2.553.334 3.605-.241 1.232-.755 2.029-1.131 2.576.324.329.778.899 1.117 1.825.278.774.31 1.478.273 2.015a5.51 5.51 0 0 0 .602-.329c.593-.366 1.487-.917 2.553-.931.714-.009 1.269.445 1.353 1.103a1.23 1.23 0 0 1-.945 1.362c-.649.158-.95.278-1.821.843-1.232.797-2.539 1.242-3.012 1.39a1.686 1.686 0 0 1-.704.343c-.737.181-3.266.315-3.466.315h-.046c-.783 0-1.214-.241-1.45-.491-.658.329-1.51.19-2.122-.134a1.078 1.078 0 0 1-.58-1.153 1.243 1.243 0 0 1-.153-.195c-.162-.25-.528-.936-.454-1.946.056-.723.556-1.367.88-1.71a5.522 5.522 0 0 1 .408-2.256c.306-.727.885-1.348 1.32-1.737-.32-.537-.644-1.367-.329-2.21.227-.602.412-.936.82-1.08h-.005c.199-.074.389-.153.486-.259a3.418 3.418 0 0 1 2.298-1.103c.037-.093.079-.185.125-.283.31-.658.639-1.029 1.024-1.168a.94.94 0 0 1 .328-.06zm.006.7c-.507.016-1.001 1.519-1.001 1.519s-1.27-.204-2.266.871c-.199.218-.468.334-.746.44-.079.028-.176.023-.417.672-.371.991.625 2.094.625 2.094s-1.186.839-1.626 1.881c-.486 1.144-.338 2.261-.338 2.261s-.843.732-.899 1.487c-.051.663.139 1.2.343 1.515.227.343.51.176.51.176s-.561.653-.037.931c.477.25 1.283.394 1.71-.037.31-.31.371-1.001.486-1.283.028-.065.12.111.209.199.097.093.264.195.264.195s-.755.324-.445 1.066c.102.246.468.403 1.066.398.222-.005 2.664-.139 3.313-.296.375-.088.505-.283.505-.283s1.566-.431 2.998-1.357c.917-.598 1.293-.76 2.034-.936.612-.148.57-1.098-.241-1.084-.839.009-1.575.44-2.196.825-1.163.718-1.742.672-1.742.672l-.018-.032c-.079-.13.371-1.293-.134-2.678-.547-1.515-1.413-1.881-1.344-1.997.297-.5 1.038-1.297 1.334-2.78.176-.899.13-2.377-.269-3.151-.074-.144-.732.241-.732.241s-.616-1.371-.788-1.483a.271.271 0 0 0-.157-.046z",
2071
- fill: "currentColor"
2072
- }
2073
- )),
2074
- pnpm: (props) => /* @__PURE__ */ React3.createElement("svg", { viewBox: "0 0 24 24", ...props }, /* @__PURE__ */ React3.createElement(
2075
- "path",
2076
- {
2077
- d: "M0 0v7.5h7.5V0zm8.25 0v7.5h7.498V0zm8.25 0v7.5H24V0zM8.25 8.25v7.5h7.498v-7.5zm8.25 0v7.5H24v-7.5zM0 16.5V24h7.5v-7.5zm8.25 0V24h7.498v-7.5zm8.25 0V24H24v-7.5z",
2078
- fill: "currentColor"
2079
- }
2080
- )),
2081
- react: (props) => /* @__PURE__ */ React3.createElement("svg", { viewBox: "0 0 24 24", ...props }, /* @__PURE__ */ React3.createElement(
2082
- "path",
2083
- {
2084
- d: "M14.23 12.004a2.236 2.236 0 0 1-2.235 2.236 2.236 2.236 0 0 1-2.236-2.236 2.236 2.236 0 0 1 2.235-2.236 2.236 2.236 0 0 1 2.236 2.236zm2.648-10.69c-1.346 0-3.107.96-4.888 2.622-1.78-1.653-3.542-2.602-4.887-2.602-.41 0-.783.093-1.106.278-1.375.793-1.683 3.264-.973 6.365C1.98 8.917 0 10.42 0 12.004c0 1.59 1.99 3.097 5.043 4.03-.704 3.113-.39 5.588.988 6.38.32.187.69.275 1.102.275 1.345 0 3.107-.96 4.888-2.624 1.78 1.654 3.542 2.603 4.887 2.603.41 0 .783-.09 1.106-.275 1.374-.792 1.683-3.263.973-6.365C22.02 15.096 24 13.59 24 12.004c0-1.59-1.99-3.097-5.043-4.032.704-3.11.39-5.587-.988-6.38-.318-.184-.688-.277-1.092-.278zm-.005 1.09v.006c.225 0 .406.044.558.127.666.382.955 1.835.73 3.704-.054.46-.142.945-.25 1.44-.96-.236-2.006-.417-3.107-.534-.66-.905-1.345-1.727-2.035-2.447 1.592-1.48 3.087-2.292 4.105-2.295zm-9.77.02c1.012 0 2.514.808 4.11 2.28-.686.72-1.37 1.537-2.02 2.442-1.107.117-2.154.298-3.113.538-.112-.49-.195-.964-.254-1.42-.23-1.868.054-3.32.714-3.707.19-.09.4-.127.563-.132zm4.882 3.05c.455.468.91.992 1.36 1.564-.44-.02-.89-.034-1.345-.034-.46 0-.915.01-1.36.034.44-.572.895-1.096 1.345-1.565zM12 8.1c.74 0 1.477.034 2.202.093.406.582.802 1.203 1.183 1.86.372.64.71 1.29 1.018 1.946-.308.655-.646 1.31-1.013 1.95-.38.66-.773 1.288-1.18 1.87-.728.063-1.466.098-2.21.098-.74 0-1.477-.035-2.202-.093-.406-.582-.802-1.204-1.183-1.86-.372-.64-.71-1.29-1.018-1.946.303-.657.646-1.313 1.013-1.954.38-.66.773-1.286 1.18-1.868.728-.064 1.466-.098 2.21-.098zm-3.635.254c-.24.377-.48.763-.704 1.16-.225.39-.435.782-.635 1.174-.265-.656-.49-1.31-.676-1.947.64-.15 1.315-.283 2.015-.386zm7.26 0c.695.103 1.365.23 2.006.387-.18.632-.405 1.282-.66 1.933-.2-.39-.41-.783-.64-1.174-.225-.392-.465-.774-.705-1.146zm3.063.675c.484.15.944.317 1.375.498 1.732.74 2.852 1.708 2.852 2.476-.005.768-1.125 1.74-2.857 2.475-.42.18-.88.342-1.355.493-.28-.958-.646-1.956-1.1-2.98.45-1.017.81-2.01 1.085-2.964zm-13.395.004c.278.96.645 1.957 1.1 2.98-.45 1.017-.812 2.01-1.086 2.964-.484-.15-.944-.318-1.37-.5-1.732-.737-2.852-1.706-2.852-2.474 0-.768 1.12-1.742 2.852-2.476.42-.18.88-.342 1.356-.494zm11.678 4.28c.265.657.49 1.312.676 1.948-.64.157-1.316.29-2.016.39.24-.375.48-.762.705-1.158.225-.39.435-.788.636-1.18zm-9.945.02c.2.392.41.783.64 1.175.23.39.465.772.705 1.143-.695-.102-1.365-.23-2.006-.386.18-.63.406-1.282.66-1.933zM17.92 16.32c.112.493.2.968.254 1.423.23 1.868-.054 3.32-.714 3.708-.147.09-.338.128-.563.128-1.012 0-2.514-.807-4.11-2.28.686-.72 1.37-1.536 2.02-2.44 1.107-.118 2.154-.3 3.113-.54zm-11.83.01c.96.234 2.006.415 3.107.532.66.905 1.345 1.727 2.035 2.446-1.595 1.483-3.092 2.295-4.11 2.295-.22-.005-.406-.05-.553-.132-.666-.38-.955-1.834-.73-3.703.054-.46.142-.944.25-1.438zm4.56.64c.44.02.89.034 1.345.034.46 0 .915-.01 1.36-.034-.44.572-.895 1.095-1.345 1.565-.455-.47-.91-.993-1.36-1.565z",
2085
- fill: "currentColor"
2086
- }
2087
- )),
2088
- tailwind: (props) => /* @__PURE__ */ React3.createElement("svg", { viewBox: "0 0 24 24", ...props }, /* @__PURE__ */ React3.createElement(
2089
- "path",
2090
- {
2091
- d: "M12.001,4.8c-3.2,0-5.2,1.6-6,4.8c1.2-1.6,2.6-2.2,4.2-1.8c0.913,0.228,1.565,0.89,2.288,1.624 C13.666,10.618,15.027,12,18.001,12c3.2,0,5.2-1.6,6-4.8c-1.2,1.6-2.6,2.2-4.2,1.8c-0.913-0.228-1.565-0.89-2.288-1.624 C16.337,6.182,14.976,4.8,12.001,4.8z M6.001,12c-3.2,0-5.2,1.6-6,4.8c1.2-1.6,2.6-2.2,4.2-1.8c0.913,0.228,1.565,0.89,2.288,1.624 c1.177,1.194,2.538,2.576,5.512,2.576c3.2,0,5.2-1.6,6-4.8c-1.2,1.6-2.6,2.2-4.2,1.8c-0.913-0.228-1.565-0.89-2.288-1.624 C10.337,13.382,8.976,12,6.001,12z",
2092
- fill: "currentColor"
2093
- }
2094
- )),
2095
- google: (props) => /* @__PURE__ */ React3.createElement("svg", { role: "img", viewBox: "0 0 24 24", ...props }, /* @__PURE__ */ React3.createElement(
2096
- "path",
2097
- {
2098
- fill: "currentColor",
2099
- d: "M12.48 10.92v3.28h7.84c-.24 1.84-.853 3.187-1.787 4.133-1.147 1.147-2.933 2.4-6.053 2.4-4.827 0-8.6-3.893-8.6-8.72s3.773-8.72 8.6-8.72c2.6 0 4.507 1.027 5.907 2.347l2.307-2.307C18.747 1.44 16.133 0 12.48 0 5.867 0 .307 5.387.307 12s5.56 12 12.173 12c3.573 0 6.267-1.173 8.373-3.36 2.16-2.16 2.84-5.213 2.84-7.667 0-.76-.053-1.467-.173-2.053H12.48z"
2100
- }
2101
- )),
2102
- apple: (props) => /* @__PURE__ */ React3.createElement("svg", { role: "img", viewBox: "0 0 24 24", ...props }, /* @__PURE__ */ React3.createElement(
2103
- "path",
2104
- {
2105
- d: "M12.152 6.896c-.948 0-2.415-1.078-3.96-1.04-2.04.027-3.91 1.183-4.961 3.014-2.117 3.675-.546 9.103 1.519 12.09 1.013 1.454 2.208 3.09 3.792 3.039 1.52-.065 2.09-.987 3.935-.987 1.831 0 2.35.987 3.96.948 1.637-.026 2.676-1.48 3.676-2.948 1.156-1.688 1.636-3.325 1.662-3.415-.039-.013-3.182-1.221-3.22-4.857-.026-3.04 2.48-4.494 2.597-4.559-1.429-2.09-3.623-2.324-4.39-2.376-2-.156-3.675 1.09-4.61 1.09zM15.53 3.83c.843-1.012 1.4-2.427 1.245-3.83-1.207.052-2.662.805-3.532 1.818-.78.896-1.454 2.338-1.273 3.714 1.338.104 2.715-.688 3.559-1.701",
2106
- fill: "currentColor"
2107
- }
2108
- )),
2109
- paypal: (props) => /* @__PURE__ */ React3.createElement("svg", { role: "img", viewBox: "0 0 24 24", ...props }, /* @__PURE__ */ React3.createElement(
2110
- "path",
2111
- {
2112
- d: "M7.076 21.337H2.47a.641.641 0 0 1-.633-.74L4.944.901C5.026.382 5.474 0 5.998 0h7.46c2.57 0 4.578.543 5.69 1.81 1.01 1.15 1.304 2.42 1.012 4.287-.023.143-.047.288-.077.437-.983 5.05-4.349 6.797-8.647 6.797h-2.19c-.524 0-.968.382-1.05.9l-1.12 7.106zm14.146-14.42a3.35 3.35 0 0 0-.607-.541c-.013.076-.026.175-.041.254-.93 4.778-4.005 7.201-9.138 7.201h-2.19a.563.563 0 0 0-.556.479l-1.187 7.527h-.506l-.24 1.516a.56.56 0 0 0 .554.647h3.882c.46 0 .85-.334.922-.788.06-.26.76-4.852.816-5.09a.932.932 0 0 1 .923-.788h.58c3.76 0 6.705-1.528 7.565-5.946.36-1.847.174-3.388-.777-4.471z",
2113
- fill: "currentColor"
2114
- }
2115
- )),
2116
- spinner: (props) => /* @__PURE__ */ React3.createElement(
2117
- "svg",
2118
- {
2119
- xmlns: "http://www.w3.org/2000/svg",
2120
- width: "24",
2121
- height: "24",
2122
- viewBox: "0 0 24 24",
2123
- fill: "none",
2124
- stroke: "currentColor",
2125
- strokeWidth: "2",
2126
- strokeLinecap: "round",
2127
- strokeLinejoin: "round",
2128
- ...props
2129
- },
2130
- /* @__PURE__ */ React3.createElement("path", { d: "M21 12a9 9 0 1 1-6.219-8.56" })
2131
- ),
2132
- whatsapp: (props) => /* @__PURE__ */ React3.createElement(
2133
- "svg",
2134
- {
2135
- xmlns: "http://www.w3.org/2000/svg",
2136
- viewBox: "0 0 24 24",
2137
- fill: "currentColor",
2138
- ...props
2139
- },
2140
- /* @__PURE__ */ React3.createElement("path", { d: "M.057 24l1.687-6.163c-1.041-1.804-1.588-3.849-1.587-5.946.003-6.556 5.338-11.891 11.893-11.891 3.181.001 6.167 1.24 8.413 3.488 2.245 2.248 3.481 5.236 3.48 8.414-.003 6.557-5.338 11.892-11.893 11.892-1.99-.001-3.951-.5-5.688-1.448l-6.305 1.654zm6.597-3.807c1.676.995 3.276 1.591 5.392 1.592 5.448 0 9.886-4.434 9.889-9.885.002-5.462-4.415-9.89-9.881-9.892-5.452 0-9.887 4.434-9.889 9.884-.001 2.225.651 3.891 1.746 5.634l-.999 3.648 3.742-.981zm11.387-5.464c-.074-.124-.272-.198-.57-.347-.297-.149-1.758-.868-2.031-.967-.272-.099-.47-.149-.669.149-.198.297-.768.967-.941 1.165-.173.198-.347.223-.644.074-.297-.149-1.255-.462-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.297-.347.446-.521.151-.172.2-.296.3-.495.099-.198.05-.372-.025-.521-.075-.148-.669-1.611-.916-2.206-.242-.579-.487-.501-.669-.51l-.57-.01c-.198 0-.52.074-.792.372s-1.04 1.016-1.04 2.479 1.065 2.876 1.213 3.074c.149.198 2.095 3.2 5.076 4.487.709.306 1.263.489 1.694.626.712.226 1.36.194 1.872.118.571-.085 1.758-.719 2.006-1.413.248-.695.248-1.29.173-1.414z" })
2141
- )
2142
- };
2143
-
2144
- // blocks/auth/AuthButtons.tsx
2145
- var AuthButtons = (props) => {
2146
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
2147
- return /* @__PURE__ */ React4.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-4" }, props.viaGoogle && /* @__PURE__ */ React4.createElement(
2148
- Button,
2149
- {
2150
- disabled: props.isGoogleLoading,
2151
- className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2",
2152
- variant: "outline",
2153
- onClick: props.handleGoogle
2154
- },
2155
- props.isGoogleLoading ? /* @__PURE__ */ React4.createElement(Loading, { size: "button" }) : /* @__PURE__ */ React4.createElement(Logos.google, { className: "hawa-icon" }),
2156
- (_b = (_a = props.texts) == null ? void 0 : _a.continueWithGoogle) != null ? _b : "Continue With Google"
2157
- ), props.viaGithub && /* @__PURE__ */ React4.createElement(
2158
- Button,
2159
- {
2160
- disabled: props.isGithubLoading,
2161
- className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2",
2162
- variant: "outline",
2163
- onClick: props.handleGithub
2164
- },
2165
- props.isGithubLoading ? /* @__PURE__ */ React4.createElement(Loading, { size: "button" }) : /* @__PURE__ */ React4.createElement(Logos.github, { className: "hawa-icon" }),
2166
- (_d = (_c = props.texts) == null ? void 0 : _c.continueWithGithub) != null ? _d : "Continue With Github"
2167
- ), props.viaTwitter && /* @__PURE__ */ React4.createElement(
2168
- Button,
2169
- {
2170
- disabled: props.isTwitterLoading,
2171
- className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2",
2172
- variant: "outline",
2173
- onClick: props.handleTwitter
2174
- },
2175
- props.isTwitterLoading ? /* @__PURE__ */ React4.createElement(Loading, { size: "button" }) : /* @__PURE__ */ React4.createElement(Logos.twitter, { className: "hawa-icon" }),
2176
- (_f = (_e = props.texts) == null ? void 0 : _e.continueWithTwitter) != null ? _f : "Continue With Twitter"
2177
- ), props.viaApple && /* @__PURE__ */ React4.createElement(
2178
- Button,
2179
- {
2180
- disabled: props.isAppleLoading,
2181
- className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2",
2182
- variant: "outline",
2183
- onClick: props.handleApple
2184
- },
2185
- props.isAppleLoading ? /* @__PURE__ */ React4.createElement(Loading, { size: "button" }) : /* @__PURE__ */ React4.createElement(Logos.apple, { className: "hawa-icon" }),
2186
- (_h = (_g = props.texts) == null ? void 0 : _g.continueWithApple) != null ? _h : "Continue With Apple"
2187
- ), props.viaMicrosoft && /* @__PURE__ */ React4.createElement(
2188
- Button,
2189
- {
2190
- disabled: props.isMicrosoftLoading,
2191
- className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2",
2192
- variant: "outline",
2193
- onClick: props.handleMicrosoft
2194
- },
2195
- props.isMicrosoftLoading ? /* @__PURE__ */ React4.createElement(Loading, { size: "button" }) : /* @__PURE__ */ React4.createElement(Logos.microsoft, { className: "hawa-icon" }),
2196
- (_j = (_i = props.texts) == null ? void 0 : _i.continueWithMicrosoft) != null ? _j : "Continue With Microsoft"
2197
- ), props.viaEmail && /* @__PURE__ */ React4.createElement(
2198
- Button,
2199
- {
2200
- disabled: props.isEmailLoading,
2201
- className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2",
2202
- variant: "outline",
2203
- onClick: props.handleEmail
2204
- },
2205
- props.isEmailLoading ? /* @__PURE__ */ React4.createElement(Loading, { size: "button" }) : /* @__PURE__ */ React4.createElement(Logos.mail, { className: "hawa-icon" }),
2206
- (_l = (_k = props.texts) == null ? void 0 : _k.continueWithEmail) != null ? _l : "Continue With Email"
2207
- ), props.viaPhone && /* @__PURE__ */ React4.createElement(
2208
- Button,
2209
- {
2210
- disabled: props.isPhoneLoading,
2211
- className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2",
2212
- variant: "outline",
2213
- onClick: props.handlePhone
2214
- },
2215
- props.isPhoneLoading ? /* @__PURE__ */ React4.createElement(Loading, { size: "button" }) : /* @__PURE__ */ React4.createElement(Logos.phone, { className: "hawa-icon" }),
2216
- (_n = (_m = props.texts) == null ? void 0 : _m.continueWithPhone) != null ? _n : "Continue With Phone"
2217
- ));
2218
- };
2219
-
2220
- // blocks/auth/LoginForm.tsx
2221
- var LoginForm = ({
2222
- loginType,
2223
- texts,
2224
- passwordLength = 8,
2225
- ...props
2226
- }) => {
2227
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q;
2228
- const [passwordVisible, setPasswordVisible] = useState3(false);
2229
- const thirdPartyAuthTexts = {
2230
- continueWithGoogle: texts == null ? void 0 : texts.continueWithGoogle,
2231
- continueWithTwitter: texts == null ? void 0 : texts.continueWithTwitter,
2232
- continueWithApple: texts == null ? void 0 : texts.continueWithApple,
2233
- continueWithMicrosoft: texts == null ? void 0 : texts.continueWithMicrosoft,
2234
- continueWithGithub: texts == null ? void 0 : texts.continueWithGithub,
2235
- continueWithEmail: texts == null ? void 0 : texts.continueWithEmail,
2236
- continueWithPhone: texts == null ? void 0 : texts.continueWithPhone
2237
- };
2238
- let formSchema;
2239
- if (loginType === "email") {
2240
- formSchema = z.object({
2241
- email: z.string({ required_error: (_a = texts == null ? void 0 : texts.email) == null ? void 0 : _a.required }).min(1, { message: (_b = texts == null ? void 0 : texts.email) == null ? void 0 : _b.required }).email({ message: (_c = texts == null ? void 0 : texts.email) == null ? void 0 : _c.invalid }),
2242
- password: z.string({ required_error: (_d = texts == null ? void 0 : texts.password) == null ? void 0 : _d.required }).min(1, { message: (_e = texts == null ? void 0 : texts.password) == null ? void 0 : _e.required }).min(passwordLength, { message: (_f = texts == null ? void 0 : texts.password) == null ? void 0 : _f.tooShort })
2243
- });
2244
- } else if (loginType === "username") {
2245
- formSchema = z.object({
2246
- username: z.string({ required_error: (_g = texts == null ? void 0 : texts.username) == null ? void 0 : _g.required }).min(2, { message: (_h = texts == null ? void 0 : texts.username) == null ? void 0 : _h.tooShort }).refine(
2247
- (value) => {
2248
- const isValid = /^[a-zA-Z][a-zA-Z0-9_-]{2,14}$/.test(value);
2249
- return isValid;
2250
- },
2251
- { message: (_i = texts == null ? void 0 : texts.username) == null ? void 0 : _i.invalid }
2252
- ),
2253
- password: z.string({ required_error: (_j = texts == null ? void 0 : texts.password) == null ? void 0 : _j.required }).min(1, { message: (_k = texts == null ? void 0 : texts.password) == null ? void 0 : _k.required }).min(passwordLength, { message: (_l = texts == null ? void 0 : texts.password) == null ? void 0 : _l.tooShort })
2254
- });
2255
- } else if (loginType === "phone") {
2256
- formSchema = z.object({
2257
- phone: z.string({ required_error: (_m = texts == null ? void 0 : texts.phone) == null ? void 0 : _m.required }).refine(
2258
- (value) => {
2259
- let phoneNumber = parsePhoneNumber(value);
2260
- return phoneNumber.isValid();
2261
- },
2262
- { message: (_n = texts == null ? void 0 : texts.phone) == null ? void 0 : _n.invalid }
2263
- )
2264
- });
2265
- } else if (loginType === "link") {
2266
- formSchema = z.object({
2267
- email: z.string({ required_error: (_o = texts == null ? void 0 : texts.email) == null ? void 0 : _o.required }).min(1, { message: (_p = texts == null ? void 0 : texts.email) == null ? void 0 : _p.required }).email({ message: (_q = texts == null ? void 0 : texts.email) == null ? void 0 : _q.invalid })
2268
- });
2269
- } else {
2270
- formSchema = z.object({});
2271
- }
2272
- const { handleSubmit, control, formState } = useForm({
2273
- resolver: zodResolver(formSchema)
2274
- });
2275
- const renderFields = () => {
2276
- switch (loginType) {
2277
- case "email":
2278
- return /* @__PURE__ */ React5.createElement(React5.Fragment, null, /* @__PURE__ */ React5.createElement(
2279
- Controller,
2280
- {
2281
- control,
2282
- name: "email",
2283
- render: ({ field }) => {
2284
- var _a2, _b2, _c2;
2285
- return /* @__PURE__ */ React5.createElement(
2286
- Input,
2287
- {
2288
- inputProps: {
2289
- className: props.direction === "rtl" ? "hawa-text-right" : "hawa-text-left"
2290
- },
2291
- dir: "ltr",
2292
- width: "full",
2293
- autoComplete: "email",
2294
- label: (_a2 = texts == null ? void 0 : texts.email) == null ? void 0 : _a2.label,
2295
- helperText: (_b2 = formState.errors.email) == null ? void 0 : _b2.message,
2296
- placeholder: ((_c2 = texts == null ? void 0 : texts.email) == null ? void 0 : _c2.placeholder) || "contact@sikka.io",
2297
- ...field
2298
- }
2299
- );
2300
- }
2301
- }
2302
- ), /* @__PURE__ */ React5.createElement("div", null, /* @__PURE__ */ React5.createElement(
2303
- Controller,
2304
- {
2305
- control,
2306
- name: "password",
2307
- render: ({ field }) => {
2308
- var _a2, _b2, _c2;
2309
- return /* @__PURE__ */ React5.createElement(
2310
- Input,
2311
- {
2312
- width: "full",
2313
- autoComplete: "current-password",
2314
- type: passwordVisible ? "text" : "password",
2315
- label: ((_a2 = texts == null ? void 0 : texts.password) == null ? void 0 : _a2.label) || "Password",
2316
- endIcon: /* @__PURE__ */ React5.createElement(
2317
- "div",
2318
- {
2319
- className: "hawa-cursor-pointer",
2320
- onClick: () => setPasswordVisible(!passwordVisible)
2321
- },
2322
- passwordVisible ? /* @__PURE__ */ React5.createElement(EyeIcon, { className: "hawa-text-gray-500" }) : /* @__PURE__ */ React5.createElement(HiddenEyeIcon, { className: "hawa-text-gray-500" })
2323
- ),
2324
- placeholder: ((_b2 = texts == null ? void 0 : texts.password) == null ? void 0 : _b2.placeholder) || "Enter your password",
2325
- helperText: (_c2 = formState.errors.password) == null ? void 0 : _c2.message,
2326
- ...field
2327
- }
2328
- );
2329
- }
2330
- }
2331
- ), !props.withoutResetPassword && /* @__PURE__ */ React5.createElement(
2332
- "div",
2333
- {
2334
- onClick: props.onForgotPassword,
2335
- className: "hawa-mb-3 hawa-mt-2 hawa-w-fit hawa-cursor-pointer hawa-select-none hawa-text-xs dark:hawa-text-gray-300"
2336
- },
2337
- (texts == null ? void 0 : texts.forgotPassword) || "Forgot Password?"
2338
- )));
2339
- case "username":
2340
- return /* @__PURE__ */ React5.createElement(React5.Fragment, null, /* @__PURE__ */ React5.createElement(
2341
- Controller,
2342
- {
2343
- control,
2344
- name: "username",
2345
- render: ({ field }) => {
2346
- var _a2, _b2, _c2;
2347
- return /* @__PURE__ */ React5.createElement(
2348
- Input,
2349
- {
2350
- width: "full",
2351
- autoComplete: "username",
2352
- label: ((_a2 = texts == null ? void 0 : texts.username) == null ? void 0 : _a2.label) || "Username",
2353
- helperText: (_b2 = formState.errors.username) == null ? void 0 : _b2.message,
2354
- placeholder: ((_c2 = texts == null ? void 0 : texts.username) == null ? void 0 : _c2.placeholder) || "sikka_sa",
2355
- ...field
2356
- }
2357
- );
2358
- }
2359
- }
2360
- ), /* @__PURE__ */ React5.createElement("div", null, /* @__PURE__ */ React5.createElement(
2361
- Controller,
2362
- {
2363
- control,
2364
- name: "password",
2365
- render: ({ field }) => {
2366
- var _a2, _b2, _c2;
2367
- return /* @__PURE__ */ React5.createElement(
2368
- Input,
2369
- {
2370
- width: "full",
2371
- autoComplete: "current-password",
2372
- type: passwordVisible ? "text" : "password",
2373
- label: (_a2 = texts == null ? void 0 : texts.password) == null ? void 0 : _a2.label,
2374
- endIcon: /* @__PURE__ */ React5.createElement(
2375
- "div",
2376
- {
2377
- className: "hawa-cursor-pointer",
2378
- onClick: () => setPasswordVisible(!passwordVisible)
2379
- },
2380
- passwordVisible ? /* @__PURE__ */ React5.createElement(EyeIcon, { className: "hawa-text-gray-500" }) : /* @__PURE__ */ React5.createElement(HiddenEyeIcon, { className: "hawa-text-gray-500" })
2381
- ),
2382
- placeholder: ((_b2 = texts == null ? void 0 : texts.password) == null ? void 0 : _b2.placeholder) || "Enter your password",
2383
- helperText: (_c2 = formState.errors.password) == null ? void 0 : _c2.message,
2384
- ...field
2385
- }
2386
- );
2387
- }
2388
- }
2389
- ), !props.withoutResetPassword && /* @__PURE__ */ React5.createElement(
2390
- "div",
2391
- {
2392
- onClick: props.onForgotPassword,
2393
- className: "hawa-mb-3 hawa-mt-2 hawa-w-fit hawa-cursor-pointer hawa-select-none hawa-text-xs dark:hawa-text-gray-300"
2394
- },
2395
- (texts == null ? void 0 : texts.forgotPassword) || "Forgot Password?"
2396
- )));
2397
- case "phone":
2398
- return /* @__PURE__ */ React5.createElement(React5.Fragment, null, /* @__PURE__ */ React5.createElement(
2399
- Controller,
2400
- {
2401
- control,
2402
- name: "phone",
2403
- render: ({ field }) => {
2404
- var _a2, _b2;
2405
- return /* @__PURE__ */ React5.createElement(
2406
- PhoneInput,
2407
- {
2408
- label: (_a2 = texts == null ? void 0 : texts.phone) == null ? void 0 : _a2.label,
2409
- helperText: (_b2 = formState.errors.phone) == null ? void 0 : _b2.message,
2410
- preferredCountry: { label: "+966" },
2411
- handleChange: (e) => field.onChange(parsePhoneNumber(e).number)
2412
- }
2413
- );
2414
- }
2415
- }
2416
- ));
2417
- case "link":
2418
- return /* @__PURE__ */ React5.createElement(React5.Fragment, null, /* @__PURE__ */ React5.createElement(
2419
- Controller,
2420
- {
2421
- control,
2422
- name: "email",
2423
- render: ({ field }) => {
2424
- var _a2, _b2, _c2;
2425
- return /* @__PURE__ */ React5.createElement(
2426
- Input,
2427
- {
2428
- width: "full",
2429
- autoComplete: "email",
2430
- label: ((_a2 = texts == null ? void 0 : texts.email) == null ? void 0 : _a2.label) || "Email",
2431
- helperText: (_b2 = formState.errors.email) == null ? void 0 : _b2.message,
2432
- placeholder: ((_c2 = texts == null ? void 0 : texts.email) == null ? void 0 : _c2.placeholder) || "contact@sikka.io",
2433
- ...field
2434
- }
2435
- );
2436
- }
2437
- }
2438
- ));
2439
- default:
2440
- break;
2441
- }
2442
- };
2443
- return /* @__PURE__ */ React5.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-4" }, /* @__PURE__ */ React5.createElement(Card, { dir: props.direction }, /* @__PURE__ */ React5.createElement(CardContent, { headless: true }, props.showError && /* @__PURE__ */ React5.createElement(
2444
- Alert,
2445
- {
2446
- direction: props.direction,
2447
- title: props.errorTitle,
2448
- text: props.errorText,
2449
- severity: "error"
2450
- }
2451
- ), /* @__PURE__ */ React5.createElement(
2452
- "form",
2453
- {
2454
- noValidate: true,
2455
- className: "hawa-flex hawa-flex-col hawa-gap-4",
2456
- onSubmit: handleSubmit((e) => {
2457
- if (props.onLogin) {
2458
- return props.onLogin(e);
2459
- } else {
2460
- console.log("Form is submitted but onLogin prop is missing");
2461
- }
2462
- })
2463
- },
2464
- renderFields(),
2465
- /* @__PURE__ */ React5.createElement(
2466
- Button,
2467
- {
2468
- className: "hawa-mt-0 hawa-w-full",
2469
- type: "submit",
2470
- isLoading: props.isLoading,
2471
- disabled: props.isLoading
2472
- },
2473
- (texts == null ? void 0 : texts.loginText) || "Login"
2474
- ),
2475
- props.additionalButtons,
2476
- props.allowRegister && /* @__PURE__ */ React5.createElement("div", { className: "hawa-select-none hawa-p-3 hawa-text-center hawa-text-sm hawa-font-normal dark:hawa-text-gray-300" }, (texts == null ? void 0 : texts.newUserText) || "New user?", " ", /* @__PURE__ */ React5.createElement(
2477
- "span",
2478
- {
2479
- onClick: props.onRouteToRegister,
2480
- className: "clickable-link"
2481
- },
2482
- (texts == null ? void 0 : texts.createAccount) || "Create Account"
2483
- ))
2484
- )), props.viaGithub || props.viaGoogle || props.viaTwitter ? /* @__PURE__ */ React5.createElement(
2485
- CardFooter,
2486
- {
2487
- className: cn(
2488
- props.logosOnly ? "hawa-flex hawa-flex-row hawa-justify-center hawa-gap-2" : "hawa-grid hawa-grid-cols-1 hawa-gap-2"
2489
- )
2490
- },
2491
- /* @__PURE__ */ React5.createElement(
2492
- AuthButtons,
2493
- {
2494
- texts: thirdPartyAuthTexts,
2495
- viaGoogle: props.viaGoogle,
2496
- viaGithub: props.viaGithub,
2497
- viaTwitter: props.viaTwitter,
2498
- isGoogleLoading: props.isGoogleLoading,
2499
- isGithubLoading: props.isGithubLoading,
2500
- isTwitterLoading: props.isTwitterLoading,
2501
- handleGoogle: props.onGoogleLogin,
2502
- handleGithub: props.onGithubLogin,
2503
- handleTwitter: props.onTwitterLogin
2504
- }
2505
- )
2506
- ) : null));
2507
- };
2508
-
2509
- // blocks/auth/RegisterForm.tsx
2510
- import React7, { useState as useState4 } from "react";
2511
- import { Controller as Controller2, FormProvider, useForm as useForm2 } from "react-hook-form";
2512
- import { zodResolver as zodResolver2 } from "@hookform/resolvers/zod";
2513
- import * as z2 from "zod";
2514
-
2515
- // elements/checkbox/Checkbox.tsx
2516
- import * as React6 from "react";
2517
- import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
2518
- var Checkbox = ({
2519
- id,
2520
- label,
2521
- sublabel,
2522
- helperText,
2523
- disabled,
2524
- size = "default",
2525
- radius = "inherit",
2526
- ...props
2527
- }) => {
2528
- let labelLineHeightStyles = {
2529
- xs: sublabel || helperText ? 0.5 : 0.1,
2530
- sm: 0.6,
2531
- default: 1,
2532
- md: 0.8,
2533
- lg: 0.9,
2534
- xl: 1
2535
- };
2536
- return /* @__PURE__ */ React6.createElement(
2537
- "div",
2538
- {
2539
- className: cn(
2540
- "hawa-flex hawa-gap-2",
2541
- size === "default" ? "hawa-items-top" : "hawa-items-center"
2542
- )
2543
- },
2544
- /* @__PURE__ */ React6.createElement(
2545
- CheckboxElement,
2546
- {
2547
- ...props,
2548
- size,
2549
- radius,
2550
- disabled,
2551
- id
2552
- }
2553
- ),
2554
- (label || helperText) && /* @__PURE__ */ React6.createElement("div", { className: "hawa-grid hawa-gap-1.5" }, label && /* @__PURE__ */ React6.createElement(
2555
- "label",
2556
- {
2557
- htmlFor: id,
2558
- className: cn(
2559
- "hawa-w-fit hawa-select-none hawa-pt-0.5 hawa-text-sm hawa-font-medium",
2560
- disabled ? "hawa-cursor-not-allowed hawa-text-muted-foreground hawa-opacity-70 " : "hawa-cursor-pointer"
2561
- ),
2562
- style: {
2563
- // lineHeight: labelLineHeightStyles[size]
2564
- lineHeight: 1
2565
- }
2566
- },
2567
- label
2568
- ), sublabel && /* @__PURE__ */ React6.createElement(
2569
- "label",
2570
- {
2571
- htmlFor: id,
2572
- className: cn(
2573
- "hawa-w-fit hawa-select-none hawa-text-sm hawa-text-muted-foreground",
2574
- disabled ? "hawa-cursor-not-allowed hawa-text-muted-foreground hawa-opacity-70" : "hawa-cursor-pointer"
2575
- )
2576
- },
2577
- sublabel
2578
- ), helperText && !disabled && /* @__PURE__ */ React6.createElement(
2579
- "label",
2580
- {
2581
- htmlFor: id,
2582
- className: cn(
2583
- "hawa-w-fit hawa-select-none hawa-text-xs hawa-text-helper-color",
2584
- disabled && "hawa-cursor-not-allowed hawa-opacity-70"
2585
- )
2586
- },
2587
- helperText
2588
- ))
2589
- );
2590
- };
2591
- var CheckboxElement = React6.forwardRef(({ radius = "inherit", size = "default", className, ...props }, ref) => {
2592
- let checkboxRadius = {
2593
- none: "hawa-rounded-none",
2594
- inherit: "hawa-rounded-sm",
2595
- full: "hawa-rounded-full"
2596
- };
2597
- let checkboxSizes = {
2598
- xs: "hawa-w-3 hawa-h-3",
2599
- sm: "hawa-w-6 hawa-h-6",
2600
- default: "hawa-icon",
2601
- md: "hawa-w-8 hawa-h-8",
2602
- lg: "hawa-w-10 hawa-h-10",
2603
- xl: "hawa-w-12 hawa-h-12"
2604
- };
2605
- let checkboxIndicatorSizes = {
2606
- xs: "0.5em",
2607
- default: "0.60em",
2608
- sm: "0.75em",
2609
- md: "0.875em",
2610
- lg: "1em",
2611
- xl: "1.25em"
2612
- };
2613
- return /* @__PURE__ */ React6.createElement(
2614
- CheckboxPrimitive.Root,
2615
- {
2616
- ref,
2617
- className: cn(
2618
- "hawa-peer hawa-shrink-0 hawa-border hawa-border-primary hawa-ring-offset-background focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-2 disabled:hawa-cursor-not-allowed disabled:hawa-opacity-50 data-[state=checked]:hawa-bg-primary data-[state=checked]:hawa-text-primary-foreground",
2619
- checkboxSizes[size],
2620
- checkboxRadius[radius],
2621
- className
2622
- ),
2623
- ...props
2624
- },
2625
- /* @__PURE__ */ React6.createElement(
2626
- CheckboxPrimitive.Indicator,
2627
- {
2628
- className: cn(
2629
- "hawa-flex hawa-items-center hawa-justify-center hawa-text-current"
2630
- )
2631
- },
2632
- /* @__PURE__ */ React6.createElement(
2633
- "svg",
2634
- {
2635
- "aria-label": "Check Mark",
2636
- stroke: "currentColor",
2637
- fill: "currentColor",
2638
- strokeWidth: "0",
2639
- viewBox: "0 0 512 512",
2640
- height: checkboxIndicatorSizes[size],
2641
- width: checkboxIndicatorSizes[size]
2642
- },
2643
- /* @__PURE__ */ React6.createElement("path", { d: "M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z" })
2644
- ),
2645
- " "
2646
- )
2647
- );
2648
- });
2649
- CheckboxElement.displayName = CheckboxPrimitive.Root.displayName;
2650
-
2651
- // blocks/auth/RegisterForm.tsx
2652
- var RegisterForm = ({
2653
- texts,
2654
- registerFields = ["email"],
2655
- ...props
2656
- }) => {
2657
- var _a, _b, _c, _d, _e, _f;
2658
- const [passwordVisible, setPasswordVisible] = useState4(false);
2659
- const thirdPartyAuthTexts = {
2660
- continueWithGoogle: texts == null ? void 0 : texts.continueWithGoogle,
2661
- continueWithTwitter: texts == null ? void 0 : texts.continueWithTwitter,
2662
- continueWithApple: texts == null ? void 0 : texts.continueWithApple,
2663
- continueWithMicrosoft: texts == null ? void 0 : texts.continueWithMicrosoft,
2664
- continueWithGithub: texts == null ? void 0 : texts.continueWithGithub,
2665
- continueWithEmail: texts == null ? void 0 : texts.continueWithEmail,
2666
- continueWithPhone: texts == null ? void 0 : texts.continueWithPhone
2667
- };
2668
- const methods = useForm2();
2669
- let fieldSchemas = {};
2670
- registerFields.forEach((field) => {
2671
- var _a2, _b2, _c2, _d2, _e2, _f2;
2672
- switch (field) {
2673
- case "fullname":
2674
- fieldSchemas["fullName"] = z2.string().optional();
2675
- break;
2676
- case "email":
2677
- fieldSchemas["email"] = z2.string({ required_error: (_a2 = texts == null ? void 0 : texts.email) == null ? void 0 : _a2.required }).email({ message: (_b2 = texts == null ? void 0 : texts.email) == null ? void 0 : _b2.invalid }).min(1, { message: (_c2 = texts == null ? void 0 : texts.email) == null ? void 0 : _c2.required });
2678
- break;
2679
- case "username":
2680
- fieldSchemas["username"] = z2.string({ required_error: (_d2 = texts == null ? void 0 : texts.username) == null ? void 0 : _d2.required }).min(1, { message: (_e2 = texts == null ? void 0 : texts.username) == null ? void 0 : _e2.required }).refine(
2681
- (value) => {
2682
- const isValid = /^[a-zA-Z][a-zA-Z0-9_-]{2,14}$/.test(value);
2683
- return isValid;
2684
- },
2685
- { message: (_f2 = texts == null ? void 0 : texts.username) == null ? void 0 : _f2.invalid }
2686
- );
2687
- break;
2688
- }
2689
- });
2690
- const formSchema = z2.object({
2691
- ...fieldSchemas,
2692
- password: z2.string({ required_error: (_a = texts == null ? void 0 : texts.password) == null ? void 0 : _a.required }).min(5, { message: (_b = texts == null ? void 0 : texts.password) == null ? void 0 : _b.tooShort }).refine((value) => value !== "", {
2693
- message: (_c = texts == null ? void 0 : texts.password) == null ? void 0 : _c.required
2694
- }),
2695
- confirm_password: z2.string({ required_error: (_d = texts == null ? void 0 : texts.confirm) == null ? void 0 : _d.required }).refine((value) => value !== "", {
2696
- message: (_e = texts == null ? void 0 : texts.password) == null ? void 0 : _e.required
2697
- }),
2698
- refCode: z2.string().optional(),
2699
- reference: z2.string().optional(),
2700
- terms_accepted: z2.boolean({ required_error: texts == null ? void 0 : texts.termsRequired }).refine((value) => value, { message: texts == null ? void 0 : texts.termsRequired }),
2701
- newsletter_accepted: z2.boolean().optional()
2702
- }).refine((data) => data.password === data.confirm_password, {
2703
- message: (_f = texts == null ? void 0 : texts.confirm) == null ? void 0 : _f.dontMatch,
2704
- path: ["confirm_password"]
2705
- });
2706
- const { handleSubmit, control, formState } = useForm2({
2707
- resolver: zodResolver2(formSchema)
2708
- });
2709
- return /* @__PURE__ */ React7.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-4" }, /* @__PURE__ */ React7.createElement(Card, { dir: props.direction }, /* @__PURE__ */ React7.createElement(CardContent, { headless: true }, /* @__PURE__ */ React7.createElement("div", null, props.showError && /* @__PURE__ */ React7.createElement(
2710
- Alert,
2711
- {
2712
- title: props.errorTitle,
2713
- text: props.errorText,
2714
- severity: "error"
2715
- }
2716
- ), /* @__PURE__ */ React7.createElement(FormProvider, { ...methods }, /* @__PURE__ */ React7.createElement(
2717
- "form",
2718
- {
2719
- noValidate: true,
2720
- onSubmit: handleSubmit((e) => {
2721
- if (props.onRegister) {
2722
- return props.onRegister(e);
2723
- } else {
2724
- console.log(
2725
- "Form is submitted but onRegister prop is missing"
2726
- );
2727
- }
2728
- }),
2729
- className: "hawa-flex hawa-flex-col hawa-gap-4"
2730
- },
2731
- /* @__PURE__ */ React7.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-4" }, registerFields.map((fld, i) => {
2732
- if (fld === "fullname") {
2733
- return /* @__PURE__ */ React7.createElement(
2734
- Controller2,
2735
- {
2736
- key: i,
2737
- control,
2738
- name: "fullName",
2739
- render: ({ field }) => {
2740
- var _a2, _b2, _c2;
2741
- return /* @__PURE__ */ React7.createElement(
2742
- Input,
2743
- {
2744
- width: "full",
2745
- label: (_a2 = texts == null ? void 0 : texts.fullName) == null ? void 0 : _a2.label,
2746
- placeholder: (_b2 = texts == null ? void 0 : texts.fullName) == null ? void 0 : _b2.placeholder,
2747
- helperText: (_c2 = formState.errors.fullName) == null ? void 0 : _c2.message,
2748
- ...field
2749
- }
2750
- );
2751
- }
2752
- }
2753
- );
2754
- }
2755
- if (fld === "email") {
2756
- return /* @__PURE__ */ React7.createElement(
2757
- Controller2,
2758
- {
2759
- key: i,
2760
- control,
2761
- name: "email",
2762
- render: ({ field }) => {
2763
- var _a2, _b2, _c2;
2764
- return /* @__PURE__ */ React7.createElement(
2765
- Input,
2766
- {
2767
- dir: "ltr",
2768
- inputProps: {
2769
- className: props.direction === "rtl" ? "hawa-text-right" : "hawa-text-left"
2770
- },
2771
- width: "full",
2772
- autoComplete: "email",
2773
- label: (_a2 = texts == null ? void 0 : texts.email) == null ? void 0 : _a2.label,
2774
- helperText: (_b2 = formState.errors.email) == null ? void 0 : _b2.message,
2775
- placeholder: ((_c2 = texts == null ? void 0 : texts.email) == null ? void 0 : _c2.placeholder) || "Enter your email",
2776
- ...field
2777
- }
2778
- );
2779
- }
2780
- }
2781
- );
2782
- }
2783
- if (fld === "username") {
2784
- return /* @__PURE__ */ React7.createElement(
2785
- Controller2,
2786
- {
2787
- key: i,
2788
- control,
2789
- name: "username",
2790
- render: ({ field }) => {
2791
- var _a2, _b2, _c2;
2792
- return /* @__PURE__ */ React7.createElement(
2793
- Input,
2794
- {
2795
- width: "full",
2796
- autoComplete: "username",
2797
- label: (_a2 = texts == null ? void 0 : texts.username) == null ? void 0 : _a2.label,
2798
- helperText: (_b2 = formState.errors.username) == null ? void 0 : _b2.message,
2799
- placeholder: (_c2 = texts == null ? void 0 : texts.username) == null ? void 0 : _c2.placeholder,
2800
- ...field
2801
- }
2802
- );
2803
- }
2804
- }
2805
- );
2806
- }
2807
- })),
2808
- /* @__PURE__ */ React7.createElement(
2809
- Controller2,
2810
- {
2811
- control,
2812
- name: "password",
2813
- render: ({ field }) => {
2814
- var _a2, _b2, _c2;
2815
- return /* @__PURE__ */ React7.createElement(
2816
- Input,
2817
- {
2818
- width: "full",
2819
- type: passwordVisible ? "text" : "password",
2820
- endIcon: /* @__PURE__ */ React7.createElement(
2821
- "div",
2822
- {
2823
- className: "hawa-cursor-pointer",
2824
- onClick: () => setPasswordVisible(!passwordVisible)
2825
- },
2826
- passwordVisible ? /* @__PURE__ */ React7.createElement(EyeIcon, { className: "hawa-text-gray-500" }) : /* @__PURE__ */ React7.createElement(HiddenEyeIcon, { className: "hawa-text-gray-500" }),
2827
- " "
2828
- ),
2829
- autoComplete: "new-password",
2830
- label: (_a2 = texts == null ? void 0 : texts.password) == null ? void 0 : _a2.label,
2831
- placeholder: (_b2 = texts == null ? void 0 : texts.password) == null ? void 0 : _b2.placeholder,
2832
- helperText: (_c2 = formState.errors.password) == null ? void 0 : _c2.message,
2833
- ...field
2834
- }
2835
- );
2836
- }
2837
- }
2838
- ),
2839
- /* @__PURE__ */ React7.createElement(
2840
- Controller2,
2841
- {
2842
- control,
2843
- name: "confirm_password",
2844
- render: ({ field }) => {
2845
- var _a2, _b2, _c2;
2846
- return /* @__PURE__ */ React7.createElement(
2847
- Input,
2848
- {
2849
- width: "full",
2850
- type: "password",
2851
- autoComplete: "new-password",
2852
- label: (_a2 = texts == null ? void 0 : texts.confirm) == null ? void 0 : _a2.label,
2853
- placeholder: (_b2 = texts == null ? void 0 : texts.confirm) == null ? void 0 : _b2.placeholder,
2854
- helperText: (_c2 = formState.errors.confirm_password) == null ? void 0 : _c2.message,
2855
- ...field
2856
- }
2857
- );
2858
- }
2859
- }
2860
- ),
2861
- props.additionalInputs,
2862
- props.showRefCode && /* @__PURE__ */ React7.createElement(
2863
- Controller2,
2864
- {
2865
- control,
2866
- name: "refCode",
2867
- render: ({ field }) => {
2868
- var _a2;
2869
- return /* @__PURE__ */ React7.createElement(
2870
- Input,
2871
- {
2872
- width: "full",
2873
- label: texts == null ? void 0 : texts.refCode,
2874
- placeholder: (texts == null ? void 0 : texts.refCodePlaceholder) || "Enter the referral code",
2875
- helperText: (_a2 = formState.errors.refCode) == null ? void 0 : _a2.message,
2876
- ...field
2877
- }
2878
- );
2879
- }
2880
- }
2881
- ),
2882
- props.showUserSource && /* @__PURE__ */ React7.createElement(
2883
- Controller2,
2884
- {
2885
- control,
2886
- name: "reference",
2887
- render: ({ field }) => {
2888
- var _a2, _b2;
2889
- return /* @__PURE__ */ React7.createElement(
2890
- Select,
2891
- {
2892
- label: ((_a2 = texts == null ? void 0 : texts.userReference) == null ? void 0 : _a2.label) || "How did you learn about us?",
2893
- placeholder: (_b2 = texts == null ? void 0 : texts.userReference) == null ? void 0 : _b2.placeholder,
2894
- isCreatable: false,
2895
- isMulti: false,
2896
- isSearchable: false,
2897
- isClearable: false,
2898
- options: props.userReferenceOptions,
2899
- onChange: (e) => {
2900
- field.onChange(e.value);
2901
- }
2902
- }
2903
- );
2904
- }
2905
- }
2906
- ),
2907
- /* @__PURE__ */ React7.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-3" }, props.showTermsOption && /* @__PURE__ */ React7.createElement(
2908
- Controller2,
2909
- {
2910
- control,
2911
- name: "terms_accepted",
2912
- render: ({ field }) => {
2913
- var _a2, _b2;
2914
- return /* @__PURE__ */ React7.createElement(
2915
- Checkbox,
2916
- {
2917
- id: "terms_accepted",
2918
- helperText: (_b2 = (_a2 = formState.errors.terms_accepted) == null ? void 0 : _a2.message) == null ? void 0 : _b2.toString(),
2919
- onCheckedChange: (e) => field.onChange(e),
2920
- label: /* @__PURE__ */ React7.createElement("div", { className: "hawa-flex hawa-flex-row hawa-gap-0.5" }, /* @__PURE__ */ React7.createElement("span", null, texts == null ? void 0 : texts.iAcceptText), " ", /* @__PURE__ */ React7.createElement(StopPropagationWrapper, null, /* @__PURE__ */ React7.createElement(
2921
- "a",
2922
- {
2923
- onClick: props.onRouteToTOS,
2924
- className: "clickable-link"
2925
- },
2926
- texts == null ? void 0 : texts.termsText
2927
- )))
2928
- }
2929
- );
2930
- }
2931
- }
2932
- ), props.showNewsletterOption && /* @__PURE__ */ React7.createElement(
2933
- Controller2,
2934
- {
2935
- control,
2936
- name: "newsletter_accepted",
2937
- render: ({ field }) => /* @__PURE__ */ React7.createElement(
2938
- Checkbox,
2939
- {
2940
- id: "newsletter_accepted",
2941
- label: texts == null ? void 0 : texts.subscribeToNewsletter,
2942
- onCheckedChange: field.onChange
2943
- }
2944
- )
2945
- }
2946
- )),
2947
- /* @__PURE__ */ React7.createElement(
2948
- Button,
2949
- {
2950
- className: "hawa-mt-4 hawa-w-full",
2951
- type: "submit",
2952
- isLoading: props.isLoading,
2953
- disabled: props.isLoading
2954
- },
2955
- (texts == null ? void 0 : texts.registerText) || "Register"
2956
- ),
2957
- props.additionalButtons
2958
- )), /* @__PURE__ */ React7.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-justify-center hawa-gap-1 hawa-p-3 hawa-text-center hawa-text-sm hawa-font-normal dark:hawa-text-white" }, /* @__PURE__ */ React7.createElement("span", null, texts == null ? void 0 : texts.existingUserText), /* @__PURE__ */ React7.createElement("span", { onClick: props.onRouteToLogin, className: "clickable-link" }, (texts == null ? void 0 : texts.loginText) || "Login")))), props.viaGithub || props.viaGoogle || props.viaTwitter ? /* @__PURE__ */ React7.createElement(
2959
- CardFooter,
2960
- {
2961
- className: cn(
2962
- props.logosOnly ? "hawa-flex hawa-flex-row hawa-justify-center hawa-gap-2" : "hawa-grid hawa-grid-cols-1 hawa-gap-2"
2963
- )
2964
- },
2965
- /* @__PURE__ */ React7.createElement(
2966
- AuthButtons,
2967
- {
2968
- texts: thirdPartyAuthTexts,
2969
- viaGoogle: props.viaGoogle,
2970
- viaGithub: props.viaGithub,
2971
- viaTwitter: props.viaTwitter,
2972
- isGoogleLoading: props.isGoogleLoading,
2973
- isGithubLoading: props.isGithubLoading,
2974
- isTwitterLoading: props.isTwitterLoading,
2975
- handleGoogle: props.onGoogleRegister,
2976
- handleGithub: props.onGithubRegister,
2977
- handleTwitter: props.onTwitterRegister
2978
- }
2979
- )
2980
- ) : null));
2981
- };
2982
-
2983
- // blocks/auth/AppLanding.tsx
2984
- import React8 from "react";
2985
- var AppLanding = ({ texts, ...props }) => {
2986
- const thirdPartyAuthTexts = {
2987
- continueWithGoogle: texts == null ? void 0 : texts.continueWithGoogle,
2988
- continueWithTwitter: texts == null ? void 0 : texts.continueWithTwitter,
2989
- continueWithApple: texts == null ? void 0 : texts.continueWithApple,
2990
- continueWithMicrosoft: texts == null ? void 0 : texts.continueWithMicrosoft,
2991
- continueWithGithub: texts == null ? void 0 : texts.continueWithGithub,
2992
- continueWithEmail: texts == null ? void 0 : texts.continueWithEmail,
2993
- continueWithPhone: texts == null ? void 0 : texts.continueWithPhone
2994
- };
2995
- return /* @__PURE__ */ React8.createElement("div", { dir: props.direction }, /* @__PURE__ */ React8.createElement(Card, null, /* @__PURE__ */ React8.createElement(CardContent, { headless: true, className: "hawa-flex hawa-flex-col hawa-gap-6" }, /* @__PURE__ */ React8.createElement(
2996
- AuthButtons,
2997
- {
2998
- texts: thirdPartyAuthTexts,
2999
- viaApple: props.viaApple,
3000
- viaGoogle: props.viaGoogle,
3001
- viaEmail: props.viaEmail,
3002
- viaGithub: props.viaGithub,
3003
- viaMicrosoft: props.viaMicrosoft,
3004
- viaPhone: props.viaPhone,
3005
- viaTwitter: props.viaTwitter,
3006
- handleApple: props.handleApple,
3007
- handleGoogle: props.handleGoogle,
3008
- handleTwitter: props.handleTwitter,
3009
- handleMicrosoft: props.handleMicrosoft,
3010
- handleGithub: props.handleGithub,
3011
- handleEmail: props.handleEmail,
3012
- handlePhone: props.handlePhone
3013
- }
3014
- ), props.allowRegister && /* @__PURE__ */ React8.createElement("div", { className: "hawa-p-3 hawa-text-center hawa-text-sm hawa-font-normal dark:hawa-text-gray-300" }, texts == null ? void 0 : texts.newUserText, " ", /* @__PURE__ */ React8.createElement(
3015
- "span",
3016
- {
3017
- onClick: props.handleRouteToRegister,
3018
- className: "clickable-link"
3019
- },
3020
- texts == null ? void 0 : texts.createAccount
3021
- )))));
3022
- };
3023
-
3024
- // blocks/auth/CheckEmail.tsx
3025
- import React9 from "react";
3026
- var CheckEmail = ({ texts, handleResend }) => {
3027
- return /* @__PURE__ */ React9.createElement(Card, null, /* @__PURE__ */ React9.createElement(CardContent, { headless: true }, /* @__PURE__ */ React9.createElement("div", { className: "hawa-flex hawa-flex-col hawa-items-center hawa-justify-center hawa-text-center" }, /* @__PURE__ */ React9.createElement("div", { className: "hawa-flex hawa-h-16 hawa-w-16 hawa-flex-col hawa-items-center hawa-justify-center hawa-rounded-3xl hawa-bg-primary hawa-text-6xl hawa-font-bold hawa-text-primary-foreground" }, /* @__PURE__ */ React9.createElement(
3028
- "svg",
3029
- {
3030
- stroke: "currentColor",
3031
- fill: "none",
3032
- strokeWidth: "2",
3033
- viewBox: "0 0 24 24",
3034
- strokeLinecap: "round",
3035
- strokeLinejoin: "round",
3036
- height: "0.5em",
3037
- width: "0.5em",
3038
- xmlns: "http://www.w3.org/2000/svg"
3039
- },
3040
- /* @__PURE__ */ React9.createElement("path", { d: "M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z" }),
3041
- /* @__PURE__ */ React9.createElement("polyline", { points: "22,6 12,13 2,6" })
3042
- )), /* @__PURE__ */ React9.createElement("div", { className: "hawa-m-2 hawa-text-xl hawa-font-bold" }, (texts == null ? void 0 : texts.checkEmail) || "Check your Email"), /* @__PURE__ */ React9.createElement("div", { className: "hawa-text-sm" }, (texts == null ? void 0 : texts.pleaseVerify) || "Thank you for signing up! To complete your registration, we've sent a verification email to the address you provided. Please check your inbox and follow the instructions in the email to activate your account."))), /* @__PURE__ */ React9.createElement(CardFooter, { className: "hawa-flex hawa-flex-col hawa-justify-center " }, /* @__PURE__ */ React9.createElement("span", { className: "clickable-link hawa-text-sm", onClick: handleResend }, (texts == null ? void 0 : texts.resendEmail) || "Resend Email")));
3043
- };
3044
-
3045
- // blocks/auth/NewPassword.tsx
3046
- import React10, { useState as useState5 } from "react";
3047
- import { Controller as Controller3, useForm as useForm3 } from "react-hook-form";
3048
- import { zodResolver as zodResolver3 } from "@hookform/resolvers/zod";
3049
- import * as z3 from "zod";
3050
- var NewPasswordForm = ({ texts, ...props }) => {
3051
- var _a, _b, _c, _d, _e, _f, _g, _h, _i;
3052
- const formSchema = z3.object({
3053
- password: z3.string({ required_error: (_a = texts == null ? void 0 : texts.password) == null ? void 0 : _a.required }).min(1, { message: (_b = texts == null ? void 0 : texts.password) == null ? void 0 : _b.required }).min(8, { message: (_c = texts == null ? void 0 : texts.password) == null ? void 0 : _c.tooShort }),
3054
- confirm_password: z3.string({ required_error: (_d = texts == null ? void 0 : texts.confirm) == null ? void 0 : _d.required }).refine((value) => value !== "", {
3055
- message: (_e = texts == null ? void 0 : texts.password) == null ? void 0 : _e.required
3056
- })
3057
- }).refine((data) => data.password === data.confirm_password, {
3058
- message: (_f = texts == null ? void 0 : texts.confirm) == null ? void 0 : _f.dontMatch,
3059
- path: ["confirm_password"]
3060
- });
3061
- const { handleSubmit, control, formState } = useForm3({
3062
- resolver: zodResolver3(formSchema)
3063
- });
3064
- const [matchError, setMatchError] = useState5(false);
3065
- return /* @__PURE__ */ React10.createElement(Card, { dir: props.direction }, matchError && /* @__PURE__ */ React10.createElement(Alert, { text: (_g = texts == null ? void 0 : texts.confirm) == null ? void 0 : _g.dontMatch, severity: "error" }), props.passwordChanged ? /* @__PURE__ */ React10.createElement(CardContent, { headless: true }, /* @__PURE__ */ React10.createElement("div", { className: "hawa-text-center" }, texts == null ? void 0 : texts.passwordChanged)) : /* @__PURE__ */ React10.createElement(
3066
- "form",
3067
- {
3068
- noValidate: true,
3069
- onSubmit: handleSubmit((e) => {
3070
- if (props.handleNewPassword) {
3071
- return props.handleNewPassword(e);
3072
- } else {
3073
- console.log(
3074
- "Form is submitted but handleSubmission prop is missing"
3075
- );
3076
- }
3077
- })
3078
- },
3079
- !props.headless && /* @__PURE__ */ React10.createElement(CardHeader, null, /* @__PURE__ */ React10.createElement(CardTitle, null, "Create Password"), /* @__PURE__ */ React10.createElement(CardDescription, null, "Set a new password for your account")),
3080
- /* @__PURE__ */ React10.createElement(
3081
- CardContent,
3082
- {
3083
- headless: props.headless,
3084
- className: "hawa-flex hawa-flex-col hawa-gap-4"
3085
- },
3086
- /* @__PURE__ */ React10.createElement(
3087
- Controller3,
3088
- {
3089
- control,
3090
- name: "password",
3091
- render: ({ field }) => {
3092
- var _a2, _b2, _c2;
3093
- return /* @__PURE__ */ React10.createElement(
3094
- Input,
3095
- {
3096
- width: "full",
3097
- type: "password",
3098
- autoComplete: "new-password",
3099
- label: (_a2 = texts == null ? void 0 : texts.password) == null ? void 0 : _a2.label,
3100
- placeholder: (_b2 = texts == null ? void 0 : texts.password) == null ? void 0 : _b2.placeholder,
3101
- helperText: (_c2 = formState.errors.password) == null ? void 0 : _c2.message,
3102
- ...field
3103
- }
3104
- );
3105
- }
3106
- }
3107
- ),
3108
- /* @__PURE__ */ React10.createElement(
3109
- Controller3,
3110
- {
3111
- control,
3112
- name: "confirm_password",
3113
- render: ({ field }) => {
3114
- var _a2, _b2, _c2;
3115
- return /* @__PURE__ */ React10.createElement(
3116
- Input,
3117
- {
3118
- width: "full",
3119
- type: "password",
3120
- autoComplete: "new-password",
3121
- label: (_a2 = texts == null ? void 0 : texts.confirm) == null ? void 0 : _a2.label,
3122
- placeholder: (_b2 = texts == null ? void 0 : texts.confirm) == null ? void 0 : _b2.placeholder,
3123
- helperText: (_c2 = formState.errors.confirm_password) == null ? void 0 : _c2.message,
3124
- ...field
3125
- }
3126
- );
3127
- }
3128
- }
3129
- )
3130
- ),
3131
- /* @__PURE__ */ React10.createElement(CardFooter, { className: "hawa-flex hawa-flex-col" }, /* @__PURE__ */ React10.createElement(Button, { className: "hawa-w-full", type: "submit" }, texts == null ? void 0 : texts.updatePassword), props.allowRegister && /* @__PURE__ */ React10.createElement("div", { className: "hawa-mt-4 hawa-pb-0 hawa-text-center hawa-text-sm dark:hawa-text-gray-300" }, (_h = texts == null ? void 0 : texts.dontHaveAccount) != null ? _h : "Don't have an account? ", /* @__PURE__ */ React10.createElement(
3132
- "span",
3133
- {
3134
- className: "clickable-link",
3135
- onClick: props.handleRouteToRegister
3136
- },
3137
- (_i = texts == null ? void 0 : texts.registerText) != null ? _i : "Register"
3138
- )))
3139
- ));
3140
- };
3141
-
3142
- // blocks/auth/ResetPassword.tsx
3143
- import React11 from "react";
3144
- import { Controller as Controller4, useForm as useForm4 } from "react-hook-form";
3145
- import { zodResolver as zodResolver4 } from "@hookform/resolvers/zod";
3146
- import * as z4 from "zod";
3147
- var ResetPasswordForm = (props) => {
3148
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
3149
- const formSchema = z4.object({
3150
- email: z4.string({ required_error: (_b = (_a = props.texts) == null ? void 0 : _a.email) == null ? void 0 : _b.required }).email({ message: (_d = (_c = props.texts) == null ? void 0 : _c.email) == null ? void 0 : _d.invalid }).min(1, { message: (_f = (_e = props.texts) == null ? void 0 : _e.email) == null ? void 0 : _f.required })
3151
- });
3152
- const { handleSubmit, control, formState } = useForm4({
3153
- resolver: zodResolver4(formSchema)
3154
- });
3155
- return /* @__PURE__ */ React11.createElement(Card, { dir: props.direction }, !props.sent ? /* @__PURE__ */ React11.createElement(React11.Fragment, null, !props.headless && /* @__PURE__ */ React11.createElement(CardHeader, null, /* @__PURE__ */ React11.createElement(CardTitle, null, ((_g = props.texts) == null ? void 0 : _g.headTitle) || "Reset Password"), /* @__PURE__ */ React11.createElement(CardDescription, null, ((_h = props.texts) == null ? void 0 : _h.headDescription) || "Enter your email to reset your account password")), /* @__PURE__ */ React11.createElement(
3156
- "form",
3157
- {
3158
- noValidate: true,
3159
- onSubmit: handleSubmit((e) => {
3160
- if (props.handleResetPassword) {
3161
- return props.handleResetPassword(e);
3162
- } else {
3163
- console.log("handleResetPassword prop is missing");
3164
- }
3165
- })
3166
- },
3167
- /* @__PURE__ */ React11.createElement(CardContent, { headless: props.headless }, /* @__PURE__ */ React11.createElement(
3168
- Controller4,
3169
- {
3170
- control,
3171
- name: "email",
3172
- render: ({ field }) => {
3173
- var _a2, _b2, _c2, _d2, _e2;
3174
- return /* @__PURE__ */ React11.createElement(
3175
- Input,
3176
- {
3177
- width: "full",
3178
- label: (_b2 = (_a2 = props.texts) == null ? void 0 : _a2.email) == null ? void 0 : _b2.label,
3179
- helperText: (_c2 = formState.errors.email) == null ? void 0 : _c2.message,
3180
- placeholder: (_e2 = (_d2 = props.texts) == null ? void 0 : _d2.email) == null ? void 0 : _e2.placeholder,
3181
- ...field
3182
- }
3183
- );
3184
- }
3185
- }
3186
- )),
3187
- /* @__PURE__ */ React11.createElement(CardFooter, { className: "hawa-flex hawa-flex-col" }, /* @__PURE__ */ React11.createElement(Button, { type: "submit", className: "hawa-w-full" }, (_i = props.texts) == null ? void 0 : _i.resetPassword), props.allowRegister && /* @__PURE__ */ React11.createElement("div", { className: "hawa-mt-4 hawa-pb-0 hawa-text-center hawa-text-sm dark:hawa-text-gray-300" }, (_k = (_j = props.texts) == null ? void 0 : _j.dontHaveAccount) != null ? _k : "Don't have an account? ", /* @__PURE__ */ React11.createElement(
3188
- "span",
3189
- {
3190
- className: "clickable-link",
3191
- onClick: props.handleRouteToRegister
3192
- },
3193
- (_m = (_l = props.texts) == null ? void 0 : _l.registerText) != null ? _m : "Register"
3194
- )))
3195
- )) : /* @__PURE__ */ React11.createElement(CardContent, { headless: true }, /* @__PURE__ */ React11.createElement("div", { className: "hawa-text-center" }, (_n = props.texts) == null ? void 0 : _n.emailSentText)));
3196
- };
3197
-
3198
- // blocks/auth/CodeConfirmation.tsx
3199
- import React13, { useEffect as useEffect4, useState as useState7 } from "react";
3200
- import { Controller as Controller5, useForm as useForm5 } from "react-hook-form";
3201
- import { zodResolver as zodResolver5 } from "@hookform/resolvers/zod";
3202
- import * as z5 from "zod";
3203
-
3204
- // elements/pinInput/PinInput.tsx
3205
- import React12, { useEffect as useEffect3, useState as useState6 } from "react";
3206
- var PinInput = ({
3207
- label,
3208
- icon,
3209
- digits,
3210
- width = "normal",
3211
- getPins,
3212
- inputProps,
3213
- ...props
3214
- }) => {
3215
- const [pin, setPin] = useState6(Array.from(Array(digits)));
3216
- const handleKeyDown = (e, index) => {
3217
- let backTo = 0;
3218
- if (e.key === "Backspace") {
3219
- e.target.value.length === 0 ? backTo = index - 1 : backTo = index;
3220
- const previousInput = document.getElementById(`input-${backTo}`);
3221
- previousInput == null ? void 0 : previousInput.focus();
3222
- }
3223
- };
3224
- useEffect3(() => {
3225
- let unfilled = pin.includes(void 0);
3226
- if (!unfilled && getPins) {
3227
- getPins(pin);
3228
- }
3229
- });
3230
- const handleChange = (e, index) => {
3231
- if (!/^\d*$/.test(e.target.value)) {
3232
- const newPin = [...pin];
3233
- newPin[index] = "";
3234
- setPin(newPin);
3235
- return;
3236
- } else {
3237
- const newPin = [...pin];
3238
- newPin[index] = e.target.value;
3239
- setPin(newPin);
3240
- if (e.target.value.length === 1) {
3241
- const nextInput = document.getElementById(`input-${index + 1}`);
3242
- nextInput == null ? void 0 : nextInput.focus();
3243
- } else if (e.target.value.length === 0) {
3244
- const previousInput = document.getElementById(`input-${index - 1}`);
3245
- previousInput == null ? void 0 : previousInput.focus();
3246
- }
3247
- }
3248
- };
3249
- return /* @__PURE__ */ React12.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-2" }, /* @__PURE__ */ React12.createElement(
3250
- "div",
3251
- {
3252
- className: "hawa-flex hawa-w-full hawa-flex-row hawa-justify-center hawa-gap-2",
3253
- dir: "ltr"
3254
- },
3255
- pin.map((value, index) => /* @__PURE__ */ React12.createElement(
3256
- "input",
3257
- {
3258
- key: index,
3259
- type: "text",
3260
- maxLength: 1,
3261
- value,
3262
- inputMode: "numeric",
3263
- id: `input-${index}`,
3264
- pattern: "[0-9]*",
3265
- className: cn(
3266
- "hawa-h-10 hawa-rounded hawa-border hawa-bg-background hawa-text-center",
3267
- width === "full" ? "hawa-w-full" : "hawa-w-10"
3268
- ),
3269
- onChange: (e) => handleChange(e, index),
3270
- onKeyDown: (e) => handleKeyDown(e, index),
3271
- onFocus: (e) => e.target.select(),
3272
- ...inputProps
3273
- }
3274
- ))
3275
- ), /* @__PURE__ */ React12.createElement(
3276
- "p",
3277
- {
3278
- className: cn(
3279
- "hawa-my-0 hawa-text-start hawa-text-xs hawa-text-helper-color hawa-transition-all",
3280
- props.helperText ? "hawa-h-4 hawa-opacity-100" : "hawa-h-0 hawa-opacity-0"
3281
- )
3282
- },
3283
- props.helperText
3284
- ));
3285
- };
3286
-
3287
- // blocks/auth/CodeConfirmation.tsx
3288
- var CodeConfirmation = (props) => {
3289
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
3290
- const formSchema = z5.object({
3291
- otp_code: z5.string({ required_error: (_a = props.texts) == null ? void 0 : _a.codeRequiredText }).min(6, { message: (_b = props.texts) == null ? void 0 : _b.codeTooShort })
3292
- });
3293
- const { handleSubmit, control, formState, setValue } = useForm5({
3294
- resolver: zodResolver5(formSchema)
3295
- });
3296
- const [resendTimer, setResendTimer] = useState7(null);
3297
- const [remainingTime, setRemainingTime] = useState7(0);
3298
- const [showResendTimer, setShowResendTimer] = useState7(false);
3299
- const startResendTimer = () => {
3300
- if (resendTimer !== null) {
3301
- clearInterval(resendTimer);
3302
- setResendTimer(null);
3303
- }
3304
- const timerDuration = 60;
3305
- setRemainingTime(timerDuration);
3306
- setShowResendTimer(true);
3307
- const newTimer = window.setInterval(() => {
3308
- setRemainingTime((prevTime) => {
3309
- if (prevTime > 0) {
3310
- return prevTime - 1;
3311
- } else {
3312
- clearInterval(newTimer);
3313
- setShowResendTimer(false);
3314
- return 0;
3315
- }
3316
- });
3317
- }, 1e3);
3318
- setResendTimer(newTimer);
3319
- };
3320
- useEffect4(() => {
3321
- return () => {
3322
- if (resendTimer !== null) {
3323
- clearInterval(resendTimer);
3324
- }
3325
- };
3326
- }, []);
3327
- return /* @__PURE__ */ React13.createElement(Card, null, /* @__PURE__ */ React13.createElement(CardContent, { headless: true }, props.showError && /* @__PURE__ */ React13.createElement(
3328
- Alert,
3329
- {
3330
- title: props.errorTitle,
3331
- text: props.errorText,
3332
- severity: "error"
3333
- }
3334
- ), /* @__PURE__ */ React13.createElement("div", { className: "hawa-mb-4 dark:hawa-text-white" }, /* @__PURE__ */ React13.createElement("div", { className: "hawa-text-lg hawa-font-bold" }, ((_c = props.texts) == null ? void 0 : _c.checkYourPhone) || "Please check your phone"), /* @__PURE__ */ React13.createElement("div", { className: "hawa-text-muted-foreground" }, /* @__PURE__ */ React13.createElement("span", null, ((_d = props.texts) == null ? void 0 : _d.weSentCode) || "We've sent a code to "), /* @__PURE__ */ React13.createElement("span", null, props.phoneNumber))), /* @__PURE__ */ React13.createElement(
3335
- "form",
3336
- {
3337
- noValidate: true,
3338
- onSubmit: handleSubmit((e) => {
3339
- if (props.handleConfirm) {
3340
- return props.handleConfirm(e);
3341
- } else {
3342
- console.log(
3343
- "Form is submitted but handleConfirm prop is missing"
3344
- );
3345
- }
3346
- })
3347
- },
3348
- /* @__PURE__ */ React13.createElement(
3349
- Controller5,
3350
- {
3351
- control,
3352
- name: "otp_code",
3353
- render: ({ field }) => {
3354
- var _a2;
3355
- return /* @__PURE__ */ React13.createElement(
3356
- PinInput,
3357
- {
3358
- width: "full",
3359
- digits: 6,
3360
- getPins: (e) => setValue("otp_code", e.join("")),
3361
- helperText: (_a2 = formState.errors.otp_code) == null ? void 0 : _a2.message
3362
- }
3363
- );
3364
- }
3365
- }
3366
- ),
3367
- showResendTimer ? /* @__PURE__ */ React13.createElement("div", { className: " hawa-py-2 hawa-text-center hawa-text-xs hawa-text-muted-foreground" }, (_e = props.texts) == null ? void 0 : _e.resendCodeTimer, " ", /* @__PURE__ */ React13.createElement("strong", null, remainingTime), " ", (_f = props.texts) == null ? void 0 : _f.seconds) : /* @__PURE__ */ React13.createElement("div", { className: " hawa-py-2 hawa-text-center hawa-text-xs hawa-text-muted-foreground" }, /* @__PURE__ */ React13.createElement("span", null, (_h = (_g = props.texts) == null ? void 0 : _g.didntGetCode) != null ? _h : "Didn't get the code?"), " ", /* @__PURE__ */ React13.createElement(
3368
- "span",
3369
- {
3370
- className: "clickable-link",
3371
- onClick: () => {
3372
- startResendTimer();
3373
- props.handleResend();
3374
- }
3375
- },
3376
- ((_i = props.texts) == null ? void 0 : _i.resendCode) || "Click to resend"
3377
- )),
3378
- /* @__PURE__ */ React13.createElement("div", { className: "hawa-mt-4 hawa-grid hawa-grid-cols-2 hawa-gap-2" }, /* @__PURE__ */ React13.createElement(Button, { variant: "secondary" }, ((_j = props.texts) == null ? void 0 : _j.cancel) || "Cancel"), /* @__PURE__ */ React13.createElement(Button, { isLoading: props.confirmLoading }, ((_k = props.texts) == null ? void 0 : _k.confirm) || "Confirm"))
3379
- )));
3380
- };
3381
- export {
3382
- AppLanding,
3383
- CheckEmail,
3384
- CodeConfirmation,
3385
- LoginForm,
3386
- NewPasswordForm,
3387
- RegisterForm,
3388
- ResetPasswordForm
3389
- };