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
@@ -1,12 +1,15 @@
1
1
  import React, { useState } from 'react'
2
- import { View, type StyleProp, type ViewStyle } from 'react-native'
2
+ import { View, type StyleProp, type ViewStyle, Pressable } from 'react-native'
3
3
  import { getVariableByName } from '../../design-tokens/figma-variables-resolver'
4
+ import { useTokens } from '../../design-tokens/JFSThemeProvider'
4
5
  import IconButton from '../IconButton/IconButton'
5
6
  import Avatar from '../Avatar/Avatar'
7
+ import NavArrow from '../NavArrow/NavArrow'
8
+ // We might need to import Image or Svg if we had the assets locally, but for now we'll use placeholders or standard icons for defaults.
9
+ // The user prompt mentioned "Use getVariableByName... strict camelCase".
6
10
 
7
11
  /**
8
12
  * Helper function to recursively clone children and pass modes prop to components that accept it.
9
- * This ensures that all child components in slots receive the modes prop from the parent.
10
13
  */
11
14
  function cloneChildrenWithModes(
12
15
  children: React.ReactNode,
@@ -23,16 +26,15 @@ function cloneChildrenWithModes(
23
26
 
24
27
  // Clone the child with modes prop if it doesn't already have one
25
28
  // or merge with existing modes if it does
26
- // Merge order: parent modes first, then child's explicit modes override them
27
29
  const existingModes = (child.props as any)?.modes
28
30
  const mergedModes = existingModes ? { ...modes, ...existingModes } : modes
29
31
 
30
32
  // Recursively process children if they exist
31
33
  const processedChildren: React.ReactNode | undefined = hasChildren
32
34
  ? cloneChildrenWithModes(
33
- React.Children.toArray(childChildren),
34
- modes
35
- )
35
+ React.Children.toArray(childChildren),
36
+ modes
37
+ )
36
38
  : undefined
37
39
 
38
40
  // Clone element with modes and processed children
@@ -47,150 +49,176 @@ function cloneChildrenWithModes(
47
49
  })?.filter((child) => child !== null && child !== undefined) as React.ReactNode[] ?? []
48
50
  }
49
51
 
