@ledgerhq/lumen-ui-rnative 0.0.44 → 0.0.45

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 (333) hide show
  1. package/.storybook/Decorator.tsx +78 -13
  2. package/.storybook/docs/getting-started/ThemeProvider.mdx +1 -1
  3. package/.storybook/docs/style-system/lx.mdx +144 -0
  4. package/.storybook/docs/style-system/useCreate.mdx +95 -0
  5. package/.storybook/docs/style-system/useTheme.mdx +52 -0
  6. package/.storybook/preview-head.html +2 -2
  7. package/.storybook/{preview.ts → preview.tsx} +6 -1
  8. package/dist/package.json +2 -3
  9. package/dist/src/lib/Components/AddressInput/AddressInput.js +1 -1
  10. package/dist/src/lib/Components/AddressInput/AddressInput.stories.d.ts +7 -1
  11. package/dist/src/lib/Components/AddressInput/AddressInput.stories.d.ts.map +1 -1
  12. package/dist/src/lib/Components/AddressInput/AddressInput.stories.js +98 -9
  13. package/dist/src/lib/Components/AmountInput/AmountInput.d.ts.map +1 -1
  14. package/dist/src/lib/Components/AmountInput/AmountInput.js +3 -3
  15. package/dist/src/lib/Components/AmountInput/AmountInput.stories.d.ts +10 -1
  16. package/dist/src/lib/Components/AmountInput/AmountInput.stories.d.ts.map +1 -1
  17. package/dist/src/lib/Components/AmountInput/AmountInput.stories.js +162 -9
  18. package/dist/src/lib/Components/BaseInput/BaseInput.d.ts.map +1 -1
  19. package/dist/src/lib/Components/BaseInput/BaseInput.js +2 -19
  20. package/dist/src/lib/Components/BottomSheet/BottomSheet.js +1 -1
  21. package/dist/src/lib/Components/BottomSheet/BottomSheet.stories.js +8 -8
  22. package/dist/src/lib/Components/Button/BaseButton.d.ts +3 -3
  23. package/dist/src/lib/Components/Button/BaseButton.d.ts.map +1 -1
  24. package/dist/src/lib/Components/Button/BaseButton.js +99 -119
  25. package/dist/src/lib/Components/Button/Button.d.ts +4 -26
  26. package/dist/src/lib/Components/Button/Button.d.ts.map +1 -1
  27. package/dist/src/lib/Components/Button/Button.js +2 -2
  28. package/dist/src/lib/Components/Button/Button.stories.d.ts +1 -1
  29. package/dist/src/lib/Components/Button/Button.stories.d.ts.map +1 -1
  30. package/dist/src/lib/Components/Button/Button.stories.js +25 -48
  31. package/dist/src/lib/Components/Button/index.d.ts +1 -1
  32. package/dist/src/lib/Components/Button/index.d.ts.map +1 -1
  33. package/dist/src/lib/Components/Button/index.js +1 -1
  34. package/dist/src/lib/Components/Button/{BaseButton.types.d.ts → types.d.ts} +15 -10
  35. package/dist/src/lib/Components/Button/types.d.ts.map +1 -0
  36. package/dist/src/lib/Components/CardButton/CardButton.d.ts +4 -3
  37. package/dist/src/lib/Components/CardButton/CardButton.d.ts.map +1 -1
  38. package/dist/src/lib/Components/CardButton/CardButton.js +65 -71
  39. package/dist/src/lib/Components/CardButton/CardButton.stories.d.ts.map +1 -1
  40. package/dist/src/lib/Components/CardButton/CardButton.stories.js +28 -15
  41. package/dist/src/lib/Components/CardButton/index.d.ts +1 -1
  42. package/dist/src/lib/Components/CardButton/index.d.ts.map +1 -1
  43. package/dist/src/lib/Components/CardButton/index.js +1 -1
  44. package/dist/src/lib/Components/CardButton/{CardButton.types.d.ts → types.d.ts} +5 -4
  45. package/dist/src/lib/Components/CardButton/types.d.ts.map +1 -0
  46. package/dist/src/lib/Components/Icon/Icon.d.ts +6 -3
  47. package/dist/src/lib/Components/Icon/Icon.d.ts.map +1 -1
  48. package/dist/src/lib/Components/Icon/Icon.js +24 -25
  49. package/dist/src/lib/Components/Icon/Icon.stories.d.ts +2 -2
  50. package/dist/src/lib/Components/Icon/Icon.stories.d.ts.map +1 -1
  51. package/dist/src/lib/Components/Icon/Icon.stories.js +73 -19
  52. package/dist/src/lib/Components/Icon/createIcon.d.ts +1 -1
  53. package/dist/src/lib/Components/Icon/createIcon.d.ts.map +1 -1
  54. package/dist/src/lib/Components/Icon/createIcon.js +1 -2
  55. package/dist/src/lib/Components/Icon/index.d.ts +1 -1
  56. package/dist/src/lib/Components/Icon/index.d.ts.map +1 -1
  57. package/dist/src/lib/Components/Icon/index.js +1 -1
  58. package/dist/src/lib/Components/Icon/{Icon.types.d.ts → types.d.ts} +7 -4
  59. package/dist/src/lib/Components/Icon/types.d.ts.map +1 -0
  60. package/dist/src/lib/Components/IconButton/IconButton.d.ts +2 -19
  61. package/dist/src/lib/Components/IconButton/IconButton.d.ts.map +1 -1
  62. package/dist/src/lib/Components/IconButton/IconButton.stories.d.ts.map +1 -1
  63. package/dist/src/lib/Components/IconButton/IconButton.stories.js +9 -11
  64. package/dist/src/lib/Components/IconButton/index.d.ts +1 -0
  65. package/dist/src/lib/Components/IconButton/index.d.ts.map +1 -1
  66. package/dist/src/lib/Components/IconButton/index.js +1 -0
  67. package/dist/src/lib/Components/IconButton/types.d.ts +12 -0
  68. package/dist/src/lib/Components/IconButton/types.d.ts.map +1 -0
  69. package/dist/src/lib/Components/InteractiveIcon/InteractiveIcon.d.ts +2 -2
  70. package/dist/src/lib/Components/InteractiveIcon/InteractiveIcon.d.ts.map +1 -1
  71. package/dist/src/lib/Components/InteractiveIcon/InteractiveIcon.figma.js +1 -1
  72. package/dist/src/lib/Components/InteractiveIcon/InteractiveIcon.js +34 -34
  73. package/dist/src/lib/Components/InteractiveIcon/InteractiveIcon.stories.d.ts +1 -1
  74. package/dist/src/lib/Components/InteractiveIcon/InteractiveIcon.stories.d.ts.map +1 -1
  75. package/dist/src/lib/Components/InteractiveIcon/InteractiveIcon.stories.js +22 -9
  76. package/dist/src/lib/Components/InteractiveIcon/types.d.ts +3 -7
  77. package/dist/src/lib/Components/InteractiveIcon/types.d.ts.map +1 -1
  78. package/dist/src/lib/Components/Link/Link.d.ts +7 -77
  79. package/dist/src/lib/Components/Link/Link.d.ts.map +1 -1
  80. package/dist/src/lib/Components/Link/Link.js +59 -75
  81. package/dist/src/lib/Components/Link/Link.stories.d.ts.map +1 -1
  82. package/dist/src/lib/Components/Link/Link.stories.js +34 -11
  83. package/dist/src/lib/Components/Link/index.d.ts +1 -0
  84. package/dist/src/lib/Components/Link/index.d.ts.map +1 -1
  85. package/dist/src/lib/Components/Link/index.js +1 -0
  86. package/dist/src/lib/Components/Link/types.d.ts +43 -0
  87. package/dist/src/lib/Components/Link/types.d.ts.map +1 -0
  88. package/dist/src/lib/Components/Link/types.js +1 -0
  89. package/dist/src/lib/Components/Search/Search.stories.d.ts +6 -1
  90. package/dist/src/lib/Components/Search/Search.stories.d.ts.map +1 -1
  91. package/dist/src/lib/Components/Search/Search.stories.js +71 -9
  92. package/dist/src/lib/Components/Select/Select.d.ts.map +1 -1
  93. package/dist/src/lib/Components/Select/Select.js +1 -17
  94. package/dist/src/lib/Components/Spinner/Spinner.d.ts +13 -16
  95. package/dist/src/lib/Components/Spinner/Spinner.d.ts.map +1 -1
  96. package/dist/src/lib/Components/Spinner/Spinner.js +33 -5
  97. package/dist/src/lib/Components/Spinner/Spinner.stories.d.ts.map +1 -1
  98. package/dist/src/lib/Components/Spinner/Spinner.stories.js +1 -1
  99. package/dist/src/lib/Components/Spinner/index.d.ts +1 -0
  100. package/dist/src/lib/Components/Spinner/index.d.ts.map +1 -1
  101. package/dist/src/lib/Components/Spinner/index.js +1 -0
  102. package/dist/src/lib/Components/Spinner/types.d.ts +15 -0
  103. package/dist/src/lib/Components/Spinner/types.d.ts.map +1 -0
  104. package/dist/src/lib/Components/Spinner/types.js +1 -0
  105. package/dist/src/lib/Components/Tag/Tag.d.ts +2 -1
  106. package/dist/src/lib/Components/Tag/Tag.d.ts.map +1 -1
  107. package/dist/src/lib/Components/Tag/Tag.js +15 -4
  108. package/dist/src/lib/Components/Tag/Tag.stories.js +1 -1
  109. package/dist/src/lib/Components/Tag/Tag.types.d.ts +7 -1
  110. package/dist/src/lib/Components/Tag/Tag.types.d.ts.map +1 -1
  111. package/dist/src/lib/Components/TextInput/TextInput.stories.d.ts +8 -1
  112. package/dist/src/lib/Components/TextInput/TextInput.stories.d.ts.map +1 -1
  113. package/dist/src/lib/Components/TextInput/TextInput.stories.js +104 -9
  114. package/dist/src/lib/Components/Tile/Tile.js +2 -2
  115. package/dist/src/lib/Components/Tooltip/Tooltip.stories.js +2 -2
  116. package/dist/src/lib/Components/Utility/Box/Box.d.ts +39 -0
  117. package/dist/src/lib/Components/Utility/Box/Box.d.ts.map +1 -0
  118. package/dist/src/lib/Components/{Box → Utility/Box}/Box.js +10 -11
  119. package/dist/src/lib/Components/Utility/Box/Box.stories.d.ts.map +1 -0
  120. package/dist/src/lib/Components/{Box → Utility/Box}/Box.stories.js +13 -12
  121. package/dist/src/lib/Components/Utility/Box/index.d.ts +2 -0
  122. package/dist/src/lib/Components/Utility/Box/index.d.ts.map +1 -0
  123. package/dist/src/lib/Components/Utility/Pressable/Pressable.d.ts +34 -0
  124. package/dist/src/lib/Components/Utility/Pressable/Pressable.d.ts.map +1 -0
  125. package/dist/src/lib/Components/Utility/Pressable/Pressable.js +33 -0
  126. package/dist/src/lib/Components/Utility/Pressable/Pressable.stories.d.ts +7 -0
  127. package/dist/src/lib/Components/Utility/Pressable/Pressable.stories.d.ts.map +1 -0
  128. package/dist/src/lib/Components/Utility/Pressable/Pressable.stories.js +47 -0
  129. package/dist/src/lib/Components/Utility/Pressable/index.d.ts +3 -0
  130. package/dist/src/lib/Components/Utility/Pressable/index.d.ts.map +1 -0
  131. package/dist/src/lib/Components/Utility/Pressable/index.js +1 -0
  132. package/dist/src/lib/Components/Utility/Pressable/types.d.ts +3 -0
  133. package/dist/src/lib/Components/Utility/Pressable/types.d.ts.map +1 -0
  134. package/dist/src/lib/Components/Utility/Pressable/types.js +1 -0
  135. package/dist/src/lib/Components/Utility/Text/Text.d.ts +40 -0
  136. package/dist/src/lib/Components/Utility/Text/Text.d.ts.map +1 -0
  137. package/dist/src/lib/Components/{Text → Utility/Text}/Text.js +13 -9
  138. package/dist/src/lib/Components/Utility/Text/Text.stories.d.ts.map +1 -0
  139. package/dist/src/lib/Components/{Text → Utility/Text}/Text.stories.js +3 -3
  140. package/dist/src/lib/Components/Utility/Text/index.d.ts.map +1 -0
  141. package/dist/src/lib/Components/Utility/index.d.ts +4 -0
  142. package/dist/src/lib/Components/Utility/index.d.ts.map +1 -0
  143. package/dist/src/lib/Components/Utility/index.js +3 -0
  144. package/dist/src/lib/Components/index.d.ts +1 -3
  145. package/dist/src/lib/Components/index.d.ts.map +1 -1
  146. package/dist/src/lib/Components/index.js +1 -3
  147. package/dist/src/lib/utils/components/InjectStylesIntoChildren.d.ts +6 -5
  148. package/dist/src/lib/utils/components/InjectStylesIntoChildren.d.ts.map +1 -1
  149. package/dist/src/lib/utils/components/InjectStylesIntoChildren.js +6 -6
  150. package/dist/src/styles/LumenStyleSheet.d.ts +1 -1
  151. package/dist/src/styles/LumenStyleSheet.d.ts.map +1 -1
  152. package/dist/src/styles/Provider/createStylesheetTheme.d.ts +0 -1
  153. package/dist/src/styles/Provider/createStylesheetTheme.d.ts.map +1 -1
  154. package/dist/src/styles/Provider/createStylesheetTheme.js +0 -1
  155. package/dist/src/styles/create/useCreate.d.ts +2 -1
  156. package/dist/src/styles/create/useCreate.d.ts.map +1 -1
  157. package/dist/src/styles/create/useCreate.js +5 -5
  158. package/dist/src/styles/factories/areLxPropsEqual.d.ts +3 -0
  159. package/dist/src/styles/factories/areLxPropsEqual.d.ts.map +1 -0
  160. package/dist/src/styles/factories/areLxPropsEqual.js +15 -0
  161. package/dist/src/styles/factories/createStyledPressable.d.ts +26 -0
  162. package/dist/src/styles/factories/createStyledPressable.d.ts.map +1 -0
  163. package/dist/src/styles/factories/createStyledPressable.js +61 -0
  164. package/dist/src/styles/factories/createStyledText.d.ts +15 -26
  165. package/dist/src/styles/factories/createStyledText.d.ts.map +1 -1
  166. package/dist/src/styles/factories/createStyledText.js +13 -29
  167. package/dist/src/styles/factories/createStyledView.d.ts +7 -27
  168. package/dist/src/styles/factories/createStyledView.d.ts.map +1 -1
  169. package/dist/src/styles/factories/createStyledView.js +10 -30
  170. package/dist/src/styles/factories/index.d.ts +4 -0
  171. package/dist/src/styles/factories/index.d.ts.map +1 -0
  172. package/dist/src/styles/factories/index.js +3 -0
  173. package/dist/src/styles/index.d.ts +2 -3
  174. package/dist/src/styles/index.d.ts.map +1 -1
  175. package/dist/src/styles/index.js +2 -3
  176. package/dist/src/styles/resolveStyle/resolveConfig.d.ts +7 -7
  177. package/dist/src/styles/resolveStyle/resolveConfig.d.ts.map +1 -1
  178. package/dist/src/styles/resolveStyle/resolveConfig.js +9 -9
  179. package/dist/src/styles/resolveStyle/resolveStyle.d.ts +6 -20
  180. package/dist/src/styles/resolveStyle/resolveStyle.d.ts.map +1 -1
  181. package/dist/src/styles/resolveStyle/resolveStyle.js +4 -29
  182. package/dist/src/styles/types/create.types.d.ts +1 -1
  183. package/dist/src/styles/types/create.types.d.ts.map +1 -1
  184. package/dist/src/styles/types/styled.types.d.ts +72 -50
  185. package/dist/src/styles/types/styled.types.d.ts.map +1 -1
  186. package/dist/src/styles/types/utility.types.d.ts.map +1 -1
  187. package/dist/src/styles/utils/index.d.ts +2 -0
  188. package/dist/src/styles/utils/index.d.ts.map +1 -0
  189. package/dist/src/styles/utils/index.js +1 -0
  190. package/dist/src/styles/utils/mergeStyles.d.ts +16 -0
  191. package/dist/src/styles/utils/mergeStyles.d.ts.map +1 -0
  192. package/dist/src/styles/utils/mergeStyles.js +20 -0
  193. package/package.json +3 -4
  194. package/src/lib/Components/AddressInput/AddressInput.mdx +15 -4
  195. package/src/lib/Components/AddressInput/AddressInput.stories.tsx +133 -17
  196. package/src/lib/Components/AddressInput/AddressInput.tsx +1 -1
  197. package/src/lib/Components/AmountInput/AmountInput.mdx +20 -1
  198. package/src/lib/Components/AmountInput/AmountInput.stories.tsx +180 -17
  199. package/src/lib/Components/AmountInput/AmountInput.tsx +24 -15
  200. package/src/lib/Components/Banner/Banner.test.tsx +48 -15
  201. package/src/lib/Components/BaseInput/BaseInput.tsx +6 -35
  202. package/src/lib/Components/BottomSheet/BottomSheet.stories.tsx +8 -8
  203. package/src/lib/Components/BottomSheet/BottomSheet.tsx +1 -1
  204. package/src/lib/Components/Button/BaseButton.test.tsx +149 -0
  205. package/src/lib/Components/Button/BaseButton.tsx +193 -148
  206. package/src/lib/Components/Button/Button.mdx +34 -31
  207. package/src/lib/Components/Button/Button.stories.tsx +37 -58
  208. package/src/lib/Components/Button/Button.tsx +4 -11
  209. package/src/lib/Components/Button/index.ts +1 -1
  210. package/src/lib/Components/Button/{BaseButton.types.ts → types.ts} +14 -8
  211. package/src/lib/Components/CardButton/CardButton.mdx +15 -25
  212. package/src/lib/Components/CardButton/CardButton.stories.tsx +48 -22
  213. package/src/lib/Components/CardButton/CardButton.test.tsx +141 -0
  214. package/src/lib/Components/CardButton/CardButton.tsx +142 -108
  215. package/src/lib/Components/CardButton/index.ts +1 -1
  216. package/src/lib/Components/CardButton/{CardButton.types.ts → types.ts} +4 -3
  217. package/src/lib/Components/Checkbox/Checkbox.mdx +1 -1
  218. package/src/lib/Components/Checkbox/Checkbox.test.tsx +42 -17
  219. package/src/lib/Components/Icon/Icon.stories.tsx +143 -73
  220. package/src/lib/Components/Icon/Icon.test.tsx +84 -0
  221. package/src/lib/Components/Icon/Icon.tsx +32 -28
  222. package/src/lib/Components/Icon/createIcon.ts +2 -3
  223. package/src/lib/Components/Icon/index.ts +1 -1
  224. package/src/lib/Components/Icon/{Icon.types.ts → types.ts} +4 -3
  225. package/src/lib/Components/IconButton/IconButton.mdx +13 -10
  226. package/src/lib/Components/IconButton/IconButton.stories.tsx +12 -14
  227. package/src/lib/Components/IconButton/IconButton.test.tsx +141 -0
  228. package/src/lib/Components/IconButton/IconButton.tsx +3 -13
  229. package/src/lib/Components/IconButton/index.ts +1 -0
  230. package/src/lib/Components/IconButton/types.ts +12 -0
  231. package/src/lib/Components/InteractiveIcon/InteractiveIcon.figma.tsx +1 -1
  232. package/src/lib/Components/InteractiveIcon/InteractiveIcon.mdx +25 -27
  233. package/src/lib/Components/InteractiveIcon/InteractiveIcon.stories.tsx +82 -43
  234. package/src/lib/Components/InteractiveIcon/InteractiveIcon.test.tsx +30 -19
  235. package/src/lib/Components/InteractiveIcon/InteractiveIcon.tsx +78 -45
  236. package/src/lib/Components/InteractiveIcon/types.ts +4 -7
  237. package/src/lib/Components/Link/Link.mdx +8 -18
  238. package/src/lib/Components/Link/Link.stories.tsx +56 -25
  239. package/src/lib/Components/Link/Link.test.tsx +141 -51
  240. package/src/lib/Components/Link/Link.tsx +128 -150
  241. package/src/lib/Components/Link/index.ts +1 -0
  242. package/src/lib/Components/Link/types.ts +44 -0
  243. package/src/lib/Components/Search/Search.mdx +14 -1
  244. package/src/lib/Components/Search/Search.stories.tsx +94 -15
  245. package/src/lib/Components/Select/Select.test.tsx +8 -4
  246. package/src/lib/Components/Select/Select.tsx +4 -31
  247. package/src/lib/Components/Spinner/Spinner.stories.tsx +1 -5
  248. package/src/lib/Components/Spinner/Spinner.tsx +60 -34
  249. package/src/lib/Components/Spinner/index.ts +1 -0
  250. package/src/lib/Components/Spinner/types.ts +15 -0
  251. package/src/lib/Components/Switch/Switch.mdx +1 -1
  252. package/src/lib/Components/Tag/Tag.stories.tsx +2 -2
  253. package/src/lib/Components/Tag/Tag.tsx +22 -6
  254. package/src/lib/Components/Tag/Tag.types.ts +7 -8
  255. package/src/lib/Components/TextInput/TextInput.mdx +24 -4
  256. package/src/lib/Components/TextInput/TextInput.stories.tsx +131 -15
  257. package/src/lib/Components/Tile/Tile.test.tsx +100 -63
  258. package/src/lib/Components/Tile/Tile.tsx +2 -2
  259. package/src/lib/Components/Tooltip/Tooltip.stories.tsx +2 -2
  260. package/src/lib/Components/Tooltip/Tooltip.test.tsx +8 -4
  261. package/src/lib/Components/{Box → Utility/Box}/Box.mdx +15 -13
  262. package/src/lib/Components/{Box → Utility/Box}/Box.stories.tsx +13 -11
  263. package/src/lib/Components/{Box → Utility/Box}/Box.tsx +11 -12
  264. package/src/lib/Components/Utility/Box/index.ts +1 -0
  265. package/src/lib/Components/Utility/Pressable/Pressable.mdx +103 -0
  266. package/src/lib/Components/Utility/Pressable/Pressable.stories.tsx +51 -0
  267. package/src/lib/Components/Utility/Pressable/Pressable.test.tsx +221 -0
  268. package/src/lib/Components/Utility/Pressable/Pressable.tsx +34 -0
  269. package/src/lib/Components/Utility/Pressable/index.ts +2 -0
  270. package/src/lib/Components/Utility/Pressable/types.ts +3 -0
  271. package/src/lib/Components/{Text → Utility/Text}/Text.mdx +15 -7
  272. package/src/lib/Components/{Text → Utility/Text}/Text.stories.tsx +3 -3
  273. package/src/lib/Components/Utility/Text/Text.tsx +39 -0
  274. package/src/lib/Components/Utility/index.ts +3 -0
  275. package/src/lib/Components/index.ts +1 -3
  276. package/src/lib/utils/components/InjectStylesIntoChildren.tsx +23 -14
  277. package/src/styles/Provider/createStylesheetTheme.ts +0 -1
  278. package/src/styles/create/useCreate.ts +8 -4
  279. package/src/styles/factories/areLxPropsEqual.ts +32 -0
  280. package/src/styles/factories/createStyledPressable.test.tsx +253 -0
  281. package/src/styles/factories/createStyledPressable.tsx +97 -0
  282. package/src/styles/factories/createStyledText.test.tsx +28 -20
  283. package/src/styles/factories/createStyledText.tsx +29 -49
  284. package/src/styles/factories/createStyledView.test.tsx +22 -16
  285. package/src/styles/factories/createStyledView.tsx +19 -53
  286. package/src/styles/factories/index.ts +3 -0
  287. package/src/styles/index.ts +2 -3
  288. package/src/styles/resolveStyle/resolveConfig.ts +16 -15
  289. package/src/styles/resolveStyle/resolveStyle.test.ts +13 -141
  290. package/src/styles/resolveStyle/resolveStyle.ts +10 -60
  291. package/src/styles/types/create.types.ts +1 -1
  292. package/src/styles/types/styled.types.ts +73 -105
  293. package/src/styles/types/utility.types.ts +1 -0
  294. package/src/styles/utils/index.ts +1 -0
  295. package/src/styles/utils/mergeStyles.test.ts +45 -0
  296. package/src/styles/utils/mergeStyles.ts +25 -0
  297. package/.storybook/docs/getting-started/StyleSystem.mdx +0 -133
  298. package/dist/src/lib/Components/Box/Box.d.ts +0 -592
  299. package/dist/src/lib/Components/Box/Box.d.ts.map +0 -1
  300. package/dist/src/lib/Components/Box/Box.stories.d.ts.map +0 -1
  301. package/dist/src/lib/Components/Box/Box.types.d.ts +0 -3
  302. package/dist/src/lib/Components/Box/Box.types.d.ts.map +0 -1
  303. package/dist/src/lib/Components/Box/index.d.ts +0 -3
  304. package/dist/src/lib/Components/Box/index.d.ts.map +0 -1
  305. package/dist/src/lib/Components/Button/BaseButton.types.d.ts.map +0 -1
  306. package/dist/src/lib/Components/CardButton/CardButton.types.d.ts.map +0 -1
  307. package/dist/src/lib/Components/Icon/Icon.types.d.ts.map +0 -1
  308. package/dist/src/lib/Components/Text/Text.d.ts +0 -602
  309. package/dist/src/lib/Components/Text/Text.d.ts.map +0 -1
  310. package/dist/src/lib/Components/Text/Text.stories.d.ts.map +0 -1
  311. package/dist/src/lib/Components/Text/index.d.ts.map +0 -1
  312. package/dist/src/lib/Components/_ToRemove/ToRemove.d.ts +0 -9
  313. package/dist/src/lib/Components/_ToRemove/ToRemove.d.ts.map +0 -1
  314. package/dist/src/lib/Components/_ToRemove/ToRemove.js +0 -43
  315. package/dist/src/styles/utils/styleVarianceAuthority.d.ts +0 -30
  316. package/dist/src/styles/utils/styleVarianceAuthority.d.ts.map +0 -1
  317. package/dist/src/styles/utils/styleVarianceAuthority.js +0 -97
  318. package/src/lib/Components/Box/Box.types.ts +0 -3
  319. package/src/lib/Components/Box/index.ts +0 -2
  320. package/src/lib/Components/Text/Text.tsx +0 -35
  321. package/src/lib/Components/_ToRemove/ToRemove.tsx +0 -65
  322. package/src/styles/utils/styleVarianceAuthority.test.ts +0 -302
  323. package/src/styles/utils/styleVarianceAuthority.ts +0 -154
  324. /package/dist/src/lib/Components/{Box/Box.types.js → Button/types.js} +0 -0
  325. /package/dist/src/lib/Components/{Button/BaseButton.types.js → CardButton/types.js} +0 -0
  326. /package/dist/src/lib/Components/{CardButton/CardButton.types.js → Icon/types.js} +0 -0
  327. /package/dist/src/lib/Components/{Icon/Icon.types.js → IconButton/types.js} +0 -0
  328. /package/dist/src/lib/Components/{Box → Utility/Box}/Box.stories.d.ts +0 -0
  329. /package/dist/src/lib/Components/{Box → Utility/Box}/index.js +0 -0
  330. /package/dist/src/lib/Components/{Text → Utility/Text}/Text.stories.d.ts +0 -0
  331. /package/dist/src/lib/Components/{Text → Utility/Text}/index.d.ts +0 -0
  332. /package/dist/src/lib/Components/{Text → Utility/Text}/index.js +0 -0
  333. /package/src/lib/Components/{Text → Utility/Text}/index.ts +0 -0
