@ledgerhq/lumen-ui-rnative 0.1.65 → 0.1.67

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 (304) 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/BottomSheet.stories.js +6 -3
  14. package/dist/module/lib/Components/core/BottomSheet/BottomSheet.stories.js.map +1 -1
  15. package/dist/module/lib/Components/core/BottomSheet/BottomSheetHeader.js +1 -1
  16. package/dist/module/lib/Components/core/BottomSheet/BottomSheetHeader.js.map +1 -1
  17. package/dist/module/lib/Components/core/Card/Card.figma.js +0 -1
  18. package/dist/module/lib/Components/core/Card/Card.figma.js.map +1 -1
  19. package/dist/module/lib/Components/core/Card/Card.stories.js +0 -2
  20. package/dist/module/lib/Components/core/Card/Card.stories.js.map +1 -1
  21. package/dist/module/lib/Components/core/ContentBanner/ContentBanner.figma.js +0 -1
  22. package/dist/module/lib/Components/core/ContentBanner/ContentBanner.figma.js.map +1 -1
  23. package/dist/module/lib/Components/core/ContentBanner/ContentBanner.js +2 -2
  24. package/dist/module/lib/Components/core/ContentBanner/ContentBanner.js.map +1 -1
  25. package/dist/module/lib/Components/core/ContentBanner/ContentBanner.mdx +4 -4
  26. package/dist/module/lib/Components/core/ContentBanner/ContentBanner.stories.js +1 -9
  27. package/dist/module/lib/Components/core/ContentBanner/ContentBanner.stories.js.map +1 -1
  28. package/dist/module/lib/Components/core/ContentBanner/ContentBanner.test.js +0 -1
  29. package/dist/module/lib/Components/core/ContentBanner/ContentBanner.test.js.map +1 -1
  30. package/dist/module/lib/Components/core/DotSymbol/DotSymbol.stories.js +0 -5
  31. package/dist/module/lib/Components/core/DotSymbol/DotSymbol.stories.js.map +1 -1
  32. package/dist/module/lib/Components/core/ListItem/ListItem.figma.js +0 -1
  33. package/dist/module/lib/Components/core/ListItem/ListItem.figma.js.map +1 -1
  34. package/dist/module/lib/Components/core/ListItem/ListItem.js +1 -1
  35. package/dist/module/lib/Components/core/ListItem/ListItem.mdx +10 -10
  36. package/dist/module/lib/Components/core/ListItem/ListItem.stories.js +2 -29
  37. package/dist/module/lib/Components/core/ListItem/ListItem.stories.js.map +1 -1
  38. package/dist/module/lib/Components/core/MediaBanner/MediaBanner.js +1 -1
  39. package/dist/module/lib/Components/core/MediaBanner/MediaBanner.js.map +1 -1
  40. package/dist/module/lib/Components/core/MediaCard/MediaCard.js +1 -1
  41. package/dist/module/lib/Components/core/MediaCard/MediaCard.js.map +1 -1
  42. package/dist/module/lib/Components/core/NavBar/NavBar.js +1 -1
  43. package/dist/module/lib/Components/core/NavBar/NavBar.js.map +1 -1
  44. package/dist/module/lib/Components/core/SelectList/SelectList.mdx +1 -1
  45. package/dist/module/lib/Components/core/SelectList/SelectList.stories.js +0 -1
  46. package/dist/module/lib/Components/core/SelectList/SelectList.stories.js.map +1 -1
  47. package/dist/module/lib/Components/core/Spinner/Spinner.js +1 -1
  48. package/dist/module/lib/Components/core/Spinner/Spinner.js.map +1 -1
  49. package/dist/module/lib/Components/core/Spot/Spot.figma.js +31 -16
  50. package/dist/module/lib/Components/core/Spot/Spot.figma.js.map +1 -1
  51. package/dist/module/lib/Components/core/Spot/Spot.js +24 -146
  52. package/dist/module/lib/Components/core/Spot/Spot.js.map +1 -1
  53. package/dist/module/lib/Components/core/Spot/Spot.mdx +47 -108
  54. package/dist/module/lib/Components/core/Spot/Spot.stories.js +108 -215
  55. package/dist/module/lib/Components/core/Spot/Spot.stories.js.map +1 -1
  56. package/dist/module/lib/Components/core/Spot/Spot.test.js +61 -0
  57. package/dist/module/lib/Components/core/Spot/Spot.test.js.map +1 -0
  58. package/dist/module/lib/Components/core/Spot/SpotNumber.js +56 -0
  59. package/dist/module/lib/Components/core/Spot/SpotNumber.js.map +1 -0
  60. package/dist/module/lib/Components/core/Spot/SpotNumber.test.js +72 -0
  61. package/dist/module/lib/Components/core/Spot/SpotNumber.test.js.map +1 -0
  62. package/dist/module/lib/Components/core/Spot/index.js +1 -0
  63. package/dist/module/lib/Components/core/Spot/index.js.map +1 -1
  64. package/dist/module/lib/Components/core/Spot/useSpotStyles.js +93 -0
  65. package/dist/module/lib/Components/core/Spot/useSpotStyles.js.map +1 -0
  66. package/dist/module/lib/Components/core/Stepper/Stepper.js +1 -1
  67. package/dist/module/lib/Components/core/Stepper/Stepper.js.map +1 -1
  68. package/dist/module/lib/Components/core/Subheader/Subheader.js +5 -1
  69. package/dist/module/lib/Components/core/Subheader/Subheader.js.map +1 -1
  70. package/dist/module/lib/Components/core/ThemeProvider/ThemeProvider.js +2 -2
  71. package/dist/module/lib/Components/core/ThemeProvider/ThemeProvider.js.map +1 -1
  72. package/dist/module/lib/Components/core/ThemeProvider/ThemeProvider.test.js +9 -1
  73. package/dist/module/lib/Components/core/ThemeProvider/ThemeProvider.test.js.map +1 -1
  74. package/dist/module/lib/Components/core/Tile/Tile.figma.js +0 -1
  75. package/dist/module/lib/Components/core/Tile/Tile.figma.js.map +1 -1
  76. package/dist/module/lib/Components/core/Tile/Tile.js +3 -3
  77. package/dist/module/lib/Components/core/Tile/Tile.mdx +8 -8
  78. package/dist/module/lib/Components/core/Tile/Tile.stories.js +7 -25
  79. package/dist/module/lib/Components/core/Tile/Tile.stories.js.map +1 -1
  80. package/dist/module/lib/Components/core/Toast/hooks/useToastAccessibility.js +1 -1
  81. package/dist/module/lib/Components/core/Toast/hooks/useToastAccessibility.js.map +1 -1
  82. package/dist/module/lib/Components/core/Trend/Trend.js +1 -1
  83. package/dist/module/lib/Components/core/Trend/Trend.js.map +1 -1
  84. package/dist/module/lib/Components/internal/BaseInput/BaseInput.js +1 -1
  85. package/dist/module/lib/Components/internal/BaseInput/BaseInput.js.map +1 -1
  86. package/dist/module/lib/Components/symbols/icons/AiBubble.js +60 -0
  87. package/dist/module/lib/Components/symbols/icons/AiBubble.js.map +1 -0
  88. package/dist/module/lib/Components/symbols/icons/ArrowBottomLeft.js +49 -0
  89. package/dist/module/lib/Components/symbols/icons/ArrowBottomLeft.js.map +1 -0
  90. package/dist/module/lib/Components/symbols/icons/Bug.js +1 -1
  91. package/dist/module/lib/Components/symbols/icons/Bug.js.map +1 -1
  92. package/dist/module/lib/Components/symbols/icons/Hourglass.js +49 -0
  93. package/dist/module/lib/Components/symbols/icons/Hourglass.js.map +1 -0
  94. package/dist/module/lib/Components/symbols/icons/Repeat.js +49 -0
  95. package/dist/module/lib/Components/symbols/icons/Repeat.js.map +1 -0
  96. package/dist/module/lib/Components/symbols/icons/Robot.js +57 -0
  97. package/dist/module/lib/Components/symbols/icons/Robot.js.map +1 -0
  98. package/dist/module/lib/Components/symbols/icons/Switch.js +11 -5
  99. package/dist/module/lib/Components/symbols/icons/Switch.js.map +1 -1
  100. package/dist/module/lib/Components/symbols/icons/Wifi.js +52 -0
  101. package/dist/module/lib/Components/symbols/icons/Wifi.js.map +1 -0
  102. package/dist/module/lib/Components/symbols/index.js +6 -0
  103. package/dist/module/lib/Components/symbols/index.js.map +1 -1
  104. package/dist/module/lib/Components/visualization/CartesianChart/CartesianChart.js +6 -2
  105. package/dist/module/lib/Components/visualization/CartesianChart/CartesianChart.js.map +1 -1
  106. package/dist/module/lib/Components/visualization/DonutChart/DonutChart.js +8 -4
  107. package/dist/module/lib/Components/visualization/DonutChart/DonutChart.js.map +1 -1
  108. package/dist/module/lib/Components/visualization/DonutChart/DonutChart.test.js +1 -1
  109. package/dist/module/lib/Components/visualization/DonutChart/DonutChart.test.js.map +1 -1
  110. package/dist/module/lib/Components/visualization/DonutChart/DonutRing.js +12 -3
  111. package/dist/module/lib/Components/visualization/DonutChart/DonutRing.js.map +1 -1
  112. package/dist/module/lib/Components/visualization/Legend/Legend.js +1 -1
  113. package/dist/module/lib/Components/visualization/Legend/Legend.js.map +1 -1
  114. package/dist/module/lib/Components/visualization/Legend/Legend.test.js +12 -8
  115. package/dist/module/lib/Components/visualization/Legend/Legend.test.js.map +1 -1
  116. package/dist/module/lib/Components/visualization/LineChart/LineChart.js +8 -2
  117. package/dist/module/lib/Components/visualization/LineChart/LineChart.js.map +1 -1
  118. package/dist/module/lib/Components/visualization/LineChart/utils.js +3 -2
  119. package/dist/module/lib/Components/visualization/LineChart/utils.js.map +1 -1
  120. package/dist/module/lib/Components/visualization/LineChart/utils.test.js +8 -4
  121. package/dist/module/lib/Components/visualization/LineChart/utils.test.js.map +1 -1
  122. package/dist/module/lib/Components/visualization/config.js +1 -4
  123. package/dist/module/lib/Components/visualization/config.js.map +1 -1
  124. package/dist/module/translations/index.js +5 -0
  125. package/dist/module/translations/index.js.map +1 -0
  126. package/dist/module/{i18n → translations}/languages.js +0 -6
  127. package/dist/module/translations/languages.js.map +1 -0
  128. package/dist/module/{i18n → translations}/locales/de.json +0 -3
  129. package/{src/i18n → dist/module/translations}/locales/en.json +9 -3
  130. package/{src/i18n → dist/module/translations}/locales/es.json +0 -3
  131. package/dist/module/{i18n → translations}/locales/fr.json +0 -3
  132. package/{src/i18n → dist/module/translations}/locales/ja.json +0 -3
  133. package/dist/module/{i18n → translations}/locales/ko.json +0 -3
  134. package/dist/module/{i18n → translations}/locales/pt.json +0 -3
  135. package/dist/module/{i18n → translations}/locales/ru.json +0 -3
  136. package/dist/module/{i18n → translations}/locales/th.json +0 -3
  137. package/dist/module/{i18n → translations}/locales/tr.json +0 -3
  138. package/{src/i18n → dist/module/translations}/locales/zh.json +0 -3
  139. package/dist/module/translations/translations.js +36 -0
  140. package/dist/module/translations/translations.js.map +1 -0
  141. package/dist/module/translations/translations.test.js +34 -0
  142. package/dist/module/translations/translations.test.js.map +1 -0
  143. package/dist/typescript/src/index.d.ts +1 -1
  144. package/dist/typescript/src/index.d.ts.map +1 -1
  145. package/dist/typescript/src/lib/Components/core/ContentBanner/ContentBanner.d.ts +1 -1
  146. package/dist/typescript/src/lib/Components/core/ListItem/ListItem.d.ts +1 -1
  147. package/dist/typescript/src/lib/Components/core/Spot/Spot.d.ts +7 -25
  148. package/dist/typescript/src/lib/Components/core/Spot/Spot.d.ts.map +1 -1
  149. package/dist/typescript/src/lib/Components/core/Spot/SpotNumber.d.ts +16 -0
  150. package/dist/typescript/src/lib/Components/core/Spot/SpotNumber.d.ts.map +1 -0
  151. package/dist/typescript/src/lib/Components/core/Spot/index.d.ts +1 -0
  152. package/dist/typescript/src/lib/Components/core/Spot/index.d.ts.map +1 -1
  153. package/dist/typescript/src/lib/Components/core/Spot/types.d.ts +29 -29
  154. package/dist/typescript/src/lib/Components/core/Spot/types.d.ts.map +1 -1
  155. package/dist/typescript/src/lib/Components/core/Spot/useSpotStyles.d.ts +14 -0
  156. package/dist/typescript/src/lib/Components/core/Spot/useSpotStyles.d.ts.map +1 -0
  157. package/dist/typescript/src/lib/Components/core/Subheader/Subheader.d.ts.map +1 -1
  158. package/dist/typescript/src/lib/Components/core/ThemeProvider/types.d.ts +1 -1
  159. package/dist/typescript/src/lib/Components/core/ThemeProvider/types.d.ts.map +1 -1
  160. package/dist/typescript/src/lib/Components/core/Tile/Tile.d.ts +3 -3
  161. package/dist/typescript/src/lib/Components/symbols/icons/AiBubble.d.ts +35 -0
  162. package/dist/typescript/src/lib/Components/symbols/icons/AiBubble.d.ts.map +1 -0
  163. package/dist/typescript/src/lib/Components/symbols/icons/ArrowBottomLeft.d.ts +35 -0
  164. package/dist/typescript/src/lib/Components/symbols/icons/ArrowBottomLeft.d.ts.map +1 -0
  165. package/dist/typescript/src/lib/Components/symbols/icons/Hourglass.d.ts +35 -0
  166. package/dist/typescript/src/lib/Components/symbols/icons/Hourglass.d.ts.map +1 -0
  167. package/dist/typescript/src/lib/Components/symbols/icons/Repeat.d.ts +35 -0
  168. package/dist/typescript/src/lib/Components/symbols/icons/Repeat.d.ts.map +1 -0
  169. package/dist/typescript/src/lib/Components/symbols/icons/Robot.d.ts +35 -0
  170. package/dist/typescript/src/lib/Components/symbols/icons/Robot.d.ts.map +1 -0
  171. package/dist/typescript/src/lib/Components/symbols/icons/Switch.d.ts.map +1 -1
  172. package/dist/typescript/src/lib/Components/symbols/icons/Wifi.d.ts +35 -0
  173. package/dist/typescript/src/lib/Components/symbols/icons/Wifi.d.ts.map +1 -0
  174. package/dist/typescript/src/lib/Components/symbols/index.d.ts +6 -0
  175. package/dist/typescript/src/lib/Components/symbols/index.d.ts.map +1 -1
  176. package/dist/typescript/src/lib/Components/visualization/CartesianChart/CartesianChart.d.ts.map +1 -1
  177. package/dist/typescript/src/lib/Components/visualization/CartesianChart/types.d.ts +1 -1
  178. package/dist/typescript/src/lib/Components/visualization/DonutChart/DonutChart.d.ts.map +1 -1
  179. package/dist/typescript/src/lib/Components/visualization/DonutChart/DonutRing.d.ts.map +1 -1
  180. package/dist/typescript/src/lib/Components/visualization/DonutChart/types.d.ts +1 -1
  181. package/dist/typescript/src/lib/Components/visualization/Legend/Legend.d.ts.map +1 -1
  182. package/dist/typescript/src/lib/Components/visualization/Legend/types.d.ts +2 -2
  183. package/dist/typescript/src/lib/Components/visualization/LineChart/LineChart.d.ts +1 -1
  184. package/dist/typescript/src/lib/Components/visualization/LineChart/LineChart.d.ts.map +1 -1
  185. package/dist/typescript/src/lib/Components/visualization/LineChart/types.d.ts +1 -1
  186. package/dist/typescript/src/lib/Components/visualization/LineChart/utils.d.ts +2 -1
  187. package/dist/typescript/src/lib/Components/visualization/LineChart/utils.d.ts.map +1 -1
  188. package/dist/typescript/src/lib/Components/visualization/config.d.ts +0 -3
  189. package/dist/typescript/src/lib/Components/visualization/config.d.ts.map +1 -1
  190. package/dist/typescript/src/translations/index.d.ts +3 -0
  191. package/dist/typescript/src/translations/index.d.ts.map +1 -0
  192. package/dist/typescript/src/{i18n → translations}/languages.d.ts +0 -5
  193. package/dist/typescript/src/translations/languages.d.ts.map +1 -0
  194. package/dist/typescript/src/translations/translations.d.ts +421 -0
  195. package/dist/typescript/src/translations/translations.d.ts.map +1 -0
  196. package/package.json +4 -6
  197. package/src/index.ts +1 -1
  198. package/src/lib/Components/core/AddressInput/AddressInput.tsx +1 -1
  199. package/src/lib/Components/core/AmountDisplay/AmountDisplay.tsx +1 -1
  200. package/src/lib/Components/core/AmountInput/AmountInput.tsx +1 -1
  201. package/src/lib/Components/core/Avatar/Avatar.tsx +1 -1
  202. package/src/lib/Components/core/Banner/Banner.tsx +1 -1
  203. package/src/lib/Components/core/BottomSheet/BottomSheet.stories.tsx +12 -4
  204. package/src/lib/Components/core/BottomSheet/BottomSheetHeader.tsx +1 -1
  205. package/src/lib/Components/core/Card/Card.figma.tsx +1 -1
  206. package/src/lib/Components/core/Card/Card.stories.tsx +2 -2
  207. package/src/lib/Components/core/ContentBanner/ContentBanner.figma.tsx +1 -1
  208. package/src/lib/Components/core/ContentBanner/ContentBanner.mdx +4 -4
  209. package/src/lib/Components/core/ContentBanner/ContentBanner.stories.tsx +9 -9
  210. package/src/lib/Components/core/ContentBanner/ContentBanner.test.tsx +1 -1
  211. package/src/lib/Components/core/ContentBanner/ContentBanner.tsx +2 -2
  212. package/src/lib/Components/core/DotSymbol/DotSymbol.stories.tsx +5 -5
  213. package/src/lib/Components/core/ListItem/ListItem.figma.tsx +1 -1
  214. package/src/lib/Components/core/ListItem/ListItem.mdx +10 -10
  215. package/src/lib/Components/core/ListItem/ListItem.stories.tsx +29 -33
  216. package/src/lib/Components/core/ListItem/ListItem.tsx +1 -1
  217. package/src/lib/Components/core/MediaBanner/MediaBanner.tsx +1 -1
  218. package/src/lib/Components/core/MediaCard/MediaCard.tsx +1 -1
  219. package/src/lib/Components/core/NavBar/NavBar.tsx +1 -1
  220. package/src/lib/Components/core/SelectList/SelectList.mdx +1 -1
  221. package/src/lib/Components/core/SelectList/SelectList.stories.tsx +1 -1
  222. package/src/lib/Components/core/Spinner/Spinner.tsx +1 -1
  223. package/src/lib/Components/core/Spot/Spot.figma.tsx +42 -21
  224. package/src/lib/Components/core/Spot/Spot.mdx +47 -108
  225. package/src/lib/Components/core/Spot/Spot.stories.tsx +114 -175
  226. package/src/lib/Components/core/Spot/Spot.test.tsx +71 -0
  227. package/src/lib/Components/core/Spot/Spot.tsx +21 -163
  228. package/src/lib/Components/core/Spot/SpotNumber.test.tsx +93 -0
  229. package/src/lib/Components/core/Spot/SpotNumber.tsx +48 -0
  230. package/src/lib/Components/core/Spot/index.ts +1 -0
  231. package/src/lib/Components/core/Spot/types.ts +39 -41
  232. package/src/lib/Components/core/Spot/useSpotStyles.ts +119 -0
  233. package/src/lib/Components/core/Stepper/Stepper.tsx +1 -1
  234. package/src/lib/Components/core/Subheader/Subheader.tsx +3 -1
  235. package/src/lib/Components/core/ThemeProvider/ThemeProvider.test.tsx +12 -1
  236. package/src/lib/Components/core/ThemeProvider/ThemeProvider.tsx +3 -3
  237. package/src/lib/Components/core/ThemeProvider/types.ts +1 -1
  238. package/src/lib/Components/core/Tile/Tile.figma.tsx +1 -1
  239. package/src/lib/Components/core/Tile/Tile.mdx +8 -8
  240. package/src/lib/Components/core/Tile/Tile.stories.tsx +32 -25
  241. package/src/lib/Components/core/Tile/Tile.tsx +3 -3
  242. package/src/lib/Components/core/Toast/hooks/useToastAccessibility.ts +1 -1
  243. package/src/lib/Components/core/Trend/Trend.tsx +1 -1
  244. package/src/lib/Components/internal/BaseInput/BaseInput.tsx +1 -1
  245. package/src/lib/Components/symbols/icons/AiBubble.tsx +51 -0
  246. package/src/lib/Components/symbols/icons/ArrowBottomLeft.tsx +44 -0
  247. package/src/lib/Components/symbols/icons/Bug.tsx +1 -1
  248. package/src/lib/Components/symbols/icons/Hourglass.tsx +44 -0
  249. package/src/lib/Components/symbols/icons/Repeat.tsx +44 -0
  250. package/src/lib/Components/symbols/icons/Robot.tsx +44 -0
  251. package/src/lib/Components/symbols/icons/Switch.tsx +8 -1
  252. package/src/lib/Components/symbols/icons/Wifi.tsx +48 -0
  253. package/src/lib/Components/symbols/index.ts +6 -0
  254. package/src/lib/Components/visualization/CartesianChart/CartesianChart.tsx +4 -2
  255. package/src/lib/Components/visualization/CartesianChart/types.ts +1 -1
  256. package/src/lib/Components/visualization/DonutChart/DonutChart.test.tsx +1 -3
  257. package/src/lib/Components/visualization/DonutChart/DonutChart.tsx +7 -3
  258. package/src/lib/Components/visualization/DonutChart/DonutRing.tsx +11 -1
  259. package/src/lib/Components/visualization/DonutChart/types.ts +1 -1
  260. package/src/lib/Components/visualization/Legend/Legend.test.tsx +9 -8
  261. package/src/lib/Components/visualization/Legend/Legend.tsx +1 -1
  262. package/src/lib/Components/visualization/Legend/types.ts +2 -2
  263. package/src/lib/Components/visualization/LineChart/LineChart.tsx +10 -2
  264. package/src/lib/Components/visualization/LineChart/types.ts +1 -1
  265. package/src/lib/Components/visualization/LineChart/utils.test.ts +4 -0
  266. package/src/lib/Components/visualization/LineChart/utils.ts +6 -2
  267. package/src/lib/Components/visualization/config.ts +0 -3
  268. package/src/translations/index.ts +2 -0
  269. package/src/{i18n → translations}/languages.ts +0 -6
  270. package/src/{i18n → translations}/locales/de.json +0 -3
  271. package/{dist/module/i18n → src/translations}/locales/en.json +9 -3
  272. package/{dist/module/i18n → src/translations}/locales/es.json +0 -3
  273. package/src/{i18n → translations}/locales/fr.json +0 -3
  274. package/{dist/module/i18n → src/translations}/locales/ja.json +0 -3
  275. package/src/{i18n → translations}/locales/ko.json +0 -3
  276. package/src/{i18n → translations}/locales/pt.json +0 -3
  277. package/src/{i18n → translations}/locales/ru.json +0 -3
  278. package/src/{i18n → translations}/locales/th.json +0 -3
  279. package/src/{i18n → translations}/locales/tr.json +0 -3
  280. package/{dist/module/i18n → src/translations}/locales/zh.json +0 -3
  281. package/src/translations/translations.test.ts +56 -0
  282. package/src/translations/translations.ts +21 -0
  283. package/dist/module/i18n/I18nProvider.js +0 -20
  284. package/dist/module/i18n/I18nProvider.js.map +0 -1
  285. package/dist/module/i18n/i18n.js +0 -82
  286. package/dist/module/i18n/i18n.js.map +0 -1
  287. package/dist/module/i18n/index.js +0 -6
  288. package/dist/module/i18n/index.js.map +0 -1
  289. package/dist/module/i18n/languages.js.map +0 -1
  290. package/dist/module/i18n/useCommonTranslation.js +0 -8
  291. package/dist/module/i18n/useCommonTranslation.js.map +0 -1
  292. package/dist/typescript/src/i18n/I18nProvider.d.ts +0 -8
  293. package/dist/typescript/src/i18n/I18nProvider.d.ts.map +0 -1
  294. package/dist/typescript/src/i18n/i18n.d.ts +0 -13
  295. package/dist/typescript/src/i18n/i18n.d.ts.map +0 -1
  296. package/dist/typescript/src/i18n/index.d.ts +0 -4
  297. package/dist/typescript/src/i18n/index.d.ts.map +0 -1
  298. package/dist/typescript/src/i18n/languages.d.ts.map +0 -1
  299. package/dist/typescript/src/i18n/useCommonTranslation.d.ts +0 -2
  300. package/dist/typescript/src/i18n/useCommonTranslation.d.ts.map +0 -1
  301. package/src/i18n/I18nProvider.tsx +0 -20
  302. package/src/i18n/i18n.ts +0 -107
  303. package/src/i18n/index.ts +0 -3
  304. package/src/i18n/useCommonTranslation.ts +0 -6
