@thunderid/react 1.0.8 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (230) hide show
  1. package/dist/api/updateMeCredentials.d.ts +33 -0
  2. package/dist/api/updateMeCredentials.d.ts.map +1 -0
  3. package/dist/api/updateMeCredentials.js +29 -0
  4. package/dist/api/updateMeCredentials.js.map +1 -0
  5. package/dist/cjs/api/updateMeCredentials.cjs +31 -0
  6. package/dist/cjs/api/updateMeCredentials.cjs.map +1 -0
  7. package/dist/cjs/components/presentation/ChangeCredential/BaseChangeCredential.cjs +187 -0
  8. package/dist/cjs/components/presentation/ChangeCredential/BaseChangeCredential.cjs.map +1 -0
  9. package/dist/cjs/components/presentation/ChangeCredential/BaseChangeCredential.styles.cjs +108 -0
  10. package/dist/cjs/components/presentation/ChangeCredential/BaseChangeCredential.styles.cjs.map +1 -0
  11. package/dist/cjs/components/presentation/ChangeCredential/ChangeCredential.cjs +123 -0
  12. package/dist/cjs/components/presentation/ChangeCredential/ChangeCredential.cjs.map +1 -0
  13. package/dist/cjs/components/presentation/LanguageSwitcher/BaseLanguageSwitcher.cjs +1 -1
  14. package/dist/cjs/components/presentation/UserDropdown/BaseUserDropdown.cjs +2 -2
  15. package/dist/cjs/components/presentation/UserDropdown/BaseUserDropdown.cjs.map +1 -1
  16. package/dist/cjs/components/presentation/UserDropdown/UserDropdown.cjs +8 -4
  17. package/dist/cjs/components/presentation/UserDropdown/UserDropdown.cjs.map +1 -1
  18. package/dist/cjs/components/presentation/UserProfile/BaseUserProfile.styles.cjs +2 -0
  19. package/dist/cjs/components/presentation/UserProfile/BaseUserProfile.styles.cjs.map +1 -1
  20. package/dist/cjs/components/presentation/auth/AuthOptionFactory.cjs +13 -0
  21. package/dist/cjs/components/presentation/auth/AuthOptionFactory.cjs.map +1 -1
  22. package/dist/cjs/components/presentation/auth/SignUp/BaseSignUp.cjs +69 -66
  23. package/dist/cjs/components/presentation/auth/SignUp/BaseSignUp.cjs.map +1 -1
  24. package/dist/cjs/components/primitives/KeyValueList/KeyValueList.cjs +41 -0
  25. package/dist/cjs/components/primitives/KeyValueList/KeyValueList.cjs.map +1 -0
  26. package/dist/cjs/components/primitives/KeyValueList/KeyValueList.styles.cjs +46 -0
  27. package/dist/cjs/components/primitives/KeyValueList/KeyValueList.styles.cjs.map +1 -0
  28. package/dist/cjs/components/primitives/PasswordField/PasswordField.cjs +2 -2
  29. package/dist/cjs/components/primitives/PasswordField/PasswordField.cjs.map +1 -1
  30. package/dist/cjs/contexts/Theme/ThemeProvider.cjs +26 -4
  31. package/dist/cjs/contexts/Theme/ThemeProvider.cjs.map +1 -1
  32. package/dist/cjs/contexts/ThunderID/ThunderIDContext.cjs +2 -0
  33. package/dist/cjs/contexts/ThunderID/ThunderIDContext.cjs.map +1 -1
  34. package/dist/cjs/contexts/ThunderID/ThunderIDProvider.cjs +7 -1
  35. package/dist/cjs/contexts/ThunderID/ThunderIDProvider.cjs.map +1 -1
  36. package/dist/cjs/hooks/agents/useCreateAgent.cjs +26 -0
  37. package/dist/cjs/hooks/agents/useCreateAgent.cjs.map +1 -0
  38. package/dist/cjs/hooks/agents/useDeleteAgent.cjs +26 -0
  39. package/dist/cjs/hooks/agents/useDeleteAgent.cjs.map +1 -0
  40. package/dist/cjs/hooks/agents/useGetAgent.cjs +30 -0
  41. package/dist/cjs/hooks/agents/useGetAgent.cjs.map +1 -0
  42. package/dist/cjs/hooks/agents/useGetAgents.cjs +31 -0
  43. package/dist/cjs/hooks/agents/useGetAgents.cjs.map +1 -0
  44. package/dist/cjs/hooks/agents/useUpdateAgent.cjs +27 -0
  45. package/dist/cjs/hooks/agents/useUpdateAgent.cjs.map +1 -0
  46. package/dist/cjs/hooks/applications/useCreateApplication.cjs +31 -0
  47. package/dist/cjs/hooks/applications/useCreateApplication.cjs.map +1 -0
  48. package/dist/cjs/hooks/applications/useDeleteApplication.cjs +26 -0
  49. package/dist/cjs/hooks/applications/useDeleteApplication.cjs.map +1 -0
  50. package/dist/cjs/hooks/applications/useGetApplication.cjs +35 -0
  51. package/dist/cjs/hooks/applications/useGetApplication.cjs.map +1 -0
  52. package/dist/cjs/hooks/applications/useGetApplications.cjs +36 -0
  53. package/dist/cjs/hooks/applications/useGetApplications.cjs.map +1 -0
  54. package/dist/cjs/hooks/applications/useUpdateApplication.cjs +27 -0
  55. package/dist/cjs/hooks/applications/useUpdateApplication.cjs.map +1 -0
  56. package/dist/cjs/hooks/useManagementEndpoint.cjs +25 -0
  57. package/dist/cjs/hooks/useManagementEndpoint.cjs.map +1 -0
  58. package/dist/cjs/hooks/useResourceMutation.cjs +72 -0
  59. package/dist/cjs/hooks/useResourceMutation.cjs.map +1 -0
  60. package/dist/cjs/hooks/useResourceQuery.cjs +86 -0
  61. package/dist/cjs/hooks/useResourceQuery.cjs.map +1 -0
  62. package/dist/cjs/hooks/users/useCreateUser.cjs +26 -0
  63. package/dist/cjs/hooks/users/useCreateUser.cjs.map +1 -0
  64. package/dist/cjs/hooks/users/useDeleteUser.cjs +26 -0
  65. package/dist/cjs/hooks/users/useDeleteUser.cjs.map +1 -0
  66. package/dist/cjs/hooks/users/useGetUser.cjs +30 -0
  67. package/dist/cjs/hooks/users/useGetUser.cjs.map +1 -0
  68. package/dist/cjs/hooks/users/useGetUsers.cjs +38 -0
  69. package/dist/cjs/hooks/users/useGetUsers.cjs.map +1 -0
  70. package/dist/cjs/hooks/users/useUpdateUser.cjs +27 -0
  71. package/dist/cjs/hooks/users/useUpdateUser.cjs.map +1 -0
  72. package/dist/cjs/index.cjs +152 -0
  73. package/dist/cjs/utils/createAuthenticatedFetcher.cjs +43 -0
  74. package/dist/cjs/utils/createAuthenticatedFetcher.cjs.map +1 -0
  75. package/dist/cjs/utils/createResourceInvalidator.cjs +38 -0
  76. package/dist/cjs/utils/createResourceInvalidator.cjs.map +1 -0
  77. package/dist/components/actions/SignInButton/BaseSignInButton.js +2 -2
  78. package/dist/components/actions/SignInButton/BaseSignInButton.js.map +1 -1
  79. package/dist/components/actions/SignOutButton/BaseSignOutButton.js +2 -2
  80. package/dist/components/actions/SignOutButton/BaseSignOutButton.js.map +1 -1
  81. package/dist/components/actions/SignUpButton/BaseSignUpButton.js +2 -2
  82. package/dist/components/actions/SignUpButton/BaseSignUpButton.js.map +1 -1
  83. package/dist/components/adapters/FlowTimer.js +2 -2
  84. package/dist/components/adapters/FlowTimer.js.map +1 -1
  85. package/dist/components/presentation/ChangeCredential/BaseChangeCredential.d.ts +100 -0
  86. package/dist/components/presentation/ChangeCredential/BaseChangeCredential.d.ts.map +1 -0
  87. package/dist/components/presentation/ChangeCredential/BaseChangeCredential.js +183 -0
  88. package/dist/components/presentation/ChangeCredential/BaseChangeCredential.js.map +1 -0
  89. package/dist/components/presentation/ChangeCredential/BaseChangeCredential.styles.d.ts +10 -0
  90. package/dist/components/presentation/ChangeCredential/BaseChangeCredential.styles.d.ts.map +1 -0
  91. package/dist/components/presentation/ChangeCredential/BaseChangeCredential.styles.js +108 -0
  92. package/dist/components/presentation/ChangeCredential/BaseChangeCredential.styles.js.map +1 -0
  93. package/dist/components/presentation/ChangeCredential/ChangeCredential.d.ts +55 -0
  94. package/dist/components/presentation/ChangeCredential/ChangeCredential.d.ts.map +1 -0
  95. package/dist/components/presentation/ChangeCredential/ChangeCredential.js +119 -0
  96. package/dist/components/presentation/ChangeCredential/ChangeCredential.js.map +1 -0
  97. package/dist/components/presentation/LanguageSwitcher/BaseLanguageSwitcher.js +3 -3
  98. package/dist/components/presentation/LanguageSwitcher/BaseLanguageSwitcher.js.map +1 -1
  99. package/dist/components/presentation/UserDropdown/BaseUserDropdown.d.ts +5 -0
  100. package/dist/components/presentation/UserDropdown/BaseUserDropdown.d.ts.map +1 -1
  101. package/dist/components/presentation/UserDropdown/BaseUserDropdown.js +2 -2
  102. package/dist/components/presentation/UserDropdown/BaseUserDropdown.js.map +1 -1
  103. package/dist/components/presentation/UserDropdown/UserDropdown.d.ts +12 -0
  104. package/dist/components/presentation/UserDropdown/UserDropdown.d.ts.map +1 -1
  105. package/dist/components/presentation/UserDropdown/UserDropdown.js +11 -7
  106. package/dist/components/presentation/UserDropdown/UserDropdown.js.map +1 -1
  107. package/dist/components/presentation/UserProfile/BaseUserProfile.js +8 -8
  108. package/dist/components/presentation/UserProfile/BaseUserProfile.js.map +1 -1
  109. package/dist/components/presentation/UserProfile/BaseUserProfile.styles.d.ts.map +1 -1
  110. package/dist/components/presentation/UserProfile/BaseUserProfile.styles.js +2 -0
  111. package/dist/components/presentation/UserProfile/BaseUserProfile.styles.js.map +1 -1
  112. package/dist/components/presentation/auth/AuthOptionFactory.d.ts.map +1 -1
  113. package/dist/components/presentation/auth/AuthOptionFactory.js +14 -1
  114. package/dist/components/presentation/auth/AuthOptionFactory.js.map +1 -1
  115. package/dist/components/presentation/auth/SignIn/SignIn.js +2 -2
  116. package/dist/components/presentation/auth/SignIn/SignIn.js.map +1 -1
  117. package/dist/components/presentation/auth/SignUp/BaseSignUp.d.ts.map +1 -1
  118. package/dist/components/presentation/auth/SignUp/BaseSignUp.js +69 -66
  119. package/dist/components/presentation/auth/SignUp/BaseSignUp.js.map +1 -1
  120. package/dist/components/primitives/AffixedField/AffixedField.js +2 -2
  121. package/dist/components/primitives/AffixedField/AffixedField.js.map +1 -1
  122. package/dist/components/primitives/KeyValueList/KeyValueList.d.ts +19 -0
  123. package/dist/components/primitives/KeyValueList/KeyValueList.d.ts.map +1 -0
  124. package/dist/components/primitives/KeyValueList/KeyValueList.js +38 -0
  125. package/dist/components/primitives/KeyValueList/KeyValueList.js.map +1 -0
  126. package/dist/components/primitives/KeyValueList/KeyValueList.styles.d.ts +4 -0
  127. package/dist/components/primitives/KeyValueList/KeyValueList.styles.d.ts.map +1 -0
  128. package/dist/components/primitives/KeyValueList/KeyValueList.styles.js +44 -0
  129. package/dist/components/primitives/KeyValueList/KeyValueList.styles.js.map +1 -0
  130. package/dist/components/primitives/PasswordField/PasswordField.d.ts +6 -0
  131. package/dist/components/primitives/PasswordField/PasswordField.d.ts.map +1 -1
  132. package/dist/components/primitives/PasswordField/PasswordField.js +2 -2
  133. package/dist/components/primitives/PasswordField/PasswordField.js.map +1 -1
  134. package/dist/contexts/Theme/ThemeProvider.d.ts +1 -1
  135. package/dist/contexts/Theme/ThemeProvider.d.ts.map +1 -1
  136. package/dist/contexts/Theme/ThemeProvider.js +27 -5
  137. package/dist/contexts/Theme/ThemeProvider.js.map +1 -1
  138. package/dist/contexts/ThunderID/ThunderIDContext.d.ts +12 -1
  139. package/dist/contexts/ThunderID/ThunderIDContext.d.ts.map +1 -1
  140. package/dist/contexts/ThunderID/ThunderIDContext.js +2 -0
  141. package/dist/contexts/ThunderID/ThunderIDContext.js.map +1 -1
  142. package/dist/contexts/ThunderID/ThunderIDProvider.d.ts.map +1 -1
  143. package/dist/contexts/ThunderID/ThunderIDProvider.js +7 -1
  144. package/dist/contexts/ThunderID/ThunderIDProvider.js.map +1 -1
  145. package/dist/hooks/agents/useCreateAgent.d.ts +11 -0
  146. package/dist/hooks/agents/useCreateAgent.d.ts.map +1 -0
  147. package/dist/hooks/agents/useCreateAgent.js +24 -0
  148. package/dist/hooks/agents/useCreateAgent.js.map +1 -0
  149. package/dist/hooks/agents/useDeleteAgent.d.ts +10 -0
  150. package/dist/hooks/agents/useDeleteAgent.d.ts.map +1 -0
  151. package/dist/hooks/agents/useDeleteAgent.js +24 -0
  152. package/dist/hooks/agents/useDeleteAgent.js.map +1 -0
  153. package/dist/hooks/agents/useGetAgent.d.ts +12 -0
  154. package/dist/hooks/agents/useGetAgent.d.ts.map +1 -0
  155. package/dist/hooks/agents/useGetAgent.js +28 -0
  156. package/dist/hooks/agents/useGetAgent.js.map +1 -0
  157. package/dist/hooks/agents/useGetAgents.d.ts +19 -0
  158. package/dist/hooks/agents/useGetAgents.d.ts.map +1 -0
  159. package/dist/hooks/agents/useGetAgents.js +29 -0
  160. package/dist/hooks/agents/useGetAgents.js.map +1 -0
  161. package/dist/hooks/agents/useUpdateAgent.d.ts +18 -0
  162. package/dist/hooks/agents/useUpdateAgent.d.ts.map +1 -0
  163. package/dist/hooks/agents/useUpdateAgent.js +25 -0
  164. package/dist/hooks/agents/useUpdateAgent.js.map +1 -0
  165. package/dist/hooks/applications/useCreateApplication.d.ts +16 -0
  166. package/dist/hooks/applications/useCreateApplication.d.ts.map +1 -0
  167. package/dist/hooks/applications/useCreateApplication.js +29 -0
  168. package/dist/hooks/applications/useCreateApplication.js.map +1 -0
  169. package/dist/hooks/applications/useDeleteApplication.d.ts +10 -0
  170. package/dist/hooks/applications/useDeleteApplication.d.ts.map +1 -0
  171. package/dist/hooks/applications/useDeleteApplication.js +24 -0
  172. package/dist/hooks/applications/useDeleteApplication.js.map +1 -0
  173. package/dist/hooks/applications/useGetApplication.d.ts +17 -0
  174. package/dist/hooks/applications/useGetApplication.d.ts.map +1 -0
  175. package/dist/hooks/applications/useGetApplication.js +33 -0
  176. package/dist/hooks/applications/useGetApplication.js.map +1 -0
  177. package/dist/hooks/applications/useGetApplications.d.ts +24 -0
  178. package/dist/hooks/applications/useGetApplications.d.ts.map +1 -0
  179. package/dist/hooks/applications/useGetApplications.js +34 -0
  180. package/dist/hooks/applications/useGetApplications.js.map +1 -0
  181. package/dist/hooks/applications/useUpdateApplication.d.ts +18 -0
  182. package/dist/hooks/applications/useUpdateApplication.d.ts.map +1 -0
  183. package/dist/hooks/applications/useUpdateApplication.js +25 -0
  184. package/dist/hooks/applications/useUpdateApplication.js.map +1 -0
  185. package/dist/hooks/useManagementEndpoint.d.ts +22 -0
  186. package/dist/hooks/useManagementEndpoint.d.ts.map +1 -0
  187. package/dist/hooks/useManagementEndpoint.js +23 -0
  188. package/dist/hooks/useManagementEndpoint.js.map +1 -0
  189. package/dist/hooks/useResourceMutation.d.ts +51 -0
  190. package/dist/hooks/useResourceMutation.d.ts.map +1 -0
  191. package/dist/hooks/useResourceMutation.js +70 -0
  192. package/dist/hooks/useResourceMutation.js.map +1 -0
  193. package/dist/hooks/useResourceQuery.d.ts +45 -0
  194. package/dist/hooks/useResourceQuery.d.ts.map +1 -0
  195. package/dist/hooks/useResourceQuery.js +83 -0
  196. package/dist/hooks/useResourceQuery.js.map +1 -0
  197. package/dist/hooks/users/useCreateUser.d.ts +11 -0
  198. package/dist/hooks/users/useCreateUser.d.ts.map +1 -0
  199. package/dist/hooks/users/useCreateUser.js +24 -0
  200. package/dist/hooks/users/useCreateUser.js.map +1 -0
  201. package/dist/hooks/users/useDeleteUser.d.ts +10 -0
  202. package/dist/hooks/users/useDeleteUser.d.ts.map +1 -0
  203. package/dist/hooks/users/useDeleteUser.js +24 -0
  204. package/dist/hooks/users/useDeleteUser.js.map +1 -0
  205. package/dist/hooks/users/useGetUser.d.ts +12 -0
  206. package/dist/hooks/users/useGetUser.d.ts.map +1 -0
  207. package/dist/hooks/users/useGetUser.js +28 -0
  208. package/dist/hooks/users/useGetUser.js.map +1 -0
  209. package/dist/hooks/users/useGetUsers.d.ts +17 -0
  210. package/dist/hooks/users/useGetUsers.d.ts.map +1 -0
  211. package/dist/hooks/users/useGetUsers.js +36 -0
  212. package/dist/hooks/users/useGetUsers.js.map +1 -0
  213. package/dist/hooks/users/useUpdateUser.d.ts +18 -0
  214. package/dist/hooks/users/useUpdateUser.d.ts.map +1 -0
  215. package/dist/hooks/users/useUpdateUser.js +25 -0
  216. package/dist/hooks/users/useUpdateUser.js.map +1 -0
  217. package/dist/index.d.ts +32 -1
  218. package/dist/index.d.ts.map +1 -1
  219. package/dist/index.js +21 -2
  220. package/dist/models/config.d.ts +13 -1
  221. package/dist/models/config.d.ts.map +1 -1
  222. package/dist/utils/createAuthenticatedFetcher.d.ts +14 -0
  223. package/dist/utils/createAuthenticatedFetcher.d.ts.map +1 -0
  224. package/dist/utils/createAuthenticatedFetcher.js +41 -0
  225. package/dist/utils/createAuthenticatedFetcher.js.map +1 -0
  226. package/dist/utils/createResourceInvalidator.d.ts +29 -0
  227. package/dist/utils/createResourceInvalidator.d.ts.map +1 -0
  228. package/dist/utils/createResourceInvalidator.js +36 -0
  229. package/dist/utils/createResourceInvalidator.js.map +1 -0
  230. package/package.json +4 -4
