@ledgerhq/lumen-ui-rnative 0.0.44 → 0.0.45

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (333) hide show
  1. package/.storybook/Decorator.tsx +78 -13
  2. package/.storybook/docs/getting-started/ThemeProvider.mdx +1 -1
  3. package/.storybook/docs/style-system/lx.mdx +144 -0
  4. package/.storybook/docs/style-system/useCreate.mdx +95 -0
  5. package/.storybook/docs/style-system/useTheme.mdx +52 -0
  6. package/.storybook/preview-head.html +2 -2
  7. package/.storybook/{preview.ts → preview.tsx} +6 -1
  8. package/dist/package.json +2 -3
  9. package/dist/src/lib/Components/AddressInput/AddressInput.js +1 -1
  10. package/dist/src/lib/Components/AddressInput/AddressInput.stories.d.ts +7 -1
  11. package/dist/src/lib/Components/AddressInput/AddressInput.stories.d.ts.map +1 -1
  12. package/dist/src/lib/Components/AddressInput/AddressInput.stories.js +98 -9
  13. package/dist/src/lib/Components/AmountInput/AmountInput.d.ts.map +1 -1
  14. package/dist/src/lib/Components/AmountInput/AmountInput.js +3 -3
  15. package/dist/src/lib/Components/AmountInput/AmountInput.stories.d.ts +10 -1
  16. package/dist/src/lib/Components/AmountInput/AmountInput.stories.d.ts.map +1 -1
  17. package/dist/src/lib/Components/AmountInput/AmountInput.stories.js +162 -9
  18. package/dist/src/lib/Components/BaseInput/BaseInput.d.ts.map +1 -1
  19. package/dist/src/lib/Components/BaseInput/BaseInput.js +2 -19
  20. package/dist/src/lib/Components/BottomSheet/BottomSheet.js +1 -1
  21. package/dist/src/lib/Components/BottomSheet/BottomSheet.stories.js +8 -8
  22. package/dist/src/lib/Components/Button/BaseButton.d.ts +3 -3
  23. package/dist/src/lib/Components/Button/BaseButton.d.ts.map +1 -1
  24. package/dist/src/lib/Components/Button/BaseButton.js +99 -119
  25. package/dist/src/lib/Components/Button/Button.d.ts +4 -26
  26. package/dist/src/lib/Components/Button/Button.d.ts.map +1 -1
  27. package/dist/src/lib/Components/Button/Button.js +2 -2
  28. package/dist/src/lib/Components/Button/Button.stories.d.ts +1 -1
  29. package/dist/src/lib/Components/Button/Button.stories.d.ts.map +1 -1
  30. package/dist/src/lib/Components/Button/Button.stories.js +25 -48
  31. package/dist/src/lib/Components/Button/index.d.ts +1 -1
  32. package/dist/src/lib/Components/Button/index.d.ts.map +1 -1
  33. package/dist/src/lib/Components/Button/index.js +1 -1
  34. package/dist/src/lib/Components/Button/{BaseButton.types.d.ts → types.d.ts} +15 -10
  35. package/dist/src/lib/Components/Button/types.d.ts.map +1 -0
  36. package/dist/src/lib/Components/CardButton/CardButton.d.ts +4 -3
  37. package/dist/src/lib/Components/CardButton/CardButton.d.ts.map +1 -1
  38. package/dist/src/lib/Components/CardButton/CardButton.js +65 -71
  39. package/dist/src/lib/Components/CardButton/CardButton.stories.d.ts.map +1 -1
  40. package/dist/src/lib/Components/CardButton/CardButton.stories.js +28 -15
  41. package/dist/src/lib/Components/CardButton/index.d.ts +1 -1
  42. package/dist/src/lib/Components/CardButton/index.d.ts.map +1 -1
  43. package/dist/src/lib/Components/CardButton/index.js +1 -1
  44. package/dist/src/lib/Components/CardButton/{CardButton.types.d.ts → types.d.ts} +5 -4
  45. package/dist/src/lib/Components/CardButton/types.d.ts.map +1 -0
  46. package/dist/src/lib/Components/Icon/Icon.d.ts +6 -3
  47. package/dist/src/lib/Components/Icon/Icon.d.ts.map +1 -1
  48. package/dist/src/lib/Components/Icon/Icon.js +24 -25
  49. package/dist/src/lib/Components/Icon/Icon.stories.d.ts +2 -2
  50. package/dist/src/lib/Components/Icon/Icon.stories.d.ts.map +1 -1
  51. package/dist/src/lib/Components/Icon/Icon.stories.js +73 -19
  52. package/dist/src/lib/Components/Icon/createIcon.d.ts +1 -1
  53. package/dist/src/lib/Components/Icon/createIcon.d.ts.map +1 -1
  54. package/dist/src/lib/Components/Icon/createIcon.js +1 -2
  55. package/dist/src/lib/Components/Icon/index.d.ts +1 -1
  56. package/dist/src/lib/Components/Icon/index.d.ts.map +1 -1
  57. package/dist/src/lib/Components/Icon/index.js +1 -1
  58. package/dist/src/lib/Components/Icon/{Icon.types.d.ts → types.d.ts} +7 -4
  59. package/dist/src/lib/Components/Icon/types.d.ts.map +1 -0
  60. package/dist/src/lib/Components/IconButton/IconButton.d.ts +2 -19
  61. package/dist/src/lib/Components/IconButton/IconButton.d.ts.map +1 -1
  62. package/dist/src/lib/Components/IconButton/IconButton.stories.d.ts.map +1 -1
  63. package/dist/src/lib/Components/IconButton/IconButton.stories.js +9 -11
  64. package/dist/src/lib/Components/IconButton/index.d.ts +1 -0
  65. package/dist/src/lib/Components/IconButton/index.d.ts.map +1 -1
  66. package/dist/src/lib/Components/IconButton/index.js +1 -0
  67. package/dist/src/lib/Components/IconButton/types.d.ts +12 -0
  68. package/dist/src/lib/Components/IconButton/types.d.ts.map +1 -0
  69. package/dist/src/lib/Components/InteractiveIcon/InteractiveIcon.d.ts +2 -2
  70. package/dist/src/lib/Components/InteractiveIcon/InteractiveIcon.d.ts.map +1 -1
  71. package/dist/src/lib/Components/InteractiveIcon/InteractiveIcon.figma.js +1 -1
  72. package/dist/src/lib/Components/InteractiveIcon/InteractiveIcon.js +34 -34
  73. package/dist/src/lib/Components/InteractiveIcon/InteractiveIcon.stories.d.ts +1 -1
  74. package/dist/src/lib/Components/InteractiveIcon/InteractiveIcon.stories.d.ts.map +1 -1
  75. package/dist/src/lib/Components/InteractiveIcon/InteractiveIcon.stories.js +22 -9
  76. package/dist/src/lib/Components/InteractiveIcon/types.d.ts +3 -7
  77. package/dist/src/lib/Components/InteractiveIcon/types.d.ts.map +1 -1
  78. package/dist/src/lib/Components/Link/Link.d.ts +7 -77
  79. package/dist/src/lib/Components/Link/Link.d.ts.map +1 -1
  80. package/dist/src/lib/Components/Link/Link.js +59 -75
  81. package/dist/src/lib/Components/Link/Link.stories.d.ts.map +1 -1
  82. package/dist/src/lib/Components/Link/Link.stories.js +34 -11
  83. package/dist/src/lib/Components/Link/index.d.ts +1 -0
  84. package/dist/src/lib/Components/Link/index.d.ts.map +1 -1
  85. package/dist/src/lib/Components/Link/index.js +1 -0
  86. package/dist/src/lib/Components/Link/types.d.ts +43 -0
  87. package/dist/src/lib/Components/Link/types.d.ts.map +1 -0
  88. package/dist/src/lib/Components/Link/types.js +1 -0
  89. package/dist/src/lib/Components/Search/Search.stories.d.ts +6 -1
  90. package/dist/src/lib/Components/Search/Search.stories.d.ts.map +1 -1
  91. package/dist/src/lib/Components/Search/Search.stories.js +71 -9
  92. package/dist/src/lib/Components/Select/Select.d.ts.map +1 -1
  93. package/dist/src/lib/Components/Select/Select.js +1 -17
  94. package/dist/src/lib/Components/Spinner/Spinner.d.ts +13 -16
  95. package/dist/src/lib/Components/Spinner/Spinner.d.ts.map +1 -1
  96. package/dist/src/lib/Components/Spinner/Spinner.js +33 -5
  97. package/dist/src/lib/Components/Spinner/Spinner.stories.d.ts.map +1 -1
  98. package/dist/src/lib/Components/Spinner/Spinner.stories.js +1 -1
  99. package/dist/src/lib/Components/Spinner/index.d.ts +1 -0
  100. package/dist/src/lib/Components/Spinner/index.d.ts.map +1 -1
  101. package/dist/src/lib/Components/Spinner/index.js +1 -0
  102. package/dist/src/lib/Components/Spinner/types.d.ts +15 -0
  103. package/dist/src/lib/Components/Spinner/types.d.ts.map +1 -0
  104. package/dist/src/lib/Components/Spinner/types.js +1 -0
  105. package/dist/src/lib/Components/Tag/Tag.d.ts +2 -1
  106. package/dist/src/lib/Components/Tag/Tag.d.ts.map +1 -1
  107. package/dist/src/lib/Components/Tag/Tag.js +15 -4
  108. package/dist/src/lib/Components/Tag/Tag.stories.js +1 -1
  109. package/dist/src/lib/Components/Tag/Tag.types.d.ts +7 -1
  110. package/dist/src/lib/Components/Tag/Tag.types.d.ts.map +1 -1
  111. package/dist/src/lib/Components/TextInput/TextInput.stories.d.ts +8 -1
  112. package/dist/src/lib/Components/TextInput/TextInput.stories.d.ts.map +1 -1
  113. package/dist/src/lib/Components/TextInput/TextInput.stories.js +104 -9
  114. package/dist/src/lib/Components/Tile/Tile.js +2 -2
  115. package/dist/src/lib/Components/Tooltip/Tooltip.stories.js +2 -2
  116. package/dist/src/lib/Components/Utility/Box/Box.d.ts +39 -0
  117. package/dist/src/lib/Components/Utility/Box/Box.d.ts.map +1 -0
  118. package/dist/src/lib/Components/{Box → Utility/Box}/Box.js +10 -11
  119. package/dist/src/lib/Components/Utility/Box/Box.stories.d.ts.map +1 -0
  120. package/dist/src/lib/Components/{Box → Utility/Box}/Box.stories.js +13 -12
  121. package/dist/src/lib/Components/Utility/Box/index.d.ts +2 -0
  122. package/dist/src/lib/Components/Utility/Box/index.d.ts.map +1 -0
  123. package/dist/src/lib/Components/Utility/Pressable/Pressable.d.ts +34 -0
  124. package/dist/src/lib/Components/Utility/Pressable/Pressable.d.ts.map +1 -0
  125. package/dist/src/lib/Components/Utility/Pressable/Pressable.js +33 -0
  126. package/dist/src/lib/Components/Utility/Pressable/Pressable.stories.d.ts +7 -0
  127. package/dist/src/lib/Components/Utility/Pressable/Pressable.stories.d.ts.map +1 -0
  128. package/dist/src/lib/Components/Utility/Pressable/Pressable.stories.js +47 -0
  129. package/dist/src/lib/Components/Utility/Pressable/index.d.ts +3 -0
  130. package/dist/src/lib/Components/Utility/Pressable/index.d.ts.map +1 -0
  131. package/dist/src/lib/Components/Utility/Pressable/index.js +1 -0
  132. package/dist/src/lib/Components/Utility/Pressable/types.d.ts +3 -0
  133. package/dist/src/lib/Components/Utility/Pressable/types.d.ts.map +1 -0
  134. package/dist/src/lib/Components/Utility/Pressable/types.js +1 -0
  135. package/dist/src/lib/Components/Utility/Text/Text.d.ts +40 -0
  136. package/dist/src/lib/Components/Utility/Text/Text.d.ts.map +1 -0
  137. package/dist/src/lib/Components/{Text → Utility/Text}/Text.js +13 -9
  138. package/dist/src/lib/Components/Utility/Text/Text.stories.d.ts.map +1 -0
  139. package/dist/src/lib/Components/{Text → Utility/Text}/Text.stories.js +3 -3
  140. package/dist/src/lib/Components/Utility/Text/index.d.ts.map +1 -0
  141. package/dist/src/lib/Components/Utility/index.d.ts +4 -0
  142. package/dist/src/lib/Components/Utility/index.d.ts.map +1 -0
  143. package/dist/src/lib/Components/Utility/index.js +3 -0
  144. package/dist/src/lib/Components/index.d.ts +1 -3
  145. package/dist/src/lib/Components/index.d.ts.map +1 -1
  146. package/dist/src/lib/Components/index.js +1 -3
  147. package/dist/src/lib/utils/components/InjectStylesIntoChildren.d.ts +6 -5
  148. package/dist/src/lib/utils/components/InjectStylesIntoChildren.d.ts.map +1 -1
  149. package/dist/src/lib/utils/components/InjectStylesIntoChildren.js +6 -6
  150. package/dist/src/styles/LumenStyleSheet.d.ts +1 -1
  151. package/dist/src/styles/LumenStyleSheet.d.ts.map +1 -1
  152. package/dist/src/styles/Provider/createStylesheetTheme.d.ts +0 -1
  153. package/dist/src/styles/Provider/createStylesheetTheme.d.ts.map +1 -1
  154. package/dist/src/styles/Provider/createStylesheetTheme.js +0 -1
  155. package/dist/src/styles/create/useCreate.d.ts +2 -1
  156. package/dist/src/styles/create/useCreate.d.ts.map +1 -1
  157. package/dist/src/styles/create/useCreate.js +5 -5
  158. package/dist/src/styles/factories/areLxPropsEqual.d.ts +3 -0
  159. package/dist/src/styles/factories/areLxPropsEqual.d.ts.map +1 -0
  160. package/dist/src/styles/factories/areLxPropsEqual.js +15 -0
  161. package/dist/src/styles/factories/createStyledPressable.d.ts +26 -0
  162. package/dist/src/styles/factories/createStyledPressable.d.ts.map +1 -0
  163. package/dist/src/styles/factories/createStyledPressable.js +61 -0
  164. package/dist/src/styles/factories/createStyledText.d.ts +15 -26
  165. package/dist/src/styles/factories/createStyledText.d.ts.map +1 -1
  166. package/dist/src/styles/factories/createStyledText.js +13 -29
  167. package/dist/src/styles/factories/createStyledView.d.ts +7 -27
  168. package/dist/src/styles/factories/createStyledView.d.ts.map +1 -1
  169. package/dist/src/styles/factories/createStyledView.js +10 -30
  170. package/dist/src/styles/factories/index.d.ts +4 -0
  171. package/dist/src/styles/factories/index.d.ts.map +1 -0
  172. package/dist/src/styles/factories/index.js +3 -0
  173. package/dist/src/styles/index.d.ts +2 -3
  174. package/dist/src/styles/index.d.ts.map +1 -1
  175. package/dist/src/styles/index.js +2 -3
  176. package/dist/src/styles/resolveStyle/resolveConfig.d.ts +7 -7
  177. package/dist/src/styles/resolveStyle/resolveConfig.d.ts.map +1 -1
  178. package/dist/src/styles/resolveStyle/resolveConfig.js +9 -9
  179. package/dist/src/styles/resolveStyle/resolveStyle.d.ts +6 -20
  180. package/dist/src/styles/resolveStyle/resolveStyle.d.ts.map +1 -1
  181. package/dist/src/styles/resolveStyle/resolveStyle.js +4 -29
  182. package/dist/src/styles/types/create.types.d.ts +1 -1
  183. package/dist/src/styles/types/create.types.d.ts.map +1 -1
  184. package/dist/src/styles/types/styled.types.d.ts +72 -50
  185. package/dist/src/styles/types/styled.types.d.ts.map +1 -1
  186. package/dist/src/styles/types/utility.types.d.ts.map +1 -1
  187. package/dist/src/styles/utils/index.d.ts +2 -0
  188. package/dist/src/styles/utils/index.d.ts.map +1 -0
  189. package/dist/src/styles/utils/index.js +1 -0
  190. package/dist/src/styles/utils/mergeStyles.d.ts +16 -0
  191. package/dist/src/styles/utils/mergeStyles.d.ts.map +1 -0
  192. package/dist/src/styles/utils/mergeStyles.js +20 -0
  193. package/package.json +3 -4
  194. package/src/lib/Components/AddressInput/AddressInput.mdx +15 -4
  195. package/src/lib/Components/AddressInput/AddressInput.stories.tsx +133 -17
  196. package/src/lib/Components/AddressInput/AddressInput.tsx +1 -1
  197. package/src/lib/Components/AmountInput/AmountInput.mdx +20 -1
  198. package/src/lib/Components/AmountInput/AmountInput.stories.tsx +180 -17
  199. package/src/lib/Components/AmountInput/AmountInput.tsx +24 -15
  200. package/src/lib/Components/Banner/Banner.test.tsx +48 -15
  201. package/src/lib/Components/BaseInput/BaseInput.tsx +6 -35
  202. package/src/lib/Components/BottomSheet/BottomSheet.stories.tsx +8 -8
  203. package/src/lib/Components/BottomSheet/BottomSheet.tsx +1 -1
  204. package/src/lib/Components/Button/BaseButton.test.tsx +149 -0
  205. package/src/lib/Components/Button/BaseButton.tsx +193 -148
  206. package/src/lib/Components/Button/Button.mdx +34 -31
  207. package/src/lib/Components/Button/Button.stories.tsx +37 -58
  208. package/src/lib/Components/Button/Button.tsx +4 -11
  209. package/src/lib/Components/Button/index.ts +1 -1
  210. package/src/lib/Components/Button/{BaseButton.types.ts → types.ts} +14 -8
  211. package/src/lib/Components/CardButton/CardButton.mdx +15 -25
  212. package/src/lib/Components/CardButton/CardButton.stories.tsx +48 -22
  213. package/src/lib/Components/CardButton/CardButton.test.tsx +141 -0
  214. package/src/lib/Components/CardButton/CardButton.tsx +142 -108
  215. package/src/lib/Components/CardButton/index.ts +1 -1
  216. package/src/lib/Components/CardButton/{CardButton.types.ts → types.ts} +4 -3
  217. package/src/lib/Components/Checkbox/Checkbox.mdx +1 -1
  218. package/src/lib/Components/Checkbox/Checkbox.test.tsx +42 -17
  219. package/src/lib/Components/Icon/Icon.stories.tsx +143 -73
  220. package/src/lib/Components/Icon/Icon.test.tsx +84 -0
  221. package/src/lib/Components/Icon/Icon.tsx +32 -28
  222. package/src/lib/Components/Icon/createIcon.ts +2 -3
  223. package/src/lib/Components/Icon/index.ts +1 -1
  224. package/src/lib/Components/Icon/{Icon.types.ts → types.ts} +4 -3
  225. package/src/lib/Components/IconButton/IconButton.mdx +13 -10
  226. package/src/lib/Components/IconButton/IconButton.stories.tsx +12 -14
  227. package/src/lib/Components/IconButton/IconButton.test.tsx +141 -0
  228. package/src/lib/Components/IconButton/IconButton.tsx +3 -13
  229. package/src/lib/Components/IconButton/index.ts +1 -0
  230. package/src/lib/Components/IconButton/types.ts +12 -0
  231. package/src/lib/Components/InteractiveIcon/InteractiveIcon.figma.tsx +1 -1
  232. package/src/lib/Components/InteractiveIcon/InteractiveIcon.mdx +25 -27
  233. package/src/lib/Components/InteractiveIcon/InteractiveIcon.stories.tsx +82 -43
  234. package/src/lib/Components/InteractiveIcon/InteractiveIcon.test.tsx +30 -19
  235. package/src/lib/Components/InteractiveIcon/InteractiveIcon.tsx +78 -45
  236. package/src/lib/Components/InteractiveIcon/types.ts +4 -7
  237. package/src/lib/Components/Link/Link.mdx +8 -18
  238. package/src/lib/Components/Link/Link.stories.tsx +56 -25
  239. package/src/lib/Components/Link/Link.test.tsx +141 -51
  240. package/src/lib/Components/Link/Link.tsx +128 -150
  241. package/src/lib/Components/Link/index.ts +1 -0
  242. package/src/lib/Components/Link/types.ts +44 -0
  243. package/src/lib/Components/Search/Search.mdx +14 -1
  244. package/src/lib/Components/Search/Search.stories.tsx +94 -15
  245. package/src/lib/Components/Select/Select.test.tsx +8 -4
  246. package/src/lib/Components/Select/Select.tsx +4 -31
  247. package/src/lib/Components/Spinner/Spinner.stories.tsx +1 -5
  248. package/src/lib/Components/Spinner/Spinner.tsx +60 -34
  249. package/src/lib/Components/Spinner/index.ts +1 -0
  250. package/src/lib/Components/Spinner/types.ts +15 -0
  251. package/src/lib/Components/Switch/Switch.mdx +1 -1
  252. package/src/lib/Components/Tag/Tag.stories.tsx +2 -2
  253. package/src/lib/Components/Tag/Tag.tsx +22 -6
  254. package/src/lib/Components/Tag/Tag.types.ts +7 -8
  255. package/src/lib/Components/TextInput/TextInput.mdx +24 -4
  256. package/src/lib/Components/TextInput/TextInput.stories.tsx +131 -15
  257. package/src/lib/Components/Tile/Tile.test.tsx +100 -63
  258. package/src/lib/Components/Tile/Tile.tsx +2 -2
  259. package/src/lib/Components/Tooltip/Tooltip.stories.tsx +2 -2
  260. package/src/lib/Components/Tooltip/Tooltip.test.tsx +8 -4
  261. package/src/lib/Components/{Box → Utility/Box}/Box.mdx +15 -13
  262. package/src/lib/Components/{Box → Utility/Box}/Box.stories.tsx +13 -11
  263. package/src/lib/Components/{Box → Utility/Box}/Box.tsx +11 -12
  264. package/src/lib/Components/Utility/Box/index.ts +1 -0
  265. package/src/lib/Components/Utility/Pressable/Pressable.mdx +103 -0
  266. package/src/lib/Components/Utility/Pressable/Pressable.stories.tsx +51 -0
  267. package/src/lib/Components/Utility/Pressable/Pressable.test.tsx +221 -0
  268. package/src/lib/Components/Utility/Pressable/Pressable.tsx +34 -0
  269. package/src/lib/Components/Utility/Pressable/index.ts +2 -0
  270. package/src/lib/Components/Utility/Pressable/types.ts +3 -0
  271. package/src/lib/Components/{Text → Utility/Text}/Text.mdx +15 -7
  272. package/src/lib/Components/{Text → Utility/Text}/Text.stories.tsx +3 -3
  273. package/src/lib/Components/Utility/Text/Text.tsx +39 -0
  274. package/src/lib/Components/Utility/index.ts +3 -0
  275. package/src/lib/Components/index.ts +1 -3
  276. package/src/lib/utils/components/InjectStylesIntoChildren.tsx +23 -14
  277. package/src/styles/Provider/createStylesheetTheme.ts +0 -1
  278. package/src/styles/create/useCreate.ts +8 -4
  279. package/src/styles/factories/areLxPropsEqual.ts +32 -0
  280. package/src/styles/factories/createStyledPressable.test.tsx +253 -0
  281. package/src/styles/factories/createStyledPressable.tsx +97 -0
  282. package/src/styles/factories/createStyledText.test.tsx +28 -20
  283. package/src/styles/factories/createStyledText.tsx +29 -49
  284. package/src/styles/factories/createStyledView.test.tsx +22 -16
  285. package/src/styles/factories/createStyledView.tsx +19 -53
  286. package/src/styles/factories/index.ts +3 -0
  287. package/src/styles/index.ts +2 -3
  288. package/src/styles/resolveStyle/resolveConfig.ts +16 -15
  289. package/src/styles/resolveStyle/resolveStyle.test.ts +13 -141
  290. package/src/styles/resolveStyle/resolveStyle.ts +10 -60
  291. package/src/styles/types/create.types.ts +1 -1
  292. package/src/styles/types/styled.types.ts +73 -105
  293. package/src/styles/types/utility.types.ts +1 -0
  294. package/src/styles/utils/index.ts +1 -0
  295. package/src/styles/utils/mergeStyles.test.ts +45 -0
  296. package/src/styles/utils/mergeStyles.ts +25 -0
  297. package/.storybook/docs/getting-started/StyleSystem.mdx +0 -133
  298. package/dist/src/lib/Components/Box/Box.d.ts +0 -592
  299. package/dist/src/lib/Components/Box/Box.d.ts.map +0 -1
  300. package/dist/src/lib/Components/Box/Box.stories.d.ts.map +0 -1
  301. package/dist/src/lib/Components/Box/Box.types.d.ts +0 -3
  302. package/dist/src/lib/Components/Box/Box.types.d.ts.map +0 -1
  303. package/dist/src/lib/Components/Box/index.d.ts +0 -3
  304. package/dist/src/lib/Components/Box/index.d.ts.map +0 -1
  305. package/dist/src/lib/Components/Button/BaseButton.types.d.ts.map +0 -1
  306. package/dist/src/lib/Components/CardButton/CardButton.types.d.ts.map +0 -1
  307. package/dist/src/lib/Components/Icon/Icon.types.d.ts.map +0 -1
  308. package/dist/src/lib/Components/Text/Text.d.ts +0 -602
  309. package/dist/src/lib/Components/Text/Text.d.ts.map +0 -1
  310. package/dist/src/lib/Components/Text/Text.stories.d.ts.map +0 -1
  311. package/dist/src/lib/Components/Text/index.d.ts.map +0 -1
  312. package/dist/src/lib/Components/_ToRemove/ToRemove.d.ts +0 -9
  313. package/dist/src/lib/Components/_ToRemove/ToRemove.d.ts.map +0 -1
  314. package/dist/src/lib/Components/_ToRemove/ToRemove.js +0 -43
  315. package/dist/src/styles/utils/styleVarianceAuthority.d.ts +0 -30
  316. package/dist/src/styles/utils/styleVarianceAuthority.d.ts.map +0 -1
  317. package/dist/src/styles/utils/styleVarianceAuthority.js +0 -97
  318. package/src/lib/Components/Box/Box.types.ts +0 -3
  319. package/src/lib/Components/Box/index.ts +0 -2
  320. package/src/lib/Components/Text/Text.tsx +0 -35
  321. package/src/lib/Components/_ToRemove/ToRemove.tsx +0 -65
  322. package/src/styles/utils/styleVarianceAuthority.test.ts +0 -302
  323. package/src/styles/utils/styleVarianceAuthority.ts +0 -154
  324. /package/dist/src/lib/Components/{Box/Box.types.js → Button/types.js} +0 -0
  325. /package/dist/src/lib/Components/{Button/BaseButton.types.js → CardButton/types.js} +0 -0
  326. /package/dist/src/lib/Components/{CardButton/CardButton.types.js → Icon/types.js} +0 -0
  327. /package/dist/src/lib/Components/{Icon/Icon.types.js → IconButton/types.js} +0 -0
  328. /package/dist/src/lib/Components/{Box → Utility/Box}/Box.stories.d.ts +0 -0
  329. /package/dist/src/lib/Components/{Box → Utility/Box}/index.js +0 -0
  330. /package/dist/src/lib/Components/{Text → Utility/Text}/Text.stories.d.ts +0 -0
  331. /package/dist/src/lib/Components/{Text → Utility/Text}/index.d.ts +0 -0
  332. /package/dist/src/lib/Components/{Text → Utility/Text}/index.js +0 -0
  333. /package/src/lib/Components/{Text → Utility/Text}/index.ts +0 -0