@@ -1,22 +1,9 @@
1
1
  import { useDisabledContext } from '@ledgerhq/lumen-utils-shared';
2
- import { useMemo } from 'react';
3
- import { StyleSheet, Text } from 'react-native';
4
- import type { LumenTypographyTokens } from '../../../../styles';
5
- import { useStyleSheet } from '../../../../styles';
2
+ import { StyleSheet } from 'react-native';
6
3
  import { Box } from '../../primitives';
7
- import {
8
- BluetoothCircleFill,
9
- CheckmarkCircleFill,
10
- DeleteCircleFill,
11
- InformationFill,
12
- WarningFill,
13
- } from '../../symbols';
14
4
  import type { IconSize } from '../../symbols/Icon';
15
- import type { SpinnerProps } from '../Spinner';
16
- import { Spinner } from '../Spinner';
17
- import type { SpotAppearance, SpotProps, SpotSize } from './types';
18
-
19
- const BLUETOOTH_COLOR = '#0082FC';
5
+ import type { SpotProps, SpotSize } from './types';
6
+ import { useSpotStyles } from './useSpotStyles';
20
7
 
21
8
  const iconSizeMap: Record<SpotSize, IconSize> = {
22
9
  32: 12,
@@ -26,166 +13,37 @@ const iconSizeMap: Record<SpotSize, IconSize> = {
26
13
  72: 40,
27
14
  };
28
15
 
29
- const spotSizeMap: Record<SpotSize, number> = {
30
- 32: 32,
31
- 40: 40,
32
- 48: 48,
33
- 56: 56,
34
- 72: 72,
35
- };
36
-
37
- const numberTypographyMap: Record<SpotSize, keyof LumenTypographyTokens> = {
38
- 32: 'body2SemiBold',
39
- 40: 'body1SemiBold',
40
- 48: 'heading5',
41
- 56: 'heading4',
42
- 72: 'heading2',
43
- };
44
-
45
- const useStyles = ({
46
- size,
47
- appearance,
48
- disabled,
49
- }: {
50
- size: SpotSize;
51
- appearance: SpotAppearance;
52
- disabled?: boolean;
53
- }) => {
54
- return useStyleSheet(
55
- (t) => {
56
- const colorMap: Record<SpotAppearance, string> = {
57
- icon: t.colors.text.base,
58
- bluetooth: BLUETOOTH_COLOR,
59
- check: t.colors.text.success,
60
- error: t.colors.text.error,
61
- warning: t.colors.text.warning,
62
- info: t.colors.text.muted,
63
- loader: t.colors.text.base,
64
- number: t.colors.text.base,
65
- };
66
-
67
- const spotSize = spotSizeMap[size];
68
- const typography = t.typographies[numberTypographyMap[size]];
69
- const contentColor = disabled
70
- ? t.colors.text.disabled
71
- : colorMap[appearance];
72
-
73
- return {
74
- root: {
75
- alignItems: 'center',
76
- justifyContent: 'center',
77
- borderRadius: t.borderRadius.full,
78
- backgroundColor: t.colors.bg.mutedTransparent,
79
- width: spotSize,
80
- height: spotSize,
81
- flexShrink: 0,
82
- },
83
- icon: {
84
- color: contentColor,
85
- },
86
- numberText: StyleSheet.flatten([
87
- typography,
88
- {
89
- color: contentColor,
90
- },
91
- ]),
92
- };
93
- },
94
- [size, appearance, disabled],
95
- );
96
- };
97
-
98
16
  /**
99
- * A circular status indicator component that displays different types of content based on appearance.
100
- *
101
- * Uses a discriminated union type system where the required props depend on the `appearance` value:
102
- * - `'icon'` appearance requires an `icon` prop
103
- * - `'number'` appearance requires a `number` prop
104
- * - All other appearances are self-contained
17
+ * A circular icon container. `appearance` selects the color palette and `fill` selects whether that palette paints only the icon or the circle as well.
105
18
  *
106
19
  * @see {@link https://ldls-react-native.vercel.app/?path=/docs/rnative-spot--docs Storybook}
107
20
  *
108
21
  * @warning The `lx` prop should only be used for layout adjustments like margins or positioning.
109
- * Do not use it to modify the spot's core appearance (colors, size, etc). Use the `appearance` prop instead.
22
+ * Do not use it to modify the spot's core appearance (colors, size, etc). Use the `appearance` and `fill` props instead.
110
23
  *
111
24
  * @example
112
25
  * import { Spot } from '@ledgerhq/lumen-ui-rnative';
26
+ * import { Settings, CheckmarkCircleFill } from '@ledgerhq/lumen-ui-rnative/symbols';
113
27
  *
114
- * // Custom icon spot
115
- * import { Settings } from '@ledgerhq/lumen-ui-rnative/symbols';
116
- *
117
- * <Spot appearance="icon" icon={Settings} />
118
- *
119
- * // Number spot
120
- * <Spot appearance="number" number={5} />
121
- *
122
- * // Status indicators (no additional props needed)
123
- * <Spot appearance="check" />
124
- * <Spot appearance="error" />
125
- * <Spot appearance="warning" />
126
- * <Spot appearance="loader" />
127
- *
128
- * // Bluetooth states
129
- * <Spot appearance="bluetooth" />
130
- * <Spot appearance="bluetooth" disabled />
28
+ * <Spot icon={Settings} />
29
+ * <Spot appearance="success" icon={CheckmarkCircleFill} />
30
+ * <Spot appearance="success" fill="plain" icon={Settings} />
131
31
  */
132
- export const Spot = (props: SpotProps) => {
133
- const {
134
- appearance,
135
- disabled: disabledProp = false,
136
- size = 48,
137
- lx = {},
138
- style,
139
- ...rest
140
- } = props;
32
+ export const Spot = ({
33
+ appearance = 'base',
34
+ fill = 'transparent',
35
+ icon: Icon,
36
+ disabled: disabledProp = false,
37
+ size = 48,
38
+ lx = {},
39
+ style,
40
+ ...rest
41
+ }: SpotProps) => {
141
42
  const disabled = useDisabledContext({
142
43
  consumerName: 'Spot',
143
44
  mergeWith: { disabled: disabledProp },
144
45
  });
145
-
146
- const styles = useStyles({ size, appearance, disabled });
147
- const calculatedIconSize = iconSizeMap[size];
148
-
149
- const content = useMemo(() => {
150
- switch (props.appearance) {
151
- case 'icon': {
152
- const { icon: Icon } = props;
153
- return <Icon size={calculatedIconSize} style={styles.icon} />;
154
- }
155
- case 'number': {
156
- return (
157
- <Text style={styles.numberText} allowFontScaling={false}>
158
- {props.number}
159
- </Text>
160
- );
161
- }
162
- case 'bluetooth':
163
- return (
164
- <BluetoothCircleFill size={calculatedIconSize} style={styles.icon} />
165
- );
166
- case 'check':
167
- return (
168
- <CheckmarkCircleFill size={calculatedIconSize} style={styles.icon} />
169
- );
170
- case 'error':
171
- return (
172
- <DeleteCircleFill size={calculatedIconSize} style={styles.icon} />
173
- );
174
- case 'warning':
175
- return <WarningFill size={calculatedIconSize} style={styles.icon} />;
176
- case 'info':
177
- return (
178
- <InformationFill size={calculatedIconSize} style={styles.icon} />
179
- );
180
- case 'loader':
181
- return (
182
- <Spinner
183
- size={calculatedIconSize}
184
- color={styles.icon.color as SpinnerProps['color']}
185
- />
186
- );
187
- }
188
- }, [props, calculatedIconSize, styles.icon, styles.numberText]);
46
+ const styles = useSpotStyles({ size, appearance, fill, disabled });
189
47
 
190
48
  return (
191
49
  <Box
@@ -194,7 +52,7 @@ export const Spot = (props: SpotProps) => {
194
52
  style={StyleSheet.flatten([styles.root, style])}
195
53
  {...rest}
196
54
  >
197
- {content}
55
+ <Icon size={iconSizeMap[size]} style={styles.icon} />
198
56
  </Box>
199
57
  );
200
58
  };
@@ -0,0 +1,93 @@
1
+ import { describe, expect, it } from '@jest/globals';
2
+ import { ledgerLiveThemes } from '@ledgerhq/lumen-design-core';
3
+ import { render, screen } from '@testing-library/react-native';
4
+ import type { ReactNode } from 'react';
5
+ import { StyleSheet } from 'react-native';
6
+ import { ThemeProvider } from '../ThemeProvider/ThemeProvider';
7
+ import { SpotNumber } from './SpotNumber';
8
+ import type { SpotSize } from './types';
9
+
10
+ const { colors } = ledgerLiveThemes.dark;
11
+ const typographies = {
12
+ ...ledgerLiveThemes.dark.typographies.xs.heading,
13
+ ...ledgerLiveThemes.dark.typographies.xs.body,
14
+ };
15
+
16
+ const TestWrapper = ({ children }: { children: ReactNode }) => (
17
+ <ThemeProvider themes={ledgerLiveThemes} colorScheme='dark' locale='en'>
18
+ {children}
19
+ </ThemeProvider>
20
+ );
21
+
22
+ const sizeTypography: [SpotSize, keyof typeof typographies][] = [
23
+ [32, 'body2SemiBold'],
24
+ [40, 'body1SemiBold'],
25
+ [48, 'heading5'],
26
+ [56, 'heading4'],
27
+ [72, 'heading2'],
28
+ ];
29
+
30
+ describe('SpotNumber', () => {
31
+ it('should color the digit when fill is transparent', () => {
32
+ render(
33
+ <TestWrapper>
34
+ <SpotNumber appearance='success' value={5} />
35
+ </TestWrapper>,
36
+ );
37
+
38
+ expect(screen.getByTestId('spot-number').props.style.backgroundColor).toBe(
39
+ colors.bg.mutedTransparent,
40
+ );
41
+ expect(StyleSheet.flatten(screen.getByText('5').props.style)).toEqual(
42
+ expect.objectContaining({
43
+ color: colors.text.success,
44
+ fontSize: typographies.heading5.fontSize,
45
+ }),
46
+ );
47
+ });
48
+
49
+ it('should paint the circle and a paired text color when fill is plain', () => {
50
+ render(
51
+ <TestWrapper>
52
+ <SpotNumber appearance='success' fill='plain' value={5} />
53
+ </TestWrapper>,
54
+ );
55
+
56
+ expect(screen.getByTestId('spot-number').props.style.backgroundColor).toBe(
57
+ colors.bg.success,
58
+ );
59
+ expect(StyleSheet.flatten(screen.getByText('5').props.style).color).toBe(
60
+ colors.text.successStrong,
61
+ );
62
+ });
63
+
64
+ it('should use the disabled text color', () => {
65
+ render(
66
+ <TestWrapper>
67
+ <SpotNumber appearance='success' disabled value={5} />
68
+ </TestWrapper>,
69
+ );
70
+
71
+ expect(screen.getByTestId('spot-number').props.style.backgroundColor).toBe(
72
+ colors.bg.mutedTransparent,
73
+ );
74
+ expect(StyleSheet.flatten(screen.getByText('5').props.style).color).toBe(
75
+ colors.text.disabled,
76
+ );
77
+ });
78
+
79
+ it.each(sizeTypography)(
80
+ 'should apply size %s typography %s',
81
+ (size, token) => {
82
+ render(
83
+ <TestWrapper>
84
+ <SpotNumber size={size} value={5} />
85
+ </TestWrapper>,
86
+ );
87
+
88
+ expect(
89
+ StyleSheet.flatten(screen.getByText('5').props.style).fontSize,
90
+ ).toBe(typographies[token].fontSize);
91
+ },
92
+ );
93
+ });
@@ -0,0 +1,48 @@
1
+ import { useDisabledContext } from '@ledgerhq/lumen-utils-shared';
2
+ import { StyleSheet, Text } from 'react-native';
3
+ import { Box } from '../../primitives';
4
+ import type { SpotNumberProps } from './types';
5
+ import { useSpotStyles } from './useSpotStyles';
6
+
7
+ /**
8
+ * A circular digit. Uses the same palette, fill, and size as `Spot`.
9
+ *
10
+ * @see {@link https://ldls-react-native.vercel.app/?path=/docs/rnative-spot--docs Storybook}
11
+ *
12
+ * @warning The `lx` prop should only be used for layout adjustments like margins or positioning.
13
+ * Do not use it to modify the circle's core appearance (colors, size, etc). Use the `appearance` and `fill` props instead.
14
+ *
15
+ * @example
16
+ * import { SpotNumber } from '@ledgerhq/lumen-ui-rnative';
17
+ *
18
+ * <SpotNumber value={9} />
19
+ */
20
+ export const SpotNumber = ({
21
+ appearance = 'base',
22
+ fill = 'transparent',
23
+ value,
24
+ disabled: disabledProp = false,
25
+ size = 48,
26
+ lx = {},
27
+ style,
28
+ ...rest
29
+ }: SpotNumberProps) => {
30
+ const disabled = useDisabledContext({
31
+ consumerName: 'SpotNumber',
32
+ mergeWith: { disabled: disabledProp },
33
+ });
34
+ const styles = useSpotStyles({ size, appearance, fill, disabled });
35
+
36
+ return (
37
+ <Box
38
+ testID='spot-number'
39
+ lx={lx}
40
+ style={StyleSheet.flatten([styles.root, style])}
41
+ {...rest}
42
+ >
43
+ <Text style={styles.numberText} allowFontScaling={false}>
44
+ {value}
45
+ </Text>
46
+ </Box>
47
+ );
48
+ };
@@ -1,2 +1,3 @@
1
1
  export * from './Spot';
2
+ export * from './SpotNumber';
2
3
  export * from './types';
@@ -1,54 +1,40 @@
1
1
  import type { ComponentType } from 'react';
2
+ import type { StyleProp, TextStyle } from 'react-native';
2
3
  import type { StyledViewProps } from '../../../../styles';
3
- import type { IconProps } from '../../symbols/Icon';
4
+ import type { IconSize } from '../../symbols/Icon';
4
5
 
5
6
  export type SpotAppearance =
6
- | 'icon'
7
- | 'bluetooth'
8
- | 'check'
7
+ | 'base'
8
+ | 'success'
9
9
  | 'error'
10
10
  | 'warning'
11
- | 'info'
12
- | 'loader'
13
- | 'number';
11
+ | 'muted'
12
+ | 'decorative-blue'
13
+ | 'decorative-pink'
14
+ | 'decorative-purple'
15
+ | 'decorative-green'
16
+ | 'decorative-turquoise'
17
+ | 'decorative-yellow'
18
+ | 'decorative-orange'
19
+ | 'decorative-red';
14
20
 
15
- type IconSpotProps = {
16
- /**
17
- * Displays a custom icon with neutral base styling.
18
- */
19
- appearance: 'icon';
20
- /**
21
- * A React component to be rendered as the icon. Required when appearance is 'icon'.
22
- */
23
- icon: ComponentType<IconProps>;
24
- };
21
+ export type SpotFill = 'transparent' | 'plain';
22
+
23
+ export type SpotSize = 32 | 40 | 48 | 56 | 72;
25
24
 
26
- type NumberSpotProps = {
25
+ export type SpotDigit = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9;
26
+
27
+ export type SpotProps = {
27
28
  /**
28
- * Displays a single digit (0-9) with number styling.
29
+ * Color palette for the icon, and for the circle when `fill` is plain.
30
+ * @default 'base'
29
31
  */
30
- appearance: 'number';
32
+ appearance?: SpotAppearance;
31
33
  /**
32
- * A single digit from 0 to 9 to display. Required when appearance is 'number'.
34
+ * Circle treatment. Transparent keeps a muted transparent fill. Plain uses the palette's solid background and paired text color.
35
+ * @default 'transparent'
33
36
  */
34
- number: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9;
35
- };
36
-
37
- type StatusSpotProps = {
38
- /**
39
- * Self-contained predefined status indicators with semantic styling.
40
- */
41
- appearance: Exclude<SpotAppearance, 'icon' | 'number'>;
42
- };
43
-
44
- export type DiscriminatedSpotProps =
45
- | IconSpotProps
46
- | NumberSpotProps
47
- | StatusSpotProps;
48
-
49
- export type SpotSize = 32 | 40 | 48 | 56 | 72;
50
-
51
- export type SpotProps = {
37
+ fill?: SpotFill;
52
38
  /**
53
39
  * Whether the spot is disabled.
54
40
  * @default false
@@ -59,5 +45,17 @@ export type SpotProps = {
59
45
  * @default 48
60
46
  */
61
47
  size?: SpotSize;
62
- } & DiscriminatedSpotProps &
63
- StyledViewProps;
48
+ /**
49
+ * Icon rendered inside the circle.
50
+ * @required
51
+ */
52
+ icon: ComponentType<{ size?: IconSize; style?: StyleProp<TextStyle> }>;
53
+ } & Omit<StyledViewProps, 'children'>;
54
+
55
+ export type SpotNumberProps = {
56
+ /**
57
+ * Digit rendered inside the circle.
58
+ * @required
59
+ */
60
+ value: SpotDigit;
61
+ } & Omit<SpotProps, 'icon'>;
@@ -0,0 +1,119 @@
1
+ import type { TextStyle, ViewStyle } from 'react-native';
2
+ import { StyleSheet } from 'react-native';
3
+ import type { LumenTypographyTokens } from '../../../../styles';
4
+ import { useStyleSheet } from '../../../../styles';
5
+ import type { SpotAppearance, SpotFill, SpotSize } from './types';
6
+
7
+ const numberTypographyMap: Record<SpotSize, keyof LumenTypographyTokens> = {
8
+ 32: 'body2SemiBold',
9
+ 40: 'body1SemiBold',
10
+ 48: 'heading5',
11
+ 56: 'heading4',
12
+ 72: 'heading2',
13
+ };
14
+
15
+ export type SpotStyles = {
16
+ root: ViewStyle;
17
+ icon: TextStyle;
18
+ numberText: TextStyle;
19
+ };
20
+
21
+ export const useSpotStyles = ({
22
+ size,
23
+ appearance,
24
+ fill,
25
+ disabled,
26
+ }: {
27
+ size: SpotSize;
28
+ appearance: SpotAppearance;
29
+ fill: SpotFill;
30
+ disabled?: boolean;
31
+ }): SpotStyles => {
32
+ return useStyleSheet(
33
+ (t) => {
34
+ const textColors: Record<SpotFill, Record<SpotAppearance, string>> = {
35
+ transparent: {
36
+ base: t.colors.text.base,
37
+ success: t.colors.text.success,
38
+ error: t.colors.text.error,
39
+ warning: t.colors.text.warning,
40
+ muted: t.colors.text.muted,
41
+ 'decorative-blue': t.colors.text.decorativeBlue,
42
+ 'decorative-pink': t.colors.text.decorativePink,
43
+ 'decorative-purple': t.colors.text.decorativePurple,
44
+ 'decorative-green': t.colors.text.decorativeGreen,
45
+ 'decorative-turquoise': t.colors.text.decorativeTurquoise,
46
+ 'decorative-yellow': t.colors.text.decorativeYellow,
47
+ 'decorative-orange': t.colors.text.decorativeOrange,
48
+ 'decorative-red': t.colors.text.decorativeRed,
49
+ },
50
+ plain: {
51
+ base: t.colors.text.base,
52
+ success: t.colors.text.successStrong,
53
+ error: t.colors.text.errorStrong,
54
+ warning: t.colors.text.warningStrong,
55
+ muted: t.colors.text.muted,
56
+ 'decorative-blue': t.colors.text.decorativeStrongBlue,
57
+ 'decorative-pink': t.colors.text.decorativeStrongPink,
58
+ 'decorative-purple': t.colors.text.decorativeStrongPurple,
59
+ 'decorative-green': t.colors.text.decorativeStrongGreen,
60
+ 'decorative-turquoise': t.colors.text.decorativeStrongTurquoise,
61
+ 'decorative-yellow': t.colors.text.decorativeStrongYellow,
62
+ 'decorative-orange': t.colors.text.decorativeStrongOrange,
63
+ 'decorative-red': t.colors.text.decorativeStrongRed,
64
+ },
65
+ };
66
+
67
+ const plainBackgroundColor: Record<SpotAppearance, string> = {
68
+ base: t.colors.bg.muted,
69
+ success: t.colors.bg.success,
70
+ error: t.colors.bg.error,
71
+ warning: t.colors.bg.warning,
72
+ muted: t.colors.bg.mutedPressed,
73
+ 'decorative-blue': t.colors.bg.decorativeBlue,
74
+ 'decorative-pink': t.colors.bg.decorativePink,
75
+ 'decorative-purple': t.colors.bg.decorativePurple,
76
+ 'decorative-green': t.colors.bg.decorativeGreen,
77
+ 'decorative-turquoise': t.colors.bg.decorativeTurquoise,
78
+ 'decorative-yellow': t.colors.bg.decorativeYellow,
79
+ 'decorative-orange': t.colors.bg.decorativeOrange,
80
+ 'decorative-red': t.colors.bg.decorativeRed,
81
+ };
82
+
83
+ const spotSize: Record<SpotSize, number> = {
84
+ 32: t.sizes.s32,
85
+ 40: t.sizes.s40,
86
+ 48: t.sizes.s48,
87
+ 56: t.sizes.s56,
88
+ 72: t.sizes.s72,
89
+ };
90
+
91
+ const contentColor = disabled
92
+ ? t.colors.text.disabled
93
+ : textColors[fill][appearance];
94
+
95
+ return {
96
+ root: {
97
+ alignItems: 'center',
98
+ justifyContent: 'center',
99
+ borderRadius: t.borderRadius.full,
100
+ backgroundColor:
101
+ fill === 'plain'
102
+ ? plainBackgroundColor[appearance]
103
+ : t.colors.bg.mutedTransparent,
104
+ width: spotSize[size],
105
+ height: spotSize[size],
106
+ flexShrink: 0,
107
+ },
108
+ icon: {
109
+ color: contentColor,
110
+ },
111
+ numberText: StyleSheet.flatten([
112
+ t.typographies[numberTypographyMap[size]],
113
+ { color: contentColor },
114
+ ]),
115
+ };
116
+ },
117
+ [size, appearance, fill, disabled],
118
+ );
119
+ };
@@ -10,8 +10,8 @@ import Animated, {
10
10
  withTiming,
11
11
  } from 'react-native-reanimated';
12
12
  import Svg, { Circle, Defs, Mask } from 'react-native-svg';
13
- import { useCommonTranslation } from '../../../../i18n';
14
13
  import { useTheme } from '../../../../styles';
14
+ import { useCommonTranslation } from '../../../../translations';
15
15
  import { useTimingConfig } from '../../animations/useTimingConfig';
16
16
  import { Box } from '../../primitives/Box';
17
17
  import { Text } from '../../primitives/Text';
@@ -1,5 +1,6 @@
1
1
  import { StyleSheet } from 'react-native';
2
2
  import { useStyleSheet } from '../../../../styles';
3
+ import { useCommonTranslation } from '../../../../translations';
3
4
  import { Box, Pressable, Text } from '../../primitives';
4
5
  import { ChevronRight, Information } from '../../symbols';
5
6
  import { InteractiveIcon } from '../InteractiveIcon';
@@ -130,12 +131,13 @@ export const SubheaderInfo = ({
130
131
  style,
131
132
  ...props
132
133
  }: SubheaderInfoProps) => {
134
+ const { t } = useCommonTranslation();
133
135
  return (
134
136
  <InteractiveIcon
135
137
  iconType={iconType}
136
138
  icon={Information}
137
139
  size={16}
138
- accessibilityLabel='More information'
140
+ accessibilityLabel={t('components.subheader.moreInfoAriaLabel')}
139
141
  style={style}
140
142
  {...props}
141
143
  />
@@ -4,6 +4,7 @@ import { render, screen } from '@testing-library/react-native';
4
4
  import { Box, Text } from '../../primitives';
5
5
  import { ChevronBigLeft, Wallet } from '../../symbols';
6
6
  import { Button } from '../Button';
7
+ import { Spinner } from '../Spinner';
7
8
  import { Spot } from '../Spot';
8
9
  import { Tile } from '../Tile/Tile';
9
10
  import { ThemeProvider } from './ThemeProvider';
@@ -14,7 +15,7 @@ describe('ThemeProvider', () => {
14
15
  <ThemeProvider themes={ledgerLiveThemes}>
15
16
  <Button testID='child'>Hello World</Button>
16
17
  <Tile>Tile</Tile>
17
- <Spot appearance='icon' icon={Wallet} />
18
+ <Spot icon={Wallet} />
18
19
  <Box>
19
20
  <Text>Text</Text>
20
21
  </Box>
@@ -25,4 +26,14 @@ describe('ThemeProvider', () => {
25
26
  expect(screen.getByTestId('child')).toBeTruthy();
26
27
  expect(screen.getByText('Hello World')).toBeTruthy();
27
28
  });
29
+
30
+ it('translates Lumen components in the given locale', () => {
31
+ render(
32
+ <ThemeProvider themes={ledgerLiveThemes} locale='fr'>
33
+ <Spinner />
34
+ </ThemeProvider>,
35
+ );
36
+
37
+ expect(screen.getByLabelText('Chargement')).toBeTruthy();
38
+ });
28
39
  });
@@ -1,7 +1,7 @@
1
1
  import { createSafeContext } from '@ledgerhq/lumen-utils-shared';
2
2
 
3
- import { I18nProvider } from '../../../../i18n';
4
3
  import { LumenStyleSheetProvider } from '../../../../styles';
4
+ import { TranslationsProvider } from '../../../../translations';
5
5
 
6
6
  import { GlobalTooltipProvider } from '../Tooltip/GlobalTooltipContext';
7
7
  import type { ThemeProviderProps } from './types';
@@ -17,9 +17,9 @@ const ThemeProvider = ({
17
17
  return (
18
18
  <ThemeContextProvider value={{}}>
19
19
  <LumenStyleSheetProvider colorScheme={colorScheme} themes={themes}>
20
- <I18nProvider locale={locale}>
20
+ <TranslationsProvider locale={locale}>
21
21
  <GlobalTooltipProvider>{children}</GlobalTooltipProvider>
22
- </I18nProvider>
22
+ </TranslationsProvider>
23
23
  </LumenStyleSheetProvider>
24
24
  </ThemeContextProvider>
25
25
  );
@@ -1,7 +1,7 @@
1
1
  import type { PropsWithChildren } from 'react';
2
2
  import type { ColorSchemeName } from 'react-native';
3
- import type { SupportedLocale } from '../../../../i18n/languages';
4
3
  import type { LumenThemes } from '../../../../styles';
4
+ import type { SupportedLocale } from '../../../../translations/languages';
5
5
 
6
6
  export type ThemeProviderProps = PropsWithChildren & {
7
7
  /**