@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
@@ -1,734 +0,0 @@
1
- const require_rolldown_runtime = require('../../../../../_virtual/rolldown_runtime.cjs');
2
- const require_FlowProvider = require('../../../../../contexts/Flow/FlowProvider.cjs');
3
- const require_useFlow = require('../../../../../contexts/Flow/useFlow.cjs');
4
- const require_useTheme = require('../../../../../contexts/Theme/useTheme.cjs');
5
- const require_useTranslation = require('../../../../../hooks/useTranslation.cjs');
6
- const require_useForm = require('../../../../../hooks/useForm.cjs');
7
- const require_Spinner = require('../../../../primitives/Spinner/Spinner.cjs');
8
- const require_Typography = require('../../../../primitives/Typography/Typography.cjs');
9
- const require_SignInOptionFactory = require('./options/SignInOptionFactory.cjs');
10
- const require_Alert = require('../../../../primitives/Alert/Alert.cjs');
11
- const require_Card = require('../../../../primitives/Card/Card.cjs');
12
- const require_Divider = require('../../../../primitives/Divider/Divider.cjs');
13
- const require_Logo = require('../../../../primitives/Logo/Logo.cjs');
14
- const require_BaseSignIn_styles = require('../BaseSignIn.styles.cjs');
15
- let __thunderid_browser = require("@thunderid/browser");
16
- __thunderid_browser = require_rolldown_runtime.__toESM(__thunderid_browser);
17
- let react = require("react");
18
- react = require_rolldown_runtime.__toESM(react);
19
- let react_jsx_runtime = require("react/jsx-runtime");
20
- react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
21
- let __emotion_css = require("@emotion/css");
22
- __emotion_css = require_rolldown_runtime.__toESM(__emotion_css);
23
-
24
- //#region src/components/presentation/auth/SignIn/v1/BaseSignIn.tsx
25
- const logger = (0, __thunderid_browser.createPackageComponentLogger)("@thunderid/react", "BaseSignIn");
26
- /**
27
- * Check if the authenticator is a passkey/FIDO authenticator
28
- */
29
- const isPasskeyAuthenticator = (authenticator) => authenticator.authenticatorId === __thunderid_browser.ApplicationNativeAuthenticationConstants.SupportedAuthenticators.Passkey && authenticator.metadata?.promptType === __thunderid_browser.EmbeddedSignInFlowAuthenticatorPromptType.InternalPrompt && authenticator.metadata?.additionalData?.challengeData;
30
- /**
31
- * `T3JnYW5pemF0aW9uQXV0aGVudGljYXRvcjpTU08` - OrganizationSSO
32
- * Currently, `App-Native Authentication` doesn't support organization SSO.
33
- * Tracker: TODO: Create `product-is` issue for this.
34
- */
35
- const HIDDEN_AUTHENTICATORS = ["T3JnYW5pemF0aW9uQXV0aGVudGljYXRvcjpTU08"];
36
- /**
37
- * Internal component that consumes FlowContext and renders the sign-in UI.
38
- */
39
- const BaseSignInContent = ({ afterSignInUrl, onInitialize, isLoading: externalIsLoading, onSubmit, onSuccess, onError, onFlowChange, className = "", inputClassName = "", buttonClassName = "", errorClassName = "", messageClassName = "", size = "medium", variant = "outlined", showTitle = true, showSubtitle = true }) => {
40
- const { theme } = require_useTheme.default();
41
- const { t } = require_useTranslation.default();
42
- const { subtitle: flowSubtitle, title: flowTitle, messages: flowMessages } = require_useFlow.default();
43
- const styles = require_BaseSignIn_styles.default(theme, theme.vars.colors.text.primary);
44
- const [isSignInInitializationRequestLoading, setIsSignInInitializationRequestLoading] = (0, react.useState)(false);
45
- const [isInitialized, setIsInitialized] = (0, react.useState)(false);
46
- const [currentFlow, setCurrentFlow] = (0, react.useState)(null);
47
- const [currentAuthenticator, setCurrentAuthenticator] = (0, react.useState)(null);
48
- const [error, setError] = (0, react.useState)(null);
49
- const [messages, setMessages] = (0, react.useState)([]);
50
- const isLoading = externalIsLoading || isSignInInitializationRequestLoading;
51
- const reRenderCheckRef = (0, react.useRef)(false);
52
- const { values: formValues, touched: touchedFields, setValue: setFormValue, setTouched: setFormTouched, validateForm, touchAllFields, reset: resetForm } = require_useForm.useForm({
53
- fields: currentAuthenticator?.metadata?.params?.map((param) => ({
54
- initialValue: "",
55
- name: param.param,
56
- required: currentAuthenticator.requiredParams.includes(param.param),
57
- validator: (value) => {
58
- if (currentAuthenticator.requiredParams.includes(param.param) && (!value || value.trim() === "")) return t("validations.required.field.error");
59
- return null;
60
- }
61
- })) || [],
62
- initialValues: {},
63
- requiredMessage: t("validations.required.field.error"),
64
- validateOnBlur: true,
65
- validateOnChange: false
66
- });
67
- /**
68
- * Setup form fields based on the current authenticator.
69
- */
70
- const setupFormFields = (0, react.useCallback)((authenticator) => {
71
- const initialValues = {};
72
- authenticator.metadata?.params?.forEach((param) => {
73
- initialValues[param.param] = "";
74
- });
75
- resetForm();
76
- Object.keys(initialValues).forEach((key) => {
77
- setFormValue(key, initialValues[key]);
78
- });
79
- }, [resetForm, setFormValue]);
80
- /**
81
- * Check if the response contains a redirection URL and perform the redirect if necessary.
82
- * @param response - The authentication response
83
- * @returns true if a redirect was performed, false otherwise
84
- */
85
- const handleRedirectionIfNeeded = (response) => {
86
- if (response && "nextStep" in response && response.nextStep && response.nextStep.stepType === __thunderid_browser.EmbeddedSignInFlowStepType.AuthenticatorPrompt && response.nextStep.authenticators?.length === 1) {
87
- const responseAuthenticator = response.nextStep.authenticators[0];
88
- if (responseAuthenticator.metadata?.promptType === __thunderid_browser.EmbeddedSignInFlowAuthenticatorPromptType.RedirectionPrompt && responseAuthenticator.metadata?.additionalData?.redirectUrl) {
89
- /**
90
- * Open a popup window to handle redirection prompts
91
- */
92
- const redirectUrl = responseAuthenticator.metadata?.additionalData?.redirectUrl;
93
- const popup = window.open(redirectUrl, "oauth_popup", "width=500,height=600,scrollbars=yes,resizable=yes");
94
- if (!popup) {
95
- logger.error("Failed to open popup window");
96
- return false;
97
- }
98
- /**
99
- * Forward declarations for mutually referencing variables.
100
- * `messageHandler`, `cleanup`, and `popupMonitor` reference each other,
101
- * so they are declared with `let` first and assigned below.
102
- */
103
- let messageHandler;
104
- let popupMonitor;
105
- const cleanup = () => {
106
- window.removeEventListener("message", messageHandler);
107
- if (popupMonitor) clearInterval(popupMonitor);
108
- };
109
- /**
110
- * Add an event listener to the window to capture the message from the popup
111
- */
112
- messageHandler = async function messageEventHandler(event) {
113
- /**
114
- * Check if the message is from our popup window
115
- */
116
- if (event.source !== popup) {
117
- if (event.source !== window && event.source !== window.parent) {}
118
- return;
119
- }
120
- /**
121
- * Check the origin of the message to ensure it's from a trusted source
122
- */
123
- const expectedOrigin = afterSignInUrl ? new URL(afterSignInUrl).origin : window.location.origin;
124
- if (event.origin !== expectedOrigin && event.origin !== window.location.origin) return;
125
- const { code, state } = event.data;
126
- if (code && state) {
127
- await onSubmit({
128
- flowId: currentFlow.flowId,
129
- selectedAuthenticator: {
130
- authenticatorId: responseAuthenticator.authenticatorId,
131
- params: {
132
- code,
133
- state
134
- }
135
- }
136
- }, {
137
- method: currentFlow?.links[0].method,
138
- url: currentFlow?.links[0].href
139
- });
140
- popup.close();
141
- cleanup();
142
- }
143
- };
144
- window.addEventListener("message", messageHandler);
145
- /**
146
- * Monitor popup for closure and URL changes
147
- */
148
- let hasProcessedCallback = false;
149
- popupMonitor = setInterval(async () => {
150
- try {
151
- if (popup.closed) {
152
- cleanup();
153
- return;
154
- }
155
- if (hasProcessedCallback) return;
156
- try {
157
- const popupUrl = popup.location.href;
158
- if (popupUrl && (popupUrl.includes("code=") || popupUrl.includes("error="))) {
159
- hasProcessedCallback = true;
160
- const url = new URL(popupUrl);
161
- const code = url.searchParams.get("code");
162
- const state = url.searchParams.get("state");
163
- if (url.searchParams.get("error")) {
164
- logger.error("OAuth error:");
165
- popup.close();
166
- cleanup();
167
- return;
168
- }
169
- if (code && state) {
170
- const submitResponse = await onSubmit({
171
- flowId: currentFlow.flowId,
172
- selectedAuthenticator: {
173
- authenticatorId: responseAuthenticator.authenticatorId,
174
- params: {
175
- code,
176
- state
177
- }
178
- }
179
- }, {
180
- method: currentFlow?.links[0].method,
181
- url: currentFlow?.links[0].href
182
- });
183
- popup.close();
184
- onFlowChange?.(submitResponse);
185
- if (submitResponse?.flowStatus === __thunderid_browser.EmbeddedSignInFlowStatus.SuccessCompleted) onSuccess?.(submitResponse.authData);
186
- }
187
- }
188
- } catch (e) {}
189
- } catch (e) {
190
- logger.error("Error monitoring popup:");
191
- }
192
- }, 1e3);
193
- return true;
194
- }
195
- }
196
- return false;
197
- };
198
- /**
199
- * Handle form submission.
200
- */
201
- const handleSubmit = async (submittedValues) => {
202
- if (!currentFlow || !currentAuthenticator) return;
203
- touchAllFields();
204
- if (!validateForm().isValid) return;
205
- setIsSignInInitializationRequestLoading(true);
206
- setError(null);
207
- setMessages([]);
208
- try {
209
- const response = await onSubmit({
210
- flowId: currentFlow.flowId,
211
- selectedAuthenticator: {
212
- authenticatorId: currentAuthenticator.authenticatorId,
213
- params: submittedValues
214
- }
215
- }, {
216
- method: currentFlow?.links[0].method,
217
- url: currentFlow?.links[0].href
218
- });
219
- onFlowChange?.(response);
220
- if (response?.flowStatus === __thunderid_browser.EmbeddedSignInFlowStatus.SuccessCompleted) {
221
- onSuccess?.(response.authData);
222
- return;
223
- }
224
- if (response?.flowStatus === __thunderid_browser.EmbeddedSignInFlowStatus.FailCompleted || response?.flowStatus === __thunderid_browser.EmbeddedSignInFlowStatus.FailIncomplete) {
225
- setError(t("errors.signin.flow.completion.failure"));
226
- return;
227
- }
228
- if (handleRedirectionIfNeeded(response)) return;
229
- if (response && "flowId" in response && "nextStep" in response) {
230
- const nextStepResponse = response;
231
- setCurrentFlow(nextStepResponse);
232
- if (nextStepResponse.nextStep?.authenticators?.length > 0) if (nextStepResponse.nextStep.stepType === __thunderid_browser.EmbeddedSignInFlowStepType.MultiOptionsPrompt && nextStepResponse.nextStep.authenticators.length > 1) setCurrentAuthenticator(null);
233
- else {
234
- const nextAuthenticator = nextStepResponse.nextStep.authenticators[0];
235
- setCurrentAuthenticator(nextAuthenticator);
236
- setupFormFields(nextAuthenticator);
237
- }
238
- if (nextStepResponse.nextStep?.messages) setMessages(nextStepResponse.nextStep.messages.map((msg) => ({
239
- message: msg.message || "",
240
- type: msg.type || "INFO"
241
- })));
242
- }
243
- } catch (err) {
244
- setError(err instanceof __thunderid_browser.ThunderIDAPIError ? err.message : t("errors.signin.flow.failure"));
245
- onError?.(err);
246
- } finally {
247
- setIsSignInInitializationRequestLoading(false);
248
- }
249
- };
250
- /**
251
- * Handle authenticator selection for multi-option prompts.
252
- */
253
- const handleAuthenticatorSelection = async (authenticator, formData) => {
254
- if (!currentFlow) return;
255
- if (formData) touchAllFields();
256
- setIsSignInInitializationRequestLoading(true);
257
- setError(null);
258
- setMessages([]);
259
- try {
260
- if (isPasskeyAuthenticator(authenticator)) try {
261
- const challengeData = authenticator.metadata?.additionalData?.challengeData;
262
- if (!challengeData) throw new Error("Missing challenge data for passkey authentication");
263
- const tokenResponse = await (0, __thunderid_browser.handleWebAuthnAuthentication)(challengeData);
264
- const response = await onSubmit({
265
- flowId: currentFlow.flowId,
266
- selectedAuthenticator: {
267
- authenticatorId: authenticator.authenticatorId,
268
- params: { tokenResponse }
269
- }
270
- }, {
271
- method: currentFlow?.links[0].method,
272
- url: currentFlow?.links[0].href
273
- });
274
- onFlowChange?.(response);
275
- if (response?.flowStatus === __thunderid_browser.EmbeddedSignInFlowStatus.SuccessCompleted) {
276
- onSuccess?.(response.authData);
277
- return;
278
- }
279
- if (response?.flowStatus === __thunderid_browser.EmbeddedSignInFlowStatus.FailCompleted || response?.flowStatus === __thunderid_browser.EmbeddedSignInFlowStatus.FailIncomplete) {
280
- setError(t("errors.signin.flow.passkeys.completion.failure"));
281
- return;
282
- }
283
- if (response && "flowId" in response && "nextStep" in response) {
284
- const nextStepResponse = response;
285
- setCurrentFlow(nextStepResponse);
286
- if (nextStepResponse.nextStep?.authenticators?.length > 0) if (nextStepResponse.nextStep.stepType === __thunderid_browser.EmbeddedSignInFlowStepType.MultiOptionsPrompt && nextStepResponse.nextStep.authenticators.length > 1) setCurrentAuthenticator(null);
287
- else {
288
- const nextAuthenticator = nextStepResponse.nextStep.authenticators[0];
289
- if (isPasskeyAuthenticator(nextAuthenticator)) {
290
- handleAuthenticatorSelection(nextAuthenticator);
291
- return;
292
- }
293
- setCurrentAuthenticator(nextAuthenticator);
294
- setupFormFields(nextAuthenticator);
295
- }
296
- if (nextStepResponse.nextStep?.messages) setMessages(nextStepResponse.nextStep.messages.map((msg) => ({
297
- message: msg.message || "",
298
- type: msg.type || "INFO"
299
- })));
300
- }
301
- } catch (passkeyError) {
302
- logger.error("Passkey authentication error:");
303
- let errorMessage = passkeyError instanceof Error ? passkeyError.message : t("errors.signin.flow.passkeys.failure");
304
- if (passkeyError instanceof Error && passkeyError.message.includes("security")) errorMessage += " This may be due to browser security settings, an insecure connection, or device restrictions.";
305
- setError(errorMessage);
306
- }
307
- else if (authenticator.metadata?.promptType === __thunderid_browser.EmbeddedSignInFlowAuthenticatorPromptType.RedirectionPrompt) {
308
- const response = await onSubmit({
309
- flowId: currentFlow.flowId,
310
- selectedAuthenticator: {
311
- authenticatorId: authenticator.authenticatorId,
312
- params: {}
313
- }
314
- }, {
315
- method: currentFlow?.links[0].method,
316
- url: currentFlow?.links[0].href
317
- });
318
- onFlowChange?.(response);
319
- if (response?.flowStatus === __thunderid_browser.EmbeddedSignInFlowStatus.SuccessCompleted) {
320
- onSuccess?.(response.authData);
321
- return;
322
- }
323
- if (handleRedirectionIfNeeded(response)) {}
324
- } else if (formData) {
325
- if (!validateForm().isValid) return;
326
- const formResponse = await onSubmit({
327
- flowId: currentFlow.flowId,
328
- selectedAuthenticator: {
329
- authenticatorId: authenticator.authenticatorId,
330
- params: formData
331
- }
332
- }, {
333
- method: currentFlow?.links[0].method,
334
- url: currentFlow?.links[0].href
335
- });
336
- onFlowChange?.(formResponse);
337
- if (formResponse?.flowStatus === __thunderid_browser.EmbeddedSignInFlowStatus.SuccessCompleted) {
338
- onSuccess?.(formResponse.authData);
339
- return;
340
- }
341
- if (formResponse?.flowStatus === __thunderid_browser.EmbeddedSignInFlowStatus.FailCompleted || formResponse?.flowStatus === __thunderid_browser.EmbeddedSignInFlowStatus.FailIncomplete) {
342
- setError("Authentication failed. Please check your credentials and try again.");
343
- return;
344
- }
345
- if (handleRedirectionIfNeeded(formResponse)) return;
346
- if (formResponse && "flowId" in formResponse && "nextStep" in formResponse) {
347
- const nextStepResponse = formResponse;
348
- setCurrentFlow(nextStepResponse);
349
- if (nextStepResponse.nextStep?.authenticators?.length > 0) if (nextStepResponse.nextStep.stepType === __thunderid_browser.EmbeddedSignInFlowStepType.MultiOptionsPrompt && nextStepResponse.nextStep.authenticators.length > 1) setCurrentAuthenticator(null);
350
- else {
351
- const nextAuthenticator = nextStepResponse.nextStep.authenticators[0];
352
- if (isPasskeyAuthenticator(nextAuthenticator)) {
353
- handleAuthenticatorSelection(nextAuthenticator);
354
- return;
355
- }
356
- setCurrentAuthenticator(nextAuthenticator);
357
- setupFormFields(nextAuthenticator);
358
- }
359
- if (nextStepResponse.nextStep?.messages) setMessages(nextStepResponse.nextStep.messages.map((msg) => ({
360
- message: msg.message || "",
361
- type: msg.type || "INFO"
362
- })));
363
- }
364
- } else if (!(authenticator.metadata?.params && authenticator.metadata.params.length > 0)) {
365
- const response = await onSubmit({
366
- flowId: currentFlow.flowId,
367
- selectedAuthenticator: {
368
- authenticatorId: authenticator.authenticatorId,
369
- params: {}
370
- }
371
- }, {
372
- method: currentFlow?.links[0].method,
373
- url: currentFlow?.links[0].href
374
- });
375
- onFlowChange?.(response);
376
- if (response?.flowStatus === __thunderid_browser.EmbeddedSignInFlowStatus.SuccessCompleted) {
377
- onSuccess?.(response.authData);
378
- return;
379
- }
380
- if (response?.flowStatus === __thunderid_browser.EmbeddedSignInFlowStatus.FailCompleted || response?.flowStatus === __thunderid_browser.EmbeddedSignInFlowStatus.FailIncomplete) {
381
- setError("Authentication failed. Please try again.");
382
- return;
383
- }
384
- if (handleRedirectionIfNeeded(response)) return;
385
- if (response && "flowId" in response && "nextStep" in response) {
386
- const nextStepResponse = response;
387
- setCurrentFlow(nextStepResponse);
388
- if (nextStepResponse.nextStep?.authenticators?.length > 0) if (nextStepResponse.nextStep.stepType === __thunderid_browser.EmbeddedSignInFlowStepType.MultiOptionsPrompt && nextStepResponse.nextStep.authenticators.length > 1) setCurrentAuthenticator(null);
389
- else {
390
- const nextAuthenticator = nextStepResponse.nextStep.authenticators[0];
391
- if (isPasskeyAuthenticator(nextAuthenticator)) {
392
- handleAuthenticatorSelection(nextAuthenticator);
393
- return;
394
- }
395
- setCurrentAuthenticator(nextAuthenticator);
396
- setupFormFields(nextAuthenticator);
397
- }
398
- if (nextStepResponse.nextStep?.messages) setMessages(nextStepResponse.nextStep.messages.map((msg) => ({
399
- message: msg.message || "",
400
- type: msg.type || "INFO"
401
- })));
402
- }
403
- } else {
404
- setCurrentAuthenticator(authenticator);
405
- setupFormFields(authenticator);
406
- }
407
- } catch (err) {
408
- setError(err instanceof __thunderid_browser.ThunderIDAPIError ? err?.message : "Authenticator selection failed");
409
- onError?.(err);
410
- } finally {
411
- setIsSignInInitializationRequestLoading(false);
412
- }
413
- };
414
- /**
415
- * Handle input value changes.
416
- */
417
- const handleInputChange = (param, value) => {
418
- setFormValue(param, value);
419
- setFormTouched(param, true);
420
- };
421
- /**
422
- * Check if current flow has multiple authenticator options.
423
- */
424
- const hasMultipleOptions = (0, react.useCallback)(() => !!(currentFlow && "nextStep" in currentFlow && currentFlow.nextStep?.stepType === __thunderid_browser.EmbeddedSignInFlowStepType.MultiOptionsPrompt && currentFlow.nextStep?.authenticators && currentFlow.nextStep.authenticators.length > 1), [currentFlow]);
425
- /**
426
- * Get available authenticators for selection.
427
- */
428
- const getAvailableAuthenticators = (0, react.useCallback)(() => {
429
- if (!currentFlow || !("nextStep" in currentFlow) || !currentFlow.nextStep?.authenticators) return [];
430
- return currentFlow.nextStep.authenticators;
431
- }, [currentFlow]);
432
- const containerClasses = (0, __emotion_css.cx)([
433
- (0, __thunderid_browser.withVendorCSSClassPrefix)("signin"),
434
- (0, __thunderid_browser.withVendorCSSClassPrefix)(`signin--${size}`),
435
- (0, __thunderid_browser.withVendorCSSClassPrefix)(`signin--${variant}`)
436
- ], className);
437
- const inputClasses = (0, __emotion_css.cx)([
438
- (0, __thunderid_browser.withVendorCSSClassPrefix)("signin__input"),
439
- size === "small" && (0, __thunderid_browser.withVendorCSSClassPrefix)("signin__input--small"),
440
- size === "large" && (0, __thunderid_browser.withVendorCSSClassPrefix)("signin__input--large")
441
- ], inputClassName);
442
- const buttonClasses = (0, __emotion_css.cx)([
443
- (0, __thunderid_browser.withVendorCSSClassPrefix)("signin__button"),
444
- size === "small" && (0, __thunderid_browser.withVendorCSSClassPrefix)("signin__button--small"),
445
- size === "large" && (0, __thunderid_browser.withVendorCSSClassPrefix)("signin__button--large")
446
- ], buttonClassName);
447
- const errorClasses = (0, __emotion_css.cx)([(0, __thunderid_browser.withVendorCSSClassPrefix)("signin__error")], errorClassName);
448
- const messageClasses = (0, __emotion_css.cx)([(0, __thunderid_browser.withVendorCSSClassPrefix)("signin__messages")], messageClassName);
449
- (0, react.useEffect)(() => {
450
- if (isLoading) return;
451
- if (reRenderCheckRef.current) return;
452
- reRenderCheckRef.current = true;
453
- (async () => {
454
- setIsSignInInitializationRequestLoading(true);
455
- setError(null);
456
- try {
457
- const response = await onInitialize?.();
458
- setCurrentFlow(response);
459
- setIsInitialized(true);
460
- onFlowChange?.(response);
461
- if (response?.flowStatus === __thunderid_browser.EmbeddedSignInFlowStatus.SuccessCompleted) {
462
- onSuccess?.(response.authData || {});
463
- return;
464
- }
465
- if (response?.nextStep?.authenticators?.length > 0) if (response.nextStep.stepType === __thunderid_browser.EmbeddedSignInFlowStepType.MultiOptionsPrompt && response.nextStep.authenticators.length > 1) setCurrentAuthenticator(null);
466
- else {
467
- const authenticator = response.nextStep.authenticators[0];
468
- setCurrentAuthenticator(authenticator);
469
- setupFormFields(authenticator);
470
- }
471
- if (response && "nextStep" in response && response.nextStep && "messages" in response.nextStep) setMessages((response.nextStep.messages || []).map((msg) => ({
472
- message: msg.message || "",
473
- type: msg.type || "INFO"
474
- })));
475
- } catch (err) {
476
- setError(err instanceof __thunderid_browser.ThunderIDAPIError ? err.message : t("errors.signin.initialization"));
477
- onError?.(err);
478
- } finally {
479
- setIsSignInInitializationRequestLoading(false);
480
- }
481
- })();
482
- }, [isLoading]);
483
- if (!isInitialized && isLoading) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Card.default, {
484
- className: (0, __emotion_css.cx)(containerClasses, styles["card"]),
485
- "data-testid": "thunderid-signin",
486
- variant,
487
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Card.default.Content, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
488
- className: styles["loadingContainer"],
489
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Spinner.default, { size: "medium" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Typography.default, {
490
- variant: "body1",
491
- className: styles["loadingText"],
492
- children: t("messages.loading.placeholder")
493
- })]
494
- }) })
495
- });
496
- if (hasMultipleOptions() && !currentAuthenticator) {
497
- const availableAuthenticators = getAvailableAuthenticators();
498
- const userPromptAuthenticators = availableAuthenticators.filter((auth) => auth.metadata?.promptType === __thunderid_browser.EmbeddedSignInFlowAuthenticatorPromptType.UserPrompt || auth.idp === "LOCAL" && auth.metadata?.params && auth.metadata.params.length > 0);
499
- const optionAuthenticators = availableAuthenticators.filter((auth) => !userPromptAuthenticators.includes(auth)).filter((authenticator) => !HIDDEN_AUTHENTICATORS.includes(authenticator.authenticatorId));
500
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_Card.default, {
501
- className: (0, __emotion_css.cx)(containerClasses, styles["card"]),
502
- "data-testid": "thunderid-signin",
503
- variant,
504
- children: [(showTitle || showSubtitle) && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_Card.default.Header, {
505
- className: styles["header"],
506
- children: [showTitle && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Card.default.Title, {
507
- level: 2,
508
- className: styles["title"],
509
- children: flowTitle || t("signin.heading")
510
- }), showSubtitle && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Typography.default, {
511
- variant: "body1",
512
- className: styles["subtitle"],
513
- children: flowSubtitle || t("signin.subheading")
514
- })]
515
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_Card.default.Content, { children: [
516
- flowMessages && flowMessages.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
517
- className: styles["flowMessagesContainer"],
518
- children: flowMessages.map((flowMessage, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Alert.default, {
519
- variant: flowMessage.type,
520
- className: (0, __emotion_css.cx)(styles["flowMessageItem"], messageClasses),
521
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Alert.default.Description, { children: flowMessage.message })
522
- }, flowMessage.id || index))
523
- }),
524
- messages.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
525
- className: styles["messagesContainer"],
526
- children: messages.map((message, index) => {
527
- let messageVariant;
528
- const lowerType = message.type.toLowerCase();
529
- if (lowerType === "error") messageVariant = "error";
530
- else if (lowerType === "warning") messageVariant = "warning";
531
- else if (lowerType === "success") messageVariant = "success";
532
- else messageVariant = "info";
533
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Alert.default, {
534
- variant: messageVariant,
535
- className: (0, __emotion_css.cx)(styles["messageItem"], messageClasses),
536
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Alert.default.Description, { children: message.message })
537
- }, index);
538
- })
539
- }),
540
- error && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_Alert.default, {
541
- variant: "error",
542
- className: (0, __emotion_css.cx)(styles["errorContainer"], errorClasses),
543
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Alert.default.Title, { children: "Error" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Alert.default.Description, { children: error })]
544
- }),
545
- /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
546
- className: styles["contentContainer"],
547
- children: [
548
- userPromptAuthenticators.map((authenticator, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
549
- className: styles["authenticatorItem"],
550
- children: [index > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Divider.default, {
551
- className: styles["divider"],
552
- children: "OR"
553
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("form", {
554
- className: styles["form"],
555
- onSubmit: (e) => {
556
- e.preventDefault();
557
- const formData = {};
558
- authenticator.metadata?.params?.forEach((param) => {
559
- formData[param.param] = formValues[param.param] || "";
560
- });
561
- handleAuthenticatorSelection(authenticator, formData);
562
- },
563
- children: require_SignInOptionFactory.createSignInOptionFromAuthenticator(authenticator, formValues, touchedFields, isLoading, handleInputChange, (auth, formData) => handleAuthenticatorSelection(auth, formData), {
564
- buttonClassName: buttonClasses,
565
- error,
566
- inputClassName: inputClasses
567
- })
568
- })]
569
- }, authenticator.authenticatorId)),
570
- userPromptAuthenticators.length > 0 && optionAuthenticators.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Divider.default, {
571
- className: styles["divider"],
572
- children: "OR"
573
- }),
574
- optionAuthenticators.map((authenticator) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
575
- className: styles["authenticatorItem"],
576
- children: require_SignInOptionFactory.createSignInOptionFromAuthenticator(authenticator, formValues, touchedFields, isLoading, handleInputChange, (auth, formData) => handleAuthenticatorSelection(auth, formData), {
577
- buttonClassName: buttonClasses,
578
- error,
579
- inputClassName: inputClasses
580
- })
581
- }, authenticator.authenticatorId))
582
- ]
583
- })
584
- ] })]
585
- });
586
- }
587
- if (!currentAuthenticator) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Card.default, {
588
- className: (0, __emotion_css.cx)(containerClasses, styles["noAuthenticatorCard"]),
589
- "data-testid": "thunderid-signin",
590
- variant,
591
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Card.default.Content, { children: error && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_Alert.default, {
592
- variant: "error",
593
- className: styles["errorAlert"],
594
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Alert.default.Title, { children: t("errors.heading") || "Error" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Alert.default.Description, { children: error })]
595
- }) })
596
- });
597
- if (isPasskeyAuthenticator(currentAuthenticator) && !isLoading) {
598
- (0, react.useEffect)(() => {
599
- handleAuthenticatorSelection(currentAuthenticator);
600
- }, [currentAuthenticator]);
601
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Card.default, {
602
- className: (0, __emotion_css.cx)(containerClasses, styles["card"]),
603
- "data-testid": "thunderid-signin",
604
- variant,
605
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Card.default.Content, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
606
- className: styles["centeredContainer"],
607
- children: [
608
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
609
- className: styles["passkeyContainer"],
610
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Spinner.default, { size: "large" })
611
- }),
612
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Typography.default, {
613
- variant: "body1",
614
- children: t("passkey.authenticating") || "Authenticating with passkey..."
615
- }),
616
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Typography.default, {
617
- variant: "body2",
618
- className: styles["passkeyText"],
619
- children: t("passkey.instruction") || "Please use your fingerprint, face, or security key to authenticate."
620
- })
621
- ]
622
- }) })
623
- });
624
- }
625
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_Card.default, {
626
- className: (0, __emotion_css.cx)(containerClasses, styles["card"]),
627
- "data-testid": "thunderid-signin",
628
- variant,
629
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_Card.default.Header, {
630
- className: styles["header"],
631
- children: [
632
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Card.default.Title, {
633
- level: 2,
634
- className: styles["title"],
635
- children: flowTitle || t("signin.heading")
636
- }),
637
- /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Typography.default, {
638
- variant: "body1",
639
- className: styles["subtitle"],
640
- children: flowSubtitle || t("signin.subheading")
641
- }),
642
- flowMessages && flowMessages.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
643
- className: styles["flowMessagesContainer"],
644
- children: flowMessages.map((flowMessage, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Alert.default, {
645
- variant: flowMessage.type,
646
- className: (0, __emotion_css.cx)(styles["flowMessageItem"], messageClasses),
647
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Alert.default.Description, { children: flowMessage.message })
648
- }, flowMessage.id || index))
649
- }),
650
- messages.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
651
- className: styles["messagesContainer"],
652
- children: messages.map((message, index) => {
653
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Alert.default, {
654
- variant: {
655
- error: "error",
656
- success: "success",
657
- warning: "warning"
658
- }[message.type.toLowerCase()] || "info",
659
- className: (0, __emotion_css.cx)(styles["messageItem"], messageClasses),
660
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Alert.default.Description, { children: message.message })
661
- }, index);
662
- })
663
- })
664
- ]
665
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_Card.default.Content, { children: [error && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_Alert.default, {
666
- variant: "error",
667
- className: (0, __emotion_css.cx)(styles["errorContainer"], errorClasses),
668
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Alert.default.Title, { children: t("errors.heading") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Alert.default.Description, { children: error })]
669
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("form", {
670
- className: styles["form"],
671
- onSubmit: (e) => {
672
- e.preventDefault();
673
- const formData = {};
674
- currentAuthenticator.metadata?.params?.forEach((param) => {
675
- formData[param.param] = formValues[param.param] || "";
676
- });
677
- handleSubmit(formData);
678
- },
679
- children: require_SignInOptionFactory.createSignInOptionFromAuthenticator(currentAuthenticator, formValues, touchedFields, isLoading, handleInputChange, (authenticator, formData) => handleSubmit(formData || formValues), {
680
- buttonClassName: buttonClasses,
681
- error,
682
- inputClassName: inputClasses
683
- })
684
- })] })]
685
- });
686
- };
687
- /**
688
- * Base SignIn component that provides native authentication flow.
689
- * This component handles both the presentation layer and authentication flow logic.
690
- * It accepts API functions as props to maintain framework independence.
691
- *
692
- * @example
693
- * ```tsx
694
- * import { BaseSignIn } from '@thunderid/react';
695
- *
696
- * const MySignIn = () => {
697
- * return (
698
- * <BaseSignIn
699
- * onInitialize={async () => {
700
- * // Your API call to initialize authentication
701
- * return await initializeAuth();
702
- * }}
703
- * onSubmit={async (payload) => {
704
- * // Your API call to handle authentication
705
- * return await handleAuth(payload);
706
- * }}
707
- * onSuccess={(authData) => {
708
- * console.log('Success:', authData);
709
- * }}
710
- * onError={(error) => {
711
- * console.error('Error:', error);
712
- * }}
713
- * className="max-w-md mx-auto"
714
- * />
715
- * );
716
- * };
717
- * ```
718
- */
719
- const BaseSignIn = ({ showLogo = true,...rest }) => {
720
- const { theme } = require_useTheme.default();
721
- const styles = require_BaseSignIn_styles.default(theme, theme.vars.colors.text.primary);
722
- return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [showLogo && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
723
- className: styles["logoContainer"],
724
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Logo.default, { size: "large" })
725
- }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_FlowProvider.default, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(BaseSignInContent, {
726
- showLogo,
727
- ...rest
728
- }) })] });
729
- };
730
- var BaseSignIn_default = BaseSignIn;
731
-
732
- //#endregion
733
- exports.default = BaseSignIn_default;
734
- //# sourceMappingURL=BaseSignIn.cjs.map