@@ -1,7 +1,10 @@
1
1
  import { Svg } from 'react-native-svg';
2
+ import { IconSize } from './types';
2
3
  export declare const Icon: import("react").ForwardRefExoticComponent<{
3
- size?: import("./Icon.types").IconSize;
4
- className?: string;
4
+ size?: IconSize;
5
+ style?: import("react-native").StyleProp<import("react-native").ViewStyle & {
6
+ color?: string;
7
+ }>;
5
8
  children: React.ReactNode;
6
- } & import("react-native-svg").SvgProps & import("react").RefAttributes<Svg>>;
9
+ } & Omit<import("react-native-svg").SvgProps, "style"> & import("react").RefAttributes<Svg>>;
7
10
  //# sourceMappingURL=Icon.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/Icon/Icon.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAyBvC,eAAO,MAAM,IAAI;;;;6EAiBhB,CAAC"}
1
+ {"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/Icon/Icon.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAEvC,OAAO,EAAa,QAAQ,EAAE,MAAM,SAAS,CAAC;AAwB9C,eAAO,MAAM,IAAI;;;aAZD,CAAA;;;4FAiCf,CAAC"}
@@ -1,29 +1,28 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { cva } from 'class-variance-authority';
3
- import { cssInterop } from 'nativewind';
4
- import { forwardRef } from 'react';
2
+ import { forwardRef, useMemo } from 'react';
3
+ import { StyleSheet } from 'react-native';
5
4
  import { Svg } from 'react-native-svg';
