@ledgerhq/lumen-ui-rnative 0.1.14 → 0.1.16

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 (362) hide show
  1. package/dist/module/i18n/i18n.js +2 -0
  2. package/dist/module/i18n/i18n.js.map +1 -1
  3. package/dist/module/index.js +0 -1
  4. package/dist/module/index.js.map +1 -1
  5. package/dist/module/lib/Animations/Spin/Spin.js +3 -1
  6. package/dist/module/lib/Animations/Spin/Spin.js.map +1 -1
  7. package/dist/module/lib/Components/AddressInput/AddressInput.js +21 -10
  8. package/dist/module/lib/Components/AddressInput/AddressInput.js.map +1 -1
  9. package/dist/module/lib/Components/AddressInput/AddressInput.mdx +18 -2
  10. package/dist/module/lib/Components/AddressInput/AddressInput.stories.js +1 -23
  11. package/dist/module/lib/Components/AddressInput/AddressInput.stories.js.map +1 -1
  12. package/dist/module/lib/Components/AmountDisplay/AmountDisplay.test.js +0 -1
  13. package/dist/module/lib/Components/AmountDisplay/AmountDisplay.test.js.map +1 -1
  14. package/dist/module/lib/Components/AmountInput/AmountInput.js +7 -6
  15. package/dist/module/lib/Components/AmountInput/AmountInput.js.map +1 -1
  16. package/dist/module/lib/Components/AmountInput/AmountInput.mdx +5 -1
  17. package/dist/module/lib/Components/AmountInput/AmountInput.stories.js +1 -36
  18. package/dist/module/lib/Components/AmountInput/AmountInput.stories.js.map +1 -1
  19. package/dist/module/lib/Components/Avatar/Avatar.figma.js +26 -0
  20. package/dist/module/lib/Components/Avatar/Avatar.figma.js.map +1 -0
  21. package/dist/module/lib/Components/Avatar/Avatar.stories.js +0 -1
  22. package/dist/module/lib/Components/Avatar/Avatar.stories.js.map +1 -1
  23. package/dist/module/lib/Components/Avatar/Avatar.test.js +0 -1
  24. package/dist/module/lib/Components/Avatar/Avatar.test.js.map +1 -1
  25. package/dist/module/lib/Components/Banner/Banner.stories.js +3 -3
  26. package/dist/module/lib/Components/Banner/Banner.stories.js.map +1 -1
  27. package/dist/module/lib/Components/Banner/Banner.test.js +0 -1
  28. package/dist/module/lib/Components/Banner/Banner.test.js.map +1 -1
  29. package/dist/module/lib/Components/BaseInput/BaseInput.js +54 -48
  30. package/dist/module/lib/Components/BaseInput/BaseInput.js.map +1 -1
  31. package/dist/module/lib/Components/BottomSheet/BottomSheet.js +1 -1
  32. package/dist/module/lib/Components/BottomSheet/BottomSheet.js.map +1 -1
  33. package/dist/module/lib/Components/BottomSheet/BottomSheet.test.js +0 -1
  34. package/dist/module/lib/Components/BottomSheet/BottomSheet.test.js.map +1 -1
  35. package/dist/module/lib/Components/BottomSheet/CustomBackdrop.js +0 -2
  36. package/dist/module/lib/Components/BottomSheet/CustomBackdrop.js.map +1 -1
  37. package/dist/module/lib/Components/BottomSheet/CustomHandle.js +0 -1
  38. package/dist/module/lib/Components/BottomSheet/CustomHandle.js.map +1 -1
  39. package/dist/module/lib/Components/Button/BaseButton.test.js +0 -1
  40. package/dist/module/lib/Components/Button/BaseButton.test.js.map +1 -1
  41. package/dist/module/lib/Components/Button/Button.stories.js +2 -2
  42. package/dist/module/lib/Components/Button/Button.stories.js.map +1 -1
  43. package/dist/module/lib/Components/Card/Card.js +3 -3
  44. package/dist/module/lib/Components/Card/Card.js.map +1 -1
  45. package/dist/module/lib/Components/Card/Card.test.js +0 -1
  46. package/dist/module/lib/Components/Card/Card.test.js.map +1 -1
  47. package/dist/module/lib/Components/CardButton/CardButton.test.js +0 -1
  48. package/dist/module/lib/Components/CardButton/CardButton.test.js.map +1 -1
  49. package/dist/module/lib/Components/Checkbox/BaseCheckbox.js +1 -1
  50. package/dist/module/lib/Components/Checkbox/BaseCheckbox.js.map +1 -1
  51. package/dist/module/lib/Components/Checkbox/Checkbox.test.js +0 -1
  52. package/dist/module/lib/Components/Checkbox/Checkbox.test.js.map +1 -1
  53. package/dist/module/lib/Components/ContentBanner/ContentBanner.stories.js +2 -2
  54. package/dist/module/lib/Components/ContentBanner/ContentBanner.stories.js.map +1 -1
  55. package/dist/module/lib/Components/ContentBanner/ContentBanner.test.js +0 -1
  56. package/dist/module/lib/Components/ContentBanner/ContentBanner.test.js.map +1 -1
  57. package/dist/module/lib/Components/Divider/Divider.test.js +0 -1
  58. package/dist/module/lib/Components/Divider/Divider.test.js.map +1 -1
  59. package/dist/module/lib/Components/Icon/Icon.js +2 -1
  60. package/dist/module/lib/Components/Icon/Icon.js.map +1 -1
  61. package/dist/module/lib/Components/Icon/Icon.test.js +0 -1
  62. package/dist/module/lib/Components/Icon/Icon.test.js.map +1 -1
  63. package/dist/module/lib/Components/Icon/createIcon.js +4 -2
  64. package/dist/module/lib/Components/Icon/createIcon.js.map +1 -1
  65. package/dist/module/lib/Components/IconButton/IconButton.test.js +0 -1
  66. package/dist/module/lib/Components/IconButton/IconButton.test.js.map +1 -1
  67. package/dist/module/lib/Components/Link/Link.test.js +3 -3
  68. package/dist/module/lib/Components/Link/Link.test.js.map +1 -1
  69. package/dist/module/lib/Components/ListItem/ListItem.js +64 -179
  70. package/dist/module/lib/Components/ListItem/ListItem.js.map +1 -1
  71. package/dist/module/lib/Components/ListItem/ListItem.mdx +53 -49
  72. package/dist/module/lib/Components/ListItem/ListItem.stories.js +65 -59
  73. package/dist/module/lib/Components/ListItem/ListItem.stories.js.map +1 -1
  74. package/dist/module/lib/Components/MediaImage/MediaImage.js +102 -0
  75. package/dist/module/lib/Components/MediaImage/MediaImage.js.map +1 -0
  76. package/dist/module/lib/Components/MediaImage/MediaImage.mdx +103 -0
  77. package/dist/module/lib/Components/MediaImage/MediaImage.stories.js +91 -0
  78. package/dist/module/lib/Components/MediaImage/MediaImage.stories.js.map +1 -0
  79. package/dist/module/lib/Components/MediaImage/MediaImage.test.js +204 -0
  80. package/dist/module/lib/Components/MediaImage/MediaImage.test.js.map +1 -0
  81. package/dist/module/lib/Components/MediaImage/index.js +5 -0
  82. package/dist/module/lib/Components/MediaImage/index.js.map +1 -0
  83. package/dist/module/lib/Components/MediaImage/types.js +4 -0
  84. package/dist/module/lib/Components/MediaImage/types.js.map +1 -0
  85. package/dist/module/lib/Components/NavBar/NavBar.js +3 -3
  86. package/dist/module/lib/Components/NavBar/NavBar.js.map +1 -1
  87. package/dist/module/lib/Components/NavBar/NavBar.test.js +0 -1
  88. package/dist/module/lib/Components/NavBar/NavBar.test.js.map +1 -1
  89. package/dist/module/lib/Components/PageIndicator/PageIndicator.test.js +2 -2
  90. package/dist/module/lib/Components/PageIndicator/PageIndicator.test.js.map +1 -1
  91. package/dist/module/lib/Components/SearchInput/SearchInput.js +11 -2
  92. package/dist/module/lib/Components/SearchInput/SearchInput.js.map +1 -1
  93. package/dist/module/lib/Components/SearchInput/SearchInput.mdx +14 -2
  94. package/dist/module/lib/Components/SearchInput/SearchInput.stories.js +1 -19
  95. package/dist/module/lib/Components/SearchInput/SearchInput.stories.js.map +1 -1
  96. package/dist/module/lib/Components/SegmentedControl/SegmentedControl.js +46 -14
  97. package/dist/module/lib/Components/SegmentedControl/SegmentedControl.js.map +1 -1
  98. package/dist/module/lib/Components/SegmentedControl/SegmentedControl.mdx +0 -1
  99. package/dist/module/lib/Components/SegmentedControl/SegmentedControl.stories.js +90 -64
  100. package/dist/module/lib/Components/SegmentedControl/SegmentedControl.stories.js.map +1 -1
  101. package/dist/module/lib/Components/SegmentedControl/SegmentedControl.test.js +0 -1
  102. package/dist/module/lib/Components/SegmentedControl/SegmentedControl.test.js.map +1 -1
  103. package/dist/module/lib/Components/SegmentedControl/SegmentedControlContext.js.map +1 -1
  104. package/dist/module/lib/Components/SegmentedControl/usePillLayout.js +40 -16
  105. package/dist/module/lib/Components/SegmentedControl/usePillLayout.js.map +1 -1
  106. package/dist/module/lib/Components/Select/GlobalSelectBottomSheet.js +1 -1
  107. package/dist/module/lib/Components/Select/GlobalSelectBottomSheet.js.map +1 -1
  108. package/dist/module/lib/Components/Select/GlobalSelectContext.js +1 -1
  109. package/dist/module/lib/Components/Select/GlobalSelectContext.js.map +1 -1
  110. package/dist/module/lib/Components/Select/Select.js +3 -3
  111. package/dist/module/lib/Components/Select/Select.js.map +1 -1
  112. package/dist/module/lib/Components/Select/Select.test.js +0 -1
  113. package/dist/module/lib/Components/Select/Select.test.js.map +1 -1
  114. package/dist/module/lib/Components/Skeleton/Skeleton.test.js +0 -1
  115. package/dist/module/lib/Components/Skeleton/Skeleton.test.js.map +1 -1
  116. package/dist/module/lib/Components/Slot/Slot.js +4 -0
  117. package/dist/module/lib/Components/Slot/Slot.js.map +1 -1
  118. package/dist/module/lib/Components/Spinner/Spinner.mdx +1 -3
  119. package/dist/module/lib/Components/Spot/Spot.stories.js +0 -1
  120. package/dist/module/lib/Components/Spot/Spot.stories.js.map +1 -1
  121. package/dist/module/lib/Components/Stepper/Stepper.mdx +1 -3
  122. package/dist/module/lib/Components/Stepper/Stepper.test.js +0 -1
  123. package/dist/module/lib/Components/Stepper/Stepper.test.js.map +1 -1
  124. package/dist/module/lib/Components/Subheader/Subheader.stories.js +0 -1
  125. package/dist/module/lib/Components/Subheader/Subheader.stories.js.map +1 -1
  126. package/dist/module/lib/Components/Subheader/Subheader.test.js +0 -1
  127. package/dist/module/lib/Components/Subheader/Subheader.test.js.map +1 -1
  128. package/dist/module/lib/Components/Switch/BaseSwitch.js +1 -1
  129. package/dist/module/lib/Components/Switch/BaseSwitch.js.map +1 -1
  130. package/dist/module/lib/Components/Switch/Switch.test.js +0 -1
  131. package/dist/module/lib/Components/Switch/Switch.test.js.map +1 -1
  132. package/dist/module/lib/Components/TabBar/TabBar.js +8 -8
  133. package/dist/module/lib/Components/TabBar/TabBar.js.map +1 -1
  134. package/dist/module/lib/Components/TabBar/TabBar.test.js +0 -1
  135. package/dist/module/lib/Components/TabBar/TabBar.test.js.map +1 -1
  136. package/dist/module/lib/Components/TextInput/TextInput.mdx +14 -2
  137. package/dist/module/lib/Components/TextInput/TextInput.stories.js +1 -28
  138. package/dist/module/lib/Components/TextInput/TextInput.stories.js.map +1 -1
  139. package/dist/module/lib/Components/Tile/Tile.stories.js +0 -1
  140. package/dist/module/lib/Components/Tile/Tile.stories.js.map +1 -1
  141. package/dist/module/lib/Components/Tile/Tile.test.js +0 -1
  142. package/dist/module/lib/Components/Tile/Tile.test.js.map +1 -1
  143. package/dist/module/lib/Components/TileButton/TileButton.test.js +0 -1
  144. package/dist/module/lib/Components/TileButton/TileButton.test.js.map +1 -1
  145. package/dist/module/lib/Components/Tooltip/GlobalTooltipBottomSheet.js +1 -1
  146. package/dist/module/lib/Components/Tooltip/GlobalTooltipBottomSheet.js.map +1 -1
  147. package/dist/module/lib/Components/Tooltip/GlobalTooltipContext.js +1 -1
  148. package/dist/module/lib/Components/Tooltip/GlobalTooltipContext.js.map +1 -1
  149. package/dist/module/lib/Components/Tooltip/Tooltip.test.js +0 -1
  150. package/dist/module/lib/Components/Tooltip/Tooltip.test.js.map +1 -1
  151. package/dist/module/lib/Components/TriggerButton/TriggerButton.test.js +1 -1
  152. package/dist/module/lib/Components/TriggerButton/TriggerButton.test.js.map +1 -1
  153. package/dist/module/lib/Components/Utility/Gradient/LinearGradient/LinearGradient.stories.js.map +1 -1
  154. package/dist/module/lib/Components/Utility/Gradient/LinearGradient/LinearGradient.test.js +1 -1
  155. package/dist/module/lib/Components/Utility/Gradient/LinearGradient/LinearGradient.test.js.map +1 -1
  156. package/dist/module/lib/Components/Utility/Gradient/RadialGradient/RadialGradient.test.js +1 -1
  157. package/dist/module/lib/Components/Utility/Gradient/RadialGradient/RadialGradient.test.js.map +1 -1
  158. package/dist/module/lib/Components/Utility/Pressable/Pressable.test.js +1 -1
  159. package/dist/module/lib/Components/Utility/Pressable/Pressable.test.js.map +1 -1
  160. package/dist/module/lib/Components/index.js +1 -0
  161. package/dist/module/lib/Components/index.js.map +1 -1
  162. package/dist/module/lib/utils/react/extractTextFromChildren.js +3 -3
  163. package/dist/module/lib/utils/react/extractTextFromChildren.js.map +1 -1
  164. package/dist/module/lib/utils/useControllableState/useControllableState.js +5 -5
  165. package/dist/module/lib/utils/useControllableState/useControllableState.js.map +1 -1
  166. package/dist/module/lib/utils/useEvent/useGet.js +3 -3
  167. package/dist/module/lib/utils/useEvent/useGet.js.map +1 -1
  168. package/dist/module/styles/hooks/useStyleSheet.test.js +1 -1
  169. package/dist/module/styles/hooks/useStyleSheet.test.js.map +1 -1
  170. package/dist/module/styles/lx/createStyledPressable.test.js +1 -1
  171. package/dist/module/styles/lx/createStyledPressable.test.js.map +1 -1
  172. package/dist/module/styles/lx/createStyledText.test.js +1 -1
  173. package/dist/module/styles/lx/createStyledText.test.js.map +1 -1
  174. package/dist/module/styles/lx/createStyledView.test.js +1 -1
  175. package/dist/module/styles/lx/createStyledView.test.js.map +1 -1
  176. package/dist/module/styles/lx/resolveStyle.test.js +0 -1
  177. package/dist/module/styles/lx/resolveStyle.test.js.map +1 -1
  178. package/dist/module/styles/provider/LumenStyleSheetProvider.test.js +2 -4
  179. package/dist/module/styles/provider/LumenStyleSheetProvider.test.js.map +1 -1
  180. package/dist/module/utils/icon-template.js +3 -0
  181. package/dist/module/utils/icon-template.js.map +1 -1
  182. package/dist/typescript/src/i18n/i18n.d.ts.map +1 -1
  183. package/dist/typescript/src/index.d.ts +0 -1
  184. package/dist/typescript/src/index.d.ts.map +1 -1
  185. package/dist/typescript/src/lib/Animations/Spin/Spin.d.ts.map +1 -1
  186. package/dist/typescript/src/lib/Components/AddressInput/AddressInput.d.ts +1 -1
  187. package/dist/typescript/src/lib/Components/AddressInput/AddressInput.d.ts.map +1 -1
  188. package/dist/typescript/src/lib/Components/AmountInput/AmountInput.d.ts +1 -1
  189. package/dist/typescript/src/lib/Components/AmountInput/AmountInput.d.ts.map +1 -1
  190. package/dist/typescript/src/lib/Components/AmountInput/types.d.ts +7 -0
  191. package/dist/typescript/src/lib/Components/AmountInput/types.d.ts.map +1 -1
  192. package/dist/typescript/src/lib/Components/Avatar/Avatar.figma.d.ts +2 -0
  193. package/dist/typescript/src/lib/Components/Avatar/Avatar.figma.d.ts.map +1 -0
  194. package/dist/typescript/src/lib/Components/BaseInput/BaseInput.d.ts +1 -1
  195. package/dist/typescript/src/lib/Components/BaseInput/BaseInput.d.ts.map +1 -1
  196. package/dist/typescript/src/lib/Components/BaseInput/types.d.ts +7 -0
  197. package/dist/typescript/src/lib/Components/BaseInput/types.d.ts.map +1 -1
  198. package/dist/typescript/src/lib/Components/BottomSheet/CustomBackdrop.d.ts +0 -1
  199. package/dist/typescript/src/lib/Components/BottomSheet/CustomBackdrop.d.ts.map +1 -1
  200. package/dist/typescript/src/lib/Components/BottomSheet/CustomHandle.d.ts +1 -1
  201. package/dist/typescript/src/lib/Components/BottomSheet/CustomHandle.d.ts.map +1 -1
  202. package/dist/typescript/src/lib/Components/Card/Card.d.ts.map +1 -1
  203. package/dist/typescript/src/lib/Components/CardButton/types.d.ts +0 -1
  204. package/dist/typescript/src/lib/Components/CardButton/types.d.ts.map +1 -1
  205. package/dist/typescript/src/lib/Components/ContentBanner/types.d.ts +0 -1
  206. package/dist/typescript/src/lib/Components/ContentBanner/types.d.ts.map +1 -1
  207. package/dist/typescript/src/lib/Components/Icon/createIcon.d.ts +1 -2
  208. package/dist/typescript/src/lib/Components/Icon/createIcon.d.ts.map +1 -1
  209. package/dist/typescript/src/lib/Components/ListItem/ListItem.d.ts +21 -40
  210. package/dist/typescript/src/lib/Components/ListItem/ListItem.d.ts.map +1 -1
  211. package/dist/typescript/src/lib/Components/ListItem/types.d.ts +10 -37
  212. package/dist/typescript/src/lib/Components/ListItem/types.d.ts.map +1 -1
  213. package/dist/typescript/src/lib/Components/MediaImage/MediaImage.d.ts +18 -0
  214. package/dist/typescript/src/lib/Components/MediaImage/MediaImage.d.ts.map +1 -0
  215. package/dist/typescript/src/lib/Components/MediaImage/index.d.ts +3 -0
  216. package/dist/typescript/src/lib/Components/MediaImage/index.d.ts.map +1 -0
  217. package/dist/typescript/src/lib/Components/MediaImage/types.d.ts +25 -0
  218. package/dist/typescript/src/lib/Components/MediaImage/types.d.ts.map +1 -0
  219. package/dist/typescript/src/lib/Components/SearchInput/SearchInput.d.ts +1 -1
  220. package/dist/typescript/src/lib/Components/SearchInput/SearchInput.d.ts.map +1 -1
  221. package/dist/typescript/src/lib/Components/SegmentedControl/SegmentedControl.d.ts +1 -1
  222. package/dist/typescript/src/lib/Components/SegmentedControl/SegmentedControl.d.ts.map +1 -1
  223. package/dist/typescript/src/lib/Components/SegmentedControl/SegmentedControlContext.d.ts +6 -0
  224. package/dist/typescript/src/lib/Components/SegmentedControl/SegmentedControlContext.d.ts.map +1 -1
  225. package/dist/typescript/src/lib/Components/SegmentedControl/types.d.ts +7 -0
  226. package/dist/typescript/src/lib/Components/SegmentedControl/types.d.ts.map +1 -1
  227. package/dist/typescript/src/lib/Components/SegmentedControl/usePillLayout.d.ts +7 -3
  228. package/dist/typescript/src/lib/Components/SegmentedControl/usePillLayout.d.ts.map +1 -1
  229. package/dist/typescript/src/lib/Components/Select/GlobalSelectBottomSheet.d.ts +0 -1
  230. package/dist/typescript/src/lib/Components/Select/GlobalSelectBottomSheet.d.ts.map +1 -1
  231. package/dist/typescript/src/lib/Components/Select/GlobalSelectContext.d.ts +1 -1
  232. package/dist/typescript/src/lib/Components/Select/GlobalSelectContext.d.ts.map +1 -1
  233. package/dist/typescript/src/lib/Components/Select/Select.d.ts.map +1 -1
  234. package/dist/typescript/src/lib/Components/Slot/Slot.d.ts.map +1 -1
  235. package/dist/typescript/src/lib/Components/Spot/types.d.ts +2 -2
  236. package/dist/typescript/src/lib/Components/Spot/types.d.ts.map +1 -1
  237. package/dist/typescript/src/lib/Components/Switch/BaseSwitch.d.ts +0 -1
  238. package/dist/typescript/src/lib/Components/Switch/BaseSwitch.d.ts.map +1 -1
  239. package/dist/typescript/src/lib/Components/TabBar/TabBar.d.ts.map +1 -1
  240. package/dist/typescript/src/lib/Components/Tooltip/GlobalTooltipBottomSheet.d.ts +0 -1
  241. package/dist/typescript/src/lib/Components/Tooltip/GlobalTooltipBottomSheet.d.ts.map +1 -1
  242. package/dist/typescript/src/lib/Components/Tooltip/GlobalTooltipContext.d.ts +1 -1
  243. package/dist/typescript/src/lib/Components/Tooltip/GlobalTooltipContext.d.ts.map +1 -1
  244. package/dist/typescript/src/lib/Components/index.d.ts +1 -0
  245. package/dist/typescript/src/lib/Components/index.d.ts.map +1 -1
  246. package/dist/typescript/src/lib/types/index.d.ts +6 -6
  247. package/dist/typescript/src/lib/types/index.d.ts.map +1 -1
  248. package/dist/typescript/src/lib/utils/react/extractTextFromChildren.d.ts +2 -2
  249. package/dist/typescript/src/lib/utils/react/extractTextFromChildren.d.ts.map +1 -1
  250. package/dist/typescript/src/lib/utils/useControllableState/useControllableState.d.ts +3 -3
  251. package/dist/typescript/src/lib/utils/useControllableState/useControllableState.d.ts.map +1 -1
  252. package/dist/typescript/src/utils/icon-template.d.ts.map +1 -1
  253. package/package.json +2 -2
  254. package/src/i18n/i18n.ts +2 -0
  255. package/src/index.ts +0 -1
  256. package/src/lib/Animations/Spin/Spin.tsx +5 -1
  257. package/src/lib/Components/AddressInput/AddressInput.mdx +18 -2
  258. package/src/lib/Components/AddressInput/AddressInput.stories.tsx +1 -23
  259. package/src/lib/Components/AddressInput/AddressInput.tsx +15 -7
  260. package/src/lib/Components/AmountDisplay/AmountDisplay.test.tsx +0 -1
  261. package/src/lib/Components/AmountInput/AmountInput.mdx +5 -1
  262. package/src/lib/Components/AmountInput/AmountInput.stories.tsx +1 -36
  263. package/src/lib/Components/AmountInput/AmountInput.tsx +4 -3
  264. package/src/lib/Components/AmountInput/types.ts +7 -0
  265. package/src/lib/Components/Avatar/Avatar.figma.tsx +29 -0
  266. package/src/lib/Components/Avatar/Avatar.stories.tsx +0 -1
  267. package/src/lib/Components/Avatar/Avatar.test.tsx +0 -1
  268. package/src/lib/Components/Banner/Banner.stories.tsx +3 -3
  269. package/src/lib/Components/Banner/Banner.test.tsx +0 -1
  270. package/src/lib/Components/BaseInput/BaseInput.tsx +66 -60
  271. package/src/lib/Components/BaseInput/types.ts +7 -0
  272. package/src/lib/Components/BottomSheet/BottomSheet.test.tsx +0 -1
  273. package/src/lib/Components/BottomSheet/BottomSheet.tsx +1 -1
  274. package/src/lib/Components/BottomSheet/CustomBackdrop.tsx +0 -2
  275. package/src/lib/Components/BottomSheet/CustomHandle.tsx +1 -1
  276. package/src/lib/Components/Button/BaseButton.test.tsx +0 -1
  277. package/src/lib/Components/Button/Button.stories.tsx +2 -2
  278. package/src/lib/Components/Card/Card.test.tsx +0 -1
  279. package/src/lib/Components/Card/Card.tsx +3 -2
  280. package/src/lib/Components/CardButton/CardButton.test.tsx +0 -1
  281. package/src/lib/Components/CardButton/types.ts +0 -1
  282. package/src/lib/Components/Checkbox/BaseCheckbox.tsx +1 -1
  283. package/src/lib/Components/Checkbox/Checkbox.test.tsx +0 -1
  284. package/src/lib/Components/ContentBanner/ContentBanner.stories.tsx +2 -2
  285. package/src/lib/Components/ContentBanner/ContentBanner.test.tsx +0 -1
  286. package/src/lib/Components/ContentBanner/types.ts +0 -1
  287. package/src/lib/Components/Divider/Divider.test.tsx +0 -1
  288. package/src/lib/Components/Icon/Icon.test.tsx +0 -1
  289. package/src/lib/Components/Icon/Icon.tsx +1 -1
  290. package/src/lib/Components/Icon/createIcon.ts +3 -2
  291. package/src/lib/Components/IconButton/IconButton.test.tsx +0 -1
  292. package/src/lib/Components/Link/Link.test.tsx +3 -3
  293. package/src/lib/Components/ListItem/ListItem.mdx +53 -49
  294. package/src/lib/Components/ListItem/ListItem.stories.tsx +51 -54
  295. package/src/lib/Components/ListItem/ListItem.tsx +80 -210
  296. package/src/lib/Components/ListItem/types.ts +10 -41
  297. package/src/lib/Components/MediaImage/MediaImage.mdx +103 -0
  298. package/src/lib/Components/MediaImage/MediaImage.stories.tsx +55 -0
  299. package/src/lib/Components/MediaImage/MediaImage.test.tsx +179 -0
  300. package/src/lib/Components/MediaImage/MediaImage.tsx +117 -0
  301. package/src/lib/Components/MediaImage/index.ts +2 -0
  302. package/src/lib/Components/MediaImage/types.ts +27 -0
  303. package/src/lib/Components/NavBar/NavBar.test.tsx +0 -1
  304. package/src/lib/Components/NavBar/NavBar.tsx +3 -3
  305. package/src/lib/Components/PageIndicator/PageIndicator.test.tsx +2 -2
  306. package/src/lib/Components/SearchInput/SearchInput.mdx +14 -2
  307. package/src/lib/Components/SearchInput/SearchInput.stories.tsx +1 -19
  308. package/src/lib/Components/SearchInput/SearchInput.tsx +8 -1
  309. package/src/lib/Components/SegmentedControl/SegmentedControl.mdx +0 -1
  310. package/src/lib/Components/SegmentedControl/SegmentedControl.stories.tsx +77 -51
  311. package/src/lib/Components/SegmentedControl/SegmentedControl.test.tsx +0 -1
  312. package/src/lib/Components/SegmentedControl/SegmentedControl.tsx +42 -9
  313. package/src/lib/Components/SegmentedControl/SegmentedControlContext.tsx +4 -0
  314. package/src/lib/Components/SegmentedControl/types.ts +7 -0
  315. package/src/lib/Components/SegmentedControl/usePillLayout.ts +66 -19
  316. package/src/lib/Components/Select/GlobalSelectBottomSheet.tsx +1 -1
  317. package/src/lib/Components/Select/GlobalSelectContext.tsx +1 -1
  318. package/src/lib/Components/Select/Select.test.tsx +0 -1
  319. package/src/lib/Components/Select/Select.tsx +16 -14
  320. package/src/lib/Components/Skeleton/Skeleton.test.tsx +0 -1
  321. package/src/lib/Components/Slot/Slot.tsx +4 -0
  322. package/src/lib/Components/Spinner/Spinner.mdx +1 -3
  323. package/src/lib/Components/Spot/Spot.stories.tsx +0 -1
  324. package/src/lib/Components/Spot/types.ts +2 -2
  325. package/src/lib/Components/Stepper/Stepper.mdx +1 -3
  326. package/src/lib/Components/Stepper/Stepper.test.tsx +0 -1
  327. package/src/lib/Components/Subheader/Subheader.stories.tsx +0 -1
  328. package/src/lib/Components/Subheader/Subheader.test.tsx +0 -1
  329. package/src/lib/Components/Switch/BaseSwitch.tsx +1 -1
  330. package/src/lib/Components/Switch/Switch.test.tsx +0 -1
  331. package/src/lib/Components/TabBar/TabBar.test.tsx +0 -1
  332. package/src/lib/Components/TabBar/TabBar.tsx +12 -5
  333. package/src/lib/Components/TextInput/TextInput.mdx +14 -2
  334. package/src/lib/Components/TextInput/TextInput.stories.tsx +1 -28
  335. package/src/lib/Components/Tile/Tile.stories.tsx +0 -1
  336. package/src/lib/Components/Tile/Tile.test.tsx +0 -1
  337. package/src/lib/Components/TileButton/TileButton.test.tsx +0 -1
  338. package/src/lib/Components/Tooltip/GlobalTooltipBottomSheet.tsx +1 -1
  339. package/src/lib/Components/Tooltip/GlobalTooltipContext.tsx +1 -7
  340. package/src/lib/Components/Tooltip/Tooltip.test.tsx +0 -1
  341. package/src/lib/Components/TriggerButton/TriggerButton.test.tsx +1 -1
  342. package/src/lib/Components/Utility/Gradient/LinearGradient/LinearGradient.stories.tsx +1 -1
  343. package/src/lib/Components/Utility/Gradient/LinearGradient/LinearGradient.test.tsx +1 -1
  344. package/src/lib/Components/Utility/Gradient/RadialGradient/RadialGradient.test.tsx +1 -1
  345. package/src/lib/Components/Utility/Pressable/Pressable.test.tsx +1 -1
  346. package/src/lib/Components/index.ts +1 -0
  347. package/src/lib/types/index.ts +7 -7
  348. package/src/lib/utils/react/extractTextFromChildren.ts +4 -4
  349. package/src/lib/utils/useControllableState/useControllableState.ts +7 -9
  350. package/src/lib/utils/useEvent/useGet.ts +3 -3
  351. package/src/styles/hooks/useStyleSheet.test.tsx +1 -1
  352. package/src/styles/lx/createStyledPressable.test.tsx +1 -1
  353. package/src/styles/lx/createStyledText.test.tsx +1 -1
  354. package/src/styles/lx/createStyledView.test.tsx +1 -1
  355. package/src/styles/lx/resolveStyle.test.tsx +0 -1
  356. package/src/styles/provider/LumenStyleSheetProvider.test.tsx +2 -2
  357. package/src/utils/icon-template.ts +2 -0
  358. package/dist/module/lib/Patterns/index.js +0 -4
  359. package/dist/module/lib/Patterns/index.js.map +0 -1
  360. package/dist/typescript/src/lib/Patterns/index.d.ts +0 -3
  361. package/dist/typescript/src/lib/Patterns/index.d.ts.map +0 -1
  362. package/src/lib/Patterns/index.ts +0 -1
