@ledgerhq/lumen-ui-rnative 0.0.43 → 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 (337) 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.d.ts.map +1 -1
  115. package/dist/src/lib/Components/Tile/Tile.js +54 -8
  116. package/dist/src/lib/Components/Tile/types.d.ts +14 -1
  117. package/dist/src/lib/Components/Tile/types.d.ts.map +1 -1
  118. package/dist/src/lib/Components/Tooltip/Tooltip.stories.js +2 -2
  119. package/dist/src/lib/Components/Utility/Box/Box.d.ts +39 -0
  120. package/dist/src/lib/Components/Utility/Box/Box.d.ts.map +1 -0
  121. package/dist/src/lib/Components/{Box → Utility/Box}/Box.js +10 -11
  122. package/dist/src/lib/Components/Utility/Box/Box.stories.d.ts.map +1 -0
  123. package/dist/src/lib/Components/{Box → Utility/Box}/Box.stories.js +13 -12
  124. package/dist/src/lib/Components/Utility/Box/index.d.ts +2 -0
  125. package/dist/src/lib/Components/Utility/Box/index.d.ts.map +1 -0
  126. package/dist/src/lib/Components/Utility/Pressable/Pressable.d.ts +34 -0
  127. package/dist/src/lib/Components/Utility/Pressable/Pressable.d.ts.map +1 -0
  128. package/dist/src/lib/Components/Utility/Pressable/Pressable.js +33 -0
  129. package/dist/src/lib/Components/Utility/Pressable/Pressable.stories.d.ts +7 -0
  130. package/dist/src/lib/Components/Utility/Pressable/Pressable.stories.d.ts.map +1 -0
  131. package/dist/src/lib/Components/Utility/Pressable/Pressable.stories.js +47 -0
  132. package/dist/src/lib/Components/Utility/Pressable/index.d.ts +3 -0
  133. package/dist/src/lib/Components/Utility/Pressable/index.d.ts.map +1 -0
  134. package/dist/src/lib/Components/Utility/Pressable/index.js +1 -0
  135. package/dist/src/lib/Components/Utility/Pressable/types.d.ts +3 -0
  136. package/dist/src/lib/Components/Utility/Pressable/types.d.ts.map +1 -0
  137. package/dist/src/lib/Components/Utility/Pressable/types.js +1 -0
  138. package/dist/src/lib/Components/Utility/Text/Text.d.ts +40 -0
  139. package/dist/src/lib/Components/Utility/Text/Text.d.ts.map +1 -0
  140. package/dist/src/lib/Components/{Text → Utility/Text}/Text.js +13 -9
  141. package/dist/src/lib/Components/Utility/Text/Text.stories.d.ts.map +1 -0
  142. package/dist/src/lib/Components/{Text → Utility/Text}/Text.stories.js +3 -3
  143. package/dist/src/lib/Components/Utility/Text/index.d.ts.map +1 -0
  144. package/dist/src/lib/Components/Utility/index.d.ts +4 -0
  145. package/dist/src/lib/Components/Utility/index.d.ts.map +1 -0
  146. package/dist/src/lib/Components/Utility/index.js +3 -0
  147. package/dist/src/lib/Components/index.d.ts +1 -3
  148. package/dist/src/lib/Components/index.d.ts.map +1 -1
  149. package/dist/src/lib/Components/index.js +1 -3
  150. package/dist/src/lib/utils/components/InjectStylesIntoChildren.d.ts +6 -5
  151. package/dist/src/lib/utils/components/InjectStylesIntoChildren.d.ts.map +1 -1
  152. package/dist/src/lib/utils/components/InjectStylesIntoChildren.js +6 -6
  153. package/dist/src/styles/LumenStyleSheet.d.ts +1 -1
  154. package/dist/src/styles/LumenStyleSheet.d.ts.map +1 -1
  155. package/dist/src/styles/Provider/createStylesheetTheme.d.ts +0 -1
  156. package/dist/src/styles/Provider/createStylesheetTheme.d.ts.map +1 -1
  157. package/dist/src/styles/Provider/createStylesheetTheme.js +0 -1
  158. package/dist/src/styles/create/useCreate.d.ts +2 -1
  159. package/dist/src/styles/create/useCreate.d.ts.map +1 -1
  160. package/dist/src/styles/create/useCreate.js +5 -5
  161. package/dist/src/styles/factories/areLxPropsEqual.d.ts +3 -0
  162. package/dist/src/styles/factories/areLxPropsEqual.d.ts.map +1 -0
  163. package/dist/src/styles/factories/areLxPropsEqual.js +15 -0
  164. package/dist/src/styles/factories/createStyledPressable.d.ts +26 -0
  165. package/dist/src/styles/factories/createStyledPressable.d.ts.map +1 -0
  166. package/dist/src/styles/factories/createStyledPressable.js +61 -0
  167. package/dist/src/styles/factories/createStyledText.d.ts +15 -26
  168. package/dist/src/styles/factories/createStyledText.d.ts.map +1 -1
  169. package/dist/src/styles/factories/createStyledText.js +13 -29
  170. package/dist/src/styles/factories/createStyledView.d.ts +7 -27
  171. package/dist/src/styles/factories/createStyledView.d.ts.map +1 -1
  172. package/dist/src/styles/factories/createStyledView.js +10 -30
  173. package/dist/src/styles/factories/index.d.ts +4 -0
  174. package/dist/src/styles/factories/index.d.ts.map +1 -0
  175. package/dist/src/styles/factories/index.js +3 -0
  176. package/dist/src/styles/index.d.ts +2 -3
  177. package/dist/src/styles/index.d.ts.map +1 -1
  178. package/dist/src/styles/index.js +2 -3
  179. package/dist/src/styles/resolveStyle/resolveConfig.d.ts +7 -7
  180. package/dist/src/styles/resolveStyle/resolveConfig.d.ts.map +1 -1
  181. package/dist/src/styles/resolveStyle/resolveConfig.js +9 -9
  182. package/dist/src/styles/resolveStyle/resolveStyle.d.ts +6 -20
  183. package/dist/src/styles/resolveStyle/resolveStyle.d.ts.map +1 -1
  184. package/dist/src/styles/resolveStyle/resolveStyle.js +4 -29
  185. package/dist/src/styles/types/create.types.d.ts +1 -1
  186. package/dist/src/styles/types/create.types.d.ts.map +1 -1
  187. package/dist/src/styles/types/styled.types.d.ts +72 -50
  188. package/dist/src/styles/types/styled.types.d.ts.map +1 -1
  189. package/dist/src/styles/types/utility.types.d.ts.map +1 -1
  190. package/dist/src/styles/utils/index.d.ts +2 -0
  191. package/dist/src/styles/utils/index.d.ts.map +1 -0
  192. package/dist/src/styles/utils/index.js +1 -0
  193. package/dist/src/styles/utils/mergeStyles.d.ts +16 -0
  194. package/dist/src/styles/utils/mergeStyles.d.ts.map +1 -0
  195. package/dist/src/styles/utils/mergeStyles.js +20 -0
  196. package/package.json +3 -4
  197. package/src/lib/Components/AddressInput/AddressInput.mdx +15 -4
  198. package/src/lib/Components/AddressInput/AddressInput.stories.tsx +133 -17
  199. package/src/lib/Components/AddressInput/AddressInput.tsx +1 -1
  200. package/src/lib/Components/AmountInput/AmountInput.mdx +20 -1
  201. package/src/lib/Components/AmountInput/AmountInput.stories.tsx +180 -17
  202. package/src/lib/Components/AmountInput/AmountInput.tsx +24 -15
  203. package/src/lib/Components/Banner/Banner.test.tsx +48 -15
  204. package/src/lib/Components/BaseInput/BaseInput.tsx +6 -35
  205. package/src/lib/Components/BottomSheet/BottomSheet.stories.tsx +8 -8
  206. package/src/lib/Components/BottomSheet/BottomSheet.tsx +1 -1
  207. package/src/lib/Components/Button/BaseButton.test.tsx +149 -0
  208. package/src/lib/Components/Button/BaseButton.tsx +193 -148
  209. package/src/lib/Components/Button/Button.mdx +34 -31
  210. package/src/lib/Components/Button/Button.stories.tsx +37 -58
  211. package/src/lib/Components/Button/Button.tsx +4 -11
  212. package/src/lib/Components/Button/index.ts +1 -1
  213. package/src/lib/Components/Button/{BaseButton.types.ts → types.ts} +14 -8
  214. package/src/lib/Components/CardButton/CardButton.mdx +15 -25
  215. package/src/lib/Components/CardButton/CardButton.stories.tsx +48 -22
  216. package/src/lib/Components/CardButton/CardButton.test.tsx +141 -0
  217. package/src/lib/Components/CardButton/CardButton.tsx +142 -108
  218. package/src/lib/Components/CardButton/index.ts +1 -1
  219. package/src/lib/Components/CardButton/{CardButton.types.ts → types.ts} +4 -3
  220. package/src/lib/Components/Checkbox/Checkbox.mdx +1 -1
  221. package/src/lib/Components/Checkbox/Checkbox.test.tsx +42 -17
  222. package/src/lib/Components/Icon/Icon.stories.tsx +143 -73
  223. package/src/lib/Components/Icon/Icon.test.tsx +84 -0
  224. package/src/lib/Components/Icon/Icon.tsx +32 -28
  225. package/src/lib/Components/Icon/createIcon.ts +2 -3
  226. package/src/lib/Components/Icon/index.ts +1 -1
  227. package/src/lib/Components/Icon/{Icon.types.ts → types.ts} +4 -3
  228. package/src/lib/Components/IconButton/IconButton.mdx +13 -10
  229. package/src/lib/Components/IconButton/IconButton.stories.tsx +12 -14
  230. package/src/lib/Components/IconButton/IconButton.test.tsx +141 -0
  231. package/src/lib/Components/IconButton/IconButton.tsx +3 -13
  232. package/src/lib/Components/IconButton/index.ts +1 -0
  233. package/src/lib/Components/IconButton/types.ts +12 -0
  234. package/src/lib/Components/InteractiveIcon/InteractiveIcon.figma.tsx +1 -1
  235. package/src/lib/Components/InteractiveIcon/InteractiveIcon.mdx +25 -27
  236. package/src/lib/Components/InteractiveIcon/InteractiveIcon.stories.tsx +82 -43
  237. package/src/lib/Components/InteractiveIcon/InteractiveIcon.test.tsx +30 -19
  238. package/src/lib/Components/InteractiveIcon/InteractiveIcon.tsx +78 -45
  239. package/src/lib/Components/InteractiveIcon/types.ts +4 -7
  240. package/src/lib/Components/Link/Link.mdx +8 -18
  241. package/src/lib/Components/Link/Link.stories.tsx +56 -25
  242. package/src/lib/Components/Link/Link.test.tsx +141 -51
  243. package/src/lib/Components/Link/Link.tsx +128 -150
  244. package/src/lib/Components/Link/index.ts +1 -0
  245. package/src/lib/Components/Link/types.ts +44 -0
  246. package/src/lib/Components/Search/Search.mdx +14 -1
  247. package/src/lib/Components/Search/Search.stories.tsx +94 -15
  248. package/src/lib/Components/Select/Select.test.tsx +8 -4
  249. package/src/lib/Components/Select/Select.tsx +4 -31
  250. package/src/lib/Components/Spinner/Spinner.stories.tsx +1 -5
  251. package/src/lib/Components/Spinner/Spinner.tsx +60 -34
  252. package/src/lib/Components/Spinner/index.ts +1 -0
  253. package/src/lib/Components/Spinner/types.ts +15 -0
  254. package/src/lib/Components/Switch/Switch.mdx +1 -1
  255. package/src/lib/Components/Tag/Tag.stories.tsx +2 -2
  256. package/src/lib/Components/Tag/Tag.tsx +22 -6
  257. package/src/lib/Components/Tag/Tag.types.ts +7 -8
  258. package/src/lib/Components/TextInput/TextInput.mdx +24 -4
  259. package/src/lib/Components/TextInput/TextInput.stories.tsx +131 -15
  260. package/src/lib/Components/Tile/Tile.test.tsx +100 -63
  261. package/src/lib/Components/Tile/Tile.tsx +64 -13
  262. package/src/lib/Components/Tile/types.ts +14 -1
  263. package/src/lib/Components/Tooltip/Tooltip.stories.tsx +2 -2
  264. package/src/lib/Components/Tooltip/Tooltip.test.tsx +8 -4
  265. package/src/lib/Components/{Box → Utility/Box}/Box.mdx +15 -13
  266. package/src/lib/Components/{Box → Utility/Box}/Box.stories.tsx +13 -11
  267. package/src/lib/Components/{Box → Utility/Box}/Box.tsx +11 -12
  268. package/src/lib/Components/Utility/Box/index.ts +1 -0
  269. package/src/lib/Components/Utility/Pressable/Pressable.mdx +103 -0
  270. package/src/lib/Components/Utility/Pressable/Pressable.stories.tsx +51 -0
  271. package/src/lib/Components/Utility/Pressable/Pressable.test.tsx +221 -0
  272. package/src/lib/Components/Utility/Pressable/Pressable.tsx +34 -0
  273. package/src/lib/Components/Utility/Pressable/index.ts +2 -0
  274. package/src/lib/Components/Utility/Pressable/types.ts +3 -0
  275. package/src/lib/Components/{Text → Utility/Text}/Text.mdx +15 -7
  276. package/src/lib/Components/{Text → Utility/Text}/Text.stories.tsx +3 -3
  277. package/src/lib/Components/Utility/Text/Text.tsx +39 -0
  278. package/src/lib/Components/Utility/index.ts +3 -0
  279. package/src/lib/Components/index.ts +1 -3
  280. package/src/lib/utils/components/InjectStylesIntoChildren.tsx +23 -14
  281. package/src/styles/Provider/createStylesheetTheme.ts +0 -1
  282. package/src/styles/create/useCreate.ts +8 -4
  283. package/src/styles/factories/areLxPropsEqual.ts +32 -0
  284. package/src/styles/factories/createStyledPressable.test.tsx +253 -0
  285. package/src/styles/factories/createStyledPressable.tsx +97 -0
  286. package/src/styles/factories/createStyledText.test.tsx +28 -20
  287. package/src/styles/factories/createStyledText.tsx +29 -49
  288. package/src/styles/factories/createStyledView.test.tsx +22 -16
  289. package/src/styles/factories/createStyledView.tsx +19 -53
  290. package/src/styles/factories/index.ts +3 -0
  291. package/src/styles/index.ts +2 -3
  292. package/src/styles/resolveStyle/resolveConfig.ts +16 -15
  293. package/src/styles/resolveStyle/resolveStyle.test.ts +13 -141
  294. package/src/styles/resolveStyle/resolveStyle.ts +10 -60
  295. package/src/styles/types/create.types.ts +1 -1
  296. package/src/styles/types/styled.types.ts +73 -105
  297. package/src/styles/types/utility.types.ts +1 -0
  298. package/src/styles/utils/index.ts +1 -0
  299. package/src/styles/utils/mergeStyles.test.ts +45 -0
  300. package/src/styles/utils/mergeStyles.ts +25 -0
  301. package/.storybook/docs/getting-started/StyleSystem.mdx +0 -133
  302. package/dist/src/lib/Components/Box/Box.d.ts +0 -592
  303. package/dist/src/lib/Components/Box/Box.d.ts.map +0 -1
  304. package/dist/src/lib/Components/Box/Box.stories.d.ts.map +0 -1
  305. package/dist/src/lib/Components/Box/Box.types.d.ts +0 -3
  306. package/dist/src/lib/Components/Box/Box.types.d.ts.map +0 -1
  307. package/dist/src/lib/Components/Box/index.d.ts +0 -3
  308. package/dist/src/lib/Components/Box/index.d.ts.map +0 -1
  309. package/dist/src/lib/Components/Button/BaseButton.types.d.ts.map +0 -1
  310. package/dist/src/lib/Components/CardButton/CardButton.types.d.ts.map +0 -1
  311. package/dist/src/lib/Components/Icon/Icon.types.d.ts.map +0 -1
  312. package/dist/src/lib/Components/Text/Text.d.ts +0 -602
  313. package/dist/src/lib/Components/Text/Text.d.ts.map +0 -1
  314. package/dist/src/lib/Components/Text/Text.stories.d.ts.map +0 -1
  315. package/dist/src/lib/Components/Text/index.d.ts.map +0 -1
  316. package/dist/src/lib/Components/_ToRemove/ToRemove.d.ts +0 -9
  317. package/dist/src/lib/Components/_ToRemove/ToRemove.d.ts.map +0 -1
  318. package/dist/src/lib/Components/_ToRemove/ToRemove.js +0 -43
  319. package/dist/src/styles/utils/styleVarianceAuthority.d.ts +0 -30
  320. package/dist/src/styles/utils/styleVarianceAuthority.d.ts.map +0 -1
  321. package/dist/src/styles/utils/styleVarianceAuthority.js +0 -97
  322. package/src/lib/Components/Box/Box.types.ts +0 -3
  323. package/src/lib/Components/Box/index.ts +0 -2
  324. package/src/lib/Components/Text/Text.tsx +0 -35
  325. package/src/lib/Components/_ToRemove/ToRemove.tsx +0 -65
  326. package/src/styles/utils/styleVarianceAuthority.test.ts +0 -302
  327. package/src/styles/utils/styleVarianceAuthority.ts +0 -154
  328. /package/dist/src/lib/Components/{Box/Box.types.js → Button/types.js} +0 -0
  329. /package/dist/src/lib/Components/{Button/BaseButton.types.js → CardButton/types.js} +0 -0
  330. /package/dist/src/lib/Components/{CardButton/CardButton.types.js → Icon/types.js} +0 -0
  331. /package/dist/src/lib/Components/{Icon/Icon.types.js → IconButton/types.js} +0 -0
  332. /package/dist/src/lib/Components/{Box → Utility/Box}/Box.stories.d.ts +0 -0
  333. /package/dist/src/lib/Components/{Box → Utility/Box}/index.js +0 -0
  334. /package/dist/src/lib/Components/{Text → Utility/Text}/Text.stories.d.ts +0 -0
  335. /package/dist/src/lib/Components/{Text → Utility/Text}/index.d.ts +0 -0
  336. /package/dist/src/lib/Components/{Text → Utility/Text}/index.js +0 -0
  337. /package/src/lib/Components/{Text → Utility/Text}/index.ts +0 -0
