jfs-components 0.0.5 → 0.0.7

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 (358) hide show
  1. package/lib/commonjs/components/Accordion/Accordion.mdx +1 -1
  2. package/lib/commonjs/components/ActionFooter/ActionFooter.js +2 -14
  3. package/lib/commonjs/components/ActionFooter/ActionFooter.js.map +1 -1
  4. package/lib/commonjs/components/ActionFooter/ActionFooter.mdx +1 -1
  5. package/lib/commonjs/components/ActionTile/ActionTile.js +10 -1
  6. package/lib/commonjs/components/ActionTile/ActionTile.js.map +1 -1
  7. package/lib/commonjs/components/ActionTile/ActionTile.mdx +5 -1
  8. package/lib/commonjs/components/AppBar/AppBar.js +109 -231
  9. package/lib/commonjs/components/AppBar/AppBar.js.map +1 -1
  10. package/lib/commonjs/components/AppBar/AppBar.mdx +51 -39
  11. package/lib/commonjs/components/Avatar/Avatar.mdx +9 -1
  12. package/lib/commonjs/components/AvatarGroup/AvatarGroup.mdx +9 -1
  13. package/lib/commonjs/components/Badge/Badge.mdx +1 -1
  14. package/lib/commonjs/components/Balance/Balance.js +77 -0
  15. package/lib/commonjs/components/Balance/Balance.js.map +1 -0
  16. package/lib/commonjs/components/Balance/Balance.mdx +62 -0
  17. package/lib/commonjs/components/BottomNav/BottomNav.js +9 -1
  18. package/lib/commonjs/components/BottomNav/BottomNav.js.map +1 -1
  19. package/lib/commonjs/components/BottomNav/BottomNav.mdx +5 -1
  20. package/lib/commonjs/components/BottomNavItem/BottomNavItem.js +9 -1
  21. package/lib/commonjs/components/BottomNavItem/BottomNavItem.js.map +1 -1
  22. package/lib/commonjs/components/BottomNavItem/BottomNavItem.mdx +5 -1
  23. package/lib/commonjs/components/Button/Button.mdx +5 -1
  24. package/lib/commonjs/components/ButtonGroup/ButtonGroup.js +64 -0
  25. package/lib/commonjs/components/ButtonGroup/ButtonGroup.js.map +1 -0
  26. package/lib/commonjs/components/ButtonGroup/ButtonGroup.mdx +56 -0
  27. package/lib/commonjs/components/Card/Card.mdx +1 -1
  28. package/lib/commonjs/components/CardFeedback/CardFeedback.mdx +5 -1
  29. package/lib/commonjs/components/ChipGroup/ChipGroup.js +54 -0
  30. package/lib/commonjs/components/ChipGroup/ChipGroup.js.map +1 -0
  31. package/lib/commonjs/components/ChipGroup/ChipGroup.mdx +40 -0
  32. package/lib/commonjs/components/ChipSelect/ChipSelect.js +103 -0
  33. package/lib/commonjs/components/ChipSelect/ChipSelect.js.map +1 -0
  34. package/lib/commonjs/components/ChipSelect/ChipSelect.mdx +80 -0
  35. package/lib/commonjs/components/CtaCard/CtaCard.js +15 -20
  36. package/lib/commonjs/components/CtaCard/CtaCard.js.map +1 -1
  37. package/lib/commonjs/components/CtaCard/CtaCard.mdx +1 -1
  38. package/lib/commonjs/components/Disclaimer/Disclaimer.js +9 -1
  39. package/lib/commonjs/components/Disclaimer/Disclaimer.js.map +1 -1
  40. package/lib/commonjs/components/Disclaimer/Disclaimer.mdx +5 -1
  41. package/lib/commonjs/components/Divider/Divider.mdx +5 -1
  42. package/lib/commonjs/components/Drawer/Drawer.mdx +9 -1
  43. package/lib/commonjs/components/EmptyState/EmptyState.js +138 -0
  44. package/lib/commonjs/components/EmptyState/EmptyState.js.map +1 -0
  45. package/lib/commonjs/components/EmptyState/EmptyState.mdx +73 -0
  46. package/lib/commonjs/components/FilterBar/FilterBar.mdx +1 -1
  47. package/lib/commonjs/components/HStack/HStack.js +67 -0
  48. package/lib/commonjs/components/HStack/HStack.js.map +1 -0
  49. package/lib/commonjs/components/HStack/HStack.mdx +44 -0
  50. package/lib/commonjs/components/IconButton/IconButton.mdx +5 -1
  51. package/lib/commonjs/components/IconCapsule/IconCapsule.js +12 -4
  52. package/lib/commonjs/components/IconCapsule/IconCapsule.js.map +1 -1
  53. package/lib/commonjs/components/IconCapsule/IconCapsule.mdx +12 -4
  54. package/lib/commonjs/components/Introduction.mdx +3 -98
  55. package/lib/commonjs/components/LazyList/LazyList.mdx +1 -1
  56. package/lib/commonjs/components/ListGroup/ListGroup.js +3 -30
  57. package/lib/commonjs/components/ListGroup/ListGroup.js.map +1 -1
  58. package/lib/commonjs/components/ListGroup/ListGroup.mdx +5 -1
  59. package/lib/commonjs/components/ListItem/ListItem.js +5 -37
  60. package/lib/commonjs/components/ListItem/ListItem.js.map +1 -1
  61. package/lib/commonjs/components/ListItem/ListItem.mdx +5 -1
  62. package/lib/commonjs/components/MediaCard/MediaCard.mdx +5 -1
  63. package/lib/commonjs/components/MerchantProfile/MerchantProfile.mdx +1 -1
  64. package/lib/commonjs/components/MoneyValue/MoneyValue.mdx +6 -2
  65. package/lib/commonjs/components/NavArrow/NavArrow.js +42 -17
  66. package/lib/commonjs/components/NavArrow/NavArrow.js.map +1 -1
  67. package/lib/commonjs/components/NavArrow/NavArrow.mdx +5 -1
  68. package/lib/commonjs/components/PageTitle/PageTitle.js +10 -1
  69. package/lib/commonjs/components/PageTitle/PageTitle.js.map +1 -1
  70. package/lib/commonjs/components/PageTitle/PageTitle.mdx +5 -1
  71. package/lib/commonjs/components/Screen/Screen.js +53 -0
  72. package/lib/commonjs/components/Screen/Screen.js.map +1 -0
  73. package/lib/commonjs/components/Screen/Screen.mdx +58 -0
  74. package/lib/commonjs/components/Section/Section.js +3 -25
  75. package/lib/commonjs/components/Section/Section.js.map +1 -1
  76. package/lib/commonjs/components/Section/Section.mdx +5 -1
  77. package/lib/commonjs/components/Stepper/Step.mdx +5 -1
  78. package/lib/commonjs/components/Stepper/StepLabel.mdx +5 -1
  79. package/lib/commonjs/components/Stepper/Stepper.mdx +1 -1
  80. package/lib/commonjs/components/SupportText/SupportText.js +83 -0
  81. package/lib/commonjs/components/SupportText/SupportText.js.map +1 -0
  82. package/lib/commonjs/components/SupportText/SupportText.mdx +48 -0
  83. package/lib/commonjs/components/SupportText/SupportTextIcon.js +47 -0
  84. package/lib/commonjs/components/SupportText/SupportTextIcon.js.map +1 -0
  85. package/lib/commonjs/components/SupportText/SupportTextIcon.mdx +35 -0
  86. package/lib/commonjs/components/SupportText/index.js +21 -0
  87. package/lib/commonjs/components/SupportText/index.js.map +1 -0
  88. package/lib/commonjs/components/TextInput/TextInput.mdx +9 -1
  89. package/lib/commonjs/components/ThreadHero/ThreadHero.mdx +1 -1
  90. package/lib/commonjs/components/Tooltip/Tooltip.mdx +5 -1
  91. package/lib/commonjs/components/TransactionBubble/TransactionBubble.mdx +1 -1
  92. package/lib/commonjs/components/TransactionDetails/TransactionDetails.js +2 -24
  93. package/lib/commonjs/components/TransactionDetails/TransactionDetails.js.map +1 -1
  94. package/lib/commonjs/components/TransactionDetails/TransactionDetails.mdx +1 -1
  95. package/lib/commonjs/components/TransactionStatus/TransactionStatus.mdx +1 -1
  96. package/lib/commonjs/components/UpiHandle/UpiHandle.js +9 -1
  97. package/lib/commonjs/components/UpiHandle/UpiHandle.js.map +1 -1
  98. package/lib/commonjs/components/UpiHandle/UpiHandle.mdx +5 -1
  99. package/lib/commonjs/components/VStack/VStack.js +73 -0
  100. package/lib/commonjs/components/VStack/VStack.js.map +1 -0
  101. package/lib/commonjs/components/VStack/VStack.mdx +44 -0
  102. package/lib/commonjs/components/index.js +28 -0
  103. package/lib/commonjs/components/index.js.map +1 -1
  104. package/lib/commonjs/design-tokens/JFS Variables-variables-full.json +1 -18633
  105. package/lib/commonjs/icons/ic_info.svg +1 -0
  106. package/lib/commonjs/icons/ic_warning.svg +1 -0
  107. package/lib/commonjs/icons/registry.js +2 -2
  108. package/lib/commonjs/icons/registry.js.map +1 -1
  109. package/lib/commonjs/utils/react-utils.js +47 -0
  110. package/lib/commonjs/utils/react-utils.js.map +1 -0
  111. package/lib/module/components/Accordion/Accordion.mdx +1 -1
  112. package/lib/module/components/ActionFooter/ActionFooter.js +2 -14
  113. package/lib/module/components/ActionFooter/ActionFooter.js.map +1 -1
  114. package/lib/module/components/ActionFooter/ActionFooter.mdx +1 -1
  115. package/lib/module/components/ActionTile/ActionTile.js +10 -1
  116. package/lib/module/components/ActionTile/ActionTile.js.map +1 -1
  117. package/lib/module/components/ActionTile/ActionTile.mdx +5 -1
  118. package/lib/module/components/AppBar/AppBar.js +109 -231
  119. package/lib/module/components/AppBar/AppBar.js.map +1 -1
  120. package/lib/module/components/AppBar/AppBar.mdx +51 -39
  121. package/lib/module/components/Avatar/Avatar.mdx +9 -1
  122. package/lib/module/components/AvatarGroup/AvatarGroup.mdx +9 -1
  123. package/lib/module/components/Badge/Badge.mdx +1 -1
  124. package/lib/module/components/Balance/Balance.js +72 -0
  125. package/lib/module/components/Balance/Balance.js.map +1 -0
  126. package/lib/module/components/Balance/Balance.mdx +62 -0
  127. package/lib/module/components/BottomNav/BottomNav.js +9 -1
  128. package/lib/module/components/BottomNav/BottomNav.js.map +1 -1
  129. package/lib/module/components/BottomNav/BottomNav.mdx +5 -1
  130. package/lib/module/components/BottomNavItem/BottomNavItem.js +9 -1
  131. package/lib/module/components/BottomNavItem/BottomNavItem.js.map +1 -1
  132. package/lib/module/components/BottomNavItem/BottomNavItem.mdx +5 -1
  133. package/lib/module/components/Button/Button.mdx +5 -1
  134. package/lib/module/components/ButtonGroup/ButtonGroup.js +59 -0
  135. package/lib/module/components/ButtonGroup/ButtonGroup.js.map +1 -0
  136. package/lib/module/components/ButtonGroup/ButtonGroup.mdx +56 -0
  137. package/lib/module/components/Card/Card.mdx +1 -1
  138. package/lib/module/components/CardFeedback/CardFeedback.mdx +5 -1
  139. package/lib/module/components/ChipGroup/ChipGroup.js +49 -0
  140. package/lib/module/components/ChipGroup/ChipGroup.js.map +1 -0
  141. package/lib/module/components/ChipGroup/ChipGroup.mdx +40 -0
  142. package/lib/module/components/ChipSelect/ChipSelect.js +98 -0
  143. package/lib/module/components/ChipSelect/ChipSelect.js.map +1 -0
  144. package/lib/module/components/ChipSelect/ChipSelect.mdx +80 -0
  145. package/lib/module/components/CtaCard/CtaCard.js +15 -20
  146. package/lib/module/components/CtaCard/CtaCard.js.map +1 -1
  147. package/lib/module/components/CtaCard/CtaCard.mdx +1 -1
  148. package/lib/module/components/Disclaimer/Disclaimer.js +9 -1
  149. package/lib/module/components/Disclaimer/Disclaimer.js.map +1 -1
  150. package/lib/module/components/Disclaimer/Disclaimer.mdx +5 -1
  151. package/lib/module/components/Divider/Divider.mdx +5 -1
  152. package/lib/module/components/Drawer/Drawer.mdx +9 -1
  153. package/lib/module/components/EmptyState/EmptyState.js +132 -0
  154. package/lib/module/components/EmptyState/EmptyState.js.map +1 -0
  155. package/lib/module/components/EmptyState/EmptyState.mdx +73 -0
  156. package/lib/module/components/FilterBar/FilterBar.mdx +1 -1
  157. package/lib/module/components/HStack/HStack.js +61 -0
  158. package/lib/module/components/HStack/HStack.js.map +1 -0
  159. package/lib/module/components/HStack/HStack.mdx +44 -0
  160. package/lib/module/components/IconButton/IconButton.mdx +5 -1
  161. package/lib/module/components/IconCapsule/IconCapsule.js +12 -4
  162. package/lib/module/components/IconCapsule/IconCapsule.js.map +1 -1
  163. package/lib/module/components/IconCapsule/IconCapsule.mdx +12 -4
  164. package/lib/module/components/Introduction.mdx +3 -98
  165. package/lib/module/components/LazyList/LazyList.mdx +1 -1
  166. package/lib/module/components/ListGroup/ListGroup.js +1 -30
  167. package/lib/module/components/ListGroup/ListGroup.js.map +1 -1
  168. package/lib/module/components/ListGroup/ListGroup.mdx +5 -1
  169. package/lib/module/components/ListItem/ListItem.js +1 -35
  170. package/lib/module/components/ListItem/ListItem.js.map +1 -1
  171. package/lib/module/components/ListItem/ListItem.mdx +5 -1
  172. package/lib/module/components/MediaCard/MediaCard.mdx +5 -1
  173. package/lib/module/components/MerchantProfile/MerchantProfile.mdx +1 -1
  174. package/lib/module/components/MoneyValue/MoneyValue.mdx +6 -2
  175. package/lib/module/components/NavArrow/NavArrow.js +42 -17
  176. package/lib/module/components/NavArrow/NavArrow.js.map +1 -1
  177. package/lib/module/components/NavArrow/NavArrow.mdx +5 -1
  178. package/lib/module/components/PageTitle/PageTitle.js +10 -1
  179. package/lib/module/components/PageTitle/PageTitle.js.map +1 -1
  180. package/lib/module/components/PageTitle/PageTitle.mdx +5 -1
  181. package/lib/module/components/Screen/Screen.js +47 -0
  182. package/lib/module/components/Screen/Screen.js.map +1 -0
  183. package/lib/module/components/Screen/Screen.mdx +58 -0
  184. package/lib/module/components/Section/Section.js +1 -23
  185. package/lib/module/components/Section/Section.js.map +1 -1
  186. package/lib/module/components/Section/Section.mdx +5 -1
  187. package/lib/module/components/Stepper/Step.mdx +5 -1
  188. package/lib/module/components/Stepper/StepLabel.mdx +5 -1
  189. package/lib/module/components/Stepper/Stepper.mdx +1 -1
  190. package/lib/module/components/SupportText/SupportText.js +78 -0
  191. package/lib/module/components/SupportText/SupportText.js.map +1 -0
  192. package/lib/module/components/SupportText/SupportText.mdx +48 -0
  193. package/lib/module/components/SupportText/SupportTextIcon.js +42 -0
  194. package/lib/module/components/SupportText/SupportTextIcon.js.map +1 -0
  195. package/lib/module/components/SupportText/SupportTextIcon.mdx +35 -0
  196. package/lib/module/components/SupportText/index.js +5 -0
  197. package/lib/module/components/SupportText/index.js.map +1 -0
  198. package/lib/module/components/TextInput/TextInput.mdx +9 -1
  199. package/lib/module/components/ThreadHero/ThreadHero.mdx +1 -1
  200. package/lib/module/components/Tooltip/Tooltip.mdx +5 -1
  201. package/lib/module/components/TransactionBubble/TransactionBubble.mdx +1 -1
  202. package/lib/module/components/TransactionDetails/TransactionDetails.js +2 -26
  203. package/lib/module/components/TransactionDetails/TransactionDetails.js.map +1 -1
  204. package/lib/module/components/TransactionDetails/TransactionDetails.mdx +1 -1
  205. package/lib/module/components/TransactionStatus/TransactionStatus.mdx +1 -1
  206. package/lib/module/components/UpiHandle/UpiHandle.js +9 -1
  207. package/lib/module/components/UpiHandle/UpiHandle.js.map +1 -1
  208. package/lib/module/components/UpiHandle/UpiHandle.mdx +5 -1
  209. package/lib/module/components/VStack/VStack.js +67 -0
  210. package/lib/module/components/VStack/VStack.js.map +1 -0
  211. package/lib/module/components/VStack/VStack.mdx +44 -0
  212. package/lib/module/components/index.js +4 -0
  213. package/lib/module/components/index.js.map +1 -1
  214. package/lib/module/design-tokens/JFS Variables-variables-full.json +1 -18633
  215. package/lib/module/design-tokens/figma-variables-resolver.js +2 -2
  216. package/lib/module/design-tokens/figma-variables-resolver.js.map +1 -1
  217. package/lib/module/icons/ic_info.svg +1 -0
  218. package/lib/module/icons/ic_warning.svg +1 -0
  219. package/lib/module/icons/registry.js +2 -2
  220. package/lib/module/icons/registry.js.map +1 -1
  221. package/lib/module/utils/react-utils.js +43 -0
  222. package/lib/module/utils/react-utils.js.map +1 -0
  223. package/lib/typescript/components/ActionFooter/ActionFooter.d.ts.map +1 -1
  224. package/lib/typescript/components/ActionTile/ActionTile.d.ts +1 -1
  225. package/lib/typescript/components/ActionTile/ActionTile.d.ts.map +1 -1
  226. package/lib/typescript/components/AppBar/AppBar.d.ts +34 -68
  227. package/lib/typescript/components/AppBar/AppBar.d.ts.map +1 -1
  228. package/lib/typescript/components/Balance/Balance.d.ts +44 -0
  229. package/lib/typescript/components/Balance/Balance.d.ts.map +1 -0
  230. package/lib/typescript/components/BottomNav/BottomNav.d.ts +1 -1
  231. package/lib/typescript/components/BottomNav/BottomNav.d.ts.map +1 -1
  232. package/lib/typescript/components/BottomNavItem/BottomNavItem.d.ts +1 -1
  233. package/lib/typescript/components/BottomNavItem/BottomNavItem.d.ts.map +1 -1
  234. package/lib/typescript/components/ButtonGroup/ButtonGroup.d.ts +36 -0
  235. package/lib/typescript/components/ButtonGroup/ButtonGroup.d.ts.map +1 -0
  236. package/lib/typescript/components/ChipGroup/ChipGroup.d.ts +29 -0
  237. package/lib/typescript/components/ChipGroup/ChipGroup.d.ts.map +1 -0
  238. package/lib/typescript/components/ChipSelect/ChipSelect.d.ts +47 -0
  239. package/lib/typescript/components/ChipSelect/ChipSelect.d.ts.map +1 -0
  240. package/lib/typescript/components/CtaCard/CtaCard.d.ts +1 -1
  241. package/lib/typescript/components/CtaCard/CtaCard.d.ts.map +1 -1
  242. package/lib/typescript/components/Disclaimer/Disclaimer.d.ts +1 -1
  243. package/lib/typescript/components/Disclaimer/Disclaimer.d.ts.map +1 -1
  244. package/lib/typescript/components/EmptyState/EmptyState.d.ts +38 -0
  245. package/lib/typescript/components/EmptyState/EmptyState.d.ts.map +1 -0
  246. package/lib/typescript/components/HStack/HStack.d.ts +41 -0
  247. package/lib/typescript/components/HStack/HStack.d.ts.map +1 -0
  248. package/lib/typescript/components/IconCapsule/IconCapsule.d.ts +1 -1
  249. package/lib/typescript/components/IconCapsule/IconCapsule.d.ts.map +1 -1
  250. package/lib/typescript/components/ListGroup/ListGroup.d.ts.map +1 -1
  251. package/lib/typescript/components/ListItem/ListItem.d.ts.map +1 -1
  252. package/lib/typescript/components/NavArrow/NavArrow.d.ts +3 -3
  253. package/lib/typescript/components/NavArrow/NavArrow.d.ts.map +1 -1
  254. package/lib/typescript/components/PageTitle/PageTitle.d.ts +1 -1
  255. package/lib/typescript/components/PageTitle/PageTitle.d.ts.map +1 -1
  256. package/lib/typescript/components/Screen/Screen.d.ts +23 -0
  257. package/lib/typescript/components/Screen/Screen.d.ts.map +1 -0
  258. package/lib/typescript/components/Section/Section.d.ts.map +1 -1
  259. package/lib/typescript/components/SupportText/SupportText.d.ts +34 -0
  260. package/lib/typescript/components/SupportText/SupportText.d.ts.map +1 -0
  261. package/lib/typescript/components/SupportText/SupportTextIcon.d.ts +10 -0
  262. package/lib/typescript/components/SupportText/SupportTextIcon.d.ts.map +1 -0
  263. package/lib/typescript/components/SupportText/index.d.ts +3 -0
  264. package/lib/typescript/components/SupportText/index.d.ts.map +1 -0
  265. package/lib/typescript/components/TransactionDetails/TransactionDetails.d.ts.map +1 -1
  266. package/lib/typescript/components/UpiHandle/UpiHandle.d.ts +1 -1
  267. package/lib/typescript/components/UpiHandle/UpiHandle.d.ts.map +1 -1
  268. package/lib/typescript/components/VStack/VStack.d.ts +41 -0
  269. package/lib/typescript/components/VStack/VStack.d.ts.map +1 -0
  270. package/lib/typescript/components/index.d.ts +4 -0
  271. package/lib/typescript/components/index.d.ts.map +1 -1
  272. package/lib/typescript/icons/registry.d.ts +1 -1
  273. package/lib/typescript/icons/registry.d.ts.map +1 -1
  274. package/lib/typescript/utils/react-utils.d.ts +7 -0
  275. package/lib/typescript/utils/react-utils.d.ts.map +1 -0
  276. package/package.json +7 -5
  277. package/src/components/.token-metadata.json +468 -12
  278. package/src/components/Accordion/Accordion.mdx +1 -1
  279. package/src/components/ActionFooter/ActionFooter.mdx +1 -1
  280. package/src/components/ActionFooter/ActionFooter.tsx +3 -12
  281. package/src/components/ActionTile/ActionTile.mdx +5 -1
  282. package/src/components/ActionTile/ActionTile.tsx +5 -1
  283. package/src/components/AppBar/AppBar.mdx +51 -39
  284. package/src/components/AppBar/AppBar.tsx +149 -263
  285. package/src/components/Avatar/Avatar.mdx +9 -1
  286. package/src/components/AvatarGroup/AvatarGroup.mdx +9 -1
  287. package/src/components/Badge/Badge.mdx +1 -1
  288. package/src/components/Balance/Balance.mdx +62 -0
  289. package/src/components/Balance/Balance.tsx +107 -0
  290. package/src/components/BottomNav/BottomNav.mdx +5 -1
  291. package/src/components/BottomNav/BottomNav.tsx +6 -3
  292. package/src/components/BottomNavItem/BottomNavItem.mdx +5 -1
  293. package/src/components/BottomNavItem/BottomNavItem.tsx +19 -16
  294. package/src/components/Button/Button.mdx +5 -1
  295. package/src/components/ButtonGroup/ButtonGroup.mdx +56 -0
  296. package/src/components/ButtonGroup/ButtonGroup.tsx +78 -0
  297. package/src/components/Card/Card.mdx +1 -1
  298. package/src/components/CardFeedback/CardFeedback.mdx +5 -1
  299. package/src/components/ChipGroup/ChipGroup.mdx +40 -0
  300. package/src/components/ChipGroup/ChipGroup.tsx +67 -0
  301. package/src/components/ChipSelect/ChipSelect.mdx +80 -0
  302. package/src/components/ChipSelect/ChipSelect.tsx +138 -0
  303. package/src/components/CtaCard/CtaCard.mdx +1 -1
  304. package/src/components/CtaCard/CtaCard.tsx +16 -21
  305. package/src/components/Disclaimer/Disclaimer.mdx +5 -1
  306. package/src/components/Disclaimer/Disclaimer.tsx +6 -3
  307. package/src/components/Divider/Divider.mdx +5 -1
  308. package/src/components/Drawer/Drawer.mdx +9 -1
  309. package/src/components/EmptyState/EmptyState.mdx +73 -0
  310. package/src/components/EmptyState/EmptyState.tsx +181 -0
  311. package/src/components/FilterBar/FilterBar.mdx +1 -1
  312. package/src/components/HStack/HStack.mdx +44 -0
  313. package/src/components/HStack/HStack.tsx +95 -0
  314. package/src/components/IconButton/IconButton.mdx +5 -1
  315. package/src/components/IconCapsule/IconCapsule.mdx +12 -4
  316. package/src/components/IconCapsule/IconCapsule.tsx +13 -10
  317. package/src/components/Introduction.mdx +3 -98
  318. package/src/components/LazyList/LazyList.mdx +1 -1
  319. package/src/components/ListGroup/ListGroup.mdx +5 -1
  320. package/src/components/ListGroup/ListGroup.tsx +5 -43
  321. package/src/components/ListItem/ListItem.mdx +5 -1
  322. package/src/components/ListItem/ListItem.tsx +15 -60
  323. package/src/components/MediaCard/MediaCard.mdx +5 -1
  324. package/src/components/MerchantProfile/MerchantProfile.mdx +1 -1
  325. package/src/components/MoneyValue/MoneyValue.mdx +6 -2
  326. package/src/components/NavArrow/NavArrow.mdx +5 -1
  327. package/src/components/NavArrow/NavArrow.tsx +48 -16
  328. package/src/components/PageTitle/PageTitle.mdx +5 -1
  329. package/src/components/PageTitle/PageTitle.tsx +8 -4
  330. package/src/components/Screen/Screen.mdx +58 -0
  331. package/src/components/Screen/Screen.tsx +60 -0
  332. package/src/components/Section/Section.mdx +5 -1
  333. package/src/components/Section/Section.tsx +17 -46
  334. package/src/components/Stepper/Step.mdx +5 -1
  335. package/src/components/Stepper/StepLabel.mdx +5 -1
  336. package/src/components/Stepper/Stepper.mdx +1 -1
  337. package/src/components/SupportText/SupportText.mdx +48 -0
  338. package/src/components/SupportText/SupportText.tsx +104 -0
  339. package/src/components/SupportText/SupportTextIcon.mdx +35 -0
  340. package/src/components/SupportText/SupportTextIcon.tsx +45 -0
  341. package/src/components/SupportText/index.ts +2 -0
  342. package/src/components/TextInput/TextInput.mdx +9 -1
  343. package/src/components/ThreadHero/ThreadHero.mdx +1 -1
  344. package/src/components/Tooltip/Tooltip.mdx +5 -1
  345. package/src/components/TransactionBubble/TransactionBubble.mdx +1 -1
  346. package/src/components/TransactionDetails/TransactionDetails.mdx +1 -1
  347. package/src/components/TransactionDetails/TransactionDetails.tsx +1 -38
  348. package/src/components/TransactionStatus/TransactionStatus.mdx +1 -1
  349. package/src/components/UpiHandle/UpiHandle.mdx +5 -1
  350. package/src/components/UpiHandle/UpiHandle.tsx +4 -1
  351. package/src/components/VStack/VStack.mdx +44 -0
  352. package/src/components/VStack/VStack.tsx +100 -0
  353. package/src/components/index.ts +4 -0
  354. package/src/design-tokens/JFS Variables-variables-full.json +1 -18633
  355. package/src/icons/ic_info.svg +1 -0
  356. package/src/icons/ic_warning.svg +1 -0
  357. package/src/icons/registry.ts +9 -1
  358. package/src/utils/react-utils.ts +51 -0