@@ -1,5 +1,5 @@
1
- import * as React from 'react';
2
- type ChangeCb<T> = ((next: T) => void) | React.Dispatch<React.SetStateAction<T>>;
1
+ import { Dispatch, SetStateAction } from 'react';
2
+ type ChangeCb<T> = ((next: T) => void) | Dispatch<SetStateAction<T>>;
3
3
  /**
4
4
  * Allow to use a controlled or uncontrolled state.
5
5
  * @see {@link https://github.com/tamagui/tamagui/blob/02f3e4c2fd76d5dc17815cf83842c05a3aade54c/code/core/use-controllable-state/src/useControllableState.ts}
@@ -10,6 +10,6 @@ export declare function useControllableState<T>({ prop, defaultProp, onChange, s
10
10
  onChange?: ChangeCb<T>;
11
11
  strategy?: 'prop-wins' | 'most-recent-wins';
12
12
  transition?: boolean;
13
- }): [T, React.Dispatch<React.SetStateAction<T>>];
13
+ }): [T, Dispatch<SetStateAction<T>>];
14
14
  export {};
15
15
  //# sourceMappingURL=useControllableState.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useControllableState.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/utils/useControllableState/useControllableState.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,KAAK,QAAQ,CAAC,CAAC,IACX,CAAC,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,CAAC,GACnB,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC;AAI5C;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,EACtC,IAAI,EACJ,WAAW,EACX,QAAQ,EACR,QAAsB,EACtB,UAAU,GACX,EAAE;IACD,IAAI,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC;IACrB,WAAW,EAAE,CAAC,CAAC;IACf,QAAQ,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC;IACvB,QAAQ,CAAC,EAAE,WAAW,GAAG,kBAAkB,CAAC;IAC5C,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,GAAG,CAAC,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAsC/C"}
1
+ {"version":3,"file":"useControllableState.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/utils/useControllableState/useControllableState.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,cAAc,EAA+B,MAAM,OAAO,CAAC;AAO9E,KAAK,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,CAAC,GAAG,QAAQ,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC;AAIrE;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,EACtC,IAAI,EACJ,WAAW,EACX,QAAQ,EACR,QAAsB,EACtB,UAAU,GACX,EAAE;IACD,IAAI,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC;IACrB,WAAW,EAAE,CAAC,CAAC;IACf,QAAQ,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC;IACvB,QAAQ,CAAC,EAAE,WAAW,GAAG,kBAAkB,CAAC;IAC5C,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,GAAG,CAAC,CAAC,EAAE,QAAQ,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAsCnC"}
@@ -1 +1 @@
1
- {"version":3,"file":"icon-template.d.ts","sourceRoot":"","sources":["../../../../src/utils/icon-template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,4CAA4C,CAAC;AAEtE,QAAA,MAAM,QAAQ,EAAE,QA4Cf,CAAC;AAEF,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"icon-template.d.ts","sourceRoot":"","sources":["../../../../src/utils/icon-template.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,4CAA4C,CAAC;AAEtE,QAAA,MAAM,QAAQ,EAAE,QA4Cf,CAAC;AAEF,eAAe,QAAQ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ledgerhq/lumen-ui-rnative",
3
- "version": "0.1.14",
3
+ "version": "0.1.16",
4
4
  "license": "Apache-2.0",
5
5
  "keywords": [
6
6
  "react-native",
@@ -52,7 +52,7 @@
52
52
  "peerDependencies": {
53
53
  "@types/react": "^19.0.0",
54
54
  "@gorhom/bottom-sheet": "^5.0.0",
55
- "@ledgerhq/lumen-design-core": "0.1.7",
55
+ "@ledgerhq/lumen-design-core": "0.1.8",
56
56
  "react": "^19.0.0",
57
57
  "react-native": "~0.79.7",
58
58
  "react-native-reanimated": "^4.1.0",
package/src/i18n/i18n.ts CHANGED
@@ -52,6 +52,7 @@ const initializeI18n = (): I18nInstance => {
52
52
  },
53
53
  })
54
54
  .catch((error: unknown) => {
55
+ // eslint-disable-next-line no-console
55
56
  console.error('Failed to initialize i18next:', error);
56
57
  });
57
58
 
@@ -81,6 +82,7 @@ export const loadLocale = async (locale: SupportedLocale): Promise<void> => {
81
82
 
82
83
  loadedLocales.add(locale);
83
84
  } catch (error) {
85
+ // eslint-disable-next-line no-console
84
86
  console.error(`Failed to load locale ${locale}`, error);
85
87
  throw error;
86
88
  }
package/src/index.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  export { type SupportedLocale, Languages } from './i18n';
2
2
  export * from './lib/Components';
3
- export * from './lib/Patterns';
4
3
  export * from './lib/Animations';
5
4
  export * from './lib/Haptics';
@@ -35,6 +35,10 @@ export const Spin = memo(({ children, timing }: SpinProps) => {
35
35
  [sv],
36
36
  );
37
37
 
38
- return <Animated.View style={animatedStyle}>{children}</Animated.View>;
38
+ return (
39
+ <Animated.View style={[{ alignSelf: 'flex-start' }, animatedStyle]}>
40
+ {children}
41
+ </Animated.View>
42
+ );
39
43
  });
40
44
  Spin.displayName = 'Spin';
@@ -68,10 +68,14 @@ The error message will be automatically:
68
68
 
69
69
  ### Disabled State
70
70
 
71
- The input can be disabled using the `editable` prop set to `false`.
71
+ The input can be fully disabled using the `disabled` prop, which prevents interaction and applies a muted visual style.
72
72
 
73
73
  <Canvas of={AddressInputStories.DisabledAddressInput} />
74
74
 
75
+ ### Read-Only State
76
+
77
+ Alternatively, use `editable={false}` to prevent editing without applying the muted visual style. This is useful for displaying confirmed addresses that should still look like regular inputs.
78
+
75
79
  ## Controlled vs Uncontrolled
76
80
 
77
81
  The AddressInput component supports both controlled and uncontrolled usage.
@@ -333,7 +337,19 @@ Use the `keyboardType` prop to show the appropriate keyboard:
333
337
 
334
338
  ### Disabled State
335
339
 
336
- Use the `editable` prop to disable the input:
340
+ Use the `disabled` prop to disable the input with a muted visual style:
341
+
342
+ ```tsx
343
+ <AddressInput
344
+ placeholder='Enter address or ENS'
345
+ value='0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb27'
346
+ disabled
347
+ />
348
+ ```
349
+
350
+ ### Read-Only State
351
+
352
+ Use the `editable` prop to make the input non-editable without the muted visual style:
337
353
 
338
354
  ```tsx
339
355
  <AddressInput
@@ -16,28 +16,6 @@ const meta: Meta<typeof AddressInput> = {
16
16
  },
17
17
  },
18
18
  },
19
- argTypes: {
20
- placeholder: {
21
- control: 'text',
22
- description: 'Placeholder text when input is empty',
23
- },
24
- prefix: {
25
- control: 'text',
26
- description: 'Custom prefix text (default: "To:")',
27
- },
28
- errorMessage: {
29
- control: 'text',
30
- description: 'Error message to display below input',
31
- },
32
- editable: {
33
- control: 'boolean',
34
- description: 'Whether the input is editable',
35
- },
36
- hideClearButton: {
37
- control: 'boolean',
38
- description: 'Hide the clear button',
39
- },
40
- },
41
19
  };
42
20
 
43
21
  export default meta;
@@ -154,7 +132,7 @@ export const DisabledAddressInput: Story = {
154
132
  placeholder: 'Enter address or ENS',
155
133
  value: '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb27',
156
134
  prefix: 'To:',
157
- editable: false,
135
+ disabled: true,
158
136
  hideClearButton: false,
159
137
  },
160
138
  };
@@ -1,3 +1,4 @@
1
+ import { useDisabledContext } from '@ledgerhq/lumen-utils-shared';
1
2
  import { Text } from 'react-native';
2
3
  import { useCommonTranslation } from '../../../i18n';
3
4
  import { useStyleSheet } from '../../../styles';
@@ -10,11 +11,16 @@ export const AddressInput = ({
10
11
  prefix = 'To:',
11
12
  suffix,
12
13
  onQrCodeClick,
14
+ disabled: disabledProp,
13
15
  ref,
14
16
  ...props
15
17
  }: AddressInputProps) => {
18
+ const disabled = useDisabledContext({
19
+ consumerName: 'AddressInput',
20
+ mergeWith: { disabled: disabledProp },
21
+ });
16
22
  const { t } = useCommonTranslation();
17
- const styles = useStyles();
23
+ const styles = useStyles({ disabled });
18
24
 
19
25
  const actualPrefix = (
20
26
  <Text accessible={false} style={styles.prefix}>
@@ -39,20 +45,22 @@ export const AddressInput = ({
39
45
  ref={ref}
40
46
  prefix={actualPrefix}
41
47
  suffix={actualSuffix}
48
+ disabled={disabledProp}
42
49
  {...props}
43
50
  />
44
51
  );
45
52
  };
46
53
 
47
- const useStyles = () => {
48
- return useStyleSheet((t) => {
49
- return {
54
+ const useStyles = ({ disabled }: { disabled: boolean }) => {
55
+ return useStyleSheet(
56
+ (t) => ({
50
57
  prefix: {
51
58
  ...t.typographies.body1,
52
- color: t.colors.text.base,
59
+ color: disabled ? t.colors.text.disabled : t.colors.text.base,
53
60
  },
54
- };
55
- }, []);
61
+ }),
62
+ [disabled],
63
+ );
56
64
  };
57
65
 
58
66
  AddressInput.displayName = 'AddressInput';
@@ -1,7 +1,6 @@
1
1
  import { describe, it, expect } from '@jest/globals';
2
2
  import { ledgerLiveThemes } from '@ledgerhq/lumen-design-core';
3
3
  import { render, screen } from '@testing-library/react-native';
4
- import React from 'react';
5
4
  import { ThemeProvider } from '../ThemeProvider/ThemeProvider';
6
5
  import { AmountDisplay } from './AmountDisplay';
7
6
  import { FormattedValue } from './types';
@@ -76,10 +76,14 @@ The input supports error handling through `isInvalid` prop which controls the er
76
76
 
77
77
  ### Disabled State
78
78
 
79
- The component supports disabled state through the `editable` prop set to `false` with appropriate visual feedback.
79
+ The input can be fully disabled using the `disabled` prop, which prevents interaction and applies a muted visual style.
80
80
 
81
81
  <Canvas of={AmountInputStories.DisabledAmountInput} />
82
82
 
83
+ ### Read-Only State
84
+
85
+ Alternatively, use `editable={false}` to prevent editing without applying the muted visual style. This is useful for displaying non-editable values that should still look like regular inputs.
86
+
83
87
  ## Animations
84
88
 
85
89
  The AmountInput features several sophisticated animations:
@@ -16,41 +16,6 @@ const meta: Meta<typeof AmountInput> = {
16
16
  },
17
17
  },
18
18
  },
19
- argTypes: {
20
- currencyText: {
21
- control: 'text',
22
- description: 'Currency text to display (e.g. USD, EUR, $)',
23
- },
24
- currencyPosition: {
25
- control: 'radio',
26
- options: ['left', 'right'],
27
- description: 'Position of the currency text',
28
- },
29
- allowDecimals: {
30
- control: 'boolean',
31
- description: 'Whether to allow decimal values',
32
- },
33
- thousandsSeparator: {
34
- control: 'boolean',
35
- description: 'Whether to display thousands separator',
36
- },
37
- maxIntegerLength: {
38
- control: 'number',
39
- description: 'Maximum digits for integer part',
40
- },
41
- maxDecimalLength: {
42
- control: 'number',
43
- description: 'Maximum digits for decimal part',
44
- },
45
- isInvalid: {
46
- control: 'boolean',
47
- description: 'Whether the input is in error state',
48
- },
49
- editable: {
50
- control: 'boolean',
51
- description: 'Whether the input is editable',
52
- },
53
- },
54
19
  };
55
20
 
56
21
  export default meta;
@@ -190,7 +155,7 @@ export const DisabledAmountInput: Story = {
190
155
  allowDecimals: true,
191
156
  thousandsSeparator: true,
192
157
  isInvalid: false,
193
- editable: false,
158
+ disabled: true,
194
159
  },
195
160
  };
196
161
 
@@ -27,7 +27,8 @@ export const AmountInput = ({
27
27
  style,
28
28
  currencyText,
29
29
  currencyPosition = 'left',
30
- editable: editableProp = true,
30
+ editable,
31
+ disabled: disabledProp = false,
31
32
  maxIntegerLength = 9,
32
33
  maxDecimalLength = 9,
33
34
  allowDecimals = true,
@@ -43,7 +44,7 @@ export const AmountInput = ({
43
44
  const [isFocused, setIsFocused] = useState(false);
44
45
  const disabled = useDisabledContext({
45
46
  consumerName: 'AmountInput',
46
- mergeWith: { disabled: !editableProp },
47
+ mergeWith: { disabled: disabledProp },
47
48
  });
48
49
 
49
50
  const translateX = useSharedValue(0);
@@ -146,7 +147,7 @@ export const AmountInput = ({
146
147
  <TextInput
147
148
  ref={inputRef}
148
149
  keyboardType='decimal-pad'
149
- editable={!disabled}
150
+ editable={editable !== false && !disabled}
150
151
  value={inputValue}
151
152
  onChangeText={handleChangeText}
152
153
  onFocus={(e) => {
@@ -39,6 +39,13 @@ export type AmountInputProps = Omit<
39
39
  * @default true
40
40
  */