6
- import { cn } from '../../utils';
7
- cssInterop(Svg, {
8
- className: 'style',
9
- });
10
- const iconVariants = cva('inline-block', {
11
- variants: {
12
- size: {
13
- 12: 'icon-w-12 icon-h-12 icon-stroke-12',
14
- 16: 'icon-w-16 icon-h-16 icon-stroke-16',
15
- 20: 'icon-w-20 icon-h-20 icon-stroke-20',
16
- 24: 'icon-w-24 icon-h-24 icon-stroke-24',
17
- 40: 'icon-w-40 icon-h-40 icon-stroke-40',
18
- 48: 'icon-w-48 icon-h-48 icon-stroke-48',
19
- 56: 'icon-w-56 icon-h-56 icon-stroke-56',
20
- },
21
- },
22
- defaultVariants: {
23
- size: 24,
24
- },
25
- });
26
- export const Icon = forwardRef(({ size = 24, className = '', children, viewBox, ...props }, ref) => {
27
- return (_jsx(Svg, { ref: ref, width: size, height: size, className: cn(className, iconVariants({ size }), 'inline-block'), viewBox: viewBox, fill: 'none', pointerEvents: 'none', ...props, children: children }));
5
+ import { LumenStyleSheet } from '../../../styles';
6
+ const iconSizeMap = {
7
+ 12: 's12',
8
+ 16: 's16',
9
+ 20: 's20',
10
+ 24: 's24',
11
+ 40: 's40',
12
+ 48: 's48',
13
+ 56: 's56',
14
+ };
15
+ const useStyles = (size) => {
16
+ const { theme } = LumenStyleSheet.useTheme();
17
+ return useMemo(() => ({
18
+ width: theme.icon.width[iconSizeMap[size]],
19
+ height: theme.icon.height[iconSizeMap[size]],
20
+ strokeWidth: theme.icon.borderWidth[iconSizeMap[size]],
21
+ }), [size, theme]);
22
+ };
23
+ export const Icon = forwardRef(({ size = 24, style, children, viewBox, ...props }, ref) => {
24
+ const styles = useStyles(size);
25
+ const flatStyle = StyleSheet.flatten(style);
26
+ return (_jsx(Svg, { ref: ref, width: styles.width, height: styles.height, strokeWidth: styles.strokeWidth, viewBox: viewBox, color: flatStyle?.color ?? 'currentColor', fill: 'none', pointerEvents: 'none', ...props, children: children }));
28
27
  });
29
28
  Icon.displayName = 'Icon';
@@ -1,13 +1,13 @@
1
1
  import type { Meta, StoryObj } from '@storybook/react-native-web-vite';
2
2
  import * as Icons from '../../Symbols';
3
- import { IconSize } from './Icon.types';
3
+ import type { IconSize } from './types';
4
4
  declare const meta: Meta;
5
5
  export default meta;
6
6
  type IconName = keyof typeof Icons;
7
7
  type IconStoryProps = {
8
8
  size: IconSize;
9
9
  name: IconName;
10
- className?: string;
10
+ color?: string;
11
11
  };
12
12
  export declare const Icon: StoryObj<IconStoryProps>;
13
13
  export declare const IconSizes: StoryObj;
@@ -1 +1 @@
1
- {"version":3,"file":"Icon.stories.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/Icon/Icon.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAEvE,OAAO,KAAK,KAAK,MAAM,eAAe,CAAC;AAEvC,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,QAAA,MAAM,IAAI,EAAE,IAEX,CAAC;AAEF,eAAe,IAAI,CAAC;AAIpB,KAAK,QAAQ,GAAG,MAAM,OAAO,KAAK,CAAC;AAGnC,KAAK,cAAc,GAAG;IACpB,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,EAAE,QAAQ,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AA2CF,eAAO,MAAM,IAAI,EAAE,QAAQ,CAAC,cAAc,CA0CzC,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,QAwBvB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,QAyDrB,CAAC"}
1
+ {"version":3,"file":"Icon.stories.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/Icon/Icon.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAIvE,OAAO,KAAK,KAAK,MAAM,eAAe,CAAC;AAGvC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAExC,QAAA,MAAM,IAAI,EAAE,IAEX,CAAC;AAEF,eAAe,IAAI,CAAC;AAIpB,KAAK,QAAQ,GAAG,MAAM,OAAO,KAAK,CAAC;AAGnC,KAAK,cAAc,GAAG;IACpB,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,EAAE,QAAQ,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAoEF,eAAO,MAAM,IAAI,EAAE,QAAQ,CAAC,cAAc,CA4CzC,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,QA0CvB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,QA+ErB,CAAC"}
@@ -1,16 +1,21 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
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';
7
+ import { Box, Text, Pressable } from '../Utility';
5
8
  const meta = {
6
9
  title: 'Symbols/Interface Icons',
7
10
  };
8
11
  export default meta;
9
12
  const sizes = [12, 16, 20, 24, 40, 48, 56];
10
13
  const iconNames = Object.keys(Icons);
11
- const IconCard = ({ name, size = 24, className = 'text-base', }) => {
14
+ const IconCard = ({ name, size = 24, color }) => {
15
+ const { theme } = LumenStyleSheet.useTheme();
12
16
  const [copied, setCopied] = useState(false);
13
17
  const IconComponent = Icons[name];
18
+ const iconColor = color ?? theme.colors.text.base;
14
19
  const handleClick = async () => {
15
20
  try {
16
21
  await navigator.clipboard.writeText(name);
@@ -21,13 +26,32 @@ const IconCard = ({ name, size = 24, className = 'text-base', }) => {
21
26
  console.error('Failed to copy:', err);
22
27
  }
23
28
  };
24
- return (_jsxs("div", { className: 'relative flex cursor-pointer flex-col items-center gap-2 rounded-lg p-4 transition-colors hover:bg-muted-pressed', onClick: handleClick, children: [_jsx(IconComponent, { size: size, className: className }), _jsx("span", { className: 'text-muted body-4', children: name }), copied && (_jsx("div", { className: 'absolute inset-0 flex items-center justify-center rounded-lg bg-muted', children: _jsx("span", { className: 'text-on-accent body-4', children: "Copied!" }) }))] }, name));
29
+ return (_jsxs(Pressable, { onPress: handleClick, lx: {
30
+ position: 'relative',
31
+ flexDirection: 'column',
32
+ alignItems: 'center',
33
+ gap: 's8',
34
+ borderRadius: 'sm',
35
+ padding: 's16',
36
+ width: 's144',
37
+ }, style: ({ pressed }) => ({
38
+ backgroundColor: pressed ? theme.colors.bg.mutedPressed : 'transparent',
39
+ }), children: [_jsx(IconComponent, { size: size, style: { color: iconColor } }), _jsx(Text, { typography: 'body4', lx: { color: 'muted' }, children: name }), copied && (_jsx(View, { style: {
40
+ position: 'absolute',
41
+ top: 0,
42
+ left: 0,
43
+ right: 0,
44
+ bottom: 0,
45
+ alignItems: 'center',
46
+ justifyContent: 'center',
47
+ borderRadius: theme.borderRadius.sm,
48
+ backgroundColor: theme.colors.bg.muted,
49
+ }, children: _jsx(Text, { typography: 'body4', lx: { color: 'onAccent' }, children: "Copied!" }) }))] }, name));
25
50
  };
26
51
  export const Icon = {
27
52
  args: {
28
53
  size: 24,
29
54
  name: 'Home',
30
- className: 'text-base',
31
55
  },
32
56
  argTypes: {
33
57
  size: {
@@ -40,45 +64,75 @@ export const Icon = {
40
64
  options: iconNames,
41
65
  description: 'The name of the icon to display',
42
66
  },
43
- className: {
44
- control: 'text',
45
- description: 'Additional CSS classes to apply (can be used for color)',
67
+ color: {
68
+ control: 'color',
69
+ description: 'The color of the icon',
46
70
  },
47
71
  },
48
72
  render: (args) => {
73
+ const { theme } = LumenStyleSheet.useTheme();
49
74
  const IconComponent = Icons[args.name];
50
- return (_jsx("div", { className: 'p-8', children: _jsxs("div", { className: 'flex flex-col items-center gap-4', children: [_jsx(IconComponent, { size: args.size, className: args.className }), _jsx("span", { className: 'text-base', children: args.name })] }) }));
75
+ const iconColor = args.color ?? theme.colors.text.base;
76
+ return (_jsx(Box, { lx: { padding: 's8' }, children: _jsxs(Box, { lx: { flexDirection: 'column', alignItems: 'center', gap: 's4' }, children: [_jsx(IconComponent, { size: args.size, style: { color: iconColor } }), _jsx(Text, { lx: { color: 'base' }, children: args.name })] }) }));
51
77
  },
52
78
  parameters: {
53
79
  docs: {
54
80
  source: {
55
81
  code: `
56
- <Information size={24} className="text-base" />
82
+ <Information size={24} style={{ color: theme.colors.text.base }} />
57
83
  `,
58
84
  },
59
85
  },
60
86
  },
61
87
  };
62
88
  export const IconSizes = {
63
- render: () => (_jsx("div", { className: 'space-y-16 text-base', children: sizes.map((size) => (_jsxs("div", { children: [_jsxs("h3", { className: 'mb-16 heading-3', children: ["Size ", size, "px"] }), _jsx("div", { className: 'flex max-w-fit flex-wrap gap-16 rounded-lg border border-muted-subtle p-16', children: [
64
- 'Home',
65
- 'Settings',
66
- 'Heart',
67
- 'Star',
68
- 'ArrowDown',
69
- 'ArrowLeft',
70
- 'ArrowRight',
71
- 'ArrowUp',
72
- ].map((iconName) => (_jsx(IconCard, { name: iconName, size: size }, iconName))) })] }, size))) })),
89
+ render: () => {
90
+ const { theme } = LumenStyleSheet.useTheme();
91
+ return (_jsx(Box, { lx: { flexDirection: 'column', gap: 's16' }, children: sizes.map((size) => (_jsxs(Box, { lx: { flexDirection: 'column' }, children: [_jsxs(Text, { typography: 'heading3', lx: { marginBottom: 's16' }, children: ["Size ", size, "px"] }), _jsx(Box, { lx: {
92
+ flexDirection: 'row',
93
+ flexWrap: 'wrap',
94
+ gap: 's16',
95
+ borderRadius: 'sm',
96
+ padding: 's16',
97
+ }, style: {
98
+ borderWidth: 1,
99
+ borderColor: theme.colors.border.mutedSubtle,
100
+ }, children: [
101
+ 'Home',
102
+ 'Settings',
103
+ 'Heart',
104
+ 'Star',
105
+ 'ArrowDown',
106
+ 'ArrowLeft',
107
+ 'ArrowRight',
108
+ 'ArrowUp',
109
+ ].map((iconName) => (_jsx(IconCard, { name: iconName, size: size }, iconName))) })] }, size))) }));
110
+ },
73
111
  };
74
112
  export const Gallery = {
75
113
  parameters: {
76
114
  layout: 'fullscreen',
77
115
  },
78
116
  render: () => {
117
+ const { theme } = LumenStyleSheet.useTheme();
79
118
  const [searchTerm, setSearchTerm] = useState('');
80
119
  // Filter icons based on search term
81
120
  const filteredIcons = Object.entries(Icons).filter(([name]) => name.toLowerCase().includes(searchTerm.toLowerCase()));
82
- return (_jsxs("div", { className: 'p-8', children: [_jsxs("div", { className: 'mb-32', children: [_jsx("div", { className: 'mb-8 max-w-md', children: _jsx(Search, { placeholder: 'Search icons...', value: searchTerm, onChangeText: setSearchTerm }) }), _jsx("div", { className: 'mb-4', children: _jsxs("span", { className: 'ml-8 text-muted body-3', children: [filteredIcons.length, " of ", Object.keys(Icons).length, " icons", searchTerm && ` matching "${searchTerm}"`] }) })] }), _jsx("div", { className: 'grid grid-cols-[repeat(auto-fill,minmax(120px,1fr))] gap-8', children: filteredIcons.map(([name]) => (_jsx(IconCard, { name: name }, name))) }), filteredIcons.length === 0 && searchTerm && (_jsxs("div", { className: 'flex flex-col items-center justify-center py-16', children: [_jsxs("p", { className: 'text-muted body-2', children: ["No icons found matching \"", searchTerm, "\""] }), _jsx("button", { onClick: () => setSearchTerm(''), className: 'mt-4 text-interactive body-2 hover:text-interactive-hover', children: "Clear search" })] }))] }));
121
+ return (_jsxs(Box, { lx: {
122
+ width: 'full',
123
+ flexDirection: 'column',
124
+ alignItems: 'stretch',
125
+ padding: 's8',
126
+ }, children: [_jsxs(Box, { lx: { marginBottom: 's32' }, children: [_jsx(Box, { lx: { marginBottom: 's8', maxWidth: 's320' }, children: _jsx(Search, { placeholder: 'Search icons...', value: searchTerm, onChangeText: setSearchTerm }) }), _jsx(Box, { lx: { marginBottom: 's4' }, children: _jsxs(Text, { typography: 'body3', lx: { marginLeft: 's8', color: 'muted' }, children: [filteredIcons.length, " of ", Object.keys(Icons).length, " icons", searchTerm && ` matching "${searchTerm}"`] }) })] }), _jsx(Box, { lx: { flexDirection: 'row', flexWrap: 'wrap', gap: 's8' }, children: filteredIcons.map(([name]) => (_jsx(IconCard, { name: name }, name))) }), filteredIcons.length === 0 && searchTerm && (_jsxs(Box, { lx: {
127
+ flexDirection: 'column',
128
+ alignItems: 'center',
129
+ justifyContent: 'center',
130
+ paddingVertical: 's16',
131
+ }, children: [_jsxs(Text, { typography: 'body2', lx: { color: 'muted' }, children: ["No icons found matching \"", searchTerm, "\""] }), _jsx(Pressable, { onPress: () => setSearchTerm(''), style: ({ pressed }) => ({
132
+ marginTop: 16,
133
+ color: pressed
134
+ ? theme.colors.text.interactivePressed
135
+ : theme.colors.text.interactive,
136
+ }), children: _jsx(Text, { typography: 'body2', lx: { color: 'interactive' }, children: "Clear search" }) })] }))] }));
83
137
  },
84
138
  };
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { Svg, SvgProps } from 'react-native-svg';
3
- import { IconProps } from './Icon.types';
3
+ import { IconProps } from './types';
4
4
  /**
5
5
  * Create an Icon component for React Native
6
6
  * @param {string} iconName - The name of the icon
@@ -1 +1 @@
1
- {"version":3,"file":"createIcon.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/Icon/createIcon.ts"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAGjD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC;;;;;GAKG;AACH,QAAA,MAAM,UAAU,GACd,UAAU,MAAM,EAChB,SAAS,KAAK,CAAC,YAAY,CAAC,QAAQ,CAAC,4FAgBtC,CAAC;AAEF,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"createIcon.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/Icon/createIcon.ts"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAGjD,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEpC;;;;;GAKG;AACH,QAAA,MAAM,UAAU,GACd,UAAU,MAAM,EAChB,SAAS,KAAK,CAAC,YAAY,CAAC,QAAQ,CAAC,4FAetC,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -8,9 +8,8 @@ import { Icon } from './Icon';
8
8
  * @returns {ForwardRefExoticComponent} Icon component
9
9
  */
10
10
  const createIcon = (iconName, iconJsx) => {
11
- const Component = forwardRef(({ className, ...props }, ref) => React.createElement(Icon, {
11
+ const Component = forwardRef(({ ...props }, ref) => React.createElement(Icon, {
12
12
  ref,
13
- className,
14
13
  viewBox: iconJsx.props.viewBox,
15
14
  ...props,
16
15
  children: iconJsx.props.children,
@@ -1,3 +1,3 @@
1
1
  export * from './Icon';
2
- export * from './Icon.types';
2
+ export * from './types';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/Icon/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/Icon/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC"}
@@ -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
  export type IconSize = 12 | 16 | 20 | 24 | 40 | 48 | 56;
3
4
  export type IconProps = {
@@ -6,12 +7,14 @@ export type IconProps = {
6
7
  */
7
8
  size?: IconSize;
8
9
  /**
9
- * Additional CSS classes to apply to the icon.
10
+ * Style object to apply to the icon (supports color via color property).
10
11
  */
11
- className?: string;
12
+ style?: StyleProp<ViewStyle & {
13
+ color?: string;
14
+ }>;
12
15
  /**
13
16
  * The children of the icon.
14
17
  */
15
18
  children: React.ReactNode;
16
- } & SvgProps;
17
- //# sourceMappingURL=Icon.types.d.ts.map
19
+ } & Omit<SvgProps, 'style'>;
20
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/Icon/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,MAAM,MAAM,QAAQ,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;AAExD,MAAM,MAAM,SAAS,GAAG;IACtB;;OAEG;IACH,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,GAAG;QAAE,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAClD;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,GAAG,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC"}
@@ -1,23 +1,6 @@
1
1
  import React from 'react';
2
- import { BaseButtonProps } from '../Button';
3
- export type IconButtonProps = {
4
- /**
5
- * Accessible label for the IconButton
6
- */
7
- accessibilityLabel: string;
8
- /**
9
- * The icon to display in the button
10
- */
11
- icon: NonNullable<BaseButtonProps['icon']>;
12
- } & Omit<BaseButtonProps, 'isFull'>;
13
2
  export declare const IconButton: React.ForwardRefExoticComponent<{
14
- /**
15
- * Accessible label for the IconButton
16
- */
17
3
  accessibilityLabel: string;
18
- /**
19
- * The icon to display in the button
20
- */
21
- icon: NonNullable<BaseButtonProps["icon"]>;
22
- } & Omit<BaseButtonProps, "isFull"> & React.RefAttributes<import("react-native").View>>;
4
+ icon: NonNullable<import("..").BaseButtonProps["icon"]>;
5
+ } & Omit<import("..").BaseButtonProps, "isFull"> & React.RefAttributes<import("react-native").View>>;
23
6
  //# sourceMappingURL=IconButton.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/IconButton/IconButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAG5C,MAAM,MAAM,eAAe,GAAG;IAC5B;;OAEG;IACH,kBAAkB,EAAE,MAAM,CAAC;IAC3B;;OAEG;IACH,IAAI,EAAE,WAAW,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC,CAAC;CAC5C,GAAG,IAAI,CAAC,eAAe,EAAE,QAAQ,CAAC,CAAC;AAEpC,eAAO,MAAM,UAAU;IAVrB;;OAEG;wBACiB,MAAM;IAC1B;;OAEG;UACG,WAAW,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;uFAQ1C,CAAC"}
1
+ {"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/IconButton/IconButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,eAAO,MAAM,UAAU;;;oGAKrB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"IconButton.stories.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/IconButton/IconButton.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAEvE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAU1C,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,UAAU,CA4CjC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,UAAU,CAAC,CAAC;AAEzC,eAAO,MAAM,IAAI,EAAE,KAOlB,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,KAmBhC,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAyB3B,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAoB5B,CAAC"}
1
+ {"version":3,"file":"IconButton.stories.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/IconButton/IconButton.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAGvE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAU1C,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,UAAU,CAyCjC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,UAAU,CAAC,CAAC;AAEzC,eAAO,MAAM,IAAI,EAAE,KAOlB,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,KAmBhC,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAyB3B,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAoB5B,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Close, Heart, Plus, Settings, Share } from '../../Symbols';
3
+ import { Box } from '../Utility';
3
4
  import { IconButton } from './IconButton';
4
5
  const iconMap = {
5
6
  Heart,
@@ -11,9 +12,6 @@ const iconMap = {
11
12
  const meta = {
12
13
  title: 'Action/IconButton',
13
14
  component: IconButton,
14
- parameters: {
15
- layout: 'centered',
16
- },
17
15
  argTypes: {
18
16
  icon: {
19
17
  options: Object.keys(iconMap),
@@ -21,11 +19,11 @@ const meta = {
21
19
  control: {
22
20
  type: 'select',
23
21
  labels: {
24
- Heart: '❤️ Heart',
25
- Plus: 'Plus',
26
- Settings: '⚙️ Settings',
27
- Share: '📤 Share',
28
- Close: '✖️ Close',
22
+ Heart: 'Heart',
23
+ Plus: 'Plus',
24
+ Settings: 'Settings',
25
+ Share: 'Share',
26
+ Close: 'Close',
29
27
  },
30
28
  },
31
29
  },
@@ -63,14 +61,14 @@ export const Base = {
63
61
  },
64
62
  };
65
63
  export const AppearanceShowcase = {
66
- render: () => (_jsxs("div", { className: 'flex gap-8', children: [_jsx(IconButton, { accessibilityLabel: 'Add', icon: Plus, appearance: 'accent' }), _jsx(IconButton, { accessibilityLabel: 'Add', icon: Plus, appearance: 'base' }), _jsx(IconButton, { accessibilityLabel: 'Add', icon: Plus, appearance: 'gray' }), _jsx(IconButton, { accessibilityLabel: 'Add', icon: Plus, appearance: 'transparent' }), _jsx(IconButton, { accessibilityLabel: 'Add', icon: Plus, appearance: 'no-background' }), _jsx(IconButton, { accessibilityLabel: 'Add', icon: Plus, appearance: 'red' })] })),
64
+ render: () => (_jsxs(Box, { lx: { flexDirection: 'row', gap: 's8' }, children: [_jsx(IconButton, { accessibilityLabel: 'Add', icon: Plus, appearance: 'accent' }), _jsx(IconButton, { accessibilityLabel: 'Add', icon: Plus, appearance: 'base' }), _jsx(IconButton, { accessibilityLabel: 'Add', icon: Plus, appearance: 'gray' }), _jsx(IconButton, { accessibilityLabel: 'Add', icon: Plus, appearance: 'transparent' }), _jsx(IconButton, { accessibilityLabel: 'Add', icon: Plus, appearance: 'no-background' }), _jsx(IconButton, { accessibilityLabel: 'Add', icon: Plus, appearance: 'red' })] })),
67
65
  };
68
66
  export const SizesShowcase = {
69
- render: () => (_jsxs("div", { className: 'flex items-center gap-8', children: [_jsx(IconButton, { accessibilityLabel: 'Add to favorites', icon: Heart, size: 'xs' }), _jsx(IconButton, { accessibilityLabel: 'Add to favorites', icon: Heart, size: 'sm' }), _jsx(IconButton, { accessibilityLabel: 'Add to favorites', icon: Heart, size: 'md' }), _jsx(IconButton, { accessibilityLabel: 'Add to favorites', icon: Heart, size: 'lg' })] })),
67
+ render: () => (_jsxs(Box, { lx: { flexDirection: 'row', alignItems: 'center', gap: 's8' }, children: [_jsx(IconButton, { accessibilityLabel: 'Add to favorites', icon: Heart, size: 'xs' }), _jsx(IconButton, { accessibilityLabel: 'Add to favorites', icon: Heart, size: 'sm' }), _jsx(IconButton, { accessibilityLabel: 'Add to favorites', icon: Heart, size: 'md' }), _jsx(IconButton, { accessibilityLabel: 'Add to favorites', icon: Heart, size: 'lg' })] })),
70
68
  };
71
69
  export const StatesShowcase = {
72
70
  args: {
73
71
  appearance: 'base',
74
72
  },
75
- render: ({ appearance }) => (_jsxs("div", { className: 'flex items-center gap-8', children: [_jsx(IconButton, { accessibilityLabel: 'Settings', appearance: appearance, icon: Settings, disabled: true }), _jsx(IconButton, { accessibilityLabel: 'Settings', appearance: appearance, icon: Settings, loading: true })] })),
73
+ render: ({ appearance }) => (_jsxs(Box, { lx: { flexDirection: 'row', alignItems: 'flex-start', gap: 's8' }, children: [_jsx(IconButton, { accessibilityLabel: 'Settings', appearance: appearance, icon: Settings, disabled: true }), _jsx(IconButton, { accessibilityLabel: 'Settings', appearance: appearance, icon: Settings, loading: true })] })),
76
74
  };
@@ -1,2 +1,3 @@
1
1
  export * from './IconButton';
2
+ export * from './types';
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/IconButton/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/IconButton/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC"}
@@ -1 +1,2 @@
1
1
  export * from './IconButton';
2
+ export * from './types';
@@ -0,0 +1,12 @@
1
+ import { BaseButtonProps } from '../Button';
2
+ export type IconButtonProps = {
3
+ /**
4
+ * Accessible label for the IconButton
5
+ */
6
+ accessibilityLabel: string;
7
+ /**
8
+ * The icon to display in the button
9
+ */
10
+ icon: NonNullable<BaseButtonProps['icon']>;
11
+ } & Omit<BaseButtonProps, 'isFull'>;
12
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/IconButton/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAE5C,MAAM,MAAM,eAAe,GAAG;IAC5B;;OAEG;IACH,kBAAkB,EAAE,MAAM,CAAC;IAC3B;;OAEG;IACH,IAAI,EAAE,WAAW,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC,CAAC;CAC5C,GAAG,IAAI,CAAC,eAAe,EAAE,QAAQ,CAAC,CAAC"}
@@ -20,12 +20,12 @@ import { InteractiveIconProps } from './types';
20
20
  * import { DeleteCircleFill, Settings } from '@ledgerhq/lumen-ui-rnative/symbols';
21
21
  *
22
22
  * // Filled interactive icon for destructive actions
23
- * <InteractiveIcon iconType="filled" aria-label="Delete item" onPress={handleDelete}>
23
+ * <InteractiveIcon iconType="filled" accessibilityLabel="Delete item" onPress={handleDelete}>
24
24
  * <DeleteCircleFill size={20} />
25
25
  * </InteractiveIcon>
26
26
  *
27
27
  * // Stroked interactive icon for secondary actions
28
- * <InteractiveIcon iconType="stroked" aria-label="Open settings" onPress={handleSettings}>
28
+ * <InteractiveIcon iconType="stroked" accessibilityLabel="Open settings" onPress={handleSettings}>
29
29
  * <Settings size={20} />
30
30
  * </InteractiveIcon>
31
31
  */
@@ -1 +1 @@
1
- {"version":3,"file":"InteractiveIcon.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/InteractiveIcon/InteractiveIcon.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAG3B,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AA6B/C;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CA4BpD,CAAC"}
1
+ {"version":3,"file":"InteractiveIcon.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/InteractiveIcon/InteractiveIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAqB,MAAM,OAAO,CAAC;AAM9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AA0C/C;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CA4BpD,CAAC"}
@@ -22,5 +22,5 @@ figma.connect(InteractiveIcon, 'https://www.figma.com/design/JxaLVMTWirCpU0rsbZ3
22
22
  url: 'https://ldls.vercel.app/?path=/docs/components-interactiveicon-overview--docs',
23
23
  },
24
24
  ],
25
- example: (props) => (_jsx(InteractiveIcon, { iconType: props.iconType, disabled: props.disabled, "aria-label": 'Interactive icon', children: props.children })),
25
+ example: (props) => (_jsx(InteractiveIcon, { iconType: props.iconType, disabled: props.disabled, accessibilityLabel: 'Interactive icon', children: props.children })),
26
26
  });
@@ -1,31 +1,29 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { cn } from '@ledgerhq/lumen-utils-shared';
3
- import { cva } from 'class-variance-authority';
4
- import { Pressable, View } from 'react-native';
5
- import { InjectStylesIntoChildren } from '../../utils';
6
- const buttonVariants = cva('inline-flex size-fit items-center justify-center rounded-full', {
7
- variants: {
8
- iconType: {
9
- filled: '',
10
- stroked: 'bg-base-transparent',
11
- },
12
- pressed: {
13
- true: '',
14
- false: '',
15
- },
16
- disabled: {
17
- true: 'bg-disabled',
18
- false: '',
19
- },
20
- },
21
- compoundVariants: [
22
- {
23
- iconType: 'stroked',
24
- pressed: true,
25
- className: 'bg-base-transparent-pressed',
26
- },
27
- ],
28
- });
2
+ import { View } from 'react-native';
3
+ import { LumenStyleSheet, mergeStyles } from '../../../styles';
4
+ import { InjectStylesIntoChildren } from '../../utils/components/InjectStylesIntoChildren';
5
+ import { Pressable } from '../Utility';
6
+ const useStyles = ({ iconType, pressed, disabled, }) => {
7
+ return LumenStyleSheet.useCreate((t) => {
8
+ const backgroundStyle = {
9
+ filled: { backgroundColor: t.colors.bg.base },
10
+ stroked: { backgroundColor: t.colors.bg.baseTransparent },
11
+ };
12
+ return {
13
+ container: mergeStyles({
14
+ borderRadius: t.borderRadius.full,
15
+ }, backgroundStyle[iconType], iconType === 'stroked' &&
16
+ pressed && { backgroundColor: t.colors.bg.baseTransparentPressed }),
17
+ icon: {
18
+ color: disabled
19
+ ? t.colors.text.disabled
20
+ : pressed
21
+ ? t.colors.text.mutedPressed
22
+ : t.colors.text.muted,
23
+ },
24
+ };
25
+ }, [iconType, pressed, disabled]);
26
+ };
29
27
  /**
30
28
  * A specialized interactive component designed specifically for displaying pressable icons.
31
29
  *
@@ -46,18 +44,20 @@ const buttonVariants = cva('inline-flex size-fit items-center justify-center rou
46
44
  * import { DeleteCircleFill, Settings } from '@ledgerhq/lumen-ui-rnative/symbols';
47
45
  *
48
46
  * // Filled interactive icon for destructive actions
49
- * <InteractiveIcon iconType="filled" aria-label="Delete item" onPress={handleDelete}>
47
+ * <InteractiveIcon iconType="filled" accessibilityLabel="Delete item" onPress={handleDelete}>
50
48
  * <DeleteCircleFill size={20} />
51
49
  * </InteractiveIcon>
52
50
  *
53
51
  * // Stroked interactive icon for secondary actions
54
- * <InteractiveIcon iconType="stroked" aria-label="Open settings" onPress={handleSettings}>
52
+ * <InteractiveIcon iconType="stroked" accessibilityLabel="Open settings" onPress={handleSettings}>
55
53
  * <Settings size={20} />
56
54
  * </InteractiveIcon>
57
55
  */
58
- export const InteractiveIcon = ({ iconType, children, disabled = false, ...props }) => {
59
- return (_jsx(Pressable, { accessibilityRole: 'button', accessibilityState: { disabled: !!disabled }, disabled: disabled, ...props, children: ({ pressed }) => {
60
- const iconStyles = cn(pressed ? 'text-muted-pressed' : 'text-muted', disabled && 'text-disabled');
61
- return (_jsx(View, { className: cn(buttonVariants({ iconType, pressed, disabled })), children: _jsx(InjectStylesIntoChildren, { styles: iconStyles, children: children }) }));
62
- } }));
56
+ export const InteractiveIcon = ({ iconType, children, disabled = false, style, lx, ...props }) => {
57
+ return (_jsx(Pressable, { lx: lx, style: [style, { alignItems: 'center', justifyContent: 'center' }], accessibilityRole: 'button', accessibilityState: { disabled: !!disabled }, disabled: disabled, ...props, children: ({ pressed }) => (_jsx(InteractiveIconContent, { iconType: iconType, pressed: pressed, disabled: !!disabled, children: children })) }));
58
+ };
59
+ const InteractiveIconContent = ({ iconType, pressed, disabled, children }) => {
60
+ const styles = useStyles({ iconType, pressed, disabled });
61
+ return (_jsx(View, { style: styles.container, children: _jsx(InjectStylesIntoChildren, { style: styles.icon, children: children }) }));
63
62
  };
63
+ InteractiveIcon.displayName = 'InteractiveIcon';
@@ -3,7 +3,7 @@ import { InteractiveIcon } from './InteractiveIcon';
3
3
  declare const meta: Meta<typeof InteractiveIcon>;
4
4
  export default meta;
5
5
  type Story = StoryObj<typeof InteractiveIcon>;
6
- export declare const Filled: Story;
6
+ export declare const Base: Story;
7
7
  export declare const Stroked: Story;
8
8
  export declare const IconTypeShowcase: Story;
9
9
  export declare const SizesShowcase: Story;
@@ -1 +1 @@
1
- {"version":3,"file":"InteractiveIcon.stories.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/InteractiveIcon/InteractiveIcon.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAQ9D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,eAAe,CAuBtC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,eAAe,CAAC,CAAC;AAE9C,eAAO,MAAM,MAAM,EAAE,KAiBpB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAiBrB,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KAmB9B,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAkB3B,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAmC5B,CAAC"}
1
+ {"version":3,"file":"InteractiveIcon.stories.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/InteractiveIcon/InteractiveIcon.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAS9D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,eAAe,CA0BtC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,eAAe,CAAC,CAAC;AAE9C,eAAO,MAAM,IAAI,EAAE,KAiBlB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAiBrB,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KAuB9B,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KA8B3B,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAsD5B,CAAC"}