@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
@@ -19,6 +19,19 @@ export type TileProps = {
19
19
  * Accepts ReactNode such as <Tag label="New" appearance="base" />
20
20
  */
21
21
  trailingContent?: ReactNode;
22
+ /**
23
+ * The visual style of the tile.
24
+ * - `no-background`: Transparent background with pressed state
25
+ * - `card`: Surface background with pressed state
26
+ * @default 'no-background'
27
+ */
28
+ appearance?: 'no-background' | 'card';
29
+ /**
30
+ * Whether the tile is disabled.
31
+ * When disabled, the tile will not respond to press events and will appear dimmed.
32
+ * @default false
33
+ */
34
+ disabled?: boolean;
22
35
  /**
23
36
  * Callback function when the tile is pressed.
24
37
  */
@@ -28,5 +41,5 @@ export type TileProps = {
28
41
  * Can be used to perform secondary actions.
29
42
  */
30
43
  onLongPress?: PressableProps['onLongPress'];
31
- } & Omit<PressableProps, 'onPress' | 'onLongPress'>;
44
+ } & Omit<PressableProps, 'onPress' | 'onLongPress' | 'disabled'>;
32
45
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/Tile/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9C,MAAM,MAAM,SAAS,GAAG;IACtB;;;OAGG;IACH,cAAc,EAAE,SAAS,CAAC;IAC1B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,eAAe,CAAC,EAAE,SAAS,CAAC;IAC5B;;OAEG;IACH,OAAO,CAAC,EAAE,cAAc,CAAC,SAAS,CAAC,CAAC;IACpC;;;OAGG;IACH,WAAW,CAAC,EAAE,cAAc,CAAC,aAAa,CAAC,CAAC;CAC7C,GAAG,IAAI,CAAC,cAAc,EAAE,SAAS,GAAG,aAAa,CAAC,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/Tile/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9C,MAAM,MAAM,SAAS,GAAG;IACtB;;;OAGG;IACH,cAAc,EAAE,SAAS,CAAC;IAC1B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,eAAe,CAAC,EAAE,SAAS,CAAC;IAC5B;;;;;OAKG;IACH,UAAU,CAAC,EAAE,eAAe,GAAG,MAAM,CAAC;IACtC;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,OAAO,CAAC,EAAE,cAAc,CAAC,SAAS,CAAC,CAAC;IACpC;;;OAGG;IACH,WAAW,CAAC,EAAE,cAAc,CAAC,aAAa,CAAC,CAAC;CAC7C,GAAG,IAAI,CAAC,cAAc,EAAE,SAAS,GAAG,aAAa,GAAG,UAAU,CAAC,CAAC"}
@@ -15,10 +15,10 @@ export const Base = {
15
15
  render: () => (_jsxs(_Fragment, { children: [_jsx(View, { className: 'flex min-h-400 items-center justify-center p-24', children: _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx(Button, { children: "Press me" }) }), _jsx(TooltipContent, { title: 'My tooltip title', content: _jsx(Text, { children: "This is a helpful tooltip" }) })] }) }), _jsx(GlobalTooltipBottomSheet, {})] })),
16
16
  };