41
41
  allowDecimals?: boolean;
42
+ /**
43
+ * Whether the input is disabled.
44
+ * When true, the input is not editable and displays a muted visual style.
45
+ * This differs from `editable={false}` which only prevents interaction.
46
+ * @default false
47
+ */
48
+ disabled?: boolean;
42
49
  /**
43
50
  * Additional style
44
51
  */
@@ -0,0 +1,29 @@
1
+ import figma from '@figma/code-connect';
2
+ import { Avatar } from './Avatar';
3
+
4
+ figma.connect(
5
+ Avatar,
6
+ 'https://www.figma.com/design/JxaLVMTWirCpU0rsbZ30k7?node-id=11097-8',
7
+ {
8
+ imports: ["import { Avatar } from '@ledgerhq/lumen-ui-rnative'"],
9
+ props: {
10
+ size: figma.enum('size', {
11
+ sm: 'sm',
12
+ md: 'md',
13
+ lg: 'lg',
14
+ }),
15
+ showNotification: figma.boolean('show-notification', {
16
+ true: true,
17
+ false: false,
18
+ }),
19
+ },
20
+ example: (props) => (
21
+ <Avatar
22
+ src='https://example-image.com'
23
+ size={props.size}
24
+ alt="John Doe's Avatar"
25
+ showNotification={props.showNotification}
26
+ />
27
+ ),
28
+ },
29
+ );
@@ -1,5 +1,4 @@
1
1
  import { Meta, StoryObj } from '@storybook/react-native-web-vite';