@@ -1,6 +1,7 @@
1
1
  import type { Meta, StoryObj } from '@storybook/react-native-web-vite';
2
- import { Banner } from '../Banner';
3
- import { TextInput } from './TextInput';
2
+ import { useState } from 'react';
3
+ import { View } from 'react-native';
4
+ import { TextInput, type TextInputProps } from './TextInput';
4
5
 
5
6
  const meta: Meta<typeof TextInput> = {
6
7
  component: TextInput,
@@ -14,25 +15,140 @@ const meta: Meta<typeof TextInput> = {
14
15
  },
15
16
  },
16
17
  },
18
+ argTypes: {
19
+ label: {
20
+ control: 'text',
21
+ description: 'Floating label text',
22
+ },
23
+ placeholder: {
24
+ control: 'text',
25
+ description: 'Placeholder text when input is empty',
26
+ },
27
+ errorMessage: {
28
+ control: 'text',
29
+ description: 'Error message to display below input',
30
+ },
31
+ editable: {
32
+ control: 'boolean',
33
+ description: 'Whether the input is editable',
34
+ },
35
+ hideClearButton: {
36
+ control: 'boolean',
37
+ description: 'Hide the clear button',
38
+ },
39
+ keyboardType: {
40
+ control: 'select',
41
+ options: ['default', 'email-address', 'numeric', 'phone-pad', 'url'],
42
+ description: 'Keyboard type for input',
43
+ },
44
+ },
17
45
  };