17
17
  export const WithCustomContent = {
18
- render: () => (_jsxs(_Fragment, { children: [_jsx(View, { className: 'flex min-h-400 items-center justify-center p-24', children: _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx(Button, { children: "Press me" }) }), _jsx(TooltipContent, { title: 'My tooltip title', content: _jsxs(View, { className: 'flex items-start gap-12', children: [_jsx(Text, { className: 'text-muted', children: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat." }), _jsx(Button, { size: 'xs', appearance: 'accent', children: "Custom tooltip action" })] }) })] }) }), _jsx(GlobalTooltipBottomSheet, {})] })),
18
+ render: () => (_jsxs(_Fragment, { children: [_jsx(View, { className: 'flex min-h-400 items-center justify-center p-24', children: _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx(Button, { children: "Press me" }) }), _jsx(TooltipContent, { title: 'My tooltip title', content: _jsxs(View, { className: 'flex items-start gap-12', children: [_jsx(Text, { className: 'text-muted', children: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat." }), _jsx(Button, { size: 'sm', appearance: 'accent', children: "Custom tooltip action" })] }) })] }) }), _jsx(GlobalTooltipBottomSheet, {})] })),
19
19
  };
20
20
  export const WithMultipleTooltips = {
21
- render: () => (_jsxs(_Fragment, { children: [_jsxs(View, { className: 'flex min-h-400 flex-row items-center justify-center gap-16 p-24', children: [_jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx(Button, { children: "Tooltip 1" }) }), _jsx(TooltipContent, { title: 'First', content: _jsx(Text, { children: "First tooltip content" }) })] }), _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx(Button, { children: "Tooltip 2" }) }), _jsx(TooltipContent, { title: 'Second', content: _jsx(Text, { children: "Second tooltip content" }) })] }), _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx(InteractiveIcon, { iconType: 'filled', "aria-label": 'Info', children: _jsx(Information, {}) }) }), _jsx(TooltipContent, { title: 'Third', content: _jsx(Text, { children: "Third tooltip content" }) })] })] }), _jsx(GlobalTooltipBottomSheet, {})] })),
21
+ render: () => (_jsxs(_Fragment, { children: [_jsxs(View, { className: 'flex min-h-400 flex-row items-center justify-center gap-16 p-24', children: [_jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx(Button, { children: "Tooltip 1" }) }), _jsx(TooltipContent, { title: 'First', content: _jsx(Text, { children: "First tooltip content" }) })] }), _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx(Button, { children: "Tooltip 2" }) }), _jsx(TooltipContent, { title: 'Second', content: _jsx(Text, { children: "Second tooltip content" }) })] }), _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx(InteractiveIcon, { iconType: 'filled', accessibilityLabel: 'Info', children: _jsx(Information, {}) }) }), _jsx(TooltipContent, { title: 'Third', content: _jsx(Text, { children: "Third tooltip content" }) })] })] }), _jsx(GlobalTooltipBottomSheet, {})] })),
22
22
  };