@@ -3,10 +3,10 @@ import { View, type ViewStyle } from 'react-native'
3
3
  import Svg, { Path } from 'react-native-svg'
4
4
  import { getVariableByName } from '../../design-tokens/figma-variables-resolver'
5
5
 
6
- type NavArrowDirection = 'Back' | 'Forward'
6
+ type NavArrowDirection = 'Back' | 'Forward' | 'Down'
7
7
 
8
8
  type NavArrowProps = {
9
- /** Direction of the arrow: 'Back' (left chevron) or 'Forward' (right chevron) */
9
+ /** Direction of the arrow: 'Back' (left chevron), 'Forward' (right chevron), or 'Down' */
10
10
  direction?: NavArrowDirection
11
11
  /** Modes used to resolve design tokens */
12
12
  modes?: Record<string, any>
@@ -31,7 +31,7 @@ type NavArrowProps = {
31
31
  *
32
32
  * @component
33
33
  * @param {Object} props
34
- * @param {'Back'|'Forward'} [props.direction='Back'] - Arrow direction
34
+ * @param {'Back'|'Forward'|'Down'} [props.direction='Back'] - Arrow direction
35
35
  * @param {Object} [props.modes={}] - Modes for design token resolution
36
36
  * @param {Object} [props.style] - Additional container styles
37
37
  */
@@ -51,18 +51,25 @@ function NavArrow({
51
51
  Number(getVariableByName('navArrow/icon/height', modes)) || 8
52
52
  const strokeWeight =
53
53
  Number(getVariableByName('navArrow/icon/strokeWeight', modes)) || 2
54
- const containerWidth =
54
+
55
+ // Base dimensions from tokens (these are for Vertical orientation like Back/Forward)
56
+ const baseContainerWidth =
55
57
  Number(getVariableByName('navArrow/width', modes)) || 6
56
- const containerHeight =
58
+ const baseContainerHeight =
57
59
  Number(getVariableByName('navArrow/height', modes)) || 10
60
+
58
61
  const borderRadius =
59
62
  Number(getVariableByName('navArrow/radius', modes)) || 0
60
63
  const backgroundColor =
61
64
  (getVariableByName('navArrow/background', modes) as string) || 'transparent'
62
65
 
66
+ // For Down direction, we swap width and height considerations
67
+ const isDown = direction === 'Down'
68
+
63
69
  const containerStyle: ViewStyle = {
64
- width: containerWidth,
65
- height: containerHeight,
70
+ // If Down, we use the height token for width and width token for height
71
+ width: isDown ? baseContainerHeight : baseContainerWidth,
72
+ height: isDown ? baseContainerWidth : baseContainerHeight,
66
73
  borderRadius,
67
74
  backgroundColor,
68
75
  alignItems: 'center',
@@ -71,12 +78,37 @@ function NavArrow({
71
78
  }
72
79
 
73
80
  const defaultAccessibilityLabel =
74
- accessibilityLabel || (direction === 'Back' ? 'Go back' : 'Go forward')
81
+ accessibilityLabel ||
82
+ (direction === 'Back'
83
+ ? 'Go back'
84
+ : direction === 'Forward'
85
+ ? 'Go forward'
86
+ : 'Go down')
87
+
88
+ // Determine SVG dimensions based on orientation
89
+ // For Down, we swap width/height so the layout box is correct (8x4 instead of 4x8)
90
+ const svgWidth = isDown ? iconHeight : iconWidth
91
+ const svgHeight = isDown ? iconWidth : iconHeight
75
92
 
76
- // SVG path for chevron - draws a simple ">" shape
77
- // For Back direction, we flip horizontally with scaleX(-1)
78
- // The path creates a chevron pointing right by default
79
- const chevronPath = `M1 1L${iconWidth - 1} ${iconHeight / 2}L1 ${iconHeight - 1}`
93
+ // SVG path generation
94
+ let chevronPath
95
+ let transform
96
+
97
+ if (isDown) {
98
+ // Arrow pointing down: M1 1 L[mid] [bottom] L[right] 1
99
+ // Width is iconHeight (8), Height is iconWidth (4)
100
+ // Tip at (4, 3), Left (1, 1), Right (7, 1)
101
+ chevronPath = `M1 1L${svgWidth / 2} ${svgHeight - 1}L${svgWidth - 1} 1`
102
+ } else {
103
+ // Arrow pointing right (Forward)
104
+ // Width is iconWidth (4), Height is iconHeight (8)
105
+ chevronPath = `M1 1L${iconWidth - 1} ${iconHeight / 2}L1 ${iconHeight - 1}`
106
+
107
+ // For Back, we just flip the Forward arrow
108
+ if (direction === 'Back') {
109
+ transform = [{ scaleX: -1 }]
110
+ }
111
+ }
80
112
 
81
113
  return (
82
114
  <View
@@ -86,10 +118,10 @@ function NavArrow({
86
118
  {...rest}
87
119
  >
88
120
  <Svg
89
- width={iconWidth}
90
- height={iconHeight}
91
- viewBox={`0 0 ${iconWidth} ${iconHeight}`}
92
- style={direction === 'Back' ? { transform: [{ scaleX: -1 }] } : undefined}
121
+ width={svgWidth}
122
+ height={svgHeight}
123
+ viewBox={`0 0 ${svgWidth} ${svgHeight}`}
124
+ style={transform ? { transform } : undefined}
93
125
  >
94
126
  <Path
95
127
  d={chevronPath}
@@ -1,4 +1,4 @@
1
- import { Meta, Story, Canvas, PureArgsTable as ArgsTable } from '@storybook/addon-docs/blocks';
1
+ import { Meta, Story, Canvas, Controls } from '@storybook/blocks';
2
2
  import * as PageTitleStories from './PageTitle.stories';
3
3
  import PageTitle from './PageTitle';
4
4
  import { AccessibilitySection, AnatomySection, UsageConstraintsSection } from '../docs/DocSections';
@@ -16,6 +16,10 @@ This component uses the following design token collections. Each collection supp
16
16
  ### Color Mode
17
17
  - **Modes:** Light | Dark
18
18
  - **Default:** Light
19
+
20
+ ### Colors Router
21
+ - **Modes:** POC | Old
22
+ - **Default:** POC
19
23
  ## Usage
20
24
 
21
25
  <Canvas>
@@ -1,6 +1,7 @@
1
1
  import React from 'react'
2
2
  import { View, Text, type StyleProp, type ViewStyle, type TextStyle } from 'react-native'
3
3
  import { getVariableByName } from '../../design-tokens/figma-variables-resolver'
4
+ import { useTokens } from '../../design-tokens/JFSThemeProvider'
4
5
 
5
6
  type PageTitleProps = {
6
7
  title?: string;
@@ -29,7 +30,7 @@ type PageTitleProps = {
29
30
  */
30
31
  function PageTitle({
31
32
  title = 'Page Title',
32
- modes = {},
33
+ modes: propModes = {},
33
34
  style,
34
35
  textStyle,
35
36
  numberOfLines,
@@ -37,6 +38,9 @@ function PageTitle({
37
38
  accessibilityHint,
38
39
  ...rest
39
40
  }: PageTitleProps) {
41
+ const { modes: globalModes } = useTokens()
42
+ const modes = { ...globalModes, ...propModes }
43
+
40
44
  // Resolve container padding tokens
41
45
  const paddingHorizontal =
42
46
  getVariableByName('pageTitle/padding/horizontal', modes) || 16
@@ -79,15 +83,15 @@ function PageTitle({
79
83
  const defaultAccessibilityLabel = accessibilityLabel || title
80
84
 
81
85
  return (
82
- <View
86
+ <View
83
87
  style={[containerStyle, style]}
84
88
  accessibilityRole="header"
85
89
  accessibilityLabel={defaultAccessibilityLabel}
86
90
  accessibilityHint={accessibilityHint}
87
91
  {...rest}
88
92
  >
89
- <Text
90
- style={[textStyleObj, textStyle]}
93
+ <Text
94
+ style={[textStyleObj, textStyle]}
91
95
  numberOfLines={numberOfLines !== undefined ? numberOfLines : 1}
92
96
  accessibilityElementsHidden={true}
93
97
  importantForAccessibility="no"
@@ -0,0 +1,58 @@
1
+ import { Canvas, Meta, Story, Controls } from '@storybook/blocks';
2
+ import * as ScreenStories from './Screen.stories';
3
+ import Screen from './Screen';
4
+
5
+ <Meta of={ScreenStories} />
6
+
7
+ # Screen
8
+
9
+ The `Screen` component acts as the outer most container for a page, providing the correct background color based on the current mode.
10
+
11
+
12
+ ## Available Collections and Modes
13
+
14
+ This component uses the following design token collections. Each collection supports multiple modes that can be configured via the `modes` prop.
15
+
16
+ ### Page type
17
+ - **Modes:** MainPage | SubPage
18
+ - **Default:** MainPage
19
+
20
+ ### Color Mode
21
+ - **Modes:** Light | Dark
22
+ - **Default:** Light
23
+
24
+ ### Colors Router
25
+ - **Modes:** POC | Old
26
+ - **Default:** POC
27
+ ## Usage
28
+
29
+ ```tsx
30
+ import Screen from 'jfs-components/src/components/Screen/Screen';
31
+
32
+ function MyPage(props) {
33
+ return (
34
+ <Screen modes={props.modes}>
35
+ {/* Content goes here */}
36
+ </Screen>
37
+ );
38
+ }
39
+ ```
40
+
41
+ ## Props
42
+
43
+ <Controls />
44
+
45
+ ## Examples
46
+
47
+ ### Default
48
+
49
+ <Canvas of={ScreenStories.Default} />
50
+
51
+
52
+ ## Design Tokens
53
+
54
+ This component uses the following design tokens, resolved through `getVariableByName`:
55
+
56
+ - **`screen/body/background`**
57
+
58
+ All tokens support mode-based theming through the `modes` prop.
@@ -0,0 +1,60 @@
1
+ import React, { ReactNode } from 'react'
2
+ import { View, StyleProp, ViewStyle } from 'react-native'
3
+ import { getVariableByName } from '../../design-tokens/figma-variables-resolver'
4
+ import { useTokens } from '../../design-tokens/JFSThemeProvider'
5
+
6
+ /**
7
+ * Helper function to recursively clone children and pass modes prop to components that accept it.
8
+ * This ensures that all child components in slots receive the modes prop from the parent.
9
+ */
10
+ import { cloneChildrenWithModes } from '../../utils/react-utils'
11
+
12
+ export interface ScreenProps {
13
+ /**
14
+ * The content to display inside the screen.
15
+ */
16
+ children?: ReactNode;
17
+ /**
18
+ * Modes object to override default variable values.
19
+ */
20
+ modes?: Record<string, any>;
21
+ /**
22
+ * Optional style overrides for the container.
23
+ */
24
+ style?: StyleProp<ViewStyle>;
25
+ }
26
+
27
+ /**
28
+ * Screen component that acts as the outer most container providing the background color.
29
+ * Matches Figma node 201:49.
30
+ */
31
+ export const Screen = ({
32
+ children,
33
+ modes: propModes = {},
34
+ style
35
+ }: ScreenProps) => {
36
+ const { modes: globalModes } = useTokens()
37
+ const modes = { ...globalModes, ...propModes }
38
+
39
+ const backgroundColor = getVariableByName('screen/body/background', modes)
40
+
41
+ const containerStyle: ViewStyle = {
42
+ flex: 1,
43
+ backgroundColor,
44
+ width: '100%',
45
+ height: '100%',
46
+ }
47
+
48
+ // Pass modes down to children
49
+ const processedChildren = children
50
+ ? cloneChildrenWithModes(React.Children.toArray(children), modes)
51
+ : null
52
+
53
+ return (
54
+ <View style={[containerStyle, style]} data-node-id="201:49">
55
+ {processedChildren}
56
+ </View>
57
+ )
58
+ }
59
+
60
+ export default Screen
@@ -1,4 +1,4 @@
1
- import { Meta, Story, Canvas, PureArgsTable as ArgsTable } from '@storybook/addon-docs/blocks';
1
+ import { Meta, Story, Canvas, Controls } from '@storybook/blocks';
2
2
  import * as SectionStories from './Section.stories';
3
3
  import Section from './Section';
4
4
  import { AccessibilitySection, AnatomySection, UsageConstraintsSection } from '../docs/DocSections';
@@ -17,6 +17,10 @@ This component uses the following design token collections. Each collection supp
17
17
  - **Modes:** Light | Dark
18
18
  - **Default:** Light
19
19
 
20
+ ### Colors Router
21
+ - **Modes:** POC | Old
22
+ - **Default:** POC
23
+
20
24
  ### Padding
21
25
  - **Modes:** Default | None
22
26
  - **Default:** Default
@@ -3,6 +3,7 @@ import { View, Text, Pressable, type StyleProp, type ViewStyle, type PressableSt
3
3
  import { getVariableByName } from '../../design-tokens/figma-variables-resolver'
4
4
  import Icon from '../../icons/Icon'
5
5
  import { usePressableWebSupport, type WebAccessibilityProps } from '../../utils/web-platform-utils'
6
+ import { cloneChildrenWithModes } from '../../utils/react-utils'
6
7
 
7
8
  type SectionProps = {
8
9
  title?: string;
@@ -135,7 +136,7 @@ function Section({
135
136
  }
136
137
 
137
138
  // Generate default accessibility label from title and supportText
138
- const defaultAccessibilityLabel = accessibilityLabel ||
139
+ const defaultAccessibilityLabel = accessibilityLabel ||
139
140
  (showSupportText ? `${title}. ${supportText}` : title)
140
141
 
141
142
  // Get web platform support props (only used when onPress is defined)
@@ -150,8 +151,8 @@ function Section({
150
151
  const headerContent = (
151
152
  <>
152
153
  <View style={headerWrapStyle}>
153
- <Text
154
- style={titleStyle}
154
+ <Text
155
+ style={titleStyle}
155
156
  numberOfLines={1}
156
157
  accessibilityElementsHidden={true}
157
158
  importantForAccessibility="no"
@@ -159,9 +160,9 @@ function Section({
159
160
  {title}
160
161
  </Text>
161
162
  {onPress && (
162
- <Icon
163
- name="ic_chevron_right"
164
- size={24}
163
+ <Icon
164
+ name="ic_chevron_right"
165
+ size={24}
165
166
  color={titleColor}
166
167
  accessibilityElementsHidden={true}
167
168
  importantForAccessibility="no"
@@ -169,8 +170,8 @@ function Section({
169
170
  )}
170
171
  </View>
171
172
  {showSupportText && (
172
- <Text
173
- style={supportTextStyle}
173
+ <Text
174
+ style={supportTextStyle}
174
175
  numberOfLines={2}
175
176
  accessibilityElementsHidden={true}
176
177
  importantForAccessibility="no"
@@ -182,7 +183,7 @@ function Section({
182
183
  )
183
184
 
184
185
  return (
185
- <View
186
+ <View
186
187
  style={[containerStyle, style]}
187
188
  accessibilityRole={'region' as any}
188
189
  accessibilityLabel={defaultAccessibilityLabel}
@@ -197,27 +198,27 @@ function Section({
197
198
  onPress={onPress}
198
199
  onPressIn={(e: any) => {
199
200
  setIsHeaderPressed(true)
200
- ;(rest as any)?.onPressIn?.(e)
201
+ ; (rest as any)?.onPressIn?.(e)
201
202
  }}
202
203
  onPressOut={(e: any) => {
203
204
  setIsHeaderPressed(false)
204
- ;(rest as any)?.onPressOut?.(e)
205
+ ; (rest as any)?.onPressOut?.(e)
205
206
  }}
206
207
  onFocus={(e: any) => {
207
208
  setIsHeaderFocused(true)
208
- ;(rest as any)?.onFocus?.(e)
209
+ ; (rest as any)?.onFocus?.(e)
209
210
  }}
210
211
  onBlur={(e: any) => {
211
212
  setIsHeaderFocused(false)
212
- ;(rest as any)?.onBlur?.(e)
213
+ ; (rest as any)?.onBlur?.(e)
213
214
  }}
214
215
  onHoverIn={(e: any) => {
215
216
  setIsHeaderHovered(true)
216
- ;(rest as any)?.onHoverIn?.(e)
217
+ ; (rest as any)?.onHoverIn?.(e)
217
218
  }}
218
219
  onHoverOut={(e: any) => {
219
220
  setIsHeaderHovered(false)
220
- ;(rest as any)?.onHoverOut?.(e)
221
+ ; (rest as any)?.onHoverOut?.(e)
221
222
  }}
222
223
  style={({ pressed }: PressableStateCallbackType) => [
223
224
  headerStyle,
@@ -298,37 +299,7 @@ function SectionBento({
298
299
  gap,
299
300
  }
300
301
 
301
- // Helper function to clone children with modes (same as in Section component)
302
- const cloneChildrenWithModes = (
303
- children: React.ReactNode,
304
- modes: Record<string, any>
305
- ): React.ReactNode[] => {
306
- const result = React.Children.map(children, (child) => {
307
- if (!React.isValidElement(child)) {
308
- return child
309
- }
310
302
 
311
- const childChildren = (child.props as any)?.children
312
- const hasChildren = childChildren !== undefined && childChildren !== null
313
- const existingModes = (child.props as any)?.modes
314
- // Merge order: parent modes first, then child's explicit modes override them
315
- const mergedModes = existingModes ? { ...modes, ...existingModes } : modes
316
-
317
- const processedChildren: React.ReactNode | undefined = hasChildren
318
- ? cloneChildrenWithModes(React.Children.toArray(childChildren), modes)
319
- : undefined
320
-
321
- return React.cloneElement(
322
- child,
323
- {
324
- ...(child.props as any),
325
- modes: mergedModes,
326
- },
327
- processedChildren
328
- )
329
- })
330
- return result || []
331
- }
332
303
 
333
304
  // Process slots to pass modes to children
334
305
  const processedNavSlot = navSlot
@@ -340,7 +311,7 @@ function SectionBento({
340
311
  : null
341
312
 
342
313
  return (
343
- <View
314
+ <View
344
315
  style={[containerStyle, style]}
345
316
  accessibilityRole={'region' as any}
346
317
  accessibilityLabel={accessibilityLabel}
@@ -1,4 +1,4 @@
1
- import { Meta, Story, Canvas, PureArgsTable as ArgsTable } from '@storybook/addon-docs/blocks';
1
+ import { Meta, Story, Canvas, Controls } from '@storybook/blocks';
2
2
  import * as StepStories from './Step.stories';
3
3
  import { Step } from './Step';
4
4
 
@@ -19,6 +19,10 @@ This component uses the following design token collections. Each collection supp
19
19
  ### Color Mode
20
20
  - **Modes:** Light | Dark
21
21
  - **Default:** Light
22
+
23
+ ### Colors Router
24
+ - **Modes:** POC | Old
25
+ - **Default:** POC
22
26
  ## Usage
23
27
 
24
28
  <Canvas>
@@ -1,4 +1,4 @@
1
- import { Meta, Story, Canvas, PureArgsTable as ArgsTable } from '@storybook/addon-docs/blocks';
1
+ import { Meta, Story, Canvas, Controls } from '@storybook/blocks';
2
2
  import * as StepLabelStories from './StepLabel.stories';
3
3
  import { StepLabel } from './StepLabel';
4
4
 
@@ -15,6 +15,10 @@ This component uses the following design token collections. Each collection supp
15
15
  ### Color Mode
16
16
  - **Modes:** Light | Dark
17
17
  - **Default:** Light
18
+
19
+ ### Colors Router
20
+ - **Modes:** POC | Old
21
+ - **Default:** POC
18
22
  ## Usage
19
23
 
20
24
  <Canvas>
@@ -1,4 +1,4 @@
1
- import { Meta, Story, Canvas, PureArgsTable as ArgsTable } from '@storybook/addon-docs/blocks';
1
+ import { Meta, Story, Canvas, Controls } from '@storybook/blocks';
2
2
  import * as StepperStories from './Stepper.stories';
3
3
  import Stepper from './Stepper';
4
4
 
@@ -0,0 +1,48 @@
1
+ import { Canvas, Meta, Story, Controls } from '@storybook/blocks';
2
+ import * as SupportTextStories from './SupportText.stories';
3
+ import SupportText from './SupportText';
4
+
5
+ <Meta of={SupportTextStories} />
6
+
7
+ # SupportText
8
+
9
+ A component for displaying status messages with icons.
10
+
11
+ <Canvas>
12
+ <Story of={SupportTextStories.Default} />
13
+ </Canvas>
14
+
15
+ ## Props
16
+
17
+ <Controls />
18
+
19
+
20
+ ## Available Collections and Modes
21
+
22
+ This component uses the following design token collections. Each collection supports multiple modes that can be configured via the `modes` prop.
23
+
24
+ ### Status
25
+ - **Modes:** Neutral | Warning | Error | Success
26
+ - **Default:** Neutral
27
+ ## Usage
28
+
29
+ ```tsx
30
+ import { SupportText } from 'jfs-components';
31
+
32
+ <SupportText status="Success" label="Operation successful" />
33
+ <SupportText status="Error" label="Something went wrong" />
34
+ ```
35
+
36
+
37
+ ## Design Tokens
38
+
39
+ This component uses the following design tokens, resolved through `getVariableByName`:
40
+
41
+ - **`supportText/fontFamily`**
42
+ - **`supportText/fontSize`**
43
+ - **`supportText/fontWeight`**
44
+ - **`supportText/foreground`**
45
+ - **`supportText/gap`**
46
+ - **`supportText/lineHeight`**
47
+
48
+ All tokens support mode-based theming through the `modes` prop.
@@ -0,0 +1,104 @@
1
+ import React from 'react';
2
+ import { View, Text, type StyleProp, type ViewStyle, type TextStyle } from 'react-native';
3
+ import { getVariableByName } from '../../design-tokens/figma-variables-resolver';
4
+ import { useTokens } from '../../design-tokens/JFSThemeProvider';
5
+ import SupportTextIcon, { type SupportTextStatus } from './SupportTextIcon';
6
+
7
+ type SupportTextProps = {
8
+ /**
9
+ * Text to display
10
+ */
11
+ label?: string;
12
+ /**
13
+ * Status of the support text (Neutral, Warning, Error, Success)
14
+ */
15
+ status?: SupportTextStatus;
16
+ /**
17
+ * Optional custom slot for the icon.
18
+ * Overrides default SupportTextIcon.
19
+ */
20
+ iconSlot?: React.ReactNode;
21
+ /**
22
+ * Optional custom slot for the text area.
23
+ * Overrides default Text.
24
+ */
25
+ textSlot?: React.ReactNode;
26
+ /**
27
+ * Modes object for design token resolution.
28
+ */
29
+ modes?: Record<string, any>;
30
+
31
+ style?: StyleProp<ViewStyle>;
32
+ };
33
+
34
+ /**
35
+ * SupportText component displaying a status icon and label.
36
+ */
37
+ function SupportText({
38
+ label = 'Support Text',
39
+ status = 'Neutral',
40
+ iconSlot,
41
+ textSlot,
42
+ modes: propModes = {},
43
+ style,
44
+ }: SupportTextProps) {
45
+ const { modes: globalModes } = useTokens();
46
+
47
+ // Merge modes. We might want to inject the status mode here if we knew the collection name.
48
+ // For now, we rely on the parent passing the correct mode or the status prop driving logic outside tokens if needed (but tokens are preferred).
49
+ // Strategy: We pass 'modes' as is. If the user wants "Success" styling (green), they should likely pass modes={{ 'SupportText': 'Success' }} AND status="Success".
50
+ // However, for convenience, we could eventually map status to modes if we determine the key.
51
+ const modes = { ...globalModes, ...propModes };
52
+
53
+ // --- Token Resolution ---
54
+ const gap = parseInt(getVariableByName('supportText/gap', modes), 10) || 4;
55
+
56
+ const textColor = getVariableByName('supportText/foreground', modes) || '#0c0d10';
57
+ const fontFamily = getVariableByName('supportText/fontFamily', modes) || 'JioType Var';
58
+ const fontSize = parseInt(getVariableByName('supportText/fontSize', modes), 10) || 12;
59
+ const lineHeight = parseInt(getVariableByName('supportText/lineHeight', modes), 10) || 16;
60
+ const fontWeight = getVariableByName('supportText/fontWeight', modes) || '500';
61
+
62
+ // --- Styles ---
63
+ const containerStyle: ViewStyle = {
64
+ flexDirection: 'row',
65
+ alignItems: 'center',
66
+ gap: gap,
67
+ };
68
+
69
+ const textStyle: TextStyle = {
70
+ color: textColor,
71
+ fontFamily,
72
+ fontSize,
73
+ lineHeight,
74
+ fontWeight: fontWeight as any,
75
+ flexShrink: 1, // Ensure text wraps if needed
76
+ };
77
+
78
+ const renderSlot = (slot: React.ReactNode) => {
79
+ if (React.isValidElement(slot)) {
80
+ return React.cloneElement(slot as React.ReactElement<any>, {
81
+ modes: { ...modes, ...(slot as any).props.modes },
82
+ });
83
+ }
84
+ return slot;
85
+ };
86
+
87
+ return (
88
+ <View style={[containerStyle, style]}>
89
+ {iconSlot ? (
90
+ renderSlot(iconSlot)
91
+ ) : (
92
+ <SupportTextIcon status={status} modes={modes} />
93
+ )}
94
+
95
+ {textSlot ? (
96
+ renderSlot(textSlot)
97
+ ) : (
98
+ <Text style={textStyle}>{label}</Text>
99
+ )}
100
+ </View>
101
+ );
102
+ }
103
+
104
+ export default SupportText;
@@ -0,0 +1,35 @@
1
+ import { Meta, Story, Canvas, Controls } from '@storybook/blocks';
2
+ import * as SupportTextIconStories from './SupportTextIcon.stories';
3
+ import SupportTextIcon from './SupportTextIcon';
4
+
5
+ <Meta of={SupportTextIconStories} />
6
+
7
+ # SupportTextIcon
8
+
9
+ SupportTextIcon component with design-token-driven styling.
10
+
11
+ ## Available Collections and Modes
12
+
13
+ This component uses the following design token collections. Each collection supports multiple modes that can be configured via the `modes` prop.
14
+
15
+ ### Status
16
+ - **Modes:** Neutral | Warning | Error | Success
17
+ - **Default:** Neutral
18
+ ## Usage
19
+
20
+ <Canvas>
21
+ <Story of={SupportTextIconStories.Default} />
22
+ </Canvas>
23
+
24
+ ## Props
25
+
26
+ <Controls of={SupportTextIconStories.Default} />
27
+
28
+ ## Design Tokens
29
+
30
+ This component uses the following design tokens, resolved through `getVariableByName`:
31
+
32
+ - **`supportText/foreground`**
33
+ - **`supportText/icon/size`**
34
+
35
+ All tokens support mode-based theming through the `modes` prop.