@terreno/ui 57.19.2 → 57.21.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 (379) hide show
  1. package/.ai/guidelines/core.md +1 -1
  2. package/CHANGELOG.md +443 -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 +175 -34
  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 +11 -9
  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/HeightField.js +8 -8
  39. package/dist/HeightField.js.map +1 -1
  40. package/dist/Icon.d.ts +4 -0
  41. package/dist/Icon.d.ts.map +1 -1
  42. package/dist/Icon.js +43 -2
  43. package/dist/Icon.js.map +1 -1
  44. package/dist/LabeledCheckBox.d.ts +22 -0
  45. package/dist/LabeledCheckBox.d.ts.map +1 -0
  46. package/dist/LabeledCheckBox.js +30 -0
  47. package/dist/LabeledCheckBox.js.map +1 -0
  48. package/dist/ListDetailLayout.d.ts +36 -0
  49. package/dist/ListDetailLayout.d.ts.map +1 -0
  50. package/dist/ListDetailLayout.js +153 -0
  51. package/dist/ListDetailLayout.js.map +1 -0
  52. package/dist/MarkdownEditor.d.ts.map +1 -1
  53. package/dist/MarkdownEditor.js +2 -1
  54. package/dist/MarkdownEditor.js.map +1 -1
  55. package/dist/MediaQuery.d.ts +1 -1
  56. package/dist/MediaQuery.d.ts.map +1 -1
  57. package/dist/MediaQuery.js +1 -1
  58. package/dist/MediaQuery.js.map +1 -1
  59. package/dist/OtpField.d.ts +60 -0
  60. package/dist/OtpField.d.ts.map +1 -0
  61. package/dist/OtpField.js +154 -0
  62. package/dist/OtpField.js.map +1 -0
  63. package/dist/PickerSelect.js +9 -9
  64. package/dist/PickerSelect.js.map +1 -1
  65. package/dist/ProvisionalConsentSigner.d.ts +21 -0
  66. package/dist/ProvisionalConsentSigner.d.ts.map +1 -0
  67. package/dist/ProvisionalConsentSigner.js +199 -0
  68. package/dist/ProvisionalConsentSigner.js.map +1 -0
  69. package/dist/ResponsiveBreakpoint.d.ts +5 -0
  70. package/dist/ResponsiveBreakpoint.d.ts.map +1 -1
  71. package/dist/ResponsiveBreakpoint.js +7 -0
  72. package/dist/ResponsiveBreakpoint.js.map +1 -1
  73. package/dist/SocialLoginButton.d.ts +10 -0
  74. package/dist/SocialLoginButton.d.ts.map +1 -1
  75. package/dist/SocialLoginButton.js +26 -8
  76. package/dist/SocialLoginButton.js.map +1 -1
  77. package/dist/SplitPage.d.ts +11 -0
  78. package/dist/SplitPage.d.ts.map +1 -1
  79. package/dist/SplitPage.js +11 -5
  80. package/dist/SplitPage.js.map +1 -1
  81. package/dist/SplitPage.native.d.ts.map +1 -1
  82. package/dist/SplitPage.native.js +3 -1
  83. package/dist/SplitPage.native.js.map +1 -1
  84. package/dist/SyncStatusBanner.d.ts +7 -1
  85. package/dist/SyncStatusBanner.d.ts.map +1 -1
  86. package/dist/SyncStatusBanner.js +20 -4
  87. package/dist/SyncStatusBanner.js.map +1 -1
  88. package/dist/TapToEdit.d.ts +1 -1
  89. package/dist/TapToEdit.d.ts.map +1 -1
  90. package/dist/TapToEdit.js.map +1 -1
  91. package/dist/TextField.d.ts.map +1 -1
  92. package/dist/TextField.js +48 -14
  93. package/dist/TextField.js.map +1 -1
  94. package/dist/Theme.d.ts.map +1 -1
  95. package/dist/Theme.js +16 -0
  96. package/dist/Theme.js.map +1 -1
  97. package/dist/fieldElements/FieldError.d.ts.map +1 -1
  98. package/dist/fieldElements/FieldError.js +1 -1
  99. package/dist/fieldElements/FieldError.js.map +1 -1
  100. package/dist/index.d.ts +19 -3
  101. package/dist/index.d.ts.map +1 -1
  102. package/dist/index.js +14 -1
  103. package/dist/index.js.map +1 -1
  104. package/dist/lazyBoundaries/heavyOptionalExports.d.ts +3 -0
  105. package/dist/lazyBoundaries/heavyOptionalExports.d.ts.map +1 -1
  106. package/dist/lazyBoundaries/heavyOptionalExports.js +2 -0
  107. package/dist/lazyBoundaries/heavyOptionalExports.js.map +1 -1
  108. package/dist/login/LastUsedBadge.d.ts +14 -0
  109. package/dist/login/LastUsedBadge.d.ts.map +1 -0
  110. package/dist/login/LastUsedBadge.js +23 -0
  111. package/dist/login/LastUsedBadge.js.map +1 -0
  112. package/dist/login/LoginAccountCard.d.ts +38 -0
  113. package/dist/login/LoginAccountCard.d.ts.map +1 -0
  114. package/dist/login/LoginAccountCard.js +72 -0
  115. package/dist/login/LoginAccountCard.js.map +1 -0
  116. package/dist/login/LoginAccountList.d.ts +33 -0
  117. package/dist/login/LoginAccountList.d.ts.map +1 -0
  118. package/dist/login/LoginAccountList.js +30 -0
  119. package/dist/login/LoginAccountList.js.map +1 -0
  120. package/dist/login/LoginScreen.d.ts +4 -4
  121. package/dist/login/LoginScreen.d.ts.map +1 -1
  122. package/dist/login/LoginScreen.js +294 -13
  123. package/dist/login/LoginScreen.js.map +1 -1
  124. package/dist/login/OutlinePill.d.ts +28 -0
  125. package/dist/login/OutlinePill.d.ts.map +1 -0
  126. package/dist/login/OutlinePill.js +48 -0
  127. package/dist/login/OutlinePill.js.map +1 -0
  128. package/dist/login/TwoFactorChallengeScreen.d.ts +26 -0
  129. package/dist/login/TwoFactorChallengeScreen.d.ts.map +1 -0
  130. package/dist/login/TwoFactorChallengeScreen.js +139 -0
  131. package/dist/login/TwoFactorChallengeScreen.js.map +1 -0
  132. package/dist/login/loginMethods.d.ts +27 -0
  133. package/dist/login/loginMethods.d.ts.map +1 -0
  134. package/dist/login/loginMethods.js +37 -0
  135. package/dist/login/loginMethods.js.map +1 -0
  136. package/dist/login/loginTypes.d.ts +202 -5
  137. package/dist/login/loginTypes.d.ts.map +1 -1
  138. package/dist/pdfHtmlTemplate.d.ts +17 -0
  139. package/dist/pdfHtmlTemplate.d.ts.map +1 -1
  140. package/dist/pdfHtmlTemplate.js +78 -0
  141. package/dist/pdfHtmlTemplate.js.map +1 -1
  142. package/dist/security/AccountSecurityScreen.d.ts +10 -0
  143. package/dist/security/AccountSecurityScreen.d.ts.map +1 -0
  144. package/dist/security/AccountSecurityScreen.js +50 -0
  145. package/dist/security/AccountSecurityScreen.js.map +1 -0
  146. package/dist/security/LinkedAccountsCard.d.ts +32 -0
  147. package/dist/security/LinkedAccountsCard.d.ts.map +1 -0
  148. package/dist/security/LinkedAccountsCard.js +145 -0
  149. package/dist/security/LinkedAccountsCard.js.map +1 -0
  150. package/dist/security/PasskeysCard.d.ts +39 -0
  151. package/dist/security/PasskeysCard.d.ts.map +1 -0
  152. package/dist/security/PasskeysCard.js +168 -0
  153. package/dist/security/PasskeysCard.js.map +1 -0
  154. package/dist/security/PasswordCard.d.ts +32 -0
  155. package/dist/security/PasswordCard.d.ts.map +1 -0
  156. package/dist/security/PasswordCard.js +198 -0
  157. package/dist/security/PasswordCard.js.map +1 -0
  158. package/dist/security/SessionsCard.d.ts +39 -0
  159. package/dist/security/SessionsCard.d.ts.map +1 -0
  160. package/dist/security/SessionsCard.js +168 -0
  161. package/dist/security/SessionsCard.js.map +1 -0
  162. package/dist/security/TwoFactorSettingsCard.d.ts +55 -0
  163. package/dist/security/TwoFactorSettingsCard.d.ts.map +1 -0
  164. package/dist/security/TwoFactorSettingsCard.js +458 -0
  165. package/dist/security/TwoFactorSettingsCard.js.map +1 -0
  166. package/dist/security/securityMethods.d.ts +40 -0
  167. package/dist/security/securityMethods.d.ts.map +1 -0
  168. package/dist/security/securityMethods.js +66 -0
  169. package/dist/security/securityMethods.js.map +1 -0
  170. package/dist/security/securityTypes.d.ts +467 -0
  171. package/dist/security/securityTypes.d.ts.map +1 -0
  172. package/dist/security/securityTypes.js +2 -0
  173. package/dist/security/securityTypes.js.map +1 -0
  174. package/dist/security/userAgent.d.ts +26 -0
  175. package/dist/security/userAgent.d.ts.map +1 -0
  176. package/dist/security/userAgent.js +80 -0
  177. package/dist/security/userAgent.js.map +1 -0
  178. package/dist/signUp/OAuthButtons.d.ts +28 -5
  179. package/dist/signUp/OAuthButtons.d.ts.map +1 -1
  180. package/dist/signUp/OAuthButtons.js +44 -5
  181. package/dist/signUp/OAuthButtons.js.map +1 -1
  182. package/dist/signUp/SignUpScreen.d.ts.map +1 -1
  183. package/dist/signUp/SignUpScreen.js +50 -5
  184. package/dist/signUp/SignUpScreen.js.map +1 -1
  185. package/dist/signUp/signUpTypes.d.ts +21 -1
  186. package/dist/signUp/signUpTypes.d.ts.map +1 -1
  187. package/dist/useConsentForms.d.ts +9 -0
  188. package/dist/useConsentForms.d.ts.map +1 -1
  189. package/dist/useConsentForms.js +18 -0
  190. package/dist/useConsentForms.js.map +1 -1
  191. package/dist/useProvisionalConsent.d.ts +124 -0
  192. package/dist/useProvisionalConsent.d.ts.map +1 -0
  193. package/dist/useProvisionalConsent.js +79 -0
  194. package/dist/useProvisionalConsent.js.map +1 -0
  195. package/package.json +5 -2
  196. package/src/Accordion.test.tsx +5 -0
  197. package/src/Accordion.tsx +3 -8
  198. package/src/ActionSheet.test.tsx +13 -13
  199. package/src/AddressField.test.tsx +9 -3
  200. package/src/AnnouncementNavigator.test.tsx +4 -4
  201. package/src/AreaChart.test.tsx +15 -0
  202. package/src/Avatar.test.tsx +8 -0
  203. package/src/Avatar.tsx +2 -0
  204. package/src/Badge.test.tsx +1 -1
  205. package/src/Banner.test.tsx +0 -1
  206. package/src/BarChart.test.tsx +15 -0
  207. package/src/Box.test.tsx +143 -75
  208. package/src/Box.tsx +44 -2
  209. package/src/Button.test.tsx +11 -6
  210. package/src/Card.test.tsx +2 -2
  211. package/src/Card.tsx +2 -2
  212. package/src/Common.ts +194 -36
  213. package/src/ConflictSheet.test.tsx +5 -5
  214. package/src/ConsentFormScreen.test.tsx +87 -1
  215. package/src/ConsentFormScreen.tsx +28 -4
  216. package/src/ConsentNavigator.test.tsx +1 -2
  217. package/src/CustomSelectField.test.tsx +16 -4
  218. package/src/DataTable.test.tsx +4 -4
  219. package/src/DataTableVirtualizationRegression.test.tsx +1 -0
  220. package/src/DateTimeActionSheet.test.tsx +2 -0
  221. package/src/DateTimeField.test.tsx +3 -12
  222. package/src/DateTimeField.tsx +11 -9
  223. package/src/DismissButton.test.tsx +22 -4
  224. package/src/DonutChart.test.tsx +15 -0
  225. package/src/EmailField.test.tsx +13 -22
  226. package/src/EmojiSelector.test.tsx +2 -2
  227. package/src/ErrorBoundary.test.tsx +5 -3
  228. package/src/Field.test.tsx +20 -44
  229. package/src/Field.tsx +2 -0
  230. package/src/FilePickerButton.test.tsx +35 -0
  231. package/src/FormContainer.test.tsx +242 -0
  232. package/src/FormContainer.tsx +177 -0
  233. package/src/GPTChat.test.tsx +40 -16
  234. package/src/GPTChat.tsx +8 -2
  235. package/src/Heading.test.tsx +15 -1
  236. package/src/Heading.tsx +6 -1
  237. package/src/HeightField.tsx +8 -8
  238. package/src/Icon.test.tsx +54 -3
  239. package/src/Icon.tsx +92 -3
  240. package/src/IconButton.test.tsx +85 -0
  241. package/src/Image.test.tsx +1 -1
  242. package/src/LabeledCheckBox.test.tsx +45 -0
  243. package/src/LabeledCheckBox.tsx +89 -0
  244. package/src/Link.test.tsx +11 -4
  245. package/src/ListDetailLayout.tsx +247 -0
  246. package/src/MarkdownEditor.tsx +2 -1
  247. package/src/MarkdownView.test.tsx +1 -1
  248. package/src/MediaQuery.ts +1 -0
  249. package/src/MobileAddressAutoComplete.test.tsx +2 -1
  250. package/src/Modal.test.tsx +7 -2
  251. package/src/ModalSheet.test.tsx +5 -4
  252. package/src/MultiselectField.test.tsx +17 -3
  253. package/src/NumberField.test.tsx +14 -14
  254. package/src/NumberPickerActionSheet.test.tsx +1 -1
  255. package/src/OpenAPIContext.test.tsx +4 -4
  256. package/src/OpenAPIRenderRegression.test.tsx +1 -1
  257. package/src/OtpField.test.tsx +280 -0
  258. package/src/OtpField.tsx +307 -0
  259. package/src/P0RenderRegression.test.tsx +7 -1
  260. package/src/P1RenderRegression.test.tsx +1 -0
  261. package/src/P2ButtonRenderRegression.test.tsx +1 -0
  262. package/src/Page.test.tsx +1 -1
  263. package/src/PhoneNumberField.test.tsx +14 -38
  264. package/src/PickerSelect.tsx +9 -9
  265. package/src/Popover.test.tsx +2 -2
  266. package/src/ProvisionalConsentSigner.test.tsx +625 -0
  267. package/src/ProvisionalConsentSigner.tsx +423 -0
  268. package/src/RadioField.test.tsx +7 -2
  269. package/src/ResponsiveBreakpoint.test.tsx +7 -0
  270. package/src/ResponsiveBreakpoint.tsx +14 -0
  271. package/src/RootImportRegression.test.tsx +3 -0
  272. package/src/SegmentedControl.test.tsx +21 -12
  273. package/src/SidebarNavigation.test.tsx +18 -6
  274. package/src/Signature.test.tsx +20 -23
  275. package/src/Slider.test.tsx +1 -1
  276. package/src/SocialLoginButton.test.tsx +14 -0
  277. package/src/SocialLoginButton.tsx +51 -7
  278. package/src/SplitPage.native.tsx +3 -1
  279. package/src/SplitPage.test.tsx +15 -5
  280. package/src/SplitPage.tsx +11 -5
  281. package/src/SyncStatusBanner.test.tsx +61 -4
  282. package/src/SyncStatusBanner.tsx +29 -3
  283. package/src/TapToEdit.test.tsx +38 -15
  284. package/src/TapToEdit.tsx +1 -1
  285. package/src/TerrenoFontProvider.test.tsx +1 -1
  286. package/src/Text.test.tsx +4 -4
  287. package/src/TextField.test.tsx +232 -9
  288. package/src/TextField.tsx +70 -12
  289. package/src/Theme.test.tsx +49 -0
  290. package/src/Theme.tsx +16 -0
  291. package/src/Toast.test.tsx +5 -5
  292. package/src/ToastNotifications.test.tsx +73 -70
  293. package/src/ToastNotifications.webModal.test.tsx +2 -2
  294. package/src/Tooltip.test.tsx +3 -3
  295. package/src/UnifiedAddressAutoComplete.test.tsx +1 -1
  296. package/src/UserInactivity.test.tsx +4 -2
  297. package/src/WebAddressAutocomplete.test.tsx +12 -12
  298. package/src/WebDropdownMenu.test.tsx +16 -15
  299. package/src/__snapshots__/AddressField.test.tsx.snap +12 -0
  300. package/src/__snapshots__/AiSuggestionBox.test.tsx.snap +15 -0
  301. package/src/__snapshots__/Avatar.test.tsx.snap +1 -0
  302. package/src/__snapshots__/Card.test.tsx.snap +1 -1
  303. package/src/__snapshots__/CustomSelectField.test.tsx.snap +3 -0
  304. package/src/__snapshots__/DismissButton.test.tsx.snap +3 -3
  305. package/src/__snapshots__/EmailField.test.tsx.snap +6 -0
  306. package/src/__snapshots__/Field.test.tsx.snap +41 -2
  307. package/src/__snapshots__/Heading.test.tsx.snap +1 -1
  308. package/src/__snapshots__/HeightField.test.tsx.snap +2 -0
  309. package/src/__snapshots__/Image.test.tsx.snap +1 -1
  310. package/src/__snapshots__/MobileAddressAutoComplete.test.tsx.snap +3 -0
  311. package/src/__snapshots__/NumberField.test.tsx.snap +3 -0
  312. package/src/__snapshots__/Page.test.tsx.snap +2 -2
  313. package/src/__snapshots__/PhoneNumberField.test.tsx.snap +12 -0
  314. package/src/__snapshots__/Slider.test.tsx.snap +1 -0
  315. package/src/__snapshots__/SocialLoginButton.test.tsx.snap +43 -22
  316. package/src/__snapshots__/TapToEdit.test.tsx.snap +3 -0
  317. package/src/__snapshots__/Text.test.tsx.snap +1 -1
  318. package/src/__snapshots__/TextArea.test.tsx.snap +17 -1
  319. package/src/__snapshots__/TextField.test.tsx.snap +19 -2
  320. package/src/__snapshots__/TypedSignatureField.test.tsx.snap +3 -0
  321. package/src/__snapshots__/UnifiedAddressAutoComplete.test.tsx.snap +18 -0
  322. package/src/__snapshots__/WebAddressAutocomplete.test.tsx.snap +12 -0
  323. package/src/asks/AskCard.test.tsx +16 -13
  324. package/src/asks/AskFiles.test.tsx +5 -1
  325. package/src/asks/askFileRefs.test.ts +1 -1
  326. package/src/asks/askSummary.test.ts +2 -2
  327. package/src/benchmarks/importTiming.ts +1 -1
  328. package/src/blocks/BlocksView.test.tsx +20 -11
  329. package/src/bunSetup.ts +14 -2
  330. package/src/dataTableFilters.test.tsx +1 -1
  331. package/src/fieldElements/FieldError.tsx +1 -0
  332. package/src/fieldElements/__snapshots__/FieldError.test.tsx.snap +2 -0
  333. package/src/index.tsx +42 -1
  334. package/src/isolated/ListDetailLayout.isolated.tsx +632 -0
  335. package/src/lazyBoundaries/heavyOptionalExports.tsx +7 -0
  336. package/src/login/LastUsedBadge.tsx +40 -0
  337. package/src/login/LoginAccountCard.tsx +205 -0
  338. package/src/login/LoginAccountList.tsx +115 -0
  339. package/src/login/LoginScreen.test.tsx +839 -3
  340. package/src/login/LoginScreen.tsx +674 -91
  341. package/src/login/OutlinePill.tsx +110 -0
  342. package/src/login/TwoFactorChallengeScreen.test.tsx +376 -0
  343. package/src/login/TwoFactorChallengeScreen.tsx +307 -0
  344. package/src/login/__snapshots__/LoginScreen.test.tsx.snap +1454 -334
  345. package/src/login/loginMethods.test.ts +53 -0
  346. package/src/login/loginMethods.ts +60 -0
  347. package/src/login/loginTypes.ts +208 -5
  348. package/src/pdfHtmlTemplate.test.ts +243 -4
  349. package/src/pdfHtmlTemplate.ts +93 -0
  350. package/src/security/AccountSecurityScreen.test.tsx +262 -0
  351. package/src/security/AccountSecurityScreen.tsx +156 -0
  352. package/src/security/LinkedAccountsCard.test.tsx +371 -0
  353. package/src/security/LinkedAccountsCard.tsx +297 -0
  354. package/src/security/PasskeysCard.test.tsx +378 -0
  355. package/src/security/PasskeysCard.tsx +371 -0
  356. package/src/security/PasswordCard.test.tsx +445 -0
  357. package/src/security/PasswordCard.tsx +342 -0
  358. package/src/security/SessionsCard.test.tsx +349 -0
  359. package/src/security/SessionsCard.tsx +362 -0
  360. package/src/security/TwoFactorSettingsCard.test.tsx +700 -0
  361. package/src/security/TwoFactorSettingsCard.tsx +872 -0
  362. package/src/security/securityMethods.test.ts +101 -0
  363. package/src/security/securityMethods.ts +104 -0
  364. package/src/security/securityTypes.ts +480 -0
  365. package/src/security/userAgent.test.ts +119 -0
  366. package/src/security/userAgent.ts +102 -0
  367. package/src/signUp/OAuthButtons.test.tsx +27 -0
  368. package/src/signUp/OAuthButtons.tsx +153 -19
  369. package/src/signUp/SignUpScreen.test.tsx +171 -2
  370. package/src/signUp/SignUpScreen.tsx +87 -25
  371. package/src/signUp/__snapshots__/SignUpScreen.test.tsx.snap +22 -11
  372. package/src/signUp/signUpTypes.ts +23 -1
  373. package/src/table/tableContext.test.tsx +5 -5
  374. package/src/test-utils.tsx +56 -1
  375. package/src/testing/reactDomServer.d.ts +7 -0
  376. package/src/useConsentForms.test.ts +38 -2
  377. package/src/useConsentForms.ts +25 -0
  378. package/src/useProvisionalConsent.test.ts +256 -0
  379. package/src/useProvisionalConsent.ts +218 -0
