@thunderid/react 0.2.0 → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (475) hide show
  1. package/dist/ThunderIDReactClient.d.ts +4 -4
  2. package/dist/ThunderIDReactClient.d.ts.map +1 -1
  3. package/dist/ThunderIDReactClient.js +6 -6
  4. package/dist/ThunderIDReactClient.js.map +1 -1
  5. package/dist/cjs/ThunderIDReactClient.cjs +5 -5
  6. package/dist/cjs/ThunderIDReactClient.cjs.map +1 -1
  7. package/dist/cjs/components/actions/SignInButton/SignInButton.cjs.map +1 -1
  8. package/dist/cjs/components/adapters/Consent.cjs.map +1 -1
  9. package/dist/cjs/components/adapters/ConsentCheckboxList.cjs +1 -1
  10. package/dist/cjs/components/adapters/ConsentCheckboxList.cjs.map +1 -1
  11. package/dist/cjs/components/auth/Callback/Callback.cjs +1 -1
  12. package/dist/cjs/components/auth/Callback/Callback.cjs.map +1 -1
  13. package/dist/cjs/components/auth/Callback/TokenCallback.cjs +3 -3
  14. package/dist/cjs/components/auth/Callback/TokenCallback.cjs.map +1 -1
  15. package/dist/cjs/components/factories/FieldFactory.cjs +2 -2
  16. package/dist/cjs/components/factories/FieldFactory.cjs.map +1 -1
  17. package/dist/cjs/components/presentation/CreateOrganization/BaseCreateOrganization.cjs +1 -1
  18. package/dist/cjs/components/presentation/OrganizationProfile/BaseOrganizationProfile.cjs +1 -1
  19. package/dist/cjs/components/presentation/UserProfile/BaseUserProfile.cjs +3 -3
  20. package/dist/cjs/components/presentation/auth/AcceptInvite/{v2/AcceptInvite.cjs → AcceptInvite.cjs} +2 -2
  21. package/dist/cjs/components/presentation/auth/AcceptInvite/AcceptInvite.cjs.map +1 -0
  22. package/dist/cjs/components/presentation/auth/AcceptInvite/{v2/BaseAcceptInvite.cjs → BaseAcceptInvite.cjs} +47 -18
  23. package/dist/cjs/components/presentation/auth/AcceptInvite/BaseAcceptInvite.cjs.map +1 -0
  24. package/dist/cjs/components/presentation/auth/AcceptInvite/{v2/BaseAcceptInvite.styles.cjs → BaseAcceptInvite.styles.cjs} +2 -2
  25. package/dist/cjs/components/presentation/auth/AcceptInvite/BaseAcceptInvite.styles.cjs.map +1 -0
  26. package/dist/cjs/components/presentation/auth/AuthOptionFactory.cjs +50 -32
  27. package/dist/cjs/components/presentation/auth/AuthOptionFactory.cjs.map +1 -1
  28. package/dist/cjs/components/presentation/auth/InviteUser/{v2/BaseInviteUser.cjs → BaseInviteUser.cjs} +44 -15
  29. package/dist/cjs/components/presentation/auth/InviteUser/BaseInviteUser.cjs.map +1 -0
  30. package/dist/cjs/components/presentation/auth/InviteUser/{v2/BaseInviteUser.styles.cjs → BaseInviteUser.styles.cjs} +2 -2
  31. package/dist/cjs/components/presentation/auth/InviteUser/BaseInviteUser.styles.cjs.map +1 -0
  32. package/dist/cjs/components/presentation/auth/InviteUser/{v2/InviteUser.cjs → InviteUser.cjs} +3 -3
  33. package/dist/cjs/components/presentation/auth/InviteUser/InviteUser.cjs.map +1 -0
  34. package/dist/cjs/components/presentation/auth/OrganizationUnitPicker/{v2/OrganizationUnitPicker.cjs → OrganizationUnitPicker.cjs} +3 -3
  35. package/dist/cjs/components/presentation/auth/OrganizationUnitPicker/OrganizationUnitPicker.cjs.map +1 -0
  36. package/dist/cjs/components/presentation/auth/OrganizationUnitPicker/{v2/OrganizationUnitPicker.styles.cjs → OrganizationUnitPicker.styles.cjs} +2 -2
  37. package/dist/cjs/components/presentation/auth/OrganizationUnitPicker/OrganizationUnitPicker.styles.cjs.map +1 -0
  38. package/dist/cjs/components/presentation/auth/Recovery/BaseRecovery.cjs +389 -8
  39. package/dist/cjs/components/presentation/auth/Recovery/BaseRecovery.cjs.map +1 -1
  40. package/dist/cjs/components/presentation/auth/Recovery/Recovery.cjs +51 -22
  41. package/dist/cjs/components/presentation/auth/Recovery/Recovery.cjs.map +1 -1
  42. package/dist/cjs/components/presentation/auth/SignIn/BaseSignIn.cjs +346 -8
  43. package/dist/cjs/components/presentation/auth/SignIn/BaseSignIn.cjs.map +1 -1
  44. package/dist/cjs/components/presentation/auth/SignIn/SignIn.cjs +547 -36
  45. package/dist/cjs/components/presentation/auth/SignIn/SignIn.cjs.map +1 -1
  46. package/dist/cjs/components/presentation/auth/SignUp/BaseSignUp.cjs +691 -8
  47. package/dist/cjs/components/presentation/auth/SignUp/BaseSignUp.cjs.map +1 -1
  48. package/dist/cjs/components/presentation/auth/SignUp/SignUp.cjs +66 -76
  49. package/dist/cjs/components/presentation/auth/SignUp/SignUp.cjs.map +1 -1
  50. package/dist/cjs/components/primitives/Alert/Alert.cjs +1 -1
  51. package/dist/cjs/components/primitives/Checkbox/Checkbox.cjs +1 -1
  52. package/dist/cjs/components/primitives/FormControl/FormControl.cjs +1 -1
  53. package/dist/cjs/components/primitives/Toggle/Toggle.cjs +1 -1
  54. package/dist/cjs/contexts/ComponentRenderer/ComponentRendererContext.cjs.map +1 -1
  55. package/dist/cjs/contexts/FlowMeta/FlowMetaProvider.cjs +5 -7
  56. package/dist/cjs/contexts/FlowMeta/FlowMetaProvider.cjs.map +1 -1
  57. package/dist/cjs/contexts/Theme/ThemeProvider.cjs +76 -37
  58. package/dist/cjs/contexts/Theme/ThemeProvider.cjs.map +1 -1
  59. package/dist/cjs/contexts/ThunderID/ThunderIDContext.cjs +0 -1
  60. package/dist/cjs/contexts/ThunderID/ThunderIDContext.cjs.map +1 -1
  61. package/dist/cjs/contexts/ThunderID/ThunderIDProvider.cjs +0 -3
  62. package/dist/cjs/contexts/ThunderID/ThunderIDProvider.cjs.map +1 -1
  63. package/dist/cjs/hooks/{v2/useOAuthCallback.cjs → useOAuthCallback.cjs} +2 -2
  64. package/dist/cjs/hooks/useOAuthCallback.cjs.map +1 -0
  65. package/dist/cjs/index.cjs +47 -50
  66. package/dist/cjs/utils/{v2/buildThemeConfigFromFlowMeta.cjs → buildThemeConfigFromFlowMeta.cjs} +1 -1
  67. package/dist/cjs/utils/buildThemeConfigFromFlowMeta.cjs.map +1 -0
  68. package/dist/cjs/utils/{v2/flowTransformer.cjs → flowTransformer.cjs} +1 -1
  69. package/dist/cjs/utils/flowTransformer.cjs.map +1 -0
  70. package/dist/cjs/utils/{v2/getAuthComponentHeadings.cjs → getAuthComponentHeadings.cjs} +1 -1
  71. package/dist/cjs/utils/getAuthComponentHeadings.cjs.map +1 -0
  72. package/dist/cjs/utils/{v2/passkey.cjs → passkey.cjs} +2 -2
  73. package/dist/cjs/utils/passkey.cjs.map +1 -0
  74. package/dist/cjs/utils/{v2/resolveTranslationsInArray.cjs → resolveTranslationsInArray.cjs} +1 -1
  75. package/dist/cjs/utils/resolveTranslationsInArray.cjs.map +1 -0
  76. package/dist/cjs/utils/{v2/resolveTranslationsInObject.cjs → resolveTranslationsInObject.cjs} +2 -2
  77. package/dist/cjs/utils/resolveTranslationsInObject.cjs.map +1 -0
  78. package/dist/components/actions/SignInButton/SignInButton.d.ts.map +1 -1
  79. package/dist/components/actions/SignInButton/SignInButton.js.map +1 -1
  80. package/dist/components/adapters/Consent.d.ts +1 -1
  81. package/dist/components/adapters/Consent.d.ts.map +1 -1
  82. package/dist/components/adapters/Consent.js.map +1 -1
  83. package/dist/components/adapters/ConsentCheckboxList.d.ts +1 -1
  84. package/dist/components/adapters/ConsentCheckboxList.d.ts.map +1 -1
  85. package/dist/components/adapters/ConsentCheckboxList.js +1 -1
  86. package/dist/components/adapters/ConsentCheckboxList.js.map +1 -1
  87. package/dist/components/auth/Callback/Callback.d.ts +1 -1
  88. package/dist/components/auth/Callback/Callback.js +1 -1
  89. package/dist/components/auth/Callback/Callback.js.map +1 -1
  90. package/dist/components/auth/Callback/TokenCallback.js +4 -4
  91. package/dist/components/auth/Callback/TokenCallback.js.map +1 -1
  92. package/dist/components/factories/FieldFactory.d.ts +2 -2
  93. package/dist/components/factories/FieldFactory.js +2 -2
  94. package/dist/components/factories/FieldFactory.js.map +1 -1
  95. package/dist/components/presentation/CreateOrganization/BaseCreateOrganization.js +1 -1
  96. package/dist/components/presentation/OrganizationProfile/BaseOrganizationProfile.js +1 -1
  97. package/dist/components/presentation/UserProfile/BaseUserProfile.js +3 -3
  98. package/dist/components/presentation/auth/AcceptInvite/AcceptInvite.d.ts.map +1 -0
  99. package/dist/components/presentation/auth/AcceptInvite/{v2/AcceptInvite.js → AcceptInvite.js} +1 -1
  100. package/dist/components/presentation/auth/AcceptInvite/AcceptInvite.js.map +1 -0
  101. package/dist/components/presentation/auth/AcceptInvite/{v2/BaseAcceptInvite.d.ts → BaseAcceptInvite.d.ts} +3 -2
  102. package/dist/components/presentation/auth/AcceptInvite/BaseAcceptInvite.d.ts.map +1 -0
  103. package/dist/components/presentation/auth/AcceptInvite/{v2/BaseAcceptInvite.js → BaseAcceptInvite.js} +45 -17
  104. package/dist/components/presentation/auth/AcceptInvite/BaseAcceptInvite.js.map +1 -0
  105. package/dist/components/presentation/auth/AcceptInvite/BaseAcceptInvite.styles.d.ts.map +1 -0
  106. package/dist/components/presentation/auth/AcceptInvite/{v2/BaseAcceptInvite.styles.js → BaseAcceptInvite.styles.js} +1 -1
  107. package/dist/components/presentation/auth/AcceptInvite/BaseAcceptInvite.styles.js.map +1 -0
  108. package/dist/components/presentation/auth/AcceptInvite/index.d.ts +4 -4
  109. package/dist/components/presentation/auth/AcceptInvite/index.d.ts.map +1 -1
  110. package/dist/components/presentation/auth/AuthOptionFactory.d.ts +1 -1
  111. package/dist/components/presentation/auth/AuthOptionFactory.d.ts.map +1 -1
  112. package/dist/components/presentation/auth/AuthOptionFactory.js +51 -33
  113. package/dist/components/presentation/auth/AuthOptionFactory.js.map +1 -1
  114. package/dist/components/presentation/auth/InviteUser/{v2/BaseInviteUser.d.ts → BaseInviteUser.d.ts} +3 -2
  115. package/dist/components/presentation/auth/InviteUser/BaseInviteUser.d.ts.map +1 -0
  116. package/dist/components/presentation/auth/InviteUser/{v2/BaseInviteUser.js → BaseInviteUser.js} +44 -15
  117. package/dist/components/presentation/auth/InviteUser/BaseInviteUser.js.map +1 -0
  118. package/dist/components/presentation/auth/InviteUser/BaseInviteUser.styles.d.ts.map +1 -0
  119. package/dist/components/presentation/auth/InviteUser/{v2/BaseInviteUser.styles.js → BaseInviteUser.styles.js} +1 -1
  120. package/dist/components/presentation/auth/InviteUser/BaseInviteUser.styles.js.map +1 -0
  121. package/dist/components/presentation/auth/InviteUser/InviteUser.d.ts.map +1 -0
  122. package/dist/components/presentation/auth/InviteUser/{v2/InviteUser.js → InviteUser.js} +2 -2
  123. package/dist/components/presentation/auth/InviteUser/InviteUser.js.map +1 -0
  124. package/dist/components/presentation/auth/InviteUser/index.d.ts +4 -4
  125. package/dist/components/presentation/auth/InviteUser/index.d.ts.map +1 -1
  126. package/dist/components/presentation/auth/OrganizationUnitPicker/OrganizationUnitPicker.d.ts.map +1 -0
  127. package/dist/components/presentation/auth/OrganizationUnitPicker/{v2/OrganizationUnitPicker.js → OrganizationUnitPicker.js} +2 -2
  128. package/dist/components/presentation/auth/OrganizationUnitPicker/OrganizationUnitPicker.js.map +1 -0
  129. package/dist/components/presentation/auth/OrganizationUnitPicker/OrganizationUnitPicker.styles.d.ts.map +1 -0
  130. package/dist/components/presentation/auth/OrganizationUnitPicker/{v2/OrganizationUnitPicker.styles.js → OrganizationUnitPicker.styles.js} +1 -1
  131. package/dist/components/presentation/auth/OrganizationUnitPicker/OrganizationUnitPicker.styles.js.map +1 -0
  132. package/dist/components/presentation/auth/OrganizationUnitPicker/index.d.ts +2 -2
  133. package/dist/components/presentation/auth/OrganizationUnitPicker/index.d.ts.map +1 -1
  134. package/dist/components/presentation/auth/Recovery/BaseRecovery.d.ts +63 -4
  135. package/dist/components/presentation/auth/Recovery/BaseRecovery.d.ts.map +1 -1
  136. package/dist/components/presentation/auth/Recovery/BaseRecovery.js +389 -10
  137. package/dist/components/presentation/auth/Recovery/BaseRecovery.js.map +1 -1
  138. package/dist/components/presentation/auth/Recovery/Recovery.d.ts +21 -22
  139. package/dist/components/presentation/auth/Recovery/Recovery.d.ts.map +1 -1
  140. package/dist/components/presentation/auth/Recovery/Recovery.js +51 -23
  141. package/dist/components/presentation/auth/Recovery/Recovery.js.map +1 -1
  142. package/dist/components/presentation/auth/SignIn/BaseSignIn.d.ts +213 -6
  143. package/dist/components/presentation/auth/SignIn/BaseSignIn.d.ts.map +1 -1
  144. package/dist/components/presentation/auth/SignIn/BaseSignIn.js +346 -10
  145. package/dist/components/presentation/auth/SignIn/BaseSignIn.js.map +1 -1
  146. package/dist/components/presentation/auth/SignIn/SignIn.d.ts +122 -13
  147. package/dist/components/presentation/auth/SignIn/SignIn.d.ts.map +1 -1
  148. package/dist/components/presentation/auth/SignIn/SignIn.js +548 -38
  149. package/dist/components/presentation/auth/SignIn/SignIn.js.map +1 -1
  150. package/dist/components/presentation/auth/SignUp/BaseSignUp.d.ts +164 -6
  151. package/dist/components/presentation/auth/SignUp/BaseSignUp.d.ts.map +1 -1
  152. package/dist/components/presentation/auth/SignUp/BaseSignUp.js +691 -10
  153. package/dist/components/presentation/auth/SignUp/BaseSignUp.js.map +1 -1
  154. package/dist/components/presentation/auth/SignUp/SignUp.d.ts +15 -74
  155. package/dist/components/presentation/auth/SignUp/SignUp.d.ts.map +1 -1
  156. package/dist/components/presentation/auth/SignUp/SignUp.js +67 -77
  157. package/dist/components/presentation/auth/SignUp/SignUp.js.map +1 -1
  158. package/dist/components/primitives/Alert/Alert.js +1 -1
  159. package/dist/components/primitives/Checkbox/Checkbox.js +1 -1
  160. package/dist/components/primitives/FormControl/FormControl.js +1 -1
  161. package/dist/components/primitives/Toggle/Toggle.js +1 -1
  162. package/dist/contexts/ComponentRenderer/ComponentRendererContext.d.ts +1 -1
  163. package/dist/contexts/ComponentRenderer/ComponentRendererContext.d.ts.map +1 -1
  164. package/dist/contexts/ComponentRenderer/ComponentRendererContext.js.map +1 -1
  165. package/dist/contexts/FlowMeta/FlowMetaProvider.d.ts.map +1 -1
  166. package/dist/contexts/FlowMeta/FlowMetaProvider.js +6 -8
  167. package/dist/contexts/FlowMeta/FlowMetaProvider.js.map +1 -1
  168. package/dist/contexts/Theme/ThemeProvider.d.ts +19 -39
  169. package/dist/contexts/Theme/ThemeProvider.d.ts.map +1 -1
  170. package/dist/contexts/Theme/ThemeProvider.js +76 -38
  171. package/dist/contexts/Theme/ThemeProvider.js.map +1 -1
  172. package/dist/contexts/ThunderID/ThunderIDContext.d.ts +1 -2
  173. package/dist/contexts/ThunderID/ThunderIDContext.d.ts.map +1 -1
  174. package/dist/contexts/ThunderID/ThunderIDContext.js +0 -1
  175. package/dist/contexts/ThunderID/ThunderIDContext.js.map +1 -1
  176. package/dist/contexts/ThunderID/ThunderIDProvider.d.ts.map +1 -1
  177. package/dist/contexts/ThunderID/ThunderIDProvider.js +1 -4
  178. package/dist/contexts/ThunderID/ThunderIDProvider.js.map +1 -1
  179. package/dist/hooks/useOAuthCallback.d.ts.map +1 -0
  180. package/dist/hooks/{v2/useOAuthCallback.js → useOAuthCallback.js} +1 -1
  181. package/dist/hooks/useOAuthCallback.js.map +1 -0
  182. package/dist/index.d.ts +3 -9
  183. package/dist/index.d.ts.map +1 -1
  184. package/dist/index.js +28 -35
  185. package/dist/utils/buildThemeConfigFromFlowMeta.d.ts.map +1 -0
  186. package/dist/utils/{v2/buildThemeConfigFromFlowMeta.js → buildThemeConfigFromFlowMeta.js} +1 -1
  187. package/dist/utils/buildThemeConfigFromFlowMeta.js.map +1 -0
  188. package/dist/utils/{v2/flowTransformer.d.ts → flowTransformer.d.ts} +3 -3
  189. package/dist/utils/flowTransformer.d.ts.map +1 -0
  190. package/dist/utils/{v2/flowTransformer.js → flowTransformer.js} +1 -1
  191. package/dist/utils/flowTransformer.js.map +1 -0
  192. package/dist/utils/{v2/getAuthComponentHeadings.d.ts → getAuthComponentHeadings.d.ts} +1 -1
  193. package/dist/utils/getAuthComponentHeadings.d.ts.map +1 -0
  194. package/dist/utils/{v2/getAuthComponentHeadings.js → getAuthComponentHeadings.js} +1 -1
  195. package/dist/utils/getAuthComponentHeadings.js.map +1 -0
  196. package/dist/utils/passkey.d.ts.map +1 -0
  197. package/dist/utils/{v2/passkey.js → passkey.js} +1 -1
  198. package/dist/utils/passkey.js.map +1 -0
  199. package/dist/utils/{v2/resolveTranslationsInArray.d.ts → resolveTranslationsInArray.d.ts} +1 -1
  200. package/dist/utils/resolveTranslationsInArray.d.ts.map +1 -0
  201. package/dist/utils/{v2/resolveTranslationsInArray.js → resolveTranslationsInArray.js} +1 -1
  202. package/dist/utils/resolveTranslationsInArray.js.map +1 -0
  203. package/dist/utils/{v2/resolveTranslationsInObject.d.ts → resolveTranslationsInObject.d.ts} +1 -1
  204. package/dist/utils/resolveTranslationsInObject.d.ts.map +1 -0
  205. package/dist/utils/{v2/resolveTranslationsInObject.js → resolveTranslationsInObject.js} +1 -1
  206. package/dist/utils/resolveTranslationsInObject.js.map +1 -0
  207. package/package.json +10 -10
  208. package/dist/cjs/components/adapters/CheckboxInput.cjs +0 -30
  209. package/dist/cjs/components/adapters/CheckboxInput.cjs.map +0 -1
  210. package/dist/cjs/components/adapters/DateInput.cjs +0 -30
  211. package/dist/cjs/components/adapters/DateInput.cjs.map +0 -1
  212. package/dist/cjs/components/adapters/DividerComponent.cjs +0 -24
  213. package/dist/cjs/components/adapters/DividerComponent.cjs.map +0 -1
  214. package/dist/cjs/components/adapters/EmailInput.cjs +0 -30
  215. package/dist/cjs/components/adapters/EmailInput.cjs.map +0 -1
  216. package/dist/cjs/components/adapters/FormContainer.cjs +0 -36
  217. package/dist/cjs/components/adapters/FormContainer.cjs.map +0 -1
  218. package/dist/cjs/components/adapters/NumberInput.cjs +0 -30
  219. package/dist/cjs/components/adapters/NumberInput.cjs.map +0 -1
  220. package/dist/cjs/components/adapters/PasswordInput.cjs +0 -52
  221. package/dist/cjs/components/adapters/PasswordInput.cjs.map +0 -1
  222. package/dist/cjs/components/adapters/SelectInput.cjs +0 -36
  223. package/dist/cjs/components/adapters/SelectInput.cjs.map +0 -1
  224. package/dist/cjs/components/adapters/SubmitButton.cjs +0 -61
  225. package/dist/cjs/components/adapters/SubmitButton.cjs.map +0 -1
  226. package/dist/cjs/components/adapters/TelephoneInput.cjs +0 -32
  227. package/dist/cjs/components/adapters/TelephoneInput.cjs.map +0 -1
  228. package/dist/cjs/components/adapters/TextInput.cjs +0 -30
  229. package/dist/cjs/components/adapters/TextInput.cjs.map +0 -1
  230. package/dist/cjs/components/adapters/Typography.cjs +0 -60
  231. package/dist/cjs/components/adapters/Typography.cjs.map +0 -1
  232. package/dist/cjs/components/presentation/auth/AcceptInvite/v2/AcceptInvite.cjs.map +0 -1
  233. package/dist/cjs/components/presentation/auth/AcceptInvite/v2/BaseAcceptInvite.cjs.map +0 -1
  234. package/dist/cjs/components/presentation/auth/AcceptInvite/v2/BaseAcceptInvite.styles.cjs.map +0 -1
  235. package/dist/cjs/components/presentation/auth/InviteUser/v2/BaseInviteUser.cjs.map +0 -1
  236. package/dist/cjs/components/presentation/auth/InviteUser/v2/BaseInviteUser.styles.cjs.map +0 -1
  237. package/dist/cjs/components/presentation/auth/InviteUser/v2/InviteUser.cjs.map +0 -1
  238. package/dist/cjs/components/presentation/auth/OrganizationUnitPicker/v2/OrganizationUnitPicker.cjs.map +0 -1
  239. package/dist/cjs/components/presentation/auth/OrganizationUnitPicker/v2/OrganizationUnitPicker.styles.cjs.map +0 -1
  240. package/dist/cjs/components/presentation/auth/Recovery/v1/BaseRecovery.cjs +0 -293
  241. package/dist/cjs/components/presentation/auth/Recovery/v1/BaseRecovery.cjs.map +0 -1
  242. package/dist/cjs/components/presentation/auth/Recovery/v1/Recovery.cjs +0 -43
  243. package/dist/cjs/components/presentation/auth/Recovery/v1/Recovery.cjs.map +0 -1
  244. package/dist/cjs/components/presentation/auth/Recovery/v1/RecoveryOptionFactory.cjs +0 -163
  245. package/dist/cjs/components/presentation/auth/Recovery/v1/RecoveryOptionFactory.cjs.map +0 -1
  246. package/dist/cjs/components/presentation/auth/Recovery/v2/BaseRecovery.cjs +0 -378
  247. package/dist/cjs/components/presentation/auth/Recovery/v2/BaseRecovery.cjs.map +0 -1
  248. package/dist/cjs/components/presentation/auth/Recovery/v2/Recovery.cjs +0 -78
  249. package/dist/cjs/components/presentation/auth/Recovery/v2/Recovery.cjs.map +0 -1
  250. package/dist/cjs/components/presentation/auth/SignIn/v1/BaseSignIn.cjs +0 -734
  251. package/dist/cjs/components/presentation/auth/SignIn/v1/BaseSignIn.cjs.map +0 -1
  252. package/dist/cjs/components/presentation/auth/SignIn/v1/options/EmailOtp.cjs +0 -68
  253. package/dist/cjs/components/presentation/auth/SignIn/v1/options/EmailOtp.cjs.map +0 -1
  254. package/dist/cjs/components/presentation/auth/SignIn/v1/options/IdentifierFirst.cjs +0 -59
  255. package/dist/cjs/components/presentation/auth/SignIn/v1/options/IdentifierFirst.cjs.map +0 -1
  256. package/dist/cjs/components/presentation/auth/SignIn/v1/options/MultiOptionButton.cjs +0 -139
  257. package/dist/cjs/components/presentation/auth/SignIn/v1/options/MultiOptionButton.cjs.map +0 -1
  258. package/dist/cjs/components/presentation/auth/SignIn/v1/options/SignInOptionFactory.cjs +0 -147
  259. package/dist/cjs/components/presentation/auth/SignIn/v1/options/SignInOptionFactory.cjs.map +0 -1
  260. package/dist/cjs/components/presentation/auth/SignIn/v1/options/SmsOtp.cjs +0 -68
  261. package/dist/cjs/components/presentation/auth/SignIn/v1/options/SmsOtp.cjs.map +0 -1
  262. package/dist/cjs/components/presentation/auth/SignIn/v1/options/SocialButton.cjs +0 -38
  263. package/dist/cjs/components/presentation/auth/SignIn/v1/options/SocialButton.cjs.map +0 -1
  264. package/dist/cjs/components/presentation/auth/SignIn/v1/options/Totp.cjs +0 -68
  265. package/dist/cjs/components/presentation/auth/SignIn/v1/options/Totp.cjs.map +0 -1
  266. package/dist/cjs/components/presentation/auth/SignIn/v1/options/UsernamePassword.cjs +0 -60
  267. package/dist/cjs/components/presentation/auth/SignIn/v1/options/UsernamePassword.cjs.map +0 -1
  268. package/dist/cjs/components/presentation/auth/SignIn/v2/BaseSignIn.cjs +0 -330
  269. package/dist/cjs/components/presentation/auth/SignIn/v2/BaseSignIn.cjs.map +0 -1
  270. package/dist/cjs/components/presentation/auth/SignIn/v2/SignIn.cjs +0 -560
  271. package/dist/cjs/components/presentation/auth/SignIn/v2/SignIn.cjs.map +0 -1
  272. package/dist/cjs/components/presentation/auth/SignUp/v1/BaseSignUp.cjs +0 -451
  273. package/dist/cjs/components/presentation/auth/SignUp/v1/BaseSignUp.cjs.map +0 -1
  274. package/dist/cjs/components/presentation/auth/SignUp/v1/SignUp.cjs +0 -54
  275. package/dist/cjs/components/presentation/auth/SignUp/v1/SignUp.cjs.map +0 -1
  276. package/dist/cjs/components/presentation/auth/SignUp/v1/SignUpOptionFactory.cjs +0 -164
  277. package/dist/cjs/components/presentation/auth/SignUp/v1/SignUpOptionFactory.cjs.map +0 -1
  278. package/dist/cjs/components/presentation/auth/SignUp/v2/BaseSignUp.cjs +0 -656
  279. package/dist/cjs/components/presentation/auth/SignUp/v2/BaseSignUp.cjs.map +0 -1
  280. package/dist/cjs/components/presentation/auth/SignUp/v2/SignUp.cjs +0 -80
  281. package/dist/cjs/components/presentation/auth/SignUp/v2/SignUp.cjs.map +0 -1
  282. package/dist/cjs/contexts/Theme/v1/ThemeProvider.cjs +0 -190
  283. package/dist/cjs/contexts/Theme/v1/ThemeProvider.cjs.map +0 -1
  284. package/dist/cjs/contexts/Theme/v2/ThemeProvider.cjs +0 -108
  285. package/dist/cjs/contexts/Theme/v2/ThemeProvider.cjs.map +0 -1
  286. package/dist/cjs/hooks/v2/useOAuthCallback.cjs.map +0 -1
  287. package/dist/cjs/utils/v2/buildThemeConfigFromFlowMeta.cjs.map +0 -1
  288. package/dist/cjs/utils/v2/flowTransformer.cjs.map +0 -1
  289. package/dist/cjs/utils/v2/getAuthComponentHeadings.cjs.map +0 -1
  290. package/dist/cjs/utils/v2/passkey.cjs.map +0 -1
  291. package/dist/cjs/utils/v2/resolveTranslationsInArray.cjs.map +0 -1
  292. package/dist/cjs/utils/v2/resolveTranslationsInObject.cjs.map +0 -1
  293. package/dist/components/adapters/CheckboxInput.d.ts +0 -25
  294. package/dist/components/adapters/CheckboxInput.d.ts.map +0 -1
  295. package/dist/components/adapters/CheckboxInput.js +0 -28
  296. package/dist/components/adapters/CheckboxInput.js.map +0 -1
  297. package/dist/components/adapters/DateInput.d.ts +0 -25
  298. package/dist/components/adapters/DateInput.d.ts.map +0 -1
  299. package/dist/components/adapters/DateInput.js +0 -28
  300. package/dist/components/adapters/DateInput.js.map +0 -1
  301. package/dist/components/adapters/DividerComponent.d.ts +0 -25
  302. package/dist/components/adapters/DividerComponent.d.ts.map +0 -1
  303. package/dist/components/adapters/DividerComponent.js +0 -22
  304. package/dist/components/adapters/DividerComponent.js.map +0 -1
  305. package/dist/components/adapters/EmailInput.d.ts +0 -25
  306. package/dist/components/adapters/EmailInput.d.ts.map +0 -1
  307. package/dist/components/adapters/EmailInput.js +0 -28
  308. package/dist/components/adapters/EmailInput.js.map +0 -1
  309. package/dist/components/adapters/FormContainer.d.ts +0 -25
  310. package/dist/components/adapters/FormContainer.d.ts.map +0 -1
  311. package/dist/components/adapters/FormContainer.js +0 -34
  312. package/dist/components/adapters/FormContainer.js.map +0 -1
  313. package/dist/components/adapters/NumberInput.d.ts +0 -25
  314. package/dist/components/adapters/NumberInput.d.ts.map +0 -1
  315. package/dist/components/adapters/NumberInput.js +0 -28
  316. package/dist/components/adapters/NumberInput.js.map +0 -1
  317. package/dist/components/adapters/PasswordInput.d.ts +0 -25
  318. package/dist/components/adapters/PasswordInput.d.ts.map +0 -1
  319. package/dist/components/adapters/PasswordInput.js +0 -50
  320. package/dist/components/adapters/PasswordInput.js.map +0 -1
  321. package/dist/components/adapters/SelectInput.d.ts +0 -25
  322. package/dist/components/adapters/SelectInput.d.ts.map +0 -1
  323. package/dist/components/adapters/SelectInput.js +0 -34
  324. package/dist/components/adapters/SelectInput.js.map +0 -1
  325. package/dist/components/adapters/SocialButton.d.ts +0 -25
  326. package/dist/components/adapters/SocialButton.d.ts.map +0 -1
  327. package/dist/components/adapters/SubmitButton.d.ts +0 -25
  328. package/dist/components/adapters/SubmitButton.d.ts.map +0 -1
  329. package/dist/components/adapters/SubmitButton.js +0 -59
  330. package/dist/components/adapters/SubmitButton.js.map +0 -1
  331. package/dist/components/adapters/TelephoneInput.d.ts +0 -25
  332. package/dist/components/adapters/TelephoneInput.d.ts.map +0 -1
  333. package/dist/components/adapters/TelephoneInput.js +0 -30
  334. package/dist/components/adapters/TelephoneInput.js.map +0 -1
  335. package/dist/components/adapters/TextInput.d.ts +0 -25
  336. package/dist/components/adapters/TextInput.d.ts.map +0 -1
  337. package/dist/components/adapters/TextInput.js +0 -28
  338. package/dist/components/adapters/TextInput.js.map +0 -1
  339. package/dist/components/adapters/Typography.d.ts +0 -25
  340. package/dist/components/adapters/Typography.d.ts.map +0 -1
  341. package/dist/components/adapters/Typography.js +0 -58
  342. package/dist/components/adapters/Typography.js.map +0 -1
  343. package/dist/components/presentation/auth/AcceptInvite/v2/AcceptInvite.d.ts.map +0 -1
  344. package/dist/components/presentation/auth/AcceptInvite/v2/AcceptInvite.js.map +0 -1
  345. package/dist/components/presentation/auth/AcceptInvite/v2/BaseAcceptInvite.d.ts.map +0 -1
  346. package/dist/components/presentation/auth/AcceptInvite/v2/BaseAcceptInvite.js.map +0 -1
  347. package/dist/components/presentation/auth/AcceptInvite/v2/BaseAcceptInvite.styles.d.ts.map +0 -1
  348. package/dist/components/presentation/auth/AcceptInvite/v2/BaseAcceptInvite.styles.js.map +0 -1
  349. package/dist/components/presentation/auth/InviteUser/v2/BaseInviteUser.d.ts.map +0 -1
  350. package/dist/components/presentation/auth/InviteUser/v2/BaseInviteUser.js.map +0 -1
  351. package/dist/components/presentation/auth/InviteUser/v2/BaseInviteUser.styles.d.ts.map +0 -1
  352. package/dist/components/presentation/auth/InviteUser/v2/BaseInviteUser.styles.js.map +0 -1
  353. package/dist/components/presentation/auth/InviteUser/v2/InviteUser.d.ts.map +0 -1
  354. package/dist/components/presentation/auth/InviteUser/v2/InviteUser.js.map +0 -1
  355. package/dist/components/presentation/auth/OrganizationUnitPicker/v2/OrganizationUnitPicker.d.ts.map +0 -1
  356. package/dist/components/presentation/auth/OrganizationUnitPicker/v2/OrganizationUnitPicker.js.map +0 -1
  357. package/dist/components/presentation/auth/OrganizationUnitPicker/v2/OrganizationUnitPicker.styles.d.ts.map +0 -1
  358. package/dist/components/presentation/auth/OrganizationUnitPicker/v2/OrganizationUnitPicker.styles.js.map +0 -1
  359. package/dist/components/presentation/auth/Recovery/v1/BaseRecovery.d.ts +0 -74
  360. package/dist/components/presentation/auth/Recovery/v1/BaseRecovery.d.ts.map +0 -1
  361. package/dist/components/presentation/auth/Recovery/v1/BaseRecovery.js +0 -288
  362. package/dist/components/presentation/auth/Recovery/v1/BaseRecovery.js.map +0 -1
  363. package/dist/components/presentation/auth/Recovery/v1/Recovery.d.ts +0 -26
  364. package/dist/components/presentation/auth/Recovery/v1/Recovery.d.ts.map +0 -1
  365. package/dist/components/presentation/auth/Recovery/v1/Recovery.js +0 -40
  366. package/dist/components/presentation/auth/Recovery/v1/Recovery.js.map +0 -1
  367. package/dist/components/presentation/auth/Recovery/v1/RecoveryOptionFactory.d.ts +0 -46
  368. package/dist/components/presentation/auth/Recovery/v1/RecoveryOptionFactory.d.ts.map +0 -1
  369. package/dist/components/presentation/auth/Recovery/v1/RecoveryOptionFactory.js +0 -160
  370. package/dist/components/presentation/auth/Recovery/v1/RecoveryOptionFactory.js.map +0 -1
  371. package/dist/components/presentation/auth/Recovery/v2/BaseRecovery.d.ts +0 -83
  372. package/dist/components/presentation/auth/Recovery/v2/BaseRecovery.d.ts.map +0 -1
  373. package/dist/components/presentation/auth/Recovery/v2/BaseRecovery.js +0 -373
  374. package/dist/components/presentation/auth/Recovery/v2/BaseRecovery.js.map +0 -1
  375. package/dist/components/presentation/auth/Recovery/v2/Recovery.d.ts +0 -56
  376. package/dist/components/presentation/auth/Recovery/v2/Recovery.d.ts.map +0 -1
  377. package/dist/components/presentation/auth/Recovery/v2/Recovery.js +0 -74
  378. package/dist/components/presentation/auth/Recovery/v2/Recovery.js.map +0 -1
  379. package/dist/components/presentation/auth/SignIn/v1/BaseSignIn.d.ts +0 -131
  380. package/dist/components/presentation/auth/SignIn/v1/BaseSignIn.d.ts.map +0 -1
  381. package/dist/components/presentation/auth/SignIn/v1/BaseSignIn.js +0 -729
  382. package/dist/components/presentation/auth/SignIn/v1/BaseSignIn.js.map +0 -1
  383. package/dist/components/presentation/auth/SignIn/v1/options/EmailOtp.d.ts +0 -26
  384. package/dist/components/presentation/auth/SignIn/v1/options/EmailOtp.d.ts.map +0 -1
  385. package/dist/components/presentation/auth/SignIn/v1/options/EmailOtp.js +0 -64
  386. package/dist/components/presentation/auth/SignIn/v1/options/EmailOtp.js.map +0 -1
  387. package/dist/components/presentation/auth/SignIn/v1/options/IdentifierFirst.d.ts +0 -26
  388. package/dist/components/presentation/auth/SignIn/v1/options/IdentifierFirst.d.ts.map +0 -1
  389. package/dist/components/presentation/auth/SignIn/v1/options/IdentifierFirst.js +0 -55
  390. package/dist/components/presentation/auth/SignIn/v1/options/IdentifierFirst.js.map +0 -1
  391. package/dist/components/presentation/auth/SignIn/v1/options/MultiOptionButton.d.ts +0 -27
  392. package/dist/components/presentation/auth/SignIn/v1/options/MultiOptionButton.d.ts.map +0 -1
  393. package/dist/components/presentation/auth/SignIn/v1/options/MultiOptionButton.js +0 -136
  394. package/dist/components/presentation/auth/SignIn/v1/options/MultiOptionButton.js.map +0 -1
  395. package/dist/components/presentation/auth/SignIn/v1/options/SignInOptionFactory.d.ts +0 -77
  396. package/dist/components/presentation/auth/SignIn/v1/options/SignInOptionFactory.d.ts.map +0 -1
  397. package/dist/components/presentation/auth/SignIn/v1/options/SignInOptionFactory.js +0 -143
  398. package/dist/components/presentation/auth/SignIn/v1/options/SignInOptionFactory.js.map +0 -1
  399. package/dist/components/presentation/auth/SignIn/v1/options/SmsOtp.d.ts +0 -26
  400. package/dist/components/presentation/auth/SignIn/v1/options/SmsOtp.d.ts.map +0 -1
  401. package/dist/components/presentation/auth/SignIn/v1/options/SmsOtp.js +0 -64
  402. package/dist/components/presentation/auth/SignIn/v1/options/SmsOtp.js.map +0 -1
  403. package/dist/components/presentation/auth/SignIn/v1/options/SocialButton.d.ts +0 -26
  404. package/dist/components/presentation/auth/SignIn/v1/options/SocialButton.d.ts.map +0 -1
  405. package/dist/components/presentation/auth/SignIn/v1/options/SocialButton.js +0 -36
  406. package/dist/components/presentation/auth/SignIn/v1/options/SocialButton.js.map +0 -1
  407. package/dist/components/presentation/auth/SignIn/v1/options/Totp.d.ts +0 -26
  408. package/dist/components/presentation/auth/SignIn/v1/options/Totp.d.ts.map +0 -1
  409. package/dist/components/presentation/auth/SignIn/v1/options/Totp.js +0 -64
  410. package/dist/components/presentation/auth/SignIn/v1/options/Totp.js.map +0 -1
  411. package/dist/components/presentation/auth/SignIn/v1/options/UsernamePassword.d.ts +0 -26
  412. package/dist/components/presentation/auth/SignIn/v1/options/UsernamePassword.d.ts.map +0 -1
  413. package/dist/components/presentation/auth/SignIn/v1/options/UsernamePassword.js +0 -56
  414. package/dist/components/presentation/auth/SignIn/v1/options/UsernamePassword.js.map +0 -1
  415. package/dist/components/presentation/auth/SignIn/v1/types.d.ts +0 -125
  416. package/dist/components/presentation/auth/SignIn/v1/types.d.ts.map +0 -1
  417. package/dist/components/presentation/auth/SignIn/v2/BaseSignIn.d.ts +0 -222
  418. package/dist/components/presentation/auth/SignIn/v2/BaseSignIn.d.ts.map +0 -1
  419. package/dist/components/presentation/auth/SignIn/v2/BaseSignIn.js +0 -325
  420. package/dist/components/presentation/auth/SignIn/v2/BaseSignIn.js.map +0 -1
  421. package/dist/components/presentation/auth/SignIn/v2/SignIn.d.ts +0 -165
  422. package/dist/components/presentation/auth/SignIn/v2/SignIn.d.ts.map +0 -1
  423. package/dist/components/presentation/auth/SignIn/v2/SignIn.js +0 -556
  424. package/dist/components/presentation/auth/SignIn/v2/SignIn.js.map +0 -1
  425. package/dist/components/presentation/auth/SignUp/v1/BaseSignUp.d.ts +0 -174
  426. package/dist/components/presentation/auth/SignUp/v1/BaseSignUp.d.ts.map +0 -1
  427. package/dist/components/presentation/auth/SignUp/v1/BaseSignUp.js +0 -446
  428. package/dist/components/presentation/auth/SignUp/v1/BaseSignUp.js.map +0 -1
  429. package/dist/components/presentation/auth/SignUp/v1/SignUp.d.ts +0 -39
  430. package/dist/components/presentation/auth/SignUp/v1/SignUp.d.ts.map +0 -1
  431. package/dist/components/presentation/auth/SignUp/v1/SignUp.js +0 -51
  432. package/dist/components/presentation/auth/SignUp/v1/SignUp.js.map +0 -1
  433. package/dist/components/presentation/auth/SignUp/v1/SignUpOptionFactory.d.ts +0 -46
  434. package/dist/components/presentation/auth/SignUp/v1/SignUpOptionFactory.d.ts.map +0 -1
  435. package/dist/components/presentation/auth/SignUp/v1/SignUpOptionFactory.js +0 -160
  436. package/dist/components/presentation/auth/SignUp/v1/SignUpOptionFactory.js.map +0 -1
  437. package/dist/components/presentation/auth/SignUp/v2/BaseSignUp.d.ts +0 -186
  438. package/dist/components/presentation/auth/SignUp/v2/BaseSignUp.d.ts.map +0 -1
  439. package/dist/components/presentation/auth/SignUp/v2/BaseSignUp.js +0 -651
  440. package/dist/components/presentation/auth/SignUp/v2/BaseSignUp.js.map +0 -1
  441. package/dist/components/presentation/auth/SignUp/v2/SignUp.d.ts +0 -39
  442. package/dist/components/presentation/auth/SignUp/v2/SignUp.d.ts.map +0 -1
  443. package/dist/components/presentation/auth/SignUp/v2/SignUp.js +0 -77
  444. package/dist/components/presentation/auth/SignUp/v2/SignUp.js.map +0 -1
  445. package/dist/contexts/Theme/v1/ThemeProvider.d.ts +0 -89
  446. package/dist/contexts/Theme/v1/ThemeProvider.d.ts.map +0 -1
  447. package/dist/contexts/Theme/v1/ThemeProvider.js +0 -186
  448. package/dist/contexts/Theme/v1/ThemeProvider.js.map +0 -1
  449. package/dist/contexts/Theme/v2/ThemeProvider.d.ts +0 -58
  450. package/dist/contexts/Theme/v2/ThemeProvider.d.ts.map +0 -1
  451. package/dist/contexts/Theme/v2/ThemeProvider.js +0 -104
  452. package/dist/contexts/Theme/v2/ThemeProvider.js.map +0 -1
  453. package/dist/hooks/v2/useOAuthCallback.d.ts.map +0 -1
  454. package/dist/hooks/v2/useOAuthCallback.js.map +0 -1
  455. package/dist/utils/v2/buildThemeConfigFromFlowMeta.d.ts.map +0 -1
  456. package/dist/utils/v2/buildThemeConfigFromFlowMeta.js.map +0 -1
  457. package/dist/utils/v2/flowTransformer.d.ts.map +0 -1
  458. package/dist/utils/v2/flowTransformer.js.map +0 -1
  459. package/dist/utils/v2/getAuthComponentHeadings.d.ts.map +0 -1
  460. package/dist/utils/v2/getAuthComponentHeadings.js.map +0 -1
  461. package/dist/utils/v2/passkey.d.ts.map +0 -1
  462. package/dist/utils/v2/passkey.js.map +0 -1
  463. package/dist/utils/v2/resolveTranslationsInArray.d.ts.map +0 -1
  464. package/dist/utils/v2/resolveTranslationsInArray.js.map +0 -1
  465. package/dist/utils/v2/resolveTranslationsInObject.d.ts.map +0 -1
  466. package/dist/utils/v2/resolveTranslationsInObject.js.map +0 -1
  467. /package/dist/components/presentation/auth/AcceptInvite/{v2/AcceptInvite.d.ts → AcceptInvite.d.ts} +0 -0
  468. /package/dist/components/presentation/auth/AcceptInvite/{v2/BaseAcceptInvite.styles.d.ts → BaseAcceptInvite.styles.d.ts} +0 -0
  469. /package/dist/components/presentation/auth/InviteUser/{v2/BaseInviteUser.styles.d.ts → BaseInviteUser.styles.d.ts} +0 -0
  470. /package/dist/components/presentation/auth/InviteUser/{v2/InviteUser.d.ts → InviteUser.d.ts} +0 -0
  471. /package/dist/components/presentation/auth/OrganizationUnitPicker/{v2/OrganizationUnitPicker.d.ts → OrganizationUnitPicker.d.ts} +0 -0
  472. /package/dist/components/presentation/auth/OrganizationUnitPicker/{v2/OrganizationUnitPicker.styles.d.ts → OrganizationUnitPicker.styles.d.ts} +0 -0
  473. /package/dist/hooks/{v2/useOAuthCallback.d.ts → useOAuthCallback.d.ts} +0 -0
  474. /package/dist/utils/{v2/buildThemeConfigFromFlowMeta.d.ts → buildThemeConfigFromFlowMeta.d.ts} +0 -0
  475. /package/dist/utils/{v2/passkey.d.ts → passkey.d.ts} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"passkey.js","names":["creationOptions: any","publicKey: any","credential: PublicKeyCredential","response: AuthenticatorAttestationResponse","registrationResponse: any","requestOptions: any","response: AuthenticatorAssertionResponse","authenticationResponse: any"],"sources":["../../src/utils/passkey.ts"],"sourcesContent":["/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {ThunderIDRuntimeError, arrayBufferToBase64url, base64urlToArrayBuffer} from '@thunderid/browser';\n\n/**\n * Handles WebAuthn/Passkey registration flow for browser environments.\n *\n * @param challengeData - JSON stringified challenge data containing WebAuthn creation options.\n * @returns Promise that resolves to a JSON string containing the WebAuthn registration response.\n */\nexport const handlePasskeyRegistration = async (challengeData: string): Promise<string> => {\n if (!window.navigator.credentials?.create) {\n throw new ThunderIDRuntimeError(\n 'WebAuthn is not supported in this browser.',\n 'browser-webauthn-not-supported',\n 'browser',\n 'WebAuthn/Passkey registration requires a browser that supports the Web Authentication API.',\n );\n }\n\n try {\n const creationOptions: any = JSON.parse(challengeData);\n\n // Decode challenge and user ID from base64url to BufferSource\n const publicKey: any = {\n ...creationOptions,\n challenge: base64urlToArrayBuffer(creationOptions.challenge),\n user: {\n ...creationOptions.user,\n id: base64urlToArrayBuffer(creationOptions.user.id),\n },\n ...(creationOptions.excludeCredentials && {\n excludeCredentials: creationOptions.excludeCredentials.map((cred: any) => ({\n ...cred,\n id: base64urlToArrayBuffer(cred.id),\n })),\n }),\n };\n\n const credential: PublicKeyCredential = (await navigator.credentials.create({\n publicKey,\n })) as PublicKeyCredential;\n\n if (!credential) {\n throw new ThunderIDRuntimeError(\n 'No credential returned from WebAuthn registration.',\n 'browser-webauthn-no-credential',\n 'browser',\n 'The WebAuthn registration ceremony completed but did not return a valid credential.',\n );\n }\n\n const response: AuthenticatorAttestationResponse = credential.response as AuthenticatorAttestationResponse;\n\n // Encode response fields back to base64url\n const registrationResponse: any = {\n id: credential.id,\n rawId: arrayBufferToBase64url(credential.rawId),\n response: {\n attestationObject: arrayBufferToBase64url(response.attestationObject),\n clientDataJSON: arrayBufferToBase64url(response.clientDataJSON),\n ...(response.getTransports && {\n transports: response.getTransports(),\n }),\n },\n type: credential.type,\n ...(credential.authenticatorAttachment && {\n authenticatorAttachment: credential.authenticatorAttachment,\n }),\n };\n\n return JSON.stringify(registrationResponse);\n } catch (error) {\n if (error instanceof ThunderIDRuntimeError) {\n throw error;\n }\n\n if (error instanceof Error) {\n // Map specific WebAuthn errors to ThunderIDRuntimeError/friendly messages as needed\n throw new ThunderIDRuntimeError(\n `Passkey registration failed: ${error.message}`,\n 'browser-webauthn-registration-error',\n 'browser',\n `WebAuthn registration failed with error: ${error.name}`,\n );\n }\n\n throw new ThunderIDRuntimeError(\n 'Passkey registration failed due to an unexpected error.',\n 'browser-webauthn-unexpected-error',\n 'browser',\n 'An unexpected error occurred during WebAuthn registration.',\n );\n }\n};\n\n/**\n * Handles WebAuthn/Passkey authentication flow for browser environments.\n *\n * @param challengeData - JSON stringified challenge data containing WebAuthn request options.\n * @returns Promise that resolves to a JSON string containing the WebAuthn authentication response.\n */\nexport const handlePasskeyAuthentication = async (challengeData: string): Promise<string> => {\n if (!window.navigator.credentials?.get) {\n throw new ThunderIDRuntimeError(\n 'WebAuthn is not supported in this browser.',\n 'browser-webauthn-not-supported',\n 'browser',\n 'WebAuthn/Passkey authentication requires a browser that supports the Web Authentication API.',\n );\n }\n\n try {\n const requestOptions: any = JSON.parse(challengeData);\n\n // Decode challenge and allowed credentials from base64url to BufferSource\n const publicKey: any = {\n ...requestOptions,\n challenge: base64urlToArrayBuffer(requestOptions.challenge),\n ...(requestOptions.allowCredentials && {\n allowCredentials: requestOptions.allowCredentials.map((cred: any) => ({\n ...cred,\n id: base64urlToArrayBuffer(cred.id),\n })),\n }),\n };\n\n const credential: PublicKeyCredential = (await navigator.credentials.get({\n publicKey,\n })) as PublicKeyCredential;\n\n if (!credential) {\n throw new ThunderIDRuntimeError(\n 'No credential returned from WebAuthn authentication.',\n 'browser-webauthn-no-credential',\n 'browser',\n 'The WebAuthn authentication ceremony completed but did not return a valid credential.',\n );\n }\n\n const response: AuthenticatorAssertionResponse = credential.response as AuthenticatorAssertionResponse;\n\n // Encode response fields back to base64url\n const authenticationResponse: any = {\n id: credential.id,\n rawId: arrayBufferToBase64url(credential.rawId),\n response: {\n authenticatorData: arrayBufferToBase64url(response.authenticatorData),\n clientDataJSON: arrayBufferToBase64url(response.clientDataJSON),\n signature: arrayBufferToBase64url(response.signature),\n ...(response.userHandle && {\n userHandle: arrayBufferToBase64url(response.userHandle),\n }),\n },\n type: credential.type,\n ...(credential.authenticatorAttachment && {\n authenticatorAttachment: credential.authenticatorAttachment,\n }),\n };\n\n return JSON.stringify(authenticationResponse);\n } catch (error) {\n if (error instanceof ThunderIDRuntimeError) {\n throw error;\n }\n\n if (error instanceof Error) {\n throw new ThunderIDRuntimeError(\n `Passkey authentication failed: ${error.message}`,\n 'browser-webauthn-authentication-error',\n 'browser',\n `WebAuthn authentication failed with error: ${error.name}`,\n );\n }\n\n throw new ThunderIDRuntimeError(\n 'Passkey authentication failed due to an unexpected error.',\n 'browser-webauthn-unexpected-error',\n 'browser',\n 'An unexpected error occurred during WebAuthn authentication.',\n );\n }\n};\n"],"mappings":";;;;;;;;;AA0BA,MAAa,4BAA4B,OAAO,kBAA2C;AACzF,KAAI,CAAC,OAAO,UAAU,aAAa,OACjC,OAAM,IAAI,sBACR,8CACA,kCACA,WACA,6FACD;AAGH,KAAI;EACF,MAAMA,kBAAuB,KAAK,MAAM,cAAc;EAGtD,MAAMC,YAAiB;GACrB,GAAG;GACH,WAAW,uBAAuB,gBAAgB,UAAU;GAC5D,MAAM;IACJ,GAAG,gBAAgB;IACnB,IAAI,uBAAuB,gBAAgB,KAAK,GAAG;IACpD;GACD,GAAI,gBAAgB,sBAAsB,EACxC,oBAAoB,gBAAgB,mBAAmB,KAAK,UAAe;IACzE,GAAG;IACH,IAAI,uBAAuB,KAAK,GAAG;IACpC,EAAE,EACJ;GACF;EAED,MAAMC,aAAmC,MAAM,UAAU,YAAY,OAAO,EAC1E,WACD,CAAC;AAEF,MAAI,CAAC,WACH,OAAM,IAAI,sBACR,sDACA,kCACA,WACA,sFACD;EAGH,MAAMC,WAA6C,WAAW;EAG9D,MAAMC,uBAA4B;GAChC,IAAI,WAAW;GACf,OAAO,uBAAuB,WAAW,MAAM;GAC/C,UAAU;IACR,mBAAmB,uBAAuB,SAAS,kBAAkB;IACrE,gBAAgB,uBAAuB,SAAS,eAAe;IAC/D,GAAI,SAAS,iBAAiB,EAC5B,YAAY,SAAS,eAAe,EACrC;IACF;GACD,MAAM,WAAW;GACjB,GAAI,WAAW,2BAA2B,EACxC,yBAAyB,WAAW,yBACrC;GACF;AAED,SAAO,KAAK,UAAU,qBAAqB;UACpC,OAAO;AACd,MAAI,iBAAiB,sBACnB,OAAM;AAGR,MAAI,iBAAiB,MAEnB,OAAM,IAAI,sBACR,gCAAgC,MAAM,WACtC,uCACA,WACA,4CAA4C,MAAM,OACnD;AAGH,QAAM,IAAI,sBACR,2DACA,qCACA,WACA,6DACD;;;;;;;;;AAUL,MAAa,8BAA8B,OAAO,kBAA2C;AAC3F,KAAI,CAAC,OAAO,UAAU,aAAa,IACjC,OAAM,IAAI,sBACR,8CACA,kCACA,WACA,+FACD;AAGH,KAAI;EACF,MAAMC,iBAAsB,KAAK,MAAM,cAAc;EAGrD,MAAMJ,YAAiB;GACrB,GAAG;GACH,WAAW,uBAAuB,eAAe,UAAU;GAC3D,GAAI,eAAe,oBAAoB,EACrC,kBAAkB,eAAe,iBAAiB,KAAK,UAAe;IACpE,GAAG;IACH,IAAI,uBAAuB,KAAK,GAAG;IACpC,EAAE,EACJ;GACF;EAED,MAAMC,aAAmC,MAAM,UAAU,YAAY,IAAI,EACvE,WACD,CAAC;AAEF,MAAI,CAAC,WACH,OAAM,IAAI,sBACR,wDACA,kCACA,WACA,wFACD;EAGH,MAAMI,WAA2C,WAAW;EAG5D,MAAMC,yBAA8B;GAClC,IAAI,WAAW;GACf,OAAO,uBAAuB,WAAW,MAAM;GAC/C,UAAU;IACR,mBAAmB,uBAAuB,SAAS,kBAAkB;IACrE,gBAAgB,uBAAuB,SAAS,eAAe;IAC/D,WAAW,uBAAuB,SAAS,UAAU;IACrD,GAAI,SAAS,cAAc,EACzB,YAAY,uBAAuB,SAAS,WAAW,EACxD;IACF;GACD,MAAM,WAAW;GACjB,GAAI,WAAW,2BAA2B,EACxC,yBAAyB,WAAW,yBACrC;GACF;AAED,SAAO,KAAK,UAAU,uBAAuB;UACtC,OAAO;AACd,MAAI,iBAAiB,sBACnB,OAAM;AAGR,MAAI,iBAAiB,MACnB,OAAM,IAAI,sBACR,kCAAkC,MAAM,WACxC,yCACA,WACA,8CAA8C,MAAM,OACrD;AAGH,QAAM,IAAI,sBACR,6DACA,qCACA,WACA,+DACD"}