@@ -21,6 +21,21 @@ const require_useTheme = require('./contexts/Theme/useTheme.cjs');
21
21
  const require_useTranslation = require('./hooks/useTranslation.cjs');
22
22
  const require_flowTransformer = require('./utils/flowTransformer.cjs');
23
23
  const require_useForm = require('./hooks/useForm.cjs');
24
+ const require_useGetApplications = require('./hooks/applications/useGetApplications.cjs');
25
+ const require_useGetApplication = require('./hooks/applications/useGetApplication.cjs');
26
+ const require_useCreateApplication = require('./hooks/applications/useCreateApplication.cjs');
27
+ const require_useUpdateApplication = require('./hooks/applications/useUpdateApplication.cjs');
28
+ const require_useDeleteApplication = require('./hooks/applications/useDeleteApplication.cjs');
29
+ const require_useGetUsers = require('./hooks/users/useGetUsers.cjs');
30
+ const require_useGetUser = require('./hooks/users/useGetUser.cjs');
31
+ const require_useCreateUser = require('./hooks/users/useCreateUser.cjs');
32
+ const require_useUpdateUser = require('./hooks/users/useUpdateUser.cjs');
33
+ const require_useDeleteUser = require('./hooks/users/useDeleteUser.cjs');
34
+ const require_useGetAgents = require('./hooks/agents/useGetAgents.cjs');
35
+ const require_useGetAgent = require('./hooks/agents/useGetAgent.cjs');
36
+ const require_useCreateAgent = require('./hooks/agents/useCreateAgent.cjs');
37
+ const require_useUpdateAgent = require('./hooks/agents/useUpdateAgent.cjs');
38
+ const require_useDeleteAgent = require('./hooks/agents/useDeleteAgent.cjs');
24
39
  const require_Spinner = require('./components/primitives/Spinner/Spinner.cjs');
25
40
  const require_Button = require('./components/primitives/Button/Button.cjs');
