@ledgerhq/lumen-ui-rnative 0.1.68 → 0.1.70

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 (373) hide show
  1. package/dist/module/lib/Components/animations/Pulse/Pulse.stories.js +7 -0
  2. package/dist/module/lib/Components/animations/Pulse/Pulse.stories.js.map +1 -1
  3. package/dist/module/lib/Components/animations/Spin/Spin.stories.js +7 -0
  4. package/dist/module/lib/Components/animations/Spin/Spin.stories.js.map +1 -1
  5. package/dist/module/lib/Components/core/AddressInput/AddressInput.stories.js +129 -136
  6. package/dist/module/lib/Components/core/AddressInput/AddressInput.stories.js.map +1 -1
  7. package/dist/module/lib/Components/core/AmountDisplay/AmountDisplay.stories.js +12 -6
  8. package/dist/module/lib/Components/core/AmountDisplay/AmountDisplay.stories.js.map +1 -1
  9. package/dist/module/lib/Components/core/AmountInput/AmountInput.stories.js +154 -176
  10. package/dist/module/lib/Components/core/AmountInput/AmountInput.stories.js.map +1 -1
  11. package/dist/module/lib/Components/core/Avatar/Avatar.stories.js +54 -47
  12. package/dist/module/lib/Components/core/Avatar/Avatar.stories.js.map +1 -1
  13. package/dist/module/lib/Components/core/AvatarButton/AvatarButton.stories.js +2 -9
  14. package/dist/module/lib/Components/core/AvatarButton/AvatarButton.stories.js.map +1 -1
  15. package/dist/module/lib/Components/core/Banner/Banner.stories.js +48 -87
  16. package/dist/module/lib/Components/core/Banner/Banner.stories.js.map +1 -1
  17. package/dist/module/lib/Components/core/Button/Button.figma.js +2 -1
  18. package/dist/module/lib/Components/core/Button/Button.figma.js.map +1 -1
  19. package/dist/module/lib/Components/core/Button/Button.mdx +2 -1
  20. package/dist/module/lib/Components/core/Button/Button.stories.js +34 -10
  21. package/dist/module/lib/Components/core/Button/Button.stories.js.map +1 -1
  22. package/dist/module/lib/Components/core/Card/Card.mdx +6 -0
  23. package/dist/module/lib/Components/core/Card/Card.stories.js +63 -24
  24. package/dist/module/lib/Components/core/Card/Card.stories.js.map +1 -1
  25. package/dist/module/lib/Components/core/CardButton/CardButton.stories.js +27 -85
  26. package/dist/module/lib/Components/core/CardButton/CardButton.stories.js.map +1 -1
  27. package/dist/module/lib/Components/core/Checkbox/Checkbox.stories.js +1 -1
  28. package/dist/module/lib/Components/core/ContentBanner/ContentBanner.stories.js +8 -18
  29. package/dist/module/lib/Components/core/ContentBanner/ContentBanner.stories.js.map +1 -1
  30. package/dist/module/lib/Components/core/DescriptionItem/DescriptionItem.stories.js +28 -0
  31. package/dist/module/lib/Components/core/DescriptionItem/DescriptionItem.stories.js.map +1 -1
  32. package/dist/module/lib/Components/core/Divider/Divider.stories.js +7 -0
  33. package/dist/module/lib/Components/core/Divider/Divider.stories.js.map +1 -1
  34. package/dist/module/lib/Components/core/DotCount/DotCount.stories.js +28 -0
  35. package/dist/module/lib/Components/core/DotCount/DotCount.stories.js.map +1 -1
  36. package/dist/module/lib/Components/core/DotIcon/DotIcon.stories.js +12 -0
  37. package/dist/module/lib/Components/core/DotIcon/DotIcon.stories.js.map +1 -1
  38. package/dist/module/lib/Components/core/DotIndicator/DotIndicator.stories.js +21 -0
  39. package/dist/module/lib/Components/core/DotIndicator/DotIndicator.stories.js.map +1 -1
  40. package/dist/module/lib/Components/core/DotSymbol/DotSymbol.stories.js +21 -0
  41. package/dist/module/lib/Components/core/DotSymbol/DotSymbol.stories.js.map +1 -1
  42. package/dist/module/lib/Components/core/IconButton/IconButton.stories.js +17 -0
  43. package/dist/module/lib/Components/core/IconButton/IconButton.stories.js.map +1 -1
  44. package/dist/module/lib/Components/core/InteractiveIcon/InteractiveIcon.stories.js +15 -21
  45. package/dist/module/lib/Components/core/InteractiveIcon/InteractiveIcon.stories.js.map +1 -1
  46. package/dist/module/lib/Components/core/Link/Link.js +1 -1
  47. package/dist/module/lib/Components/core/Link/Link.mdx +32 -5
  48. package/dist/module/lib/Components/core/Link/Link.stories.js +35 -139
  49. package/dist/module/lib/Components/core/Link/Link.stories.js.map +1 -1
  50. package/dist/module/lib/Components/core/Link/Link.test.js +1 -1
  51. package/dist/module/lib/Components/core/ListItem/ListItem.stories.js +2 -41
  52. package/dist/module/lib/Components/core/ListItem/ListItem.stories.js.map +1 -1
  53. package/dist/module/lib/Components/core/MediaBanner/MediaBanner.stories.js +19 -12
  54. package/dist/module/lib/Components/core/MediaBanner/MediaBanner.stories.js.map +1 -1
  55. package/dist/module/lib/Components/core/MediaButton/MediaButton.stories.js +2 -13
  56. package/dist/module/lib/Components/core/MediaButton/MediaButton.stories.js.map +1 -1
  57. package/dist/module/lib/Components/core/MediaCard/MediaCard.stories.js +24 -50
  58. package/dist/module/lib/Components/core/MediaCard/MediaCard.stories.js.map +1 -1
  59. package/dist/module/lib/Components/core/MediaImage/MediaImage.js +1 -1
  60. package/dist/module/lib/Components/core/MediaImage/MediaImage.js.map +1 -1
  61. package/dist/module/lib/Components/core/MediaImage/MediaImage.stories.js +1 -1
  62. package/dist/module/lib/Components/core/MediaImageGroup/MediaImageGroup.figma.js +215 -0
  63. package/dist/module/lib/Components/core/MediaImageGroup/MediaImageGroup.figma.js.map +1 -0
  64. package/dist/module/lib/Components/core/MediaImageGroup/MediaImageGroup.js +221 -0
  65. package/dist/module/lib/Components/core/MediaImageGroup/MediaImageGroup.js.map +1 -0
  66. package/dist/module/lib/Components/core/MediaImageGroup/MediaImageGroup.mdx +96 -0
  67. package/dist/module/lib/Components/core/MediaImageGroup/MediaImageGroup.stories.js +258 -0
  68. package/dist/module/lib/Components/core/MediaImageGroup/MediaImageGroup.stories.js.map +1 -0
  69. package/dist/module/lib/Components/core/MediaImageGroup/MediaImageGroup.test.js +246 -0
  70. package/dist/module/lib/Components/core/MediaImageGroup/MediaImageGroup.test.js.map +1 -0
  71. package/dist/module/lib/Components/core/MediaImageGroup/index.js +5 -0
  72. package/dist/module/lib/Components/core/MediaImageGroup/index.js.map +1 -0
  73. package/dist/module/lib/Components/core/MediaImageGroup/types.js +4 -0
  74. package/dist/module/lib/Components/core/MediaImageGroup/types.js.map +1 -0
  75. package/dist/module/lib/Components/core/MediaTag/MediaTag.stories.js +9 -0
  76. package/dist/module/lib/Components/core/MediaTag/MediaTag.stories.js.map +1 -1
  77. package/dist/module/lib/Components/core/MenuList/MenuList.mdx +2 -2
  78. package/dist/module/lib/Components/core/MenuList/MenuList.stories.js +17 -1
  79. package/dist/module/lib/Components/core/MenuList/MenuList.stories.js.map +1 -1
  80. package/dist/module/lib/Components/core/PageIndicator/PageIndicator.figma.js +1 -1
  81. package/dist/module/lib/Components/core/PageIndicator/PageIndicator.figma.js.map +1 -1
  82. package/dist/module/lib/Components/core/PageIndicator/PageIndicator.stories.js +56 -50
  83. package/dist/module/lib/Components/core/PageIndicator/PageIndicator.stories.js.map +1 -1
  84. package/dist/module/lib/Components/core/Pagination/Pagination.figma.js +22 -0
  85. package/dist/module/lib/Components/core/Pagination/Pagination.figma.js.map +1 -0
  86. package/dist/module/lib/Components/core/Pagination/Pagination.js +182 -0
  87. package/dist/module/lib/Components/core/Pagination/Pagination.js.map +1 -0
  88. package/dist/module/lib/Components/core/Pagination/Pagination.mdx +108 -0
  89. package/dist/module/lib/Components/core/Pagination/Pagination.stories.js +121 -0
  90. package/dist/module/lib/Components/core/Pagination/Pagination.stories.js.map +1 -0
  91. package/dist/module/lib/Components/core/Pagination/Pagination.test.js +338 -0
  92. package/dist/module/lib/Components/core/Pagination/Pagination.test.js.map +1 -0
  93. package/dist/module/lib/Components/core/Pagination/index.js +4 -0
  94. package/dist/module/lib/Components/core/Pagination/index.js.map +1 -0
  95. package/dist/module/lib/Components/core/Pagination/types.js +4 -0
  96. package/dist/module/lib/Components/core/Pagination/types.js.map +1 -0
  97. package/dist/module/lib/Components/core/SearchInput/SearchInput.stories.js +75 -67
  98. package/dist/module/lib/Components/core/SearchInput/SearchInput.stories.js.map +1 -1
  99. package/dist/module/lib/Components/core/SegmentedControl/SegmentedControl.stories.js +12 -0
  100. package/dist/module/lib/Components/core/SegmentedControl/SegmentedControl.stories.js.map +1 -1
  101. package/dist/module/lib/Components/core/SelectList/SelectList.mdx +3 -1
  102. package/dist/module/lib/Components/core/SelectList/SelectList.stories.js +3 -3
  103. package/dist/module/lib/Components/core/SelectList/SelectList.stories.js.map +1 -1
  104. package/dist/module/lib/Components/core/Skeleton/Skeleton.stories.js +7 -0
  105. package/dist/module/lib/Components/core/Skeleton/Skeleton.stories.js.map +1 -1
  106. package/dist/module/lib/Components/core/Spinner/Spinner.stories.js +7 -0
  107. package/dist/module/lib/Components/core/Spinner/Spinner.stories.js.map +1 -1
  108. package/dist/module/lib/Components/core/Spot/Spot.stories.js +20 -1
  109. package/dist/module/lib/Components/core/Spot/Spot.stories.js.map +1 -1
  110. package/dist/module/lib/Components/core/Stepper/Stepper.stories.js +7 -0
  111. package/dist/module/lib/Components/core/Stepper/Stepper.stories.js.map +1 -1
  112. package/dist/module/lib/Components/core/Subheader/Subheader.stories.js +11 -1
  113. package/dist/module/lib/Components/core/Subheader/Subheader.stories.js.map +1 -1
  114. package/dist/module/lib/Components/core/Switch/Switch.stories.js +21 -1
  115. package/dist/module/lib/Components/core/Switch/Switch.stories.js.map +1 -1
  116. package/dist/module/lib/Components/core/TabBar/TabBar.stories.js +17 -5
  117. package/dist/module/lib/Components/core/TabBar/TabBar.stories.js.map +1 -1
  118. package/dist/module/lib/Components/core/Tag/Tag.stories.js +28 -0
  119. package/dist/module/lib/Components/core/Tag/Tag.stories.js.map +1 -1
  120. package/dist/module/lib/Components/core/TextInput/TextInput.stories.js +159 -196
  121. package/dist/module/lib/Components/core/TextInput/TextInput.stories.js.map +1 -1
  122. package/dist/module/lib/Components/core/TextInput/TextInput.test.js +2 -2
  123. package/dist/module/lib/Components/core/TextInput/TextInput.test.js.map +1 -1
  124. package/dist/module/lib/Components/core/Tile/Tile.stories.js +2 -35
  125. package/dist/module/lib/Components/core/Tile/Tile.stories.js.map +1 -1
  126. package/dist/module/lib/Components/core/TileButton/TileButton.stories.js +18 -8
  127. package/dist/module/lib/Components/core/TileButton/TileButton.stories.js.map +1 -1
  128. package/dist/module/lib/Components/core/Timeline/Timeline.js +81 -67
  129. package/dist/module/lib/Components/core/Timeline/Timeline.js.map +1 -1
  130. package/dist/module/lib/Components/core/Timeline/Timeline.stories.js +46 -16
  131. package/dist/module/lib/Components/core/Timeline/Timeline.stories.js.map +1 -1
  132. package/dist/module/lib/Components/core/Timeline/Timeline.test.js +8 -5
  133. package/dist/module/lib/Components/core/Timeline/Timeline.test.js.map +1 -1
  134. package/dist/module/lib/Components/core/Toast/Toast.mdx +1 -1
  135. package/dist/module/lib/Components/core/Toast/Toast.stories.js +61 -58
  136. package/dist/module/lib/Components/core/Toast/Toast.stories.js.map +1 -1
  137. package/dist/module/lib/Components/core/Toast/Toaster.test.js +1 -1
  138. package/dist/module/lib/Components/core/Toast/Toaster.test.js.map +1 -1
  139. package/dist/module/lib/Components/core/Tooltip/Tooltip.stories.js +31 -2
  140. package/dist/module/lib/Components/core/Tooltip/Tooltip.stories.js.map +1 -1
  141. package/dist/module/lib/Components/core/Trend/Trend.stories.js +9 -0
  142. package/dist/module/lib/Components/core/Trend/Trend.stories.js.map +1 -1
  143. package/dist/module/lib/Components/core/index.js +2 -0
  144. package/dist/module/lib/Components/core/index.js.map +1 -1
  145. package/dist/module/lib/Components/internal/BaseButton/BaseButton.js +5 -2
  146. package/dist/module/lib/Components/internal/BaseButton/BaseButton.js.map +1 -1
  147. package/dist/module/lib/Components/internal/BaseButton/BaseButton.test.js +1 -1
  148. package/dist/module/lib/Components/internal/BaseButton/BaseButton.test.js.map +1 -1
  149. package/dist/module/lib/Components/primitives/Box/Box.stories.js +1 -18
  150. package/dist/module/lib/Components/primitives/Box/Box.stories.js.map +1 -1
  151. package/dist/module/lib/Components/primitives/Gradient/LinearGradient/LinearGradient.stories.js +36 -0
  152. package/dist/module/lib/Components/primitives/Gradient/LinearGradient/LinearGradient.stories.js.map +1 -1
  153. package/dist/module/lib/Components/primitives/Gradient/RadialGradient/RadialGradient.stories.js +1 -1
  154. package/dist/module/lib/Components/primitives/Pressable/Pressable.stories.js +1 -19
  155. package/dist/module/lib/Components/primitives/Pressable/Pressable.stories.js.map +1 -1
  156. package/dist/module/lib/Components/primitives/Text/Text.stories.js +1 -12
  157. package/dist/module/lib/Components/primitives/Text/Text.stories.js.map +1 -1
  158. package/dist/module/lib/Components/symbols/Icon/Icon.stories.js +128 -85
  159. package/dist/module/lib/Components/symbols/Icon/Icon.stories.js.map +1 -1
  160. package/dist/module/lib/Components/symbols/icons/Ar.js +2 -2
  161. package/dist/module/lib/Components/symbols/icons/Ar.js.map +1 -1
  162. package/dist/module/lib/Components/symbols/icons/Range.js +1 -1
  163. package/dist/module/lib/Components/symbols/icons/Share.js +1 -1
  164. package/dist/module/lib/Components/symbols/icons/{Charon.js → ShoppingInvoiceList.js} +8 -8
  165. package/dist/module/lib/Components/symbols/icons/ShoppingInvoiceList.js.map +1 -0
  166. package/dist/module/lib/Components/symbols/icons/WalletInput.js +1 -1
  167. package/dist/module/lib/Components/symbols/icons/WalletInput.js.map +1 -1
  168. package/dist/module/lib/Components/symbols/index.js +1 -4
  169. package/dist/module/lib/Components/symbols/index.js.map +1 -1
  170. package/dist/module/lib/Components/visualization/DonutChart/DonutChart.test.js +1 -1
  171. package/dist/module/lib/Components/visualization/DonutChart/DonutChart.test.js.map +1 -1
  172. package/dist/module/lib/Components/visualization/Line/utils.js +1 -1
  173. package/dist/module/lib/Components/visualization/LineChart/LineChart.stories.js +69 -0
  174. package/dist/module/lib/Components/visualization/LineChart/LineChart.stories.js.map +1 -1
  175. package/dist/module/lib/Components/visualization/LineChart/LineChart.test.js +1 -1
  176. package/dist/module/lib/Components/visualization/LineChart/LineChart.test.js.map +1 -1
  177. package/dist/module/lib/Components/visualization/Point/Point.stories.js +12 -0
  178. package/dist/module/lib/Components/visualization/Point/Point.stories.js.map +1 -1
  179. package/dist/module/lib/Components/visualization/Point/Point.test.js +1 -1
  180. package/dist/module/lib/Components/visualization/Point/usePointGeometry.js +1 -1
  181. package/dist/module/lib/Components/visualization/Point/utils.js +1 -1
  182. package/dist/module/lib/Components/visualization/Point/utils.test.js +2 -2
  183. package/dist/module/lib/Components/visualization/ReferenceLine/ReferenceLine.stories.js +23 -0
  184. package/dist/module/lib/Components/visualization/ReferenceLine/ReferenceLine.stories.js.map +1 -1
  185. package/dist/module/lib/Components/visualization/Scrubber/DefaultScrubberTooltip/utils.js +3 -3
  186. package/dist/module/lib/Components/visualization/Scrubber/DefaultScrubberTooltip/utils.js.map +1 -1
  187. package/dist/module/lib/Components/visualization/Scrubber/Scrubber.stories.js +35 -0
  188. package/dist/module/lib/Components/visualization/Scrubber/Scrubber.stories.js.map +1 -1
  189. package/dist/module/translations/locales/de.json +7 -0
  190. package/dist/module/translations/locales/en.json +7 -0
  191. package/dist/module/translations/locales/es.json +7 -0
  192. package/dist/module/translations/locales/fr.json +7 -0
  193. package/dist/module/translations/locales/ja.json +7 -0
  194. package/dist/module/translations/locales/ko.json +7 -0
  195. package/dist/module/translations/locales/pt.json +7 -0
  196. package/dist/module/translations/locales/ru.json +7 -0
  197. package/dist/module/translations/locales/th.json +7 -0
  198. package/dist/module/translations/locales/tr.json +7 -0
  199. package/dist/module/translations/locales/zh.json +7 -0
  200. package/dist/typescript/src/lib/Components/core/MediaImage/MediaImage.d.ts +4 -0
  201. package/dist/typescript/src/lib/Components/core/MediaImage/MediaImage.d.ts.map +1 -1
  202. package/dist/typescript/src/lib/Components/core/MediaImageGroup/MediaImageGroup.d.ts +33 -0
  203. package/dist/typescript/src/lib/Components/core/MediaImageGroup/MediaImageGroup.d.ts.map +1 -0
  204. package/dist/typescript/src/lib/Components/core/MediaImageGroup/index.d.ts +3 -0
  205. package/dist/typescript/src/lib/Components/core/MediaImageGroup/index.d.ts.map +1 -0
  206. package/dist/typescript/src/lib/Components/core/MediaImageGroup/types.d.ts +66 -0
  207. package/dist/typescript/src/lib/Components/core/MediaImageGroup/types.d.ts.map +1 -0
  208. package/dist/typescript/src/lib/Components/core/Pagination/Pagination.d.ts +15 -0
  209. package/dist/typescript/src/lib/Components/core/Pagination/Pagination.d.ts.map +1 -0
  210. package/dist/typescript/src/lib/Components/core/Pagination/index.d.ts +3 -0
  211. package/dist/typescript/src/lib/Components/core/Pagination/index.d.ts.map +1 -0
  212. package/dist/typescript/src/lib/Components/core/Pagination/types.d.ts +29 -0
  213. package/dist/typescript/src/lib/Components/core/Pagination/types.d.ts.map +1 -0
  214. package/dist/typescript/src/lib/Components/core/Timeline/Timeline.d.ts +2 -2
  215. package/dist/typescript/src/lib/Components/core/Timeline/Timeline.d.ts.map +1 -1
  216. package/dist/typescript/src/lib/Components/core/index.d.ts +2 -0
  217. package/dist/typescript/src/lib/Components/core/index.d.ts.map +1 -1
  218. package/dist/typescript/src/lib/Components/internal/BaseButton/BaseButton.d.ts.map +1 -1
  219. package/dist/typescript/src/lib/Components/internal/BaseButton/types.d.ts +1 -1
  220. package/dist/typescript/src/lib/Components/internal/BaseButton/types.d.ts.map +1 -1
  221. package/dist/typescript/src/lib/Components/internal/BaseInput/types.d.ts +1 -1
  222. package/dist/typescript/src/lib/Components/symbols/icons/{Charon.d.ts → ShoppingInvoiceList.d.ts} +7 -7
  223. package/dist/typescript/src/lib/Components/symbols/icons/ShoppingInvoiceList.d.ts.map +1 -0
  224. package/dist/typescript/src/lib/Components/symbols/index.d.ts +1 -4
  225. package/dist/typescript/src/lib/Components/symbols/index.d.ts.map +1 -1
  226. package/dist/typescript/src/lib/Components/visualization/Axis/types.d.ts +1 -1
  227. package/dist/typescript/src/lib/Components/visualization/CartesianChart/types.d.ts +1 -1
  228. package/dist/typescript/src/lib/Components/visualization/Line/utils.d.ts +1 -1
  229. package/dist/typescript/src/lib/Components/visualization/LineChart/types.d.ts +3 -3
  230. package/dist/typescript/src/lib/Components/visualization/Point/types.d.ts +3 -3
  231. package/dist/typescript/src/lib/Components/visualization/Point/usePointGeometry.d.ts +1 -1
  232. package/dist/typescript/src/lib/Components/visualization/Point/utils.d.ts +1 -1
  233. package/dist/typescript/src/translations/translations.d.ts +84 -0
  234. package/dist/typescript/src/translations/translations.d.ts.map +1 -1
  235. package/package.json +9 -9
  236. package/src/lib/Components/animations/Pulse/Pulse.stories.tsx +1 -0
  237. package/src/lib/Components/animations/Spin/Spin.stories.tsx +1 -0
  238. package/src/lib/Components/core/AddressInput/AddressInput.stories.tsx +168 -123
  239. package/src/lib/Components/core/AmountDisplay/AmountDisplay.stories.tsx +7 -7
  240. package/src/lib/Components/core/AmountInput/AmountInput.stories.tsx +162 -158
  241. package/src/lib/Components/core/Avatar/Avatar.stories.tsx +37 -46
  242. package/src/lib/Components/core/AvatarButton/AvatarButton.stories.tsx +1 -8
  243. package/src/lib/Components/core/Banner/Banner.stories.tsx +8 -95
  244. package/src/lib/Components/core/Button/Button.figma.tsx +1 -0
  245. package/src/lib/Components/core/Button/Button.mdx +2 -1
  246. package/src/lib/Components/core/Button/Button.stories.tsx +13 -14
  247. package/src/lib/Components/core/Card/Card.mdx +6 -0
  248. package/src/lib/Components/core/Card/Card.stories.tsx +31 -27
  249. package/src/lib/Components/core/CardButton/CardButton.stories.tsx +14 -90
  250. package/src/lib/Components/core/Checkbox/Checkbox.stories.tsx +1 -1
  251. package/src/lib/Components/core/ContentBanner/ContentBanner.stories.tsx +1 -17
  252. package/src/lib/Components/core/DescriptionItem/DescriptionItem.stories.tsx +4 -0
  253. package/src/lib/Components/core/Divider/Divider.stories.tsx +1 -0
  254. package/src/lib/Components/core/DotCount/DotCount.stories.tsx +4 -0
  255. package/src/lib/Components/core/DotIcon/DotIcon.stories.tsx +8 -0
  256. package/src/lib/Components/core/DotIndicator/DotIndicator.stories.tsx +3 -0
  257. package/src/lib/Components/core/DotSymbol/DotSymbol.stories.tsx +3 -0
  258. package/src/lib/Components/core/IconButton/IconButton.stories.tsx +9 -0
  259. package/src/lib/Components/core/InteractiveIcon/InteractiveIcon.stories.tsx +16 -23
  260. package/src/lib/Components/core/Link/Link.mdx +32 -5
  261. package/src/lib/Components/core/Link/Link.stories.tsx +20 -146
  262. package/src/lib/Components/core/Link/Link.test.tsx +1 -1
  263. package/src/lib/Components/core/Link/Link.tsx +1 -1
  264. package/src/lib/Components/core/ListItem/ListItem.stories.tsx +0 -39
  265. package/src/lib/Components/core/MediaBanner/MediaBanner.stories.tsx +3 -14
  266. package/src/lib/Components/core/MediaButton/MediaButton.stories.tsx +1 -12
  267. package/src/lib/Components/core/MediaCard/MediaCard.stories.tsx +10 -53
  268. package/src/lib/Components/core/MediaImage/MediaImage.stories.tsx +1 -1
  269. package/src/lib/Components/core/MediaImage/MediaImage.tsx +1 -1
  270. package/src/lib/Components/core/MediaImageGroup/MediaImageGroup.figma.tsx +119 -0
  271. package/src/lib/Components/core/MediaImageGroup/MediaImageGroup.mdx +96 -0
  272. package/src/lib/Components/core/MediaImageGroup/MediaImageGroup.stories.tsx +154 -0
  273. package/src/lib/Components/core/MediaImageGroup/MediaImageGroup.test.tsx +213 -0
  274. package/src/lib/Components/core/MediaImageGroup/MediaImageGroup.tsx +264 -0
  275. package/src/lib/Components/core/MediaImageGroup/index.ts +2 -0
  276. package/src/lib/Components/core/MediaImageGroup/types.ts +77 -0
  277. package/src/lib/Components/core/MediaTag/MediaTag.stories.tsx +3 -0
  278. package/src/lib/Components/core/MenuList/MenuList.mdx +2 -2
  279. package/src/lib/Components/core/MenuList/MenuList.stories.tsx +13 -1
  280. package/src/lib/Components/core/PageIndicator/PageIndicator.figma.tsx +1 -1
  281. package/src/lib/Components/core/PageIndicator/PageIndicator.stories.tsx +45 -42
  282. package/src/lib/Components/core/Pagination/Pagination.figma.tsx +25 -0
  283. package/src/lib/Components/core/Pagination/Pagination.mdx +108 -0
  284. package/src/lib/Components/core/Pagination/Pagination.stories.tsx +90 -0
  285. package/src/lib/Components/core/Pagination/Pagination.test.tsx +346 -0
  286. package/src/lib/Components/core/Pagination/Pagination.tsx +200 -0
  287. package/src/lib/Components/core/Pagination/index.ts +2 -0
  288. package/src/lib/Components/core/Pagination/types.ts +29 -0
  289. package/src/lib/Components/core/SearchInput/SearchInput.stories.tsx +91 -66
  290. package/src/lib/Components/core/SegmentedControl/SegmentedControl.stories.tsx +2 -0
  291. package/src/lib/Components/core/SelectList/SelectList.mdx +3 -1
  292. package/src/lib/Components/core/SelectList/SelectList.stories.tsx +3 -3
  293. package/src/lib/Components/core/Skeleton/Skeleton.stories.tsx +1 -0
  294. package/src/lib/Components/core/Spinner/Spinner.stories.tsx +1 -0
  295. package/src/lib/Components/core/Spot/Spot.stories.tsx +10 -1
  296. package/src/lib/Components/core/Stepper/Stepper.stories.tsx +1 -0
  297. package/src/lib/Components/core/Subheader/Subheader.stories.tsx +5 -2
  298. package/src/lib/Components/core/Switch/Switch.stories.tsx +17 -1
  299. package/src/lib/Components/core/TabBar/TabBar.stories.tsx +15 -5
  300. package/src/lib/Components/core/Tag/Tag.stories.tsx +4 -0
  301. package/src/lib/Components/core/TextInput/TextInput.stories.tsx +186 -174
  302. package/src/lib/Components/core/TextInput/TextInput.test.tsx +2 -2
  303. package/src/lib/Components/core/Tile/Tile.stories.tsx +0 -33
  304. package/src/lib/Components/core/TileButton/TileButton.stories.tsx +9 -7
  305. package/src/lib/Components/core/Timeline/Timeline.stories.tsx +20 -1
  306. package/src/lib/Components/core/Timeline/Timeline.test.tsx +12 -8
  307. package/src/lib/Components/core/Timeline/Timeline.tsx +79 -75
  308. package/src/lib/Components/core/Toast/Toast.mdx +1 -1
  309. package/src/lib/Components/core/Toast/Toast.stories.tsx +55 -66
  310. package/src/lib/Components/core/Toast/Toaster.test.tsx +1 -1
  311. package/src/lib/Components/core/Tooltip/Tooltip.stories.tsx +7 -3
  312. package/src/lib/Components/core/Trend/Trend.stories.tsx +3 -0
  313. package/src/lib/Components/core/index.ts +2 -0
  314. package/src/lib/Components/internal/BaseButton/BaseButton.test.tsx +1 -0
  315. package/src/lib/Components/internal/BaseButton/BaseButton.tsx +3 -0
  316. package/src/lib/Components/internal/BaseButton/types.ts +2 -1
  317. package/src/lib/Components/internal/BaseInput/types.ts +1 -1
  318. package/src/lib/Components/primitives/Box/Box.stories.tsx +1 -18
  319. package/src/lib/Components/primitives/Gradient/LinearGradient/LinearGradient.stories.tsx +12 -0
  320. package/src/lib/Components/primitives/Gradient/RadialGradient/RadialGradient.stories.tsx +1 -1
  321. package/src/lib/Components/primitives/Pressable/Pressable.stories.tsx +0 -18
  322. package/src/lib/Components/primitives/Text/Text.stories.tsx +1 -12
  323. package/src/lib/Components/symbols/Icon/Icon.stories.tsx +133 -94
  324. package/src/lib/Components/symbols/icons/Ar.tsx +2 -2
  325. package/src/lib/Components/symbols/icons/Range.tsx +1 -1
  326. package/src/lib/Components/symbols/icons/Share.tsx +1 -1
  327. package/src/lib/Components/symbols/icons/{Charon.tsx → ShoppingInvoiceList.tsx} +8 -8
  328. package/src/lib/Components/symbols/icons/WalletInput.tsx +1 -1
  329. package/src/lib/Components/symbols/index.ts +1 -4
  330. package/src/lib/Components/visualization/Axis/types.ts +1 -1
  331. package/src/lib/Components/visualization/CartesianChart/types.ts +1 -1
  332. package/src/lib/Components/visualization/DonutChart/DonutChart.test.tsx +1 -1
  333. package/src/lib/Components/visualization/Line/utils.ts +1 -1
  334. package/src/lib/Components/visualization/LineChart/LineChart.stories.tsx +15 -0
  335. package/src/lib/Components/visualization/LineChart/LineChart.test.tsx +1 -1
  336. package/src/lib/Components/visualization/LineChart/types.ts +3 -3
  337. package/src/lib/Components/visualization/Point/Point.stories.tsx +2 -0
  338. package/src/lib/Components/visualization/Point/Point.test.tsx +1 -1
  339. package/src/lib/Components/visualization/Point/types.ts +3 -3
  340. package/src/lib/Components/visualization/Point/usePointGeometry.ts +1 -1
  341. package/src/lib/Components/visualization/Point/utils.test.ts +2 -2
  342. package/src/lib/Components/visualization/Point/utils.ts +1 -1
  343. package/src/lib/Components/visualization/ReferenceLine/ReferenceLine.stories.tsx +5 -0
  344. package/src/lib/Components/visualization/Scrubber/DefaultScrubberTooltip/utils.ts +3 -3
  345. package/src/lib/Components/visualization/Scrubber/Scrubber.stories.tsx +5 -0
  346. package/src/translations/locales/de.json +7 -0
  347. package/src/translations/locales/en.json +7 -0
  348. package/src/translations/locales/es.json +7 -0
  349. package/src/translations/locales/fr.json +7 -0
  350. package/src/translations/locales/ja.json +7 -0
  351. package/src/translations/locales/ko.json +7 -0
  352. package/src/translations/locales/pt.json +7 -0
  353. package/src/translations/locales/ru.json +7 -0
  354. package/src/translations/locales/th.json +7 -0
  355. package/src/translations/locales/tr.json +7 -0
  356. package/src/translations/locales/zh.json +7 -0
  357. package/dist/module/lib/Components/symbols/icons/Apex.js +0 -49
  358. package/dist/module/lib/Components/symbols/icons/Apex.js.map +0 -1
  359. package/dist/module/lib/Components/symbols/icons/BellNotification.js +0 -91
  360. package/dist/module/lib/Components/symbols/icons/BellNotification.js.map +0 -1
  361. package/dist/module/lib/Components/symbols/icons/Charon.js.map +0 -1
  362. package/dist/module/lib/Components/symbols/icons/ShieldCheckNotification.js +0 -82
  363. package/dist/module/lib/Components/symbols/icons/ShieldCheckNotification.js.map +0 -1
  364. package/dist/typescript/src/lib/Components/symbols/icons/Apex.d.ts +0 -35
  365. package/dist/typescript/src/lib/Components/symbols/icons/Apex.d.ts.map +0 -1
  366. package/dist/typescript/src/lib/Components/symbols/icons/BellNotification.d.ts +0 -35
  367. package/dist/typescript/src/lib/Components/symbols/icons/BellNotification.d.ts.map +0 -1
  368. package/dist/typescript/src/lib/Components/symbols/icons/Charon.d.ts.map +0 -1
  369. package/dist/typescript/src/lib/Components/symbols/icons/ShieldCheckNotification.d.ts +0 -35
  370. package/dist/typescript/src/lib/Components/symbols/icons/ShieldCheckNotification.d.ts.map +0 -1
  371. package/src/lib/Components/symbols/icons/Apex.tsx +0 -44
  372. package/src/lib/Components/symbols/icons/BellNotification.tsx +0 -75
  373. package/src/lib/Components/symbols/icons/ShieldCheckNotification.tsx +0 -67
