@ledgerhq/lumen-ui-rnative 0.1.64 → 0.1.66

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 (303) hide show
  1. package/dist/module/index.js +1 -1
  2. package/dist/module/index.js.map +1 -1
  3. package/dist/module/lib/Components/core/AddressInput/AddressInput.js +1 -1
  4. package/dist/module/lib/Components/core/AddressInput/AddressInput.js.map +1 -1
  5. package/dist/module/lib/Components/core/AmountDisplay/AmountDisplay.js +1 -1
  6. package/dist/module/lib/Components/core/AmountDisplay/AmountDisplay.js.map +1 -1
  7. package/dist/module/lib/Components/core/AmountInput/AmountInput.js +1 -1
  8. package/dist/module/lib/Components/core/AmountInput/AmountInput.js.map +1 -1
  9. package/dist/module/lib/Components/core/Avatar/Avatar.js +1 -1
  10. package/dist/module/lib/Components/core/Avatar/Avatar.js.map +1 -1
  11. package/dist/module/lib/Components/core/Banner/Banner.js +1 -1
  12. package/dist/module/lib/Components/core/Banner/Banner.js.map +1 -1
  13. package/dist/module/lib/Components/core/BottomSheet/BottomSheetHeader.js +1 -1
  14. package/dist/module/lib/Components/core/BottomSheet/BottomSheetHeader.js.map +1 -1
  15. package/dist/module/lib/Components/core/CardButton/CardButton.js +2 -0
  16. package/dist/module/lib/Components/core/CardButton/CardButton.js.map +1 -1
  17. package/dist/module/lib/Components/core/CardButton/CardButton.mdx +4 -0
  18. package/dist/module/lib/Components/core/CardButton/CardButton.stories.js +1 -0
  19. package/dist/module/lib/Components/core/CardButton/CardButton.stories.js.map +1 -1
  20. package/dist/module/lib/Components/core/ContentBanner/ContentBanner.js +1 -1
  21. package/dist/module/lib/Components/core/ContentBanner/ContentBanner.js.map +1 -1
  22. package/dist/module/lib/Components/core/Link/Link.figma.js +2 -1
  23. package/dist/module/lib/Components/core/Link/Link.figma.js.map +1 -1
  24. package/dist/module/lib/Components/core/Link/Link.js +5 -3
  25. package/dist/module/lib/Components/core/Link/Link.js.map +1 -1
  26. package/dist/module/lib/Components/core/Link/Link.mdx +3 -2
  27. package/dist/module/lib/Components/core/Link/Link.stories.js +4 -1
  28. package/dist/module/lib/Components/core/Link/Link.stories.js.map +1 -1
  29. package/dist/module/lib/Components/core/Link/Link.test.js +2 -2
  30. package/dist/module/lib/Components/core/Link/Link.test.js.map +1 -1
  31. package/dist/module/lib/Components/core/MediaBanner/MediaBanner.js +1 -1
  32. package/dist/module/lib/Components/core/MediaBanner/MediaBanner.js.map +1 -1
  33. package/dist/module/lib/Components/core/MediaCard/MediaCard.js +1 -1
  34. package/dist/module/lib/Components/core/MediaCard/MediaCard.js.map +1 -1
  35. package/dist/module/lib/Components/core/NavBar/NavBar.js +1 -1
  36. package/dist/module/lib/Components/core/NavBar/NavBar.js.map +1 -1
  37. package/dist/module/lib/Components/core/Spinner/Spinner.js +1 -1
  38. package/dist/module/lib/Components/core/Spinner/Spinner.js.map +1 -1
  39. package/dist/module/lib/Components/core/Stepper/Stepper.js +77 -31
  40. package/dist/module/lib/Components/core/Stepper/Stepper.js.map +1 -1
  41. package/dist/module/lib/Components/core/Stepper/Stepper.mdx +37 -16
  42. package/dist/module/lib/Components/core/Stepper/Stepper.stories.js +102 -2
  43. package/dist/module/lib/Components/core/Stepper/Stepper.stories.js.map +1 -1
  44. package/dist/module/lib/Components/core/Stepper/Stepper.test.js +32 -1
  45. package/dist/module/lib/Components/core/Stepper/Stepper.test.js.map +1 -1
  46. package/dist/module/lib/Components/core/Subheader/Subheader.js +5 -1
  47. package/dist/module/lib/Components/core/Subheader/Subheader.js.map +1 -1
  48. package/dist/module/lib/Components/core/ThemeProvider/ThemeProvider.js +2 -2
  49. package/dist/module/lib/Components/core/ThemeProvider/ThemeProvider.js.map +1 -1
  50. package/dist/module/lib/Components/core/ThemeProvider/ThemeProvider.test.js +9 -0
  51. package/dist/module/lib/Components/core/ThemeProvider/ThemeProvider.test.js.map +1 -1
  52. package/dist/module/lib/Components/core/Timeline/Timeline.figma.js +83 -0
  53. package/dist/module/lib/Components/core/Timeline/Timeline.figma.js.map +1 -0
  54. package/dist/module/lib/Components/core/Timeline/Timeline.js +464 -0
  55. package/dist/module/lib/Components/core/Timeline/Timeline.js.map +1 -0
  56. package/dist/module/lib/Components/core/Timeline/Timeline.mdx +49 -0
  57. package/dist/module/lib/Components/core/Timeline/Timeline.stories.js +289 -0
  58. package/dist/module/lib/Components/core/Timeline/Timeline.stories.js.map +1 -0
  59. package/dist/module/lib/Components/core/Timeline/Timeline.test.js +234 -0
  60. package/dist/module/lib/Components/core/Timeline/Timeline.test.js.map +1 -0
  61. package/dist/module/lib/Components/core/Timeline/index.js +5 -0
  62. package/dist/module/lib/Components/core/Timeline/index.js.map +1 -0
  63. package/dist/module/lib/Components/core/Timeline/types.js +4 -0
  64. package/dist/module/lib/Components/core/Timeline/types.js.map +1 -0
  65. package/dist/module/lib/Components/core/Toast/Toast.figma.js +39 -0
  66. package/dist/module/lib/Components/core/Toast/Toast.figma.js.map +1 -0
  67. package/dist/module/lib/Components/core/Toast/Toast.js +138 -0
  68. package/dist/module/lib/Components/core/Toast/Toast.js.map +1 -0
  69. package/dist/module/lib/Components/core/Toast/Toast.mdx +203 -0
  70. package/dist/module/lib/Components/core/Toast/Toast.stories.js +238 -0
  71. package/dist/module/lib/Components/core/Toast/Toast.stories.js.map +1 -0
  72. package/dist/module/lib/Components/core/Toast/Toast.test.js +203 -0
  73. package/dist/module/lib/Components/core/Toast/Toast.test.js.map +1 -0
  74. package/dist/module/lib/Components/core/Toast/Toaster.js +147 -0
  75. package/dist/module/lib/Components/core/Toast/Toaster.js.map +1 -0
  76. package/dist/module/lib/Components/core/Toast/Toaster.test.js +732 -0
  77. package/dist/module/lib/Components/core/Toast/Toaster.test.js.map +1 -0
  78. package/dist/module/lib/Components/core/Toast/hooks/useToastAccessibility.js +70 -0
  79. package/dist/module/lib/Components/core/Toast/hooks/useToastAccessibility.js.map +1 -0
  80. package/dist/module/lib/Components/core/Toast/hooks/useToastCollapse.js +33 -0
  81. package/dist/module/lib/Components/core/Toast/hooks/useToastCollapse.js.map +1 -0
  82. package/dist/module/lib/Components/core/Toast/hooks/useToastGesture.js +224 -0
  83. package/dist/module/lib/Components/core/Toast/hooks/useToastGesture.js.map +1 -0
  84. package/dist/module/lib/Components/core/Toast/hooks/useToastMotion.js +82 -0
  85. package/dist/module/lib/Components/core/Toast/hooks/useToastMotion.js.map +1 -0
  86. package/dist/module/lib/Components/core/Toast/hooks/useToastViewportStyles.js +21 -0
  87. package/dist/module/lib/Components/core/Toast/hooks/useToastViewportStyles.js.map +1 -0
  88. package/dist/module/lib/Components/core/Toast/index.js +7 -0
  89. package/dist/module/lib/Components/core/Toast/index.js.map +1 -0
  90. package/dist/module/lib/Components/core/Toast/types.js +4 -0
  91. package/dist/module/lib/Components/core/Toast/types.js.map +1 -0
  92. package/dist/module/lib/Components/core/Trend/Trend.js +1 -1
  93. package/dist/module/lib/Components/core/Trend/Trend.js.map +1 -1
  94. package/dist/module/lib/Components/core/index.js +2 -0
  95. package/dist/module/lib/Components/core/index.js.map +1 -1
  96. package/dist/module/lib/Components/internal/BaseInput/BaseInput.js +1 -1
  97. package/dist/module/lib/Components/internal/BaseInput/BaseInput.js.map +1 -1
  98. package/dist/module/lib/Components/visualization/CartesianChart/CartesianChart.js +6 -2
  99. package/dist/module/lib/Components/visualization/CartesianChart/CartesianChart.js.map +1 -1
  100. package/dist/module/lib/Components/visualization/DonutChart/DonutChart.js +8 -4
  101. package/dist/module/lib/Components/visualization/DonutChart/DonutChart.js.map +1 -1
  102. package/dist/module/lib/Components/visualization/DonutChart/DonutChart.test.js +1 -1
  103. package/dist/module/lib/Components/visualization/DonutChart/DonutChart.test.js.map +1 -1
  104. package/dist/module/lib/Components/visualization/DonutChart/DonutRing.js +12 -3
  105. package/dist/module/lib/Components/visualization/DonutChart/DonutRing.js.map +1 -1
  106. package/dist/module/lib/Components/visualization/Legend/Legend.js +1 -1
  107. package/dist/module/lib/Components/visualization/Legend/Legend.js.map +1 -1
  108. package/dist/module/lib/Components/visualization/Legend/Legend.test.js +12 -8
  109. package/dist/module/lib/Components/visualization/Legend/Legend.test.js.map +1 -1
  110. package/dist/module/lib/Components/visualization/LineChart/LineChart.js +8 -2
  111. package/dist/module/lib/Components/visualization/LineChart/LineChart.js.map +1 -1
  112. package/dist/module/lib/Components/visualization/LineChart/utils.js +3 -2
  113. package/dist/module/lib/Components/visualization/LineChart/utils.js.map +1 -1
  114. package/dist/module/lib/Components/visualization/LineChart/utils.test.js +8 -4
  115. package/dist/module/lib/Components/visualization/LineChart/utils.test.js.map +1 -1
  116. package/dist/module/lib/Components/visualization/config.js +1 -4
  117. package/dist/module/lib/Components/visualization/config.js.map +1 -1
  118. package/dist/module/translations/index.js +5 -0
  119. package/dist/module/translations/index.js.map +1 -0
  120. package/dist/module/{i18n → translations}/languages.js +0 -6
  121. package/dist/module/translations/languages.js.map +1 -0
  122. package/dist/module/{i18n → translations}/locales/de.json +0 -3
  123. package/{src/i18n → dist/module/translations}/locales/en.json +9 -3
  124. package/{src/i18n → dist/module/translations}/locales/es.json +0 -3
  125. package/dist/module/{i18n → translations}/locales/fr.json +0 -3
  126. package/{src/i18n → dist/module/translations}/locales/ja.json +0 -3
  127. package/dist/module/{i18n → translations}/locales/ko.json +0 -3
  128. package/dist/module/{i18n → translations}/locales/pt.json +0 -3
  129. package/dist/module/{i18n → translations}/locales/ru.json +0 -3
  130. package/dist/module/{i18n → translations}/locales/th.json +0 -3
  131. package/dist/module/{i18n → translations}/locales/tr.json +0 -3
  132. package/{src/i18n → dist/module/translations}/locales/zh.json +0 -3
  133. package/dist/module/translations/translations.js +36 -0
  134. package/dist/module/translations/translations.js.map +1 -0
  135. package/dist/module/translations/translations.test.js +34 -0
  136. package/dist/module/translations/translations.test.js.map +1 -0
  137. package/dist/typescript/src/index.d.ts +1 -1
  138. package/dist/typescript/src/index.d.ts.map +1 -1
  139. package/dist/typescript/src/lib/Components/core/CardButton/CardButton.d.ts +2 -0
  140. package/dist/typescript/src/lib/Components/core/CardButton/CardButton.d.ts.map +1 -1
  141. package/dist/typescript/src/lib/Components/core/Link/Link.d.ts +1 -1
  142. package/dist/typescript/src/lib/Components/core/Link/Link.d.ts.map +1 -1
  143. package/dist/typescript/src/lib/Components/core/Link/types.d.ts +1 -1
  144. package/dist/typescript/src/lib/Components/core/Link/types.d.ts.map +1 -1
  145. package/dist/typescript/src/lib/Components/core/Stepper/Stepper.d.ts +4 -3
  146. package/dist/typescript/src/lib/Components/core/Stepper/Stepper.d.ts.map +1 -1
  147. package/dist/typescript/src/lib/Components/core/Stepper/types.d.ts +12 -2
  148. package/dist/typescript/src/lib/Components/core/Stepper/types.d.ts.map +1 -1
  149. package/dist/typescript/src/lib/Components/core/Subheader/Subheader.d.ts.map +1 -1
  150. package/dist/typescript/src/lib/Components/core/ThemeProvider/types.d.ts +1 -1
  151. package/dist/typescript/src/lib/Components/core/ThemeProvider/types.d.ts.map +1 -1
  152. package/dist/typescript/src/lib/Components/core/Timeline/Timeline.d.ts +56 -0
  153. package/dist/typescript/src/lib/Components/core/Timeline/Timeline.d.ts.map +1 -0
  154. package/dist/typescript/src/lib/Components/core/Timeline/index.d.ts +3 -0
  155. package/dist/typescript/src/lib/Components/core/Timeline/index.d.ts.map +1 -0
  156. package/dist/typescript/src/lib/Components/core/Timeline/types.d.ts +109 -0
  157. package/dist/typescript/src/lib/Components/core/Timeline/types.d.ts.map +1 -0
  158. package/dist/typescript/src/lib/Components/core/Toast/Toast.d.ts +24 -0
  159. package/dist/typescript/src/lib/Components/core/Toast/Toast.d.ts.map +1 -0
  160. package/dist/typescript/src/lib/Components/core/Toast/Toaster.d.ts +35 -0
  161. package/dist/typescript/src/lib/Components/core/Toast/Toaster.d.ts.map +1 -0
  162. package/dist/typescript/src/lib/Components/core/Toast/hooks/useToastAccessibility.d.ts +17 -0
  163. package/dist/typescript/src/lib/Components/core/Toast/hooks/useToastAccessibility.d.ts.map +1 -0
  164. package/dist/typescript/src/lib/Components/core/Toast/hooks/useToastCollapse.d.ts +19 -0
  165. package/dist/typescript/src/lib/Components/core/Toast/hooks/useToastCollapse.d.ts.map +1 -0
  166. package/dist/typescript/src/lib/Components/core/Toast/hooks/useToastGesture.d.ts +14 -0
  167. package/dist/typescript/src/lib/Components/core/Toast/hooks/useToastGesture.d.ts.map +1 -0
  168. package/dist/typescript/src/lib/Components/core/Toast/hooks/useToastMotion.d.ts +15 -0
  169. package/dist/typescript/src/lib/Components/core/Toast/hooks/useToastMotion.d.ts.map +1 -0
  170. package/dist/typescript/src/lib/Components/core/Toast/hooks/useToastViewportStyles.d.ts +21 -0
  171. package/dist/typescript/src/lib/Components/core/Toast/hooks/useToastViewportStyles.d.ts.map +1 -0
  172. package/dist/typescript/src/lib/Components/core/Toast/index.d.ts +5 -0
  173. package/dist/typescript/src/lib/Components/core/Toast/index.d.ts.map +1 -0
  174. package/dist/typescript/src/lib/Components/core/Toast/types.d.ts +75 -0
  175. package/dist/typescript/src/lib/Components/core/Toast/types.d.ts.map +1 -0
  176. package/dist/typescript/src/lib/Components/core/index.d.ts +2 -0
  177. package/dist/typescript/src/lib/Components/core/index.d.ts.map +1 -1
  178. package/dist/typescript/src/lib/Components/visualization/CartesianChart/CartesianChart.d.ts.map +1 -1
  179. package/dist/typescript/src/lib/Components/visualization/CartesianChart/types.d.ts +1 -1
  180. package/dist/typescript/src/lib/Components/visualization/DonutChart/DonutChart.d.ts.map +1 -1
  181. package/dist/typescript/src/lib/Components/visualization/DonutChart/DonutRing.d.ts.map +1 -1
  182. package/dist/typescript/src/lib/Components/visualization/DonutChart/types.d.ts +1 -1
  183. package/dist/typescript/src/lib/Components/visualization/Legend/Legend.d.ts.map +1 -1
  184. package/dist/typescript/src/lib/Components/visualization/Legend/types.d.ts +2 -2
  185. package/dist/typescript/src/lib/Components/visualization/LineChart/LineChart.d.ts +1 -1
  186. package/dist/typescript/src/lib/Components/visualization/LineChart/LineChart.d.ts.map +1 -1
  187. package/dist/typescript/src/lib/Components/visualization/LineChart/types.d.ts +1 -1
  188. package/dist/typescript/src/lib/Components/visualization/LineChart/utils.d.ts +2 -1
  189. package/dist/typescript/src/lib/Components/visualization/LineChart/utils.d.ts.map +1 -1
  190. package/dist/typescript/src/lib/Components/visualization/config.d.ts +0 -3
  191. package/dist/typescript/src/lib/Components/visualization/config.d.ts.map +1 -1
  192. package/dist/typescript/src/translations/index.d.ts +3 -0
  193. package/dist/typescript/src/translations/index.d.ts.map +1 -0
  194. package/dist/typescript/src/{i18n → translations}/languages.d.ts +0 -5
  195. package/dist/typescript/src/translations/languages.d.ts.map +1 -0
  196. package/dist/typescript/src/translations/translations.d.ts +421 -0
  197. package/dist/typescript/src/translations/translations.d.ts.map +1 -0
  198. package/package.json +4 -6
  199. package/src/index.ts +1 -1
  200. package/src/lib/Components/core/AddressInput/AddressInput.tsx +1 -1
  201. package/src/lib/Components/core/AmountDisplay/AmountDisplay.tsx +1 -1
  202. package/src/lib/Components/core/AmountInput/AmountInput.tsx +1 -1
  203. package/src/lib/Components/core/Avatar/Avatar.tsx +1 -1
  204. package/src/lib/Components/core/Banner/Banner.tsx +1 -1
  205. package/src/lib/Components/core/BottomSheet/BottomSheetHeader.tsx +1 -1
  206. package/src/lib/Components/core/CardButton/CardButton.mdx +4 -0
  207. package/src/lib/Components/core/CardButton/CardButton.stories.tsx +1 -0
  208. package/src/lib/Components/core/CardButton/CardButton.tsx +2 -0
  209. package/src/lib/Components/core/ContentBanner/ContentBanner.tsx +1 -1
  210. package/src/lib/Components/core/Link/Link.figma.tsx +1 -0
  211. package/src/lib/Components/core/Link/Link.mdx +3 -2
  212. package/src/lib/Components/core/Link/Link.stories.tsx +3 -2
  213. package/src/lib/Components/core/Link/Link.test.tsx +2 -0
  214. package/src/lib/Components/core/Link/Link.tsx +3 -1
  215. package/src/lib/Components/core/Link/types.ts +1 -1
  216. package/src/lib/Components/core/MediaBanner/MediaBanner.tsx +1 -1
  217. package/src/lib/Components/core/MediaCard/MediaCard.tsx +1 -1
  218. package/src/lib/Components/core/NavBar/NavBar.tsx +1 -1
  219. package/src/lib/Components/core/Spinner/Spinner.tsx +1 -1
  220. package/src/lib/Components/core/Stepper/Stepper.mdx +37 -16
  221. package/src/lib/Components/core/Stepper/Stepper.stories.tsx +50 -2
  222. package/src/lib/Components/core/Stepper/Stepper.test.tsx +29 -1
  223. package/src/lib/Components/core/Stepper/Stepper.tsx +74 -33
  224. package/src/lib/Components/core/Stepper/types.ts +12 -2
  225. package/src/lib/Components/core/Subheader/Subheader.tsx +3 -1
  226. package/src/lib/Components/core/ThemeProvider/ThemeProvider.test.tsx +11 -0
  227. package/src/lib/Components/core/ThemeProvider/ThemeProvider.tsx +3 -3
  228. package/src/lib/Components/core/ThemeProvider/types.ts +1 -1
  229. package/src/lib/Components/core/Timeline/Timeline.figma.tsx +79 -0
  230. package/src/lib/Components/core/Timeline/Timeline.mdx +49 -0
  231. package/src/lib/Components/core/Timeline/Timeline.stories.tsx +250 -0
  232. package/src/lib/Components/core/Timeline/Timeline.test.tsx +275 -0
  233. package/src/lib/Components/core/Timeline/Timeline.tsx +576 -0
  234. package/src/lib/Components/core/Timeline/index.ts +2 -0
  235. package/src/lib/Components/core/Timeline/types.ts +124 -0
  236. package/src/lib/Components/core/Toast/Toast.figma.tsx +36 -0
  237. package/src/lib/Components/core/Toast/Toast.mdx +203 -0
  238. package/src/lib/Components/core/Toast/Toast.stories.tsx +260 -0
  239. package/src/lib/Components/core/Toast/Toast.test.tsx +181 -0
  240. package/src/lib/Components/core/Toast/Toast.tsx +163 -0
  241. package/src/lib/Components/core/Toast/Toaster.test.tsx +687 -0
  242. package/src/lib/Components/core/Toast/Toaster.tsx +157 -0
  243. package/src/lib/Components/core/Toast/hooks/useToastAccessibility.ts +82 -0
  244. package/src/lib/Components/core/Toast/hooks/useToastCollapse.ts +38 -0
  245. package/src/lib/Components/core/Toast/hooks/useToastGesture.ts +83 -0
  246. package/src/lib/Components/core/Toast/hooks/useToastMotion.ts +71 -0
  247. package/src/lib/Components/core/Toast/hooks/useToastViewportStyles.ts +45 -0
  248. package/src/lib/Components/core/Toast/index.ts +4 -0
  249. package/src/lib/Components/core/Toast/types.ts +94 -0
  250. package/src/lib/Components/core/Trend/Trend.tsx +1 -1
  251. package/src/lib/Components/core/index.ts +2 -0
  252. package/src/lib/Components/internal/BaseInput/BaseInput.tsx +1 -1
  253. package/src/lib/Components/visualization/CartesianChart/CartesianChart.tsx +4 -2
  254. package/src/lib/Components/visualization/CartesianChart/types.ts +1 -1
  255. package/src/lib/Components/visualization/DonutChart/DonutChart.test.tsx +1 -3
  256. package/src/lib/Components/visualization/DonutChart/DonutChart.tsx +7 -3
  257. package/src/lib/Components/visualization/DonutChart/DonutRing.tsx +11 -1
  258. package/src/lib/Components/visualization/DonutChart/types.ts +1 -1
  259. package/src/lib/Components/visualization/Legend/Legend.test.tsx +9 -8
  260. package/src/lib/Components/visualization/Legend/Legend.tsx +1 -1
  261. package/src/lib/Components/visualization/Legend/types.ts +2 -2
  262. package/src/lib/Components/visualization/LineChart/LineChart.tsx +10 -2
  263. package/src/lib/Components/visualization/LineChart/types.ts +1 -1
  264. package/src/lib/Components/visualization/LineChart/utils.test.ts +4 -0
  265. package/src/lib/Components/visualization/LineChart/utils.ts +6 -2
  266. package/src/lib/Components/visualization/config.ts +0 -3
  267. package/src/translations/index.ts +2 -0
  268. package/src/{i18n → translations}/languages.ts +0 -6
  269. package/src/{i18n → translations}/locales/de.json +0 -3
  270. package/{dist/module/i18n → src/translations}/locales/en.json +9 -3
  271. package/{dist/module/i18n → src/translations}/locales/es.json +0 -3
  272. package/src/{i18n → translations}/locales/fr.json +0 -3
  273. package/{dist/module/i18n → src/translations}/locales/ja.json +0 -3
  274. package/src/{i18n → translations}/locales/ko.json +0 -3
  275. package/src/{i18n → translations}/locales/pt.json +0 -3
  276. package/src/{i18n → translations}/locales/ru.json +0 -3
  277. package/src/{i18n → translations}/locales/th.json +0 -3
  278. package/src/{i18n → translations}/locales/tr.json +0 -3
  279. package/{dist/module/i18n → src/translations}/locales/zh.json +0 -3
  280. package/src/translations/translations.test.ts +56 -0
  281. package/src/translations/translations.ts +21 -0
  282. package/dist/module/i18n/I18nProvider.js +0 -20
  283. package/dist/module/i18n/I18nProvider.js.map +0 -1
  284. package/dist/module/i18n/i18n.js +0 -82
  285. package/dist/module/i18n/i18n.js.map +0 -1
  286. package/dist/module/i18n/index.js +0 -6
  287. package/dist/module/i18n/index.js.map +0 -1
  288. package/dist/module/i18n/languages.js.map +0 -1
  289. package/dist/module/i18n/useCommonTranslation.js +0 -8
  290. package/dist/module/i18n/useCommonTranslation.js.map +0 -1
  291. package/dist/typescript/src/i18n/I18nProvider.d.ts +0 -8
  292. package/dist/typescript/src/i18n/I18nProvider.d.ts.map +0 -1
  293. package/dist/typescript/src/i18n/i18n.d.ts +0 -13
  294. package/dist/typescript/src/i18n/i18n.d.ts.map +0 -1
  295. package/dist/typescript/src/i18n/index.d.ts +0 -4
  296. package/dist/typescript/src/i18n/index.d.ts.map +0 -1
  297. package/dist/typescript/src/i18n/languages.d.ts.map +0 -1
  298. package/dist/typescript/src/i18n/useCommonTranslation.d.ts +0 -2
  299. package/dist/typescript/src/i18n/useCommonTranslation.d.ts.map +0 -1
  300. package/src/i18n/I18nProvider.tsx +0 -20
  301. package/src/i18n/i18n.ts +0 -107
  302. package/src/i18n/index.ts +0 -3
  303. package/src/i18n/useCommonTranslation.ts +0 -6