@@ -16,7 +16,7 @@
16
16
  * under the License.
17
17
  */
18
18
  import { FlowMetadataResponse } from '@thunderid/browser';
19
- import { UseTranslation } from '../../hooks/useTranslation';
19
+ import { UseTranslation } from '../hooks/useTranslation';
20
20
  /**
21
21
  * Recursively resolves translation and meta template strings in an array of objects.
22
22
  * @param items - Array of objects to process
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolveTranslationsInArray.d.ts","sourceRoot":"","sources":["../../src/utils/resolveTranslationsInArray.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,oBAAoB,EAAC,MAAM,oBAAoB,CAAC;AAExD,OAAO,EAAC,cAAc,EAAC,MAAM,yBAAyB,CAAC;AAEvD;;;;;;;GAOG;AACH,QAAA,MAAM,0BAA0B,GAAI,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC/D,OAAO,CAAC,EAAE,EACV,GAAG,cAAc,CAAC,GAAG,CAAC,EACtB,aAAa,MAAM,EAAE,EACrB,OAAO,oBAAoB,GAAG,IAAI,KACjC,CAAC,EAUA,CAAC;AAEL,eAAe,0BAA0B,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { resolveTranslationsInObject } from "./resolveTranslationsInObject.js";
2
2
 
3
- //#region src/utils/v2/resolveTranslationsInArray.ts
3
+ //#region src/utils/resolveTranslationsInArray.ts
4
4
  /**
5
5
  * Recursively resolves translation and meta template strings in an array of objects.
6
6
  * @param items - Array of objects to process
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolveTranslationsInArray.js","names":["resolved: T"],"sources":["../../src/utils/resolveTranslationsInArray.ts"],"sourcesContent":["/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {FlowMetadataResponse} from '@thunderid/browser';\nimport {resolveTranslationsInObject} from './resolveTranslationsInObject';\nimport {UseTranslation} from '../hooks/useTranslation';\n\n/**\n * Recursively resolves translation and meta template strings in an array of objects.\n * @param items - Array of objects to process\n * @param t - The translation function from useTranslation\n * @param properties - Array of property names to resolve (optional)\n * @param meta - Optional flow metadata for resolving meta() expressions\n * @returns A new array with resolved translations\n */\nconst resolveTranslationsInArray = <T extends Record<string, any>>(\n items: T[],\n t: UseTranslation['t'],\n properties?: string[],\n meta?: FlowMetadataResponse | null,\n): T[] =>\n items.map((item: T) => {\n const resolved: T = resolveTranslationsInObject(item, t, properties, meta);\n\n // If the item has nested components (like BLOCK or STACK type), resolve those too\n if (resolved['components'] && Array.isArray(resolved['components'])) {\n (resolved as any).components = resolveTranslationsInArray(resolved['components'], t, properties, meta);\n }\n\n return resolved;\n });\n\nexport default resolveTranslationsInArray;\n"],"mappings":";;;;;;;;;;;AA8BA,MAAM,8BACJ,OACA,GACA,YACA,SAEA,MAAM,KAAK,SAAY;CACrB,MAAMA,WAAc,4BAA4B,MAAM,GAAG,YAAY,KAAK;AAG1E,KAAI,SAAS,iBAAiB,MAAM,QAAQ,SAAS,cAAc,CACjE,CAAC,SAAiB,aAAa,2BAA2B,SAAS,eAAe,GAAG,YAAY,KAAK;AAGxG,QAAO;EACP;AAEJ,yCAAe"}
@@ -16,7 +16,7 @@
16
16
  * under the License.
17
17
  */
18
18
  import { FlowMetadataResponse } from '@thunderid/browser';
19
- import { UseTranslation } from '../../hooks/useTranslation';
19
+ import { UseTranslation } from '../hooks/useTranslation';
20
20
  /**
21
21
  * Resolves all {{ t() }} and {{ meta() }} template expressions in an object's string properties.
22
22
  * @param obj - The object to process
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolveTranslationsInObject.d.ts","sourceRoot":"","sources":["../../src/utils/resolveTranslationsInObject.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,oBAAoB,EAA8B,MAAM,oBAAoB,CAAC;AACrF,OAAO,EAAC,cAAc,EAAC,MAAM,yBAAyB,CAAC;AAEvD;;;;;;;GAOG;AACH,eAAO,MAAM,2BAA2B,GAAI,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACvE,KAAK,CAAC,EACN,GAAG,cAAc,CAAC,GAAG,CAAC,EACtB,aAAY,MAAM,EAA0D,EAC5E,OAAO,oBAAoB,GAAG,IAAI,KACjC,CAUF,CAAC;AAEF,eAAe,2BAA2B,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { resolveFlowTemplateLiterals } from "@thunderid/browser";
2
2
 
3
- //#region src/utils/v2/resolveTranslationsInObject.ts
3
+ //#region src/utils/resolveTranslationsInObject.ts
4
4
  /**
5
5
  * Resolves all {{ t() }} and {{ meta() }} template expressions in an object's string properties.
6
6
  * @param obj - The object to process
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolveTranslationsInObject.js","names":["resolved: T"],"sources":["../../src/utils/resolveTranslationsInObject.ts"],"sourcesContent":["/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {FlowMetadataResponse, resolveFlowTemplateLiterals} from '@thunderid/browser';\nimport {UseTranslation} from '../hooks/useTranslation';\n\n/**\n * Resolves all {{ t() }} and {{ meta() }} template expressions in an object's string properties.\n * @param obj - The object to process\n * @param t - The translation function from useTranslation\n * @param properties - Array of property names to resolve (optional, defaults to common properties)\n * @param meta - Optional flow metadata for resolving meta() expressions\n * @returns A new object with resolved template strings\n */\nexport const resolveTranslationsInObject = <T extends Record<string, any>>(\n obj: T,\n t: UseTranslation['t'],\n properties: string[] = ['label', 'placeholder', 'text', 'title', 'subtitle'],\n meta?: FlowMetadataResponse | null,\n): T => {\n const resolved: T = {...obj};\n\n properties.forEach((prop: string) => {\n if (resolved[prop] && typeof resolved[prop] === 'string') {\n (resolved as any)[prop] = resolveFlowTemplateLiterals(resolved[prop], {meta, t});\n }\n });\n\n return resolved;\n};\n\nexport default resolveTranslationsInObject;\n"],"mappings":";;;;;;;;;;;AA6BA,MAAa,+BACX,KACA,GACA,aAAuB;CAAC;CAAS;CAAe;CAAQ;CAAS;CAAW,EAC5E,SACM;CACN,MAAMA,WAAc,EAAC,GAAG,KAAI;AAE5B,YAAW,SAAS,SAAiB;AACnC,MAAI,SAAS,SAAS,OAAO,SAAS,UAAU,SAC9C,CAAC,SAAiB,QAAQ,4BAA4B,SAAS,OAAO;GAAC;GAAM;GAAE,CAAC;GAElF;AAEF,QAAO"}
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@thunderid/react",
3
- "version": "0.2.0",
3
+ "version": "0.3.3",
4
4
  "description": "React SDK for ThunderID",
5
5
  "keywords": [
6
6
  "thunderid",
7
7
  "react",
8
8
  "spa"
9
9
  ],
10
- "homepage": "https://github.com/thunder-id/thunderid/tree/main/sdks/react#readme",
10
+ "homepage": "https://github.com/thunder-id/javascript-sdks/tree/main/packages/react#readme",
11
11
  "bugs": {
12
12
  "url": "https://github.com/thunder-id/thunderid/issues"
13
13
  },
@@ -29,17 +29,19 @@
29
29
  "types": "dist/index.d.ts",
30
30
  "repository": {
31
31
  "type": "git",
32
- "url": "https://github.com/thunder-id/thunderid",
33
- "directory": "sdks/react"
32
+ "url": "https://github.com/thunder-id/javascript-sdks",
33
+ "directory": "packages/react"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@emotion/css": "11.13.5",
37
37
  "@floating-ui/react": "0.27.12",
38
38
  "@testing-library/react": "16.3.0",
39
+ "@thunderid/eslint-plugin": "0.0.2",
40
+ "@thunderid/prettier-config": "0.0.2",
39
41
  "@types/node": "24.7.2",
40
42
  "@types/react": "19.2.14",
41
43
  "@types/react-dom": "19.2.3",
42
- "dompurify": "3.4.0",
44
+ "dompurify": "3.4.11",
43
45
  "eslint": "9.39.4",
44
46
  "prettier": "3.6.2",
45
47
  "react": "19.2.3",
@@ -47,9 +49,7 @@
47
49
  "rimraf": "6.1.3",
48
50
  "rolldown": "1.0.0-beta.45",
49
51
  "typescript": "5.9.3",
50
- "vitest": "4.1.6",
51
- "@thunderid/prettier-config": "^0.0.0",
52
- "@thunderid/eslint-plugin": "^0.0.0"
52
+ "vitest": "4.1.8"
53
53
  },
54
54
  "peerDependencies": {
55
55
  "@types/react": ">=16.8.0",
@@ -59,9 +59,9 @@
59
59
  "dependencies": {
60
60
  "@emotion/css": "11.13.5",
61
61
  "@floating-ui/react": "0.27.12",
62
- "dompurify": "3.4.0",
62
+ "dompurify": "3.4.11",
63
63
  "tslib": "2.8.1",
64
- "@thunderid/browser": "^0.2.0"
64
+ "@thunderid/browser": "^0.3.1"
65
65
  },
66
66
  "publishConfig": {
67
67
  "access": "public"
@@ -1,30 +0,0 @@
1
- const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
2
- const require_FieldFactory = require('../factories/FieldFactory.cjs');
3
- let __thunderid_browser = require("@thunderid/browser");
4
- __thunderid_browser = require_rolldown_runtime.__toESM(__thunderid_browser);
5
-
6
- //#region src/components/adapters/CheckboxInput.tsx
7
- /**
8
- * Checkbox input component for sign-up forms.
9
- */
10
- const CheckboxInput = ({ component, formValues, touchedFields, formErrors, onInputChange, inputClassName }) => {
11
- const config = component.config || {};
12
- const fieldName = config["identifier"] || config["name"] || component.id;
13
- const value = formValues[fieldName] || false;
14
- return require_FieldFactory.createField({
15
- className: inputClassName,
16
- error: touchedFields[fieldName] ? formErrors[fieldName] : void 0,
17
- label: config["label"] || "",
18
- name: fieldName,
19
- onChange: (newValue) => onInputChange(fieldName, newValue),
20
- placeholder: config["placeholder"] || "",
21
- required: config["required"] || false,
22
- type: __thunderid_browser.FieldType.Checkbox,
23
- value
24
- });
25
- };
26
- var CheckboxInput_default = CheckboxInput;
27
-
28
- //#endregion
29
- exports.default = CheckboxInput_default;
30
- //# sourceMappingURL=CheckboxInput.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CheckboxInput.cjs","names":["CheckboxInput: FC<AdapterProps>","config: Record<string, unknown>","fieldName: string","value: string | boolean","createField","FieldType"],"sources":["../../../../src/components/adapters/CheckboxInput.tsx"],"sourcesContent":["/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {FieldType} from '@thunderid/browser';\nimport {FC} from 'react';\nimport {AdapterProps} from '../../models/adapters';\nimport {createField} from '../factories/FieldFactory';\n\n/**\n * Checkbox input component for sign-up forms.\n */\nconst CheckboxInput: FC<AdapterProps> = ({\n component,\n formValues,\n touchedFields,\n formErrors,\n onInputChange,\n inputClassName,\n}: AdapterProps) => {\n const config: Record<string, unknown> = component.config || {};\n const fieldName: string = (config['identifier'] as string) || (config['name'] as string) || component.id;\n const value: string | boolean = formValues[fieldName] || false;\n const error: string | undefined = touchedFields[fieldName] ? formErrors[fieldName] : undefined;\n\n return createField({\n className: inputClassName,\n error,\n label: (config['label'] as string) || '',\n name: fieldName,\n onChange: (newValue: string) => onInputChange(fieldName, newValue),\n placeholder: (config['placeholder'] as string) || '',\n required: (config['required'] as boolean) || false,\n type: FieldType.Checkbox,\n value: value as string,\n });\n};\n\nexport default CheckboxInput;\n"],"mappings":";;;;;;;;;AA0BA,MAAMA,iBAAmC,EACvC,WACA,YACA,eACA,YACA,eACA,qBACkB;CAClB,MAAMC,SAAkC,UAAU,UAAU,EAAE;CAC9D,MAAMC,YAAqB,OAAO,iBAA6B,OAAO,WAAsB,UAAU;CACtG,MAAMC,QAA0B,WAAW,cAAc;AAGzD,QAAOC,iCAAY;EACjB,WAAW;EACX,OAJgC,cAAc,aAAa,WAAW,aAAa;EAKnF,OAAQ,OAAO,YAAuB;EACtC,MAAM;EACN,WAAW,aAAqB,cAAc,WAAW,SAAS;EAClE,aAAc,OAAO,kBAA6B;EAClD,UAAW,OAAO,eAA2B;EAC7C,MAAMC,8BAAU;EACT;EACR,CAAC;;AAGJ,4BAAe"}
@@ -1,30 +0,0 @@
1
- const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
2
- const require_FieldFactory = require('../factories/FieldFactory.cjs');
3
- let __thunderid_browser = require("@thunderid/browser");
4
- __thunderid_browser = require_rolldown_runtime.__toESM(__thunderid_browser);
5
-
6
- //#region src/components/adapters/DateInput.tsx
7
- /**
8
- * Date input component for sign-up forms.
9
- */
10
- const DateInput = ({ component, formValues, touchedFields, formErrors, onInputChange, inputClassName }) => {
11
- const config = component.config || {};
12
- const fieldName = config["identifier"] || config["name"] || component.id;
13
- const value = formValues[fieldName] || "";
14
- return require_FieldFactory.createField({
15
- className: inputClassName,
16
- error: touchedFields[fieldName] ? formErrors[fieldName] : void 0,
17
- label: config["label"] || "",
18
- name: fieldName,
19
- onChange: (newValue) => onInputChange(fieldName, newValue),
20
- placeholder: config["placeholder"] || "",
21
- required: config["required"] || false,
22
- type: __thunderid_browser.FieldType.Date,
23
- value
24
- });
25
- };
26
- var DateInput_default = DateInput;
27
-
28
- //#endregion
29
- exports.default = DateInput_default;
30
- //# sourceMappingURL=DateInput.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DateInput.cjs","names":["DateInput: FC<AdapterProps>","config: Record<string, unknown>","fieldName: string","value: string","createField","FieldType"],"sources":["../../../../src/components/adapters/DateInput.tsx"],"sourcesContent":["/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {FieldType} from '@thunderid/browser';\nimport {FC} from 'react';\nimport {AdapterProps} from '../../models/adapters';\nimport {createField} from '../factories/FieldFactory';\n\n/**\n * Date input component for sign-up forms.\n */\nconst DateInput: FC<AdapterProps> = ({\n component,\n formValues,\n touchedFields,\n formErrors,\n onInputChange,\n inputClassName,\n}: AdapterProps) => {\n const config: Record<string, unknown> = component.config || {};\n const fieldName: string = (config['identifier'] as string) || (config['name'] as string) || component.id;\n const value: string = formValues[fieldName] || '';\n const error: string | undefined = touchedFields[fieldName] ? formErrors[fieldName] : undefined;\n\n return createField({\n className: inputClassName,\n error,\n label: (config['label'] as string) || '',\n name: fieldName,\n onChange: (newValue: string) => onInputChange(fieldName, newValue),\n placeholder: (config['placeholder'] as string) || '',\n required: (config['required'] as boolean) || false,\n type: FieldType.Date,\n value,\n });\n};\n\nexport default DateInput;\n"],"mappings":";;;;;;;;;AA0BA,MAAMA,aAA+B,EACnC,WACA,YACA,eACA,YACA,eACA,qBACkB;CAClB,MAAMC,SAAkC,UAAU,UAAU,EAAE;CAC9D,MAAMC,YAAqB,OAAO,iBAA6B,OAAO,WAAsB,UAAU;CACtG,MAAMC,QAAgB,WAAW,cAAc;AAG/C,QAAOC,iCAAY;EACjB,WAAW;EACX,OAJgC,cAAc,aAAa,WAAW,aAAa;EAKnF,OAAQ,OAAO,YAAuB;EACtC,MAAM;EACN,WAAW,aAAqB,cAAc,WAAW,SAAS;EAClE,aAAc,OAAO,kBAA6B;EAClD,UAAW,OAAO,eAA2B;EAC7C,MAAMC,8BAAU;EAChB;EACD,CAAC;;AAGJ,wBAAe"}
@@ -1,24 +0,0 @@
1
- const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
2
- const require_useTheme = require('../../contexts/Theme/useTheme.cjs');
3
- const require_Divider = require('../primitives/Divider/Divider.cjs');
4
- let react_jsx_runtime = require("react/jsx-runtime");
5
- react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
6
-
7
- //#region src/components/adapters/DividerComponent.tsx
8
- /**
9
- * Divider component for sign-up forms.
10
- */
11
- const DividerComponent = ({ component }) => {
12
- const { theme } = require_useTheme.default();
13
- const text = (component.config || {})["text"] || "";
14
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Divider.default, {
15
- orientation: (component.variant?.toLowerCase() || "horizontal") === "vertical" ? "vertical" : "horizontal",
16
- style: { margin: `calc(${theme.vars.spacing.unit} * 2) 0` },
17
- children: text
18
- }, component.id);
19
- };
20
- var DividerComponent_default = DividerComponent;
21
-
22
- //#endregion
23
- exports.default = DividerComponent_default;
24
- //# sourceMappingURL=DividerComponent.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DividerComponent.cjs","names":["DividerComponent: FC<AdapterProps>","useTheme","text: string","Divider"],"sources":["../../../../src/components/adapters/DividerComponent.tsx"],"sourcesContent":["/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {FC} from 'react';\nimport useTheme from '../../contexts/Theme/useTheme';\nimport {AdapterProps} from '../../models/adapters';\nimport Divider from '../primitives/Divider/Divider';\n\n/**\n * Divider component for sign-up forms.\n */\nconst DividerComponent: FC<AdapterProps> = ({component}: AdapterProps) => {\n const {theme} = useTheme();\n const config: Record<string, unknown> = component.config || {};\n const text: string = (config['text'] as string) || '';\n const variant: string = component.variant?.toLowerCase() || 'horizontal';\n\n return (\n <Divider\n key={component.id}\n orientation={variant === 'vertical' ? 'vertical' : 'horizontal'}\n style={{margin: `calc(${theme.vars.spacing.unit} * 2) 0`}}\n >\n {text}\n </Divider>\n );\n};\n\nexport default DividerComponent;\n"],"mappings":";;;;;;;;;;AA0BA,MAAMA,oBAAsC,EAAC,gBAA6B;CACxE,MAAM,EAAC,UAASC,0BAAU;CAE1B,MAAMC,QADkC,UAAU,UAAU,EAAE,EACjC,WAAsB;AAGnD,QACE,2CAACC;EAEC,cALoB,UAAU,SAAS,aAAa,IAAI,kBAK/B,aAAa,aAAa;EACnD,OAAO,EAAC,QAAQ,QAAQ,MAAM,KAAK,QAAQ,KAAK,UAAS;YAExD;IAJI,UAAU,GAKP;;AAId,+BAAe"}
@@ -1,30 +0,0 @@
1
- const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
2
- const require_FieldFactory = require('../factories/FieldFactory.cjs');
3
- let __thunderid_browser = require("@thunderid/browser");
4
- __thunderid_browser = require_rolldown_runtime.__toESM(__thunderid_browser);
5
-
6
- //#region src/components/adapters/EmailInput.tsx
7
- /**
8
- * Email input component for sign-up forms.
9
- */
10
- const EmailInput = ({ component, formValues, touchedFields, formErrors, onInputChange, inputClassName }) => {
11
- const config = component.config || {};
12
- const fieldName = config["identifier"] || config["name"] || component.id;
13
- const value = formValues[fieldName] || "";
14
- return require_FieldFactory.createField({
15
- className: inputClassName,
16
- error: touchedFields[fieldName] ? formErrors[fieldName] : void 0,
17
- label: config["label"] || "Email",
18
- name: fieldName,
19
- onChange: (newValue) => onInputChange(fieldName, newValue),
20
- placeholder: config["placeholder"] || "Enter your email",
21
- required: config["required"] || false,
22
- type: __thunderid_browser.FieldType.Email,
23
- value
24
- });
25
- };
26
- var EmailInput_default = EmailInput;
27
-
28
- //#endregion
29
- exports.default = EmailInput_default;
30
- //# sourceMappingURL=EmailInput.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"EmailInput.cjs","names":["EmailInput: FC<AdapterProps>","config: Record<string, unknown>","fieldName: string","value: string","createField","FieldType"],"sources":["../../../../src/components/adapters/EmailInput.tsx"],"sourcesContent":["/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {FieldType} from '@thunderid/browser';\nimport {FC} from 'react';\nimport {AdapterProps} from '../../models/adapters';\nimport {createField} from '../factories/FieldFactory';\n\n/**\n * Email input component for sign-up forms.\n */\nconst EmailInput: FC<AdapterProps> = ({\n component,\n formValues,\n touchedFields,\n formErrors,\n onInputChange,\n inputClassName,\n}: AdapterProps) => {\n const config: Record<string, unknown> = component.config || {};\n const fieldName: string = (config['identifier'] as string) || (config['name'] as string) || component.id;\n const value: string = formValues[fieldName] || '';\n const error: string | undefined = touchedFields[fieldName] ? formErrors[fieldName] : undefined;\n\n return createField({\n className: inputClassName,\n error,\n label: (config['label'] as string) || 'Email',\n name: fieldName,\n onChange: (newValue: string) => onInputChange(fieldName, newValue),\n placeholder: (config['placeholder'] as string) || 'Enter your email',\n required: (config['required'] as boolean) || false,\n type: FieldType.Email,\n value,\n });\n};\n\nexport default EmailInput;\n"],"mappings":";;;;;;;;;AA0BA,MAAMA,cAAgC,EACpC,WACA,YACA,eACA,YACA,eACA,qBACkB;CAClB,MAAMC,SAAkC,UAAU,UAAU,EAAE;CAC9D,MAAMC,YAAqB,OAAO,iBAA6B,OAAO,WAAsB,UAAU;CACtG,MAAMC,QAAgB,WAAW,cAAc;AAG/C,QAAOC,iCAAY;EACjB,WAAW;EACX,OAJgC,cAAc,aAAa,WAAW,aAAa;EAKnF,OAAQ,OAAO,YAAuB;EACtC,MAAM;EACN,WAAW,aAAqB,cAAc,WAAW,SAAS;EAClE,aAAc,OAAO,kBAA6B;EAClD,UAAW,OAAO,eAA2B;EAC7C,MAAMC,8BAAU;EAChB;EACD,CAAC;;AAGJ,yBAAe"}
@@ -1,36 +0,0 @@
1
- const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
2
- const require_SignUpOptionFactory = require('../presentation/auth/SignUp/v1/SignUpOptionFactory.cjs');
3
- let react_jsx_runtime = require("react/jsx-runtime");
4
- react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
5
-
6
- //#region src/components/adapters/FormContainer.tsx
7
- /**
8
- * Form container component that renders child components.
9
- */
10
- const FormContainer = (props) => {
11
- const { component } = props;
12
- if (component.components && component.components.length > 0) {
13
- const handleFormSubmit = (e) => {
14
- e.preventDefault();
15
- const submitButton = component.components?.find((child) => child.type === "BUTTON" && (child.variant === "PRIMARY" || child.variant === "SECONDARY" || child.config?.type === "submit"));
16
- if (submitButton && props.onSubmit) props.onSubmit(submitButton, props.formValues);
17
- };
18
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("form", {
19
- onSubmit: handleFormSubmit,
20
- style: {
21
- display: "flex",
22
- flexDirection: "column"
23
- },
24
- children: component.components.map((childComponent) => require_SignUpOptionFactory.createSignUpComponent({
25
- ...props,
26
- component: childComponent
27
- }))
28
- }, component.id);
29
- }
30
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {}, component.id);
31
- };
32
- var FormContainer_default = FormContainer;
33
-
34
- //#endregion
35
- exports.default = FormContainer_default;
36
- //# sourceMappingURL=FormContainer.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FormContainer.cjs","names":["FormContainer: FC<AdapterProps>","handleFormSubmit: (e: FormEvent) => void","submitButton: any","createSignUpComponent"],"sources":["../../../../src/components/adapters/FormContainer.tsx"],"sourcesContent":["/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {FC, FormEvent} from 'react';\nimport {AdapterProps} from '../../models/adapters';\n// eslint-disable-next-line import/no-cycle\nimport {createSignUpComponent} from '../presentation/auth/SignUp/v1/SignUpOptionFactory';\n\n/**\n * Form container component that renders child components.\n */\nconst FormContainer: FC<AdapterProps> = (props: AdapterProps) => {\n const {component} = props;\n\n // If the form has child components, render them wrapped in a form element\n if (component.components && component.components.length > 0) {\n const handleFormSubmit: (e: FormEvent) => void = (e: FormEvent): void => {\n e.preventDefault();\n\n // Find submit button in child components and trigger its submission\n const submitButton: any = component.components?.find(\n (child: any) =>\n child.type === 'BUTTON' &&\n (child.variant === 'PRIMARY' || child.variant === 'SECONDARY' || child.config?.type === 'submit'),\n );\n\n if (submitButton && props.onSubmit) {\n props.onSubmit(submitButton, props.formValues);\n }\n };\n\n return (\n <form key={component.id} onSubmit={handleFormSubmit} style={{display: 'flex', flexDirection: 'column'}}>\n {component.components.map((childComponent: any) =>\n createSignUpComponent({\n ...props,\n component: childComponent,\n }),\n )}\n </form>\n );\n }\n\n // Empty form container\n return <div key={component.id} />;\n};\n\nexport default FormContainer;\n"],"mappings":";;;;;;;;;AA0BA,MAAMA,iBAAmC,UAAwB;CAC/D,MAAM,EAAC,cAAa;AAGpB,KAAI,UAAU,cAAc,UAAU,WAAW,SAAS,GAAG;EAC3D,MAAMC,oBAA4C,MAAuB;AACvE,KAAE,gBAAgB;GAGlB,MAAMC,eAAoB,UAAU,YAAY,MAC7C,UACC,MAAM,SAAS,aACd,MAAM,YAAY,aAAa,MAAM,YAAY,eAAe,MAAM,QAAQ,SAAS,UAC3F;AAED,OAAI,gBAAgB,MAAM,SACxB,OAAM,SAAS,cAAc,MAAM,WAAW;;AAIlD,SACE,2CAAC;GAAwB,UAAU;GAAkB,OAAO;IAAC,SAAS;IAAQ,eAAe;IAAS;aACnG,UAAU,WAAW,KAAK,mBACzBC,kDAAsB;IACpB,GAAG;IACH,WAAW;IACZ,CAAC,CACH;KANQ,UAAU,GAOd;;AAKX,QAAO,2CAAC,WAAS,UAAU,GAAM;;AAGnC,4BAAe"}
@@ -1,30 +0,0 @@
1
- const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
2
- const require_FieldFactory = require('../factories/FieldFactory.cjs');
3
- let __thunderid_browser = require("@thunderid/browser");
4
- __thunderid_browser = require_rolldown_runtime.__toESM(__thunderid_browser);
5
-
6
- //#region src/components/adapters/NumberInput.tsx
7
- /**
8
- * Number input component for sign-up forms.
9
- */
10
- const NumberInput = ({ component, formValues, touchedFields, formErrors, onInputChange, inputClassName }) => {
11
- const config = component.config || {};
12
- const fieldName = config["identifier"] || config["name"] || component.id;
13
- const value = formValues[fieldName] || "";
14
- return require_FieldFactory.createField({
15
- className: inputClassName,
16
- error: touchedFields[fieldName] ? formErrors[fieldName] : void 0,
17
- label: config["label"] || "",
18
- name: fieldName,
19
- onChange: (newValue) => onInputChange(fieldName, newValue),
20
- placeholder: config["placeholder"] || "",
21
- required: config["required"] || false,
22
- type: __thunderid_browser.FieldType.Number,
23
- value
24
- });
25
- };
26
- var NumberInput_default = NumberInput;
27
-
28
- //#endregion
29
- exports.default = NumberInput_default;
30
- //# sourceMappingURL=NumberInput.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"NumberInput.cjs","names":["NumberInput: FC<AdapterProps>","config: Record<string, unknown>","fieldName: string","value: string","createField","FieldType"],"sources":["../../../../src/components/adapters/NumberInput.tsx"],"sourcesContent":["/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {FieldType} from '@thunderid/browser';\nimport {FC} from 'react';\nimport {AdapterProps} from '../../models/adapters';\nimport {createField} from '../factories/FieldFactory';\n\n/**\n * Number input component for sign-up forms.\n */\nconst NumberInput: FC<AdapterProps> = ({\n component,\n formValues,\n touchedFields,\n formErrors,\n onInputChange,\n inputClassName,\n}: AdapterProps) => {\n const config: Record<string, unknown> = component.config || {};\n const fieldName: string = (config['identifier'] as string) || (config['name'] as string) || component.id;\n const value: string = formValues[fieldName] || '';\n const error: string | undefined = touchedFields[fieldName] ? formErrors[fieldName] : undefined;\n\n return createField({\n className: inputClassName,\n error,\n label: (config['label'] as string) || '',\n name: fieldName,\n onChange: (newValue: string) => onInputChange(fieldName, newValue),\n placeholder: (config['placeholder'] as string) || '',\n required: (config['required'] as boolean) || false,\n type: FieldType.Number,\n value,\n });\n};\n\nexport default NumberInput;\n"],"mappings":";;;;;;;;;AA0BA,MAAMA,eAAiC,EACrC,WACA,YACA,eACA,YACA,eACA,qBACkB;CAClB,MAAMC,SAAkC,UAAU,UAAU,EAAE;CAC9D,MAAMC,YAAqB,OAAO,iBAA6B,OAAO,WAAsB,UAAU;CACtG,MAAMC,QAAgB,WAAW,cAAc;AAG/C,QAAOC,iCAAY;EACjB,WAAW;EACX,OAJgC,cAAc,aAAa,WAAW,aAAa;EAKnF,OAAQ,OAAO,YAAuB;EACtC,MAAM;EACN,WAAW,aAAqB,cAAc,WAAW,SAAS;EAClE,aAAc,OAAO,kBAA6B;EAClD,UAAW,OAAO,eAA2B;EAC7C,MAAMC,8BAAU;EAChB;EACD,CAAC;;AAGJ,0BAAe"}
@@ -1,52 +0,0 @@
1
- const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
2
- const require_FieldFactory = require('../factories/FieldFactory.cjs');
3
- let __thunderid_browser = require("@thunderid/browser");
4
- __thunderid_browser = require_rolldown_runtime.__toESM(__thunderid_browser);
5
-
6
- //#region src/components/adapters/PasswordInput.tsx
7
- /**
8
- * Password input component for sign-up forms.
9
- */
10
- const PasswordInput = ({ component, formValues, touchedFields, formErrors, onInputChange, inputClassName }) => {
11
- const config = component.config || {};
12
- const fieldName = config["identifier"] || config["name"] || component.id;
13
- const value = formValues[fieldName] || "";
14
- const error = touchedFields[fieldName] ? formErrors[fieldName] : void 0;
15
- const validations = config["validations"] || [];
16
- const validationHints = [];
17
- validations.forEach((validation) => {
18
- if (validation.name === "LengthValidator") {
19
- const minLength = validation.conditions?.find((c) => c.key === "min.length")?.value;
20
- const maxLength = validation.conditions?.find((c) => c.key === "max.length")?.value;
21
- if (minLength || maxLength) validationHints.push(`Length: ${minLength || "0"}-${maxLength || "∞"} characters`);
22
- } else if (validation.name === "UpperCaseValidator") {
23
- const minLength = validation.conditions?.find((c) => c.key === "min.length")?.value;
24
- if (minLength && parseInt(minLength, 10) > 0) validationHints.push("Must contain uppercase letter(s)");
25
- } else if (validation.name === "LowerCaseValidator") {
26
- const minLength = validation.conditions?.find((c) => c.key === "min.length")?.value;
27
- if (minLength && parseInt(minLength, 10) > 0) validationHints.push("Must contain lowercase letter(s)");
28
- } else if (validation.name === "NumeralValidator") {
29
- const minLength = validation.conditions?.find((c) => c.key === "min.length")?.value;
30
- if (minLength && parseInt(minLength, 10) > 0) validationHints.push("Must contain number(s)");
31
- } else if (validation.name === "SpecialCharacterValidator") {
32
- const minLength = validation.conditions?.find((c) => c.key === "min.length")?.value;
33
- if (minLength && parseInt(minLength, 10) > 0) validationHints.push("Must contain special character(s)");
34
- }
35
- });
36
- return require_FieldFactory.createField({
37
- className: inputClassName,
38
- error,
39
- label: config["label"] || "Password",
40
- name: fieldName,
41
- onChange: (newValue) => onInputChange(fieldName, newValue),
42
- placeholder: config["placeholder"] || "Enter your password",
43
- required: config["required"] || false,
44
- type: __thunderid_browser.FieldType.Password,
45
- value
46
- });
47
- };
48
- var PasswordInput_default = PasswordInput;
49
-
50
- //#endregion
51
- exports.default = PasswordInput_default;
52
- //# sourceMappingURL=PasswordInput.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PasswordInput.cjs","names":["PasswordInput: FC<AdapterProps>","config: Record<string, unknown>","fieldName: string","value: string","error: string | undefined","validations: {\n conditions?: {key: string; value: string}[];\n name: string;\n }[]","validationHints: string[]","minLength: string | undefined","maxLength: string | undefined","createField","FieldType"],"sources":["../../../../src/components/adapters/PasswordInput.tsx"],"sourcesContent":["/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {FieldType} from '@thunderid/browser';\nimport {FC} from 'react';\nimport {AdapterProps} from '../../models/adapters';\nimport {createField} from '../factories/FieldFactory';\n\n/**\n * Password input component for sign-up forms.\n */\nconst PasswordInput: FC<AdapterProps> = ({\n component,\n formValues,\n touchedFields,\n formErrors,\n onInputChange,\n inputClassName,\n}: AdapterProps) => {\n const config: Record<string, unknown> = component.config || {};\n const fieldName: string = (config['identifier'] as string) || (config['name'] as string) || component.id;\n const value: string = formValues[fieldName] || '';\n const error: string | undefined = touchedFields[fieldName] ? formErrors[fieldName] : undefined;\n\n // Extract validation rules from the component config if available\n const validations: {\n conditions?: {key: string; value: string}[];\n name: string;\n }[] =\n (config['validations'] as {\n conditions?: {key: string; value: string}[];\n name: string;\n }[]) || [];\n const validationHints: string[] = [];\n\n validations.forEach((validation: any) => {\n if (validation.name === 'LengthValidator') {\n const minLength: string | undefined = validation.conditions?.find((c: any) => c.key === 'min.length')?.value;\n const maxLength: string | undefined = validation.conditions?.find((c: any) => c.key === 'max.length')?.value;\n if (minLength || maxLength) {\n validationHints.push(`Length: ${minLength || '0'}-${maxLength || '∞'} characters`);\n }\n } else if (validation.name === 'UpperCaseValidator') {\n const minLength: string | undefined = validation.conditions?.find((c: any) => c.key === 'min.length')?.value;\n if (minLength && parseInt(minLength, 10) > 0) {\n validationHints.push('Must contain uppercase letter(s)');\n }\n } else if (validation.name === 'LowerCaseValidator') {\n const minLength: string | undefined = validation.conditions?.find((c: any) => c.key === 'min.length')?.value;\n if (minLength && parseInt(minLength, 10) > 0) {\n validationHints.push('Must contain lowercase letter(s)');\n }\n } else if (validation.name === 'NumeralValidator') {\n const minLength: string | undefined = validation.conditions?.find((c: any) => c.key === 'min.length')?.value;\n if (minLength && parseInt(minLength, 10) > 0) {\n validationHints.push('Must contain number(s)');\n }\n } else if (validation.name === 'SpecialCharacterValidator') {\n const minLength: string | undefined = validation.conditions?.find((c: any) => c.key === 'min.length')?.value;\n if (minLength && parseInt(minLength, 10) > 0) {\n validationHints.push('Must contain special character(s)');\n }\n }\n });\n\n return createField({\n className: inputClassName,\n error,\n label: (config['label'] as string) || 'Password',\n name: fieldName,\n onChange: (newValue: string) => onInputChange(fieldName, newValue),\n placeholder: (config['placeholder'] as string) || 'Enter your password',\n required: (config['required'] as boolean) || false,\n type: FieldType.Password,\n value,\n });\n};\n\nexport default PasswordInput;\n"],"mappings":";;;;;;;;;AA0BA,MAAMA,iBAAmC,EACvC,WACA,YACA,eACA,YACA,eACA,qBACkB;CAClB,MAAMC,SAAkC,UAAU,UAAU,EAAE;CAC9D,MAAMC,YAAqB,OAAO,iBAA6B,OAAO,WAAsB,UAAU;CACtG,MAAMC,QAAgB,WAAW,cAAc;CAC/C,MAAMC,QAA4B,cAAc,aAAa,WAAW,aAAa;CAGrF,MAAMC,cAIH,OAAO,kBAGA,EAAE;CACZ,MAAMC,kBAA4B,EAAE;AAEpC,aAAY,SAAS,eAAoB;AACvC,MAAI,WAAW,SAAS,mBAAmB;GACzC,MAAMC,YAAgC,WAAW,YAAY,MAAM,MAAW,EAAE,QAAQ,aAAa,EAAE;GACvG,MAAMC,YAAgC,WAAW,YAAY,MAAM,MAAW,EAAE,QAAQ,aAAa,EAAE;AACvG,OAAI,aAAa,UACf,iBAAgB,KAAK,WAAW,aAAa,IAAI,GAAG,aAAa,IAAI,aAAa;aAE3E,WAAW,SAAS,sBAAsB;GACnD,MAAMD,YAAgC,WAAW,YAAY,MAAM,MAAW,EAAE,QAAQ,aAAa,EAAE;AACvG,OAAI,aAAa,SAAS,WAAW,GAAG,GAAG,EACzC,iBAAgB,KAAK,mCAAmC;aAEjD,WAAW,SAAS,sBAAsB;GACnD,MAAMA,YAAgC,WAAW,YAAY,MAAM,MAAW,EAAE,QAAQ,aAAa,EAAE;AACvG,OAAI,aAAa,SAAS,WAAW,GAAG,GAAG,EACzC,iBAAgB,KAAK,mCAAmC;aAEjD,WAAW,SAAS,oBAAoB;GACjD,MAAMA,YAAgC,WAAW,YAAY,MAAM,MAAW,EAAE,QAAQ,aAAa,EAAE;AACvG,OAAI,aAAa,SAAS,WAAW,GAAG,GAAG,EACzC,iBAAgB,KAAK,yBAAyB;aAEvC,WAAW,SAAS,6BAA6B;GAC1D,MAAMA,YAAgC,WAAW,YAAY,MAAM,MAAW,EAAE,QAAQ,aAAa,EAAE;AACvG,OAAI,aAAa,SAAS,WAAW,GAAG,GAAG,EACzC,iBAAgB,KAAK,oCAAoC;;GAG7D;AAEF,QAAOE,iCAAY;EACjB,WAAW;EACX;EACA,OAAQ,OAAO,YAAuB;EACtC,MAAM;EACN,WAAW,aAAqB,cAAc,WAAW,SAAS;EAClE,aAAc,OAAO,kBAA6B;EAClD,UAAW,OAAO,eAA2B;EAC7C,MAAMC,8BAAU;EAChB;EACD,CAAC;;AAGJ,4BAAe"}
@@ -1,36 +0,0 @@
1
- const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
2
- const require_FieldFactory = require('../factories/FieldFactory.cjs');
3
- let __thunderid_browser = require("@thunderid/browser");
4
- __thunderid_browser = require_rolldown_runtime.__toESM(__thunderid_browser);
5
-
6
- //#region src/components/adapters/SelectInput.tsx
7
- /**
8
- * Select input component for sign-up forms.
9
- */
10
- const SelectInput = ({ component, formValues, touchedFields, formErrors, onInputChange, inputClassName }) => {
11
- const config = component.config || {};
12
- const fieldName = config["identifier"] || config["name"] || component.id;
13
- const value = formValues[fieldName] || "";
14
- const error = touchedFields[fieldName] ? formErrors[fieldName] : void 0;
15
- const options = (config["options"] || []).map((option) => ({
16
- label: option,
17
- value: option
18
- }));
19
- return require_FieldFactory.createField({
20
- className: inputClassName,
21
- error,
22
- label: config["label"] || "",
23
- name: fieldName,
24
- onChange: (newValue) => onInputChange(fieldName, newValue),
25
- options,
26
- placeholder: config["placeholder"] || "",
27
- required: config["required"] || false,
28
- type: __thunderid_browser.FieldType.Select,
29
- value
30
- });
31
- };
32
- var SelectInput_default = SelectInput;
33
-
34
- //#endregion
35
- exports.default = SelectInput_default;
36
- //# sourceMappingURL=SelectInput.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SelectInput.cjs","names":["SelectInput: FC<AdapterProps>","config: Record<string, unknown>","fieldName: string","value: string","error: string | undefined","options: SelectOption[]","createField","FieldType"],"sources":["../../../../src/components/adapters/SelectInput.tsx"],"sourcesContent":["/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {FieldType} from '@thunderid/browser';\nimport {FC} from 'react';\nimport {AdapterProps} from '../../models/adapters';\nimport {createField} from '../factories/FieldFactory';\nimport {SelectOption} from '../primitives/Select/Select';\n\n/**\n * Select input component for sign-up forms.\n */\nconst SelectInput: FC<AdapterProps> = ({\n component,\n formValues,\n touchedFields,\n formErrors,\n onInputChange,\n inputClassName,\n}: AdapterProps) => {\n const config: Record<string, unknown> = component.config || {};\n const fieldName: string = (config['identifier'] as string) || (config['name'] as string) || component.id;\n const value: string = formValues[fieldName] || '';\n const error: string | undefined = touchedFields[fieldName] ? formErrors[fieldName] : undefined;\n\n // Get options from config and convert to SelectOption format\n const rawOptions: string[] = (config['options'] as string[]) || [];\n const options: SelectOption[] = rawOptions.map((option: string) => ({\n label: option,\n value: option,\n }));\n\n return createField({\n className: inputClassName,\n error,\n label: (config['label'] as string) || '',\n name: fieldName,\n onChange: (newValue: string): void => onInputChange(fieldName, newValue),\n options,\n placeholder: (config['placeholder'] as string) || '',\n required: (config['required'] as boolean) || false,\n type: FieldType.Select,\n value,\n });\n};\n\nexport default SelectInput;\n"],"mappings":";;;;;;;;;AA2BA,MAAMA,eAAiC,EACrC,WACA,YACA,eACA,YACA,eACA,qBACkB;CAClB,MAAMC,SAAkC,UAAU,UAAU,EAAE;CAC9D,MAAMC,YAAqB,OAAO,iBAA6B,OAAO,WAAsB,UAAU;CACtG,MAAMC,QAAgB,WAAW,cAAc;CAC/C,MAAMC,QAA4B,cAAc,aAAa,WAAW,aAAa;CAIrF,MAAMC,WADwB,OAAO,cAA2B,EAAE,EACvB,KAAK,YAAoB;EAClE,OAAO;EACP,OAAO;EACR,EAAE;AAEH,QAAOC,iCAAY;EACjB,WAAW;EACX;EACA,OAAQ,OAAO,YAAuB;EACtC,MAAM;EACN,WAAW,aAA2B,cAAc,WAAW,SAAS;EACxE;EACA,aAAc,OAAO,kBAA6B;EAClD,UAAW,OAAO,eAA2B;EAC7C,MAAMC,8BAAU;EAChB;EACD,CAAC;;AAGJ,0BAAe"}
@@ -1,61 +0,0 @@
1
- const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
2
- const require_Spinner = require('../primitives/Spinner/Spinner.cjs');
3
- const require_Button = require('../primitives/Button/Button.cjs');
4
- let react_jsx_runtime = require("react/jsx-runtime");
5
- react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
6
-
7
- //#region src/components/adapters/SubmitButton.tsx
8
- /**
9
- * Button component for sign-up forms that handles all button variants.
10
- */
11
- const ButtonComponent = ({ component, isLoading, isFormValid, buttonClassName, onSubmit, size = "medium" }) => {
12
- const config = component.config || {};
13
- const buttonText = config["text"] || config["label"] || "Continue";
14
- const buttonType = config["type"] || "submit";
15
- const componentVariant = component.variant?.toUpperCase() || "PRIMARY";
16
- const getButtonProps = () => {
17
- switch (componentVariant) {
18
- case "PRIMARY": return {
19
- color: "primary",
20
- variant: "solid"
21
- };
22
- case "SECONDARY": return {
23
- color: "secondary",
24
- variant: "solid"
25
- };
26
- case "TEXT": return {
27
- color: "primary",
28
- variant: "text"
29
- };
30
- case "SOCIAL":
31
- case "OUTLINED": return {
32
- color: "primary",
33
- variant: "outline"
34
- };
35
- default: return {
36
- color: "primary",
37
- variant: "solid"
38
- };
39
- }
40
- };
41
- const { variant, color } = getButtonProps();
42
- const handleClick = () => {
43
- if (onSubmit && buttonType !== "submit") onSubmit(component);
44
- };
45
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Button.default, {
46
- type: buttonType === "submit" ? "submit" : "button",
47
- variant,
48
- color,
49
- size,
50
- disabled: isLoading || buttonType === "submit" && !isFormValid,
51
- onClick: buttonType !== "submit" ? handleClick : void 0,
52
- className: buttonClassName,
53
- style: { width: "100%" },
54
- children: isLoading ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Spinner.default, { size: "small" }) : buttonText
55
- }, component.id);
56
- };
57
- var SubmitButton_default = ButtonComponent;
58
-
59
- //#endregion
60
- exports.default = SubmitButton_default;
61
- //# sourceMappingURL=SubmitButton.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SubmitButton.cjs","names":["ButtonComponent: FC<AdapterProps>","config: Record<string, unknown>","buttonText: string","buttonType: string","componentVariant: string","Button","Spinner"],"sources":["../../../../src/components/adapters/SubmitButton.tsx"],"sourcesContent":["/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport {FC} from 'react';\nimport {AdapterProps} from '../../models/adapters';\nimport Button from '../primitives/Button/Button';\nimport Spinner from '../primitives/Spinner/Spinner';\n\n/**\n * Button component for sign-up forms that handles all button variants.\n */\nconst ButtonComponent: FC<AdapterProps> = ({\n component,\n isLoading,\n isFormValid,\n buttonClassName,\n onSubmit,\n size = 'medium',\n}: AdapterProps) => {\n const config: Record<string, unknown> = component.config || {};\n const buttonText: string = (config['text'] as string) || (config['label'] as string) || 'Continue';\n const buttonType: string = (config['type'] as string) || 'submit';\n const componentVariant: string = component.variant?.toUpperCase() || 'PRIMARY';\n\n // Map component variants to Button primitive props\n const getButtonProps = (): {color: 'primary' | 'secondary'; variant: 'solid' | 'text' | 'outline'} => {\n switch (componentVariant) {\n case 'PRIMARY':\n return {color: 'primary' as const, variant: 'solid' as const};\n case 'SECONDARY':\n return {color: 'secondary' as const, variant: 'solid' as const};\n case 'TEXT':\n return {color: 'primary' as const, variant: 'text' as const};\n case 'SOCIAL':\n case 'OUTLINED':\n return {color: 'primary' as const, variant: 'outline' as const};\n default:\n return {color: 'primary' as const, variant: 'solid' as const};\n }\n };\n\n const {variant, color} = getButtonProps();\n\n const handleClick = (): void => {\n if (onSubmit && buttonType !== 'submit') {\n onSubmit(component);\n }\n };\n\n return (\n <Button\n key={component.id}\n type={buttonType === 'submit' ? 'submit' : 'button'}\n variant={variant}\n color={color}\n size={size}\n disabled={isLoading || (buttonType === 'submit' && !isFormValid)}\n onClick={buttonType !== 'submit' ? handleClick : undefined}\n className={buttonClassName}\n style={{width: '100%'}}\n >\n {isLoading ? <Spinner size=\"small\" /> : buttonText}\n </Button>\n );\n};\n\nexport default ButtonComponent;\n"],"mappings":";;;;;;;;;;AA0BA,MAAMA,mBAAqC,EACzC,WACA,WACA,aACA,iBACA,UACA,OAAO,eACW;CAClB,MAAMC,SAAkC,UAAU,UAAU,EAAE;CAC9D,MAAMC,aAAsB,OAAO,WAAuB,OAAO,YAAuB;CACxF,MAAMC,aAAsB,OAAO,WAAsB;CACzD,MAAMC,mBAA2B,UAAU,SAAS,aAAa,IAAI;CAGrE,MAAM,uBAAgG;AACpG,UAAQ,kBAAR;GACE,KAAK,UACH,QAAO;IAAC,OAAO;IAAoB,SAAS;IAAiB;GAC/D,KAAK,YACH,QAAO;IAAC,OAAO;IAAsB,SAAS;IAAiB;GACjE,KAAK,OACH,QAAO;IAAC,OAAO;IAAoB,SAAS;IAAgB;GAC9D,KAAK;GACL,KAAK,WACH,QAAO;IAAC,OAAO;IAAoB,SAAS;IAAmB;GACjE,QACE,QAAO;IAAC,OAAO;IAAoB,SAAS;IAAiB;;;CAInE,MAAM,EAAC,SAAS,UAAS,gBAAgB;CAEzC,MAAM,oBAA0B;AAC9B,MAAI,YAAY,eAAe,SAC7B,UAAS,UAAU;;AAIvB,QACE,2CAACC;EAEC,MAAM,eAAe,WAAW,WAAW;EAClC;EACF;EACD;EACN,UAAU,aAAc,eAAe,YAAY,CAAC;EACpD,SAAS,eAAe,WAAW,cAAc;EACjD,WAAW;EACX,OAAO,EAAC,OAAO,QAAO;YAErB,YAAY,2CAACC,2BAAQ,MAAK,UAAU,GAAG;IAVnC,UAAU,GAWR;;AAIb,2BAAe"}
@@ -1,32 +0,0 @@
1
- const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
2
- const require_TextField = require('../primitives/TextField/TextField.cjs');
3
- let react_jsx_runtime = require("react/jsx-runtime");
4
- react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
5
-
6
- //#region src/components/adapters/TelephoneInput.tsx
7
- /**
8
- * Telephone input component for sign-up forms.
9
- */
10
- const TelephoneInput = ({ component, formValues, touchedFields, formErrors, onInputChange, inputClassName }) => {
11
- const config = component.config || {};
12
- const fieldName = config["identifier"] || config["name"] || component.id;
13
- const value = formValues[fieldName] || "";
14
- const error = touchedFields[fieldName] ? formErrors[fieldName] : void 0;
15
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_TextField.default, {
16
- name: fieldName,
17
- type: "tel",
18
- label: config["label"] || "",
19
- placeholder: config["placeholder"] || "",
20
- required: config["required"] || false,
21
- value,
22
- error,
23
- onChange: (e) => onInputChange(fieldName, e.target.value),
24
- className: inputClassName,
25
- helperText: config["hint"] || ""
26
- }, component.id);
27
- };
28
- var TelephoneInput_default = TelephoneInput;
29
-
30
- //#endregion
31
- exports.default = TelephoneInput_default;
32
- //# sourceMappingURL=TelephoneInput.cjs.map