2
- import React from 'react';
3
2
  import { View, Text, Pressable, Linking } from 'react-native';
4
3
 
5
4
  import { Box } from '../Utility';
@@ -1,7 +1,6 @@
1
1
  import { describe, it, expect } from '@jest/globals';
2
2
  import { ledgerLiveThemes } from '@ledgerhq/lumen-design-core';
3
3
  import { render, waitFor } from '@testing-library/react-native';
4
- import React from 'react';
5
4
  import { ThemeProvider } from '../ThemeProvider/ThemeProvider';
6
5
  import { Avatar } from './Avatar';
7
6
 
@@ -1,5 +1,5 @@
1
1
  import type { Meta, StoryObj } from '@storybook/react-native-web-vite';
2
- import React from 'react';
2
+ import { useState } from 'react';
3
3
  import { Button } from '../Button';
4
4
  import { Box, Text } from '../Utility';
5
5
  import { Banner } from './Banner';
@@ -437,7 +437,7 @@ export const ResponsiveLayout: Story = {
437
437
 
438
438
  export const InteractiveDismiss: Story = {
439
439
  render: (args) => {
440
- const [visible, setVisible] = React.useState(true);
440
+ const [visible, setVisible] = useState(true);
441
441
 
442
442
  if (!visible) return <Text typography='body2'>Banner dismissed</Text>;
443
443
 
@@ -456,7 +456,7 @@ export const InteractiveDismiss: Story = {
456
456
 
457
457
  export const InteractiveActions: Story = {
458
458
  render: (args) => {
459
- const [state, setState] = React.useState('idle');
459
+ const [state, setState] = useState('idle');
460
460
 
461
461
  const handleAccept = () => {
462
462
  setState('success');
@@ -1,7 +1,6 @@
1
1
  import { describe, it, expect, jest } from '@jest/globals';
2
2
  import { ledgerLiveThemes } from '@ledgerhq/lumen-design-core';
3
3
  import { fireEvent, render } from '@testing-library/react-native';
4
- import React from 'react';
5
4
  import { Button } from '../Button';
6
5
  import { ThemeProvider } from '../ThemeProvider/ThemeProvider';
7
6
  import { Banner } from './Banner';
@@ -1,4 +1,7 @@
1
- import { useDisabledContext } from '@ledgerhq/lumen-utils-shared';
1
+ import {
2
+ DisabledProvider,
3
+ useDisabledContext,
4
+ } from '@ledgerhq/lumen-utils-shared';
2
5
  import {
3
6
  useCallback,
4
7
  useEffect,
@@ -33,7 +36,8 @@ export const BaseInput = ({
33
36
  errorMessage,
34
37
  hideClearButton,
35
38
  onChangeText: onChangeTextProp,
36
- editable: editableProp = true,
39
+ editable,
40
+ disabled: disabledProp = false,
37
41
  prefix,
38
42
  suffix,
39
43
  ref,
@@ -41,7 +45,7 @@ export const BaseInput = ({
41
45
  }: BaseInputProps) => {
42
46
  const disabled = useDisabledContext({
43
47
  consumerName: 'BaseInput',
44
- mergeWith: { disabled: !editableProp },
48
+ mergeWith: { disabled: disabledProp },
45
49
  });
46
50
  const { t } = useCommonTranslation();
47
51
  const { theme } = useTheme();
@@ -97,68 +101,70 @@ export const BaseInput = ({
97
101
  });
98
102
 
99
103
  return (
100
- <Box lx={lx} style={style}>
101
- <Pressable
102
- style={StyleSheet.flatten([styles.container, containerStyle])}
103
- onPress={() => inputRef.current?.focus()}
104
- disabled={disabled}
105
- >
106
- {prefix}
104
+ <DisabledProvider value={{ disabled }}>
105
+ <Box lx={lx} style={style}>
106
+ <Pressable
107
+ style={StyleSheet.flatten([styles.container, containerStyle])}
108
+ onPress={() => inputRef.current?.focus()}
109
+ disabled={disabled}
110
+ >
111
+ {prefix}
107
112
 
108
- <TextInput
109
- ref={inputRef}
110
- value={value}
111
- style={StyleSheet.flatten([styles.input, inputStyle])}
112
- onFocus={() => setIsFocused(true)}
113
- onBlur={() => setIsFocused(false)}
114
- onChangeText={handleChangeText}
115
- editable={!disabled}
116
- autoCapitalize='none'
117
- autoCorrect={false}
118
- selectionColor={theme.colors.text.active}
119
- placeholderTextColor={theme.colors.text.muted}
120
- {...props}
121
- />
113
+ <TextInput
114
+ ref={inputRef}
115
+ value={value}
116
+ style={StyleSheet.flatten([styles.input, inputStyle])}
117
+ onFocus={() => setIsFocused(true)}
118
+ onBlur={() => setIsFocused(false)}
119
+ onChangeText={handleChangeText}
120
+ editable={editable !== false && !disabled}
121
+ autoCapitalize='none'
122
+ autoCorrect={false}
123
+ selectionColor={theme.colors.text.active}
124
+ placeholderTextColor={theme.colors.text.muted}
125
+ {...props}
126
+ />
122
127
 
123
- {label && (
124
- <Animated.Text
125
- style={[
126
- floatingLabelStyles.label,
127
- floatingLabelStyles.animatedStyle,
128
- labelStyle,
129
- ]}
130
- numberOfLines={1}
131
- >
132
- {label}
133
- </Animated.Text>
134
- )}
128
+ {label && (
129
+ <Animated.Text
130
+ style={[
131
+ floatingLabelStyles.label,
132
+ floatingLabelStyles.animatedStyle,
133
+ labelStyle,
134
+ ]}
135
+ numberOfLines={1}
136
+ >
137
+ {label}
138
+ </Animated.Text>
139
+ )}
135
140
 
136
- {(suffix || (!hideClearButton && !disabled)) && (
137
- <View style={styles.suffixContainer}>
138
- {showClearButton ? (
139
- <InteractiveIcon
140
- iconType='stroked'
141
- onPress={handleClear}
142
- accessibilityLabel={t(
143
- 'components.baseInput.clearInputAriaLabel',
144
- )}
145
- >
146
- <DeleteCircleFill size={20} />
147
- </InteractiveIcon>
148
- ) : (
149
- suffix
150
- )}
141
+ {(suffix || (!hideClearButton && !disabled)) && (
142
+ <View style={styles.suffixContainer}>
143
+ {showClearButton ? (
144
+ <InteractiveIcon
145
+ iconType='stroked'
146
+ onPress={handleClear}
147
+ accessibilityLabel={t(
148
+ 'components.baseInput.clearInputAriaLabel',
149
+ )}
150
+ >
151
+ <DeleteCircleFill size={20} />
152
+ </InteractiveIcon>
153
+ ) : (
154
+ suffix
155
+ )}
156
+ </View>
157
+ )}
158
+ </Pressable>
159
+
160
+ {errorMessage && (
161
+ <View style={styles.errorContainer}>
162
+ <DeleteCircleFill size={16} color='error' />
163
+ <Text style={styles.errorText}>{errorMessage}</Text>
151
164
  </View>
152
165
  )}
153
- </Pressable>
154
-
155
- {errorMessage && (
156
- <View style={styles.errorContainer}>
157
- <DeleteCircleFill size={16} color='error' />
158
- <Text style={styles.errorText}>{errorMessage}</Text>
159
- </View>
160
- )}
161
- </Box>
166
+ </Box>
167
+ </DisabledProvider>
162
168
  );
163
169
  };
164
170
 
@@ -11,6 +11,13 @@ export type BaseInputProps = {
11
11
  * The label text that floats above the input when focused or filled.
12
12
  */
13
13
  label?: string;
14
+ /**
15
+ * Whether the input is disabled.
16
+ * When true, the input is not editable and displays a muted visual style.
17
+ * This differs from `editable={false}` which only prevents interaction.
18
+ * @default false
19
+ */
20
+ disabled?: boolean;
14
21
  /**
15
22
  * Additional styles to apply to the outer wrapper element.
16
23
  */
@@ -1,7 +1,6 @@
1
1
  import { describe, it, expect, jest } from '@jest/globals';
2
2
  import { ledgerLiveThemes } from '@ledgerhq/lumen-design-core';
3
3
  import { render, RenderOptions } from '@testing-library/react-native';
4
- import React from 'react';
5
4
  import { Text, View } from 'react-native';
6
5
  import { ThemeProvider } from '../ThemeProvider/ThemeProvider';
7
6
 
@@ -3,7 +3,7 @@ import {
3
3
  SNAP_POINT_TYPE,
4
4
  } from '@gorhom/bottom-sheet';
5
5
  import { createSafeContext, useMergedRef } from '@ledgerhq/lumen-utils-shared';
6
- import React, { useCallback, useMemo, useRef, useState } from 'react';
6
+ import { useCallback, useMemo, useRef, useState } from 'react';
7
7
  import { StyleSheet } from 'react-native';
8
8
  import { useStyleSheet } from '../../../styles';
9
9
  import { RuntimeConstants } from '../../utils';
@@ -1,5 +1,4 @@
1
1
  import { BottomSheetBackdrop as GorhomBottomSheetBackdrop } from '@gorhom/bottom-sheet';
2
- import React from 'react';
3
2
  import { useStyleSheet } from '../../../styles';
4
3
  import { BottomSheetProps } from './types';
5
4
 
@@ -35,7 +34,6 @@ export const CustomBackdrop = ({
35
34
  disappearsOnIndex={-1}
36
35
  pressBehavior={backdropPressBehavior}
37
36
  onPress={() => {
38
- console.log('onPress');
39
37
  onPress?.();
40
38
  }}
41
39
  />
@@ -1,5 +1,5 @@
1
1
  import { BottomSheetVariables } from '@gorhom/bottom-sheet/lib/typescript/types';
2
- import React, { Ref } from 'react';
2
+ import { Ref } from 'react';
3
3
  import { View } from 'react-native';
4
4
  import { useStyleSheet } from '../../../styles';
5
5
 
@@ -1,7 +1,6 @@
1
1
  import { describe, it, expect, jest } from '@jest/globals';
2
2
  import { ledgerLiveThemes } from '@ledgerhq/lumen-design-core';
3
3
  import { render, screen, fireEvent } from '@testing-library/react-native';
4
- import React from 'react';
5
4
  import { ViewStyle } from 'react-native';
6
5
 
7
6
  import { Plus, Settings } from '../../Symbols';
@@ -1,5 +1,5 @@
1
1
  import type { Meta, StoryObj } from '@storybook/react-native-web-vite';
2
- import React from 'react';
2
+ import { useState } from 'react';
3
3
  import { Plus, Settings } from '../../Symbols';
4
4
  import { Box, Text } from '../Utility';
5
5
  import { Button } from './Button';
@@ -210,7 +210,7 @@ export const LabelTruncate: Story = {
210
210
 
211
211
  export const InteractiveLoadingStates: Story = {
212
212
  render: () => {
213
- const [states, setStates] = React.useState<
213
+ const [states, setStates] = useState<
214
214
  Record<'text' | 'withIcon' | 'iconOnly', 'idle' | 'loading' | 'red'>
215
215
  >({
216
216
  text: 'idle',
@@ -1,7 +1,6 @@
1
1
  import { describe, it, expect, jest } from '@jest/globals';
2
2
  import { ledgerLiveThemes } from '@ledgerhq/lumen-design-core';
3
3
  import { render, fireEvent, screen } from '@testing-library/react-native';
4
- import React from 'react';
5
4
  import { Text as RNText } from 'react-native';
6
5
 
7
6
  import { ThemeProvider } from '../ThemeProvider/ThemeProvider';