@@ -0,0 +1,732 @@
1
+ "use strict";
2
+
3
+ import { afterEach, beforeEach, describe, expect, it, jest } from '@jest/globals';
4
+ import { ledgerLiveThemes } from '@ledgerhq/lumen-design-core';
5
+ import { toast, toastStore, EXIT_ANIMATION_MS } from '@ledgerhq/lumen-utils-shared';
6
+ import { act, fireEvent, render, screen } from '@testing-library/react-native';
7
+ import { useLayoutEffect } from 'react';
8
+ import { AccessibilityInfo, Platform } from 'react-native';
9
+ import { SafeAreaProvider } from 'react-native-safe-area-context';
10
+ import { ThemeProvider } from "../ThemeProvider/ThemeProvider.js";
11
+ import { Toaster } from "./Toaster.js";
12
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
+ const initialMetrics = {
14
+ frame: {
15
+ x: 0,
16
+ y: 0,
17
+ width: 320,
18
+ height: 640
19
+ },
20
+ insets: {
21
+ top: 0,
22
+ left: 0,
23
+ right: 0,
24
+ bottom: 0
25
+ }
26
+ };
27
+ const TestProviders = ({
28
+ children
29
+ }) => /*#__PURE__*/_jsx(SafeAreaProvider, {
30
+ initialMetrics: initialMetrics,
31
+ children: /*#__PURE__*/_jsx(ThemeProvider, {
32
+ themes: ledgerLiveThemes,
33
+ colorScheme: "dark",
34
+ locale: "en",
35
+ children: children
36
+ })
37
+ });
38
+ const renderToaster = props => render(/*#__PURE__*/_jsx(TestProviders, {
39
+ children: /*#__PURE__*/_jsx(Toaster, {
40
+ ...props
41
+ })
42
+ }));
43
+ const clearToastItems = () => {
44
+ for (const {
45
+ id
46
+ } of toastStore.getSnapshot()) {
47
+ toastStore.dismiss(id);
48
+ toastStore.dismiss(id);
49
+ }
50
+ };
51
+ const flushExit = () => {
52
+ act(() => {
53
+ jest.advanceTimersByTime(EXIT_ANIMATION_MS);
54
+ });
55
+ };
56
+ describe('Toaster', () => {
57
+ beforeEach(() => {
58
+ clearToastItems();
59
+ });
60
+ describe('Timing', () => {
61
+ beforeEach(() => {
62
+ jest.useFakeTimers();
63
+ });
64
+ afterEach(() => {
65
+ act(() => {
66
+ jest.runOnlyPendingTimers();
67
+ });
68
+ jest.useRealTimers();
69
+ });
70
+ it('should render a toast on notify', () => {
71
+ renderToaster();
72
+ act(() => {
73
+ toast.info({
74
+ title: 'Hello'
75
+ });
76
+ });
77
+ screen.getByText('Hello');
78
+ });
79
+ it('should show a toast that was notified before the toaster mounted', () => {
80
+ act(() => {
81
+ toast.info({
82
+ title: 'Queued early'
83
+ });
84
+ });
85
+ renderToaster();
86
+ screen.getByText('Queued early');
87
+ });
88
+ it('should apply Toaster props to toasts fired before its effects run', () => {
89
+ const EarlyNotifier = () => {
90
+ useLayoutEffect(() => {
91
+ toast.info({
92
+ title: 'First'
93
+ });
94
+ toast.info({
95
+ title: 'Second'
96
+ });
97
+ }, []);
98
+ return null;
99
+ };
100
+ render(/*#__PURE__*/_jsxs(TestProviders, {
101
+ children: [/*#__PURE__*/_jsx(EarlyNotifier, {}), /*#__PURE__*/_jsx(Toaster, {
102
+ maxItems: 1,
103
+ durations: {
104
+ info: 1000
105
+ }
106
+ })]
107
+ }));
108
+ expect(screen.queryByText('Second')).toBeNull();
109
+ act(() => {
110
+ jest.advanceTimersByTime(1000);
111
+ });
112
+ flushExit();
113
+ expect(screen.queryByText('First')).toBeNull();
114
+ screen.getByText('Second');
115
+ });
116
+ it('should auto-dismiss info after the default 5s', () => {
117
+ renderToaster();
118
+ act(() => {
119
+ toast.info({
120
+ title: 'Hello'
121
+ });
122
+ });
123
+ act(() => {
124
+ jest.advanceTimersByTime(4999);
125
+ });
126
+ screen.getByText('Hello');
127
+ act(() => {
128
+ jest.advanceTimersByTime(1);
129
+ });
130
+ flushExit();
131
+ expect(screen.queryByText('Hello')).toBeNull();
132
+ });
133
+ it('should keep warning toasts until dismissed', () => {
134
+ renderToaster();
135
+ act(() => {
136
+ toast.warning({
137
+ title: 'Careful'
138
+ });
139
+ });
140
+ act(() => {
141
+ jest.advanceTimersByTime(60000);
142
+ });
143
+ screen.getByText('Careful');
144
+ });
145
+ it('should queue items past maxItems and promote them as slots free', () => {
146
+ renderToaster({
147
+ maxItems: 1
148
+ });
149
+ act(() => {
150
+ toast.info({
151
+ title: 'First'
152
+ });
153
+ toast.info({
154
+ title: 'Second'
155
+ });
156
+ });
157
+ screen.getByText('First');
158
+ expect(screen.queryByText('Second')).toBeNull();
159
+ act(() => {
160
+ jest.advanceTimersByTime(5000);
161
+ });
162
+ flushExit();
163
+ expect(screen.queryByText('First')).toBeNull();
164
+ screen.getByText('Second');
165
+ });
166
+ it('should not keep a per-item duration across an update that omits it', () => {
167
+ renderToaster();
168
+ let id = '';
169
+ act(() => {
170
+ id = toast.loading({
171
+ title: 'Loading',
172
+ duration: 10000
173
+ }).id;
174
+ });
175
+ act(() => {
176
+ toast.update(id, {
177
+ appearance: 'success',
178
+ loading: false,
179
+ title: 'Done'
180
+ });
181
+ });
182
+ act(() => {
183
+ jest.advanceTimersByTime(5000);
184
+ });
185
+ flushExit();
186
+ expect(screen.queryByText('Done')).toBeNull();
187
+ });
188
+ it('should pause the timer while held and resume remaining time on release', () => {
189
+ const {
190
+ getByTestId
191
+ } = renderToaster();
192
+ act(() => {
193
+ toast.info({
194
+ title: 'Hold me'
195
+ });
196
+ });
197
+ act(() => {
198
+ jest.advanceTimersByTime(2000);
199
+ });
200
+ const entry = getByTestId('toast-entry');
201
+ act(() => {
202
+ entry.props.onTouchesDown();
203
+ });
204
+ act(() => {
205
+ jest.advanceTimersByTime(60000);
206
+ });
207
+ screen.getByText('Hold me');
208
+ act(() => {
209
+ entry.props.onTouchesUp({
210
+ numberOfTouches: 0
211
+ });
212
+ });
213
+ act(() => {
214
+ jest.advanceTimersByTime(2999);
215
+ });
216
+ screen.getByText('Hold me');
217
+ act(() => {
218
+ jest.advanceTimersByTime(1);
219
+ });
220
+ flushExit();
221
+ expect(screen.queryByText('Hold me')).toBeNull();
222
+ });
223
+ it('should stay paused while swiping and resume once the toast springs back', () => {
224
+ const {
225
+ getByTestId
226
+ } = renderToaster();
227
+ act(() => {
228
+ toast.info({
229
+ title: 'Swipe me'
230
+ });
231
+ });
232
+ act(() => {
233
+ jest.advanceTimersByTime(2000);
234
+ });
235
+ const entry = getByTestId('toast-entry');
236
+ act(() => {
237
+ entry.props.onTouchesDown();
238
+ entry.props.onUpdate({
239
+ translationX: 40
240
+ });
241
+ });
242
+ act(() => {
243
+ jest.advanceTimersByTime(60000);
244
+ });
245
+ screen.getByText('Swipe me');
246
+ act(() => {
247
+ entry.props.onEnd({
248
+ translationX: 20
249
+ });
250
+ entry.props.onFinalize();
251
+ });
252
+ act(() => {
253
+ jest.advanceTimersByTime(2999);
254
+ });
255
+ screen.getByText('Swipe me');
256
+ act(() => {
257
+ jest.advanceTimersByTime(1);
258
+ });
259
+ flushExit();
260
+ expect(screen.queryByText('Swipe me')).toBeNull();
261
+ });
262
+ it('should restart the timer when a loading toast becomes a success', () => {
263
+ renderToaster();
264
+ let id = '';
265
+ act(() => {
266
+ id = toast.loading({
267
+ title: 'Loading'
268
+ }).id;
269
+ });
270
+ act(() => {
271
+ jest.advanceTimersByTime(60000);
272
+ });
273
+ screen.getByText('Loading');
274
+ act(() => {
275
+ toast.update(id, {
276
+ appearance: 'success',
277
+ loading: false,
278
+ title: 'Done'
279
+ });
280
+ });
281
+ screen.getByText('Done');
282
+ act(() => {
283
+ jest.advanceTimersByTime(5000);
284
+ });
285
+ flushExit();
286
+ expect(screen.queryByText('Done')).toBeNull();
287
+ });
288
+ });
289
+ describe('Defaults', () => {
290
+ it('should default maxItems to 1', () => {
291
+ renderToaster();
292
+ act(() => {
293
+ toast.info({
294
+ title: 'First'
295
+ });
296
+ toast.info({
297
+ title: 'Second'
298
+ });
299
+ });
300
+ screen.getByText('First');
301
+ expect(screen.queryByText('Second')).toBeNull();
302
+ });
303
+ it('should default position to bottom', () => {
304
+ const {
305
+ getByTestId
306
+ } = renderToaster();
307
+ const viewport = getByTestId('toast-viewport');
308
+ expect(viewport.props.style.bottom).toBeDefined();
309
+ expect(viewport.props.style.top).toBeUndefined();
310
+ });
311
+ it('should anchor the viewport to the top when position is top', () => {
312
+ const {
313
+ getByTestId
314
+ } = renderToaster({
315
+ position: 'top'
316
+ });
317
+ const viewport = getByTestId('toast-viewport');
318
+ expect(viewport.props.style.top).toBeDefined();
319
+ expect(viewport.props.style.bottom).toBeUndefined();
320
+ });
321
+ it('should default insets to 0 and still apply the breathing-room gap', () => {
322
+ const {
323
+ getByTestId
324
+ } = renderToaster();
325
+ expect(getByTestId('toast-viewport').props.style.bottom).toBe(24);
326
+ });
327
+ it('adds a custom bottom inset to the gap instead of replacing it', () => {
328
+ const {
329
+ getByTestId
330
+ } = renderToaster({
331
+ insets: {
332
+ bottom: 80
333
+ }
334
+ });
335
+ expect(getByTestId('toast-viewport').props.style.bottom).toBe(104);
336
+ });
337
+ });
338
+ describe('Dismissal', () => {
339
+ beforeEach(() => {
340
+ jest.useFakeTimers();
341
+ });
342
+ afterEach(() => {
343
+ act(() => {
344
+ jest.runOnlyPendingTimers();
345
+ });
346
+ jest.useRealTimers();
347
+ });
348
+ it('should collapse the stack slot while exiting', () => {
349
+ renderToaster();
350
+ let id = '';
351
+ act(() => {
352
+ id = toast.warning({
353
+ title: 'Careful'
354
+ }).id;
355
+ });
356
+ act(() => {
357
+ toast.dismiss(id);
358
+ });
359
+ expect(screen.getByTestId('toast-collapse')).toHaveStyle({
360
+ height: 0
361
+ });
362
+ flushExit();
363
+ expect(screen.queryByText('Careful')).toBeNull();
364
+ });
365
+ it('should dismiss a single item by id and dismiss all', () => {
366
+ renderToaster({
367
+ maxItems: 2
368
+ });
369
+ let first = '';
370
+ act(() => {
371
+ first = toast.warning({
372
+ title: 'A'
373
+ }).id;
374
+ toast.warning({
375
+ title: 'B'
376
+ });
377
+ });
378
+ act(() => {
379
+ toast.dismiss(first);
380
+ });
381
+ screen.getByText('A');
382
+ flushExit();
383
+ expect(screen.queryByText('A')).toBeNull();
384
+ screen.getByText('B');
385
+ act(() => {
386
+ toast.dismissAll();
387
+ });
388
+ flushExit();
389
+ expect(screen.queryByText('B')).toBeNull();
390
+ });
391
+ it('should dismiss on a swipe past the threshold', () => {
392
+ const {
393
+ getByTestId
394
+ } = renderToaster();
395
+ act(() => {
396
+ toast.warning({
397
+ title: 'Swipe me'
398
+ });
399
+ });
400
+ const entry = getByTestId('toast-entry');
401
+ act(() => {
402
+ entry.props.onEnd({
403
+ translationX: 150
404
+ });
405
+ });
406
+ flushExit();
407
+ expect(screen.queryByText('Swipe me')).toBeNull();
408
+ });
409
+ it('should spring back and stay visible on a swipe under the threshold', () => {
410
+ const {
411
+ getByTestId
412
+ } = renderToaster();
413
+ act(() => {
414
+ toast.warning({
415
+ title: 'Stays put'
416
+ });
417
+ });
418
+ const entry = getByTestId('toast-entry');
419
+ act(() => {
420
+ entry.props.onEnd({
421
+ translationX: 20
422
+ });
423
+ });
424
+ screen.getByText('Stays put');
425
+ });
426
+ it('should stay visible when swiped past the threshold if not dismissible', () => {
427
+ const {
428
+ getByTestId
429
+ } = renderToaster();
430
+ act(() => {
431
+ toast.warning({
432
+ title: 'Locked',
433
+ dismissible: false
434
+ });
435
+ });
436
+ const entry = getByTestId('toast-entry');
437
+ act(() => {
438
+ entry.props.onEnd({
439
+ translationX: 150
440
+ });
441
+ });
442
+ flushExit();
443
+ screen.getByText('Locked');
444
+ });
445
+ });
446
+ describe('Accessibility', () => {
447
+ beforeEach(() => {
448
+ jest.useFakeTimers();
449
+ });
450
+ afterEach(() => {
451
+ act(() => {
452
+ jest.runOnlyPendingTimers();
453
+ });
454
+ jest.useRealTimers();
455
+ });
456
+ it('should expose the toast as one element labelled by its title', () => {
457
+ renderToaster();
458
+ act(() => {
459
+ toast.info({
460
+ title: 'Saved'
461
+ });
462
+ });
463
+ const entry = screen.getByTestId('toast-entry');
464
+ expect(entry.props.accessible).toBe(true);
465
+ expect(entry.props.accessibilityLabel).toBe('Saved');
466
+ });
467
+ it('should dismiss through the dismiss accessibility action', () => {
468
+ renderToaster();
469
+ act(() => {
470
+ toast.warning({
471
+ title: 'Dismiss me'
472
+ });
473
+ });
474
+ expect(screen.getByTestId('toast-entry').props.accessibilityActions).toContainEqual({
475
+ name: 'dismiss',
476
+ label: 'Close'
477
+ });
478
+ fireEvent(screen.getByTestId('toast-entry'), 'accessibilityAction', {
479
+ nativeEvent: {
480
+ actionName: 'dismiss'
481
+ }
482
+ });
483
+ flushExit();
484
+ expect(screen.queryByText('Dismiss me')).toBeNull();
485
+ });
486
+ it('should dismiss on the iOS escape gesture', () => {
487
+ renderToaster();
488
+ act(() => {
489
+ toast.warning({
490
+ title: 'Escape me'
491
+ });
492
+ });
493
+ fireEvent(screen.getByTestId('toast-entry'), 'accessibilityEscape');
494
+ flushExit();
495
+ expect(screen.queryByText('Escape me')).toBeNull();
496
+ });
497
+ it('should expose the inline action as an accessibility action', () => {
498
+ const onAction = jest.fn();
499
+ renderToaster();
500
+ act(() => {
501
+ toast.warning({
502
+ title: 'Deleted',
503
+ action: {
504
+ label: 'Undo',
505
+ onAction
506
+ }
507
+ });
508
+ });
509
+ const entry = screen.getByTestId('toast-entry');
510
+ expect(entry.props.accessibilityActions).toContainEqual({
511
+ name: 'toastAction',
512
+ label: 'Undo'
513
+ });
514
+ fireEvent(entry, 'accessibilityAction', {
515
+ nativeEvent: {
516
+ actionName: 'toastAction'
517
+ }
518
+ });
519
+ expect(onAction).toHaveBeenCalledTimes(1);
520
+ screen.getByText('Deleted');
521
+ });
522
+ it('should not offer dismissal for a non-dismissible toast', () => {
523
+ renderToaster();
524
+ act(() => {
525
+ toast.info({
526
+ title: 'Locked',
527
+ dismissible: false
528
+ });
529
+ });
530
+ const entry = screen.getByTestId('toast-entry');
531
+ expect(entry.props.accessibilityActions).toEqual([]);
532
+ expect(entry.props.onAccessibilityEscape).toBeUndefined();
533
+ });
534
+ describe('on iOS', () => {
535
+ const originalOS = Platform.OS;
536
+ beforeEach(() => {
537
+ Platform.OS = 'ios';
538
+ });
539
+ afterEach(() => {
540
+ Platform.OS = originalOS;
541
+ });
542
+ it('should announce the title, interrupting only for warning and error', () => {
543
+ const announce = jest.spyOn(AccessibilityInfo, 'announceForAccessibilityWithOptions').mockImplementation(() => undefined);
544
+ renderToaster({
545
+ maxItems: 2
546
+ });
547
+ act(() => {
548
+ toast.info({
549
+ title: 'Heads up'
550
+ });
551
+ toast.error({
552
+ title: 'Failed'
553
+ });
554
+ });
555
+ expect(announce).toHaveBeenCalledWith('Heads up', {
556
+ queue: true
557
+ });
558
+ expect(announce).toHaveBeenCalledWith('Failed', {
559
+ queue: false
560
+ });
561
+ announce.mockRestore();
562
+ });
563
+ it('should announce again when the title changes', () => {
564
+ const announce = jest.spyOn(AccessibilityInfo, 'announceForAccessibilityWithOptions').mockImplementation(() => undefined);
565
+ renderToaster();
566
+ let id = '';
567
+ act(() => {
568
+ id = toast.info({
569
+ title: 'Uploading',
570
+ loading: true
571
+ }).id;
572
+ });
573
+ act(() => {
574
+ toast.update(id, {
575
+ title: 'Uploaded',
576
+ appearance: 'success'
577
+ });
578
+ });
579
+ expect(announce).toHaveBeenLastCalledWith('Uploaded', {
580
+ queue: true
581
+ });
582
+ announce.mockRestore();
583
+ });
584
+ });
585
+ });
586
+ describe('promise', () => {
587
+ it('should move the toast from loading to success', async () => {
588
+ renderToaster();
589
+ let resolveFn = () => {};
590
+ const promise = new Promise(resolve => {
591
+ resolveFn = resolve;
592
+ });
593
+ act(() => {
594
+ toast.promise(promise, {
595
+ loading: {
596
+ title: 'Saving'
597
+ },
598
+ success: {
599
+ title: 'Saved'
600
+ },
601
+ error: {
602
+ title: 'Failed'
603
+ }
604
+ });
605
+ });
606
+ screen.getByText('Saving');
607
+ resolveFn('ok');
608
+ expect(await screen.findByText('Saved')).toBeTruthy();
609
+ });
610
+ it('should drop the loading action when success omits it', async () => {
611
+ renderToaster();
612
+ let resolveFn = () => {};
613
+ const promise = new Promise(resolve => {
614
+ resolveFn = resolve;
615
+ });
616
+ act(() => {
617
+ toast.promise(promise, {
618
+ loading: {
619
+ title: 'Saving',
620
+ action: {
621
+ label: 'Cancel',
622
+ onAction: () => {}
623
+ }
624
+ },
625
+ success: {
626
+ title: 'Saved'
627
+ },
628
+ error: {
629
+ title: 'Failed'
630
+ }
631
+ });
632
+ });
633
+ screen.getByText('Cancel');
634
+ resolveFn('ok');
635
+ expect(await screen.findByText('Saved')).toBeTruthy();
636
+ expect(screen.queryByText('Cancel')).toBeNull();
637
+ });
638
+ it('should drop the loading action when error omits it', async () => {
639
+ renderToaster();
640
+ let rejectFn = () => {};
641
+ const promise = new Promise((_resolve, reject) => {
642
+ rejectFn = reject;
643
+ });
644
+ act(() => {
645
+ toast.promise(promise, {
646
+ loading: {
647
+ title: 'Saving',
648
+ action: {
649
+ label: 'Cancel',
650
+ onAction: () => {}
651
+ }
652
+ },
653
+ success: {
654
+ title: 'Saved'
655
+ },
656
+ error: {
657
+ title: 'Failed'
658
+ }
659
+ });
660
+ });
661
+ screen.getByText('Cancel');
662
+ rejectFn(new Error('nope'));
663
+ expect(await screen.findByText('Failed')).toBeTruthy();
664
+ expect(screen.queryByText('Cancel')).toBeNull();
665
+ });
666
+ it('should restore dismissal when error omits dismissible', async () => {
667
+ renderToaster();
668
+ let rejectFn = () => {};
669
+ const promise = new Promise((_resolve, reject) => {
670
+ rejectFn = reject;
671
+ });
672
+ act(() => {
673
+ toast.promise(promise, {
674
+ loading: {
675
+ title: 'Saving',
676
+ dismissible: false
677
+ },
678
+ success: {
679
+ title: 'Saved'
680
+ },
681
+ error: {
682
+ title: 'Failed'
683
+ }
684
+ });
685
+ });
686
+ expect(screen.getByTestId('toast-entry').props.onAccessibilityEscape).toBeUndefined();
687
+ rejectFn(new Error('nope'));
688
+ expect(await screen.findByText('Failed')).toBeTruthy();
689
+ expect(screen.getByTestId('toast-entry').props.accessibilityActions).toContainEqual(expect.objectContaining({
690
+ name: 'dismiss'
691
+ }));
692
+ });
693
+ it('should move the toast from loading to error on rejection', async () => {
694
+ renderToaster();
695
+ let rejectFn = () => {};
696
+ const promise = new Promise((_resolve, reject) => {
697
+ rejectFn = reject;
698
+ });
699
+ act(() => {
700
+ toast.promise(promise, {
701
+ loading: {
702
+ title: 'Saving'
703
+ },
704
+ success: {
705
+ title: 'Saved'
706
+ },
707
+ error: {
708
+ title: 'Failed'
709
+ }
710
+ });
711
+ });
712
+ screen.getByText('Saving');
713
+ rejectFn(new Error('nope'));
714
+ expect(await screen.findByText('Failed')).toBeTruthy();
715
+ });
716
+ });
717
+ describe('Multiple instances', () => {
718
+ it('warns when a second Toaster mounts while one is already mounted', () => {
719
+ const warnSpy = jest.spyOn(console, 'warn').mockImplementation(() => {
720
+ return;
721
+ });
722
+ const first = renderToaster();
723
+ expect(warnSpy).not.toHaveBeenCalled();
724
+ const second = renderToaster();
725
+ expect(warnSpy).toHaveBeenCalledTimes(1);
726
+ first.unmount();
727
+ second.unmount();
728
+ warnSpy.mockRestore();
729
+ });
730
+ });
731
+ });
732
+ //# sourceMappingURL=Toaster.test.js.map