26
41
  const require_BaseSignInButton = require('./components/actions/SignInButton/BaseSignInButton.cjs');
@@ -63,6 +78,7 @@ const require_PasswordField = require('./components/primitives/PasswordField/Pas
63
78
  const require_Select = require('./components/primitives/Select/Select.cjs');
64
79
  const require_FieldFactory = require('./components/factories/FieldFactory.cjs');
65
80
  const require_Divider = require('./components/primitives/Divider/Divider.cjs');
81
+ const require_KeyValueList = require('./components/primitives/KeyValueList/KeyValueList.cjs');
66
82
  const require_BaseSignIn = require('./components/presentation/auth/SignIn/BaseSignIn.cjs');
67
83
  const require_useOAuthCallback = require('./hooks/useOAuthCallback.cjs');
68
84
  const require_SignIn = require('./components/presentation/auth/SignIn/SignIn.cjs');
@@ -84,6 +100,9 @@ const require_MultiInput = require('./components/primitives/MultiInput/MultiInpu
84
100
  const require_BaseUserProfile = require('./components/presentation/UserProfile/BaseUserProfile.cjs');
85
101
  const require_updateMeProfile = require('./api/updateMeProfile.cjs');
86
102
  const require_UserProfile = require('./components/presentation/UserProfile/UserProfile.cjs');
103
+ const require_BaseChangeCredential = require('./components/presentation/ChangeCredential/BaseChangeCredential.cjs');
104
+ const require_updateMeCredentials = require('./api/updateMeCredentials.cjs');
105
+ const require_ChangeCredential = require('./components/presentation/ChangeCredential/ChangeCredential.cjs');
87
106
  const require_BaseUserAvatar = require('./components/presentation/UserAvatar/BaseUserAvatar.cjs');
88
107
  const require_UserAvatar = require('./components/presentation/UserAvatar/UserAvatar.cjs');
89
108
  const require_BaseUserDropdown = require('./components/presentation/UserDropdown/BaseUserDropdown.cjs');
@@ -120,8 +139,21 @@ Object.defineProperty(exports, 'AVATAR_URI_SCHEME', {
120
139
  }
121
140
  });
122
141
  exports.AcceptInvite = require_AcceptInvite.default;
142
+ Object.defineProperty(exports, 'AgentQueryKeys', {
143
+ enumerable: true,
144
+ get: function () {
145
+ return __thunderid_browser.AgentQueryKeys;
146
+ }
147
+ });
123
148
  exports.Alert = require_Alert.default;
149
+ Object.defineProperty(exports, 'ApplicationQueryKeys', {
150
+ enumerable: true,
151
+ get: function () {
152
+ return __thunderid_browser.ApplicationQueryKeys;
153
+ }
154
+ });
124
155
  exports.BaseAcceptInvite = require_BaseAcceptInvite.default;
156
+ exports.BaseChangeCredential = require_BaseChangeCredential.default;
125
157
  exports.BaseInviteUser = require_BaseInviteUser.default;
126
158
  exports.BaseLanguageSwitcher = require_BaseLanguageSwitcher.default;
127
159
  exports.BaseRecovery = require_BaseRecovery.default;
@@ -138,6 +170,7 @@ exports.BuildingAlt = require_BuildingAlt.default;
138
170
  exports.Button = require_Button.default;
139
171
  exports.Callback = require_Callback.Callback;
140
172
  exports.Card = require_Card.default;
173
+ exports.ChangeCredential = require_ChangeCredential.default;
141
174
  exports.Checkbox = require_Checkbox.default;
142
175
  exports.CircleAlert = require_CircleAlert.default;
143
176
  exports.CircleCheck = require_CircleCheck.default;
@@ -228,6 +261,7 @@ exports.Info = require_Info.default;
228
261
  exports.InputLabel = require_InputLabel.default;
229
262
  exports.InviteUser = require_InviteUser.default;
230
263
  exports.KeyValueInput = require_KeyValueInput.default;
264
+ exports.KeyValueList = require_KeyValueList.default;
231
265
  exports.LanguageSwitcher = require_LanguageSwitcher.default;
232
266
  exports.LinkedInButton = require_LinkedInButton.default;
233
267
  exports.Loading = require_Loading.default;
@@ -271,6 +305,12 @@ exports.UserDropdown = require_UserDropdown.default;
271
305
  exports.UserIcon = require_User.default;
272
306
  exports.UserProfile = require_UserProfile.default;
273
307
  exports.UserProvider = require_UserProvider.default;
308
+ Object.defineProperty(exports, 'UserQueryKeys', {
309
+ enumerable: true,
310
+ get: function () {
311
+ return __thunderid_browser.UserQueryKeys;
312
+ }
313
+ });
274
314
  Object.defineProperty(exports, 'buildAvatarSpec', {
275
315
  enumerable: true,
276
316
  get: function () {
@@ -283,7 +323,43 @@ Object.defineProperty(exports, 'countryCodeToFlagEmoji', {
283
323
  return __thunderid_browser.countryCodeToFlagEmoji;
284
324
  }
285
325
  });
326
+ Object.defineProperty(exports, 'createAgent', {
327
+ enumerable: true,
328
+ get: function () {
329
+ return __thunderid_browser.createAgent;
330
+ }
331
+ });
332
+ Object.defineProperty(exports, 'createApplication', {
333
+ enumerable: true,
334
+ get: function () {
335
+ return __thunderid_browser.createApplication;
336
+ }
337
+ });
286
338
  exports.createField = require_FieldFactory.createField;
339
+ Object.defineProperty(exports, 'createUser', {
340
+ enumerable: true,
341
+ get: function () {
342
+ return __thunderid_browser.createUser;
343
+ }
344
+ });
345
+ Object.defineProperty(exports, 'deleteAgent', {
346
+ enumerable: true,
347
+ get: function () {
348
+ return __thunderid_browser.deleteAgent;
349
+ }
350
+ });
351
+ Object.defineProperty(exports, 'deleteApplication', {
352
+ enumerable: true,
353
+ get: function () {
354
+ return __thunderid_browser.deleteApplication;
355
+ }
356
+ });
357
+ Object.defineProperty(exports, 'deleteUser', {
358
+ enumerable: true,
359
+ get: function () {
360
+ return __thunderid_browser.deleteUser;
361
+ }
362
+ });
287
363
  Object.defineProperty(exports, 'deriveAvatarContent', {
288
364
  enumerable: true,
289
365
  get: function () {
@@ -315,8 +391,44 @@ Object.defineProperty(exports, 'getActiveTheme', {
315
391
  return __thunderid_browser.getActiveTheme;
316
392
  }
317
393
  });
394
+ Object.defineProperty(exports, 'getAgent', {
395
+ enumerable: true,
396
+ get: function () {
397
+ return __thunderid_browser.getAgent;
398
+ }
399
+ });
400
+ Object.defineProperty(exports, 'getAgents', {
401
+ enumerable: true,
402
+ get: function () {
403
+ return __thunderid_browser.getAgents;
404
+ }
405
+ });
406
+ Object.defineProperty(exports, 'getApplication', {
407
+ enumerable: true,
408
+ get: function () {
409
+ return __thunderid_browser.getApplication;
410
+ }
411
+ });
412
+ Object.defineProperty(exports, 'getApplications', {
413
+ enumerable: true,
414
+ get: function () {
415
+ return __thunderid_browser.getApplications;
416
+ }
417
+ });
318
418
  exports.getConsentOptionalKey = require_ConsentCheckboxList.getConsentOptionalKey;
319
419
  exports.getMeProfile = require_getUsersMe.default;
420
+ Object.defineProperty(exports, 'getUser', {
421
+ enumerable: true,
422
+ get: function () {
423
+ return __thunderid_browser.getUser;
424
+ }
425
+ });
426
+ Object.defineProperty(exports, 'getUsers', {
427
+ enumerable: true,
428
+ get: function () {
429
+ return __thunderid_browser.getUsers;
430
+ }
431
+ });
320
432
  exports.getUsersMeMeta = require_getUsersMeMeta.default;
321
433
  Object.defineProperty(exports, 'http', {
322
434
  enumerable: true,
@@ -343,6 +455,12 @@ Object.defineProperty(exports, 'navigate', {
343
455
  }
344
456
  });
345
457
  exports.normalizeFlowResponse = require_flowTransformer.normalizeFlowResponse;
458
+ Object.defineProperty(exports, 'parseKeyValuePairs', {
459
+ enumerable: true,
460
+ get: function () {
461
+ return __thunderid_browser.parseKeyValuePairs;
462
+ }
463
+ });
346
464
  Object.defineProperty(exports, 'pickAnonymousAvatarName', {
347
465
  enumerable: true,
348
466
  get: function () {
@@ -391,14 +509,48 @@ Object.defineProperty(exports, 'resolveMeta', {
391
509
  return __thunderid_browser.resolveMeta;
392
510
  }
393
511
  });
512
+ Object.defineProperty(exports, 'updateAgent', {
513
+ enumerable: true,
514
+ get: function () {
515
+ return __thunderid_browser.updateAgent;
516
+ }
517
+ });
518
+ Object.defineProperty(exports, 'updateApplication', {
519
+ enumerable: true,
520
+ get: function () {
521
+ return __thunderid_browser.updateApplication;
522
+ }
523
+ });
524
+ exports.updateMeCredentials = require_updateMeCredentials.default;
394
525
  exports.updateMeProfile = require_updateMeProfile.default;
526
+ Object.defineProperty(exports, 'updateUser', {
527
+ enumerable: true,
528
+ get: function () {
529
+ return __thunderid_browser.updateUser;
530
+ }
531
+ });
395
532
  exports.useBrowserUrl = require_useBrowserUrl.default;
533
+ exports.useCreateAgent = require_useCreateAgent.default;
534
+ exports.useCreateApplication = require_useCreateApplication.default;
535
+ exports.useCreateUser = require_useCreateUser.default;
536
+ exports.useDeleteAgent = require_useDeleteAgent.default;
537
+ exports.useDeleteApplication = require_useDeleteApplication.default;
538
+ exports.useDeleteUser = require_useDeleteUser.default;
396
539
  exports.useFlow = require_useFlow.default;
397
540
  exports.useForm = require_useForm.default;
541
+ exports.useGetAgent = require_useGetAgent.default;
542
+ exports.useGetAgents = require_useGetAgents.default;
543
+ exports.useGetApplication = require_useGetApplication.default;
544
+ exports.useGetApplications = require_useGetApplications.default;
545
+ exports.useGetUser = require_useGetUser.default;
546
+ exports.useGetUsers = require_useGetUsers.default;
398
547
  exports.useI18n = require_useI18n.default;
399
548
  exports.useOAuthCallback = require_useOAuthCallback.useOAuthCallback;
400
549
  exports.useTheme = require_useTheme.default;
401
550
  exports.useThunderID = require_useThunderID.default;
402
551
  exports.useTranslation = require_useTranslation.default;
552
+ exports.useUpdateAgent = require_useUpdateAgent.default;
553
+ exports.useUpdateApplication = require_useUpdateApplication.default;
554
+ exports.useUpdateUser = require_useUpdateUser.default;
403
555
  exports.useUser = require_useUser.default;
404
556
  exports.validateFieldValue = require_FieldFactory.validateFieldValue;
@@ -0,0 +1,43 @@
1
+ const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
2
+ let __thunderid_browser = require("@thunderid/browser");
3
+ __thunderid_browser = require_rolldown_runtime.__toESM(__thunderid_browser);
4
+
5
+ //#region src/utils/createAuthenticatedFetcher.ts
6
+ const toResponse = (data, status, statusText) => ({
7
+ json: () => Promise.resolve(data),
8
+ ok: status >= 200 && status < 300,
9
+ status,
10
+ statusText: statusText ?? "",
11
+ text: () => Promise.resolve(typeof data === "string" ? data : JSON.stringify(data))
12
+ });
13
+ /**
14
+ * Creates a fetch-compatible function backed by the SDK's HTTP client for the given instance, so
15
+ * requests carry the signed-in user's access token.
16
+ *
17
+ * The HTTP client throws on a non-2xx status. This fetcher turns that back into a non-OK response
18
+ * so callers can read the real status (for example, to tell a 403 from a 404).
19
+ *
20
+ * @param instanceId - The ThunderID instance whose HTTP client should be used.
21
+ * @returns A fetcher that can be passed to any core API function.
22
+ */
23
+ const createAuthenticatedFetcher = (instanceId = 0) => async (url, config) => {
24
+ const httpClient = __thunderid_browser.FetchHttpClient.getInstance(instanceId);
25
+ try {
26
+ const response = await httpClient.request({
27
+ data: typeof config.body === "string" ? JSON.parse(config.body) : void 0,
28
+ headers: config.headers,
29
+ method: config.method ?? "GET",
30
+ url
31
+ });
32
+ return toResponse(response.data, response.status, response.statusText);
33
+ } catch (error) {
34
+ const { response } = error;
35
+ if (!response) throw error;
36
+ return toResponse(response.data, response.status, response.statusText);
37
+ }
38
+ };
39
+ var createAuthenticatedFetcher_default = createAuthenticatedFetcher;
40
+
41
+ //#endregion
42
+ exports.default = createAuthenticatedFetcher_default;
43
+ //# sourceMappingURL=createAuthenticatedFetcher.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createAuthenticatedFetcher.cjs","names":["httpClient: FetchHttpClient","FetchHttpClient","response: HttpResponse<unknown>"],"sources":["../../../src/utils/createAuthenticatedFetcher.ts"],"sourcesContent":["// Copyright 2026 The ThunderID Authors\n// SPDX-License-Identifier: Apache-2.0\n\nimport {ApiFetcher, FetchHttpClient, HttpError, HttpRequestConfig, HttpResponse} from '@thunderid/browser';\n\nconst toResponse = (data: unknown, status: number, statusText: string | undefined): Response =>\n ({\n json: () => Promise.resolve(data),\n ok: status >= 200 && status < 300,\n status,\n statusText: statusText ?? '',\n text: () => Promise.resolve(typeof data === 'string' ? data : JSON.stringify(data)),\n }) as Response;\n\n/**\n * Creates a fetch-compatible function backed by the SDK's HTTP client for the given instance, so\n * requests carry the signed-in user's access token.\n *\n * The HTTP client throws on a non-2xx status. This fetcher turns that back into a non-OK response\n * so callers can read the real status (for example, to tell a 403 from a 404).\n *\n * @param instanceId - The ThunderID instance whose HTTP client should be used.\n * @returns A fetcher that can be passed to any core API function.\n */\nconst createAuthenticatedFetcher =\n (instanceId = 0): ApiFetcher =>\n async (url: string, config: RequestInit): Promise<Response> => {\n const httpClient: FetchHttpClient = FetchHttpClient.getInstance(instanceId);\n\n try {\n const response: HttpResponse<unknown> = await httpClient.request({\n data: typeof config.body === 'string' ? (JSON.parse(config.body) as unknown) : undefined,\n headers: config.headers as Record<string, string>,\n method: config.method ?? 'GET',\n url,\n } as HttpRequestConfig);\n\n return toResponse(response.data, response.status, response.statusText);\n } catch (error) {\n const {response} = error as HttpError;\n\n if (!response) {\n throw error;\n }\n\n return toResponse(response.data, response.status, response.statusText);\n }\n };\n\nexport default createAuthenticatedFetcher;\n"],"mappings":";;;;;AAKA,MAAM,cAAc,MAAe,QAAgB,gBAChD;CACC,YAAY,QAAQ,QAAQ,KAAK;CACjC,IAAI,UAAU,OAAO,SAAS;CAC9B;CACA,YAAY,cAAc;CAC1B,YAAY,QAAQ,QAAQ,OAAO,SAAS,WAAW,OAAO,KAAK,UAAU,KAAK,CAAC;CACpF;;;;;;;;;;;AAYH,MAAM,8BACH,aAAa,MACd,OAAO,KAAa,WAA2C;CAC7D,MAAMA,aAA8BC,oCAAgB,YAAY,WAAW;AAE3E,KAAI;EACF,MAAMC,WAAkC,MAAM,WAAW,QAAQ;GAC/D,MAAM,OAAO,OAAO,SAAS,WAAY,KAAK,MAAM,OAAO,KAAK,GAAe;GAC/E,SAAS,OAAO;GAChB,QAAQ,OAAO,UAAU;GACzB;GACD,CAAsB;AAEvB,SAAO,WAAW,SAAS,MAAM,SAAS,QAAQ,SAAS,WAAW;UAC/D,OAAO;EACd,MAAM,EAAC,aAAY;AAEnB,MAAI,CAAC,SACH,OAAM;AAGR,SAAO,WAAW,SAAS,MAAM,SAAS,QAAQ,SAAS,WAAW;;;AAI5E,yCAAe"}
@@ -0,0 +1,38 @@
1
+
2
+ //#region src/utils/createResourceInvalidator.ts
3
+ const matches = (queryKey, partialKey) => partialKey.every((part, index) => JSON.stringify(part) === JSON.stringify(queryKey[index]));
4
+ /**
5
+ * Creates an in-memory invalidator. Invalidation matches on key prefix, so invalidating
6
+ * `['applications']` reaches every applications list query regardless of its pagination.
7
+ */
8
+ const createResourceInvalidator = () => {
9
+ const subscriptions = /* @__PURE__ */ new Set();
10
+ return {
11
+ invalidate: (partialKey) => {
12
+ subscriptions.forEach(({ listener, queryKey }) => {
13
+ if (matches(queryKey, partialKey)) listener();
14
+ });
15
+ },
16
+ subscribe: (queryKey, listener) => {
17
+ const subscription = {
18
+ listener,
19
+ queryKey
20
+ };
21
+ subscriptions.add(subscription);
22
+ return () => {
23
+ subscriptions.delete(subscription);
24
+ };
25
+ }
26
+ };
27
+ };
28
+ /**
29
+ * Used when the context does not supply an invalidator, for example when an integration renders
30
+ * its own `ThunderIDContext` value instead of using `ThunderIDProvider`.
31
+ */
32
+ const fallbackResourceInvalidator = createResourceInvalidator();
33
+ var createResourceInvalidator_default = createResourceInvalidator;
34
+
35
+ //#endregion
36
+ exports.default = createResourceInvalidator_default;
37
+ exports.fallbackResourceInvalidator = fallbackResourceInvalidator;
38
+ //# sourceMappingURL=createResourceInvalidator.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createResourceInvalidator.cjs","names":["subscription: {listener: () => void; queryKey: ResourceQueryKey}","fallbackResourceInvalidator: ResourceInvalidator"],"sources":["../../../src/utils/createResourceInvalidator.ts"],"sourcesContent":["// Copyright 2026 The ThunderID Authors\n// SPDX-License-Identifier: Apache-2.0\n\n/**\n * A key identifying a resource query, e.g. `['applications', {limit: 10}]` or `['application', id]`.\n */\nexport type ResourceQueryKey = readonly unknown[];\n\n/**\n * Lets mutations tell mounted queries that their data is stale.\n */\nexport interface ResourceInvalidator {\n /**\n * Notifies every subscribed query whose key starts with `partialKey`.\n */\n invalidate: (partialKey: ResourceQueryKey) => void;\n /**\n * Registers a listener for invalidations matching `queryKey`. Returns an unsubscribe function.\n */\n subscribe: (queryKey: ResourceQueryKey, listener: () => void) => () => void;\n}\n\nconst matches = (queryKey: ResourceQueryKey, partialKey: ResourceQueryKey): boolean =>\n partialKey.every((part: unknown, index: number) => JSON.stringify(part) === JSON.stringify(queryKey[index]));\n\n/**\n * Creates an in-memory invalidator. Invalidation matches on key prefix, so invalidating\n * `['applications']` reaches every applications list query regardless of its pagination.\n */\nconst createResourceInvalidator = (): ResourceInvalidator => {\n const subscriptions = new Set<{listener: () => void; queryKey: ResourceQueryKey}>();\n\n return {\n invalidate: (partialKey: ResourceQueryKey): void => {\n subscriptions.forEach(({listener, queryKey}: {listener: () => void; queryKey: ResourceQueryKey}) => {\n if (matches(queryKey, partialKey)) {\n listener();\n }\n });\n },\n subscribe: (queryKey: ResourceQueryKey, listener: () => void): (() => void) => {\n const subscription: {listener: () => void; queryKey: ResourceQueryKey} = {listener, queryKey};\n subscriptions.add(subscription);\n\n return (): void => {\n subscriptions.delete(subscription);\n };\n },\n };\n};\n\n/**\n * Used when the context does not supply an invalidator, for example when an integration renders\n * its own `ThunderIDContext` value instead of using `ThunderIDProvider`.\n */\nexport const fallbackResourceInvalidator: ResourceInvalidator = createResourceInvalidator();\n\nexport default createResourceInvalidator;\n"],"mappings":";;AAsBA,MAAM,WAAW,UAA4B,eAC3C,WAAW,OAAO,MAAe,UAAkB,KAAK,UAAU,KAAK,KAAK,KAAK,UAAU,SAAS,OAAO,CAAC;;;;;AAM9G,MAAM,kCAAuD;CAC3D,MAAM,gCAAgB,IAAI,KAAyD;AAEnF,QAAO;EACL,aAAa,eAAuC;AAClD,iBAAc,SAAS,EAAC,UAAU,eAAkE;AAClG,QAAI,QAAQ,UAAU,WAAW,CAC/B,WAAU;KAEZ;;EAEJ,YAAY,UAA4B,aAAuC;GAC7E,MAAMA,eAAmE;IAAC;IAAU;IAAS;AAC7F,iBAAc,IAAI,aAAa;AAE/B,gBAAmB;AACjB,kBAAc,OAAO,aAAa;;;EAGvC;;;;;;AAOH,MAAaC,8BAAmD,2BAA2B;AAE3F,wCAAe"}
@@ -2,7 +2,7 @@ import { cx } from "../../../styles/emotion.js";
2
2
  import Button_default from "../../primitives/Button/Button.js";
3
3
  import { withVendorCSSClassPrefix } from "@thunderid/browser";
4
4
  import { forwardRef } from "react";
5
- import { Fragment, jsx } from "react/jsx-runtime";
5
+ import { Fragment as Fragment$1, jsx } from "react/jsx-runtime";
6
6
 
7
7
  //#region src/components/actions/SignInButton/BaseSignInButton.tsx
8
8
  /**
@@ -25,7 +25,7 @@ import { Fragment, jsx } from "react/jsx-runtime";
25
25
  * ```
26
26
  */
27
27
  const BaseSignInButton = forwardRef(({ children, className, style, signIn, isLoading, meta, preferences,...rest }, ref) => {
28
- if (typeof children === "function") return /* @__PURE__ */ jsx(Fragment, { children: children({
28
+ if (typeof children === "function") return /* @__PURE__ */ jsx(Fragment$1, { children: children({
29
29
  isLoading,
30
30
  meta,
31
31
  signIn
@@ -1 +1 @@
1
- {"version":3,"file":"BaseSignInButton.js","names":["BaseSignInButton: ForwardRefExoticComponent<BaseSignInButtonProps & RefAttributes<HTMLButtonElement>>","Button"],"sources":["../../../../src/components/actions/SignInButton/BaseSignInButton.tsx"],"sourcesContent":["// Copyright 2025 The ThunderID Authors\n// SPDX-License-Identifier: Apache-2.0\n\nimport {FlowMetadataResponse, WithPreferences, withVendorCSSClassPrefix} from '@thunderid/browser';\nimport {\n ButtonHTMLAttributes,\n forwardRef,\n ForwardRefExoticComponent,\n ReactElement,\n ReactNode,\n Ref,\n RefAttributes,\n} from 'react';\nimport {cx} from '../../../styles/emotion';\nimport Button from '../../primitives/Button/Button';\n\n/**\n * Common props shared by all {@link BaseSignInButton} components.\n */\nexport interface CommonBaseSignInButtonProps {\n /**\n * Loading state during sign-in process\n */\n isLoading?: boolean;\n /**\n * Flow metadata returned by the platform (v2 only). `null` while loading or unavailable.\n */\n meta?: FlowMetadataResponse | null;\n /**\n * Function to initiate the sign-in process\n */\n signIn: () => Promise<void>;\n}\n\n/**\n * Props passed to the render function of {@link BaseSignInButton}\n */\nexport type BaseSignInButtonRenderProps = CommonBaseSignInButtonProps;\n\n/**\n * Props interface of {@link BaseSignInButton}\n */\nexport interface BaseSignInButtonProps\n extends Partial<CommonBaseSignInButtonProps>,\n Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children'>,\n WithPreferences {\n /**\n * Render prop function that receives sign-in props, or traditional ReactNode children\n */\n children?: ((props: BaseSignInButtonRenderProps) => ReactNode) | ReactNode;\n}\n\n/**\n * Base SignInButton component that supports both render props and traditional props patterns.\n *\n * @example Using render props\n * ```tsx\n * <BaseSignInButton>\n * {({signIn, isLoading}) => (\n * <button onClick={signIn} disabled={isLoading}>\n * {isLoading ? 'Signing in...' : 'Sign In'}\n * </button>\n * )}\n * </BaseSignInButton>\n * ```\n *\n * @example Using traditional props\n * ```tsx\n * <BaseSignInButton className=\"custom-button\">Sign In</BaseSignInButton>\n * ```\n */\nconst BaseSignInButton: ForwardRefExoticComponent<BaseSignInButtonProps & RefAttributes<HTMLButtonElement>> =\n forwardRef<HTMLButtonElement, BaseSignInButtonProps>(\n (\n {children, className, style, signIn, isLoading, meta, preferences, ...rest}: BaseSignInButtonProps,\n ref: Ref<HTMLButtonElement>,\n ): ReactElement => {\n if (typeof children === 'function') {\n return <>{children({isLoading, meta, signIn: signIn!})}</>;\n }\n\n return (\n <Button\n ref={ref}\n className={cx(withVendorCSSClassPrefix('sign-in-button'), className)}\n style={style}\n disabled={isLoading}\n loading={isLoading}\n type=\"button\"\n {...rest}\n >\n {children}\n </Button>\n );\n },\n );\n\nBaseSignInButton.displayName = 'BaseSignInButton';\n\nexport default BaseSignInButton;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAuEA,MAAMA,mBACJ,YAEI,EAAC,UAAU,WAAW,OAAO,QAAQ,WAAW,MAAM,YAAa,GAAG,QACtE,QACiB;AACjB,KAAI,OAAO,aAAa,WACtB,QAAO,0CAAG,SAAS;EAAC;EAAW;EAAc;EAAQ,CAAC,GAAI;AAG5D,QACE,oBAACC;EACM;EACL,WAAW,GAAG,yBAAyB,iBAAiB,EAAE,UAAU;EAC7D;EACP,UAAU;EACV,SAAS;EACT,MAAK;EACL,GAAI;EAEH;GACM;EAGd;AAEH,iBAAiB,cAAc;AAE/B,+BAAe"}
1
+ {"version":3,"file":"BaseSignInButton.js","names":["BaseSignInButton: ForwardRefExoticComponent<BaseSignInButtonProps & RefAttributes<HTMLButtonElement>>","Button"],"sources":["../../../../src/components/actions/SignInButton/BaseSignInButton.tsx"],"sourcesContent":["// Copyright 2025 The ThunderID Authors\n// SPDX-License-Identifier: Apache-2.0\n\nimport {FlowMetadataResponse, WithPreferences, withVendorCSSClassPrefix} from '@thunderid/browser';\nimport {\n ButtonHTMLAttributes,\n forwardRef,\n ForwardRefExoticComponent,\n ReactElement,\n ReactNode,\n Ref,\n RefAttributes,\n} from 'react';\nimport {cx} from '../../../styles/emotion';\nimport Button from '../../primitives/Button/Button';\n\n/**\n * Common props shared by all {@link BaseSignInButton} components.\n */\nexport interface CommonBaseSignInButtonProps {\n /**\n * Loading state during sign-in process\n */\n isLoading?: boolean;\n /**\n * Flow metadata returned by the platform (v2 only). `null` while loading or unavailable.\n */\n meta?: FlowMetadataResponse | null;\n /**\n * Function to initiate the sign-in process\n */\n signIn: () => Promise<void>;\n}\n\n/**\n * Props passed to the render function of {@link BaseSignInButton}\n */\nexport type BaseSignInButtonRenderProps = CommonBaseSignInButtonProps;\n\n/**\n * Props interface of {@link BaseSignInButton}\n */\nexport interface BaseSignInButtonProps\n extends Partial<CommonBaseSignInButtonProps>,\n Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children'>,\n WithPreferences {\n /**\n * Render prop function that receives sign-in props, or traditional ReactNode children\n */\n children?: ((props: BaseSignInButtonRenderProps) => ReactNode) | ReactNode;\n}\n\n/**\n * Base SignInButton component that supports both render props and traditional props patterns.\n *\n * @example Using render props\n * ```tsx\n * <BaseSignInButton>\n * {({signIn, isLoading}) => (\n * <button onClick={signIn} disabled={isLoading}>\n * {isLoading ? 'Signing in...' : 'Sign In'}\n * </button>\n * )}\n * </BaseSignInButton>\n * ```\n *\n * @example Using traditional props\n * ```tsx\n * <BaseSignInButton className=\"custom-button\">Sign In</BaseSignInButton>\n * ```\n */\nconst BaseSignInButton: ForwardRefExoticComponent<BaseSignInButtonProps & RefAttributes<HTMLButtonElement>> =\n forwardRef<HTMLButtonElement, BaseSignInButtonProps>(\n (\n {children, className, style, signIn, isLoading, meta, preferences, ...rest}: BaseSignInButtonProps,\n ref: Ref<HTMLButtonElement>,\n ): ReactElement => {\n if (typeof children === 'function') {\n return <>{children({isLoading, meta, signIn: signIn!})}</>;\n }\n\n return (\n <Button\n ref={ref}\n className={cx(withVendorCSSClassPrefix('sign-in-button'), className)}\n style={style}\n disabled={isLoading}\n loading={isLoading}\n type=\"button\"\n {...rest}\n >\n {children}\n </Button>\n );\n },\n );\n\nBaseSignInButton.displayName = 'BaseSignInButton';\n\nexport default BaseSignInButton;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAuEA,MAAMA,mBACJ,YAEI,EAAC,UAAU,WAAW,OAAO,QAAQ,WAAW,MAAM,YAAa,GAAG,QACtE,QACiB;AACjB,KAAI,OAAO,aAAa,WACtB,QAAO,4CAAG,SAAS;EAAC;EAAW;EAAc;EAAQ,CAAC,GAAI;AAG5D,QACE,oBAACC;EACM;EACL,WAAW,GAAG,yBAAyB,iBAAiB,EAAE,UAAU;EAC7D;EACP,UAAU;EACV,SAAS;EACT,MAAK;EACL,GAAI;EAEH;GACM;EAGd;AAEH,iBAAiB,cAAc;AAE/B,+BAAe"}
@@ -2,7 +2,7 @@ import { cx } from "../../../styles/emotion.js";
2
2
  import Button_default from "../../primitives/Button/Button.js";
3
3
  import { withVendorCSSClassPrefix } from "@thunderid/browser";
4
4
  import { forwardRef } from "react";
5
- import { Fragment, jsx } from "react/jsx-runtime";
5
+ import { Fragment as Fragment$1, jsx } from "react/jsx-runtime";
6
6
 
7
7
  //#region src/components/actions/SignOutButton/BaseSignOutButton.tsx
8
8
  /**
@@ -25,7 +25,7 @@ import { Fragment, jsx } from "react/jsx-runtime";
25
25
  * ```
26
26
  */
27
27
  const BaseSignOutButton = forwardRef(({ children, className, style, signOut, isLoading, meta, preferences,...rest }, ref) => {
28
- if (typeof children === "function") return /* @__PURE__ */ jsx(Fragment, { children: children({
28
+ if (typeof children === "function") return /* @__PURE__ */ jsx(Fragment$1, { children: children({
29
29
  isLoading,
30
30
  meta,
31
31
  signOut
@@ -1 +1 @@
1
- {"version":3,"file":"BaseSignOutButton.js","names":["BaseSignOutButton: ForwardRefExoticComponent<BaseSignOutButtonProps & RefAttributes<HTMLButtonElement>>","Button"],"sources":["../../../../src/components/actions/SignOutButton/BaseSignOutButton.tsx"],"sourcesContent":["// Copyright 2025 The ThunderID Authors\n// SPDX-License-Identifier: Apache-2.0\n\nimport {FlowMetadataResponse, WithPreferences, withVendorCSSClassPrefix} from '@thunderid/browser';\nimport {\n forwardRef,\n ForwardRefExoticComponent,\n ButtonHTMLAttributes,\n ReactElement,\n ReactNode,\n Ref,\n RefAttributes,\n} from 'react';\nimport {cx} from '../../../styles/emotion';\nimport Button from '../../primitives/Button/Button';\n\n/**\n * Common props shared by all {@link BaseSignOutButton} components.\n */\nexport interface CommonBaseSignOutButtonProps {\n /**\n * Loading state during sign-out process\n */\n isLoading?: boolean;\n /**\n * Flow metadata returned by the platform (v2 only). `null` while loading or unavailable.\n */\n meta?: FlowMetadataResponse | null;\n /**\n * Function to initiate the sign-out process\n */\n signOut: () => Promise<void>;\n}\n\n/**\n * Props passed to the render function of {@link BaseSignOutButton}\n */\nexport type BaseSignOutButtonRenderProps = CommonBaseSignOutButtonProps;\n\n/**\n * Props interface of {@link BaseSignOutButton}\n */\nexport interface BaseSignOutButtonProps\n extends Partial<CommonBaseSignOutButtonProps>,\n Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children'>,\n WithPreferences {\n /**\n * Render prop function that receives sign-out props, or traditional ReactNode children\n */\n children?: ((props: BaseSignOutButtonRenderProps) => ReactNode) | ReactNode;\n}\n\n/**\n * Base SignOutButton component that supports both render props and traditional props patterns.\n *\n * @example Using render props\n * ```tsx\n * <BaseSignOutButton>\n * {({signOut, isLoading}) => (\n * <button onClick={signOut} disabled={isLoading}>\n * {isLoading ? 'Signing out...' : 'Sign Out'}\n * </button>\n * )}\n * </BaseSignOutButton>\n * ```\n *\n * @example Using traditional props\n * ```tsx\n * <BaseSignOutButton className=\"custom-button\">Sign Out</BaseSignOutButton>\n * ```\n */\nconst BaseSignOutButton: ForwardRefExoticComponent<BaseSignOutButtonProps & RefAttributes<HTMLButtonElement>> =\n forwardRef<HTMLButtonElement, BaseSignOutButtonProps>(\n (\n {children, className, style, signOut, isLoading, meta, preferences, ...rest}: BaseSignOutButtonProps,\n ref: Ref<HTMLButtonElement>,\n ): ReactElement => {\n if (typeof children === 'function') {\n return <>{children({isLoading, meta, signOut: signOut!})}</>;\n }\n\n return (\n <Button\n ref={ref}\n className={cx(withVendorCSSClassPrefix('sign-out-button'), className)}\n style={style}\n disabled={isLoading}\n loading={isLoading}\n type=\"button\"\n {...rest}\n >\n {children}\n </Button>\n );\n },\n );\n\nBaseSignOutButton.displayName = 'BaseSignOutButton';\n\nexport default BaseSignOutButton;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAuEA,MAAMA,oBACJ,YAEI,EAAC,UAAU,WAAW,OAAO,SAAS,WAAW,MAAM,YAAa,GAAG,QACvE,QACiB;AACjB,KAAI,OAAO,aAAa,WACtB,QAAO,0CAAG,SAAS;EAAC;EAAW;EAAe;EAAS,CAAC,GAAI;AAG9D,QACE,oBAACC;EACM;EACL,WAAW,GAAG,yBAAyB,kBAAkB,EAAE,UAAU;EAC9D;EACP,UAAU;EACV,SAAS;EACT,MAAK;EACL,GAAI;EAEH;GACM;EAGd;AAEH,kBAAkB,cAAc;AAEhC,gCAAe"}
1
+ {"version":3,"file":"BaseSignOutButton.js","names":["BaseSignOutButton: ForwardRefExoticComponent<BaseSignOutButtonProps & RefAttributes<HTMLButtonElement>>","Button"],"sources":["../../../../src/components/actions/SignOutButton/BaseSignOutButton.tsx"],"sourcesContent":["// Copyright 2025 The ThunderID Authors\n// SPDX-License-Identifier: Apache-2.0\n\nimport {FlowMetadataResponse, WithPreferences, withVendorCSSClassPrefix} from '@thunderid/browser';\nimport {\n forwardRef,\n ForwardRefExoticComponent,\n ButtonHTMLAttributes,\n ReactElement,\n ReactNode,\n Ref,\n RefAttributes,\n} from 'react';\nimport {cx} from '../../../styles/emotion';\nimport Button from '../../primitives/Button/Button';\n\n/**\n * Common props shared by all {@link BaseSignOutButton} components.\n */\nexport interface CommonBaseSignOutButtonProps {\n /**\n * Loading state during sign-out process\n */\n isLoading?: boolean;\n /**\n * Flow metadata returned by the platform (v2 only). `null` while loading or unavailable.\n */\n meta?: FlowMetadataResponse | null;\n /**\n * Function to initiate the sign-out process\n */\n signOut: () => Promise<void>;\n}\n\n/**\n * Props passed to the render function of {@link BaseSignOutButton}\n */\nexport type BaseSignOutButtonRenderProps = CommonBaseSignOutButtonProps;\n\n/**\n * Props interface of {@link BaseSignOutButton}\n */\nexport interface BaseSignOutButtonProps\n extends Partial<CommonBaseSignOutButtonProps>,\n Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children'>,\n WithPreferences {\n /**\n * Render prop function that receives sign-out props, or traditional ReactNode children\n */\n children?: ((props: BaseSignOutButtonRenderProps) => ReactNode) | ReactNode;\n}\n\n/**\n * Base SignOutButton component that supports both render props and traditional props patterns.\n *\n * @example Using render props\n * ```tsx\n * <BaseSignOutButton>\n * {({signOut, isLoading}) => (\n * <button onClick={signOut} disabled={isLoading}>\n * {isLoading ? 'Signing out...' : 'Sign Out'}\n * </button>\n * )}\n * </BaseSignOutButton>\n * ```\n *\n * @example Using traditional props\n * ```tsx\n * <BaseSignOutButton className=\"custom-button\">Sign Out</BaseSignOutButton>\n * ```\n */\nconst BaseSignOutButton: ForwardRefExoticComponent<BaseSignOutButtonProps & RefAttributes<HTMLButtonElement>> =\n forwardRef<HTMLButtonElement, BaseSignOutButtonProps>(\n (\n {children, className, style, signOut, isLoading, meta, preferences, ...rest}: BaseSignOutButtonProps,\n ref: Ref<HTMLButtonElement>,\n ): ReactElement => {\n if (typeof children === 'function') {\n return <>{children({isLoading, meta, signOut: signOut!})}</>;\n }\n\n return (\n <Button\n ref={ref}\n className={cx(withVendorCSSClassPrefix('sign-out-button'), className)}\n style={style}\n disabled={isLoading}\n loading={isLoading}\n type=\"button\"\n {...rest}\n >\n {children}\n </Button>\n );\n },\n );\n\nBaseSignOutButton.displayName = 'BaseSignOutButton';\n\nexport default BaseSignOutButton;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAuEA,MAAMA,oBACJ,YAEI,EAAC,UAAU,WAAW,OAAO,SAAS,WAAW,MAAM,YAAa,GAAG,QACvE,QACiB;AACjB,KAAI,OAAO,aAAa,WACtB,QAAO,4CAAG,SAAS;EAAC;EAAW;EAAe;EAAS,CAAC,GAAI;AAG9D,QACE,oBAACC;EACM;EACL,WAAW,GAAG,yBAAyB,kBAAkB,EAAE,UAAU;EAC9D;EACP,UAAU;EACV,SAAS;EACT,MAAK;EACL,GAAI;EAEH;GACM;EAGd;AAEH,kBAAkB,cAAc;AAEhC,gCAAe"}
@@ -2,7 +2,7 @@ import { cx } from "../../../styles/emotion.js";
2
2
  import Button_default from "../../primitives/Button/Button.js";
3
3
  import { withVendorCSSClassPrefix } from "@thunderid/browser";
4
4
  import { forwardRef } from "react";
5
- import { Fragment, jsx } from "react/jsx-runtime";
5
+ import { Fragment as Fragment$1, jsx } from "react/jsx-runtime";
6
6
 
7
7
  //#region src/components/actions/SignUpButton/BaseSignUpButton.tsx
8
8
  /**
@@ -25,7 +25,7 @@ import { Fragment, jsx } from "react/jsx-runtime";
25
25
  * ```
26
26
  */
27
27
  const BaseSignUpButton = forwardRef(({ children, className, style, signUp, isLoading, meta, preferences,...rest }, ref) => {
28
- if (typeof children === "function") return /* @__PURE__ */ jsx(Fragment, { children: children({
28
+ if (typeof children === "function") return /* @__PURE__ */ jsx(Fragment$1, { children: children({
29
29
  isLoading,
30
30
  meta,
31
31
  signUp
@@ -1 +1 @@
1
- {"version":3,"file":"BaseSignUpButton.js","names":["BaseSignUpButton: ForwardRefExoticComponent<BaseSignUpButtonProps & RefAttributes<HTMLButtonElement>>","Button"],"sources":["../../../../src/components/actions/SignUpButton/BaseSignUpButton.tsx"],"sourcesContent":["// Copyright 2025 The ThunderID Authors\n// SPDX-License-Identifier: Apache-2.0\n\nimport {FlowMetadataResponse, WithPreferences, withVendorCSSClassPrefix} from '@thunderid/browser';\nimport {\n forwardRef,\n ForwardRefExoticComponent,\n ButtonHTMLAttributes,\n ReactElement,\n ReactNode,\n Ref,\n RefAttributes,\n} from 'react';\nimport {cx} from '../../../styles/emotion';\nimport Button from '../../primitives/Button/Button';\n\n/**\n * Common props shared by all {@link BaseSignUpButton} components.\n */\nexport interface CommonBaseSignUpButtonProps {\n /**\n * Loading state during sign-up process\n */\n isLoading?: boolean;\n /**\n * Flow metadata returned by the platform (v2 only). `null` while loading or unavailable.\n */\n meta?: FlowMetadataResponse | null;\n /**\n * Function to initiate the sign-up process\n */\n signUp?: () => Promise<void>;\n}\n\n/**\n * Props passed to the render function of {@link BaseSignUpButton}\n */\nexport type BaseSignUpButtonRenderProps = CommonBaseSignUpButtonProps;\n\n/**\n * Props interface of {@link BaseSignUpButton}\n */\nexport interface BaseSignUpButtonProps\n extends CommonBaseSignUpButtonProps,\n Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children'>,\n WithPreferences {\n /**\n * Render prop function that receives sign-up props, or traditional ReactNode children\n */\n children?: ((props: BaseSignUpButtonRenderProps) => ReactNode) | ReactNode;\n}\n\n/**\n * Base SignUpButton component that supports both render props and traditional props patterns.\n *\n * @example Using render props\n * ```tsx\n * <BaseSignUpButton>\n * {({ signUp, isLoading }) => (\n * <button onClick={signUp} disabled={isLoading}>\n * {isLoading ? 'Creating account...' : 'Create Account'}\n * </button>\n * )}\n * </BaseSignUpButton>\n * ```\n *\n * @example Using traditional props\n * ```tsx\n * <BaseSignUpButton className=\"custom-button\">Create Account</BaseSignUpButton>\n * ```\n */\nconst BaseSignUpButton: ForwardRefExoticComponent<BaseSignUpButtonProps & RefAttributes<HTMLButtonElement>> =\n forwardRef<HTMLButtonElement, BaseSignUpButtonProps>(\n (\n {children, className, style, signUp, isLoading, meta, preferences, ...rest}: BaseSignUpButtonProps,\n ref: Ref<HTMLButtonElement>,\n ): ReactElement => {\n if (typeof children === 'function') {\n return <>{children({isLoading, meta, signUp})}</>;\n }\n\n return (\n <Button\n ref={ref}\n className={cx(withVendorCSSClassPrefix('sign-up-button'), className)}\n style={style}\n disabled={isLoading}\n loading={isLoading}\n type=\"button\"\n color=\"primary\"\n variant=\"solid\"\n {...rest}\n >\n {children}\n </Button>\n );\n },\n );\n\nBaseSignUpButton.displayName = 'BaseSignUpButton';\n\nexport default BaseSignUpButton;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAuEA,MAAMA,mBACJ,YAEI,EAAC,UAAU,WAAW,OAAO,QAAQ,WAAW,MAAM,YAAa,GAAG,QACtE,QACiB;AACjB,KAAI,OAAO,aAAa,WACtB,QAAO,0CAAG,SAAS;EAAC;EAAW;EAAM;EAAO,CAAC,GAAI;AAGnD,QACE,oBAACC;EACM;EACL,WAAW,GAAG,yBAAyB,iBAAiB,EAAE,UAAU;EAC7D;EACP,UAAU;EACV,SAAS;EACT,MAAK;EACL,OAAM;EACN,SAAQ;EACR,GAAI;EAEH;GACM;EAGd;AAEH,iBAAiB,cAAc;AAE/B,+BAAe"}
1
+ {"version":3,"file":"BaseSignUpButton.js","names":["BaseSignUpButton: ForwardRefExoticComponent<BaseSignUpButtonProps & RefAttributes<HTMLButtonElement>>","Button"],"sources":["../../../../src/components/actions/SignUpButton/BaseSignUpButton.tsx"],"sourcesContent":["// Copyright 2025 The ThunderID Authors\n// SPDX-License-Identifier: Apache-2.0\n\nimport {FlowMetadataResponse, WithPreferences, withVendorCSSClassPrefix} from '@thunderid/browser';\nimport {\n forwardRef,\n ForwardRefExoticComponent,\n ButtonHTMLAttributes,\n ReactElement,\n ReactNode,\n Ref,\n RefAttributes,\n} from 'react';\nimport {cx} from '../../../styles/emotion';\nimport Button from '../../primitives/Button/Button';\n\n/**\n * Common props shared by all {@link BaseSignUpButton} components.\n */\nexport interface CommonBaseSignUpButtonProps {\n /**\n * Loading state during sign-up process\n */\n isLoading?: boolean;\n /**\n * Flow metadata returned by the platform (v2 only). `null` while loading or unavailable.\n */\n meta?: FlowMetadataResponse | null;\n /**\n * Function to initiate the sign-up process\n */\n signUp?: () => Promise<void>;\n}\n\n/**\n * Props passed to the render function of {@link BaseSignUpButton}\n */\nexport type BaseSignUpButtonRenderProps = CommonBaseSignUpButtonProps;\n\n/**\n * Props interface of {@link BaseSignUpButton}\n */\nexport interface BaseSignUpButtonProps\n extends CommonBaseSignUpButtonProps,\n Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children'>,\n WithPreferences {\n /**\n * Render prop function that receives sign-up props, or traditional ReactNode children\n */\n children?: ((props: BaseSignUpButtonRenderProps) => ReactNode) | ReactNode;\n}\n\n/**\n * Base SignUpButton component that supports both render props and traditional props patterns.\n *\n * @example Using render props\n * ```tsx\n * <BaseSignUpButton>\n * {({ signUp, isLoading }) => (\n * <button onClick={signUp} disabled={isLoading}>\n * {isLoading ? 'Creating account...' : 'Create Account'}\n * </button>\n * )}\n * </BaseSignUpButton>\n * ```\n *\n * @example Using traditional props\n * ```tsx\n * <BaseSignUpButton className=\"custom-button\">Create Account</BaseSignUpButton>\n * ```\n */\nconst BaseSignUpButton: ForwardRefExoticComponent<BaseSignUpButtonProps & RefAttributes<HTMLButtonElement>> =\n forwardRef<HTMLButtonElement, BaseSignUpButtonProps>(\n (\n {children, className, style, signUp, isLoading, meta, preferences, ...rest}: BaseSignUpButtonProps,\n ref: Ref<HTMLButtonElement>,\n ): ReactElement => {\n if (typeof children === 'function') {\n return <>{children({isLoading, meta, signUp})}</>;\n }\n\n return (\n <Button\n ref={ref}\n className={cx(withVendorCSSClassPrefix('sign-up-button'), className)}\n style={style}\n disabled={isLoading}\n loading={isLoading}\n type=\"button\"\n color=\"primary\"\n variant=\"solid\"\n {...rest}\n >\n {children}\n </Button>\n );\n },\n );\n\nBaseSignUpButton.displayName = 'BaseSignUpButton';\n\nexport default BaseSignUpButton;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAuEA,MAAMA,mBACJ,YAEI,EAAC,UAAU,WAAW,OAAO,QAAQ,WAAW,MAAM,YAAa,GAAG,QACtE,QACiB;AACjB,KAAI,OAAO,aAAa,WACtB,QAAO,4CAAG,SAAS;EAAC;EAAW;EAAM;EAAO,CAAC,GAAI;AAGnD,QACE,oBAACC;EACM;EACL,WAAW,GAAG,yBAAyB,iBAAiB,EAAE,UAAU;EAC7D;EACP,UAAU;EACV,SAAS;EACT,MAAK;EACL,OAAM;EACN,SAAQ;EACR,GAAI;EAEH;GACM;EAGd;AAEH,iBAAiB,cAAc;AAE/B,+BAAe"}
@@ -1,6 +1,6 @@
1
1
  import Typography_default from "../primitives/Typography/Typography.js";
2
2
  import { useEffect, useState } from "react";
3
- import { Fragment, jsx } from "react/jsx-runtime";
3
+ import { Fragment as Fragment$1, jsx } from "react/jsx-runtime";
4
4
 
5
5
  //#region src/components/adapters/FlowTimer.tsx
6
6
  /**
@@ -32,7 +32,7 @@ const FlowTimer = ({ expiresIn = 0, textTemplate = "Time remaining: {time}", chi
32
32
  };
33
33
  const isExpired = remaining <= 0;
34
34
  const formattedTime = formatTime(remaining);
35
- if (children) return /* @__PURE__ */ jsx(Fragment, { children: children({
35
+ if (children) return /* @__PURE__ */ jsx(Fragment$1, { children: children({
36
36
  formattedTime,
37
37
  isExpired,
38
38
  remaining
@@ -1 +1 @@
1
- {"version":3,"file":"FlowTimer.js","names":["FlowTimer: FC<FlowTimerProps>","interval: NodeJS.Timeout","isExpired: boolean","formattedTime: string","Typography"],"sources":["../../../src/components/adapters/FlowTimer.tsx"],"sourcesContent":["// Copyright 2026 The ThunderID Authors\n// SPDX-License-Identifier: Apache-2.0\n\nimport {FC, ReactNode, useEffect, useState} from 'react';\nimport Typography from '../primitives/Typography/Typography';\n\n/**\n * Render props exposed by FlowTimer when using the render-prop pattern.\n */\nexport interface FlowTimerRenderProps {\n /** Human-readable formatted time string (e.g. \"2:30\" or \"Timed out\"). */\n formattedTime: string;\n /** Whether the timer has expired. */\n isExpired: boolean;\n /** Remaining time in seconds. 0 when expired. */\n remaining: number;\n}\n\n/**\n * Props for the FlowTimer component.\n */\nexport interface FlowTimerProps {\n /**\n * Render-props callback. When provided, the default countdown display is replaced\n * with whatever JSX the callback returns.\n *\n * @example\n * ```tsx\n * <FlowTimer expiresIn={300}>\n * {({ remaining, isExpired, formattedTime }) => (\n * <span style={{ color: isExpired ? 'red' : 'inherit' }}>\n * {isExpired ? 'Session expired' : `Time left: ${formattedTime}`}\n * </span>\n * )}\n * </FlowTimer>\n * ```\n */\n children?: (props: FlowTimerRenderProps) => ReactNode;\n /** Initial number of seconds for the countdown. 0 or negative means no timer. */\n expiresIn?: number;\n /** Text template for the countdown display. Use {time} as a placeholder. */\n textTemplate?: string;\n}\n\n/**\n * Flow countdown timer component.\n *\n * Displays a countdown from the given number of seconds. When the time expires,\n * shows \"Timed out\". Returns null if expiresIn <= 0.\n */\nconst FlowTimer: FC<FlowTimerProps> = ({\n expiresIn = 0,\n textTemplate = 'Time remaining: {time}',\n children,\n}: FlowTimerProps) => {\n const [remaining, setRemaining] = useState<number>(expiresIn > 0 ? expiresIn : 0);\n\n useEffect(() => {\n if (expiresIn <= 0) {\n return undefined;\n }\n\n setRemaining(expiresIn);\n\n const interval: NodeJS.Timeout = setInterval(() => {\n setRemaining((prev: number) => {\n if (prev <= 1) {\n clearInterval(interval);\n return 0;\n }\n return prev - 1;\n });\n }, 1000);\n\n return () => clearInterval(interval);\n }, [expiresIn]);\n\n if (expiresIn <= 0) {\n return null;\n }\n\n const formatTime = (seconds: number): string => {\n if (seconds <= 0) {\n return 'Timed out';\n }\n const m: number = Math.floor(seconds / 60);\n const s: number = seconds % 60;\n return `${m}:${s.toString().padStart(2, '0')}`;\n };\n\n const isExpired: boolean = remaining <= 0;\n const formattedTime: string = formatTime(remaining);\n\n if (children) {\n return <>{children({formattedTime, isExpired, remaining})}</>;\n }\n\n const displayText: string = isExpired ? 'Timed out' : textTemplate.replace('{time}', formattedTime);\n\n return <Typography variant=\"body2\">{displayText}</Typography>;\n};\n\nexport default FlowTimer;\n"],"mappings":";;;;;;;;;;;AAkDA,MAAMA,aAAiC,EACrC,YAAY,GACZ,eAAe,0BACf,eACoB;CACpB,MAAM,CAAC,WAAW,gBAAgB,SAAiB,YAAY,IAAI,YAAY,EAAE;AAEjF,iBAAgB;AACd,MAAI,aAAa,EACf;AAGF,eAAa,UAAU;EAEvB,MAAMC,WAA2B,kBAAkB;AACjD,iBAAc,SAAiB;AAC7B,QAAI,QAAQ,GAAG;AACb,mBAAc,SAAS;AACvB,YAAO;;AAET,WAAO,OAAO;KACd;KACD,IAAK;AAER,eAAa,cAAc,SAAS;IACnC,CAAC,UAAU,CAAC;AAEf,KAAI,aAAa,EACf,QAAO;CAGT,MAAM,cAAc,YAA4B;AAC9C,MAAI,WAAW,EACb,QAAO;AAIT,SAAO,GAFW,KAAK,MAAM,UAAU,GAAG,CAE9B,IADM,UAAU,IACX,UAAU,CAAC,SAAS,GAAG,IAAI;;CAG9C,MAAMC,YAAqB,aAAa;CACxC,MAAMC,gBAAwB,WAAW,UAAU;AAEnD,KAAI,SACF,QAAO,0CAAG,SAAS;EAAC;EAAe;EAAW;EAAU,CAAC,GAAI;AAK/D,QAAO,oBAACC;EAAW,SAAQ;YAFC,YAAY,cAAc,aAAa,QAAQ,UAAU,cAAc;GAEtC;;AAG/D,wBAAe"}
1
+ {"version":3,"file":"FlowTimer.js","names":["FlowTimer: FC<FlowTimerProps>","interval: NodeJS.Timeout","isExpired: boolean","formattedTime: string","Typography"],"sources":["../../../src/components/adapters/FlowTimer.tsx"],"sourcesContent":["// Copyright 2026 The ThunderID Authors\n// SPDX-License-Identifier: Apache-2.0\n\nimport {FC, ReactNode, useEffect, useState} from 'react';\nimport Typography from '../primitives/Typography/Typography';\n\n/**\n * Render props exposed by FlowTimer when using the render-prop pattern.\n */\nexport interface FlowTimerRenderProps {\n /** Human-readable formatted time string (e.g. \"2:30\" or \"Timed out\"). */\n formattedTime: string;\n /** Whether the timer has expired. */\n isExpired: boolean;\n /** Remaining time in seconds. 0 when expired. */\n remaining: number;\n}\n\n/**\n * Props for the FlowTimer component.\n */\nexport interface FlowTimerProps {\n /**\n * Render-props callback. When provided, the default countdown display is replaced\n * with whatever JSX the callback returns.\n *\n * @example\n * ```tsx\n * <FlowTimer expiresIn={300}>\n * {({ remaining, isExpired, formattedTime }) => (\n * <span style={{ color: isExpired ? 'red' : 'inherit' }}>\n * {isExpired ? 'Session expired' : `Time left: ${formattedTime}`}\n * </span>\n * )}\n * </FlowTimer>\n * ```\n */\n children?: (props: FlowTimerRenderProps) => ReactNode;\n /** Initial number of seconds for the countdown. 0 or negative means no timer. */\n expiresIn?: number;\n /** Text template for the countdown display. Use {time} as a placeholder. */\n textTemplate?: string;\n}\n\n/**\n * Flow countdown timer component.\n *\n * Displays a countdown from the given number of seconds. When the time expires,\n * shows \"Timed out\". Returns null if expiresIn <= 0.\n */\nconst FlowTimer: FC<FlowTimerProps> = ({\n expiresIn = 0,\n textTemplate = 'Time remaining: {time}',\n children,\n}: FlowTimerProps) => {\n const [remaining, setRemaining] = useState<number>(expiresIn > 0 ? expiresIn : 0);\n\n useEffect(() => {\n if (expiresIn <= 0) {\n return undefined;\n }\n\n setRemaining(expiresIn);\n\n const interval: NodeJS.Timeout = setInterval(() => {\n setRemaining((prev: number) => {\n if (prev <= 1) {\n clearInterval(interval);\n return 0;\n }\n return prev - 1;\n });\n }, 1000);\n\n return () => clearInterval(interval);\n }, [expiresIn]);\n\n if (expiresIn <= 0) {\n return null;\n }\n\n const formatTime = (seconds: number): string => {\n if (seconds <= 0) {\n return 'Timed out';\n }\n const m: number = Math.floor(seconds / 60);\n const s: number = seconds % 60;\n return `${m}:${s.toString().padStart(2, '0')}`;\n };\n\n const isExpired: boolean = remaining <= 0;\n const formattedTime: string = formatTime(remaining);\n\n if (children) {\n return <>{children({formattedTime, isExpired, remaining})}</>;\n }\n\n const displayText: string = isExpired ? 'Timed out' : textTemplate.replace('{time}', formattedTime);\n\n return <Typography variant=\"body2\">{displayText}</Typography>;\n};\n\nexport default FlowTimer;\n"],"mappings":";;;;;;;;;;;AAkDA,MAAMA,aAAiC,EACrC,YAAY,GACZ,eAAe,0BACf,eACoB;CACpB,MAAM,CAAC,WAAW,gBAAgB,SAAiB,YAAY,IAAI,YAAY,EAAE;AAEjF,iBAAgB;AACd,MAAI,aAAa,EACf;AAGF,eAAa,UAAU;EAEvB,MAAMC,WAA2B,kBAAkB;AACjD,iBAAc,SAAiB;AAC7B,QAAI,QAAQ,GAAG;AACb,mBAAc,SAAS;AACvB,YAAO;;AAET,WAAO,OAAO;KACd;KACD,IAAK;AAER,eAAa,cAAc,SAAS;IACnC,CAAC,UAAU,CAAC;AAEf,KAAI,aAAa,EACf,QAAO;CAGT,MAAM,cAAc,YAA4B;AAC9C,MAAI,WAAW,EACb,QAAO;AAIT,SAAO,GAFW,KAAK,MAAM,UAAU,GAAG,CAE9B,IADM,UAAU,IACX,UAAU,CAAC,SAAS,GAAG,IAAI;;CAG9C,MAAMC,YAAqB,aAAa;CACxC,MAAMC,gBAAwB,WAAW,UAAU;AAEnD,KAAI,SACF,QAAO,4CAAG,SAAS;EAAC;EAAe;EAAW;EAAU,CAAC,GAAI;AAK/D,QAAO,oBAACC;EAAW,SAAQ;YAFC,YAAY,cAAc,aAAa,QAAQ,UAAU,cAAc;GAEtC;;AAG/D,wBAAe"}
@@ -0,0 +1,100 @@
1
+ import { PasswordPolicy, Preferences } from '@thunderid/browser';
2
+ import { FC } from 'react';
3
+ /**
4
+ * The values collected by the form and handed to `onSubmit`.
5
+ *
6
+ * There is deliberately no current-value field here. The self-service credential write
7
+ * endpoint does not verify the account's existing value today, so a field the server
8
+ * ignores would only teach the user a false sense of security.
9
+ */
10
+ export interface ChangePasswordValues {
11
+ /**
12
+ * The value to set.
13
+ */
14
+ newPassword: string;
15
+ }
16
+ export interface BaseChangeCredentialProps {
17
+ /**
18
+ * Whether to wrap the form in a bordered card.
19
+ */
20
+ cardLayout?: boolean;
21
+ /**
22
+ * Additional CSS class names
23
+ */
24
+ className?: string;
25
+ /**
26
+ * The human-readable name of the credential, substituted into every default label,
27
+ * placeholder and message (for example "Change {credential}", "New {credential}").
28
+ * Defaults to `Password`. {@link ChangeCredential} resolves this from the attribute's own
29
+ * `displayName` in the user schema; set it directly here when using this presentational
30
+ * component without that context.
31
+ */
32
+ credentialDisplayName?: string;
33
+ /**
34
+ * A form-level error, typically a server failure that maps to no single field.
35
+ */
36
+ error?: string | null;
37
+ /**
38
+ * Server-supplied errors keyed by field name (`newPassword`).
39
+ */
40
+ fieldErrors?: Record<string, string>;
41
+ /**
42
+ * Whether a submission is in flight.
43
+ */
44
+ loading?: boolean;
45
+ /**
46
+ * Called with the collected values once client-side validation passes.
47
+ */
48
+ onSubmit?: (values: ChangePasswordValues) => void;
49
+ /**
50
+ * The rules the new value must satisfy. Defaults to no rules, in which case the checklist
51
+ * is empty and the only submit gate is a non-empty value; the caller is expected to source
52
+ * this from the user type schema (see {@link ChangeCredential}) or supply its own.
53
+ */
54
+ policy?: PasswordPolicy;
55
+ /**
56
+ * Component-level preference overrides, including i18n.
57
+ */
58
+ preferences?: Preferences;
59
+ /**
60
+ * Whether to render the live requirement checklist. Defaults to `true`.
61
+ */
62
+ showRequirements?: boolean;
63
+ /**
64
+ * Whether the last submission succeeded.
65
+ */
66
+ success?: boolean;
67
+ /**
68
+ * Overrides the default "Change {credential}" heading. Pass an empty string to omit the
69
+ * heading entirely, for example when an app's own surrounding layout (a card header, a
70
+ * dialog title) already names the credential and a second heading would be redundant.
71
+ * Defaults to the translated `user.change_password.heading` string.
72
+ */
73
+ title?: string;
74
+ /**
75
+ * Whether the account cannot have this credential changed at all, because the user type's
76
+ * schema defines no attribute of this name. The form is rendered inert behind an
77
+ * explanatory message rather than hidden, so an integrator who placed the component can see
78
+ * why it is not usable instead of finding an empty space.
79
+ */
80
+ unavailable?: boolean;
81
+ }
82
+ /**
83
+ * Presentational change-credential form with just the two fields a first-time or
84
+ * unverified credential change needs: new value and confirmation.
85
+ *
86
+ * Holds no context and performs no network calls: it renders the fields, evaluates the
87
+ * policy for the checklist and the submit gate, and hands validated values to `onSubmit`.
88
+ * Use {@link ChangeCredential} for the context-wired variant.
89
+ *
90
+ * @example
91
+ * ```tsx
92
+ * <BaseChangeCredential
93
+ * policy={{regex: '^.{12,}$'}}
94
+ * onSubmit={({newPassword}) => save(newPassword)}
95
+ * />
96
+ * ```
97
+ */
98
+ declare const BaseChangeCredential: FC<BaseChangeCredentialProps>;
99
+ export default BaseChangeCredential;
100
+ //# sourceMappingURL=BaseChangeCredential.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BaseChangeCredential.d.ts","sourceRoot":"","sources":["../../../../src/components/presentation/ChangeCredential/BaseChangeCredential.tsx"],"names":[],"mappings":"AAGA,OAAO,EAEL,cAAc,EAEd,WAAW,EAIZ,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAC,EAAE,EAA6C,MAAM,OAAO,CAAC;AAYrE;;;;;;GAMG;AACH,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;;OAMG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrC;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,oBAAoB,KAAK,IAAI,CAAC;IAClD;;;;OAIG;IACH,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB;;OAEG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;OAKG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED;;;;;;;;;;;;;;;GAeG;AACH,QAAA,MAAM,oBAAoB,EAAE,EAAE,CAAC,yBAAyB,CAsOvD,CAAC;AAEF,eAAe,oBAAoB,CAAC"}