@@ -1,9 +1,10 @@
1
1
  import {afterEach, describe, expect, it, mock} from "bun:test";
2
2
  import {act, fireEvent} from "@testing-library/react-native";
3
3
  import {View} from "react-native";
4
+ import type {ReactTestInstance} from "react-test-renderer";
4
5
 
5
6
  import {Signature} from "./Signature";
6
- import {renderWithTheme} from "./test-utils";
7
+ import {findAllByHostType, findByHostType, renderWithTheme} from "./test-utils";
7
8
 
8
9
  const createMockContext = (): Record<string, ReturnType<typeof mock>> => ({
9
10
  beginPath: mock(() => {}),
@@ -14,14 +15,10 @@ const createMockContext = (): Record<string, ReturnType<typeof mock>> => ({
14
15
  });
15
16
 
16
17
  const patchCanvasRefs = (
17
- container: {
18
- findAll: (
19
- predicate: (node: {type: string}) => boolean
20
- ) => Array<{props: Record<string, unknown>}>;
21
- },
18
+ container: ReactTestInstance,
22
19
  ctx: Record<string, ReturnType<typeof mock>>
23
20
  ): HTMLCanvasElement => {
24
- const canvasNodes = container.findAll((node: {type: string}) => node.type === "canvas");
21
+ const canvasNodes = findAllByHostType(container, "canvas");
25
22
  const canvasNode = canvasNodes[0];
26
23
  const canvas = {
27
24
  getContext: mock(() => ctx),
@@ -65,8 +62,8 @@ describe("Signature", () => {
65
62
 
66
63
  it("scales the web canvas to the available container width", () => {
67
64
  const mockOnChange = mock(() => {});
68
- const {UNSAFE_getByType} = renderWithTheme(<Signature onChange={mockOnChange} />);
69
- const canvas = UNSAFE_getByType("canvas");
65
+ const {UNSAFE_root} = renderWithTheme(<Signature onChange={mockOnChange} />);
66
+ const canvas = findByHostType(UNSAFE_root, "canvas");
70
67
  expect(canvas.props.style).toMatchObject({maxWidth: "100%", width: "100%"});
71
68
  });
72
69
 
@@ -81,8 +78,8 @@ describe("Signature", () => {
81
78
  const mockOnChange = mock(() => {});
82
79
  const moveTo = mock(() => {});
83
80
  const lineTo = mock(() => {});
84
- const {UNSAFE_getByType} = renderWithTheme(<Signature onChange={mockOnChange} />);
85
- const canvas = UNSAFE_getByType("canvas");
81
+ const {UNSAFE_root} = renderWithTheme(<Signature onChange={mockOnChange} />);
82
+ const canvas = findByHostType(UNSAFE_root, "canvas");
86
83
  canvas.props.ref.current = {
87
84
  clientHeight: 180,
88
85
  clientWidth: 150,
@@ -131,7 +128,7 @@ describe("Signature", () => {
131
128
 
132
129
  patchCanvasRefs(UNSAFE_root, ctx);
133
130
 
134
- const canvasNodes = UNSAFE_root.findAll((node: {type: string}) => node.type === "canvas");
131
+ const canvasNodes = findAllByHostType(UNSAFE_root, "canvas");
135
132
  const canvasProps = canvasNodes[0].props as Record<string, (...args: unknown[]) => void>;
136
133
 
137
134
  act(() => {
@@ -153,7 +150,7 @@ describe("Signature", () => {
153
150
 
154
151
  patchCanvasRefs(UNSAFE_root, ctx);
155
152
 
156
- const canvasNodes = UNSAFE_root.findAll((node: {type: string}) => node.type === "canvas");
153
+ const canvasNodes = findAllByHostType(UNSAFE_root, "canvas");
157
154
  const canvasProps = canvasNodes[0].props as Record<string, (...args: unknown[]) => void>;
158
155
 
159
156
  act(() => {
@@ -181,7 +178,7 @@ describe("Signature", () => {
181
178
 
182
179
  patchCanvasRefs(UNSAFE_root, ctx);
183
180
 
184
- const canvasNodes = UNSAFE_root.findAll((node: {type: string}) => node.type === "canvas");
181
+ const canvasNodes = findAllByHostType(UNSAFE_root, "canvas");
185
182
  const canvasProps = canvasNodes[0].props as Record<string, (...args: unknown[]) => void>;
186
183
 
187
184
  act(() => {
@@ -202,7 +199,7 @@ describe("Signature", () => {
202
199
 
203
200
  const canvas = patchCanvasRefs(UNSAFE_root, ctx);
204
201
 
205
- const canvasNodes = UNSAFE_root.findAll((node: {type: string}) => node.type === "canvas");
202
+ const canvasNodes = findAllByHostType(UNSAFE_root, "canvas");
206
203
  const canvasProps = canvasNodes[0].props as Record<string, (...args: unknown[]) => void>;
207
204
 
208
205
  // Start drawing
@@ -243,7 +240,7 @@ describe("Signature", () => {
243
240
 
244
241
  patchCanvasRefs(UNSAFE_root, ctx);
245
242
 
246
- const canvasNodes = UNSAFE_root.findAll((node: {type: string}) => node.type === "canvas");
243
+ const canvasNodes = findAllByHostType(UNSAFE_root, "canvas");
247
244
  const canvasProps = canvasNodes[0].props as Record<string, (...args: unknown[]) => void>;
248
245
 
249
246
  // pointerDown without any move (no drawing)
@@ -273,7 +270,7 @@ describe("Signature", () => {
273
270
 
274
271
  patchCanvasRefs(UNSAFE_root, ctx);
275
272
 
276
- const canvasNodes = UNSAFE_root.findAll((node: {type: string}) => node.type === "canvas");
273
+ const canvasNodes = findAllByHostType(UNSAFE_root, "canvas");
277
274
  const canvasProps = canvasNodes[0].props as Record<string, (...args: unknown[]) => void>;
278
275
 
279
276
  act(() => {
@@ -295,7 +292,7 @@ describe("Signature", () => {
295
292
 
296
293
  patchCanvasRefs(UNSAFE_root, ctx);
297
294
 
298
- const canvasNodes = UNSAFE_root.findAll((node: {type: string}) => node.type === "canvas");
295
+ const canvasNodes = findAllByHostType(UNSAFE_root, "canvas");
299
296
  const canvasProps = canvasNodes[0].props as Record<string, (...args: unknown[]) => void>;
300
297
 
301
298
  // Draw something
@@ -331,7 +328,7 @@ describe("Signature", () => {
331
328
 
332
329
  patchCanvasRefs(UNSAFE_root, ctx);
333
330
 
334
- const canvasNodes = UNSAFE_root.findAll((node: {type: string}) => node.type === "canvas");
331
+ const canvasNodes = findAllByHostType(UNSAFE_root, "canvas");
335
332
  const canvasProps = canvasNodes[0].props as Record<string, (...args: unknown[]) => void>;
336
333
 
337
334
  // Draw
@@ -366,10 +363,10 @@ describe("Signature", () => {
366
363
  it("ignores pointer down when the canvas ref is missing", () => {
367
364
  const mockOnChange = mock(() => {});
368
365
  const mockOnStart = mock(() => {});
369
- const {UNSAFE_getByType} = renderWithTheme(
366
+ const {UNSAFE_root} = renderWithTheme(
370
367
  <Signature onChange={mockOnChange} onStart={mockOnStart} />
371
368
  );
372
- const canvas = UNSAFE_getByType("canvas");
369
+ const canvas = findByHostType(UNSAFE_root, "canvas");
373
370
  canvas.props.ref.current = null;
374
371
 
375
372
  act(() => {
@@ -385,8 +382,8 @@ describe("Signature", () => {
385
382
  it("falls back to raw offsets when the canvas has no measurable size", () => {
386
383
  const mockOnChange = mock(() => {});
387
384
  const moveTo = mock(() => {});
388
- const {UNSAFE_getByType} = renderWithTheme(<Signature onChange={mockOnChange} />);
389
- const canvas = UNSAFE_getByType("canvas");
385
+ const {UNSAFE_root} = renderWithTheme(<Signature onChange={mockOnChange} />);
386
+ const canvas = findByHostType(UNSAFE_root, "canvas");
390
387
  canvas.props.ref.current = {
391
388
  clientHeight: 0,
392
389
  clientWidth: 0,
@@ -272,7 +272,7 @@ describe("Slider", () => {
272
272
  const {getByText} = renderWithTheme(
273
273
  <Slider
274
274
  labels={{
275
- custom: [{label: "Middle", value: 50}],
275
+ custom: [{index: 0.5, label: "Middle"}],
276
276
  max: "High",
277
277
  min: "Low",
278
278
  }}
@@ -98,6 +98,20 @@ describe("SocialLoginButton", () => {
98
98
  expect(button.props.disabled).toBe(true);
99
99
  });
100
100
 
101
+ it("follows later changes to the loading prop", () => {
102
+ const onPress = createMockOnPress();
103
+ const {getByTestId, rerender} = renderWithTheme(
104
+ <SocialLoginButton onPress={onPress} provider="google" />
105
+ );
106
+ expect(getByTestId("social-login-google").props.disabled).toBeFalsy();
107
+
108
+ rerender(<SocialLoginButton loading onPress={onPress} provider="google" />);
109
+ expect(getByTestId("social-login-google").props.disabled).toBe(true);
110
+
111
+ rerender(<SocialLoginButton loading={false} onPress={onPress} provider="google" />);
112
+ expect(getByTestId("social-login-google").props.disabled).toBeFalsy();
113
+ });
114
+
101
115
  it("uses correct testID", () => {
102
116
  const onPress = createMockOnPress();
103
117
  const {getByTestId} = renderWithTheme(
@@ -5,6 +5,7 @@ import {ActivityIndicator, Pressable, Text, View} from "react-native";
5
5
 
6
6
  import {Box} from "./Box";
7
7
  import type {SocialLoginButtonProps} from "./Common";
8
+ import {OutlinePill} from "./login/OutlinePill";
8
9
  import {useTheme} from "./Theme";
9
10
  import {Unifier} from "./Unifier";
10
11
 
@@ -39,14 +40,26 @@ const PROVIDER_ICONS: Record<string, string> = {
39
40
  };
40
41
 
41
42
  /**
42
- * Display names for social providers
43
+ * Display names for the branded social providers.
43
44
  */
44
- const PROVIDER_NAMES: Record<string, string> = {
45
+ export const SOCIAL_PROVIDER_NAMES: Record<string, string> = {
45
46
  apple: "Apple",
46
47
  github: "GitHub",
47
48
  google: "Google",
48
49
  };
49
50
 
51
+ /**
52
+ * The display name of a branded provider id, or undefined for any other id. Ids come from the
53
+ * server and from device storage, so an id such as `__proto__` or `constructor` must not read an
54
+ * `Object.prototype` member.
55
+ */
56
+ export const getSocialProviderName = (providerId: string): string | undefined => {
57
+ if (!Object.hasOwn(SOCIAL_PROVIDER_NAMES, providerId)) {
58
+ return undefined;
59
+ }
60
+ return SOCIAL_PROVIDER_NAMES[providerId];
61
+ };
62
+
50
63
  /**
51
64
  * A branded social login button for OAuth authentication.
52
65
  *
@@ -64,6 +77,7 @@ const PROVIDER_NAMES: Record<string, string> = {
64
77
  * ```
65
78
  */
66
79
  export const SocialLoginButton: FC<SocialLoginButtonProps> = ({
80
+ accessibilityLabel,
67
81
  provider,
68
82
  onPress,
69
83
  loading: propsLoading,
@@ -72,8 +86,13 @@ export const SocialLoginButton: FC<SocialLoginButtonProps> = ({
72
86
  fullWidth = true,
73
87
  text,
74
88
  testID,
89
+ lastUsedLabel,
90
+ lastUsedTestID,
75
91
  }) => {
76
- const [loading, setLoading] = useState(propsLoading);
92
+ // Pressing tracks the button's own onPress; the parent's `loading` prop is read on every render
93
+ // so a parent can start or clear the spinner after mount.
94
+ const [isPressing, setIsPressing] = useState(false);
95
+ const loading = isPressing || propsLoading;
77
96
  const {theme} = useTheme();
78
97
  const resolvedTestID = testID ?? `social-login-${provider}`;
79
98
 
@@ -96,7 +115,7 @@ export const SocialLoginButton: FC<SocialLoginButtonProps> = ({
96
115
  }, [provider, variant, theme]);
97
116
 
98
117
  const iconName = PROVIDER_ICONS[provider];
99
- const providerName = PROVIDER_NAMES[provider];
118
+ const providerName = SOCIAL_PROVIDER_NAMES[provider];
100
119
  const buttonText = text ?? `Continue with ${providerName}`;
101
120
 
102
121
  const handlePress = useMemo(
@@ -104,14 +123,14 @@ export const SocialLoginButton: FC<SocialLoginButtonProps> = ({
104
123
  debounce(
105
124
  async () => {
106
125
  await Unifier.utils.haptic();
107
- setLoading(true);
126
+ setIsPressing(true);
108
127
 
109
128
  try {
110
129
  await onPress();
111
130
  } catch (error) {
112
131
  console.error(`Social login error (${provider}):`, error);
113
132
  } finally {
114
- setLoading(false);
133
+ setIsPressing(false);
115
134
  }
116
135
  },
117
136
  500,
@@ -126,10 +145,35 @@ export const SocialLoginButton: FC<SocialLoginButtonProps> = ({
126
145
 
127
146
  const isDisabled = disabled || loading;
128
147
 
148
+ if (variant === "outline") {
149
+ return (
150
+ <OutlinePill
151
+ accessibilityLabel={accessibilityLabel ?? buttonText}
152
+ disabled={disabled}
153
+ icon={
154
+ iconName ? (
155
+ <FontAwesome6
156
+ brand
157
+ color={isDisabled ? theme.text.secondaryLight : theme.text.primary}
158
+ name={iconName}
159
+ size={18}
160
+ />
161
+ ) : undefined
162
+ }
163
+ lastUsedLabel={lastUsedLabel}
164
+ lastUsedTestID={lastUsedTestID}
165
+ loading={loading}
166
+ onPress={handlePress}
167
+ testID={resolvedTestID}
168
+ text={buttonText}
169
+ />
170
+ );
171
+ }
172
+
129
173
  return (
130
174
  <Pressable
131
175
  accessibilityHint={`Sign in with ${providerName}`}
132
- aria-label={buttonText}
176
+ aria-label={accessibilityLabel ?? buttonText}
133
177
  aria-role="button"
134
178
  disabled={isDisabled}
135
179
  onPress={handlePress}
@@ -1,4 +1,6 @@
1
- // TODO: Update SplitPage native to have desktop UX for tablet sized screens
1
+ // Native SplitPage stays a stacked list/detail at every mobile breakpoint, including tablet `lg`.
2
+ // Prefer `ListDetailLayout` for new list/detail screens: it keeps the selected item in the route
3
+ // and splits into two panes when the layout is wide enough.
2
4
  import {useCallback, useEffect, useState} from "react";
3
5
  import flattenChildren from "react-keyed-flatten-children";
4
6
  import {Dimensions, type ListRenderItemInfo, View} from "react-native";
@@ -1,7 +1,15 @@
1
1
  import {afterAll, afterEach, beforeEach, describe, expect, it, mock, spyOn} from "bun:test";
2
2
  import {act, fireEvent} from "@testing-library/react-native";
3
3
  import {forwardRef, type ReactElement, type ReactNode, type Ref, useImperativeHandle} from "react";
4
- import {type ScaledSize, ScrollView, StyleSheet, useWindowDimensions, View} from "react-native";
4
+ import {
5
+ type ScaledSize,
6
+ ScrollView,
7
+ type StyleProp,
8
+ StyleSheet,
9
+ useWindowDimensions,
10
+ View,
11
+ type ViewStyle,
12
+ } from "react-native";
5
13
  import type {ReactTestInstance} from "react-test-renderer";
6
14
 
7
15
  import {getRounding, getSpacing} from "./Common";
@@ -53,11 +61,13 @@ const setWindowWidth = (width: number): (() => void) => {
53
61
  };
54
62
  };
55
63
 
56
- const styleWidth = (style: unknown): unknown => StyleSheet.flatten(style)?.width;
64
+ const styleWidth = (style: StyleProp<ViewStyle>): ViewStyle["width"] =>
65
+ StyleSheet.flatten(style)?.width;
57
66
 
58
- const styleBorderRadius = (style: unknown): unknown => StyleSheet.flatten(style)?.borderRadius;
67
+ const styleBorderRadius = (style: StyleProp<ViewStyle>): ViewStyle["borderRadius"] =>
68
+ StyleSheet.flatten(style)?.borderRadius;
59
69
 
60
- const flattenedStyle = (style: unknown): ReturnType<typeof StyleSheet.flatten> => {
70
+ const flattenedStyle = (style: StyleProp<ViewStyle>): ViewStyle => {
61
71
  return StyleSheet.flatten(style) ?? {};
62
72
  };
63
73
 
@@ -1102,7 +1112,7 @@ describe("SplitPage", () => {
1102
1112
  const expectClippingPane = (
1103
1113
  pane: ReactTestInstance,
1104
1114
  borderRadius: number,
1105
- width: number | string
1115
+ width: ViewStyle["width"]
1106
1116
  ): void => {
1107
1117
  const style = flattenedStyle(pane.props.style);
1108
1118
  expect(style.borderRadius).toBe(borderRadius);
package/src/SplitPage.tsx CHANGED
@@ -77,11 +77,17 @@ const renderDesktopChildColumn = ({
77
77
  );
78
78
  };
79
79
 
80
- // A component for rendering a list on one side and a details view on the right for large screens,
81
- // and a scrollable list where clicking an item takes you the details view.
82
- // On web, opt in to minimum widths for the desktop side-by-side children, or a labeled pager
83
- // on the narrow viewport. `narrowBelowWidth` chooses that viewport from the window width;
84
- // otherwise it follows `isNarrowViewport()`. The native SplitPage ignores those props.
80
+ /**
81
+ * A component for rendering a list on one side and a details view on the right for large screens,
82
+ * and a scrollable list where clicking an item takes you the details view.
83
+ * On web, opt in to minimum widths for the desktop side-by-side children, or a labeled pager
84
+ * on the narrow viewport. `narrowBelowWidth` chooses that viewport from the window width;
85
+ * otherwise it follows `isNarrowViewport()`. The native SplitPage ignores those props.
86
+ *
87
+ * Prefer `ListDetailLayout` for new list/detail screens. It keeps the selected item in the
88
+ * route, so deep links and back navigation work, and splits on native tablets too. SplitPage
89
+ * remains supported for list/detail views that do not have their own routes.
90
+ */
85
91
  export const SplitPage = <TItem extends SplitPageListItem = SplitPageListItem>({
86
92
  children,
87
93
  tabs = [],
@@ -1,18 +1,75 @@
1
- import {describe, expect, it, mock} from "bun:test";
2
- import {fireEvent} from "@testing-library/react-native";
1
+ import {describe, expect, it, jest, mock} from "bun:test";
2
+ import {act, fireEvent} from "@testing-library/react-native";
3
3
 
4
4
  import {SyncStatusBanner} from "./SyncStatusBanner";
5
5
  import {renderWithTheme} from "./test-utils";
6
6
 
7
7
  describe("SyncStatusBanner", () => {
8
- it("renders the offline indicator when offline", () => {
8
+ it("renders the offline indicator immediately when the grace period is 0", () => {
9
9
  const {getByTestId, queryByTestId} = renderWithTheme(
10
- <SyncStatusBanner conflictCount={0} isOnline={false} isSyncing={false} queuedCount={0} />
10
+ <SyncStatusBanner
11
+ conflictCount={0}
12
+ isOnline={false}
13
+ isSyncing={false}
14
+ offlineGraceMs={0}
15
+ queuedCount={0}
16
+ />
11
17
  );
12
18
  expect(getByTestId("sync-offline-indicator")).toBeTruthy();
13
19
  expect(queryByTestId("sync-syncing-indicator")).toBeNull();
14
20
  });
15
21
 
22
+ it("waits out the grace period before showing the offline indicator", () => {
23
+ jest.useFakeTimers();
24
+ try {
25
+ const {queryByTestId} = renderWithTheme(
26
+ <SyncStatusBanner conflictCount={0} isOnline={false} queuedCount={0} />
27
+ );
28
+ expect(queryByTestId("sync-offline-indicator")).toBeNull();
29
+ act(() => {
30
+ jest.advanceTimersByTime(2999);
31
+ });
32
+ expect(queryByTestId("sync-offline-indicator")).toBeNull();
33
+ act(() => {
34
+ jest.advanceTimersByTime(1);
35
+ });
36
+ expect(queryByTestId("sync-offline-indicator")).toBeTruthy();
37
+ } finally {
38
+ jest.useRealTimers();
39
+ }
40
+ });
41
+
42
+ it("does not flash offline for a drop shorter than the grace period", () => {
43
+ jest.useFakeTimers();
44
+ try {
45
+ const view = renderWithTheme(
46
+ <SyncStatusBanner conflictCount={0} isOnline={true} queuedCount={0} />
47
+ );
48
+ view.rerender(<SyncStatusBanner conflictCount={0} isOnline={false} queuedCount={0} />);
49
+ act(() => {
50
+ jest.advanceTimersByTime(1000);
51
+ });
52
+ view.rerender(<SyncStatusBanner conflictCount={0} isOnline={true} queuedCount={0} />);
53
+ act(() => {
54
+ jest.advanceTimersByTime(5000);
55
+ });
56
+ expect(view.queryByTestId("sync-offline-indicator")).toBeNull();
57
+ } finally {
58
+ jest.useRealTimers();
59
+ }
60
+ });
61
+
62
+ it("hides the offline indicator as soon as connectivity returns", () => {
63
+ const view = renderWithTheme(
64
+ <SyncStatusBanner conflictCount={0} isOnline={false} offlineGraceMs={0} queuedCount={0} />
65
+ );
66
+ expect(view.queryByTestId("sync-offline-indicator")).toBeTruthy();
67
+ view.rerender(
68
+ <SyncStatusBanner conflictCount={0} isOnline={true} offlineGraceMs={0} queuedCount={0} />
69
+ );
70
+ expect(view.queryByTestId("sync-offline-indicator")).toBeNull();
71
+ });
72
+
16
73
  it("hides the offline indicator when online", () => {
17
74
  const {getByTestId, queryByTestId} = renderWithTheme(
18
75
  <SyncStatusBanner conflictCount={0} isOnline={true} isSyncing={false} queuedCount={0} />
@@ -1,5 +1,5 @@
1
1
  import type React from "react";
2
- import {useCallback} from "react";
2
+ import {useCallback, useEffect, useState} from "react";
3
3
 
4
4
  import {Badge} from "./Badge";
5
5
  import {Box} from "./Box";
@@ -7,9 +7,18 @@ import {Box} from "./Box";
7
7
  /** Queued count above which the banner switches to a numeric drain-progress display. */
8
8
  const PROGRESS_THRESHOLD = 20;
9
9
 
10
+ /** Default time connectivity must stay lost before the offline badge appears. */
11
+ const DEFAULT_OFFLINE_GRACE_MS = 3000;
12
+
10
13
  export interface SyncStatusBannerProps {
11
14
  /** Whether the client currently has connectivity. */
12
15
  isOnline: boolean;
16
+ /**
17
+ * How long (ms) `isOnline` must stay false before the offline badge shows. Absorbs the
18
+ * not-yet-connected window at startup and sub-second socket blips so the badge does not
19
+ * flash. Going back online hides it immediately. Defaults to 3000; pass 0 to show at once.
20
+ */
21
+ offlineGraceMs?: number;
13
22
  /** Number of mutations waiting in the durable outbox. */
14
23
  queuedCount: number;
15
24
  /**
@@ -45,7 +54,7 @@ export interface SyncStatusBannerProps {
45
54
 
46
55
  /**
47
56
  * Compact, presentational sync-state banner for local-first (e.g. @terreno/syncdb) screens:
48
- * offline indicator, queued mutation count (with drain progress once the queue grows past
57
+ * offline indicator (shown only after a short grace period), queued mutation count (with drain progress once the queue grows past
49
58
  * {@link PROGRESS_THRESHOLD}), a paused-for-auth indicator, a pressable failed count, and a
50
59
  * pressable conflict badge. Initial bootstrap "Syncing…" is intentionally not shown here —
51
60
  * apps should surface that as a one-shot toast on launch (see SyncHealthToast). It is
@@ -54,6 +63,7 @@ export interface SyncStatusBannerProps {
54
63
  */
55
64
  export const SyncStatusBanner: React.FC<SyncStatusBannerProps> = ({
56
65
  isOnline,
66
+ offlineGraceMs = DEFAULT_OFFLINE_GRACE_MS,
57
67
  queuedCount,
58
68
  isSyncing: _isSyncing,
59
69
  conflictCount,
@@ -67,6 +77,22 @@ export const SyncStatusBanner: React.FC<SyncStatusBannerProps> = ({
67
77
  onOpenFailed,
68
78
  testID = "sync-status-banner",
69
79
  }) => {
80
+ const [isOfflineSettled, setIsOfflineSettled] = useState(!isOnline && offlineGraceMs <= 0);
81
+
82
+ // Only surface "Offline" once connectivity has stayed lost for the grace period.
83
+ useEffect(() => {
84
+ if (isOnline) {
85
+ setIsOfflineSettled(false);
86
+ return;
87
+ }
88
+ if (offlineGraceMs <= 0) {
89
+ setIsOfflineSettled(true);
90
+ return;
91
+ }
92
+ const timer = setTimeout(() => setIsOfflineSettled(true), offlineGraceMs);
93
+ return (): void => clearTimeout(timer);
94
+ }, [isOnline, offlineGraceMs]);
95
+
70
96
  const handleOpenConflicts = useCallback((): void => {
71
97
  onOpenConflicts?.();
72
98
  }, [onOpenConflicts]);
@@ -83,7 +109,7 @@ export const SyncStatusBanner: React.FC<SyncStatusBannerProps> = ({
83
109
 
84
110
  return (
85
111
  <Box direction="row" gap={2} marginBottom={4} minHeight={20} testID={testID} wrap>
86
- {!isOnline && (
112
+ {!isOnline && isOfflineSettled && (
87
113
  <Box alignItems="center" direction="row" gap={1} testID="sync-offline-indicator">
88
114
  <Badge status="error" value="Offline" />
89
115
  </Box>