@@ -0,0 +1,264 @@
1
+ import {
2
+ DEFAULT_GROUP_MAX_VISIBLE,
3
+ DisabledProvider,
4
+ useDisabledContext,
5
+ sliceGroupItems,
6
+ formatGroupOverflowCount,
7
+ } from '@ledgerhq/lumen-utils-shared';
8
+ import { StyleSheet } from 'react-native';
9
+ import { useStyleSheet } from '../../../../styles';
10
+ import type { LumenStyleSheetTheme } from '../../../../styles';
11
+ import { Box, Text } from '../../primitives';
12
+ import { MediaImage } from '../MediaImage';
13
+ import type { MediaImageSize, MediaImageShape } from '../MediaImage';
14
+ import { borderRadiusMap } from '../MediaImage/MediaImage';
15
+ import type { MediaImageGroupItem, MediaImageGroupProps } from './types';
16
+
17
+ type SpacingKey = keyof LumenStyleSheetTheme['spacings'];
18
+ type TypographyKey =
19
+ | 'body4SemiBold'
20
+ | 'body3SemiBold'
21
+ | 'body2SemiBold'
22
+ | 'body1SemiBold'
23
+ | 'heading4SemiBold'
24
+ | 'heading3SemiBold'
25
+ | 'heading2SemiBold';
26
+
27
+ // About 25% of the size, snapped to the spacing scale.
28
+ const overlapMap: Record<MediaImageSize, SpacingKey> = {
29
+ 12: 's4',
30
+ 16: 's4',
31
+ 20: 's6',
32
+ 24: 's6',
33
+ 32: 's8',
34
+ 40: 's10',
35
+ 48: 's12',
36
+ 56: 's14',
37
+ 64: 's16',
38
+ 72: 's16',
39
+ };
40
+
41
+ // The ring grows with the size, up to 2px.
42
+ const ringMap: Record<MediaImageSize, SpacingKey> = {
43
+ 12: 's1',
44
+ 16: 's1',
45
+ 20: 's1',
46
+ 24: 's1',
47
+ 32: 's1',
48
+ 40: 's2',
49
+ 48: 's2',
50
+ 56: 's2',
51
+ 64: 's2',
52
+ 72: 's2',
53
+ };
54
+
55
+ const overflowTypographyMap: Record<MediaImageSize, TypographyKey> = {
56
+ 12: 'body4SemiBold',
57
+ 16: 'body4SemiBold',
58
+ 20: 'body4SemiBold',
59
+ 24: 'body4SemiBold',
60
+ 32: 'body3SemiBold',
61
+ 40: 'body2SemiBold',
62
+ 48: 'body1SemiBold',
63
+ 56: 'heading4SemiBold',
64
+ 64: 'heading3SemiBold',
65
+ 72: 'heading2SemiBold',
66
+ };
67
+
68
+ const useStyles = ({
69
+ size,
70
+ shape,
71
+ disabled = false,
72
+ }: {
73
+ size: MediaImageSize;
74
+ shape: MediaImageShape;
75
+ disabled?: boolean;
76
+ }) => {
77
+ return useStyleSheet(
78
+ (t) => {
79
+ const sizeValue = t.sizes[`s${size}` as keyof typeof t.sizes] as number;
80
+ const ring = t.spacings[ringMap[size]];
81
+ const radius =
82
+ shape === 'circle'
83
+ ? t.borderRadius.full
84
+ : t.borderRadius[borderRadiusMap[size]];
85
+
86
+ return {
87
+ root: {
88
+ flexDirection: 'row',
89
+ alignItems: 'center',
90
+ },
91
+ slot: {
92
+ borderWidth: ring,
93
+ borderColor: t.colors.border.baseInverted,
94
+ borderRadius: shape === 'circle' ? radius : radius + ring,
95
+ overflow: 'hidden',
96
+ backgroundColor: t.colors.bg.base,
97
+ },
98
+ slotOverlap: {
99
+ marginLeft: -t.spacings[overlapMap[size]],
100
+ },
101
+ overflow: {
102
+ minWidth: sizeValue,
103
+ height: sizeValue,
104
+ paddingHorizontal: t.spacings.s2,
105
+ borderRadius: radius,
106
+ alignItems: 'center',
107
+ justifyContent: 'center',
108
+ backgroundColor: t.colors.bg.interactive,
109
+ ...(disabled && { opacity: 0.3 }),
110
+ },
111
+ overflowText: {
112
+ ...t.typographies[overflowTypographyMap[size]],
113
+ color: t.colors.text.onInteractive,
114
+ },
115
+ };
116
+ },
117
+ [size, shape, disabled],
118
+ );
119
+ };
120
+
121
+ type OverflowBadgeProps = {
122
+ count: number;
123
+ size: MediaImageSize;
124
+ shape: MediaImageShape;
125
+ overlap: boolean;
126
+ testID?: string;
127
+ label?: string;
128
+ };
129
+
130
+ const OverflowBadge = ({
131
+ count,
132
+ size,
133
+ shape,
134
+ overlap,
135
+ testID,
136
+ label,
137
+ }: OverflowBadgeProps) => {
138
+ const disabled = useDisabledContext({ consumerName: 'MediaImageGroup' });
139
+ const styles = useStyles({ size, shape, disabled });
140
+
141
+ return (
142
+ <Box
143
+ style={StyleSheet.flatten([styles.slot, overlap && styles.slotOverlap])}
144
+ >
145
+ <Box
146
+ style={styles.overflow}
147
+ testID={testID}
148
+ accessible={!!label}
149
+ accessibilityLabel={label}
150
+ >
151
+ <Text style={styles.overflowText} allowFontScaling={false}>
152
+ {formatGroupOverflowCount(count)}
153
+ </Text>
154
+ </Box>
155
+ </Box>
156
+ );
157
+ };
158
+
159
+ /**
160
+ * Displays a stack of overlapping media images, with a `+N` badge when the
161
+ * data exceeds `maxVisible`.
162
+ *
163
+ * The group owns `size` and `shape`. A custom `renderItem` receives them and
164
+ * must forward them to the rendered element (e.g. a crypto icon). Items are
165
+ * clipped to the group's ring, so decorations overhanging an item, such as a
166
+ * network badge, are not supported.
167
+ *
168
+ * Without `renderItem`, `data` must be `MediaImage` props. For any other item
169
+ * shape, pass `renderItem`. The types can't always catch a missing one.
170
+ *
171
+ * @example
172
+ * import { MediaImageGroup } from '@ledgerhq/lumen-ui-rnative';
173
+ *
174
+ * <MediaImageGroup
175
+ * size={32}
176
+ * data={[
177
+ * { src: btcUrl, alt: 'Bitcoin' },
178
+ * { src: ethUrl, alt: 'Ethereum' },
179
+ * ]}
180
+ * />
181
+ *
182
+ * <MediaImageGroup
183
+ * data={assets} // [{ ledgerId: 'bitcoin', ticker: 'BTC' }, ...]
184
+ * renderItem={(asset, { size, shape }) => (
185
+ * <CryptoIcon ledgerId={asset.ledgerId} ticker={asset.ticker} size={size} shape={shape} />
186
+ * )}
187
+ * />
188
+ */
189
+ export function MediaImageGroup<T = MediaImageGroupItem>({
190
+ data,
191
+ renderItem,
192
+ size = 32,
193
+ shape = 'circle',
194
+ maxVisible = DEFAULT_GROUP_MAX_VISIBLE,
195
+ disabled: disabledProp = false,
196
+ overflowTestID,
197
+ overflowLabel,
198
+ lx = {},
199
+ style,
200
+ ref,
201
+ ...props
202
+ }: MediaImageGroupProps<T>) {
203
+ const disabled = useDisabledContext({
204
+ consumerName: 'MediaImageGroup',
205
+ mergeWith: { disabled: disabledProp },
206
+ });
207
+ const styles = useStyles({ size, shape });
208
+
209
+ const { visibleItems, overflowCount } = sliceGroupItems<unknown>(
210
+ data,
211
+ maxVisible,
212
+ );
213
+
214
+ if (data.length === 0) {
215
+ return null;
216
+ }
217
+
218
+ return (
219
+ <Box
220
+ ref={ref}
221
+ lx={lx}
222
+ style={StyleSheet.flatten([styles.root, style])}
223
+ {...props}
224
+ >
225
+ <DisabledProvider value={{ disabled }}>
226
+ {renderItem
227
+ ? data.slice(0, visibleItems.length).map((item, index) => (
228
+ <Box
229
+ key={index}
230
+ style={StyleSheet.flatten([
231
+ styles.slot,
232
+ index > 0 && styles.slotOverlap,
233
+ ])}
234
+ >
235
+ {renderItem(item, { size, shape })}
236
+ </Box>
237
+ ))
238
+ : data
239
+ .slice(0, visibleItems.length)
240
+ .map(({ id, ...imageProps }, index) => (
241
+ <Box
242
+ key={id ?? index}
243
+ style={StyleSheet.flatten([
244
+ styles.slot,
245
+ index > 0 && styles.slotOverlap,
246
+ ])}
247
+ >
248
+ <MediaImage {...imageProps} size={size} shape={shape} />
249
+ </Box>
250
+ ))}
251
+ {overflowCount > 0 && (
252
+ <OverflowBadge
253
+ count={overflowCount}
254
+ size={size}
255
+ shape={shape}
256
+ overlap={visibleItems.length > 0}
257
+ testID={overflowTestID}
258
+ label={overflowLabel}
259
+ />
260
+ )}
261
+ </DisabledProvider>
262
+ </Box>
263
+ );
264
+ }
@@ -0,0 +1,2 @@
1
+ export { MediaImageGroup } from './MediaImageGroup';
2
+ export * from './types';
@@ -0,0 +1,77 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { StyledViewProps } from '../../../../styles';
3
+ import type { MediaImageProps } from '../MediaImage';
4
+
5
+ export type MediaImageGroupItem = {
6
+ /**
7
+ * Stable identifier of the item, used as its React key. Falls back to the
8
+ * item's index.
9
+ * @optional
10
+ */
11
+ id?: string;
12
+ } & Omit<MediaImageProps, 'id' | 'size' | 'shape' | 'ref' | 'style' | 'lx'>;
13
+
14
+ export type MediaImageGroupItemContext = Required<
15
+ Pick<MediaImageProps, 'size' | 'shape'>
16
+ >;
17
+
18
+ export type MediaImageGroupRenderItem<T> = (
19
+ item: T,
20
+ context: MediaImageGroupItemContext,
21
+ ) => ReactNode;
22
+
23
+ type MediaImageGroupDataProps<T> =
24
+ | {
25
+ /**
26
+ * Items to display, rendered as `MediaImage`.
27
+ */
28
+ data: readonly MediaImageGroupItem[];
29
+ renderItem?: never;
30
+ }
31
+ | {
32
+ /**
33
+ * Items to display, rendered by `renderItem`.
34
+ */
35
+ data: readonly T[];
36
+ /**
37
+ * Renders an item in place of the default `MediaImage`. Required when
38
+ * `data` is not `MediaImageGroupItem[]`. Receives the `size` and `shape`
39
+ * owned by the group, which must be forwarded to the rendered element so
40
+ * the overlap and overflow badge stay consistent.
41
+ */
42
+ renderItem: MediaImageGroupRenderItem<T>;
43
+ };
44
+
45
+ export type MediaImageGroupProps<T = MediaImageGroupItem> =
46
+ MediaImageGroupDataProps<T> & {
47
+ /**
48
+ * Size applied to every item.
49
+ * @default 32
50
+ */
51
+ size?: MediaImageProps['size'];
52
+ /**
53
+ * Shape applied to every item.
54
+ * @default 'circle'
55
+ */
56
+ shape?: MediaImageProps['shape'];
57
+ /**
58
+ * Dims the items and the `+N` badge.
59
+ * @default false
60
+ */
61
+ disabled?: boolean;
62
+ /**
63
+ * Maximum number of slots displayed, the `+N` overflow badge included.
64
+ * @default 4
65
+ */
66
+ maxVisible?: number;
67
+ /**
68
+ * Test id of the `+N` overflow badge.
69
+ * @optional
70
+ */
71
+ overflowTestID?: string;
72
+ /**
73
+ * Accessible label of the `+N` overflow badge, e.g. "7 more assets".
74
+ * @optional
75
+ */
76
+ overflowLabel?: string;
77
+ } & Omit<StyledViewProps, 'children'>;
@@ -13,6 +13,9 @@ const ETH_ICON = (
13
13
  );