23
23
  export const WithChangeCallback = {
24
24
  render: () => {
@@ -0,0 +1,39 @@
1
+ import { View } from 'react-native';
2
+ import { type StyledViewProps } from '../../../../styles';
3
+ /**
4
+ * Box - A layout primitive component with token-constrained style props.
5
+ *
6
+ * Box is a View wrapper that accepts design token-based style props directly,
7
+ * providing type-safe styling with autocomplete for spacing, sizes, colors, etc.
8
+ *
9
+ * @see {@link https://ldls.vercel.app/?path=/docs/layout-box--docs Storybook}
10
+ *
11
+ * @example
12
+ * ```tsx
13
+ * import { Box } from '@ledgerhq/lumen-ui-rnative';
14
+ *
15
+ * // Basic usage with token props
16
+ * <Box lx={{ width: 's400', marginTop: 's4', gap: 's12', alignItems: 'center' }}>
17
+ * <Text>Content</Text>
18
+ * </Box>
19
+ *
20
+ * // With background and border
21
+ * <Box
22
+ * lx={{
23
+ * padding: 's16',
24
+ * backgroundColor: 'surface',
25
+ * borderRadius: 'md',
26
+ * borderColor: 'muted',
27
+ * borderWidth: 1
28
+ * }}
29
+ * >
30
+ * <Text>Card content</Text>
31
+ * </Box>
32
+ *
33
+ * // style prop for complete override
34
+ * <Box lx={{ marginTop: 's4' }} style={{ width: 127 }} />
35
+ * ```
36
+ */
37
+ export declare const Box: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<import("../../../../styles").LumenViewStyleLX & import("react-native").ViewProps & import("react").RefAttributes<View>>>;
38
+ export type BoxProps = StyledViewProps;
39
+ //# sourceMappingURL=Box.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Box.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/Utility/Box/Box.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAoB,KAAK,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE5E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,eAAO,MAAM,GAAG,wMAAyB,CAAC;AAE1C,MAAM,MAAM,QAAQ,GAAG,eAAe,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { View } from 'react-native';
2
- import { createStyledView } from '../../../styles';
2
+ import { createStyledView } from '../../../../styles';
3
3
  /**
4
4
  * Box - A layout primitive component with token-constrained style props.
5
5
  *
@@ -13,26 +13,25 @@ import { createStyledView } from '../../../styles';
13
13
  * import { Box } from '@ledgerhq/lumen-ui-rnative';
14
14
  *
15
15
  * // Basic usage with token props
16
- * <Box width='s400' marginTop='s4' gap='s12' alignItems='center'>
16
+ * <Box lx={{ width: 's400', marginTop: 's4', gap: 's12', alignItems: 'center' }}>
17
17
  * <Text>Content</Text>
18
18
  * </Box>
19
19
  *
20
20
  * // With background and border
21
21
  * <Box
22
- * padding='s16'
23
- * backgroundColor='surface'
24
- * borderRadius='md'
25
- * borderColor='muted'
26
- * borderWidth={1}
22
+ * lx={{
23
+ * padding: 's16',
24
+ * backgroundColor: 'surface',
25
+ * borderRadius: 'md',
26
+ * borderColor: 'muted',
27
+ * borderWidth: 1
28
+ * }}
27
29
  * >
28
30
  * <Text>Card content</Text>
29
31
  * </Box>
30
32
  *
31
- * // Raw numbers allowed as escape hatch
32
- * <Box width={127} marginTop='s4' />
33
- *
34
33
  * // style prop for complete override
35
- * <Box marginTop='s4' style={{ width: 127 }} />
34
+ * <Box lx={{ marginTop: 's4' }} style={{ width: 127 }} />
36
35
  * ```
37
36
  */
38
37
  export const Box = createStyledView(View);
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Box.stories.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/Utility/Box/Box.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAE5B,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,GAAG,CAY1B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,GAAG,CAAC,CAAC;AAElC,eAAO,MAAM,IAAI,EAAE,KA0BlB,CAAC"}
@@ -1,4 +1,3 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
1
  import { Box } from './Box';
3
2
  const meta = {
4
3
  component: Box,
@@ -16,23 +15,25 @@ const meta = {
16
15
  export default meta;
17
16
  export const Base = {
18
17
  args: {
19
- height: 's48',
20
- width: 's48',
21
- backgroundColor: 'accent',
22
- borderRadius: 'md',
23
- alignSelf: 'center',
18
+ lx: {
19
+ height: 's48',
20
+ width: 's48',
21
+ backgroundColor: 'accent',
22
+ borderRadius: 'md',
23
+ },
24
24
  },
25
- render: (args) => _jsx(Box, { ...args }),
26
25
  parameters: {
27
26
  docs: {
28
27
  source: {
29
28
  code: `
30
29
  <Box
31
- height='s48'
32
- width='s48'
33
- backgroundColor='accent'
34
- borderRadius='md'
35
- alignSelf='center'
30
+ lx={{
31
+ height: 's48',
32
+ width: 's48',
33
+ backgroundColor: 'accent',
34
+ borderRadius: 'md',
35
+ alignSelf: 'center',
36
+ }}
36
37
  />
37
38
  `,
38
39
  },
@@ -0,0 +1,2 @@
1
+ export * from './Box';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/Utility/Box/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC"}
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Pressable - An interactive layout primitive with token-constrained style props.
3
+ *
4
+ * Pressable is a wrapper around React Native's Pressable that accepts design
5
+ * token-based style props directly, providing type-safe styling with autocomplete
6
+ * for spacing, sizes, colors, etc. Use the `style` prop for pressed-state styling.
7
+ *
8
+ * @see {@link https://ldls.vercel.app/?path=/docs/utility-pressable--docs Storybook}
9
+ *
10
+ * @example
11
+ * ```tsx
12
+ * import { Pressable } from '@ledgerhq/lumen-ui-rnative';
13
+ *
14
+ * // Basic usage with token props
15
+ * <Pressable
16
+ * lx={{ width: 's400', marginTop: 's4', gap: 's12', alignItems: 'center' }}
17
+ * onPress={handlePress}
18
+ * >
19
+ * <Text>Content</Text>
20
+ * </Pressable>
21
+ *
22
+ * // With function-based style for pressed state
23
+ * <Pressable
24
+ * lx={{ padding: 's16', backgroundColor: 'surface' }}
25
+ * style={({ pressed }) => ({ opacity: pressed ? 0.8 : 1 })}
26
+ * >
27
+ * <Text>Press me</Text>
28
+ * </Pressable>
29
+ * ```
30
+ */
31
+ export declare const Pressable: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<import("../../../../styles").LumenPressableStyleLX & Omit<import("react-native").PressableProps, "style"> & {
32
+ style?: import("react-native").ViewStyle | ((state: import("react-native").PressableStateCallbackType) => import("react-native").ViewStyle) | (import("react-native").ViewStyle | ((state: import("react-native").PressableStateCallbackType) => import("react-native").ViewStyle) | (import("react-native").ViewStyle | ((state: import("react-native").PressableStateCallbackType) => import("react-native").ViewStyle) | (import("react-native").ViewStyle | ((state: import("react-native").PressableStateCallbackType) => import("react-native").ViewStyle) | (import("react-native").ViewStyle | ((state: import("react-native").PressableStateCallbackType) => import("react-native").ViewStyle) | (import("react-native").ViewStyle | ((state: import("react-native").PressableStateCallbackType) => import("react-native").ViewStyle) | (import("react-native").ViewStyle | ((state: import("react-native").PressableStateCallbackType) => import("react-native").ViewStyle) | (import("react-native").ViewStyle | ((state: import("react-native").PressableStateCallbackType) => import("react-native").ViewStyle) | (import("react-native").ViewStyle | ((state: import("react-native").PressableStateCallbackType) => import("react-native").ViewStyle) | (import("react-native").ViewStyle | ((state: import("react-native").PressableStateCallbackType) => import("react-native").ViewStyle) | (import("react-native").ViewStyle | ((state: import("react-native").PressableStateCallbackType) => import("react-native").ViewStyle) | (import("react-native").ViewStyle | ((state: import("react-native").PressableStateCallbackType) => import("react-native").ViewStyle) | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
33
+ } & import("react").RefAttributes<import("react-native").View>>>;
34
+ //# sourceMappingURL=Pressable.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Pressable.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/Utility/Pressable/Pressable.tsx"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,eAAO,MAAM,SAAS;;gEAAqC,CAAC"}
@@ -0,0 +1,33 @@
1
+ import { Pressable as RNPressable } from 'react-native';
2
+ import { createStyledPressable } from '../../../../styles';
3
+ /**
4
+ * Pressable - An interactive layout primitive with token-constrained style props.
5
+ *
6
+ * Pressable is a wrapper around React Native's Pressable that accepts design
7
+ * token-based style props directly, providing type-safe styling with autocomplete
8
+ * for spacing, sizes, colors, etc. Use the `style` prop for pressed-state styling.
9
+ *
10
+ * @see {@link https://ldls.vercel.app/?path=/docs/utility-pressable--docs Storybook}
11
+ *
12
+ * @example
13
+ * ```tsx
14
+ * import { Pressable } from '@ledgerhq/lumen-ui-rnative';
15
+ *
16
+ * // Basic usage with token props
17
+ * <Pressable
18
+ * lx={{ width: 's400', marginTop: 's4', gap: 's12', alignItems: 'center' }}
19
+ * onPress={handlePress}
20
+ * >
21
+ * <Text>Content</Text>
22
+ * </Pressable>
23
+ *
24
+ * // With function-based style for pressed state
25
+ * <Pressable
26
+ * lx={{ padding: 's16', backgroundColor: 'surface' }}
27
+ * style={({ pressed }) => ({ opacity: pressed ? 0.8 : 1 })}
28
+ * >
29
+ * <Text>Press me</Text>
30
+ * </Pressable>
31
+ * ```
32
+ */
33
+ export const Pressable = createStyledPressable(RNPressable);
@@ -0,0 +1,7 @@
1
+ import type { Meta, StoryObj } from '@storybook/react-native-web-vite';
2
+ import { Pressable } from './Pressable';
3
+ declare const meta: Meta<typeof Pressable>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof Pressable>;
6
+ export declare const Base: Story;
7
+ //# sourceMappingURL=Pressable.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Pressable.stories.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/Utility/Pressable/Pressable.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,SAAS,CAYhC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,SAAS,CAAC,CAAC;AAExC,eAAO,MAAM,IAAI,EAAE,KA8BlB,CAAC"}
@@ -0,0 +1,47 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Pressable } from './Pressable';
3
+ const meta = {
4
+ component: Pressable,
5
+ title: 'Utility/Pressable',
6
+ parameters: {
7
+ docs: {
8
+ source: {
9
+ language: 'tsx',
10
+ format: true,
11
+ type: 'code',
12
+ },
13
+ },
14
+ },
15
+ };
16
+ export default meta;
17
+ export const Base = {
18
+ args: {
19
+ lx: {
20
+ height: 's48',
21
+ width: 's48',
22
+ backgroundColor: 'accent',
23
+ borderRadius: 'md',
24
+ alignSelf: 'center',
25
+ },
26
+ style: ({ pressed }) => ({ opacity: pressed ? 0.5 : 1 }),
27
+ },
28
+ render: (args) => _jsx(Pressable, { ...args }),
29
+ parameters: {
30
+ docs: {
31
+ source: {
32
+ code: `
33
+ <Pressable
34
+ style={({ pressed }) => ({ opacity: pressed ? 0.5 : 1 })}
35
+ lx={{
36
+ height: 's48',
37
+ width: 's48',
38
+ backgroundColor: 'accent',
39
+ borderRadius: 'md',
40
+ alignSelf: 'center',
41
+ }}
42
+ />
43
+ `,
44
+ },
45
+ },
46
+ },
47
+ };
@@ -0,0 +1,3 @@
1
+ export * from './Pressable';
2
+ export type { PressableProps } from './types';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/Utility/Pressable/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,YAAY,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC"}
@@ -0,0 +1 @@
1
+ export * from './Pressable';
@@ -0,0 +1,3 @@
1
+ import { StyledPressableProps } from '../../../../styles';
2
+ export type PressableProps = StyledPressableProps;
3
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/Utility/Pressable/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,MAAM,MAAM,cAAc,GAAG,oBAAoB,CAAC"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,40 @@
1
+ import { Text as RNText } from 'react-native';
2
+ import { type StyledTextProps } from '../../../../styles';
3
+ /**
4
+ * Text - A typography component with typography support and token-constrained style props.
5
+ *
6
+ * Text is a wrapper around React Native's Text that accepts a `typography` prop for
7
+ * typography presets, plus design token-based style props for colors, spacing, etc.
8
+ *
9
+ * @see {@link https://ldls.vercel.app/?path=/docs/typography-text--docs Storybook}
10
+ *
11
+ * @example
12
+ * ```tsx
13
+ * import { Text } from '@ledgerhq/lumen-ui-rnative';
14
+ *
15
+ * // Basic usage with typography typography
16
+ * <Text typography='body1'>Hello World</Text>
17
+ *
18
+ * // With custom color
19
+ * <Text typography='heading2SemiBold' lx={{ color: 'muted' }}>
20
+ * Subtitle
21
+ * </Text>
22
+ *
23
+ * // With spacing
24
+ * <Text typography='body2' lx={{ marginTop: 's8', color: 'base' }}>
25
+ * Description text
26
+ * </Text>
27
+ *
28
+ * // Style prop for complete override
29
+ * <Text
30
+ * typography='body1'
31
+ * lx={{ marginTop: 's8' }}
32
+ * style={{ letterSpacing: 127 }}
33
+ * />
34
+ * ```
35
+ */
36
+ export declare const Text: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<import("../../../../styles").LumenTextStyleLX & import("react-native").TextProps & {
37
+ typography?: keyof import("../../../../styles").LumenStyleSheetTheme["typographies"];
38
+ } & import("react").RefAttributes<RNText>>>;
39
+ export type TextProps = StyledTextProps;
40
+ //# sourceMappingURL=Text.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/Utility/Text/Text.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,IAAI,MAAM,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAoB,KAAK,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE5E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,eAAO,MAAM,IAAI;uBArBV,iEAAqC;2CAqBA,CAAC;AAE7C,MAAM,MAAM,SAAS,GAAG,eAAe,CAAC"}
@@ -1,9 +1,9 @@
1
1
  import { Text as RNText } from 'react-native';
2
- import { createStyledText } from '../../../styles';
2
+ import { createStyledText } from '../../../../styles';
3
3
  /**
4
- * Text - A typography component with typo support and token-constrained style props.
4
+ * Text - A typography component with typography support and token-constrained style props.
5
5
  *
6
- * Text is a wrapper around React Native's Text that accepts a `typo` prop for
6
+ * Text is a wrapper around React Native's Text that accepts a `typography` prop for
7
7
  * typography presets, plus design token-based style props for colors, spacing, etc.
8
8
  *
9
9
  * @see {@link https://ldls.vercel.app/?path=/docs/typography-text--docs Storybook}
@@ -12,21 +12,25 @@ import { createStyledText } from '../../../styles';
12
12
  * ```tsx
13
13
  * import { Text } from '@ledgerhq/lumen-ui-rnative';
14
14
  *
15
- * // Basic usage with typography typo
16
- * <Text typo='body1'>Hello World</Text>
15
+ * // Basic usage with typography typography
16
+ * <Text typography='body1'>Hello World</Text>
17
17
  *
18
18
  * // With custom color
19
- * <Text typo='heading2SemiBold' color='muted'>
19
+ * <Text typography='heading2SemiBold' lx={{ color: 'muted' }}>
20
20
  * Subtitle
21
21
  * </Text>
22
22
  *
23
23
  * // With spacing
24
- * <Text typo='body2' marginTop='s8' color='base'>
24
+ * <Text typography='body2' lx={{ marginTop: 's8', color: 'base' }}>
25
25
  * Description text
26
26
  * </Text>
27
27
  *
28
- * // style prop for complete override
29
- * <Text typo='body1' style={{ letterSpacing: 127 }} />
28
+ * // Style prop for complete override
29
+ * <Text
30
+ * typography='body1'
31
+ * lx={{ marginTop: 's8' }}
32
+ * style={{ letterSpacing: 127 }}
33
+ * />
30
34
  * ```
31
35
  */
32
36
  export const Text = createStyledText(RNText);
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Text.stories.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/Utility/Text/Text.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,IAAI,CAY3B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,IAAI,EAAE,KAiBlB,CAAC"}
@@ -15,15 +15,15 @@ const meta = {
15
15
  export default meta;
16
16
  export const Base = {
17
17
  args: {
18
- typo: 'body1',
19
- color: 'base',
18
+ typography: 'body1',
19
+ lx: { color: 'base' },
20
20
  children: 'Hello World',
21
21
  },
22
22
  parameters: {
23
23
  docs: {
24
24
  source: {
25
25
  code: `
26
- <Text typo='body1' color='base'>
26
+ <Text typography='body1' lx={{ color: 'base' }}>
27
27
  Hello World
28
28
  </Text>
29
29
  `,
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/Utility/Text/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,YAAY,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC"}
@@ -0,0 +1,4 @@
1
+ export * from './Pressable';
2
+ export * from './Box';
3
+ export * from './Text';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/Utility/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from './Pressable';
2
+ export * from './Box';
3
+ export * from './Text';
@@ -1,9 +1,7 @@
1
- export * from './_ToRemove/ToRemove';
2
1
  export * from './AddressInput';
3
2
  export * from './AmountInput';
4
3
  export * from './Banner';
5
4
  export * from './BottomSheet';
6
- export * from './Box';
7
5
  export * from './Button';
8
6
  export * from './CardButton';
9
7
  export * from './Checkbox';
@@ -16,7 +14,7 @@ export * from './Select';
16
14
  export * from './Spot';
17
15
  export * from './Switch';
18
16
  export * from './Tag';
19
- export * from './Text';
17
+ export * from './Utility';
20
18
  export * from './TextInput';
21
19
  export * from './ThemeProvider';
22
20
  export * from './Tile';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,OAAO,CAAC;AACtB,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC"}
@@ -1,9 +1,7 @@
1
- export * from './_ToRemove/ToRemove';
2
1
  export * from './AddressInput';
3
2
  export * from './AmountInput';
4
3
  export * from './Banner';
5
4
  export * from './BottomSheet';
6
- export * from './Box';
7
5
  export * from './Button';
8
6
  export * from './CardButton';
9
7
  export * from './Checkbox';
@@ -16,7 +14,7 @@ export * from './Select';
16
14
  export * from './Spot';
17
15
  export * from './Switch';
18
16
  export * from './Tag';
19
- export * from './Text';
17
+ export * from './Utility';
20
18
  export * from './TextInput';
21
19
  export * from './ThemeProvider';
22
20
  export * from './Tile';
@@ -1,7 +1,8 @@
1
- import { PropsWithChildren } from 'react';
2
- declare function _InjectStylesIntoChildren({ styles, children, }: PropsWithChildren<{
3
- styles: string;
4
- }>): string | number | boolean | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | Iterable<import("react").ReactNode> | null | undefined;
5
- export declare const InjectStylesIntoChildren: import("react").MemoExoticComponent<typeof _InjectStylesIntoChildren>;
1
+ import { PropsWithChildren, ReactElement } from 'react';
2
+ import { ImageStyle, TextStyle, ViewStyle } from 'react-native';
3
+ type StyleValue = ViewStyle | TextStyle | ImageStyle;
4
+ export declare const InjectStylesIntoChildren: import("react").MemoExoticComponent<({ style, children }: PropsWithChildren<{
5
+ style: StyleValue;
6
+ }>) => string | number | boolean | ReactElement<any, string | import("react").JSXElementConstructor<any>> | Iterable<import("react").ReactNode> | null | undefined>;
6
7
  export {};
7
8
  //# sourceMappingURL=InjectStylesIntoChildren.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"InjectStylesIntoChildren.d.ts","sourceRoot":"","sources":["../../../../../src/lib/utils/components/InjectStylesIntoChildren.tsx"],"names":[],"mappings":"AACA,OAAO,EAAsC,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAE9E,iBAAS,yBAAyB,CAAC,EACjC,MAAM,EACN,QAAQ,GACT,EAAE,iBAAiB,CAAC;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,+KAOvC;AAED,eAAO,MAAM,wBAAwB,uEAAkC,CAAC"}
1
+ {"version":3,"file":"InjectStylesIntoChildren.d.ts","sourceRoot":"","sources":["../../../../../src/lib/utils/components/InjectStylesIntoChildren.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,iBAAiB,EACjB,YAAY,EACb,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,UAAU,EAAa,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE3E,KAAK,UAAU,GAAG,SAAS,GAAG,SAAS,GAAG,UAAU,CAAC;AAIrD,eAAO,MAAM,wBAAwB,4DACb,iBAAiB,CAAC;IAAE,KAAK,EAAE,UAAU,CAAA;CAAE,CAAC,iKAS/D,CAAC"}
@@ -1,11 +1,11 @@
1
- import { cn } from '@ledgerhq/lumen-utils-shared';
2
- import { cloneElement, isValidElement, memo } from 'react';
3
- function _InjectStylesIntoChildren({ styles, children, }) {
1
+ import { cloneElement, isValidElement, memo, } from 'react';
2
+ export const InjectStylesIntoChildren = memo(({ style, children }) => {
4
3
  if (!isValidElement(children)) {
5
4
  return children;
6
5
  }
6
+ const childProps = children.props;
7
7
  return cloneElement(children, {
8
- className: cn(children.props.className, styles),
8
+ style: childProps.style ? [childProps.style, style] : style,
9
9
  });
10
- }
11
- export const InjectStylesIntoChildren = memo(_InjectStylesIntoChildren);
10
+ });
11
+ InjectStylesIntoChildren.displayName = 'InjectStylesIntoChildren';
@@ -15,7 +15,7 @@ declare class HybridLumenStyleSheet {
15
15
  absoluteFill: import("react-native").RegisteredStyle<NativeStyleSheet.AbsoluteFillStyle>;
16
16
  flatten: typeof NativeStyleSheet.flatten;
17
17
  compose: typeof NativeStyleSheet.compose;
18
- useCreate: <S extends import("./types").LumenStyleSheet>(styleCreator: import("./types").LumenStyleSheetExtended<S>) => S;
18
+ useCreate: <S extends import("./types").LumenStyleSheet>(styleCreator: import("./types").LumenStyleSheetExtended<S>, deps?: import("react").DependencyList) => S;
19
19
  useTheme: () => import("./Provider/LumenStyleSheetProvider").LumenStyleSheetContextValue;
20
20
  }
21
21
  export declare const LumenStyleSheet: HybridLumenStyleSheet;
@@ -1 +1 @@
1
- {"version":3,"file":"LumenStyleSheet.d.ts","sourceRoot":"","sources":["../../../src/styles/LumenStyleSheet.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,IAAI,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAC9D,OAAO,KAAK,EAAE,UAAU,IAAI,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAEvE,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAE/C,MAAM,MAAM,mBAAmB,GAAG;IAChC,kBAAkB,EAAE,OAAO,oBAAoB,CAAC,kBAAkB,CAAC;IACnE,YAAY,EAAE,OAAO,oBAAoB,CAAC,YAAY,CAAC;IACvD,OAAO,EAAE,OAAO,oBAAoB,CAAC,OAAO,CAAC;IAC7C,OAAO,EAAE,OAAO,oBAAoB,CAAC,OAAO,CAAC;IAC7C,SAAS,EAAE,OAAO,SAAS,CAAC;IAC5B,QAAQ,EAAE,OAAO,QAAQ,CAAC;CAC3B,CAAC;AAEF,cAAM,qBAAqB;IACzB,kBAAkB,qCAAuC;IACzD,YAAY,6EAAiC;IAC7C,OAAO,kCAA4B;IACnC,OAAO,kCAA4B;IACnC,SAAS,iHAAa;IACtB,QAAQ,iFAAY;CACrB;AAED,eAAO,MAAM,eAAe,uBAA8B,CAAC"}
1
+ {"version":3,"file":"LumenStyleSheet.d.ts","sourceRoot":"","sources":["../../../src/styles/LumenStyleSheet.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,IAAI,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAC9D,OAAO,KAAK,EAAE,UAAU,IAAI,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAEvE,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAE/C,MAAM,MAAM,mBAAmB,GAAG;IAChC,kBAAkB,EAAE,OAAO,oBAAoB,CAAC,kBAAkB,CAAC;IACnE,YAAY,EAAE,OAAO,oBAAoB,CAAC,YAAY,CAAC;IACvD,OAAO,EAAE,OAAO,oBAAoB,CAAC,OAAO,CAAC;IAC7C,OAAO,EAAE,OAAO,oBAAoB,CAAC,OAAO,CAAC;IAC7C,SAAS,EAAE,OAAO,SAAS,CAAC;IAC5B,QAAQ,EAAE,OAAO,QAAQ,CAAC;CAC3B,CAAC;AAEF,cAAM,qBAAqB;IACzB,kBAAkB,qCAAuC;IACzD,YAAY,6EAAiC;IAC7C,OAAO,kCAA4B;IACnC,OAAO,kCAA4B;IACnC,SAAS,wJAAa;IACtB,QAAQ,iFAAY;CACrB;AAED,eAAO,MAAM,eAAe,uBAA8B,CAAC"}
@@ -4,7 +4,6 @@ import { AddEntriesNegative } from '../types/utility.types';
4
4
  *
5
5
  */
6
6
  export declare const getNegativeSpacings: <Input extends LumenTheme["spacings"], Output = AddEntriesNegative<Input>>(spacings?: Input) => Output;
7
- /**
8
7
  /**
9
8
  * The theme object from design-core is not directly compatible with React Native's StyleSheet.
10
9
  *
@@ -1 +1 @@
1
- {"version":3,"file":"createStylesheetTheme.d.ts","sourceRoot":"","sources":["../../../../src/styles/Provider/createStylesheetTheme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAE5D;;GAEG;AACH,eAAO,MAAM,mBAAmB,GAC9B,KAAK,SAAS,UAAU,CAAC,UAAU,CAAC,EACpC,MAAM,GAAG,kBAAkB,CAAC,KAAK,CAAC,EAElC,WAAU,KAAmB,KAC5B,MAIF,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,qBAAqB,GAChC,OAAO,UAAU,KAChB,oBASF,CAAC"}
1
+ {"version":3,"file":"createStylesheetTheme.d.ts","sourceRoot":"","sources":["../../../../src/styles/Provider/createStylesheetTheme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAE5D;;GAEG;AACH,eAAO,MAAM,mBAAmB,GAC9B,KAAK,SAAS,UAAU,CAAC,UAAU,CAAC,EACpC,MAAM,GAAG,kBAAkB,CAAC,KAAK,CAAC,EAElC,WAAU,KAAmB,KAC5B,MAIF,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB,GAChC,OAAO,UAAU,KAChB,oBASF,CAAC"}
@@ -4,7 +4,6 @@
4
4
  export const getNegativeSpacings = (spacings = {}) => {
5
5
  return Object.fromEntries(Object.entries(spacings).map(([key, value]) => [`-${key}`, value * -1]));
6
6
  };
7
- /**
8
7
  /**
9
8
  * The theme object from design-core is not directly compatible with React Native's StyleSheet.
10
9
  *