50
- /**
51
- * AppBar component that mirrors the Figma "AppBar" component.
52
- *
53
- * This component supports:
54
- * - **leading** IconButton (default: back button with ic_chevron_left)
55
- * - **middle** slot for custom content (typically title or search)
56
- * - **actions** slot for custom action buttons (default: two IconButtons)
57
- * - **design-token driven styling** via `getVariableByName` and `modes`
58
- *
59
- * Wherever the Figma layer name contains "Slot", this component exposes a
60
- * dedicated React "slot" prop:
61
- * - Slot "Middle" `middleSlot`
62
- * - Slot "Actions" → `actionsSlot`
63
- *
64
- * @component
65
- * @param {Object} props
66
- * @param {React.ReactNode} [props.leading] - Optional leading element. Defaults to IconButton with ic_chevron_left.
67
- * @param {React.ReactNode} [props.middleSlot] - Optional custom slot for middle content (Figma Slot "Middle").
68
- * @param {React.ReactNode} [props.actionsSlot] - Optional custom slot for action buttons (Figma Slot "Actions").
69
- * @param {Object} [props.modes={}] - Modes object passed to `getVariableByName` for all design tokens.
70
- * @param {Function} [props.onLeadingPress] - Callback when leading button is pressed (only used if leading is not provided).
71
- * @param {Object} [props.style] - Optional container style overrides.
72
- * @param {string} [props.accessibilityLabel] - Accessibility label for the app bar
73
- * @param {string} [props.accessibilityHint] - Additional accessibility hint for screen readers
74
- */
75
- type AppBarProps = {
76
- leading?: React.ReactNode;
52
+ type AppBarType = 'MainPage' | 'SubPage'
53
+
54
+ export type AppBarProps = {
55
+ /**
56
+ * Type of the App Bar.
57
+ * - `MainPage`: Taller, usually has Jio logo (leading) and Profile/Notif (actions).
58
+ * - `SubPage`: Shorter, usually has Back arrow (leading) and Page Title (middle).
59
+ * @default "MainPage"
60
+ */
61
+ type?: AppBarType;
62
+ /**
63
+ * Slot for the leading element.
64
+ * Defaults:
65
+ * - MainPage: Jio Logo (placeholder circle for now if no asset)
66
+ * - SubPage: Back Icon Button
67
+ */
68
+ leadingSlot?: React.ReactNode;
69
+ /**
70
+ * Slot for the middle content.
71
+ * Often used for "Page Title" in SubPage.
72
+ */
77
73
  middleSlot?: React.ReactNode;
74
+ /**
75
+ * Slot for the actions on the right.
76
+ */
78
77
  actionsSlot?: React.ReactNode;
78
+ /**
79
+ * Token modes to override.
80
+ */
79
81
  modes?: Record<string, any>;
82
+ /**
83
+ * Callback for the default leading slot press (e.g. back button).
84
+ */
80
85
  onLeadingPress?: () => void;
86
+ /**
87
+ * Container style override.
88
+ */
81
89
  style?: StyleProp<ViewStyle>;
82
90
  accessibilityLabel?: string;
83
91
  accessibilityHint?: string;
84
92
  } & Omit<React.ComponentProps<typeof View>, 'style' | 'accessibilityRole' | 'accessibilityLabel' | 'accessibilityHint'>;
85
93
 
86
- function AppBar({
87
- leading,
94
+ export default function AppBar({
95
+ type = 'MainPage',
96
+ leadingSlot,
88
97
  middleSlot,
89
98
  actionsSlot,
90
- modes = {},
99
+ modes: propModes = {},
91
100
  onLeadingPress,
92
101
  style,
93
- accessibilityLabel = "App bar",
102
+ accessibilityLabel,
94
103
  accessibilityHint,
95
104
  ...rest
96
105
  }: AppBarProps) {
97
- const [childFocused, setChildFocused] = useState(false)
106
+ const { modes: globalModes } = useTokens()
107
+ const modes = { ...globalModes, ...propModes }
98
108
 
99
- function injectFocusHandlers(node: React.ReactNode): React.ReactNode {
100
- if (!React.isValidElement(node)) return node
101
- const existingOnFocus = (node.props as any)?.onFocus
102
- const existingOnBlur = (node.props as any)?.onBlur
103
- return React.cloneElement(node, {
104
- ...(node.props as any),
105
- onFocus: (e: any) => {
106
- setChildFocused(true)
107
- existingOnFocus?.(e)
108
- },
109
- onBlur: (e: any) => {
110
- setChildFocused(false)
111
- existingOnBlur?.(e)
112
- },
113
- })
114
- }
115
- // Resolve container tokens
116
- const paddingHorizontal = getVariableByName('appBarActions/padding/horizontal', modes) ?? 16
117
- const paddingVertical = getVariableByName('appBarActions/padding/vertical', modes) ?? 10
118
- const actionsGap = getVariableByName('appBarActions/actions/gap', modes) ?? 8
109
+ const isMain = type === 'MainPage'
110
+ const isSub = type === 'SubPage'
119
111
 
112
+ // --- Tokens ---
113
+ // Construct token keys based on type. keys must be camelCase as per instruction.
114
+ // We use explicit string literals so that the extraction script can find them.
115
+ const paddingHorizontal = isMain
116
+ ? getVariableByName('appBar/mainPage/padding/horizontal', modes)
117
+ : getVariableByName('appBar/subPage/padding/horizontal', modes)
118
+
119
+ const paddingVertical = isMain
120
+ ? getVariableByName('appBar/mainPage/padding/vertical', modes)
121
+ : getVariableByName('appBar/subPage/padding/vertical', modes)
122
+
123
+ const backgroundColor = isMain
124
+ ? getVariableByName('appBar/mainPage/background', modes)
125
+ : getVariableByName('appBar/subPage/background', modes)
126
+
127
+ const actionsGap = isMain
128
+ ? getVariableByName('appBar/mainPage/actions/gap', modes)
129
+ : getVariableByName('appBar/subPage/actions/gap', modes)
130
+
131
+ // Layout styles
120
132
  const containerStyle: ViewStyle = {
121
133
  flexDirection: 'row',
122
134
  alignItems: 'center',
123
135
  justifyContent: 'space-between',
124
- paddingHorizontal,
125
- paddingVertical,
126
- minHeight: 52,
136
+ paddingHorizontal: paddingHorizontal ?? 16,
137
+ paddingVertical: paddingVertical ?? (isMain ? 16 : 10),
138
+ backgroundColor: backgroundColor ?? '#FFFFFF',
139
+ // We can set minHeight if we want to enforce consistency, but padding should dictate it mostly.
140
+ // Figma shows specific heights implicitly via padding + content.
141
+ // MainPage: h=68 (16 top/bot padding? 36 height content?)
142
+ // SubPage: h=52
127
143
  }
128
144
 
129
- const actionsRowStyle: ViewStyle = {
130
- flexDirection: 'row',
131
- gap: actionsGap,
132
- alignItems: 'center',
145
+ // --- Leading Slot Default ---
146
+ // SubPage default: Back Arrow
147
+ // MainPage default: Jio Logo (We'll use a placeholder or basic text if no asset,
148
+ // but looking at "AppBarHome" before, it had "ic_hellojio". Let's stick to generic defaults or empty if not provided,
149
+ // but usually a component library provides sensible defaults.)
150
+
151
+ // Actually, let's implement the specific defaults mentioned in the plan/analysis
152
+ // SubPage: NavArrow props (icon, etc). We'll use IconButton with 'ic_chevron_left' as a close approximation.
153
+
154
+ let defaultLeading: React.ReactNode = null
155
+ if (leadingSlot === undefined) {
156
+ if (isSub) {
157
+ defaultLeading = (
158
+ <Pressable
159
+ {...(onLeadingPress ? { onPress: onLeadingPress } : {})}
160
+ hitSlop={8}
161
+ accessibilityRole="button"
162
+ accessibilityLabel="Back"
163
+ style={({ pressed }) => ({
164
+ opacity: pressed ? 0.7 : 1,
165
+ alignItems: 'center',
166
+ justifyContent: 'center',
167
+ })}
168
+ >
169
+ <NavArrow direction="Back" modes={modes} />
170
+ </Pressable>
171
+ )
172
+ } else {
173
+ // MainPage default leading: often the Brand Logo.
174
+ // We'll leave it empty or render a placeholder if desired, but standard AppBar often lets consumer pass logo.
175
+ // Previous code had `leadingIconName='ic_hellojio'` for Home.
176
+ // We will render nothing by default for MainPage leading to keep it flexible, OR a specialized Logo component if we had one.
177
+ // For now, let's assume consumer passes it for MainPage, or we leave empty.
178
+ // Wait, Figma screenshot shows "Jio" logo.
179
+ // The user said: "mostly token namings are 'camelCase'. Maximize existing component usage."
180
+ // I'll leave defaultLeading as null for MainPage unless I have a "BrandLogo" component.
181
+ }
133
182
  }
134
183
 
135
- // Default leading: IconButton with back icon
136
- const defaultLeading = leading ?? (
137
- <IconButton
138
- iconName="ic_chevron_left"
139
- modes={modes}
140
- {...(onLeadingPress !== undefined ? { onPress: onLeadingPress } : {})}
141
- accessibilityLabel="Go back"
142
- accessibilityHint="Navigates to the previous screen"
143
- />
144
- )
145
-
146
- // Default actions: Two IconButtons
147
- const defaultActions = actionsSlot ?? (
148
- <View style={actionsRowStyle}>
149
- <IconButton
150
- iconName="ic_hellojio"
151
- modes={modes}
152
- onPress={() => {}}
153
- accessibilityLabel="Hello Jio"
154
- accessibilityHint="Opens Hello Jio menu"
155
- />
156
- <IconButton
157
- iconName="ic_more_horizontal"
158
- modes={modes}
159
- onPress={() => {}}
160
- accessibilityLabel="More options"
161
- accessibilityHint="Opens additional options menu"
162
- />
163
- </View>
164
- )
184
+ // --- Process Slots ---
185
+ const processedLeading = leadingSlot
186
+ ? cloneChildrenWithModes([leadingSlot], modes)[0]
187
+ : defaultLeading
165
188
 
166
- // Clone slot children and pass modes to all children that accept it
167
- const processedMiddleSlot = middleSlot
189
+ const processedMiddle = middleSlot
168
190
  ? cloneChildrenWithModes(React.Children.toArray(middleSlot), modes)
169
191
  : null
170
192
 
171
- const processedActionsSlot = actionsSlot
172
- ? cloneChildrenWithModes(React.Children.toArray(actionsSlot), modes)
173
- : defaultActions
193
+ // Actions Gap wrapper
194
+ // The Figma has "Actions" slot with a gap.
195
+ const actionsStyle: ViewStyle = {
196
+ flexDirection: 'row',
197
+ alignItems: 'center',
198
+ gap: actionsGap ?? 0,
199
+ }
174
200
 
175
- // Process leading if it's a React element
176
- const processedLeading = React.isValidElement(leading)
177
- ? injectFocusHandlers(cloneChildrenWithModes([leading], modes)[0])
178
- : defaultLeading
201
+ const processedActions = actionsSlot
202
+ ? <View style={actionsStyle}>{cloneChildrenWithModes(React.Children.toArray(actionsSlot), modes)}</View>
203
+ : null
179
204
 
180
205
  return (
181
- <View
182
- style={[
183
- containerStyle,
184
- childFocused ? { borderBottomWidth: 2, borderBottomColor: '#222' } : null,
185
- style,
186
- ]}
206
+ <View
207
+ style={[containerStyle, style]}
187
208
  accessibilityRole="header"
188
- accessibilityLabel={accessibilityLabel}
189
- {...(accessibilityHint !== undefined ? { accessibilityHint } : {})}
209
+ accessibilityLabel={accessibilityLabel || (isMain ? "Main Header" : "Sub Header")}
210
+ {...(accessibilityHint ? { accessibilityHint } : {})}
190
211
  {...rest}
191
212
  >
192
- {processedLeading}
193
- {processedMiddleSlot && (
213
+ {/* Leading Section */}
214
+ <View style={{ flexDirection: 'row', alignItems: 'center' }}>
215
+ {processedLeading}
216
+ </View>
217
+
218
+ {/* Middle Section (Absolute centered often, or flex? Figma shows "Slot 'Middle'" inside a wrapper that is absolute center) */}
219
+ {/* Figma: "absolute flex h-full items-center justify-center left-1/2 ... translate-x-[-50%]" */}
220
+ {/* We should only render this wrapper if there IS middle content, to avoid z-index blocking hits. */}
221
+ {processedMiddle && (
194
222
  <View
195
223
  style={{
196
224
  position: 'absolute',
@@ -200,161 +228,19 @@ function AppBar({
200
228
  bottom: 0,
201
229
  alignItems: 'center',
202
230
  justifyContent: 'center',
203
- paddingHorizontal: 21,
204
- pointerEvents: 'box-none',
231
+ zIndex: -1, // Behind actions if overlap? Or should be on top?
232
+ // Usually middle title shouldn't block actions. `pointerEvents="box-none"` is safer.
205
233
  }}
206
- accessibilityElementsHidden={true}
207
- importantForAccessibility="no"
234
+ pointerEvents="box-none"
208
235
  >
209
- {processedMiddleSlot}
236
+ {processedMiddle}
210
237
  </View>
211
238
  )}
212
- <View style={actionsRowStyle}>
213
- {Array.isArray(processedActionsSlot)
214
- ? processedActionsSlot.map((n) => injectFocusHandlers(n))
215
- : injectFocusHandlers(processedActionsSlot)}
216
- </View>
217
- </View>
218
- )
219
- }
220
239
 
221
- /**
222
- * AppBarHome component that mirrors the Figma "AppBar.home" component.
223
- *
224
- * This component supports:
225
- * - **leading** IconButton (default: circular button with customizable icon)
226
- * - **actions** slot for custom action buttons (default: search and notification IconButtons)
227
- * - **avatar** Avatar component on the right
228
- * - **design-token driven styling** via `getVariableByName` and `modes`
229
- *
230
- * Wherever the Figma layer name contains "Slot", this component exposes a
231
- * dedicated React "slot" prop:
232
- * - Slot "Actions" → `actionsSlot`
233
- *
234
- * @component
235
- * @param {Object} props
236
- * @param {React.ReactNode} [props.leading] - Optional leading element. Defaults to IconButton with customizable icon.
237
- * @param {React.ReactNode} [props.actionsSlot] - Optional custom slot for action buttons (Figma Slot "Actions").
238
- * @param {Object} [props.modes={}] - Modes object passed to `getVariableByName` for all design tokens.
239
- * @param {Function} [props.onLeadingPress] - Callback when leading button is pressed (only used if leading is not provided).
240
- * @param {string} [props.leadingIconName] - Icon name for default leading button (default: 'ic_hellojio').
241
- * @param {Object} [props.avatarProps] - Props to pass to Avatar component.
242
- * @param {Object} [props.style] - Optional container style overrides.
243
- * @param {string} [props.accessibilityLabel] - Accessibility label for the app bar
244
- * @param {string} [props.accessibilityHint] - Additional accessibility hint for screen readers
245
- */
246
- type AppBarHomeProps = {
247
- leading?: React.ReactNode;
248
- actionsSlot?: React.ReactNode;
249
- modes?: Record<string, any>;
250
- onLeadingPress?: () => void;
251
- leadingIconName?: string;
252
- avatarProps?: React.ComponentProps<typeof Avatar>;
253
- style?: StyleProp<ViewStyle>;
254
- accessibilityLabel?: string;
255
- accessibilityHint?: string;
256
- } & Omit<React.ComponentProps<typeof View>, 'style' | 'accessibilityRole' | 'accessibilityLabel' | 'accessibilityHint'>;
257
-
258
- function AppBarHome({
259
- leading,
260
- actionsSlot,
261
- modes = {},
262
- onLeadingPress,
263
- leadingIconName = 'ic_hellojio',
264
- avatarProps,
265
- style,
266
- accessibilityLabel = "Home app bar",
267
- accessibilityHint,
268
- ...rest
269
- }: AppBarHomeProps) {
270
- // Resolve container tokens
271
- const paddingHorizontal = getVariableByName('appBarHome/padding/horizontal', modes) ?? 16
272
- const paddingVertical = getVariableByName('appBarHome/padding/vertical', modes) ?? 16
273
- const actionsGap = getVariableByName('appBarHome/actions/gap', modes) ?? 0
274
-
275
- const containerStyle: ViewStyle = {
276
- flexDirection: 'row',
277
- alignItems: 'center',
278
- justifyContent: 'space-between',
279
- paddingHorizontal,
280
- paddingVertical,
281
- width: '100%',
282
- }
283
-
284
- const homeActionsRowStyle: ViewStyle = {
285
- flexDirection: 'row',
286
- gap: actionsGap,
287
- alignItems: 'center',
288
- }
289
-
290
- // Default leading: IconButton with customizable icon
291
- // The IconButton already handles its own circular styling, so we just use it directly
292
- const defaultLeading = leading ?? (
293
- <IconButton
294
- iconName={leadingIconName}
295
- modes={modes}
296
- {...(onLeadingPress !== undefined ? { onPress: onLeadingPress } : {})}
297
- accessibilityLabel="Home"
298
- accessibilityHint="Opens home menu"
299
- />
300
- )
301
-
302
- // Default actions: Search and Notification IconButtons
303
- const defaultActions = actionsSlot ?? (
304
- <View style={homeActionsRowStyle}>
305
- <IconButton
306
- iconName="ic_search"
307
- modes={modes}
308
- onPress={() => {}}
309
- accessibilityLabel="Search"
310
- accessibilityHint="Opens search screen"
311
- />
312
- <IconButton
313
- iconName="ic_notification"
314
- modes={modes}
315
- onPress={() => {}}
316
- accessibilityLabel="Notifications"
317
- accessibilityHint="Opens notifications"
318
- />
319
- </View>
320
- )
321
-
322
- // Clone slot children and pass modes to all children that accept it
323
- const processedActionsSlot = actionsSlot
324
- ? cloneChildrenWithModes(React.Children.toArray(actionsSlot), modes)
325
- : defaultActions
326
-
327
- // Process leading if it's a React element
328
- const processedLeading = React.isValidElement(leading)
329
- ? cloneChildrenWithModes([leading], modes)[0]
330
- : defaultLeading
331
-
332
- // Process avatar with modes
333
- const avatarModes = avatarProps?.modes ? { ...modes, ...avatarProps.modes } : modes
334
- const processedAvatar = (
335
- <Avatar
336
- {...(avatarProps ?? {})}
337
- modes={avatarModes}
338
- />
339
- )
340
-
341
- return (
342
- <View
343
- style={[containerStyle, style]}
344
- accessibilityRole="header"
345
- accessibilityLabel={accessibilityLabel}
346
- {...(accessibilityHint !== undefined ? { accessibilityHint } : {})}
347
- {...rest}
348
- >
349
- {processedLeading}
350
- <View style={homeActionsRowStyle}>
351
- {processedActionsSlot}
352
- {processedAvatar}
240
+ {/* Actions Section */}
241
+ <View style={actionsStyle}>
242
+ {processedActions}
353
243
  </View>
354
244
  </View>
355
245
  )
356
246
  }
357
-
358
- export default AppBar
359
- export { AppBarHome }
360
-
@@ -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 AvatarStories from './Avatar.stories';
3
3
  import Avatar from './Avatar';
4
4
  import { AccessibilitySection, AnatomySection, UsageConstraintsSection } from '../docs/DocSections';
@@ -13,6 +13,10 @@ Avatar component that displays either an image or a monogram.
13
13
 
14
14
  This component uses the following design token collections. Each collection supports multiple modes that can be configured via the `modes` prop.
15
15
 
16
+ ### Context4
17
+ - **Modes:** Default | Chip
18
+ - **Default:** Default
19
+
16
20
  ### Avatar Size
17
21
  - **Modes:** L | M | S
18
22
  - **Default:** L
@@ -20,6 +24,10 @@ This component uses the following design token collections. Each collection supp
20
24
  ### Color Mode
21
25
  - **Modes:** Light | Dark
22
26
  - **Default:** Light
27
+
28
+ ### Colors Router
29
+ - **Modes:** POC | Old
30
+ - **Default:** POC
23
31
  ## Usage
24
32
 
25
33
  <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 AvatarGroupStories from './AvatarGroup.stories';
3
3
  import AvatarGroup from './AvatarGroup';
4
4
 
@@ -12,9 +12,17 @@ AvatarGroup component with design-token-driven styling.
12
12
 
13
13
  This component uses the following design token collections. Each collection supports multiple modes that can be configured via the `modes` prop.
14
14
 
15
+ ### Context4
16
+ - **Modes:** Default | Chip
17
+ - **Default:** Default
18
+
15
19
  ### Avatar Size
16
20
  - **Modes:** L | M | S
17
21
  - **Default:** L
22
+
23
+ ### Colors Router
24
+ - **Modes:** POC | Old
25
+ - **Default:** POC
18
26
  ## Usage
19
27
 
20
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 BadgeStories from './Badge.stories';
3
3
  import Badge from './Badge';
4
4
 
@@ -0,0 +1,62 @@
1
+ import { Meta, Story, Canvas, ArgsTable } from '@storybook/addon-docs';
2
+ import Balance from './Balance';
3
+ import * as BalanceStories from './Balance.stories';
4
+
5
+ <Meta of={BalanceStories} />
6
+
7
+ # Balance
8
+
9
+ The `Balance` component displays a title and a monetary value, typically used to show total amounts or outstanding balances.
10
+
11
+
12
+ ## Available Collections and Modes
13
+
14
+ This component does not use any design token collections with multiple modes.
15
+ ## Usage
16
+
17
+ ```tsx
18
+ import { Balance } from 'jfs-components';
19
+
20
+ // Basic usage
21
+ <Balance
22
+ title="Total owed to people"
23
+ amount="50,000.67"
24
+ currency="₹"
25
+ />
26
+
27
+ // With modes
28
+ <Balance
29
+ title="Total Balance"
30
+ amount="12,500.00"
31
+ modes={{ "Color Mode": "Dark" }}
32
+ />
33
+ ```
34
+
35
+ ## Props
36
+
37
+ <ArgsTable of={Balance} />
38
+
39
+ ## Stories
40
+
41
+ ### Default
42
+ <Canvas of={BalanceStories.Default} />
43
+
44
+ ### With Modes
45
+ <Canvas of={BalanceStories.WithModes} />
46
+
47
+ ### Custom Slot
48
+ <Canvas of={BalanceStories.CustomSlot} />
49
+
50
+
51
+ ## Design Tokens
52
+
53
+ This component uses the following design tokens, resolved through `getVariableByName`:
54
+
55
+ - **`balance/gap`**
56
+ - **`balance/title/fontFamily`**
57
+ - **`balance/title/fontSize`**
58
+ - **`balance/title/fontWeight`**
59
+ - **`balance/title/foreground`**
60
+ - **`balance/title/lineHeight`**
61
+
62
+ All tokens support mode-based theming through the `modes` prop.