@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,7 +1,7 @@
1
1
  import {beforeAll, describe, expect, it, mock} from "bun:test";
2
2
  import {act, render, waitFor} from "@testing-library/react-native";
3
3
  import React from "react";
4
- import {Text} from "react-native";
4
+ import {type ScaledSize, Text} from "react-native";
5
5
 
6
6
  import ToastContainer, {
7
7
  GlobalToast,
@@ -18,8 +18,8 @@ beforeAll(() => {
18
18
  global.requestAnimationFrame = (callback: FrameRequestCallback) => {
19
19
  return setTimeout(() => callback(Date.now()), 0) as unknown as number;
20
20
  };
21
- global.cancelAnimationFrame = (id: number) => {
22
- clearTimeout(id);
21
+ global.cancelAnimationFrame = (id: number | null | undefined) => {
22
+ clearTimeout(id ?? undefined);
23
23
  };
24
24
  });
25
25
 
@@ -55,7 +55,7 @@ describe("ToastNotifications", () => {
55
55
 
56
56
  describe("useToastNotifications hook", () => {
57
57
  it("should return toast methods from context", () => {
58
- let toastRef: ToastType | null = null;
58
+ let toastRef = null as ToastType | null;
59
59
 
60
60
  const TestComponent = () => {
61
61
  const toast = useToastNotifications();
@@ -73,7 +73,7 @@ describe("ToastNotifications", () => {
73
73
  });
74
74
 
75
75
  it("should have show method available after mount", async () => {
76
- let toastRef: ToastType | null = null;
76
+ let toastRef = null as ToastType | null;
77
77
 
78
78
  const TestComponent = () => {
79
79
  const toast = useToastNotifications();
@@ -93,7 +93,7 @@ describe("ToastNotifications", () => {
93
93
  });
94
94
 
95
95
  it("should have hide method available after mount", async () => {
96
- let toastRef: ToastType | null = null;
96
+ let toastRef = null as ToastType | null;
97
97
 
98
98
  const TestComponent = () => {
99
99
  const toast = useToastNotifications();
@@ -113,7 +113,7 @@ describe("ToastNotifications", () => {
113
113
  });
114
114
 
115
115
  it("should have hideAll method available after mount", async () => {
116
- let toastRef: ToastType | null = null;
116
+ let toastRef = null as ToastType | null;
117
117
 
118
118
  const TestComponent = () => {
119
119
  const toast = useToastNotifications();
@@ -133,7 +133,7 @@ describe("ToastNotifications", () => {
133
133
  });
134
134
 
135
135
  it("should have update method available after mount", async () => {
136
- let toastRef: ToastType | null = null;
136
+ let toastRef = null as ToastType | null;
137
137
 
138
138
  const TestComponent = () => {
139
139
  const toast = useToastNotifications();
@@ -153,7 +153,7 @@ describe("ToastNotifications", () => {
153
153
  });
154
154
 
155
155
  it("should have isOpen method available after mount", async () => {
156
- let toastRef: ToastType | null = null;
156
+ let toastRef = null as ToastType | null;
157
157
 
158
158
  const TestComponent = () => {
159
159
  const toast = useToastNotifications();
@@ -189,7 +189,7 @@ describe("ToastNotifications", () => {
189
189
 
190
190
  describe("Toast functionality", () => {
191
191
  it("lets clicks pass through the full-width safe area around toasts", async () => {
192
- let toastRef: ToastType | null = null;
192
+ let toastRef = null as ToastType | null;
193
193
 
194
194
  const TestComponent = () => {
195
195
  const toast = useToastNotifications();
@@ -225,7 +225,7 @@ describe("ToastNotifications", () => {
225
225
  });
226
226
 
227
227
  it("should show a toast and return an id", async () => {
228
- let toastRef: ToastType | null = null;
228
+ let toastRef = null as ToastType | null;
229
229
 
230
230
  const TestComponent = () => {
231
231
  const toast = useToastNotifications();
@@ -253,7 +253,7 @@ describe("ToastNotifications", () => {
253
253
  });
254
254
 
255
255
  it("should show a toast with custom id", async () => {
256
- let toastRef: ToastType | null = null;
256
+ let toastRef = null as ToastType | null;
257
257
 
258
258
  const TestComponent = () => {
259
259
  const toast = useToastNotifications();
@@ -280,7 +280,7 @@ describe("ToastNotifications", () => {
280
280
  });
281
281
 
282
282
  it("should have isOpen method that returns false for non-existent toast", async () => {
283
- let toastRef: ToastType | null = null;
283
+ let toastRef = null as ToastType | null;
284
284
 
285
285
  const TestComponent = () => {
286
286
  const toast = useToastNotifications();
@@ -302,7 +302,7 @@ describe("ToastNotifications", () => {
302
302
  });
303
303
 
304
304
  it("should have hide method available", async () => {
305
- let toastRef: ToastType | null = null;
305
+ let toastRef = null as ToastType | null;
306
306
 
307
307
  const TestComponent = () => {
308
308
  const toast = useToastNotifications();
@@ -324,7 +324,7 @@ describe("ToastNotifications", () => {
324
324
  });
325
325
 
326
326
  it("should have hideAll method available", async () => {
327
- let toastRef: ToastType | null = null;
327
+ let toastRef = null as ToastType | null;
328
328
 
329
329
  const TestComponent = () => {
330
330
  const toast = useToastNotifications();
@@ -346,7 +346,7 @@ describe("ToastNotifications", () => {
346
346
  });
347
347
 
348
348
  it("should have update method available", async () => {
349
- let toastRef: ToastType | null = null;
349
+ let toastRef = null as ToastType | null;
350
350
 
351
351
  const TestComponent = () => {
352
352
  const toast = useToastNotifications();
@@ -370,7 +370,7 @@ describe("ToastNotifications", () => {
370
370
 
371
371
  describe("Toast types", () => {
372
372
  it("should show success toast", async () => {
373
- let toastRef: ToastType | null = null;
373
+ let toastRef = null as ToastType | null;
374
374
 
375
375
  const TestComponent = () => {
376
376
  const toast = useToastNotifications();
@@ -397,7 +397,7 @@ describe("ToastNotifications", () => {
397
397
  });
398
398
 
399
399
  it("should show danger toast", async () => {
400
- let toastRef: ToastType | null = null;
400
+ let toastRef = null as ToastType | null;
401
401
 
402
402
  const TestComponent = () => {
403
403
  const toast = useToastNotifications();
@@ -424,7 +424,7 @@ describe("ToastNotifications", () => {
424
424
  });
425
425
 
426
426
  it("should show warning toast", async () => {
427
- let toastRef: ToastType | null = null;
427
+ let toastRef = null as ToastType | null;
428
428
 
429
429
  const TestComponent = () => {
430
430
  const toast = useToastNotifications();
@@ -482,7 +482,7 @@ describe("ToastNotifications", () => {
482
482
 
483
483
  describe("Toast options", () => {
484
484
  it("should accept custom duration", async () => {
485
- let toastRef: ToastType | null = null;
485
+ let toastRef = null as ToastType | null;
486
486
 
487
487
  const TestComponent = () => {
488
488
  const toast = useToastNotifications();
@@ -509,7 +509,7 @@ describe("ToastNotifications", () => {
509
509
  });
510
510
 
511
511
  it("should accept duration of 0 for persistent toast", async () => {
512
- let toastRef: ToastType | null = null;
512
+ let toastRef = null as ToastType | null;
513
513
 
514
514
  const TestComponent = () => {
515
515
  const toast = useToastNotifications();
@@ -536,7 +536,7 @@ describe("ToastNotifications", () => {
536
536
  });
537
537
 
538
538
  it("should call onClose callback when toast is hidden", async () => {
539
- let toastRef: ToastType | null = null;
539
+ let toastRef = null as ToastType | null;
540
540
  const onCloseMock = mock(() => {});
541
541
 
542
542
  const TestComponent = () => {
@@ -565,7 +565,7 @@ describe("ToastNotifications", () => {
565
565
  });
566
566
 
567
567
  it("should accept custom animation duration", async () => {
568
- let toastRef: ToastType | null = null;
568
+ let toastRef = null as ToastType | null;
569
569
 
570
570
  const TestComponent = () => {
571
571
  const toast = useToastNotifications();
@@ -612,7 +612,7 @@ describe("ToastNotifications", () => {
612
612
 
613
613
  describe("Toast with React elements", () => {
614
614
  it("should accept React element as message", async () => {
615
- let toastRef: ToastType | null = null;
615
+ let toastRef = null as ToastType | null;
616
616
 
617
617
  const TestComponent = () => {
618
618
  const toast = useToastNotifications();
@@ -641,7 +641,7 @@ describe("ToastNotifications", () => {
641
641
 
642
642
  describe("Toast update and hideAll", () => {
643
643
  it("should update an existing toast message", async () => {
644
- let toastRef: ToastType | null = null;
644
+ let toastRef = null as ToastType | null;
645
645
 
646
646
  const TestComponent = () => {
647
647
  const toast = useToastNotifications();
@@ -674,7 +674,7 @@ describe("ToastNotifications", () => {
674
674
  });
675
675
 
676
676
  it("should hide all toasts at once", async () => {
677
- let toastRef: ToastType | null = null;
677
+ let toastRef = null as ToastType | null;
678
678
 
679
679
  const TestComponent = () => {
680
680
  const toast = useToastNotifications();
@@ -711,7 +711,7 @@ describe("ToastNotifications", () => {
711
711
  queryAllByText: ReturnType<typeof render>["queryAllByText"];
712
712
  getRef: () => ToastType | null;
713
713
  } => {
714
- let toastRef: ToastType | null = null;
714
+ let toastRef = null as ToastType | null;
715
715
  const TestComponent = () => {
716
716
  toastRef = useToastNotifications();
717
717
  return <Text>Test</Text>;
@@ -790,7 +790,7 @@ describe("ToastNotifications", () => {
790
790
 
791
791
  describe("Toast placement rendering", () => {
792
792
  it("should render toast with top placement", async () => {
793
- let toastRef: ToastType | null = null;
793
+ let toastRef = null as ToastType | null;
794
794
 
795
795
  const TestComponent = () => {
796
796
  const toast = useToastNotifications();
@@ -817,7 +817,7 @@ describe("ToastNotifications", () => {
817
817
  });
818
818
 
819
819
  it("should render toast with center placement", async () => {
820
- let toastRef: ToastType | null = null;
820
+ let toastRef = null as ToastType | null;
821
821
 
822
822
  const TestComponent = () => {
823
823
  const toast = useToastNotifications();
@@ -846,7 +846,7 @@ describe("ToastNotifications", () => {
846
846
 
847
847
  describe("Toast icon and color variants", () => {
848
848
  it("should render success toast with custom icon", async () => {
849
- let toastRef: ToastType | null = null;
849
+ let toastRef = null as ToastType | null;
850
850
 
851
851
  const TestComponent = () => {
852
852
  const toast = useToastNotifications();
@@ -873,7 +873,7 @@ describe("ToastNotifications", () => {
873
873
  });
874
874
 
875
875
  it("should render danger toast with custom icon", async () => {
876
- let toastRef: ToastType | null = null;
876
+ let toastRef = null as ToastType | null;
877
877
 
878
878
  const TestComponent = () => {
879
879
  const toast = useToastNotifications();
@@ -900,7 +900,7 @@ describe("ToastNotifications", () => {
900
900
  });
901
901
 
902
902
  it("should render warning toast with custom icon", async () => {
903
- let toastRef: ToastType | null = null;
903
+ let toastRef = null as ToastType | null;
904
904
 
905
905
  const TestComponent = () => {
906
906
  const toast = useToastNotifications();
@@ -969,7 +969,7 @@ describe("ToastNotifications", () => {
969
969
 
970
970
  describe("Toast with renderToast custom renderer", () => {
971
971
  it("should use renderToast when provided", async () => {
972
- let toastRef: ToastType | null = null;
972
+ let toastRef = null as ToastType | null;
973
973
 
974
974
  const TestComponent = () => {
975
975
  const toast = useToastNotifications();
@@ -999,7 +999,7 @@ describe("ToastNotifications", () => {
999
999
 
1000
1000
  describe("Toast with renderType map", () => {
1001
1001
  it("should use renderType for matching toast type", async () => {
1002
- let toastRef: ToastType | null = null;
1002
+ let toastRef = null as ToastType | null;
1003
1003
 
1004
1004
  const TestComponent = () => {
1005
1005
  const toast = useToastNotifications();
@@ -1031,7 +1031,7 @@ describe("ToastNotifications", () => {
1031
1031
 
1032
1032
  describe("Toast onPress handler", () => {
1033
1033
  it("should accept onPress callback on toast", async () => {
1034
- let toastRef: ToastType | null = null;
1034
+ let toastRef = null as ToastType | null;
1035
1035
  const onPressMock = mock((_id: string) => {});
1036
1036
 
1037
1037
  const TestComponent = () => {
@@ -1061,7 +1061,7 @@ describe("ToastNotifications", () => {
1061
1061
 
1062
1062
  describe("Toast with swipe enabled", () => {
1063
1063
  it("should render toast with swipe enabled (pan responder)", async () => {
1064
- let toastRef: ToastType | null = null;
1064
+ let toastRef = null as ToastType | null;
1065
1065
 
1066
1066
  const TestComponent = () => {
1067
1067
  const toast = useToastNotifications();
@@ -1090,7 +1090,7 @@ describe("ToastNotifications", () => {
1090
1090
 
1091
1091
  describe("Toast with zoom-in animation", () => {
1092
1092
  it("should render toast with zoom-in animation type", async () => {
1093
- let toastRef: ToastType | null = null;
1093
+ let toastRef = null as ToastType | null;
1094
1094
 
1095
1095
  const TestComponent = () => {
1096
1096
  const toast = useToastNotifications();
@@ -1118,7 +1118,7 @@ describe("ToastNotifications", () => {
1118
1118
 
1119
1119
  describe("Toast custom colors", () => {
1120
1120
  it("should render toasts with custom colors", async () => {
1121
- let toastRef: ToastType | null = null;
1121
+ let toastRef = null as ToastType | null;
1122
1122
 
1123
1123
  const TestComponent = () => {
1124
1124
  const toast = useToastNotifications();
@@ -1161,7 +1161,7 @@ describe("ToastNotifications", () => {
1161
1161
 
1162
1162
  describe("Toast with offsets", () => {
1163
1163
  it("should render with custom offsetTop and offsetBottom", async () => {
1164
- let toastRef: ToastType | null = null;
1164
+ let toastRef = null as ToastType | null;
1165
1165
 
1166
1166
  const TestComponent = () => {
1167
1167
  const toast = useToastNotifications();
@@ -1192,7 +1192,7 @@ describe("ToastNotifications", () => {
1192
1192
 
1193
1193
  describe("Toast icon override", () => {
1194
1194
  it("should use explicit icon over type-specific icon", async () => {
1195
- let toastRef: ToastType | null = null;
1195
+ let toastRef = null as ToastType | null;
1196
1196
 
1197
1197
  const TestComponent = () => {
1198
1198
  const toast = useToastNotifications();
@@ -1231,7 +1231,7 @@ describe("ToastNotifications", () => {
1231
1231
  it("should auto-close toast after short duration and call onClose", async () => {
1232
1232
  const origOS = Platform.OS;
1233
1233
  Platform.OS = "web";
1234
- let toastRef: ToastType | null = null;
1234
+ let toastRef = null as ToastType | null;
1235
1235
  const onCloseMock = mock(() => {});
1236
1236
 
1237
1237
  const TestComponent = () => {
@@ -1275,7 +1275,7 @@ describe("ToastNotifications", () => {
1275
1275
  it("should hide toast when hide() is called (exercises open effect)", async () => {
1276
1276
  const origOS = Platform.OS;
1277
1277
  Platform.OS = "web";
1278
- let toastRef: ToastType | null = null;
1278
+ let toastRef = null as ToastType | null;
1279
1279
 
1280
1280
  const TestComponent = () => {
1281
1281
  const toast = useToastNotifications();
@@ -1333,7 +1333,7 @@ describe("ToastNotifications", () => {
1333
1333
  return origCreate(config);
1334
1334
  };
1335
1335
 
1336
- let toastRef: ToastType | null = null;
1336
+ let toastRef = null as ToastType | null;
1337
1337
 
1338
1338
  const TestComponent = () => {
1339
1339
  const toast = useToastNotifications();
@@ -1402,7 +1402,7 @@ describe("ToastNotifications", () => {
1402
1402
  return origCreate(config);
1403
1403
  };
1404
1404
 
1405
- let toastRef: ToastType | null = null;
1405
+ let toastRef = null as ToastType | null;
1406
1406
 
1407
1407
  const TestComponent = () => {
1408
1408
  const toast = useToastNotifications();
@@ -1458,7 +1458,7 @@ describe("ToastNotifications", () => {
1458
1458
  return origCreate(config);
1459
1459
  };
1460
1460
 
1461
- let toastRef: ToastType | null = null;
1461
+ let toastRef = null as ToastType | null;
1462
1462
 
1463
1463
  const TestComponent = () => {
1464
1464
  const toast = useToastNotifications();
@@ -1507,7 +1507,7 @@ describe("ToastNotifications", () => {
1507
1507
 
1508
1508
  describe("Toast zoom-in animation with swipe", () => {
1509
1509
  it("renders toast with both zoom-in and swipe enabled", async () => {
1510
- let toastRef: ToastType | null = null;
1510
+ let toastRef = null as ToastType | null;
1511
1511
 
1512
1512
  const TestComponent = () => {
1513
1513
  const toast = useToastNotifications();
@@ -1544,7 +1544,7 @@ describe("ToastNotifications", () => {
1544
1544
 
1545
1545
  describe("Toast onPress interaction", () => {
1546
1546
  it("should trigger onPress when pressing the toast", async () => {
1547
- let toastRef: ToastType | null = null;
1547
+ let toastRef = null as ToastType | null;
1548
1548
  const onPressMock = mock((_id: string) => {});
1549
1549
 
1550
1550
  const TestComponent = () => {
@@ -1592,7 +1592,7 @@ describe("ToastNotifications", () => {
1592
1592
  const {Platform: P} = await import("react-native");
1593
1593
  const origOS = P.OS;
1594
1594
  P.OS = "web";
1595
- let toastRef: ToastType | null = null;
1595
+ let toastRef = null as ToastType | null;
1596
1596
 
1597
1597
  const TestComponent = () => {
1598
1598
  const toast = useToastNotifications();
@@ -1643,7 +1643,7 @@ describe("ToastNotifications", () => {
1643
1643
  it("exercises dimension change via Dimensions event", async () => {
1644
1644
  const rn = await import("react-native");
1645
1645
  const Dims = rn.Dimensions;
1646
- let toastRef: ToastType | null = null;
1646
+ let toastRef = null as ToastType | null;
1647
1647
 
1648
1648
  const TestComponent = () => {
1649
1649
  const toast = useToastNotifications();
@@ -1669,9 +1669,12 @@ describe("ToastNotifications", () => {
1669
1669
 
1670
1670
  // Capture the original addEventListener to spy on it
1671
1671
  // Instead, we'll spy on the subscription by monkey-patching Dimensions
1672
- const listeners: Array<(data: {window: rn.ScaledSize}) => void> = [];
1672
+ const listeners: Array<(data: {window: ScaledSize}) => void> = [];
1673
1673
  const origAddEventListener = Dims.addEventListener.bind(Dims);
1674
- const patchedAdd = (event: string, handler: (data: {window: rn.ScaledSize}) => void) => {
1674
+ const patchedAdd = (
1675
+ event: Parameters<typeof Dims.addEventListener>[0],
1676
+ handler: (data: {window: ScaledSize}) => void
1677
+ ) => {
1675
1678
  if (event === "change") {
1676
1679
  listeners.push(handler);
1677
1680
  }
@@ -1695,7 +1698,7 @@ describe("ToastNotifications", () => {
1695
1698
  await act(async () => {
1696
1699
  for (const listener of listeners) {
1697
1700
  listener({
1698
- window: {fontScale: 1, height: 900, scale: 1, width: 500} as rn.ScaledSize,
1701
+ window: {fontScale: 1, height: 900, scale: 1, width: 500} as ScaledSize,
1699
1702
  });
1700
1703
  }
1701
1704
  });
@@ -1718,7 +1721,7 @@ describe("ToastNotifications", () => {
1718
1721
  return originalCreate.call(PanResponder, config);
1719
1722
  };
1720
1723
 
1721
- let toastRef: ToastType | null = null;
1724
+ let toastRef = null as ToastType | null;
1722
1725
  const TestComponent = () => {
1723
1726
  const toast = useToastNotifications();
1724
1727
  toastRef = toast;
@@ -1792,7 +1795,7 @@ describe("ToastNotifications", () => {
1792
1795
  return originalCreate.call(PanResponder, config);
1793
1796
  };
1794
1797
 
1795
- let toastRef: ToastType | null = null;
1798
+ let toastRef = null as ToastType | null;
1796
1799
  const TestComponent = () => {
1797
1800
  const toast = useToastNotifications();
1798
1801
  toastRef = toast;
@@ -1840,7 +1843,7 @@ describe("ToastNotifications", () => {
1840
1843
  return originalCreate.call(PanResponder, config);
1841
1844
  };
1842
1845
 
1843
- let toastRef: ToastType | null = null;
1846
+ let toastRef = null as ToastType | null;
1844
1847
  const TestComponent = () => {
1845
1848
  const toast = useToastNotifications();
1846
1849
  toastRef = toast;
@@ -1882,7 +1885,7 @@ describe("ToastNotifications", () => {
1882
1885
 
1883
1886
  describe("Toast lifecycle and auto-close", () => {
1884
1887
  it("should auto-close toast after duration expires", async () => {
1885
- let toastRef: ToastType | null = null;
1888
+ let toastRef = null as ToastType | null;
1886
1889
 
1887
1890
  const TestComponent = () => {
1888
1891
  const toast = useToastNotifications();
@@ -1916,7 +1919,7 @@ describe("ToastNotifications", () => {
1916
1919
  });
1917
1920
 
1918
1921
  it("should trigger handleClose when hiding a toast", async () => {
1919
- let toastRef: ToastType | null = null;
1922
+ let toastRef = null as ToastType | null;
1920
1923
 
1921
1924
  const TestComponent = () => {
1922
1925
  const toast = useToastNotifications();
@@ -1954,7 +1957,7 @@ describe("ToastNotifications", () => {
1954
1957
  });
1955
1958
 
1956
1959
  it("should auto-destroy toast after animation completes", async () => {
1957
- let toastRef: ToastType | null = null;
1960
+ let toastRef = null as ToastType | null;
1958
1961
  const onCloseMock = mock(() => {});
1959
1962
 
1960
1963
  const TestComponent = () => {
@@ -1993,7 +1996,7 @@ describe("ToastNotifications", () => {
1993
1996
 
1994
1997
  describe("Toast swipe gestures", () => {
1995
1998
  it("should render swipe-enabled toast and handle pan gestures", async () => {
1996
- let toastRef: ToastType | null = null;
1999
+ let toastRef = null as ToastType | null;
1997
2000
 
1998
2001
  const TestComponent = () => {
1999
2002
  const toast = useToastNotifications();
@@ -2023,7 +2026,7 @@ describe("ToastNotifications", () => {
2023
2026
 
2024
2027
  describe("Toast animation types", () => {
2025
2028
  it("should show toast with zoom-in animation", async () => {
2026
- let toastRef: ToastType | null = null;
2029
+ let toastRef = null as ToastType | null;
2027
2030
 
2028
2031
  const TestComponent = () => {
2029
2032
  const toast = useToastNotifications();
@@ -2051,7 +2054,7 @@ describe("ToastNotifications", () => {
2051
2054
  });
2052
2055
 
2053
2056
  it("should show toast with bottom placement and slide-in", async () => {
2054
- let toastRef: ToastType | null = null;
2057
+ let toastRef = null as ToastType | null;
2055
2058
 
2056
2059
  const TestComponent = () => {
2057
2060
  const toast = useToastNotifications();
@@ -2081,7 +2084,7 @@ describe("ToastNotifications", () => {
2081
2084
 
2082
2085
  describe("Toast renderType and renderToast", () => {
2083
2086
  it("should render custom toast via renderType", async () => {
2084
- let toastRef: ToastType | null = null;
2087
+ let toastRef = null as ToastType | null;
2085
2088
 
2086
2089
  const TestComponent = () => {
2087
2090
  const toast = useToastNotifications();
@@ -2113,7 +2116,7 @@ describe("ToastNotifications", () => {
2113
2116
  });
2114
2117
 
2115
2118
  it("should render custom toast via renderToast", async () => {
2116
- let toastRef: ToastType | null = null;
2119
+ let toastRef = null as ToastType | null;
2117
2120
 
2118
2121
  const TestComponent = () => {
2119
2122
  const toast = useToastNotifications();
@@ -2146,7 +2149,7 @@ describe("ToastNotifications", () => {
2146
2149
 
2147
2150
  describe("Toast onPress", () => {
2148
2151
  it("should call onPress when toast is pressed", async () => {
2149
- let toastRef: ToastType | null = null;
2152
+ let toastRef = null as ToastType | null;
2150
2153
  const onPressMock = mock((_id: string) => {});
2151
2154
 
2152
2155
  const TestComponent = () => {
@@ -2177,7 +2180,7 @@ describe("ToastNotifications", () => {
2177
2180
 
2178
2181
  describe("Toast custom colors", () => {
2179
2182
  it("should render with custom success/danger/warning/normal colors", async () => {
2180
- let toastRef: ToastType | null = null;
2183
+ let toastRef = null as ToastType | null;
2181
2184
 
2182
2185
  const TestComponent = () => {
2183
2186
  const toast = useToastNotifications();
@@ -2213,7 +2216,7 @@ describe("ToastNotifications", () => {
2213
2216
 
2214
2217
  describe("center placement toast rendering", () => {
2215
2218
  it("should fully render center toast content including filter and map callbacks", async () => {
2216
- let toastRef: ToastType | null = null;
2219
+ let toastRef = null as ToastType | null;
2217
2220
  const TestComponent = () => {
2218
2221
  const toast = useToastNotifications();
2219
2222
  toastRef = toast;
@@ -2245,7 +2248,7 @@ describe("ToastNotifications", () => {
2245
2248
  });
2246
2249
 
2247
2250
  it("should render multiple center toasts through filter and map", async () => {
2248
- let toastRef: ToastType | null = null;
2251
+ let toastRef = null as ToastType | null;
2249
2252
  const TestComponent = () => {
2250
2253
  const toast = useToastNotifications();
2251
2254
  toastRef = toast;
@@ -2289,7 +2292,7 @@ describe("ToastNotifications", () => {
2289
2292
 
2290
2293
  describe("auto-close timer callback", () => {
2291
2294
  it("should fire the setTimeout callback that calls handleClose", async () => {
2292
- let toastRef: ToastType | null = null;
2295
+ let toastRef = null as ToastType | null;
2293
2296
  const onCloseMock = mock(() => {});
2294
2297
 
2295
2298
  const TestComponent = () => {
@@ -2327,7 +2330,7 @@ describe("ToastNotifications", () => {
2327
2330
 
2328
2331
  describe("onHide callback on toast props", () => {
2329
2332
  it("should exercise the onHide function via renderToast", async () => {
2330
- let toastRef: ToastType | null = null;
2333
+ let toastRef = null as ToastType | null;
2331
2334
  let capturedOnHide: (() => void) | null = null;
2332
2335
 
2333
2336
  const customRenderToast = (toast: ToastProps) => {
@@ -2382,7 +2385,7 @@ describe("ToastNotifications", () => {
2382
2385
 
2383
2386
  describe("update map callback with toast in state", () => {
2384
2387
  it("should invoke the map callback inside update when toasts exist", async () => {
2385
- let toastRef: ToastType | null = null;
2388
+ let toastRef = null as ToastType | null;
2386
2389
 
2387
2390
  const TestComponent = () => {
2388
2391
  const toast = useToastNotifications();
@@ -150,8 +150,8 @@ beforeAll(() => {
150
150
  global.requestAnimationFrame = (callback: FrameRequestCallback) => {
151
151
  return setTimeout(() => callback(Date.now()), 0) as unknown as number;
152
152
  };
153
- global.cancelAnimationFrame = (id: number) => {
154
- clearTimeout(id);
153
+ global.cancelAnimationFrame = (id: number | null | undefined) => {
154
+ clearTimeout(id ?? undefined);
155
155
  };
156
156
  });
157
157
 
@@ -34,8 +34,8 @@ beforeAll(() => {
34
34
  globalThis.requestAnimationFrame = (callback: FrameRequestCallback) => {
35
35
  return setTimeout(() => callback(Date.now()), 0) as unknown as number;
36
36
  };
37
- globalThis.cancelAnimationFrame = (id: number) => {
38
- clearTimeout(id);
37
+ globalThis.cancelAnimationFrame = (id: number | null | undefined) => {
38
+ clearTimeout(id ?? undefined);
39
39
  };
40
40
  });
41
41
 
@@ -299,7 +299,7 @@ describe("Tooltip", () => {
299
299
  const {StyleSheet, View: ViewComp} = await import("react-native");
300
300
  const findPlacementStyle = () => {
301
301
  const positioned = UNSAFE_getAllByType(ViewComp).find(
302
- (node: {props: {style?: unknown; onLayout?: unknown}}) =>
302
+ (node) =>
303
303
  Boolean(node.props.onLayout) &&
304
304
  StyleSheet.flatten(node.props.style)?.position === "absolute"
305
305
  );
@@ -94,7 +94,7 @@ describe("UnifiedAddressAutoCompleteField", () => {
94
94
  });
95
95
 
96
96
  describe("web branch", () => {
97
- const testGlobal = globalThis as MutableGlobal;
97
+ const testGlobal = globalThis as unknown as MutableGlobal;
98
98
  const originalDocument = testGlobal.document;
99
99
  const originalWindow = testGlobal.window;
100
100
 
@@ -4,6 +4,7 @@ import {
4
4
  type EmitterSubscription,
5
5
  type GestureResponderEvent,
6
6
  Keyboard,
7
+ type KeyboardEventListener,
7
8
  PanResponder,
8
9
  type PanResponderCallbacks,
9
10
  type PanResponderGestureState,
@@ -146,9 +147,10 @@ describe("UserInactivity", () => {
146
147
  const onAction = mock((_active: boolean) => {});
147
148
  let capturedHideCallback: (() => void) | undefined;
148
149
  const addListenerSpy = spyOn(Keyboard, "addListener").mockImplementation(
149
- (event: string, callback: () => void) => {
150
+ (event: string, callback: KeyboardEventListener) => {
150
151
  if (event === "keyboardDidHide") {
151
- capturedHideCallback = callback;
152
+ // UserInactivity's keyboard handler ignores the event payload.
153
+ capturedHideCallback = callback as () => void;
152
154
  }
153
155
  return {remove: mock(() => {})} as unknown as EmitterSubscription;
154
156
  }