@ledgerhq/lumen-ui-rnative 0.0.43 → 0.0.45

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (337) hide show
  1. package/.storybook/Decorator.tsx +78 -13
  2. package/.storybook/docs/getting-started/ThemeProvider.mdx +1 -1
  3. package/.storybook/docs/style-system/lx.mdx +144 -0
  4. package/.storybook/docs/style-system/useCreate.mdx +95 -0
  5. package/.storybook/docs/style-system/useTheme.mdx +52 -0
  6. package/.storybook/preview-head.html +2 -2
  7. package/.storybook/{preview.ts → preview.tsx} +6 -1
  8. package/dist/package.json +2 -3
  9. package/dist/src/lib/Components/AddressInput/AddressInput.js +1 -1
  10. package/dist/src/lib/Components/AddressInput/AddressInput.stories.d.ts +7 -1
  11. package/dist/src/lib/Components/AddressInput/AddressInput.stories.d.ts.map +1 -1
  12. package/dist/src/lib/Components/AddressInput/AddressInput.stories.js +98 -9
  13. package/dist/src/lib/Components/AmountInput/AmountInput.d.ts.map +1 -1
  14. package/dist/src/lib/Components/AmountInput/AmountInput.js +3 -3
  15. package/dist/src/lib/Components/AmountInput/AmountInput.stories.d.ts +10 -1
  16. package/dist/src/lib/Components/AmountInput/AmountInput.stories.d.ts.map +1 -1
  17. package/dist/src/lib/Components/AmountInput/AmountInput.stories.js +162 -9
  18. package/dist/src/lib/Components/BaseInput/BaseInput.d.ts.map +1 -1
  19. package/dist/src/lib/Components/BaseInput/BaseInput.js +2 -19
  20. package/dist/src/lib/Components/BottomSheet/BottomSheet.js +1 -1
  21. package/dist/src/lib/Components/BottomSheet/BottomSheet.stories.js +8 -8
  22. package/dist/src/lib/Components/Button/BaseButton.d.ts +3 -3
  23. package/dist/src/lib/Components/Button/BaseButton.d.ts.map +1 -1
  24. package/dist/src/lib/Components/Button/BaseButton.js +99 -119
  25. package/dist/src/lib/Components/Button/Button.d.ts +4 -26
  26. package/dist/src/lib/Components/Button/Button.d.ts.map +1 -1
  27. package/dist/src/lib/Components/Button/Button.js +2 -2
  28. package/dist/src/lib/Components/Button/Button.stories.d.ts +1 -1
  29. package/dist/src/lib/Components/Button/Button.stories.d.ts.map +1 -1
  30. package/dist/src/lib/Components/Button/Button.stories.js +25 -48
  31. package/dist/src/lib/Components/Button/index.d.ts +1 -1
  32. package/dist/src/lib/Components/Button/index.d.ts.map +1 -1
  33. package/dist/src/lib/Components/Button/index.js +1 -1
  34. package/dist/src/lib/Components/Button/{BaseButton.types.d.ts → types.d.ts} +15 -10
  35. package/dist/src/lib/Components/Button/types.d.ts.map +1 -0
  36. package/dist/src/lib/Components/CardButton/CardButton.d.ts +4 -3
  37. package/dist/src/lib/Components/CardButton/CardButton.d.ts.map +1 -1
  38. package/dist/src/lib/Components/CardButton/CardButton.js +65 -71
  39. package/dist/src/lib/Components/CardButton/CardButton.stories.d.ts.map +1 -1
  40. package/dist/src/lib/Components/CardButton/CardButton.stories.js +28 -15
  41. package/dist/src/lib/Components/CardButton/index.d.ts +1 -1
  42. package/dist/src/lib/Components/CardButton/index.d.ts.map +1 -1
  43. package/dist/src/lib/Components/CardButton/index.js +1 -1
  44. package/dist/src/lib/Components/CardButton/{CardButton.types.d.ts → types.d.ts} +5 -4
  45. package/dist/src/lib/Components/CardButton/types.d.ts.map +1 -0
  46. package/dist/src/lib/Components/Icon/Icon.d.ts +6 -3
  47. package/dist/src/lib/Components/Icon/Icon.d.ts.map +1 -1
  48. package/dist/src/lib/Components/Icon/Icon.js +24 -25
  49. package/dist/src/lib/Components/Icon/Icon.stories.d.ts +2 -2
  50. package/dist/src/lib/Components/Icon/Icon.stories.d.ts.map +1 -1
  51. package/dist/src/lib/Components/Icon/Icon.stories.js +73 -19
  52. package/dist/src/lib/Components/Icon/createIcon.d.ts +1 -1
  53. package/dist/src/lib/Components/Icon/createIcon.d.ts.map +1 -1
  54. package/dist/src/lib/Components/Icon/createIcon.js +1 -2
  55. package/dist/src/lib/Components/Icon/index.d.ts +1 -1
  56. package/dist/src/lib/Components/Icon/index.d.ts.map +1 -1
  57. package/dist/src/lib/Components/Icon/index.js +1 -1
  58. package/dist/src/lib/Components/Icon/{Icon.types.d.ts → types.d.ts} +7 -4
  59. package/dist/src/lib/Components/Icon/types.d.ts.map +1 -0
  60. package/dist/src/lib/Components/IconButton/IconButton.d.ts +2 -19
  61. package/dist/src/lib/Components/IconButton/IconButton.d.ts.map +1 -1
  62. package/dist/src/lib/Components/IconButton/IconButton.stories.d.ts.map +1 -1
  63. package/dist/src/lib/Components/IconButton/IconButton.stories.js +9 -11
  64. package/dist/src/lib/Components/IconButton/index.d.ts +1 -0
  65. package/dist/src/lib/Components/IconButton/index.d.ts.map +1 -1
  66. package/dist/src/lib/Components/IconButton/index.js +1 -0
  67. package/dist/src/lib/Components/IconButton/types.d.ts +12 -0
  68. package/dist/src/lib/Components/IconButton/types.d.ts.map +1 -0
  69. package/dist/src/lib/Components/InteractiveIcon/InteractiveIcon.d.ts +2 -2
  70. package/dist/src/lib/Components/InteractiveIcon/InteractiveIcon.d.ts.map +1 -1
  71. package/dist/src/lib/Components/InteractiveIcon/InteractiveIcon.figma.js +1 -1
  72. package/dist/src/lib/Components/InteractiveIcon/InteractiveIcon.js +34 -34
  73. package/dist/src/lib/Components/InteractiveIcon/InteractiveIcon.stories.d.ts +1 -1
  74. package/dist/src/lib/Components/InteractiveIcon/InteractiveIcon.stories.d.ts.map +1 -1
  75. package/dist/src/lib/Components/InteractiveIcon/InteractiveIcon.stories.js +22 -9
  76. package/dist/src/lib/Components/InteractiveIcon/types.d.ts +3 -7
  77. package/dist/src/lib/Components/InteractiveIcon/types.d.ts.map +1 -1
  78. package/dist/src/lib/Components/Link/Link.d.ts +7 -77
  79. package/dist/src/lib/Components/Link/Link.d.ts.map +1 -1
  80. package/dist/src/lib/Components/Link/Link.js +59 -75
  81. package/dist/src/lib/Components/Link/Link.stories.d.ts.map +1 -1
  82. package/dist/src/lib/Components/Link/Link.stories.js +34 -11
  83. package/dist/src/lib/Components/Link/index.d.ts +1 -0
  84. package/dist/src/lib/Components/Link/index.d.ts.map +1 -1
  85. package/dist/src/lib/Components/Link/index.js +1 -0
  86. package/dist/src/lib/Components/Link/types.d.ts +43 -0
  87. package/dist/src/lib/Components/Link/types.d.ts.map +1 -0
  88. package/dist/src/lib/Components/Link/types.js +1 -0
  89. package/dist/src/lib/Components/Search/Search.stories.d.ts +6 -1
  90. package/dist/src/lib/Components/Search/Search.stories.d.ts.map +1 -1
  91. package/dist/src/lib/Components/Search/Search.stories.js +71 -9
  92. package/dist/src/lib/Components/Select/Select.d.ts.map +1 -1
  93. package/dist/src/lib/Components/Select/Select.js +1 -17
  94. package/dist/src/lib/Components/Spinner/Spinner.d.ts +13 -16
  95. package/dist/src/lib/Components/Spinner/Spinner.d.ts.map +1 -1
  96. package/dist/src/lib/Components/Spinner/Spinner.js +33 -5
  97. package/dist/src/lib/Components/Spinner/Spinner.stories.d.ts.map +1 -1
  98. package/dist/src/lib/Components/Spinner/Spinner.stories.js +1 -1
  99. package/dist/src/lib/Components/Spinner/index.d.ts +1 -0
  100. package/dist/src/lib/Components/Spinner/index.d.ts.map +1 -1
  101. package/dist/src/lib/Components/Spinner/index.js +1 -0
  102. package/dist/src/lib/Components/Spinner/types.d.ts +15 -0
  103. package/dist/src/lib/Components/Spinner/types.d.ts.map +1 -0
  104. package/dist/src/lib/Components/Spinner/types.js +1 -0
  105. package/dist/src/lib/Components/Tag/Tag.d.ts +2 -1
  106. package/dist/src/lib/Components/Tag/Tag.d.ts.map +1 -1
  107. package/dist/src/lib/Components/Tag/Tag.js +15 -4
  108. package/dist/src/lib/Components/Tag/Tag.stories.js +1 -1
  109. package/dist/src/lib/Components/Tag/Tag.types.d.ts +7 -1
  110. package/dist/src/lib/Components/Tag/Tag.types.d.ts.map +1 -1
  111. package/dist/src/lib/Components/TextInput/TextInput.stories.d.ts +8 -1
  112. package/dist/src/lib/Components/TextInput/TextInput.stories.d.ts.map +1 -1
  113. package/dist/src/lib/Components/TextInput/TextInput.stories.js +104 -9
  114. package/dist/src/lib/Components/Tile/Tile.d.ts.map +1 -1
  115. package/dist/src/lib/Components/Tile/Tile.js +54 -8
  116. package/dist/src/lib/Components/Tile/types.d.ts +14 -1
  117. package/dist/src/lib/Components/Tile/types.d.ts.map +1 -1
  118. package/dist/src/lib/Components/Tooltip/Tooltip.stories.js +2 -2
  119. package/dist/src/lib/Components/Utility/Box/Box.d.ts +39 -0
  120. package/dist/src/lib/Components/Utility/Box/Box.d.ts.map +1 -0
  121. package/dist/src/lib/Components/{Box → Utility/Box}/Box.js +10 -11
  122. package/dist/src/lib/Components/Utility/Box/Box.stories.d.ts.map +1 -0
  123. package/dist/src/lib/Components/{Box → Utility/Box}/Box.stories.js +13 -12
  124. package/dist/src/lib/Components/Utility/Box/index.d.ts +2 -0
  125. package/dist/src/lib/Components/Utility/Box/index.d.ts.map +1 -0
  126. package/dist/src/lib/Components/Utility/Pressable/Pressable.d.ts +34 -0
  127. package/dist/src/lib/Components/Utility/Pressable/Pressable.d.ts.map +1 -0
  128. package/dist/src/lib/Components/Utility/Pressable/Pressable.js +33 -0
  129. package/dist/src/lib/Components/Utility/Pressable/Pressable.stories.d.ts +7 -0
  130. package/dist/src/lib/Components/Utility/Pressable/Pressable.stories.d.ts.map +1 -0
  131. package/dist/src/lib/Components/Utility/Pressable/Pressable.stories.js +47 -0
  132. package/dist/src/lib/Components/Utility/Pressable/index.d.ts +3 -0
  133. package/dist/src/lib/Components/Utility/Pressable/index.d.ts.map +1 -0
  134. package/dist/src/lib/Components/Utility/Pressable/index.js +1 -0
  135. package/dist/src/lib/Components/Utility/Pressable/types.d.ts +3 -0
  136. package/dist/src/lib/Components/Utility/Pressable/types.d.ts.map +1 -0
  137. package/dist/src/lib/Components/Utility/Pressable/types.js +1 -0
  138. package/dist/src/lib/Components/Utility/Text/Text.d.ts +40 -0
  139. package/dist/src/lib/Components/Utility/Text/Text.d.ts.map +1 -0
  140. package/dist/src/lib/Components/{Text → Utility/Text}/Text.js +13 -9
  141. package/dist/src/lib/Components/Utility/Text/Text.stories.d.ts.map +1 -0
  142. package/dist/src/lib/Components/{Text → Utility/Text}/Text.stories.js +3 -3
  143. package/dist/src/lib/Components/Utility/Text/index.d.ts.map +1 -0
  144. package/dist/src/lib/Components/Utility/index.d.ts +4 -0
  145. package/dist/src/lib/Components/Utility/index.d.ts.map +1 -0
  146. package/dist/src/lib/Components/Utility/index.js +3 -0
  147. package/dist/src/lib/Components/index.d.ts +1 -3
  148. package/dist/src/lib/Components/index.d.ts.map +1 -1
  149. package/dist/src/lib/Components/index.js +1 -3
  150. package/dist/src/lib/utils/components/InjectStylesIntoChildren.d.ts +6 -5
  151. package/dist/src/lib/utils/components/InjectStylesIntoChildren.d.ts.map +1 -1
  152. package/dist/src/lib/utils/components/InjectStylesIntoChildren.js +6 -6
  153. package/dist/src/styles/LumenStyleSheet.d.ts +1 -1
  154. package/dist/src/styles/LumenStyleSheet.d.ts.map +1 -1
  155. package/dist/src/styles/Provider/createStylesheetTheme.d.ts +0 -1
  156. package/dist/src/styles/Provider/createStylesheetTheme.d.ts.map +1 -1
  157. package/dist/src/styles/Provider/createStylesheetTheme.js +0 -1
  158. package/dist/src/styles/create/useCreate.d.ts +2 -1
  159. package/dist/src/styles/create/useCreate.d.ts.map +1 -1
  160. package/dist/src/styles/create/useCreate.js +5 -5
  161. package/dist/src/styles/factories/areLxPropsEqual.d.ts +3 -0
  162. package/dist/src/styles/factories/areLxPropsEqual.d.ts.map +1 -0
  163. package/dist/src/styles/factories/areLxPropsEqual.js +15 -0
  164. package/dist/src/styles/factories/createStyledPressable.d.ts +26 -0
  165. package/dist/src/styles/factories/createStyledPressable.d.ts.map +1 -0
  166. package/dist/src/styles/factories/createStyledPressable.js +61 -0
  167. package/dist/src/styles/factories/createStyledText.d.ts +15 -26
  168. package/dist/src/styles/factories/createStyledText.d.ts.map +1 -1
  169. package/dist/src/styles/factories/createStyledText.js +13 -29
  170. package/dist/src/styles/factories/createStyledView.d.ts +7 -27
  171. package/dist/src/styles/factories/createStyledView.d.ts.map +1 -1
  172. package/dist/src/styles/factories/createStyledView.js +10 -30
  173. package/dist/src/styles/factories/index.d.ts +4 -0
  174. package/dist/src/styles/factories/index.d.ts.map +1 -0
  175. package/dist/src/styles/factories/index.js +3 -0
  176. package/dist/src/styles/index.d.ts +2 -3
  177. package/dist/src/styles/index.d.ts.map +1 -1
  178. package/dist/src/styles/index.js +2 -3
  179. package/dist/src/styles/resolveStyle/resolveConfig.d.ts +7 -7
  180. package/dist/src/styles/resolveStyle/resolveConfig.d.ts.map +1 -1
  181. package/dist/src/styles/resolveStyle/resolveConfig.js +9 -9
  182. package/dist/src/styles/resolveStyle/resolveStyle.d.ts +6 -20
  183. package/dist/src/styles/resolveStyle/resolveStyle.d.ts.map +1 -1
  184. package/dist/src/styles/resolveStyle/resolveStyle.js +4 -29
  185. package/dist/src/styles/types/create.types.d.ts +1 -1
  186. package/dist/src/styles/types/create.types.d.ts.map +1 -1
  187. package/dist/src/styles/types/styled.types.d.ts +72 -50
  188. package/dist/src/styles/types/styled.types.d.ts.map +1 -1
  189. package/dist/src/styles/types/utility.types.d.ts.map +1 -1
  190. package/dist/src/styles/utils/index.d.ts +2 -0
  191. package/dist/src/styles/utils/index.d.ts.map +1 -0
  192. package/dist/src/styles/utils/index.js +1 -0
  193. package/dist/src/styles/utils/mergeStyles.d.ts +16 -0
  194. package/dist/src/styles/utils/mergeStyles.d.ts.map +1 -0
  195. package/dist/src/styles/utils/mergeStyles.js +20 -0
  196. package/package.json +3 -4
  197. package/src/lib/Components/AddressInput/AddressInput.mdx +15 -4
  198. package/src/lib/Components/AddressInput/AddressInput.stories.tsx +133 -17
  199. package/src/lib/Components/AddressInput/AddressInput.tsx +1 -1
  200. package/src/lib/Components/AmountInput/AmountInput.mdx +20 -1
  201. package/src/lib/Components/AmountInput/AmountInput.stories.tsx +180 -17
  202. package/src/lib/Components/AmountInput/AmountInput.tsx +24 -15
  203. package/src/lib/Components/Banner/Banner.test.tsx +48 -15
  204. package/src/lib/Components/BaseInput/BaseInput.tsx +6 -35
  205. package/src/lib/Components/BottomSheet/BottomSheet.stories.tsx +8 -8
  206. package/src/lib/Components/BottomSheet/BottomSheet.tsx +1 -1
  207. package/src/lib/Components/Button/BaseButton.test.tsx +149 -0
  208. package/src/lib/Components/Button/BaseButton.tsx +193 -148
  209. package/src/lib/Components/Button/Button.mdx +34 -31
  210. package/src/lib/Components/Button/Button.stories.tsx +37 -58
  211. package/src/lib/Components/Button/Button.tsx +4 -11
  212. package/src/lib/Components/Button/index.ts +1 -1
  213. package/src/lib/Components/Button/{BaseButton.types.ts → types.ts} +14 -8
  214. package/src/lib/Components/CardButton/CardButton.mdx +15 -25
  215. package/src/lib/Components/CardButton/CardButton.stories.tsx +48 -22
  216. package/src/lib/Components/CardButton/CardButton.test.tsx +141 -0
  217. package/src/lib/Components/CardButton/CardButton.tsx +142 -108
  218. package/src/lib/Components/CardButton/index.ts +1 -1
  219. package/src/lib/Components/CardButton/{CardButton.types.ts → types.ts} +4 -3
  220. package/src/lib/Components/Checkbox/Checkbox.mdx +1 -1
  221. package/src/lib/Components/Checkbox/Checkbox.test.tsx +42 -17
  222. package/src/lib/Components/Icon/Icon.stories.tsx +143 -73
  223. package/src/lib/Components/Icon/Icon.test.tsx +84 -0
  224. package/src/lib/Components/Icon/Icon.tsx +32 -28
  225. package/src/lib/Components/Icon/createIcon.ts +2 -3
  226. package/src/lib/Components/Icon/index.ts +1 -1
  227. package/src/lib/Components/Icon/{Icon.types.ts → types.ts} +4 -3
  228. package/src/lib/Components/IconButton/IconButton.mdx +13 -10
  229. package/src/lib/Components/IconButton/IconButton.stories.tsx +12 -14
  230. package/src/lib/Components/IconButton/IconButton.test.tsx +141 -0
  231. package/src/lib/Components/IconButton/IconButton.tsx +3 -13
  232. package/src/lib/Components/IconButton/index.ts +1 -0
  233. package/src/lib/Components/IconButton/types.ts +12 -0
  234. package/src/lib/Components/InteractiveIcon/InteractiveIcon.figma.tsx +1 -1
  235. package/src/lib/Components/InteractiveIcon/InteractiveIcon.mdx +25 -27
  236. package/src/lib/Components/InteractiveIcon/InteractiveIcon.stories.tsx +82 -43
  237. package/src/lib/Components/InteractiveIcon/InteractiveIcon.test.tsx +30 -19
  238. package/src/lib/Components/InteractiveIcon/InteractiveIcon.tsx +78 -45
  239. package/src/lib/Components/InteractiveIcon/types.ts +4 -7
  240. package/src/lib/Components/Link/Link.mdx +8 -18
  241. package/src/lib/Components/Link/Link.stories.tsx +56 -25
  242. package/src/lib/Components/Link/Link.test.tsx +141 -51
  243. package/src/lib/Components/Link/Link.tsx +128 -150
  244. package/src/lib/Components/Link/index.ts +1 -0
  245. package/src/lib/Components/Link/types.ts +44 -0
  246. package/src/lib/Components/Search/Search.mdx +14 -1
  247. package/src/lib/Components/Search/Search.stories.tsx +94 -15
  248. package/src/lib/Components/Select/Select.test.tsx +8 -4
  249. package/src/lib/Components/Select/Select.tsx +4 -31
  250. package/src/lib/Components/Spinner/Spinner.stories.tsx +1 -5
  251. package/src/lib/Components/Spinner/Spinner.tsx +60 -34
  252. package/src/lib/Components/Spinner/index.ts +1 -0
  253. package/src/lib/Components/Spinner/types.ts +15 -0
  254. package/src/lib/Components/Switch/Switch.mdx +1 -1
  255. package/src/lib/Components/Tag/Tag.stories.tsx +2 -2
  256. package/src/lib/Components/Tag/Tag.tsx +22 -6
  257. package/src/lib/Components/Tag/Tag.types.ts +7 -8
  258. package/src/lib/Components/TextInput/TextInput.mdx +24 -4
  259. package/src/lib/Components/TextInput/TextInput.stories.tsx +131 -15
  260. package/src/lib/Components/Tile/Tile.test.tsx +100 -63
  261. package/src/lib/Components/Tile/Tile.tsx +64 -13
  262. package/src/lib/Components/Tile/types.ts +14 -1
  263. package/src/lib/Components/Tooltip/Tooltip.stories.tsx +2 -2
  264. package/src/lib/Components/Tooltip/Tooltip.test.tsx +8 -4
  265. package/src/lib/Components/{Box → Utility/Box}/Box.mdx +15 -13
  266. package/src/lib/Components/{Box → Utility/Box}/Box.stories.tsx +13 -11
  267. package/src/lib/Components/{Box → Utility/Box}/Box.tsx +11 -12
  268. package/src/lib/Components/Utility/Box/index.ts +1 -0
  269. package/src/lib/Components/Utility/Pressable/Pressable.mdx +103 -0
  270. package/src/lib/Components/Utility/Pressable/Pressable.stories.tsx +51 -0
  271. package/src/lib/Components/Utility/Pressable/Pressable.test.tsx +221 -0
  272. package/src/lib/Components/Utility/Pressable/Pressable.tsx +34 -0
  273. package/src/lib/Components/Utility/Pressable/index.ts +2 -0
  274. package/src/lib/Components/Utility/Pressable/types.ts +3 -0
  275. package/src/lib/Components/{Text → Utility/Text}/Text.mdx +15 -7
  276. package/src/lib/Components/{Text → Utility/Text}/Text.stories.tsx +3 -3
  277. package/src/lib/Components/Utility/Text/Text.tsx +39 -0
  278. package/src/lib/Components/Utility/index.ts +3 -0
  279. package/src/lib/Components/index.ts +1 -3
  280. package/src/lib/utils/components/InjectStylesIntoChildren.tsx +23 -14
  281. package/src/styles/Provider/createStylesheetTheme.ts +0 -1
  282. package/src/styles/create/useCreate.ts +8 -4
  283. package/src/styles/factories/areLxPropsEqual.ts +32 -0
  284. package/src/styles/factories/createStyledPressable.test.tsx +253 -0
  285. package/src/styles/factories/createStyledPressable.tsx +97 -0
  286. package/src/styles/factories/createStyledText.test.tsx +28 -20
  287. package/src/styles/factories/createStyledText.tsx +29 -49
  288. package/src/styles/factories/createStyledView.test.tsx +22 -16
  289. package/src/styles/factories/createStyledView.tsx +19 -53
  290. package/src/styles/factories/index.ts +3 -0
  291. package/src/styles/index.ts +2 -3
  292. package/src/styles/resolveStyle/resolveConfig.ts +16 -15
  293. package/src/styles/resolveStyle/resolveStyle.test.ts +13 -141
  294. package/src/styles/resolveStyle/resolveStyle.ts +10 -60
  295. package/src/styles/types/create.types.ts +1 -1
  296. package/src/styles/types/styled.types.ts +73 -105
  297. package/src/styles/types/utility.types.ts +1 -0
  298. package/src/styles/utils/index.ts +1 -0
  299. package/src/styles/utils/mergeStyles.test.ts +45 -0
  300. package/src/styles/utils/mergeStyles.ts +25 -0
  301. package/.storybook/docs/getting-started/StyleSystem.mdx +0 -133
  302. package/dist/src/lib/Components/Box/Box.d.ts +0 -592
  303. package/dist/src/lib/Components/Box/Box.d.ts.map +0 -1
  304. package/dist/src/lib/Components/Box/Box.stories.d.ts.map +0 -1
  305. package/dist/src/lib/Components/Box/Box.types.d.ts +0 -3
  306. package/dist/src/lib/Components/Box/Box.types.d.ts.map +0 -1
  307. package/dist/src/lib/Components/Box/index.d.ts +0 -3
  308. package/dist/src/lib/Components/Box/index.d.ts.map +0 -1
  309. package/dist/src/lib/Components/Button/BaseButton.types.d.ts.map +0 -1
  310. package/dist/src/lib/Components/CardButton/CardButton.types.d.ts.map +0 -1
  311. package/dist/src/lib/Components/Icon/Icon.types.d.ts.map +0 -1
  312. package/dist/src/lib/Components/Text/Text.d.ts +0 -602
  313. package/dist/src/lib/Components/Text/Text.d.ts.map +0 -1
  314. package/dist/src/lib/Components/Text/Text.stories.d.ts.map +0 -1
  315. package/dist/src/lib/Components/Text/index.d.ts.map +0 -1
  316. package/dist/src/lib/Components/_ToRemove/ToRemove.d.ts +0 -9
  317. package/dist/src/lib/Components/_ToRemove/ToRemove.d.ts.map +0 -1
  318. package/dist/src/lib/Components/_ToRemove/ToRemove.js +0 -43
  319. package/dist/src/styles/utils/styleVarianceAuthority.d.ts +0 -30
  320. package/dist/src/styles/utils/styleVarianceAuthority.d.ts.map +0 -1
  321. package/dist/src/styles/utils/styleVarianceAuthority.js +0 -97
  322. package/src/lib/Components/Box/Box.types.ts +0 -3
  323. package/src/lib/Components/Box/index.ts +0 -2
  324. package/src/lib/Components/Text/Text.tsx +0 -35
  325. package/src/lib/Components/_ToRemove/ToRemove.tsx +0 -65
  326. package/src/styles/utils/styleVarianceAuthority.test.ts +0 -302
  327. package/src/styles/utils/styleVarianceAuthority.ts +0 -154
  328. /package/dist/src/lib/Components/{Box/Box.types.js → Button/types.js} +0 -0
  329. /package/dist/src/lib/Components/{Button/BaseButton.types.js → CardButton/types.js} +0 -0
  330. /package/dist/src/lib/Components/{CardButton/CardButton.types.js → Icon/types.js} +0 -0
  331. /package/dist/src/lib/Components/{Icon/Icon.types.js → IconButton/types.js} +0 -0
  332. /package/dist/src/lib/Components/{Box → Utility/Box}/Box.stories.d.ts +0 -0
  333. /package/dist/src/lib/Components/{Box → Utility/Box}/index.js +0 -0
  334. /package/dist/src/lib/Components/{Text → Utility/Text}/Text.stories.d.ts +0 -0
  335. /package/dist/src/lib/Components/{Text → Utility/Text}/index.d.ts +0 -0
  336. /package/dist/src/lib/Components/{Text → Utility/Text}/index.js +0 -0
  337. /package/src/lib/Components/{Text → Utility/Text}/index.ts +0 -0
