@terreno/ui 57.19.2 → 57.20.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 (295) hide show
  1. package/.ai/guidelines/core.md +1 -1
  2. package/CHANGELOG.md +393 -0
  3. package/dist/Accordion.d.ts.map +1 -1
  4. package/dist/Accordion.js +3 -3
  5. package/dist/Accordion.js.map +1 -1
  6. package/dist/Avatar.d.ts.map +1 -1
  7. package/dist/Avatar.js +3 -1
  8. package/dist/Avatar.js.map +1 -1
  9. package/dist/Box.d.ts.map +1 -1
  10. package/dist/Box.js +38 -2
  11. package/dist/Box.js.map +1 -1
  12. package/dist/Card.js +2 -2
  13. package/dist/Card.js.map +1 -1
  14. package/dist/Common.d.ts +120 -7
  15. package/dist/Common.d.ts.map +1 -1
  16. package/dist/Common.js.map +1 -1
  17. package/dist/ConsentFormScreen.d.ts +1 -1
  18. package/dist/ConsentFormScreen.d.ts.map +1 -1
  19. package/dist/ConsentFormScreen.js +13 -4
  20. package/dist/ConsentFormScreen.js.map +1 -1
  21. package/dist/DateTimeField.d.ts.map +1 -1
  22. package/dist/DateTimeField.js +5 -3
  23. package/dist/DateTimeField.js.map +1 -1
  24. package/dist/Field.d.ts.map +1 -1
  25. package/dist/Field.js +2 -0
  26. package/dist/Field.js.map +1 -1
  27. package/dist/FormContainer.d.ts +68 -0
  28. package/dist/FormContainer.d.ts.map +1 -0
  29. package/dist/FormContainer.js +79 -0
  30. package/dist/FormContainer.js.map +1 -0
  31. package/dist/GPTChat.d.ts.map +1 -1
  32. package/dist/GPTChat.js +2 -1
  33. package/dist/GPTChat.js.map +1 -1
  34. package/dist/Heading.d.ts +1 -1
  35. package/dist/Heading.d.ts.map +1 -1
  36. package/dist/Heading.js +5 -2
  37. package/dist/Heading.js.map +1 -1
  38. package/dist/Icon.d.ts +4 -0
  39. package/dist/Icon.d.ts.map +1 -1
  40. package/dist/Icon.js +43 -2
  41. package/dist/Icon.js.map +1 -1
  42. package/dist/LabeledCheckBox.d.ts +22 -0
  43. package/dist/LabeledCheckBox.d.ts.map +1 -0
  44. package/dist/LabeledCheckBox.js +30 -0
  45. package/dist/LabeledCheckBox.js.map +1 -0
  46. package/dist/ListDetailLayout.d.ts +36 -0
  47. package/dist/ListDetailLayout.d.ts.map +1 -0
  48. package/dist/ListDetailLayout.js +153 -0
  49. package/dist/ListDetailLayout.js.map +1 -0
  50. package/dist/MarkdownEditor.d.ts.map +1 -1
  51. package/dist/MarkdownEditor.js +2 -1
  52. package/dist/MarkdownEditor.js.map +1 -1
  53. package/dist/MediaQuery.d.ts +1 -1
  54. package/dist/MediaQuery.d.ts.map +1 -1
  55. package/dist/MediaQuery.js +1 -1
  56. package/dist/MediaQuery.js.map +1 -1
  57. package/dist/OtpField.d.ts +60 -0
  58. package/dist/OtpField.d.ts.map +1 -0
  59. package/dist/OtpField.js +154 -0
  60. package/dist/OtpField.js.map +1 -0
  61. package/dist/ProvisionalConsentSigner.d.ts +21 -0
  62. package/dist/ProvisionalConsentSigner.d.ts.map +1 -0
  63. package/dist/ProvisionalConsentSigner.js +199 -0
  64. package/dist/ProvisionalConsentSigner.js.map +1 -0
  65. package/dist/ResponsiveBreakpoint.d.ts +5 -0
  66. package/dist/ResponsiveBreakpoint.d.ts.map +1 -1
  67. package/dist/ResponsiveBreakpoint.js +7 -0
  68. package/dist/ResponsiveBreakpoint.js.map +1 -1
  69. package/dist/SocialLoginButton.d.ts +10 -0
  70. package/dist/SocialLoginButton.d.ts.map +1 -1
  71. package/dist/SocialLoginButton.js +26 -8
  72. package/dist/SocialLoginButton.js.map +1 -1
  73. package/dist/SplitPage.d.ts +11 -0
  74. package/dist/SplitPage.d.ts.map +1 -1
  75. package/dist/SplitPage.js +11 -5
  76. package/dist/SplitPage.js.map +1 -1
  77. package/dist/SplitPage.native.d.ts.map +1 -1
  78. package/dist/SplitPage.native.js +3 -1
  79. package/dist/SplitPage.native.js.map +1 -1
  80. package/dist/SyncStatusBanner.d.ts +7 -1
  81. package/dist/SyncStatusBanner.d.ts.map +1 -1
  82. package/dist/SyncStatusBanner.js +20 -4
  83. package/dist/SyncStatusBanner.js.map +1 -1
  84. package/dist/TextField.d.ts.map +1 -1
  85. package/dist/TextField.js +44 -10
  86. package/dist/TextField.js.map +1 -1
  87. package/dist/fieldElements/FieldError.d.ts.map +1 -1
  88. package/dist/fieldElements/FieldError.js +1 -1
  89. package/dist/fieldElements/FieldError.js.map +1 -1
  90. package/dist/index.d.ts +19 -3
  91. package/dist/index.d.ts.map +1 -1
  92. package/dist/index.js +14 -1
  93. package/dist/index.js.map +1 -1
  94. package/dist/lazyBoundaries/heavyOptionalExports.d.ts +3 -0
  95. package/dist/lazyBoundaries/heavyOptionalExports.d.ts.map +1 -1
  96. package/dist/lazyBoundaries/heavyOptionalExports.js +2 -0
  97. package/dist/lazyBoundaries/heavyOptionalExports.js.map +1 -1
  98. package/dist/login/LastUsedBadge.d.ts +14 -0
  99. package/dist/login/LastUsedBadge.d.ts.map +1 -0
  100. package/dist/login/LastUsedBadge.js +23 -0
  101. package/dist/login/LastUsedBadge.js.map +1 -0
  102. package/dist/login/LoginAccountCard.d.ts +38 -0
  103. package/dist/login/LoginAccountCard.d.ts.map +1 -0
  104. package/dist/login/LoginAccountCard.js +72 -0
  105. package/dist/login/LoginAccountCard.js.map +1 -0
  106. package/dist/login/LoginAccountList.d.ts +33 -0
  107. package/dist/login/LoginAccountList.d.ts.map +1 -0
  108. package/dist/login/LoginAccountList.js +30 -0
  109. package/dist/login/LoginAccountList.js.map +1 -0
  110. package/dist/login/LoginScreen.d.ts +4 -4
  111. package/dist/login/LoginScreen.d.ts.map +1 -1
  112. package/dist/login/LoginScreen.js +294 -13
  113. package/dist/login/LoginScreen.js.map +1 -1
  114. package/dist/login/OutlinePill.d.ts +28 -0
  115. package/dist/login/OutlinePill.d.ts.map +1 -0
  116. package/dist/login/OutlinePill.js +48 -0
  117. package/dist/login/OutlinePill.js.map +1 -0
  118. package/dist/login/TwoFactorChallengeScreen.d.ts +26 -0
  119. package/dist/login/TwoFactorChallengeScreen.d.ts.map +1 -0
  120. package/dist/login/TwoFactorChallengeScreen.js +139 -0
  121. package/dist/login/TwoFactorChallengeScreen.js.map +1 -0
  122. package/dist/login/loginMethods.d.ts +27 -0
  123. package/dist/login/loginMethods.d.ts.map +1 -0
  124. package/dist/login/loginMethods.js +37 -0
  125. package/dist/login/loginMethods.js.map +1 -0
  126. package/dist/login/loginTypes.d.ts +202 -5
  127. package/dist/login/loginTypes.d.ts.map +1 -1
  128. package/dist/pdfHtmlTemplate.d.ts +17 -0
  129. package/dist/pdfHtmlTemplate.d.ts.map +1 -1
  130. package/dist/pdfHtmlTemplate.js +78 -0
  131. package/dist/pdfHtmlTemplate.js.map +1 -1
  132. package/dist/security/AccountSecurityScreen.d.ts +10 -0
  133. package/dist/security/AccountSecurityScreen.d.ts.map +1 -0
  134. package/dist/security/AccountSecurityScreen.js +50 -0
  135. package/dist/security/AccountSecurityScreen.js.map +1 -0
  136. package/dist/security/LinkedAccountsCard.d.ts +32 -0
  137. package/dist/security/LinkedAccountsCard.d.ts.map +1 -0
  138. package/dist/security/LinkedAccountsCard.js +145 -0
  139. package/dist/security/LinkedAccountsCard.js.map +1 -0
  140. package/dist/security/PasskeysCard.d.ts +39 -0
  141. package/dist/security/PasskeysCard.d.ts.map +1 -0
  142. package/dist/security/PasskeysCard.js +168 -0
  143. package/dist/security/PasskeysCard.js.map +1 -0
  144. package/dist/security/PasswordCard.d.ts +32 -0
  145. package/dist/security/PasswordCard.d.ts.map +1 -0
  146. package/dist/security/PasswordCard.js +198 -0
  147. package/dist/security/PasswordCard.js.map +1 -0
  148. package/dist/security/SessionsCard.d.ts +39 -0
  149. package/dist/security/SessionsCard.d.ts.map +1 -0
  150. package/dist/security/SessionsCard.js +168 -0
  151. package/dist/security/SessionsCard.js.map +1 -0
  152. package/dist/security/TwoFactorSettingsCard.d.ts +55 -0
  153. package/dist/security/TwoFactorSettingsCard.d.ts.map +1 -0
  154. package/dist/security/TwoFactorSettingsCard.js +458 -0
  155. package/dist/security/TwoFactorSettingsCard.js.map +1 -0
  156. package/dist/security/securityMethods.d.ts +40 -0
  157. package/dist/security/securityMethods.d.ts.map +1 -0
  158. package/dist/security/securityMethods.js +66 -0
  159. package/dist/security/securityMethods.js.map +1 -0
  160. package/dist/security/securityTypes.d.ts +467 -0
  161. package/dist/security/securityTypes.d.ts.map +1 -0
  162. package/dist/security/securityTypes.js +2 -0
  163. package/dist/security/securityTypes.js.map +1 -0
  164. package/dist/security/userAgent.d.ts +26 -0
  165. package/dist/security/userAgent.d.ts.map +1 -0
  166. package/dist/security/userAgent.js +80 -0
  167. package/dist/security/userAgent.js.map +1 -0
  168. package/dist/signUp/OAuthButtons.d.ts +28 -5
  169. package/dist/signUp/OAuthButtons.d.ts.map +1 -1
  170. package/dist/signUp/OAuthButtons.js +44 -5
  171. package/dist/signUp/OAuthButtons.js.map +1 -1
  172. package/dist/signUp/SignUpScreen.d.ts.map +1 -1
  173. package/dist/signUp/SignUpScreen.js +50 -5
  174. package/dist/signUp/SignUpScreen.js.map +1 -1
  175. package/dist/signUp/signUpTypes.d.ts +21 -1
  176. package/dist/signUp/signUpTypes.d.ts.map +1 -1
  177. package/dist/useConsentForms.d.ts +9 -0
  178. package/dist/useConsentForms.d.ts.map +1 -1
  179. package/dist/useConsentForms.js +18 -0
  180. package/dist/useConsentForms.js.map +1 -1
  181. package/dist/useProvisionalConsent.d.ts +124 -0
  182. package/dist/useProvisionalConsent.d.ts.map +1 -0
  183. package/dist/useProvisionalConsent.js +79 -0
  184. package/dist/useProvisionalConsent.js.map +1 -0
  185. package/package.json +3 -2
  186. package/src/Accordion.test.tsx +5 -0
  187. package/src/Accordion.tsx +3 -8
  188. package/src/AreaChart.test.tsx +15 -0
  189. package/src/Avatar.test.tsx +8 -0
  190. package/src/Avatar.tsx +2 -0
  191. package/src/BarChart.test.tsx +15 -0
  192. package/src/Box.test.tsx +61 -1
  193. package/src/Box.tsx +44 -2
  194. package/src/Card.tsx +2 -2
  195. package/src/Common.ts +134 -7
  196. package/src/ConsentFormScreen.test.tsx +84 -0
  197. package/src/ConsentFormScreen.tsx +28 -4
  198. package/src/DateTimeField.tsx +5 -3
  199. package/src/DonutChart.test.tsx +15 -0
  200. package/src/Field.tsx +2 -0
  201. package/src/FilePickerButton.test.tsx +35 -0
  202. package/src/FormContainer.test.tsx +242 -0
  203. package/src/FormContainer.tsx +177 -0
  204. package/src/GPTChat.test.tsx +16 -0
  205. package/src/GPTChat.tsx +8 -2
  206. package/src/Heading.test.tsx +14 -0
  207. package/src/Heading.tsx +6 -1
  208. package/src/Icon.test.tsx +52 -1
  209. package/src/Icon.tsx +92 -3
  210. package/src/IconButton.test.tsx +85 -0
  211. package/src/LabeledCheckBox.test.tsx +45 -0
  212. package/src/LabeledCheckBox.tsx +89 -0
  213. package/src/ListDetailLayout.tsx +247 -0
  214. package/src/MarkdownEditor.tsx +2 -1
  215. package/src/MediaQuery.ts +1 -0
  216. package/src/OtpField.test.tsx +280 -0
  217. package/src/OtpField.tsx +307 -0
  218. package/src/ProvisionalConsentSigner.test.tsx +625 -0
  219. package/src/ProvisionalConsentSigner.tsx +423 -0
  220. package/src/ResponsiveBreakpoint.test.tsx +7 -0
  221. package/src/ResponsiveBreakpoint.tsx +14 -0
  222. package/src/RootImportRegression.test.tsx +3 -0
  223. package/src/SocialLoginButton.test.tsx +14 -0
  224. package/src/SocialLoginButton.tsx +51 -7
  225. package/src/SplitPage.native.tsx +3 -1
  226. package/src/SplitPage.tsx +11 -5
  227. package/src/SyncStatusBanner.test.tsx +61 -4
  228. package/src/SyncStatusBanner.tsx +29 -3
  229. package/src/TextField.test.tsx +150 -0
  230. package/src/TextField.tsx +66 -8
  231. package/src/__snapshots__/AddressField.test.tsx.snap +12 -0
  232. package/src/__snapshots__/AiSuggestionBox.test.tsx.snap +15 -0
  233. package/src/__snapshots__/Avatar.test.tsx.snap +1 -0
  234. package/src/__snapshots__/CustomSelectField.test.tsx.snap +3 -0
  235. package/src/__snapshots__/EmailField.test.tsx.snap +6 -0
  236. package/src/__snapshots__/Field.test.tsx.snap +37 -0
  237. package/src/__snapshots__/HeightField.test.tsx.snap +2 -0
  238. package/src/__snapshots__/MobileAddressAutoComplete.test.tsx.snap +3 -0
  239. package/src/__snapshots__/NumberField.test.tsx.snap +3 -0
  240. package/src/__snapshots__/PhoneNumberField.test.tsx.snap +12 -0
  241. package/src/__snapshots__/Slider.test.tsx.snap +1 -0
  242. package/src/__snapshots__/SocialLoginButton.test.tsx.snap +43 -22
  243. package/src/__snapshots__/TapToEdit.test.tsx.snap +3 -0
  244. package/src/__snapshots__/TextArea.test.tsx.snap +17 -1
  245. package/src/__snapshots__/TextField.test.tsx.snap +19 -2
  246. package/src/__snapshots__/TypedSignatureField.test.tsx.snap +3 -0
  247. package/src/__snapshots__/UnifiedAddressAutoComplete.test.tsx.snap +18 -0
  248. package/src/__snapshots__/WebAddressAutocomplete.test.tsx.snap +12 -0
  249. package/src/bunSetup.ts +13 -1
  250. package/src/fieldElements/FieldError.tsx +1 -0
  251. package/src/fieldElements/__snapshots__/FieldError.test.tsx.snap +2 -0
  252. package/src/index.tsx +42 -1
  253. package/src/isolated/ListDetailLayout.isolated.tsx +634 -0
  254. package/src/lazyBoundaries/heavyOptionalExports.tsx +7 -0
  255. package/src/login/LastUsedBadge.tsx +40 -0
  256. package/src/login/LoginAccountCard.tsx +205 -0
  257. package/src/login/LoginAccountList.tsx +115 -0
  258. package/src/login/LoginScreen.test.tsx +837 -1
  259. package/src/login/LoginScreen.tsx +674 -91
  260. package/src/login/OutlinePill.tsx +110 -0
  261. package/src/login/TwoFactorChallengeScreen.test.tsx +376 -0
  262. package/src/login/TwoFactorChallengeScreen.tsx +307 -0
  263. package/src/login/__snapshots__/LoginScreen.test.tsx.snap +1454 -334
  264. package/src/login/loginMethods.test.ts +53 -0
  265. package/src/login/loginMethods.ts +60 -0
  266. package/src/login/loginTypes.ts +208 -5
  267. package/src/pdfHtmlTemplate.test.ts +243 -4
  268. package/src/pdfHtmlTemplate.ts +93 -0
  269. package/src/security/AccountSecurityScreen.test.tsx +262 -0
  270. package/src/security/AccountSecurityScreen.tsx +156 -0
  271. package/src/security/LinkedAccountsCard.test.tsx +371 -0
  272. package/src/security/LinkedAccountsCard.tsx +297 -0
  273. package/src/security/PasskeysCard.test.tsx +378 -0
  274. package/src/security/PasskeysCard.tsx +371 -0
  275. package/src/security/PasswordCard.test.tsx +445 -0
  276. package/src/security/PasswordCard.tsx +342 -0
  277. package/src/security/SessionsCard.test.tsx +349 -0
  278. package/src/security/SessionsCard.tsx +362 -0
  279. package/src/security/TwoFactorSettingsCard.test.tsx +700 -0
  280. package/src/security/TwoFactorSettingsCard.tsx +872 -0
  281. package/src/security/securityMethods.test.ts +101 -0
  282. package/src/security/securityMethods.ts +104 -0
  283. package/src/security/securityTypes.ts +480 -0
  284. package/src/security/userAgent.test.ts +119 -0
  285. package/src/security/userAgent.ts +102 -0
  286. package/src/signUp/OAuthButtons.test.tsx +27 -0
  287. package/src/signUp/OAuthButtons.tsx +153 -19
  288. package/src/signUp/SignUpScreen.test.tsx +170 -1
  289. package/src/signUp/SignUpScreen.tsx +87 -25
  290. package/src/signUp/__snapshots__/SignUpScreen.test.tsx.snap +22 -11
  291. package/src/signUp/signUpTypes.ts +23 -1
  292. package/src/useConsentForms.test.ts +37 -1
  293. package/src/useConsentForms.ts +25 -0
  294. package/src/useProvisionalConsent.test.ts +256 -0
  295. package/src/useProvisionalConsent.ts +218 -0