14
14
 
15
15
  const meta = {
16
+ parameters: {
17
+ docs: { source: { language: 'tsx', format: true, type: 'dynamic' } },
18
+ },
16
19
  component: MediaTag,
17
20
  id: 'rnative-mediatag',
18
21
  title: 'Core/MediaTag',
@@ -28,7 +28,7 @@ import {
28
28
 
29
29
  ### Appearance
30
30
 
31
- `MenuListItem` supports two appearances: `base` (default) for standard actions and `red` for irreversible or dangerous operations such as deleting or unlinking. The red appearance renders the label and icon in the error colour.
31
+ `MenuListItem` supports two appearances: `base` (default) for standard actions and `red` for irreversible or dangerous operations such as deleting or unlinking. The red appearance renders the label and icon in the error color.
32
32
 
33
33
  Place `red` items **last** in the list. Both the Apple HIG and Material guidelines put destructive actions at the bottom, away from the items a user reaches for by habit. `MenuList` does not enforce the order.
34
34
 
@@ -36,7 +36,7 @@ Place `red` items **last** in the list. Both the Apple HIG and Material guidelin
36
36
 
37
37
  ### Disabled
38
38
 
39
- Set `disabled` on individual `MenuListItem`s to prevent interaction. The label and icon are rendered in the disabled colour and the press handler is suppressed.
39
+ Set `disabled` on individual `MenuListItem`s to prevent interaction. The label and icon are rendered in the disabled color and the press handler is suppressed.
40
40
 
41
41
  <Canvas of={MenuListStories.DisabledShowcase} />
42
42
 
@@ -17,7 +17,7 @@ const meta = {
17
17
  subcomponents: { MenuListItem, MenuListSwitchItem },
18
18
  parameters: {
19
19
  docs: {
20
- source: { language: 'tsx', format: true, type: 'dynamic' },
20
+ source: { language: 'tsx', format: true, type: 'code' },
21
21
  },
22
22
  },
23
23
  } satisfies Meta<typeof MenuList>;
@@ -41,6 +41,12 @@ export const Base: Story = {
41
41
 
42
42
  export const ItemShowcase: StoryObj<typeof MenuListItem> = {
43
43
  parameters: {
44
+ docs: { source: { type: 'dynamic' } },
45
+ jsx: {
46
+ functionValue: (fn: unknown) =>
47
+ Object.entries(iconMap).find(([, icon]) => icon === fn)?.[0] ??
48
+ '() => {}',
49
+ },
44
50
  layout: 'centered',
45
51
  backgrounds: { default: 'light' },
46
52
  },
@@ -89,6 +95,12 @@ export const AppearanceShowcase: Story = {
89
95
 
90
96
  export const SwitchItemShowcase: StoryObj<typeof MenuListSwitchItem> = {
91
97
  parameters: {
98
+ docs: { source: { type: 'dynamic' } },
99
+ jsx: {
100
+ functionValue: (fn: unknown) =>
101
+ Object.entries(iconMap).find(([, icon]) => icon === fn)?.[0] ??
102
+ '() => {}',
103
+ },
92
104
  layout: 'centered',
93
105
  backgrounds: { default: 'light' },
94
106
  },
@@ -3,7 +3,7 @@ import { PageIndicator } from './PageIndicator';
3
3
 
4
4
  figma.connect(
5
5
  PageIndicator,
6
- 'https://www.figma.com/design/JxaLVMTWirCpU0rsbZ30k7?node-id=11768-12849',
6
+ 'https://www.figma.com/design/JxaLVMTWirCpU0rsbZ30k7?node-id=11227-7095',
7
7
  {
8
8
  imports: ["import { PageIndicator } from '@ledgerhq/lumen-ui-rnative'"],
9
9
  example: () => <PageIndicator currentPage={2} totalPages={5} />,
@@ -12,6 +12,13 @@ const meta = {
12
12
  parameters: {
13
13
  layout: 'centered',
14
14
  backgrounds: { default: 'light' },
15
+ docs: {
16
+ source: {
17
+ language: 'tsx',
18
+ format: true,
19
+ type: 'code',
20
+ },
21
+ },
15
22
  },
16
23
  argTypes: {
17
24
  currentPage: { control: 'number' },
@@ -24,56 +31,52 @@ export default meta;
24
31
  type Story = StoryObj<typeof PageIndicator>;
25
32
 
26
33
  export const Base: Story = {
34
+ parameters: { docs: { source: { type: 'dynamic' } } },
27
35
  args: {
28
36
  currentPage: 1,
29
37
  totalPages: 5,
30
38
  },
31
39
  };
32
40
 
33
- const InteractiveComponent = ({ totalPages }: { totalPages: number }) => {
34
- const [page, setPage] = useState(1);
35
- const { theme } = useTheme();
41
+ export const Interactive: Story = {
42
+ render: () => {
43
+ const totalPages = 9;
44
+ const [page, setPage] = useState(1);
45
+ const { theme } = useTheme();
36
46
 
37
- return (
38
- <Box lx={{ gap: 's16', alignItems: 'center', width: 'full' }}>
39
- <Box
40
- lx={{
41
- flexDirection: 'row',
42
- gap: 's16',
43
- alignItems: 'center',
44
- justifyContent: 'center',
45
- }}
46
- >
47
- <IconButton
48
- icon={ArrowLeft}
49
- size='xs'
50
- accessibilityLabel='Previous page'
51
- appearance='transparent'
52
- onPress={() => setPage((v) => Math.max(1, v - 1))}
53
- />
54
- <Text
55
- lx={{ color: 'base', width: 's28', textAlign: 'center' }}
56
- style={{ ...theme.typographies.heading2SemiBold }}
47
+ return (
48
+ <Box lx={{ gap: 's16', alignItems: 'center', width: 'full' }}>
49
+ <Box
50
+ lx={{
51
+ flexDirection: 'row',
52
+ gap: 's16',
53
+ alignItems: 'center',
54
+ justifyContent: 'center',
55
+ }}
57
56
  >
58
- {page}
59
- </Text>
60
- <IconButton
61
- icon={ArrowRight}
62
- size='xs'
63
- accessibilityLabel='Next page'
64
- appearance='transparent'
65
- onPress={() => setPage((v) => Math.min(totalPages, v + 1))}
66
- />
57
+ <IconButton
58
+ icon={ArrowLeft}
59
+ size='xs'
60
+ accessibilityLabel='Previous page'
61
+ appearance='transparent'
62
+ onPress={() => setPage((v) => Math.max(1, v - 1))}
63
+ />
64
+ <Text
65
+ lx={{ color: 'base', width: 's28', textAlign: 'center' }}
66
+ style={{ ...theme.typographies.heading2SemiBold }}
67
+ >
68
+ {page}
69
+ </Text>
70
+ <IconButton
71
+ icon={ArrowRight}
72
+ size='xs'
73
+ accessibilityLabel='Next page'
74
+ appearance='transparent'
75
+ onPress={() => setPage((v) => Math.min(totalPages, v + 1))}
76
+ />
77
+ </Box>
78
+ <PageIndicator currentPage={page} totalPages={totalPages} />
67
79
  </Box>
68
- <PageIndicator currentPage={page} totalPages={totalPages} />
69
- </Box>
70
- );
71
- };
72
-
73
- export const Interactive: Story = {
74
- args: {
75
- currentPage: 1,
76
- totalPages: 9,
80
+ );
77
81
  },
78
- render: (args) => <InteractiveComponent totalPages={args.totalPages} />,
79
82
  };
@@ -0,0 +1,25 @@
1
+ import figma from '@figma/code-connect';
2
+ import { Pagination } from './Pagination';
3
+
4
+ figma.connect(
5
+ Pagination,
6
+ 'https://www.figma.com/design/JxaLVMTWirCpU0rsbZ30k7?node-id=11768-12849',
7
+ {
8
+ imports: ["import { Pagination } from '@ledgerhq/lumen-ui-rnative'"],
9
+ props: {
10
+ density: figma.enum('content', {
11
+ number: 'expanded',
12
+ text: 'compact',
13
+ none: 'compact',
14
+ }),
15
+ },
16
+ example: (props) => (
17
+ <Pagination
18
+ page={2}
19
+ totalPages={8}
20
+ density={props.density}
21
+ onPageChange={() => {}}
22
+ />
23
+ ),
24
+ },
25
+ );
@@ -0,0 +1,108 @@
1
+ import { Meta, Canvas, Controls } from '@storybook/addon-docs/blocks';
2
+ import { CustomTabs, Tab } from '../../../../../.storybook/components';
3
+ import * as PaginationStories from './Pagination.stories';
4
+
5
+ <Meta title='Core/Pagination' of={PaginationStories} />
6
+
7
+ # Pagination
8
+
9
+ <CustomTabs>
10
+ <Tab label="Overview">
11
+
12
+ ## Introduction
13
+
14
+ Pagination provides page navigation for lists and other paginated content. It renders previous and next controls, numbered page buttons, and ellipsis markers when the page count is large.
15
+
16
+ Use it as a **standalone** component: wire `page`, `totalPages`, and `onPageChange` from your data layer.
17
+
18
+ > View in [Figma](https://www.figma.com/design/JxaLVMTWirCpU0rsbZ30k7/2.-Components-Library?node-id=11768-12849&m=dev).
19
+
20
+ <Canvas of={PaginationStories.Base} />
21
+ <Controls of={PaginationStories.Base} />
22
+
23
+ ## Anatomy
24
+
25
+ The Pagination consists of:
26
+
27
+ - **Previous control**: `IconButton` with a chevron left icon; disabled on the first page
28
+ - **Page buttons**: circular buttons for each visible page, in a horizontal scroll area; the active page uses a filled background
29
+ - **Ellipsis**: non-interactive marker when pages are collapsed
30
+ - **Next control**: `IconButton` with a chevron right icon; disabled on the last page
31
+
32
+ In `compact` density, the page buttons and ellipsis are replaced by a "current of total" label.
33
+
34
+ ### Few pages
35
+
36
+ When all pages fit in the visible range, every page is shown without ellipsis.
37
+
38
+ <Canvas of={PaginationStories.FewPages} />
39
+
40
+ ### First and last page
41
+
42
+ On the first page, the previous control is disabled. On the last page, the next control is disabled.
43
+
44
+ <Canvas of={PaginationStories.FirstPage} />
45
+
46
+ <Canvas of={PaginationStories.LastPage} />
47
+
48
+ ### Density
49
+
50
+ Use `density='compact'` where space is tight. It keeps the previous and next controls and shows the current position as a localized "current of total" label instead of page buttons.
51
+
52
+ In `expanded` density, the page buttons scroll horizontally between fixed previous and next controls when they don't fit, and the active page is kept in view. Prefer `compact` when you don't need direct access to each page.
53
+
54
+ <Canvas of={PaginationStories.DensityShowcase} />
55
+
56
+ ## Accessibility
57
+
58
+ - The root view exposes an accessible name
59
+ - Previous and next controls expose dedicated `accessibilityLabel`s
60
+ - Each page button has an `accessibilityLabel` and the active page sets `accessibilityState.selected`
61
+ - Ellipsis markers are hidden from assistive technology
62
+ - In `compact` density, the "current of total" label is a polite live region on Android, so page changes are announced
63
+
64
+ </Tab>
65
+ <Tab label="Implementation">
66
+
67
+ ## Setup
68
+
69
+ Install and set up the library with our [Setup Guide →](?path=/docs/getting-started-setup--docs).
70
+
71
+ ## Basic usage
72
+
73
+ ```tsx
74
+ import { Pagination } from '@ledgerhq/lumen-ui-rnative';
75
+ import { useState } from 'react';
76
+
77
+ function MyComponent() {
78
+ const [page, setPage] = useState(1);
79
+ const totalPages = 10;
80
+
81
+ return (
82
+ <Pagination page={page} totalPages={totalPages} onPageChange={setPage} />
83
+ );
84
+ }
85
+ ```
86
+
87
+ ## Compact
88
+
89
+ ```tsx
90
+ import { Pagination } from '@ledgerhq/lumen-ui-rnative';
91
+ import { useState } from 'react';
92
+
93
+ function MyComponent() {
94
+ const [page, setPage] = useState(1);
95
+
96
+ return (
97
+ <Pagination
98
+ page={page}
99
+ totalPages={8}
100
+ density='compact'
101
+ onPageChange={setPage}
102
+ />
103
+ );
104
+ }
105
+ ```
106
+
107
+ </Tab>
108
+ </CustomTabs>