@@ -1,81 +1,171 @@
1
1
  import { describe, it, expect, jest, beforeEach } from '@jest/globals';
2
- import { render, fireEvent } from '@testing-library/react-native';
2
+ import { ledgerLiveThemes } from '@ledgerhq/lumen-design-core';
3
+ import { render, fireEvent, screen } from '@testing-library/react-native';
4
+ import React from 'react';
3
5
  import { Linking } from 'react-native';
6
+
7
+ import { Information } from '../../Symbols';
8
+ import { ThemeProvider } from '../ThemeProvider/ThemeProvider';
4
9
  import { Link } from './Link';
10
+ import { LinkProps } from './types';
5
11
 
6
12
  jest.mock('react-native/Libraries/Linking/Linking', () => ({
7
13
  openURL: jest.fn(() => Promise.resolve()),
8
14
  }));
9
15
 
16
+ const renderWithProvider = (component: React.ReactElement) => {
17
+ return render(
18
+ <ThemeProvider themes={ledgerLiveThemes} colorScheme='dark' locale='en'>
19
+ {component}
20
+ </ThemeProvider>,
21
+ );
22
+ };
23
+
24
+ const typographies = ledgerLiveThemes.dark.typographies.sm;
25
+ const { colors, spacings } = ledgerLiveThemes.dark;
26
+
10
27
  describe('Link Component', () => {
11
28
  beforeEach(() => {
12
29
  jest.clearAllMocks();
13
30
  });
14
31
 
15
- it('should render correctly with children text', () => {
16
- const { getByText } = render(
17
- <Link href='https://example.com'>Click me</Link>,
18
- );
19
-
20
- expect(getByText('Click me')).toBeTruthy();
32
+ describe('Rendering', () => {
33
+ it('should render children and have link accessibility role', () => {
34
+ renderWithProvider(
35
+ <Link href='https://example.com' testID='link'>
36
+ Click me
37
+ </Link>,
38
+ );
39
+
40
+ expect(screen.getByText('Click me').props.children).toBe('Click me');
41
+ expect(screen.getByTestId('link').props.accessibilityRole).toBe('link');
42
+ });
43
+
44
+ it('should truncate text to single line', () => {
45
+ renderWithProvider(<Link href='https://example.com'>Link</Link>);
46
+ expect(screen.getByText('Link').props.numberOfLines).toBe(1);
47
+ });
21
48
  });
22
49
 
23
- it('should call Linking.openURL with href when pressed', async () => {
24
- const { getByText } = render(
25
- <Link href='https://example.com'>Click me</Link>,
50
+ describe('Appearances', () => {
51
+ it.each([
52
+ ['base', colors.text.base],
53
+ ['accent', colors.text.interactive],
54
+ ])(
55
+ 'should apply %s appearance with correct text color',
56
+ (appearance, expectedColor) => {
57
+ renderWithProvider(
58
+ <Link
59
+ href='https://example.com'
60
+ appearance={appearance as LinkProps['appearance']}
61
+ >
62
+ Link
63
+ </Link>,
64
+ );
65
+ expect(screen.getByText('Link').props.style.color).toBe(expectedColor);
66
+ },
26
67
  );
27
-
28
- fireEvent.press(getByText('Click me'));
29
-
30
- expect(Linking.openURL).toHaveBeenCalledWith('https://example.com');
31
- expect(Linking.openURL).toHaveBeenCalledTimes(1);
32
68
  });
33
69
 
34
- it('should call custom onPress handler instead of Linking.openURL when provided', () => {
35
- const onPress = jest.fn();
36
- const { getByText } = render(
37
- <Link href='https://example.com' onPress={onPress}>
38
- Custom Press
39
- </Link>,
70
+ describe('Sizes', () => {
71
+ it.each([
72
+ ['sm', typographies.body2SemiBold, spacings.s4],
73
+ ['md', typographies.body1SemiBold, spacings.s8],
74
+ ])(
75
+ 'should apply %s size with correct typography and gap',
76
+ (size, typography, expectedGap) => {
77
+ renderWithProvider(
78
+ <Link href='https://example.com' size={size as LinkProps['size']}>
79
+ Link
80
+ </Link>,
81
+ );
82
+
83
+ const textStyle = screen.getByText('Link').props.style;
84
+ expect(textStyle.fontSize).toBe(typography.fontSize);
85
+ expect(textStyle.fontWeight).toBe(typography.fontWeight);
86
+ expect(screen.getByTestId('link-content').props.style.gap).toBe(
87
+ expectedGap,
88
+ );
89
+ },
40
90
  );
41
-
42
- fireEvent.press(getByText('Custom Press'));
43
-
44
- expect(onPress).toHaveBeenCalledTimes(1);
45
- expect(Linking.openURL).not.toHaveBeenCalled();
46
91
  });
47
92
 
48
- it('should call onPress handler when no href is provided', () => {
49
- const onPress = jest.fn();
50
- const { getByText } = render(<Link onPress={onPress}>No Href Link</Link>);
51
-
52
- fireEvent.press(getByText('No Href Link'));
53
-
54
- expect(onPress).toHaveBeenCalledTimes(1);
55
- expect(Linking.openURL).not.toHaveBeenCalled();
56
- });
57
-
58
- it('should have link accessibility role', () => {
59
- const { getByTestId } = render(
60
- <Link href='https://example.com' testID='accessible-link'>
61
- Accessible Link
62
- </Link>,
93
+ describe('Underline', () => {
94
+ it.each([
95
+ [true, 'underline'],
96
+ [false, 'none'],
97
+ ])(
98
+ 'should have textDecorationLine=%s when underline=%s',
99
+ (underline, expectedDecoration) => {
100
+ renderWithProvider(
101
+ <Link href='https://example.com' underline={underline}>
102
+ Link
103
+ </Link>,
104
+ );
105
+ expect(screen.getByText('Link').props.style.textDecorationLine).toBe(
106
+ expectedDecoration,
107
+ );
108
+ },
63
109
  );
110
+ });
64
111
 
65
- const linkElement = getByTestId('accessible-link');
66
- expect(linkElement.props.accessibilityRole).toBe('link');
112
+ describe('Icons', () => {
113
+ it('should render leading icon when provided', () => {
114
+ renderWithProvider(
115
+ <Link href='https://example.com' icon={Information}>
116
+ With Icon
117
+ </Link>,
118
+ );
119
+
120
+ const children = React.Children.toArray(
121
+ screen.getByTestId('link-content').props.children,
122
+ );
123
+ expect(children.length).toBe(2); // icon + text wrapper
124
+ });
125
+
126
+ it('should render external link icon when isExternal is true', () => {
127
+ renderWithProvider(
128
+ <Link href='https://example.com' isExternal>
129
+ External
130
+ </Link>,
131
+ );
132
+
133
+ const children = React.Children.toArray(
134
+ screen.getByTestId('link-content').props.children,
135
+ );
136
+ expect(children.length).toBe(2); // text wrapper + external icon
137
+ });
67
138
  });
68
139
 
69
- it('should handle different URL protocols', () => {
70
- const { getByText, rerender } = render(
71
- <Link href='mailto:test@example.com'>Email Link</Link>,
140
+ describe('Interactions', () => {
141
+ it.each([
142
+ ['https://example.com', 'https://example.com'],
143
+ ['mailto:test@example.com', 'mailto:test@example.com'],
144
+ ['tel:+1234567890', 'tel:+1234567890'],
145
+ ])(
146
+ 'should call Linking.openURL with %s when pressed',
147
+ (href, expectedUrl) => {
148
+ renderWithProvider(<Link href={href}>Link</Link>);
149
+
150
+ fireEvent.press(screen.getByText('Link'));
151
+
152
+ expect(Linking.openURL).toHaveBeenCalledTimes(1);
153
+ expect(Linking.openURL).toHaveBeenCalledWith(expectedUrl);
154
+ },
72
155
  );
73
156
 
74
- fireEvent.press(getByText('Email Link'));
75
- expect(Linking.openURL).toHaveBeenCalledWith('mailto:test@example.com');
157
+ it('should call custom onPress instead of Linking.openURL', () => {
158
+ const onPress = jest.fn();
159
+ renderWithProvider(
160
+ <Link href='https://example.com' onPress={onPress}>
161
+ Custom
162
+ </Link>,
163
+ );
164
+
165
+ fireEvent.press(screen.getByText('Custom'));
76
166
 
77
- rerender(<Link href='tel:+1234567890'>Phone Link</Link>);
78
- fireEvent.press(getByText('Phone Link'));
79
- expect(Linking.openURL).toHaveBeenCalledWith('tel:+1234567890');
167
+ expect(onPress).toHaveBeenCalledTimes(1);
168
+ expect(Linking.openURL).not.toHaveBeenCalled();
169
+ });
80
170
  });
81
171
  });
@@ -1,97 +1,70 @@
1
- import { cn } from '@ledgerhq/lumen-utils-shared';
2
- import { cva } from 'class-variance-authority';
3
1
  import React from 'react';
4
- import { Linking, Pressable, PressableProps, Text, View } from 'react-native';
2
+ import { Linking, Text, View } from 'react-native';
3
+ import { LumenStyleSheet, mergeStyles } from '../../../styles';
5
4
  import { ExternalLink } from '../../Symbols';
6
5
  import { IconSize } from '../Icon';
6
+ import { Pressable } from '../Utility';
7
+ import { LinkProps } from './types';
7
8
 
8
- const linkTextVariants = cva('', {
9
- variants: {
10
- appearance: {
11
- base: '',
12
- accent: '',
13
- },
14
- underline: {
15
- true: 'underline underline-offset-2',
16
- false: '',
17
- },
18
- size: {
19
- sm: 'body-2-semi-bold',
20
- md: 'body-1-semi-bold',
21
- },
22
- pressed: {
23
- true: '',
24
- false: '',
25
- },
26
- },
27
- compoundVariants: [
28
- {
29
- appearance: 'base',
30
- pressed: false,
31
- className: 'text-base',
32
- },
33
- {
34
- appearance: 'base',
35
- pressed: true,
36
- className: 'text-base-pressed',
37
- },
38
- {
39
- appearance: 'accent',
40
- pressed: false,
41
- className: 'text-interactive',
42
- },
43
- {
44
- appearance: 'accent',
45
- pressed: true,
46
- className: 'text-interactive-pressed',
47
- },
48
- ],
49
- defaultVariants: {
50
- appearance: 'base',
51
- size: 'md',
52
- underline: true,
53
- pressed: false,
54
- },
55
- });
9
+ const iconSizeMap: Record<Size, IconSize> = {
10
+ sm: 16,
11
+ md: 20,
12
+ };
56
13
 
57
- export type LinkProps = Omit<PressableProps, 'onPress' | 'children'> & {
58
- /**
59
- * The visual style of the link.
60
- * @default base
61
- */
62
- appearance?: 'base' | 'accent';
63
- /**
64
- * The size variant of the link.
65
- * @default md
66
- */
67
- size?: 'sm' | 'md';
68
- /**
69
- * Whether to underline the link text.
70
- * @default true
71
- */
72
- underline?: boolean;
73
- /**
74
- * An optional icon component to render inside the link.
75
- * The icon styles are defined by the link. Please do not override them.
76
- */
77
- icon?: React.ComponentType<{ size?: IconSize; className?: string }>;
78
- /**
79
- * If true, displays an external link icon next to the link text.
80
- * @default false
81
- */
82
- isExternal?: boolean;
83
- /**
84
- * The URL to navigate to
85
- */
86
- href?: string;
87
- /**
88
- * Custom press handler (overrides default href navigation)
89
- */
90
- onPress?: () => void;
91
- /**
92
- * The link's content, typically text.
93
- */
94
- children: React.ReactNode;
14
+ type Appearance = NonNullable<LinkProps['appearance']>;
15
+ type Size = NonNullable<LinkProps['size']>;
16
+
17
+ type StyleParams = {
18
+ appearance: Appearance;
19
+ size: Size;
20
+ underline: boolean;
21
+ pressed: boolean;
22
+ };
23
+
24
+ const useStyles = ({ appearance, size, underline, pressed }: StyleParams) => {
25
+ return LumenStyleSheet.useCreate(
26
+ (t) => {
27
+ const textColors: Record<Appearance, string> = {
28
+ base: t.colors.text.base,
29
+ accent: t.colors.text.interactive,
30
+ };
31
+
32
+ const pressedTextColors: Record<Appearance, string> = {
33
+ base: t.colors.text.basePressed,
34
+ accent: t.colors.text.interactivePressed,
35
+ };
36
+
37
+ const typography =
38
+ size === 'sm'
39
+ ? t.typographies.body2SemiBold
40
+ : t.typographies.body1SemiBold;
41
+ const gap = size === 'sm' ? t.spacings.s4 : t.spacings.s8;
42
+
43
+ return {
44
+ container: {
45
+ flexDirection: 'row',
46
+ alignItems: 'center',
47
+ gap,
48
+ },
49
+ textWrapper: {
50
+ flexShrink: 1,
51
+ },
52
+ text: mergeStyles(typography, {
53
+ color: pressed
54
+ ? pressedTextColors[appearance]
55
+ : textColors[appearance],
56
+ textDecorationLine: underline ? 'underline' : 'none',
57
+ }),
58
+ icon: {
59
+ flexShrink: 0,
60
+ color: pressed
61
+ ? pressedTextColors[appearance]
62
+ : textColors[appearance],
63
+ },
64
+ };
65
+ },
66
+ [appearance, size, underline, pressed],
67
+ );
95
68
  };
96
69
 
97
70
  /**
@@ -101,7 +74,7 @@ export type LinkProps = Omit<PressableProps, 'onPress' | 'children'> & {
101
74
  * @see {@link https://ldls.vercel.app/?path=/docs/components-link-overview--docs Storybook}
102
75
  * @see {@link https://ldls.vercel.app/?path=/docs/components-link-implementation--docs#dos-and-donts Guidelines}
103
76
  *
104
- * @warning The `className` prop should only be used for layout adjustments like margins or positioning.
77
+ * @warning The `lx` prop should only be used for layout adjustments like margins or positioning.
105
78
  * Do not use it to modify the link's core appearance (colors, padding, etc). Use the `appearance` and `underline` props instead.
106
79
  *
107
80
  * @example
@@ -135,10 +108,11 @@ export const Link = React.forwardRef<
135
108
  >(
136
109
  (
137
110
  {
138
- className,
111
+ lx,
112
+ style,
139
113
  children,
140
- appearance,
141
- size,
114
+ appearance = 'base',
115
+ size = 'md',
142
116
  underline = true,
143
117
  icon,
144
118
  isExternal = false,
@@ -148,14 +122,6 @@ export const Link = React.forwardRef<
148
122
  },
149
123
  ref,
150
124
  ) => {
151
- const iconSizeMap: { [key: string]: IconSize } = {
152
- sm: 16,
153
- md: 20,
154
- };
155
-
156
- const calculatedIconSize = size ? iconSizeMap[size] : 20;
157
- const IconComponent = icon;
158
-
159
125
  const handlePress = async () => {
160
126
  if (onPress) {
161
127
  onPress();
@@ -167,64 +133,76 @@ export const Link = React.forwardRef<
167
133
  return (
168
134
  <Pressable
169
135
  ref={ref}
170
- className={cn('shrink', className)}
136
+ lx={lx}
137
+ style={[style, { flexShrink: 1 }]}
171
138
  onPress={handlePress}
172
139
  accessibilityRole='link'
173
140
  {...props}
174
141
  >
175
142
  {({ pressed }) => (
176
- <View
177
- className={cn(
178
- 'flex-row items-center gap-8',
179
- size === 'sm' && 'gap-4',
180
- )}
143
+ <LinkContent
144
+ appearance={appearance}
145
+ size={size}
146
+ underline={underline}
147
+ pressed={pressed}
148
+ icon={icon}
149
+ isExternal={isExternal}
181
150
  >
182
- {IconComponent && (
183
- <IconComponent
184
- className={cn(
185
- 'flex-shrink-0',
186
- linkTextVariants({
187
- appearance,
188
- size,
189
- underline,
190
- pressed,
191
- }),
192
- )}
193
- size={calculatedIconSize}
194
- />
195
- )}
196
- <View className='shrink'>
197
- <Text
198
- numberOfLines={1}
199
- className={linkTextVariants({
200
- appearance,
201
- size,
202
- underline,
203
- pressed,
204
- })}
205
- >
206
- {children}
207
- </Text>
208
- </View>
209
- {isExternal && (
210
- <ExternalLink
211
- size={calculatedIconSize}
212
- className={cn(
213
- 'flex-shrink-0',
214
- linkTextVariants({
215
- appearance,
216
- size,
217
- underline,
218
- pressed,
219
- }),
220
- )}
221
- accessible={false}
222
- />
223
- )}
224
- </View>
151
+ {children}
152
+ </LinkContent>
225
153
  )}
226
154
  </Pressable>
227
155
  );
228
156
  },
229
157
  );
158
+
159
+ type LinkContentProps = {
160
+ appearance: Appearance;
161
+ size: Size;
162
+ underline: boolean;
163
+ pressed: boolean;
164
+ icon: LinkProps['icon'];
165
+ isExternal: boolean;
166
+ children: React.ReactNode;
167
+ };
168
+
169
+ const LinkContent: React.FC<LinkContentProps> = ({
170
+ appearance,
171
+ size,
172
+ underline,
173
+ pressed,
174
+ icon,
175
+ isExternal,
176
+ children,
177
+ }) => {
178
+ const calculatedIconSize = iconSizeMap[size];
179
+ const IconComponent = icon;
180
+ const styles = useStyles({
181
+ appearance,
182
+ size,
183
+ underline,
184
+ pressed,
185
+ });
186
+
187
+ return (
188
+ <View style={styles.container} testID='link-content'>
189
+ {IconComponent && (
190
+ <IconComponent size={calculatedIconSize} style={styles.icon} />
191
+ )}
192
+ <View style={styles.textWrapper}>
193
+ <Text style={styles.text} numberOfLines={1}>
194
+ {children}
195
+ </Text>
196
+ </View>
197
+ {isExternal && (
198
+ <ExternalLink
199
+ size={calculatedIconSize}
200
+ style={styles.icon}
201
+ accessible={false}
202
+ />
203
+ )}
204
+ </View>
205
+ );
206
+ };
207
+
230
208
  Link.displayName = 'Link';
@@ -1 +1,2 @@
1
1
  export * from './Link';
2
+ export * from './types';
@@ -0,0 +1,44 @@
1
+ import { PropsWithChildren } from 'react';
2
+ import { StyleProp, ViewStyle } from 'react-native';
3
+ import { StyledPressableProps } from '../../../styles';
4
+ import { IconSize } from '../Icon';
5
+
6
+ export type LinkProps = {
7
+ /**
8
+ * The visual style of the link.
9
+ * @default base
10
+ */
11
+ appearance?: 'base' | 'accent';
12
+ /**
13
+ * The size variant of the link.
14
+ * @default md
15
+ */
16
+ size?: 'sm' | 'md';
17
+ /**
18
+ * Whether to underline the link text.
19
+ * @default true
20
+ */
21
+ underline?: boolean;
22
+ /**
23
+ * An optional icon component to render inside the link.
24
+ * The icon styles are defined by the link. Please do not override them.
25
+ */
26
+ icon?: React.ComponentType<{
27
+ size?: IconSize;
28
+ style?: StyleProp<ViewStyle>;
29
+ }>;
30
+ /**
31
+ * If true, displays an external link icon next to the link text.
32
+ * @default false
33
+ */
34
+ isExternal?: boolean;
35
+ /**
36
+ * The URL to navigate to
37
+ */
38
+ href?: string;
39
+ /**
40
+ * Custom press handler (overrides default href navigation)
41
+ */
42
+ onPress?: () => void;
43
+ } & PropsWithChildren &
44
+ Omit<StyledPressableProps, 'onPress' | 'children'>;
@@ -18,7 +18,10 @@ The Search component is a specialized input field designed specifically for sear
18
18
 
19
19
  > View in [Figma](https://www.figma.com/design/JxaLVMTWirCpU0rsbZ30k7/2.-Components-Library?node-id=2248-3468&m=dev).
20
20
 
21
- <Canvas of={SearchStories.WebPreviewWarning} />
21
+ > ⚠️ **Note on Web Preview:** The Storybook preview below may display visual inconsistencies as certain React Native APIs (such as Reanimated animations) cannot be fully translated to web environments. While the component's functionality should accurately represent the native implementation, it may not render as intended. For the complete native experience, please refer to the component on an actual iOS or Android device.
22
+
23
+ <Canvas of={SearchStories.Base} />
24
+ <Controls of={SearchStories.Base} />
22
25
 
23
26
  ## Anatomy
24
27
 
@@ -36,24 +39,34 @@ Uses placeholder text instead of floating labels for better search UX. Styled wi
36
39
 
37
40
  A clear button (×) appears **automatically** when input has content.
38
41
 
42
+ <Canvas of={SearchStories.WithContent} />
43
+
39
44
  > **Note:** The clear button only clears the input content/value. It does not clear error states - you must handle error state clearing separately in your component logic.
40
45
 
41
46
  #### **Hiding the Clear Button**
42
47
 
43
48
  Use `hideClearButton` to prevent the clear button from appearing.
44
49
 
50
+ <Canvas of={SearchStories.WithHiddenClearButton} />
51
+
45
52
  #### **Extending the Clear Behavior**
46
53
 
47
54
  Use `onClear` to extend the default clear behavior with custom logic.
48
55
 
56
+ <Canvas of={SearchStories.WithClearCallback} />
57
+
49
58
  ### Disabled State
50
59
 
51
60
  The search input can be disabled using the `editable` prop set to `false`.
52
61
 
62
+ <Canvas of={SearchStories.DisabledSearch} />
63
+
53
64
  ### Error State
54
65
 
55
66
  The search component supports error handling through `errorMessage` which displays an error message below the input with error styling including a red border and text color.
56
67
 
68
+ <Canvas of={SearchStories.WithError} />
69
+
57
70
  The error message will be automatically:
58
71
 
59
72
  - Connected to the input