@@ -1,8 +1,11 @@
1
1
  import type { Meta, StoryObj } from '@storybook/react-native-web-vite';
2
2
  import { useState } from 'react';
3
+ import { View } from 'react-native';
4
+ import { LumenStyleSheet } from '../../../styles';
3
5
  import * as Icons from '../../Symbols';
4
6
  import { Search } from '../Search/Search';
5
- import { IconSize } from './Icon.types';
7
+ import { Box, Text, Pressable } from '../Utility';
8
+ import type { IconSize } from './types';
6
9
 
7
10
  const meta: Meta = {
8
11
  title: 'Symbols/Interface Icons',
@@ -18,22 +21,20 @@ const iconNames = Object.keys(Icons) as IconName[];
18
21
  type IconStoryProps = {
19
22
  size: IconSize;
20
23
  name: IconName;
21
- className?: string;
24
+ color?: string;
22
25
  };
23
26
 
24
27
  type IconCardProps = {
25
28
  name: string;
26
29
  size?: IconSize;
27
- className?: string;
30
+ color?: string;
28
31
  };
29
32
 
30
- const IconCard = ({
31
- name,
32
- size = 24,
33
- className = 'text-base',
34
- }: IconCardProps) => {
33
+ const IconCard = ({ name, size = 24, color }: IconCardProps) => {
34
+ const { theme } = LumenStyleSheet.useTheme();
35
35
  const [copied, setCopied] = useState(false);
36
36
  const IconComponent = Icons[name as keyof typeof Icons];
37
+ const iconColor = color ?? theme.colors.text.base;
37
38
 
38
39
  const handleClick = async () => {
39
40
  try {
@@ -46,19 +47,46 @@ const IconCard = ({
46
47
  };
47
48
 
48
49
  return (
49
- <div
50
+ <Pressable
50
51
  key={name}
51
- className='relative flex cursor-pointer flex-col items-center gap-2 rounded-lg p-4 transition-colors hover:bg-muted-pressed'
52
- onClick={handleClick}
52
+ onPress={handleClick}
53
+ lx={{
54
+ position: 'relative',
55
+ flexDirection: 'column',
56
+ alignItems: 'center',
57
+ gap: 's8',
58
+ borderRadius: 'sm',
59
+ padding: 's16',
60
+ width: 's144',
61
+ }}
62
+ style={({ pressed }) => ({
63
+ backgroundColor: pressed ? theme.colors.bg.mutedPressed : 'transparent',
64
+ })}
53
65
  >
54
- <IconComponent size={size} className={className} />
55
- <span className='text-muted body-4'>{name}</span>
66
+ <IconComponent size={size} style={{ color: iconColor }} />
67
+ <Text typography='body4' lx={{ color: 'muted' }}>
68
+ {name}
69
+ </Text>
56
70
  {copied && (
57
- <div className='absolute inset-0 flex items-center justify-center rounded-lg bg-muted'>
58
- <span className='text-on-accent body-4'>Copied!</span>
59
- </div>
71
+ <View
72
+ style={{
73
+ position: 'absolute',
74
+ top: 0,
75
+ left: 0,
76
+ right: 0,
77
+ bottom: 0,
78
+ alignItems: 'center',
79
+ justifyContent: 'center',
80
+ borderRadius: theme.borderRadius.sm,
81
+ backgroundColor: theme.colors.bg.muted,
82
+ }}
83
+ >
84
+ <Text typography='body4' lx={{ color: 'onAccent' }}>
85
+ Copied!
86
+ </Text>
87
+ </View>
60
88
  )}
61
- </div>
89
+ </Pressable>
62
90
  );
63
91
  };
64
92
 
@@ -66,7 +94,6 @@ export const Icon: StoryObj<IconStoryProps> = {
66
94
  args: {
67
95
  size: 24,
68
96
  name: 'Home',
69
- className: 'text-base',
70
97
  },
71
98
  argTypes: {
72
99
  size: {
@@ -79,27 +106,30 @@ export const Icon: StoryObj<IconStoryProps> = {
79
106
  options: iconNames,
80
107
  description: 'The name of the icon to display',
81
108
  },
82
- className: {
83
- control: 'text',
84
- description: 'Additional CSS classes to apply (can be used for color)',
109
+ color: {
110
+ control: 'color',
111
+ description: 'The color of the icon',
85
112
  },
86
113
  },
87
114
  render: (args) => {
115
+ const { theme } = LumenStyleSheet.useTheme();
88
116
  const IconComponent = Icons[args.name];
117
+ const iconColor = args.color ?? theme.colors.text.base;
118
+
89
119
  return (
90
- <div className='p-8'>
91
- <div className='flex flex-col items-center gap-4'>
92
- <IconComponent size={args.size} className={args.className} />
93
- <span className='text-base'>{args.name}</span>
94
- </div>
95
- </div>
120
+ <Box lx={{ padding: 's8' }}>
121
+ <Box lx={{ flexDirection: 'column', alignItems: 'center', gap: 's4' }}>
122
+ <IconComponent size={args.size} style={{ color: iconColor }} />
123
+ <Text lx={{ color: 'base' }}>{args.name}</Text>
124
+ </Box>
125
+ </Box>
96
126
  );
97
127
  },
98
128
  parameters: {
99
129
  docs: {
100
130
  source: {
101
131
  code: `
102
- <Information size={24} className="text-base" />
132
+ <Information size={24} style={{ color: theme.colors.text.base }} />
103
133
  `,
104
134
  },
105
135
  },
@@ -107,29 +137,47 @@ export const Icon: StoryObj<IconStoryProps> = {
107
137
  };
108
138
 
109
139
  export const IconSizes: StoryObj = {
110
- render: () => (
111
- <div className='space-y-16 text-base'>
112
- {sizes.map((size) => (
113
- <div key={size}>
114
- <h3 className='mb-16 heading-3'>Size {size}px</h3>
115
- <div className='flex max-w-fit flex-wrap gap-16 rounded-lg border border-muted-subtle p-16'>
116
- {[
117
- 'Home',
118
- 'Settings',
119
- 'Heart',
120
- 'Star',
121
- 'ArrowDown',
122
- 'ArrowLeft',
123
- 'ArrowRight',
124
- 'ArrowUp',
125
- ].map((iconName) => (
126
- <IconCard key={iconName} name={iconName} size={size} />
127
- ))}
128
- </div>
129
- </div>
130
- ))}
131
- </div>
132
- ),
140
+ render: () => {
141
+ const { theme } = LumenStyleSheet.useTheme();
142
+
143
+ return (
144
+ <Box lx={{ flexDirection: 'column', gap: 's16' }}>
145
+ {sizes.map((size) => (
146
+ <Box key={size} lx={{ flexDirection: 'column' }}>
147
+ <Text typography='heading3' lx={{ marginBottom: 's16' }}>
148
+ Size {size}px
149
+ </Text>
150
+ <Box
151
+ lx={{
152
+ flexDirection: 'row',
153
+ flexWrap: 'wrap',
154
+ gap: 's16',
155
+ borderRadius: 'sm',
156
+ padding: 's16',
157
+ }}
158
+ style={{
159
+ borderWidth: 1,
160
+ borderColor: theme.colors.border.mutedSubtle,
161
+ }}
162
+ >
163
+ {[
164
+ 'Home',
165
+ 'Settings',
166
+ 'Heart',
167
+ 'Star',
168
+ 'ArrowDown',
169
+ 'ArrowLeft',
170
+ 'ArrowRight',
171
+ 'ArrowUp',
172
+ ].map((iconName) => (
173
+ <IconCard key={iconName} name={iconName} size={size} />
174
+ ))}
175
+ </Box>
176
+ </Box>
177
+ ))}
178
+ </Box>
179
+ );
180
+ },
133
181
  };
134
182
 
135
183
  export const Gallery: StoryObj = {
@@ -137,6 +185,7 @@ export const Gallery: StoryObj = {
137
185
  layout: 'fullscreen',
138
186
  },
139
187
  render: () => {
188
+ const { theme } = LumenStyleSheet.useTheme();
140
189
  const [searchTerm, setSearchTerm] = useState('');
141
190
 
142
191
  // Filter icons based on search term
@@ -145,48 +194,69 @@ export const Gallery: StoryObj = {
145
194
  );
146
195
 
147
196
  return (
148
- <div className='p-8'>
197
+ <Box
198
+ lx={{
199
+ width: 'full',
200
+ flexDirection: 'column',
201
+ alignItems: 'stretch',
202
+ padding: 's8',
203
+ }}
204
+ >
149
205
  {/* Search bar */}
150
- <div className='mb-32'>
151
- <div className='mb-8 max-w-md'>
206
+ <Box lx={{ marginBottom: 's32' }}>
207
+ <Box lx={{ marginBottom: 's8', maxWidth: 's320' }}>
152
208
  <Search
153
209
  placeholder='Search icons...'
154
210
  value={searchTerm}
155
211
  onChangeText={setSearchTerm}
156
212
  />
157
- </div>
213
+ </Box>
158
214
 
159
215
  {/* Results count */}
160
- <div className='mb-4'>
161
- <span className='ml-8 text-muted body-3'>
216
+ <Box lx={{ marginBottom: 's4' }}>
217
+ <Text typography='body3' lx={{ marginLeft: 's8', color: 'muted' }}>
162
218
  {filteredIcons.length} of {Object.keys(Icons).length} icons
163
219
  {searchTerm && ` matching "${searchTerm}"`}
164
- </span>
165
- </div>
166
- </div>
220
+ </Text>
221
+ </Box>
222
+ </Box>
167
223
 
168
- {/* Icon grid */}
169
- <div className='grid grid-cols-[repeat(auto-fill,minmax(120px,1fr))] gap-8'>
224
+ {/* Icon grid - using flexWrap for RN compatibility */}
225
+ <Box lx={{ flexDirection: 'row', flexWrap: 'wrap', gap: 's8' }}>
170
226
  {filteredIcons.map(([name]) => (
171
227
  <IconCard key={name} name={name} />
172
228
  ))}
173
- </div>
229
+ </Box>
174
230
 
175
231
  {/* No results message */}
176
232
  {filteredIcons.length === 0 && searchTerm && (
177
- <div className='flex flex-col items-center justify-center py-16'>
178
- <p className='text-muted body-2'>
233
+ <Box
234
+ lx={{
235
+ flexDirection: 'column',
236
+ alignItems: 'center',
237
+ justifyContent: 'center',
238
+ paddingVertical: 's16',
239
+ }}
240
+ >
241
+ <Text typography='body2' lx={{ color: 'muted' }}>
179
242
  No icons found matching "{searchTerm}"
180
- </p>
181
- <button
182
- onClick={() => setSearchTerm('')}
183
- className='mt-4 text-interactive body-2 hover:text-interactive-hover'
243
+ </Text>
244
+ <Pressable
245
+ onPress={() => setSearchTerm('')}
246
+ style={({ pressed }) => ({
247
+ marginTop: 16,
248
+ color: pressed
249
+ ? theme.colors.text.interactivePressed
250
+ : theme.colors.text.interactive,
251
+ })}
184
252
  >
185
- Clear search
186
- </button>
187
- </div>
253
+ <Text typography='body2' lx={{ color: 'interactive' }}>
254
+ Clear search
255
+ </Text>
256
+ </Pressable>
257
+ </Box>
188
258
  )}
189
- </div>
259
+ </Box>
190
260
  );
191
261
  },
192
262
  };
@@ -0,0 +1,84 @@
1
+ import { describe, it, expect } from '@jest/globals';
2
+ import { ledgerLiveThemes } from '@ledgerhq/lumen-design-core';
3
+ import { render, screen } from '@testing-library/react-native';
4
+ import React from 'react';
5
+ import { Path } from 'react-native-svg';
6
+ import { ThemeProvider } from '../ThemeProvider/ThemeProvider';
7
+ import { Icon } from './Icon';
8
+ import type { IconSize } from './types';
9
+
10
+ const { icon: iconTokens } = ledgerLiveThemes.dark;
11
+
12
+ const renderWithProvider = (component: React.ReactElement) => {
13
+ return render(
14
+ <ThemeProvider themes={ledgerLiveThemes} colorScheme='dark' locale='en'>
15
+ {component}
16
+ </ThemeProvider>,
17
+ );
18
+ };
19
+
20
+ describe('Icon', () => {
21
+ it('should render children with default props', () => {
22
+ renderWithProvider(
23
+ <Icon viewBox='0 0 24 24' testID='icon'>
24
+ <Path d='M12 2L2 7l10 5 10-5-10-5z' testID='path' />
25
+ </Icon>,
26
+ );
27
+
28
+ const svg = screen.getByTestId('icon');
29
+ expect(screen.getByTestId('path')).toBeTruthy();
30
+ expect(svg.props.fill).toBe('none');
31
+ expect(svg.props.pointerEvents).toBe('none');
32
+ expect(svg.props.width).toBe(iconTokens.width.s24);
33
+ expect(svg.props.height).toBe(iconTokens.height.s24);
34
+ expect(svg.props.strokeWidth).toBe(iconTokens.borderWidth.s24);
35
+ });
36
+
37
+ it.each([12, 16, 20, 24, 40, 48, 56] as IconSize[])(
38
+ 'should apply correct dimensions for size %i',
39
+ (size) => {
40
+ renderWithProvider(
41
+ <Icon viewBox='0 0 24 24' size={size} testID='icon'>
42
+ <Path d='M12 2L2 7l10 5 10-5-10-5z' />
43
+ </Icon>,
44
+ );
45
+
46
+ const sizeKey = `s${size}` as `s${typeof size}`;
47
+ const svg = screen.getByTestId('icon');
48
+
49
+ expect(svg.props.width).toBe(iconTokens.width[sizeKey]);
50
+ expect(svg.props.height).toBe(iconTokens.height[sizeKey]);
51
+ expect(svg.props.strokeWidth).toBe(iconTokens.borderWidth[sizeKey]);
52
+ },
53
+ );
54
+
55
+ it('should apply color from style prop', () => {
56
+ renderWithProvider(
57
+ <Icon viewBox='0 0 24 24' testID='icon' style={{ color: '#ff0000' }}>
58
+ <Path d='M12 2L2 7l10 5 10-5-10-5z' />
59
+ </Icon>,
60
+ );
61
+
62
+ expect(screen.getByTestId('icon').props.color).toBe('#ff0000');
63
+ });
64
+
65
+ it('should forward ref and spread additional props', () => {
66
+ const ref = { current: null };
67
+ renderWithProvider(
68
+ <Icon
69
+ viewBox='0 0 24 24'
70
+ ref={ref}
71
+ testID='icon'
72
+ accessibilityLabel='Test icon'
73
+ fill='currentColor'
74
+ >
75
+ <Path d='M12 2L2 7l10 5 10-5-10-5z' />
76
+ </Icon>,
77
+ );
78
+
79
+ const svg = screen.getByTestId('icon');
80
+ expect(ref.current).not.toBeNull();
81
+ expect(svg.props.accessibilityLabel).toBe('Test icon');
82
+ expect(svg.props.fill).toBe('currentColor');
83
+ });
84
+ });
@@ -1,40 +1,44 @@
1
- import { cva } from 'class-variance-authority';
2
- import { cssInterop } from 'nativewind';
3
- import { forwardRef } from 'react';
1
+ import { forwardRef, useMemo } from 'react';
2
+ import { StyleSheet } from 'react-native';
4
3
  import { Svg } from 'react-native-svg';
5
- import { cn } from '../../utils';
6
- import { IconProps } from './Icon.types';
4
+ import { LumenStyleSheet } from '../../../styles';
5
+ import { IconProps, IconSize } from './types';
7
6
 
8
- cssInterop(Svg, {
9
- className: 'style',
10
- });
7
+ const iconSizeMap = {
8
+ 12: 's12',
9
+ 16: 's16',
10
+ 20: 's20',
11
+ 24: 's24',
12
+ 40: 's40',
13
+ 48: 's48',
14
+ 56: 's56',
15
+ } as const;
11
16
 
12
- const iconVariants = cva('inline-block', {
13
- variants: {
14
- size: {
15
- 12: 'icon-w-12 icon-h-12 icon-stroke-12',
16
- 16: 'icon-w-16 icon-h-16 icon-stroke-16',
17
- 20: 'icon-w-20 icon-h-20 icon-stroke-20',
18
- 24: 'icon-w-24 icon-h-24 icon-stroke-24',
19
- 40: 'icon-w-40 icon-h-40 icon-stroke-40',
20
- 48: 'icon-w-48 icon-h-48 icon-stroke-48',
21
- 56: 'icon-w-56 icon-h-56 icon-stroke-56',
22
- },
23
- },
24
- defaultVariants: {
25
- size: 24,
26
- },
27
- });
17
+ const useStyles = (size: IconSize) => {
18
+ const { theme } = LumenStyleSheet.useTheme();
19
+ return useMemo(
20
+ () => ({
21
+ width: theme.icon.width[iconSizeMap[size]],
22
+ height: theme.icon.height[iconSizeMap[size]],
23
+ strokeWidth: theme.icon.borderWidth[iconSizeMap[size]],
24
+ }),
25
+ [size, theme],
26
+ );
27
+ };
28
28
 
29
29
  export const Icon = forwardRef<Svg, IconProps>(
30
- ({ size = 24, className = '', children, viewBox, ...props }, ref) => {
30
+ ({ size = 24, style, children, viewBox, ...props }, ref) => {
31
+ const styles = useStyles(size);
32
+ const flatStyle = StyleSheet.flatten(style);
33
+
31
34
  return (
32
35
  <Svg
33
36
  ref={ref}
34
- width={size}
35
- height={size}
36
- className={cn(className, iconVariants({ size }), 'inline-block')}
37
+ width={styles.width}
38
+ height={styles.height}
39
+ strokeWidth={styles.strokeWidth}
37
40
  viewBox={viewBox}
41
+ color={flatStyle?.color ?? 'currentColor'}
38
42
  fill='none'
39
43
  pointerEvents='none'
40
44
  {...props}
@@ -2,7 +2,7 @@ import React, { forwardRef } from 'react';
2
2
  import { Svg, SvgProps } from 'react-native-svg';
3
3
  import { toPascalCase } from '../../utils';
4
4
  import { Icon } from './Icon';
5
- import { IconProps } from './Icon.types';
5
+ import { IconProps } from './types';
6
6
 
7
7
  /**
8
8
  * Create an Icon component for React Native
@@ -15,10 +15,9 @@ const createIcon = (
15
15
  iconJsx: React.ReactElement<SvgProps>,
16
16
  ) => {
17
17
  const Component = forwardRef<Svg, Omit<IconProps, 'children'>>(
18
- ({ className, ...props }, ref) =>
18
+ ({ ...props }, ref) =>
19
19
  React.createElement(Icon, {
20
20
  ref,
21
- className,
22
21
  viewBox: iconJsx.props.viewBox,
23
22
  ...props,
24
23
  children: iconJsx.props.children,
@@ -1,2 +1,2 @@
1
1
  export * from './Icon';
2
- export * from './Icon.types';
2
+ export * from './types';
@@ -1,3 +1,4 @@
1
+ import { StyleProp, ViewStyle } from 'react-native';
1
2
  import { SvgProps } from 'react-native-svg';
2
3
 
3
4
  export type IconSize = 12 | 16 | 20 | 24 | 40 | 48 | 56;
@@ -8,11 +9,11 @@ export type IconProps = {
8
9
  */
9
10
  size?: IconSize;
10
11
  /**
11
- * Additional CSS classes to apply to the icon.
12
+ * Style object to apply to the icon (supports color via color property).
12
13
  */
13
- className?: string;
14
+ style?: StyleProp<ViewStyle & { color?: string }>;
14
15
  /**
15
16
  * The children of the icon.
16
17
  */
17
18
  children: React.ReactNode;
18
- } & SvgProps;
19
+ } & Omit<SvgProps, 'style'>;
@@ -4,6 +4,7 @@ import { IconButton } from './IconButton';
4
4
  import { CustomTabs, Tab } from '../../../../.storybook/components';
5
5
  import { DoVsDontRow, DoBlockItem, DontBlockItem } from '../../../../.storybook/components/DoVsDont';
6
6
  import CommonRulesDoAndDont from '../../../../.storybook/docs/CommonRulesDoAndDont.mdx';
7
+ import { Box } from '../Utility';
7
8
 
8
9
  <Meta title='Action/IconButton' of={IconButtonStories} />
9
10
 
@@ -40,10 +41,12 @@ IconButton supports the same appearances as the standard Button:
40
41
 
41
42
  IconButtons come in four different sizes:
42
43
 
43
- - xs (32px)
44
- - sm (44px)
45
- - md (48px, default)
46
- - lg (56px)
44
+
45
+ - `xs` (**32px**)
46
+ - `sm` (**40px**)
47
+ - `md` (**48px**, default)
48
+ - `lg` (**56px**)
49
+
47
50
 
48
51
  <Canvas of={IconButtonStories.SizesShowcase} />
49
52
 
@@ -78,10 +81,10 @@ function MyComponent() {
78
81
 
79
82
  ### Custom Styling
80
83
 
81
- While the component comes with predefined styles, you can extend them using NativeWind classes:
84
+ While the component comes with predefined styles, you can extend them using the `lx` prop for token-based styling:
82
85
 
83
86
  ```tsx
84
- <IconButton accessibilityLabel='Close' icon={Close} className='mt-4' />
87
+ <IconButton accessibilityLabel='Close' icon={Close} lx={{ marginTop: 's4' }} />
85
88
  ```
86
89
 
87
90
  ### Full Width
@@ -134,7 +137,7 @@ The Button component is built on React Native's `Pressable` and accepts all its
134
137
 
135
138
  ## Do's and Don'ts
136
139
 
137
- <div className='flex flex-col gap-24'>
140
+ <Box lx={{ flexDirection: 'column', gap: 's24' }}>
138
141
  <DoVsDontRow>
139
142
  <DoBlockItem
140
143
  title='Use icon prop for consistent sizing'
@@ -151,14 +154,14 @@ import { Settings } from '@ledgerhq/lumen-ui-rnative/symbols';
151
154
  </DoBlockItem>
152
155
  <DontBlockItem
153
156
  title="Don't modify icon size directly"
154
- description='Avoid passing icon size prop or overriding dimensions through className'
157
+ description='Avoid passing icon size prop or overriding dimensions through lx'
155
158
  >
156
159
 
157
160
  {/* prettier-ignore */}
158
161
  ```tsx
159
162
  import { Settings } from '@ledgerhq/lumen-ui-rnative/symbols';
160
163
 
161
- <IconButton accessibilityLabel='Settings' icon={Settings} className='w-8 h-8' />
164
+ <IconButton accessibilityLabel='Settings' icon={Settings} lx={{ width: 's32', height: 's32' }} />
162
165
  ```
163
166
 
164
167
  </DontBlockItem>
@@ -196,7 +199,7 @@ import { Settings } from '@ledgerhq/lumen-ui-rnative/symbols';
196
199
  </DoVsDontRow>
197
200
 
198
201
  <CommonRulesDoAndDont />
199
- </div>
202
+ </Box>
200
203
 
201
204
  </Tab>
202
205
  </CustomTabs>
@@ -1,5 +1,6 @@
1
1
  import type { Meta, StoryObj } from '@storybook/react-native-web-vite';
2
2
  import { Close, Heart, Plus, Settings, Share } from '../../Symbols';
3
+ import { Box } from '../Utility';
3
4
  import { IconButton } from './IconButton';
4
5
 
5
6
  const iconMap = {
@@ -13,9 +14,6 @@ const iconMap = {
13
14
  const meta: Meta<typeof IconButton> = {
14
15
  title: 'Action/IconButton',
15
16
  component: IconButton,
16
- parameters: {
17
- layout: 'centered',
18
- },
19
17
  argTypes: {
20
18
  icon: {
21
19
  options: Object.keys(iconMap),
@@ -23,11 +21,11 @@ const meta: Meta<typeof IconButton> = {
23
21
  control: {
24
22
  type: 'select',
25
23
  labels: {
26
- Heart: '❤️ Heart',
27
- Plus: 'Plus',
28
- Settings: '⚙️ Settings',
29
- Share: '📤 Share',
30
- Close: '✖️ Close',
24
+ Heart: 'Heart',
25
+ Plus: 'Plus',
26
+ Settings: 'Settings',
27
+ Share: 'Share',
28
+ Close: 'Close',
31
29
  },
32
30
  },
33
31
  },
@@ -70,7 +68,7 @@ export const Base: Story = {
70
68
 
71
69
  export const AppearanceShowcase: Story = {
72
70
  render: () => (
73
- <div className='flex gap-8'>
71
+ <Box lx={{ flexDirection: 'row', gap: 's8' }}>
74
72
  <IconButton accessibilityLabel='Add' icon={Plus} appearance='accent' />
75
73
  <IconButton accessibilityLabel='Add' icon={Plus} appearance='base' />
76
74
  <IconButton accessibilityLabel='Add' icon={Plus} appearance='gray' />
@@ -85,13 +83,13 @@ export const AppearanceShowcase: Story = {
85
83
  appearance='no-background'
86
84
  />
87
85
  <IconButton accessibilityLabel='Add' icon={Plus} appearance='red' />
88
- </div>
86
+ </Box>
89
87
  ),
90
88
  };
91
89
 
92
90
  export const SizesShowcase: Story = {
93
91
  render: () => (
94
- <div className='flex items-center gap-8'>
92
+ <Box lx={{ flexDirection: 'row', alignItems: 'center', gap: 's8' }}>
95
93
  <IconButton
96
94
  accessibilityLabel='Add to favorites'
97
95
  icon={Heart}
@@ -112,7 +110,7 @@ export const SizesShowcase: Story = {
112
110
  icon={Heart}
113
111
  size='lg'
114
112
  />
115
- </div>
113
+ </Box>
116
114
  ),
117
115
  };
118
116
 
@@ -121,7 +119,7 @@ export const StatesShowcase: Story = {
121
119
  appearance: 'base',
122
120
  },
123
121
  render: ({ appearance }) => (
124
- <div className='flex items-center gap-8'>
122
+ <Box lx={{ flexDirection: 'row', alignItems: 'flex-start', gap: 's8' }}>
125
123
  <IconButton
126
124
  accessibilityLabel='Settings'
127
125
  appearance={appearance}
@@ -134,6 +132,6 @@ export const StatesShowcase: Story = {
134
132
  icon={Settings}
135
133
  loading
136
134
  />
137
- </div>
135
+ </Box>
138
136
  ),
139
137
  };