@@ -0,0 +1,101 @@
1
+ import {describe, expect, it} from "bun:test";
2
+ import {DateTime} from "luxon";
3
+
4
+ import {
5
+ formatRelativeSecurityTime,
6
+ formatSecurityDate,
7
+ getProviderDisplay,
8
+ getRejectionMessage,
9
+ hasPasswordCredential,
10
+ } from "./securityMethods";
11
+
12
+ describe("securityMethods", () => {
13
+ it("hasPasswordCredential finds the credential account", () => {
14
+ expect(
15
+ hasPasswordCredential([
16
+ {id: "acc-google", providerId: "google"},
17
+ {id: "acc-credential", providerId: "credential"},
18
+ ])
19
+ ).toBe(true);
20
+ expect(hasPasswordCredential([{id: "acc-google", providerId: "google"}])).toBe(false);
21
+ });
22
+
23
+ it("getProviderDisplay prefers the app label and icon, then brand, then a key", () => {
24
+ expect(getProviderDisplay({providerId: "github"})).toEqual({
25
+ iconName: "github",
26
+ iconType: "brand",
27
+ label: "GitHub",
28
+ });
29
+ expect(
30
+ getProviderDisplay({
31
+ provider: {iconName: "building", id: "okta", label: "Okta"},
32
+ providerId: "okta",
33
+ })
34
+ ).toEqual({iconName: "building", iconType: "solid", label: "Okta"});
35
+ expect(getProviderDisplay({providerId: "mock-oidc"})).toEqual({
36
+ iconName: "key",
37
+ iconType: "solid",
38
+ label: "mock-oidc",
39
+ });
40
+ });
41
+
42
+ it("getProviderDisplay names a provider id that matches an Object.prototype key by its id", () => {
43
+ for (const providerId of ["__proto__", "constructor"]) {
44
+ expect(getProviderDisplay({providerId})).toEqual({
45
+ iconName: "key",
46
+ iconType: "solid",
47
+ label: providerId,
48
+ });
49
+ }
50
+ });
51
+
52
+ it("formatSecurityDate formats ISO dates and ignores missing or invalid ones", () => {
53
+ const iso = "2026-03-03T12:00:00.000Z";
54
+ // Expectations come from Luxon so they follow the runner's locale and time zone.
55
+ expect(formatSecurityDate(iso)).toBe(DateTime.fromISO(iso).toLocaleString(DateTime.DATE_MED));
56
+ expect(formatSecurityDate(new Date(iso))).toBe(
57
+ DateTime.fromISO(iso).toLocaleString(DateTime.DATE_MED)
58
+ );
59
+ expect(formatSecurityDate(new Date("nope"))).toBeUndefined();
60
+ expect(formatSecurityDate(undefined)).toBeUndefined();
61
+ expect(formatSecurityDate("nope")).toBeUndefined();
62
+ });
63
+
64
+ it("getRejectionMessage reads Error and {message} rejections, else falls back", () => {
65
+ expect(getRejectionMessage({error: new Error("Bad"), fallback: "x"})).toBe("Bad");
66
+ expect(getRejectionMessage({error: {message: "Better Auth said no"}, fallback: "x"})).toBe(
67
+ "Better Auth said no"
68
+ );
69
+ expect(getRejectionMessage({error: "string", fallback: "Fallback"})).toBe("Fallback");
70
+ expect(getRejectionMessage({error: {message: 3}, fallback: "Fallback"})).toBe("Fallback");
71
+ });
72
+
73
+ it("formatRelativeSecurityTime is relative to the injected now", () => {
74
+ const now = new Date("2026-03-03T12:00:00.000Z");
75
+ const base = DateTime.fromJSDate(now);
76
+ const fiveMinutesAgo = "2026-03-03T11:55:00.000Z";
77
+ expect(formatRelativeSecurityTime({now, value: fiveMinutesAgo})).toBe(
78
+ DateTime.fromISO(fiveMinutesAgo).toRelative({base}) ?? ""
79
+ );
80
+ const twoDaysAgo = new Date("2026-03-01T12:00:00.000Z");
81
+ expect(formatRelativeSecurityTime({now, value: twoDaysAgo})).toBe(
82
+ DateTime.fromJSDate(twoDaysAgo).toRelative({base}) ?? ""
83
+ );
84
+ });
85
+
86
+ it("formatRelativeSecurityTime says just now within a minute and for future times", () => {
87
+ const now = new Date("2026-03-03T12:00:00.000Z");
88
+ expect(formatRelativeSecurityTime({now, value: "2026-03-03T11:59:30.000Z"})).toBe("just now");
89
+ expect(formatRelativeSecurityTime({now, value: "2026-03-03T12:05:00.000Z"})).toBe("just now");
90
+ });
91
+
92
+ it("formatRelativeSecurityTime returns undefined for a missing or invalid value", () => {
93
+ expect(formatRelativeSecurityTime({value: undefined})).toBeUndefined();
94
+ expect(formatRelativeSecurityTime({value: "not-a-date"})).toBeUndefined();
95
+ });
96
+
97
+ it("formatRelativeSecurityTime defaults now to the current time", () => {
98
+ const value = DateTime.now().minus({hours: 3});
99
+ expect(formatRelativeSecurityTime({value: value.toJSDate()})).toBe(value.toRelative() ?? "");
100
+ });
101
+ });
@@ -0,0 +1,104 @@
1
+ import {DateTime} from "luxon";
2
+
3
+ import type {IconName} from "../Common";
4
+ import {getSocialProviderName} from "../SocialLoginButton";
5
+ import type {LinkableProvider, LinkedAccount} from "./securityTypes";
6
+
7
+ /** Better Auth's `providerId` for an email and password account. */
8
+ export const CREDENTIAL_PROVIDER_ID = "credential";
9
+
10
+ /** Providers whose FontAwesome brand icon shares their id. */
11
+ const BRAND_ICON_PROVIDERS = new Set(["apple", "github", "google"]);
12
+
13
+ /** How a provider row names and draws a provider. */
14
+ export interface ProviderDisplay {
15
+ /** Display name, e.g. "GitHub". */
16
+ label: string;
17
+ /** FontAwesome icon name. */
18
+ iconName: IconName;
19
+ /** FontAwesome icon style: `brand` for branded providers. */
20
+ iconType: "brand" | "solid";
21
+ }
22
+
23
+ /** Whether the user has a password, i.e. a `"credential"` account. */
24
+ export const hasPasswordCredential = (accounts: LinkedAccount[]): boolean => {
25
+ return accounts.some((account) => account.providerId === CREDENTIAL_PROVIDER_ID);
26
+ };
27
+
28
+ /** Names and picks an icon for a provider, preferring the app's own label and icon. */
29
+ export const getProviderDisplay = ({
30
+ providerId,
31
+ provider,
32
+ }: {
33
+ providerId: string;
34
+ provider?: LinkableProvider;
35
+ }): ProviderDisplay => {
36
+ const label = provider?.label ?? getSocialProviderName(providerId) ?? providerId;
37
+ if (provider?.iconName) {
38
+ return {iconName: provider.iconName, iconType: "solid", label};
39
+ }
40
+ if (BRAND_ICON_PROVIDERS.has(providerId)) {
41
+ return {iconName: providerId as IconName, iconType: "brand", label};
42
+ }
43
+ return {iconName: "key", iconType: "solid", label};
44
+ };
45
+
46
+ /** Parses a `Date` or ISO string with Luxon, or undefined when missing or invalid. */
47
+ const toSecurityDateTime = (value?: string | Date): DateTime | undefined => {
48
+ if (!value) {
49
+ return undefined;
50
+ }
51
+ const date = value instanceof Date ? DateTime.fromJSDate(value) : DateTime.fromISO(value);
52
+ return date.isValid ? date : undefined;
53
+ };
54
+
55
+ /**
56
+ * Formats a `Date` or ISO string as a short local date ("Mar 3, 2026"), or undefined when missing
57
+ * or invalid.
58
+ */
59
+ export const formatSecurityDate = (value?: string | Date): string | undefined => {
60
+ return toSecurityDateTime(value)?.toLocaleString(DateTime.DATE_MED);
61
+ };
62
+
63
+ /**
64
+ * Formats a `Date` or ISO string relative to `now` ("5 minutes ago"), or undefined when missing or
65
+ * invalid. Anything under a minute old, or in the future (clock skew between client and server),
66
+ * reads "just now". Pass `now` to make the output deterministic.
67
+ */
68
+ export const formatRelativeSecurityTime = ({
69
+ value,
70
+ now,
71
+ }: {
72
+ value?: string | Date;
73
+ now?: Date;
74
+ }): string | undefined => {
75
+ const date = toSecurityDateTime(value);
76
+ if (!date) {
77
+ return undefined;
78
+ }
79
+ const base = now ? DateTime.fromJSDate(now) : DateTime.now();
80
+ if (base.diff(date, "seconds").seconds < 60) {
81
+ return "just now";
82
+ }
83
+ return date.toRelative({base}) ?? undefined;
84
+ };
85
+
86
+ /** The message of a rejected callback, or a fallback for non-Error rejections. */
87
+ export const getRejectionMessage = ({
88
+ error,
89
+ fallback,
90
+ }: {
91
+ error: unknown;
92
+ fallback: string;
93
+ }): string => {
94
+ if (error instanceof Error && error.message) {
95
+ return error.message;
96
+ }
97
+ if (typeof error === "object" && error !== null && "message" in error) {
98
+ const {message} = error as {message?: unknown};
99
+ if (typeof message === "string" && message) {
100
+ return message;
101
+ }
102
+ }
103
+ return fallback;
104
+ };
@@ -0,0 +1,480 @@
1
+ import type {ReactNode} from "react";
2
+
3
+ import type {IconName} from "../Common";
4
+
5
+ /**
6
+ * A sign-in account linked to the user, built from a Better Auth `listAccounts` entry. A password
7
+ * is an account too, with `providerId` `"credential"`. Better Auth returns no email per account,
8
+ * so `email` comes from elsewhere (the session user, or a per-account info call) when shown.
9
+ */
10
+ export interface LinkedAccount {
11
+ /**
12
+ * Better Auth's own account row id (`listAccounts()[i].id`). This is what `unlinkAccount`
13
+ * takes as `accountId`; it also keys the card's rows.
14
+ */
15
+ id: string;
16
+ /** Provider id: `"google"`, `"github"`, `"apple"`, a generic provider id, or `"credential"`. */
17
+ providerId: string;
18
+ /** The account's id at the provider (Better Auth's `accountId`). Display only. */
19
+ accountId?: string;
20
+ /** Email address on the provider account, when known. */
21
+ email?: string;
22
+ /**
23
+ * When the account was linked: Better Auth's `createdAt`, as a `Date` (the Better Auth client
24
+ * parses dates) or an ISO 8601 string.
25
+ */
26
+ linkedAt?: string | Date;
27
+ }
28
+
29
+ /** A provider the app lets users link: a branded provider or a generic OAuth/OIDC provider. */
30
+ export interface LinkableProvider {
31
+ /** Provider id, matching `LinkedAccount.providerId` and the id passed to `linkSocial`. */
32
+ id: string;
33
+ /** Display name. Defaults to the branded name ("Google", "GitHub", "Apple") or the id. */
34
+ label?: string;
35
+ /** FontAwesome icon. Branded providers default to their brand icon; others to a key. */
36
+ iconName?: IconName;
37
+ }
38
+
39
+ /**
40
+ * Props for the LinkedAccountsCard component.
41
+ */
42
+ export interface LinkedAccountsCardProps {
43
+ /**
44
+ * Every account linked to the user, including the `"credential"` password account. The
45
+ * password is not listed as a row (PasswordCard covers it) but counts as a sign-in method.
46
+ */
47
+ accounts: LinkedAccount[];
48
+ /**
49
+ * Providers the app offers. Each renders a row, linked or not. A linked account whose
50
+ * provider is not in this list still renders as a linked row after them.
51
+ */
52
+ providers: LinkableProvider[];
53
+ /**
54
+ * Called when Link is pressed. The row shows a spinner until the returned promise settles. A
55
+ * rejection shows its message as the card error.
56
+ */
57
+ onLink?: (providerId: string) => void | Promise<void>;
58
+ /**
59
+ * Called after the user confirms Unlink, with the row's account. Pass `account.id` to Better
60
+ * Auth's `unlinkAccount({accountId})`, and throw when it resolves an `error` (the client
61
+ * resolves `{data, error}` instead of rejecting). The row shows a spinner until the returned promise
62
+ * settles. A rejection shows its message as the card error.
63
+ */
64
+ onUnlink?: (providerId: string, account: LinkedAccount) => void | Promise<void>;
65
+ /**
66
+ * Sign-in methods that are not accounts, such as passkeys. They count toward the last-method
67
+ * rule, so a user with a passkey can unlink their only provider. Better Auth itself refuses to
68
+ * unlink a user's last account unless `account.accountLinking.allowUnlinkingAll` is set, so
69
+ * pass 0 unless the server allows unlinking every account.
70
+ * @default 0
71
+ */
72
+ otherMethodCount?: number;
73
+ /**
74
+ * Allows unlinking the only remaining sign-in method. Leave false unless the app has another
75
+ * way back in (for example, a verified email for password reset).
76
+ * @default false
77
+ */
78
+ canUnlinkLast?: boolean;
79
+ /** Error text shown with `role="alert"`, for example from a failed link redirect. */
80
+ error?: string;
81
+ /** Disables every row, for example while accounts load. */
82
+ disabled?: boolean;
83
+ /**
84
+ * Heading text.
85
+ * @default "Linked accounts"
86
+ */
87
+ title?: string;
88
+ /**
89
+ * Text under the heading.
90
+ * @default "Sign in with any account linked here."
91
+ */
92
+ description?: string;
93
+ /**
94
+ * Root testID; child testIDs are derived from it.
95
+ * @default "linked-accounts-card"
96
+ */
97
+ testID?: string;
98
+ }
99
+
100
+ /** Whether a PasswordCard submission changes an existing password or sets a first one. */
101
+ export type PasswordCardMode = "change" | "set";
102
+
103
+ /** What {@link PasswordCardProps.onSubmit} receives. */
104
+ export interface PasswordCardSubmission {
105
+ /** `change` when the user has a password, `set` for an OAuth-only user. */
106
+ mode: PasswordCardMode;
107
+ /** The current password. Present only in `change` mode. */
108
+ currentPassword?: string;
109
+ /** The new password, already checked against `minLength` and the confirmation. */
110
+ newPassword: string;
111
+ /** True when the user checked "Sign out of other devices". Always false in `set` mode. */
112
+ revokeOtherSessions: boolean;
113
+ }
114
+
115
+ /**
116
+ * Props for the PasswordCard component.
117
+ */
118
+ export interface PasswordCardProps {
119
+ /**
120
+ * Whether the user has a password (a `"credential"` account). True shows "Change password";
121
+ * false shows "Set a password".
122
+ */
123
+ hasPassword: boolean;
124
+ /**
125
+ * Called with valid values. Resolve to show the success message and clear the form; reject to
126
+ * show the error's message under the form.
127
+ */
128
+ onSubmit: (values: PasswordCardSubmission) => Promise<void>;
129
+ /**
130
+ * Shows the "Sign out of other devices" checkbox in change mode.
131
+ * @default true
132
+ */
133
+ showRevokeOtherSessions?: boolean;
134
+ /**
135
+ * Minimum new-password length. Better Auth's default is 8.
136
+ * @default 8
137
+ */
138
+ minLength?: number;
139
+ /** Error text shown with `role="alert"`, for example a wrong current password. */
140
+ error?: string;
141
+ /** Disables the form and shows a spinner on the submit button. */
142
+ loading?: boolean;
143
+ /**
144
+ * The signed-in user's email or username. On web it goes in a hidden `autocomplete="username"`
145
+ * field so password managers update that account's saved password.
146
+ */
147
+ username?: string;
148
+ /**
149
+ * Root testID; child testIDs are derived from it.
150
+ * @default "password-card"
151
+ */
152
+ testID?: string;
153
+ }
154
+
155
+ /**
156
+ * A passkey registered to the user. The shape is a subset of `@better-auth/passkey`'s `Passkey`,
157
+ * so `authClient.passkey.listUserPasskeys()` data can be passed as is.
158
+ */
159
+ export interface AccountPasskey {
160
+ /** Better Auth's passkey id: what `deletePasskey({id})` and `updatePasskey({id, name})` take. */
161
+ id: string;
162
+ /** The user's label for the passkey. Takes precedence over `authenticatorName`. */
163
+ name?: string;
164
+ /**
165
+ * A fallback label for an unnamed passkey, such as the authenticator model a connected screen
166
+ * looks up with `getAuthenticatorName(aaguid)` from `@better-auth/passkey` ("iCloud Keychain").
167
+ * With neither `name` nor this, the row shows "Unnamed passkey".
168
+ */
169
+ authenticatorName?: string;
170
+ /** When the passkey was added, as a `Date` (the Better Auth client parses dates) or ISO string. */
171
+ createdAt?: string | Date;
172
+ /**
173
+ * When the passkey was last used to sign in. Better Auth does not store this; pass it when the
174
+ * app tracks it.
175
+ */
176
+ lastUsedAt?: string | Date;
177
+ /** Whether the credential is backed up (synced) by its provider, such as iCloud Keychain. */
178
+ backedUp?: boolean;
179
+ }
180
+
181
+ /**
182
+ * Props for the PasskeysCard component.
183
+ */
184
+ export interface PasskeysCardProps {
185
+ /** The user's passkeys, one row each, keyed by `id`. */
186
+ passkeys: AccountPasskey[];
187
+ /**
188
+ * Called when the user confirms the Add dialog, with the name they typed (trimmed), or
189
+ * undefined when they left it blank. Pass it to `authClient.passkey.addPasskey({name})`. The
190
+ * Add button shows a spinner until the returned promise settles. A rejection (for example, the
191
+ * user cancelling the browser prompt) shows its message as the card error. The Better Auth
192
+ * client resolves `{data, error}` instead of rejecting, so throw when `error` is set; the same
193
+ * applies to every callback below.
194
+ */
195
+ onAdd?: (name?: string) => void | Promise<void>;
196
+ /**
197
+ * Called when the user saves a new name in the Rename dialog, with the trimmed name. Pass it to
198
+ * `authClient.passkey.updatePasskey({id, name})`. Same spinner and error handling as `onAdd`.
199
+ */
200
+ onRename?: (id: string, name: string) => void | Promise<void>;
201
+ /**
202
+ * Called after the user confirms Remove, with the row's passkey. Pass `passkey.id` to
203
+ * `authClient.passkey.deletePasskey({id})`. Same spinner and error handling as `onAdd`.
204
+ */
205
+ onRemove?: (passkey: AccountPasskey) => void | Promise<void>;
206
+ /**
207
+ * Whether this device and browser can create passkeys (for example, WebAuthn is available).
208
+ * False hides Add and explains why; existing passkeys can still be renamed and removed.
209
+ * @default true
210
+ */
211
+ supported?: boolean;
212
+ /** Error text shown with `role="alert"`; overrides a rejection message. */
213
+ error?: string;
214
+ /** Disables every button, for example while passkeys load. */
215
+ disabled?: boolean;
216
+ /**
217
+ * Heading text.
218
+ * @default "Passkeys"
219
+ */
220
+ title?: string;
221
+ /**
222
+ * Text under the heading.
223
+ * @default "Sign in with your fingerprint, face, or screen lock instead of a password."
224
+ */
225
+ description?: string;
226
+ /**
227
+ * Root testID; child testIDs are derived from it.
228
+ * @default "passkeys-card"
229
+ */
230
+ testID?: string;
231
+ }
232
+
233
+ /**
234
+ * A signed-in session. The shape is a subset of Better Auth's session, so `listSessions()` data
235
+ * can be passed as is.
236
+ */
237
+ export interface AccountSession {
238
+ /** Better Auth's session id. Keys the row. */
239
+ id: string;
240
+ /** The session token: what `revokeSession({token})` takes. */
241
+ token?: string;
242
+ /** The user agent that created the session. The row shows the browser and OS parsed from it. */
243
+ userAgent?: string | null;
244
+ /** The IP address that created the session. */
245
+ ipAddress?: string | null;
246
+ /** A place name for the session ("Denver, US"), when the app looks one up. */
247
+ location?: string;
248
+ /** When the session signed in, as a `Date` or ISO string: the row's "Signed in" time. */
249
+ createdAt?: string | Date;
250
+ /**
251
+ * When the session was last refreshed: the row's "Last refreshed" time. Better Auth moves it
252
+ * only once per `session.updateAge` (a day by default), so it is not a live activity time.
253
+ */
254
+ updatedAt?: string | Date;
255
+ /** When the session expires. */
256
+ expiresAt?: string | Date;
257
+ }
258
+
259
+ /**
260
+ * Props for the SessionsCard component.
261
+ */
262
+ export interface SessionsCardProps {
263
+ /** The user's active sessions, one row each, keyed by `id`. The current session is listed first. */
264
+ sessions: AccountSession[];
265
+ /**
266
+ * The current session's id (`useSession().data.session.id`). The matching row is marked "This
267
+ * device" and cannot be revoked on its own. Pass this or `currentSessionToken`.
268
+ */
269
+ currentSessionId?: string;
270
+ /** The current session's token, matched against each session's `token`. */
271
+ currentSessionToken?: string;
272
+ /**
273
+ * Called when the user signs out another session, with that session. Pass `session.token` to
274
+ * `authClient.revokeSession({token})` and throw when it resolves an `error` (the Better Auth
275
+ * client resolves `{data, error}` instead of rejecting). Not offered for the current session. The row shows a
276
+ * spinner until the returned promise settles; a rejection shows its message as the card error.
277
+ */
278
+ onRevoke?: (session: AccountSession) => void | Promise<void>;
279
+ /**
280
+ * Called after the user confirms "Sign out everywhere else". Call
281
+ * `authClient.revokeOtherSessions()` and throw when it resolves an `error`. Disabled when there
282
+ * are no other sessions.
283
+ */
284
+ onRevokeOthers?: () => void | Promise<void>;
285
+ /**
286
+ * The time relative times ("Signed in 5 minutes ago") are measured from. When omitted, the card
287
+ * uses the current time and recomputes it every minute; pass it to make the output
288
+ * deterministic (tests, screenshots).
289
+ */
290
+ now?: Date;
291
+ /** Error text shown with `role="alert"`; overrides a rejection message. */
292
+ error?: string;
293
+ /** Disables every button, for example while sessions load. */
294
+ disabled?: boolean;
295
+ /**
296
+ * Heading text.
297
+ * @default "Where you're signed in"
298
+ */
299
+ title?: string;
300
+ /**
301
+ * Text under the heading.
302
+ * @default "Sign out of any device you don't recognize."
303
+ */
304
+ description?: string;
305
+ /**
306
+ * Root testID; child testIDs are derived from it.
307
+ * @default "sessions-card"
308
+ */
309
+ testID?: string;
310
+ }
311
+
312
+ /**
313
+ * What {@link TwoFactorSettingsCardProps.onStartEnroll} resolves: the TOTP branch of Better
314
+ * Auth's `twoFactor.enable()` data. `enable()` resolves `{method: "otp"}` or
315
+ * `{method: "totp", totpURI, backupCodes}`, so narrow it with `"totpURI" in data` first.
316
+ */
317
+ export interface TwoFactorEnrollment {
318
+ /**
319
+ * The `otpauth://totp/...` URI the authenticator app scans. The card draws it as a QR code and
320
+ * shows its `secret` parameter for manual entry.
321
+ */
322
+ totpURI: string;
323
+ /** The single-use backup codes generated with the secret. */
324
+ backupCodes: string[];
325
+ }
326
+
327
+ /**
328
+ * Props for the TwoFactorSettingsCard component.
329
+ */
330
+ export interface TwoFactorSettingsCardProps {
331
+ /**
332
+ * Whether two-factor authentication is on (Better Auth's `user.twoFactorEnabled`). False offers
333
+ * "Turn on"; true offers new backup codes and "Turn off". An enrollment or new-codes flow in
334
+ * progress keeps showing until the user finishes it, even after this flips.
335
+ */
336
+ enabled: boolean;
337
+ /**
338
+ * How many unused backup codes the user has left. Shown when given, with a warning below 3.
339
+ * Better Auth does not report this on the session; pass it when the app knows it.
340
+ */
341
+ backupCodesRemaining?: number;
342
+ /**
343
+ * Called after the password step (or at once when `requirePassword` is false) to start
344
+ * enrollment. Call `authClient.twoFactor.enable({password})`; throw when it resolves an `error`
345
+ * (the Better Auth client resolves `{data, error}` instead of rejecting) or data without a
346
+ * `totpURI` (the `{method: "otp"}` branch), else return `{totpURI, backupCodes}` from it.
347
+ * The same applies to every callback below. A rejection shows its message on the step.
348
+ */
349
+ onStartEnroll: (password?: string) => Promise<TwoFactorEnrollment>;
350
+ /**
351
+ * Called with the code the user typed from their authenticator app. Call
352
+ * `authClient.twoFactor.verifyTotp({code})`, which turns two-factor on once it succeeds. A
353
+ * rejection clears the code and shows its message.
354
+ */
355
+ onVerify: (code: string) => Promise<void>;
356
+ /**
357
+ * Called after the password step to replace the backup codes. Call
358
+ * `authClient.twoFactor.generateBackupCodes({password})` and return `data.backupCodes`. Hidden
359
+ * when not passed.
360
+ */
361
+ onRegenerateBackupCodes?: (password?: string) => Promise<string[]>;
362
+ /**
363
+ * Called after the password step and a destructive confirm. Call
364
+ * `authClient.twoFactor.disable({password})`. Hidden when not passed.
365
+ */
366
+ onDisable?: (password?: string) => Promise<void>;
367
+ /**
368
+ * Asks for the password before enrolling, replacing backup codes, and turning off. Better Auth
369
+ * requires it unless its two-factor plugin sets `allowPasswordless` (Terreno's `twoFactor`
370
+ * config does not), and even then for users who have a password; with `allowPasswordless`,
371
+ * pass `requirePassword={hasPassword}`. When false, callbacks get `undefined`.
372
+ * @default true
373
+ */
374
+ requirePassword?: boolean;
375
+ /**
376
+ * Whether the user has a password (a `"credential"` account; see `hasPasswordCredential`).
377
+ * With `requirePassword`, a user without one can't confirm, so Turn on, Get new backup codes
378
+ * and Turn off are disabled and the card asks them to set a password first.
379
+ * @default true
380
+ */
381
+ hasPassword?: boolean;
382
+ /**
383
+ * Digits in an authenticator code: Better Auth's `totpOptions.digits`. Defaults to the
384
+ * `digits` parameter of the enrollment's `totpURI`, else 6.
385
+ */
386
+ digits?: number;
387
+ /** Error text shown with `role="alert"`; overrides a rejection message. */
388
+ error?: string;
389
+ /**
390
+ * Disables Turn on, Get new backup codes, Turn off and the password step, for example while
391
+ * the user loads.
392
+ */
393
+ disabled?: boolean;
394
+ /**
395
+ * The signed-in user's email or username. On web it goes in a hidden `autocomplete="username"`
396
+ * field next to the password step so password managers fill the right account's password.
397
+ */
398
+ username?: string;
399
+ /**
400
+ * Heading text.
401
+ * @default "Two-factor authentication"
402
+ */
403
+ title?: string;
404
+ /**
405
+ * Text under the heading.
406
+ * @default "Sign in with a code from an authenticator app as well as your password."
407
+ */
408
+ description?: string;
409
+ /**
410
+ * Root testID; child testIDs are derived from it.
411
+ * @default "two-factor-settings-card"
412
+ */
413
+ testID?: string;
414
+ }
415
+
416
+ /**
417
+ * Props for the AccountSecurityScreen component. Each card renders only when its props are given,
418
+ * so leave out the props of a feature the app has turned off (for example, `passkeys` when the
419
+ * server has no passkey plugin) and its card disappears.
420
+ */
421
+ export interface AccountSecurityScreenProps {
422
+ /**
423
+ * Props for the LinkedAccountsCard, shown first under "Sign-in methods". Omit to hide the card.
424
+ */
425
+ linkedAccounts?: LinkedAccountsCardProps;
426
+ /** Props for the PasswordCard, shown after linked accounts. Omit to hide the card. */
427
+ password?: PasswordCardProps;
428
+ /** Props for the PasskeysCard. Omit to hide the card, for example when passkeys are off. */
429
+ passkeys?: PasskeysCardProps;
430
+ /** Props for the TwoFactorSettingsCard. Omit to hide the card, for example when 2FA is off. */
431
+ twoFactor?: TwoFactorSettingsCardProps;
432
+ /** Props for the SessionsCard, shown last. Omit to hide the card. */
433
+ sessions?: SessionsCardProps;
434
+ /**
435
+ * Page heading.
436
+ * @default "Security"
437
+ */
438
+ title?: string;
439
+ /** Text under the heading. */
440
+ description?: string;
441
+ /**
442
+ * Content under the heading and description and above the cards, such as the signed-in
443
+ * user's name and email or a notice. Shown in every state.
444
+ */
445
+ header?: ReactNode;
446
+ /**
447
+ * Extra content after the cards, such as an app-specific card. Hidden with the cards while
448
+ * loading or showing `error`.
449
+ */
450
+ children?: ReactNode;
451
+ /**
452
+ * Shows a spinner instead of the cards, for example while the session, accounts, passkeys and
453
+ * sessions load. Takes precedence over `error`, so a retry in flight shows as loading.
454
+ */
455
+ isLoading?: boolean;
456
+ /**
457
+ * A page-level error, for example when the data the cards need failed to load. Shown with
458
+ * `role="alert"` instead of the cards. Errors from a card's own action belong in that card's
459
+ * `error` prop.
460
+ */
461
+ error?: string;
462
+ /** Called by the Try again button under `error`. Without it the button is hidden. */
463
+ onRetry?: () => void;
464
+ /**
465
+ * Wraps the screen in a scrolling ui `Page`. Pass false when the screen sits inside your own
466
+ * `Page`, `ScrollView` or tab layout, so scroll views do not nest.
467
+ * @default true
468
+ */
469
+ withPage?: boolean;
470
+ /**
471
+ * The widest the content grows, in pixels. Cards stack in one column at any width.
472
+ * @default 720
473
+ */
474
+ maxWidth?: number;
475
+ /**
476
+ * Root testID; child testIDs are derived from it.
477
+ * @default "account-security-screen"
478
+ */
479
+ testID?: string;
480
+ }