18
46
 
19
47
  export default meta;
20
48
  type Story = StoryObj<typeof TextInput>;
21
49
 
22
- export const WebPreviewWarning: Story = {
23
- render: () => (
24
- <Banner
25
- appearance='warning'
26
- title='Unsupported previews on web'
27
- description='For this component, previewing stories is currently only supported on mobile. Reanimated causes compatibility issues with the web preview, so for now, please test on-device. We plan to add screenshots or embed Expo Snack in the future.'
50
+ const TextInputStory = (args: TextInputProps & { initialValue?: string }) => {
51
+ const [value, setValue] = useState(args.initialValue ?? '');
52
+
53
+ return (
54
+ <View className='flex min-h-400 items-center justify-center p-24'>
55
+ <View className='w-full max-w-320'>
56
+ <TextInput
57
+ {...args}
58
+ value={value}
59
+ onChangeText={setValue}
60
+ onClear={args.onClear}
61
+ />
62
+ </View>
63
+ </View>
64
+ );
65
+ };
66
+
67
+ export const Base: Story = {
68
+ render: (args) => <TextInputStory {...args} />,
69
+ args: {
70
+ label: 'Username',
71
+ editable: true,
72
+ hideClearButton: false,
73
+ keyboardType: 'default',
74
+ },
75
+ };
76
+
77
+ export const WithContent: Story = {
78
+ render: (args) => <TextInputStory {...args} initialValue='johndoe' />,
79
+ args: {
80
+ label: 'Username',
81
+ editable: true,
82
+ hideClearButton: false,
83
+ keyboardType: 'default',
84
+ },
85
+ };
86
+
87
+ export const WithError: Story = {
88
+ render: (args) => <TextInputStory {...args} initialValue='ab' />,
89
+ args: {
90
+ label: 'Username',
91
+ errorMessage: 'Username must be at least 3 characters',
92
+ editable: true,
93
+ hideClearButton: false,
94
+ keyboardType: 'default',
95
+ },
96
+ };
97
+
98
+ export const DisabledTextInput: Story = {
99
+ render: (args) => <TextInputStory {...args} initialValue='johndoe' />,
100
+ args: {
101
+ label: 'Username',
102
+ editable: false,
103
+ hideClearButton: false,
104
+ keyboardType: 'default',
105
+ },
106
+ };
107
+
108
+ export const WithHiddenClearButton: Story = {
109
+ render: (args) => (
110
+ <TextInputStory {...args} initialValue='Content with hidden clear' />
111
+ ),
112
+ args: {
113
+ label: 'Label',
114
+ editable: true,
115
+ hideClearButton: true,
116
+ keyboardType: 'default',
117
+ },
118
+ };
119
+
120
+ export const WithClearCallback: Story = {
121
+ render: (args) => (
122
+ <TextInputStory
123
+ {...args}
124
+ initialValue='Click clear to see callback'
125
+ onClear={() => alert('Input cleared!')}
28
126
  />
29
127
  ),
30
- parameters: {
31
- docs: {
32
- description: {
33
- story:
34
- '⚠️ This component requires testing on a physical device or emulator due to Reanimated compatibility issues with web previews.',
35
- },
36
- },
128
+ args: {
129
+ label: 'Label',
130
+ editable: true,
131
+ hideClearButton: false,
132
+ keyboardType: 'default',
133
+ },
134
+ };
135
+
136
+ export const EmailKeyboard: Story = {
137
+ render: (args) => <TextInputStory {...args} />,
138
+ args: {
139
+ label: 'Email',
140
+ editable: true,
141
+ hideClearButton: false,
142
+ keyboardType: 'email-address',
143
+ },
144
+ };
145
+
146
+ export const PhoneKeyboard: Story = {
147
+ render: (args) => <TextInputStory {...args} />,
148
+ args: {
149
+ label: 'Phone Number',
150
+ editable: true,
151
+ hideClearButton: false,
152
+ keyboardType: 'phone-pad',
37
153
  },
38
154
  };
@@ -1,19 +1,30 @@
1
1
  import { describe, it, expect, jest } from '@jest/globals';
2
+ import { ledgerLiveThemes } from '@ledgerhq/lumen-design-core';
2
3
  import { render, fireEvent } from '@testing-library/react-native';
4
+ import React from 'react';
3
5
  import { Text } from 'react-native';
4
6
 
5
7
  import { Settings } from '../../Symbols';
6
8
  import { Spot } from '../Spot';
7
9
  import { Tag } from '../Tag';
10
+ import { ThemeProvider } from '../ThemeProvider/ThemeProvider';
8
11
  import { Tile } from './Tile';
9
12
 
13
+ const TestWrapper: React.FC<{ children: React.ReactNode }> = ({ children }) => (
14
+ <ThemeProvider themes={ledgerLiveThemes} colorScheme='dark' locale='en'>
15
+ {children}
16
+ </ThemeProvider>
17
+ );
18
+
10
19
  describe('Tile Component', () => {
11
20
  const mockSpot = <Spot appearance='icon' icon={Settings} />;
12
21
  const mockTitle = 'Test Item';
13
22
 
14
23
  it('should render correctly with required props', () => {
15
24
  const { getByText, getByTestId } = render(
16
- <Tile leadingContent={mockSpot} title={mockTitle} testID='tile' />,
25
+ <TestWrapper>
26
+ <Tile leadingContent={mockSpot} title={mockTitle} testID='tile' />
27
+ </TestWrapper>,
17
28
  );
18
29
 
19
30
  expect(getByTestId('tile')).toBeTruthy();
@@ -23,12 +34,14 @@ describe('Tile Component', () => {
23
34
  it('should render description when provided', () => {
24
35
  const description = 'Test description';
25
36
  const { getByText } = render(
26
- <Tile
27
- leadingContent={mockSpot}
28
- title={mockTitle}
29
- description={description}
30
- testID='tile'
31
- />,
37
+ <TestWrapper>
38
+ <Tile
39
+ leadingContent={mockSpot}
40
+ title={mockTitle}
41
+ description={description}
42
+ testID='tile'
43
+ />
44
+ </TestWrapper>,
32
45
  );
33
46
 
34
47
  expect(getByText(mockTitle)).toBeTruthy();
@@ -37,7 +50,9 @@ describe('Tile Component', () => {
37
50
 
38
51
  it('should render without description when not provided', () => {
39
52
  const { getByText, queryByText } = render(
40
- <Tile leadingContent={mockSpot} title={mockTitle} testID='tile' />,
53
+ <TestWrapper>
54
+ <Tile leadingContent={mockSpot} title={mockTitle} testID='tile' />
55
+ </TestWrapper>,
41
56
  );
42
57
 
43
58
  expect(getByText(mockTitle)).toBeTruthy();
@@ -49,12 +64,14 @@ describe('Tile Component', () => {
49
64
  const tagText = 'Test Tag';
50
65
  const mockTag = <Tag label={tagText} />;
51
66
  const { getByText } = render(
52
- <Tile
53
- leadingContent={mockSpot}
54
- title={mockTitle}
55
- trailingContent={mockTag}
56
- testID='tile'
57
- />,
67
+ <TestWrapper>
68
+ <Tile
69
+ leadingContent={mockSpot}
70
+ title={mockTitle}
71
+ trailingContent={mockTag}
72
+ testID='tile'
73
+ />
74
+ </TestWrapper>,
58
75
  );
59
76
 
60
77
  expect(getByText(mockTitle)).toBeTruthy();
@@ -65,12 +82,14 @@ describe('Tile Component', () => {
65
82
  const trailingText = 'Custom Trailing';
66
83
  const mockTrailing = <Text testID='custom-trailing'>{trailingText}</Text>;
67
84
  const { getByTestId } = render(
68
- <Tile
69
- leadingContent={mockSpot}
70
- title={mockTitle}
71
- trailingContent={mockTrailing}
72
- testID='tile'
73
- />,
85
+ <TestWrapper>
86
+ <Tile
87
+ leadingContent={mockSpot}
88
+ title={mockTitle}
89
+ trailingContent={mockTrailing}
90
+ testID='tile'
91
+ />
92
+ </TestWrapper>,
74
93
  );
75
94
 
76
95
  expect(getByTestId('custom-trailing')).toBeTruthy();
@@ -79,12 +98,14 @@ describe('Tile Component', () => {
79
98
  it('should call onPress handler when pressed', () => {
80
99
  const handlePress = jest.fn();
81
100
  const { getByTestId } = render(
82
- <Tile
83
- leadingContent={mockSpot}
84
- title={mockTitle}
85
- onPress={handlePress}
86
- testID='tile'
87
- />,
101
+ <TestWrapper>
102
+ <Tile
103
+ leadingContent={mockSpot}
104
+ title={mockTitle}
105
+ onPress={handlePress}
106
+ testID='tile'
107
+ />
108
+ </TestWrapper>,
88
109
  );
89
110
 
90
111
  fireEvent.press(getByTestId('tile'));
@@ -94,7 +115,9 @@ describe('Tile Component', () => {
94
115
 
95
116
  it('should not call onPress when not provided', () => {
96
117
  const { getByTestId } = render(
97
- <Tile leadingContent={mockSpot} title={mockTitle} testID='tile' />,
118
+ <TestWrapper>
119
+ <Tile leadingContent={mockSpot} title={mockTitle} testID='tile' />
120
+ </TestWrapper>,
98
121
  );
99
122
 
100
123
  // Should not throw error when pressing without onPress handler
@@ -106,12 +129,14 @@ describe('Tile Component', () => {
106
129
  it('should call onLongPress handler when long pressed', () => {
107
130
  const handleLongPress = jest.fn();
108
131
  const { getByTestId } = render(
109
- <Tile
110
- leadingContent={mockSpot}
111
- title={mockTitle}
112
- onLongPress={handleLongPress}
113
- testID='tile'
114
- />,
132
+ <TestWrapper>
133
+ <Tile
134
+ leadingContent={mockSpot}
135
+ title={mockTitle}
136
+ onLongPress={handleLongPress}
137
+ testID='tile'
138
+ />
139
+ </TestWrapper>,
115
140
  );
116
141
 
117
142
  fireEvent(getByTestId('tile'), 'onLongPress');
@@ -123,13 +148,15 @@ describe('Tile Component', () => {
123
148
  const handlePress = jest.fn();
124
149
  const handleLongPress = jest.fn();
125
150
  const { getByTestId } = render(
126
- <Tile
127
- leadingContent={mockSpot}
128
- title={mockTitle}
129
- onPress={handlePress}
130
- onLongPress={handleLongPress}
131
- testID='tile'
132
- />,
151
+ <TestWrapper>
152
+ <Tile
153
+ leadingContent={mockSpot}
154
+ title={mockTitle}
155
+ onPress={handlePress}
156
+ onLongPress={handleLongPress}
157
+ testID='tile'
158
+ />
159
+ </TestWrapper>,
133
160
  );
134
161
 
135
162
  fireEvent.press(getByTestId('tile'));
@@ -144,7 +171,9 @@ describe('Tile Component', () => {
144
171
  it('should forward testID prop to Pressable', () => {
145
172
  const testId = 'custom-tile-id';
146
173
  const { getByTestId } = render(
147
- <Tile leadingContent={mockSpot} title={mockTitle} testID={testId} />,
174
+ <TestWrapper>
175
+ <Tile leadingContent={mockSpot} title={mockTitle} testID={testId} />
176
+ </TestWrapper>,
148
177
  );
149
178
 
150
179
  expect(getByTestId(testId)).toBeTruthy();
@@ -152,12 +181,14 @@ describe('Tile Component', () => {
152
181
 
153
182
  it('should forward additional Pressable props', () => {
154
183
  const { getByTestId } = render(
155
- <Tile
156
- leadingContent={mockSpot}
157
- title={mockTitle}
158
- testID='tile'
159
- disabled={true}
160
- />,
184
+ <TestWrapper>
185
+ <Tile
186
+ leadingContent={mockSpot}
187
+ title={mockTitle}
188
+ testID='tile'
189
+ disabled={true}
190
+ />
191
+ </TestWrapper>,
161
192
  );
162
193
 
163
194
  const pressable = getByTestId('tile');
@@ -167,12 +198,14 @@ describe('Tile Component', () => {
167
198
  it('should support custom accessibility label', () => {
168
199
  const customLabel = 'Custom accessibility label';
169
200
  const { getByTestId } = render(
170
- <Tile
171
- leadingContent={mockSpot}
172
- title={mockTitle}
173
- testID='tile'
174
- accessibilityLabel={customLabel}
175
- />,
201
+ <TestWrapper>
202
+ <Tile
203
+ leadingContent={mockSpot}
204
+ title={mockTitle}
205
+ testID='tile'
206
+ accessibilityLabel={customLabel}
207
+ />
208
+ </TestWrapper>,
176
209
  );
177
210
 
178
211
  const pressable = getByTestId('tile');
@@ -184,7 +217,9 @@ describe('Tile Component', () => {
184
217
  <Text testID='custom-leading'>Custom Leading Content</Text>
185
218
  );
186
219
  const { getByTestId } = render(
187
- <Tile leadingContent={customLeading} title={mockTitle} testID='tile' />,
220
+ <TestWrapper>
221
+ <Tile leadingContent={customLeading} title={mockTitle} testID='tile' />
222
+ </TestWrapper>,
188
223
  );
189
224
 
190
225
  expect(getByTestId('custom-leading')).toBeTruthy();
@@ -196,15 +231,17 @@ describe('Tile Component', () => {
196
231
  const mockTag = <Tag label={tagText} />;
197
232
 
198
233
  const { getByText, getByTestId } = render(
199
- <Tile
200
- leadingContent={mockSpot}
201
- title={mockTitle}
202
- description={description}
203
- trailingContent={mockTag}
204
- onPress={jest.fn()}
205
- onLongPress={jest.fn()}
206
- testID='tile'
207
- />,
234
+ <TestWrapper>
235
+ <Tile
236
+ leadingContent={mockSpot}
237
+ title={mockTitle}
238
+ description={description}
239
+ trailingContent={mockTag}
240
+ onPress={jest.fn()}
241
+ onLongPress={jest.fn()}
242
+ testID='tile'
243
+ />
244
+ </TestWrapper>,
208
245
  );
209
246
 
210
247
  expect(getByTestId('tile')).toBeTruthy();
@@ -43,7 +43,7 @@ const tileVariants = {
43
43
  },
44
44
  },
45
45
  ),
46
- title: cva('body-3-semi-bold w-full truncate text-center', {
46
+ title: cva('w-full truncate text-center body-3-semi-bold', {
47
47
  variants: {
48
48
  disabled: {
49
49
  true: 'text-disabled',
@@ -54,7 +54,7 @@ const tileVariants = {
54
54
  disabled: false,
55
55
  },
56
56
  }),
57
- description: cva('body-3 w-full overflow-hidden truncate text-center', {
57
+ description: cva('w-full overflow-hidden truncate text-center body-3', {
58
58
  variants: {
59
59
  disabled: {
60
60
  true: 'text-disabled',
@@ -53,7 +53,7 @@ export const WithCustomContent: Story = {
53
53
  Ut enim ad minim veniam, quis nostrud exercitation ullamco
54
54
  laboris nisi ut aliquip ex ea commodo consequat.
55
55
  </Text>
56
- <Button size='xs' appearance='accent'>
56
+ <Button size='sm' appearance='accent'>
57
57
  Custom tooltip action
58
58
  </Button>
59
59
  </View>
@@ -92,7 +92,7 @@ export const WithMultipleTooltips: Story = {
92
92
 
93
93
  <Tooltip>
94
94
  <TooltipTrigger asChild>
95
- <InteractiveIcon iconType='filled' aria-label='Info'>
95
+ <InteractiveIcon iconType='filled' accessibilityLabel='Info'>
96
96
  <Information />
97
97
  </InteractiveIcon>
98
98
  </TooltipTrigger>
@@ -1,16 +1,20 @@
1
1
  import { describe, it, expect, jest } from '@jest/globals';
2
+ import { ledgerLiveThemes } from '@ledgerhq/lumen-design-core';
2
3
  import { render, fireEvent } from '@testing-library/react-native';
3
4
  import React from 'react';
4
5
  import { Text, View } from 'react-native';
6
+ import { ThemeProvider } from '../ThemeProvider/ThemeProvider';
5
7
  import { GlobalTooltipBottomSheet } from './GlobalTooltipBottomSheet';
6
8
  import { GlobalTooltipProvider } from './GlobalTooltipContext';
7
9
  import { Tooltip, TooltipTrigger, TooltipContent } from './Tooltip';
8
10
 
9
11
  const TestWrapper: React.FC<{ children: React.ReactNode }> = ({ children }) => (
10
- <GlobalTooltipProvider>
11
- {children}
12
- <GlobalTooltipBottomSheet />
13
- </GlobalTooltipProvider>
12
+ <ThemeProvider themes={ledgerLiveThemes} colorScheme='dark' locale='en'>
13
+ <GlobalTooltipProvider>
14
+ {children}
15
+ <GlobalTooltipBottomSheet />
16
+ </GlobalTooltipProvider>
17
+ </ThemeProvider>
14
18
  );
15
19
 
16
20
  describe('Tooltip', () => {
@@ -1,11 +1,16 @@
1
1
  import { Meta, Canvas, Controls } from '@storybook/addon-docs/blocks';
2
2
  import * as BoxStories from './Box.stories';
3
+ import { CustomTabs, Tab } from '../../../../../.storybook/components';
3
4
 
4
5
  <Meta title='Utility/Box' of={BoxStories} />
5
6
 
6
7
  # Box
7
8
 
8
- Box is a utility primitive that wraps React Native's `View` component with token-constrained style props from the design system theme.
9
+ <CustomTabs>
10
+ <Tab label="Overview ">
11
+ Box is a utility primitive that wraps React Native's `View` component with token-constrained style props from the design system theme.
12
+
13
+ Box exposes the `lx` property to consume tokens from the `ledgerLiveTheme`, see [lx documentation](/?path=/docs/style-system-lx--docs).
9
14
 
10
15
  ## Interactive Example
11
16
 
@@ -20,10 +25,12 @@ import { Box, Text } from '@ledgerhq/lumen-ui-rnative';
20
25
  function Card() {
21
26
  return (
22
27
  <Box
23
- padding='s16'
24
- backgroundColor='accent'
25
- borderRadius='md'
26
- gap='s8'
28
+ lx={{
29
+ padding: 's16',
30
+ backgroundColor: 'accent',
31
+ borderRadius: 'md',
32
+ gap: 's8',
33
+ }}
27
34
  >
28
35
  <Text>Card content</Text>
29
36
  </Box>
@@ -31,18 +38,13 @@ function Card() {
31
38
  }
32
39
  ```
33
40
 
34
- ## Theme Tokens
35
-
36
- Box consumes tokens from the `ledgerLiveTheme` for spacing, sizes, colors, and border radius.
37
-
38
41
  ## Escape Hatch
39
42
 
40
43
  For values not covered by tokens, use raw numbers or the `style` prop:
41
44
 
42
45
  ```tsx
43
- // Raw number for one-off values
44
- <Box width={127} marginTop='s4' />
45
-
46
46
  // Style prop for complete override
47
- <Box marginTop='s4' style={{ width: 127 }} />
47
+ <Box lx={{ marginTop: 's4' }} style={{ width: 127 }} />
48
48
  ```
49
+ </Tab>
50
+ </CustomTabs>
@@ -20,23 +20,25 @@ type Story = StoryObj<typeof Box>;
20
20
 
21
21
  export const Base: Story = {
22
22
  args: {
23
- height: 's48',
24
- width: 's48',
25
- backgroundColor: 'accent',
26
- borderRadius: 'md',
27
- alignSelf: 'center',
23
+ lx: {
24
+ height: 's48',
25
+ width: 's48',
26
+ backgroundColor: 'accent',
27
+ borderRadius: 'md',
28
+ },
28
29
  },
29
- render: (args) => <Box {...args}></Box>,
30
30
  parameters: {
31
31
  docs: {
32
32
  source: {
33
33
  code: `
34
34
  <Box
35
- height='s48'
36
- width='s48'
37
- backgroundColor='accent'
38
- borderRadius='md'
39
- alignSelf='center'
35
+ lx={{
36
+ height: 's48',
37
+ width: 's48',
38
+ backgroundColor: 'accent',
39
+ borderRadius: 'md',
40
+ alignSelf: 'center',
41
+ }}
40
42
  />
41
43
  `,
42
44
  },
@@ -1,5 +1,5 @@
1
1
  import { View } from 'react-native';
2
- import { createStyledView, type LumenViewStyleProps } from '../../../styles';
2
+ import { createStyledView, type StyledViewProps } from '../../../../styles';
3
3
 
4
4
  /**
5
5
  * Box - A layout primitive component with token-constrained style props.
@@ -14,28 +14,27 @@ import { createStyledView, type LumenViewStyleProps } from '../../../styles';
14
14
  * import { Box } from '@ledgerhq/lumen-ui-rnative';
15
15
  *
16
16
  * // Basic usage with token props
17
- * <Box width='s400' marginTop='s4' gap='s12' alignItems='center'>
17
+ * <Box lx={{ width: 's400', marginTop: 's4', gap: 's12', alignItems: 'center' }}>
18
18
  * <Text>Content</Text>
19
19
  * </Box>
20
20
  *
21
21
  * // With background and border
22
22
  * <Box
23
- * padding='s16'
24
- * backgroundColor='surface'
25
- * borderRadius='md'
26
- * borderColor='muted'
27
- * borderWidth={1}
23
+ * lx={{
24
+ * padding: 's16',
25
+ * backgroundColor: 'surface',
26
+ * borderRadius: 'md',
27
+ * borderColor: 'muted',
28
+ * borderWidth: 1
29
+ * }}
28
30
  * >
29
31
  * <Text>Card content</Text>
30
32
  * </Box>
31
33
  *
32
- * // Raw numbers allowed as escape hatch
33
- * <Box width={127} marginTop='s4' />
34
- *
35
34
  * // style prop for complete override
36
- * <Box marginTop='s4' style={{ width: 127 }} />
35
+ * <Box lx={{ marginTop: 's4' }} style={{ width: 127 }} />
37
36
  * ```
38
37
  */
39
38
  export const Box = createStyledView(View);
40
39
 
41
- export type BoxProps = LumenViewStyleProps;
40
+ export type BoxProps = StyledViewProps;
@@ -0,0 +1 @@
1
+ export * from './Box';