jfs-components 0.0.6 → 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 (315) 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.mdx +5 -1
  6. package/lib/commonjs/components/AppBar/AppBar.js +100 -238
  7. package/lib/commonjs/components/AppBar/AppBar.js.map +1 -1
  8. package/lib/commonjs/components/AppBar/AppBar.mdx +51 -39
  9. package/lib/commonjs/components/Avatar/Avatar.mdx +9 -1
  10. package/lib/commonjs/components/AvatarGroup/AvatarGroup.mdx +9 -1
  11. package/lib/commonjs/components/Badge/Badge.mdx +1 -1
  12. package/lib/commonjs/components/Balance/Balance.js +77 -0
  13. package/lib/commonjs/components/Balance/Balance.js.map +1 -0
  14. package/lib/commonjs/components/Balance/Balance.mdx +62 -0
  15. package/lib/commonjs/components/BottomNav/BottomNav.mdx +5 -1
  16. package/lib/commonjs/components/BottomNavItem/BottomNavItem.mdx +5 -1
  17. package/lib/commonjs/components/Button/Button.mdx +5 -1
  18. package/lib/commonjs/components/ButtonGroup/ButtonGroup.js +64 -0
  19. package/lib/commonjs/components/ButtonGroup/ButtonGroup.js.map +1 -0
  20. package/lib/commonjs/components/ButtonGroup/ButtonGroup.mdx +56 -0
  21. package/lib/commonjs/components/Card/Card.mdx +1 -1
  22. package/lib/commonjs/components/CardFeedback/CardFeedback.mdx +5 -1
  23. package/lib/commonjs/components/ChipGroup/ChipGroup.js +54 -0
  24. package/lib/commonjs/components/ChipGroup/ChipGroup.js.map +1 -0
  25. package/lib/commonjs/components/ChipGroup/ChipGroup.mdx +40 -0
  26. package/lib/commonjs/components/ChipSelect/ChipSelect.js +103 -0
  27. package/lib/commonjs/components/ChipSelect/ChipSelect.js.map +1 -0
  28. package/lib/commonjs/components/ChipSelect/ChipSelect.mdx +80 -0
  29. package/lib/commonjs/components/CtaCard/CtaCard.js +5 -18
  30. package/lib/commonjs/components/CtaCard/CtaCard.js.map +1 -1
  31. package/lib/commonjs/components/CtaCard/CtaCard.mdx +1 -1
  32. package/lib/commonjs/components/Disclaimer/Disclaimer.mdx +5 -1
  33. package/lib/commonjs/components/Divider/Divider.mdx +5 -1
  34. package/lib/commonjs/components/Drawer/Drawer.mdx +9 -1
  35. package/lib/commonjs/components/EmptyState/EmptyState.js +138 -0
  36. package/lib/commonjs/components/EmptyState/EmptyState.js.map +1 -0
  37. package/lib/commonjs/components/EmptyState/EmptyState.mdx +73 -0
  38. package/lib/commonjs/components/FilterBar/FilterBar.mdx +1 -1
  39. package/lib/commonjs/components/HStack/HStack.js +67 -0
  40. package/lib/commonjs/components/HStack/HStack.js.map +1 -0
  41. package/lib/commonjs/components/HStack/HStack.mdx +44 -0
  42. package/lib/commonjs/components/IconButton/IconButton.mdx +5 -1
  43. package/lib/commonjs/components/IconCapsule/IconCapsule.js +3 -3
  44. package/lib/commonjs/components/IconCapsule/IconCapsule.js.map +1 -1
  45. package/lib/commonjs/components/IconCapsule/IconCapsule.mdx +12 -4
  46. package/lib/commonjs/components/Introduction.mdx +3 -98
  47. package/lib/commonjs/components/LazyList/LazyList.mdx +1 -1
  48. package/lib/commonjs/components/ListGroup/ListGroup.js +3 -30
  49. package/lib/commonjs/components/ListGroup/ListGroup.js.map +1 -1
  50. package/lib/commonjs/components/ListGroup/ListGroup.mdx +5 -1
  51. package/lib/commonjs/components/ListItem/ListItem.js +5 -37
  52. package/lib/commonjs/components/ListItem/ListItem.js.map +1 -1
  53. package/lib/commonjs/components/ListItem/ListItem.mdx +5 -1
  54. package/lib/commonjs/components/MediaCard/MediaCard.mdx +5 -1
  55. package/lib/commonjs/components/MerchantProfile/MerchantProfile.mdx +1 -1
  56. package/lib/commonjs/components/MoneyValue/MoneyValue.mdx +6 -2
  57. package/lib/commonjs/components/NavArrow/NavArrow.js +42 -17
  58. package/lib/commonjs/components/NavArrow/NavArrow.js.map +1 -1
  59. package/lib/commonjs/components/NavArrow/NavArrow.mdx +5 -1
  60. package/lib/commonjs/components/PageTitle/PageTitle.mdx +5 -1
  61. package/lib/commonjs/components/Screen/Screen.js +53 -0
  62. package/lib/commonjs/components/Screen/Screen.js.map +1 -0
  63. package/lib/commonjs/components/Screen/Screen.mdx +58 -0
  64. package/lib/commonjs/components/Section/Section.js +3 -25
  65. package/lib/commonjs/components/Section/Section.js.map +1 -1
  66. package/lib/commonjs/components/Section/Section.mdx +5 -1
  67. package/lib/commonjs/components/Stepper/Step.mdx +5 -1
  68. package/lib/commonjs/components/Stepper/StepLabel.mdx +5 -1
  69. package/lib/commonjs/components/Stepper/Stepper.mdx +1 -1
  70. package/lib/commonjs/components/SupportText/SupportText.js +83 -0
  71. package/lib/commonjs/components/SupportText/SupportText.js.map +1 -0
  72. package/lib/commonjs/components/SupportText/SupportText.mdx +48 -0
  73. package/lib/commonjs/components/SupportText/SupportTextIcon.js +47 -0
  74. package/lib/commonjs/components/SupportText/SupportTextIcon.js.map +1 -0
  75. package/lib/commonjs/components/SupportText/SupportTextIcon.mdx +35 -0
  76. package/lib/commonjs/components/SupportText/index.js +21 -0
  77. package/lib/commonjs/components/SupportText/index.js.map +1 -0
  78. package/lib/commonjs/components/TextInput/TextInput.mdx +9 -1
  79. package/lib/commonjs/components/ThreadHero/ThreadHero.mdx +1 -1
  80. package/lib/commonjs/components/Tooltip/Tooltip.mdx +5 -1
  81. package/lib/commonjs/components/TransactionBubble/TransactionBubble.mdx +1 -1
  82. package/lib/commonjs/components/TransactionDetails/TransactionDetails.js +2 -24
  83. package/lib/commonjs/components/TransactionDetails/TransactionDetails.js.map +1 -1
  84. package/lib/commonjs/components/TransactionDetails/TransactionDetails.mdx +1 -1
  85. package/lib/commonjs/components/TransactionStatus/TransactionStatus.mdx +1 -1
  86. package/lib/commonjs/components/UpiHandle/UpiHandle.mdx +5 -1
  87. package/lib/commonjs/components/VStack/VStack.js +73 -0
  88. package/lib/commonjs/components/VStack/VStack.js.map +1 -0
  89. package/lib/commonjs/components/VStack/VStack.mdx +44 -0
  90. package/lib/commonjs/components/index.js +28 -0
  91. package/lib/commonjs/components/index.js.map +1 -1
  92. package/lib/commonjs/design-tokens/JFS Variables-variables-full.json +1 -18633
  93. package/lib/commonjs/design-tokens/figma-variables-resolver.js +3 -9
  94. package/lib/commonjs/design-tokens/figma-variables-resolver.js.map +1 -2
  95. package/lib/commonjs/icons/ic_info.svg +1 -0
  96. package/lib/commonjs/icons/ic_warning.svg +1 -0
  97. package/lib/commonjs/icons/registry.js +2 -2
  98. package/lib/commonjs/icons/registry.js.map +1 -1
  99. package/lib/commonjs/utils/react-utils.js +47 -0
  100. package/lib/commonjs/utils/react-utils.js.map +1 -0
  101. package/lib/module/components/Accordion/Accordion.mdx +1 -1
  102. package/lib/module/components/ActionFooter/ActionFooter.js +2 -14
  103. package/lib/module/components/ActionFooter/ActionFooter.js.map +1 -1
  104. package/lib/module/components/ActionFooter/ActionFooter.mdx +1 -1
  105. package/lib/module/components/ActionTile/ActionTile.mdx +5 -1
  106. package/lib/module/components/AppBar/AppBar.js +100 -238
  107. package/lib/module/components/AppBar/AppBar.js.map +1 -1
  108. package/lib/module/components/AppBar/AppBar.mdx +51 -39
  109. package/lib/module/components/Avatar/Avatar.mdx +9 -1
  110. package/lib/module/components/AvatarGroup/AvatarGroup.mdx +9 -1
  111. package/lib/module/components/Badge/Badge.mdx +1 -1
  112. package/lib/module/components/Balance/Balance.js +72 -0
  113. package/lib/module/components/Balance/Balance.js.map +1 -0
  114. package/lib/module/components/Balance/Balance.mdx +62 -0
  115. package/lib/module/components/BottomNav/BottomNav.mdx +5 -1
  116. package/lib/module/components/BottomNavItem/BottomNavItem.mdx +5 -1
  117. package/lib/module/components/Button/Button.mdx +5 -1
  118. package/lib/module/components/ButtonGroup/ButtonGroup.js +59 -0
  119. package/lib/module/components/ButtonGroup/ButtonGroup.js.map +1 -0
  120. package/lib/module/components/ButtonGroup/ButtonGroup.mdx +56 -0
  121. package/lib/module/components/Card/Card.mdx +1 -1
  122. package/lib/module/components/CardFeedback/CardFeedback.mdx +5 -1
  123. package/lib/module/components/ChipGroup/ChipGroup.js +49 -0
  124. package/lib/module/components/ChipGroup/ChipGroup.js.map +1 -0
  125. package/lib/module/components/ChipGroup/ChipGroup.mdx +40 -0
  126. package/lib/module/components/ChipSelect/ChipSelect.js +98 -0
  127. package/lib/module/components/ChipSelect/ChipSelect.js.map +1 -0
  128. package/lib/module/components/ChipSelect/ChipSelect.mdx +80 -0
  129. package/lib/module/components/CtaCard/CtaCard.js +5 -18
  130. package/lib/module/components/CtaCard/CtaCard.js.map +1 -1
  131. package/lib/module/components/CtaCard/CtaCard.mdx +1 -1
  132. package/lib/module/components/Disclaimer/Disclaimer.mdx +5 -1
  133. package/lib/module/components/Divider/Divider.mdx +5 -1
  134. package/lib/module/components/Drawer/Drawer.mdx +9 -1
  135. package/lib/module/components/EmptyState/EmptyState.js +132 -0
  136. package/lib/module/components/EmptyState/EmptyState.js.map +1 -0
  137. package/lib/module/components/EmptyState/EmptyState.mdx +73 -0
  138. package/lib/module/components/FilterBar/FilterBar.mdx +1 -1
  139. package/lib/module/components/HStack/HStack.js +61 -0
  140. package/lib/module/components/HStack/HStack.js.map +1 -0
  141. package/lib/module/components/HStack/HStack.mdx +44 -0
  142. package/lib/module/components/IconButton/IconButton.mdx +5 -1
  143. package/lib/module/components/IconCapsule/IconCapsule.js +3 -3
  144. package/lib/module/components/IconCapsule/IconCapsule.js.map +1 -1
  145. package/lib/module/components/IconCapsule/IconCapsule.mdx +12 -4
  146. package/lib/module/components/Introduction.mdx +3 -98
  147. package/lib/module/components/LazyList/LazyList.mdx +1 -1
  148. package/lib/module/components/ListGroup/ListGroup.js +1 -30
  149. package/lib/module/components/ListGroup/ListGroup.js.map +1 -1
  150. package/lib/module/components/ListGroup/ListGroup.mdx +5 -1
  151. package/lib/module/components/ListItem/ListItem.js +1 -35
  152. package/lib/module/components/ListItem/ListItem.js.map +1 -1
  153. package/lib/module/components/ListItem/ListItem.mdx +5 -1
  154. package/lib/module/components/MediaCard/MediaCard.mdx +5 -1
  155. package/lib/module/components/MerchantProfile/MerchantProfile.mdx +1 -1
  156. package/lib/module/components/MoneyValue/MoneyValue.mdx +6 -2
  157. package/lib/module/components/NavArrow/NavArrow.js +42 -17
  158. package/lib/module/components/NavArrow/NavArrow.js.map +1 -1
  159. package/lib/module/components/NavArrow/NavArrow.mdx +5 -1
  160. package/lib/module/components/PageTitle/PageTitle.mdx +5 -1
  161. package/lib/module/components/Screen/Screen.js +47 -0
  162. package/lib/module/components/Screen/Screen.js.map +1 -0
  163. package/lib/module/components/Screen/Screen.mdx +58 -0
  164. package/lib/module/components/Section/Section.js +1 -23
  165. package/lib/module/components/Section/Section.js.map +1 -1
  166. package/lib/module/components/Section/Section.mdx +5 -1
  167. package/lib/module/components/Stepper/Step.mdx +5 -1
  168. package/lib/module/components/Stepper/StepLabel.mdx +5 -1
  169. package/lib/module/components/Stepper/Stepper.mdx +1 -1
  170. package/lib/module/components/SupportText/SupportText.js +78 -0
  171. package/lib/module/components/SupportText/SupportText.js.map +1 -0
  172. package/lib/module/components/SupportText/SupportText.mdx +48 -0
  173. package/lib/module/components/SupportText/SupportTextIcon.js +42 -0
  174. package/lib/module/components/SupportText/SupportTextIcon.js.map +1 -0
  175. package/lib/module/components/SupportText/SupportTextIcon.mdx +35 -0
  176. package/lib/module/components/SupportText/index.js +5 -0
  177. package/lib/module/components/SupportText/index.js.map +1 -0
  178. package/lib/module/components/TextInput/TextInput.mdx +9 -1
  179. package/lib/module/components/ThreadHero/ThreadHero.mdx +1 -1
  180. package/lib/module/components/Tooltip/Tooltip.mdx +5 -1
  181. package/lib/module/components/TransactionBubble/TransactionBubble.mdx +1 -1
  182. package/lib/module/components/TransactionDetails/TransactionDetails.js +2 -26
  183. package/lib/module/components/TransactionDetails/TransactionDetails.js.map +1 -1
  184. package/lib/module/components/TransactionDetails/TransactionDetails.mdx +1 -1
  185. package/lib/module/components/TransactionStatus/TransactionStatus.mdx +1 -1
  186. package/lib/module/components/UpiHandle/UpiHandle.mdx +5 -1
  187. package/lib/module/components/VStack/VStack.js +67 -0
  188. package/lib/module/components/VStack/VStack.js.map +1 -0
  189. package/lib/module/components/VStack/VStack.mdx +44 -0
  190. package/lib/module/components/index.js +4 -0
  191. package/lib/module/components/index.js.map +1 -1
  192. package/lib/module/design-tokens/JFS Variables-variables-full.json +1 -18633
  193. package/lib/module/design-tokens/figma-variables-resolver.js +2 -2
  194. package/lib/module/design-tokens/figma-variables-resolver.js.map +0 -1
  195. package/lib/module/icons/ic_info.svg +1 -0
  196. package/lib/module/icons/ic_warning.svg +1 -0
  197. package/lib/module/icons/registry.js +2 -2
  198. package/lib/module/icons/registry.js.map +1 -1
  199. package/lib/module/utils/react-utils.js +43 -0
  200. package/lib/module/utils/react-utils.js.map +1 -0
  201. package/lib/typescript/components/ActionFooter/ActionFooter.d.ts.map +1 -1
  202. package/lib/typescript/components/AppBar/AppBar.d.ts +34 -68
  203. package/lib/typescript/components/AppBar/AppBar.d.ts.map +1 -1
  204. package/lib/typescript/components/Balance/Balance.d.ts +44 -0
  205. package/lib/typescript/components/Balance/Balance.d.ts.map +1 -0
  206. package/lib/typescript/components/ButtonGroup/ButtonGroup.d.ts +36 -0
  207. package/lib/typescript/components/ButtonGroup/ButtonGroup.d.ts.map +1 -0
  208. package/lib/typescript/components/ChipGroup/ChipGroup.d.ts +29 -0
  209. package/lib/typescript/components/ChipGroup/ChipGroup.d.ts.map +1 -0
  210. package/lib/typescript/components/ChipSelect/ChipSelect.d.ts +47 -0
  211. package/lib/typescript/components/ChipSelect/ChipSelect.d.ts.map +1 -0
  212. package/lib/typescript/components/CtaCard/CtaCard.d.ts.map +1 -1
  213. package/lib/typescript/components/EmptyState/EmptyState.d.ts +38 -0
  214. package/lib/typescript/components/EmptyState/EmptyState.d.ts.map +1 -0
  215. package/lib/typescript/components/HStack/HStack.d.ts +41 -0
  216. package/lib/typescript/components/HStack/HStack.d.ts.map +1 -0
  217. package/lib/typescript/components/ListGroup/ListGroup.d.ts.map +1 -1
  218. package/lib/typescript/components/ListItem/ListItem.d.ts.map +1 -1
  219. package/lib/typescript/components/NavArrow/NavArrow.d.ts +3 -3
  220. package/lib/typescript/components/NavArrow/NavArrow.d.ts.map +1 -1
  221. package/lib/typescript/components/Screen/Screen.d.ts +23 -0
  222. package/lib/typescript/components/Screen/Screen.d.ts.map +1 -0
  223. package/lib/typescript/components/Section/Section.d.ts.map +1 -1
  224. package/lib/typescript/components/SupportText/SupportText.d.ts +34 -0
  225. package/lib/typescript/components/SupportText/SupportText.d.ts.map +1 -0
  226. package/lib/typescript/components/SupportText/SupportTextIcon.d.ts +10 -0
  227. package/lib/typescript/components/SupportText/SupportTextIcon.d.ts.map +1 -0
  228. package/lib/typescript/components/SupportText/index.d.ts +3 -0
  229. package/lib/typescript/components/SupportText/index.d.ts.map +1 -0
  230. package/lib/typescript/components/TransactionDetails/TransactionDetails.d.ts.map +1 -1
  231. package/lib/typescript/components/VStack/VStack.d.ts +41 -0
  232. package/lib/typescript/components/VStack/VStack.d.ts.map +1 -0
  233. package/lib/typescript/components/index.d.ts +4 -0
  234. package/lib/typescript/components/index.d.ts.map +1 -1
  235. package/lib/typescript/icons/registry.d.ts +1 -1
  236. package/lib/typescript/icons/registry.d.ts.map +1 -1
  237. package/lib/typescript/utils/react-utils.d.ts +7 -0
  238. package/lib/typescript/utils/react-utils.d.ts.map +1 -0
  239. package/package.json +7 -5
  240. package/src/components/.token-metadata.json +468 -12
  241. package/src/components/Accordion/Accordion.mdx +1 -1
  242. package/src/components/ActionFooter/ActionFooter.mdx +1 -1
  243. package/src/components/ActionFooter/ActionFooter.tsx +3 -12
  244. package/src/components/ActionTile/ActionTile.mdx +5 -1
  245. package/src/components/AppBar/AppBar.mdx +51 -39
  246. package/src/components/AppBar/AppBar.tsx +140 -261
  247. package/src/components/Avatar/Avatar.mdx +9 -1
  248. package/src/components/AvatarGroup/AvatarGroup.mdx +9 -1
  249. package/src/components/Badge/Badge.mdx +1 -1
  250. package/src/components/Balance/Balance.mdx +62 -0
  251. package/src/components/Balance/Balance.tsx +107 -0
  252. package/src/components/BottomNav/BottomNav.mdx +5 -1
  253. package/src/components/BottomNavItem/BottomNavItem.mdx +5 -1
  254. package/src/components/Button/Button.mdx +5 -1
  255. package/src/components/ButtonGroup/ButtonGroup.mdx +56 -0
  256. package/src/components/ButtonGroup/ButtonGroup.tsx +78 -0
  257. package/src/components/Card/Card.mdx +1 -1
  258. package/src/components/CardFeedback/CardFeedback.mdx +5 -1
  259. package/src/components/ChipGroup/ChipGroup.mdx +40 -0
  260. package/src/components/ChipGroup/ChipGroup.tsx +67 -0
  261. package/src/components/ChipSelect/ChipSelect.mdx +80 -0
  262. package/src/components/ChipSelect/ChipSelect.tsx +138 -0
  263. package/src/components/CtaCard/CtaCard.mdx +1 -1
  264. package/src/components/CtaCard/CtaCard.tsx +12 -20
  265. package/src/components/Disclaimer/Disclaimer.mdx +5 -1
  266. package/src/components/Divider/Divider.mdx +5 -1
  267. package/src/components/Drawer/Drawer.mdx +9 -1
  268. package/src/components/EmptyState/EmptyState.mdx +73 -0
  269. package/src/components/EmptyState/EmptyState.tsx +181 -0
  270. package/src/components/FilterBar/FilterBar.mdx +1 -1
  271. package/src/components/HStack/HStack.mdx +44 -0
  272. package/src/components/HStack/HStack.tsx +95 -0
  273. package/src/components/IconButton/IconButton.mdx +5 -1
  274. package/src/components/IconCapsule/IconCapsule.mdx +12 -4
  275. package/src/components/IconCapsule/IconCapsule.tsx +3 -3
  276. package/src/components/Introduction.mdx +3 -98
  277. package/src/components/LazyList/LazyList.mdx +1 -1
  278. package/src/components/ListGroup/ListGroup.mdx +5 -1
  279. package/src/components/ListGroup/ListGroup.tsx +5 -43
  280. package/src/components/ListItem/ListItem.mdx +5 -1
  281. package/src/components/ListItem/ListItem.tsx +15 -60
  282. package/src/components/MediaCard/MediaCard.mdx +5 -1
  283. package/src/components/MerchantProfile/MerchantProfile.mdx +1 -1
  284. package/src/components/MoneyValue/MoneyValue.mdx +6 -2
  285. package/src/components/NavArrow/NavArrow.mdx +5 -1
  286. package/src/components/NavArrow/NavArrow.tsx +48 -16
  287. package/src/components/PageTitle/PageTitle.mdx +5 -1
  288. package/src/components/Screen/Screen.mdx +58 -0
  289. package/src/components/Screen/Screen.tsx +60 -0
  290. package/src/components/Section/Section.mdx +5 -1
  291. package/src/components/Section/Section.tsx +17 -46
  292. package/src/components/Stepper/Step.mdx +5 -1
  293. package/src/components/Stepper/StepLabel.mdx +5 -1
  294. package/src/components/Stepper/Stepper.mdx +1 -1
  295. package/src/components/SupportText/SupportText.mdx +48 -0
  296. package/src/components/SupportText/SupportText.tsx +104 -0
  297. package/src/components/SupportText/SupportTextIcon.mdx +35 -0
  298. package/src/components/SupportText/SupportTextIcon.tsx +45 -0
  299. package/src/components/SupportText/index.ts +2 -0
  300. package/src/components/TextInput/TextInput.mdx +9 -1
  301. package/src/components/ThreadHero/ThreadHero.mdx +1 -1
  302. package/src/components/Tooltip/Tooltip.mdx +5 -1
  303. package/src/components/TransactionBubble/TransactionBubble.mdx +1 -1
  304. package/src/components/TransactionDetails/TransactionDetails.mdx +1 -1
  305. package/src/components/TransactionDetails/TransactionDetails.tsx +1 -38
  306. package/src/components/TransactionStatus/TransactionStatus.mdx +1 -1
  307. package/src/components/UpiHandle/UpiHandle.mdx +5 -1
  308. package/src/components/VStack/VStack.mdx +44 -0
  309. package/src/components/VStack/VStack.tsx +100 -0
  310. package/src/components/index.ts +4 -0
  311. package/src/design-tokens/JFS Variables-variables-full.json +1 -18633
  312. package/src/icons/ic_info.svg +1 -0
  313. package/src/icons/ic_warning.svg +1 -0
  314. package/src/icons/registry.ts +9 -1
  315. package/src/utils/react-utils.ts +51 -0
@@ -0,0 +1,103 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _react = _interopRequireDefault(require("react"));
8
+ var _reactNative = require("react-native");
9
+ var _figmaVariablesResolver = require("../../design-tokens/figma-variables-resolver");
10
+ var _Icon = _interopRequireDefault(require("../../icons/Icon"));
11
+ var _jsxRuntime = require("react/jsx-runtime");
12
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
13
+ /**
14
+ * ChipSelect component for selecting options (e.g. Date selection).
15
+ * Based on Figma Node 1901-4727.
16
+ */
17
+ function ChipSelect({
18
+ label = 'Date',
19
+ active = false,
20
+ icon = 'ic_calendar_week',
21
+ close = true,
22
+ modes = {},
23
+ style,
24
+ labelSlot,
25
+ onPress
26
+ }) {
27
+ // Force control of the 'ChipSelect State' mode based on the active prop
28
+ // This overrides any 'ChipSelect State' passed from outside, but preserves other modes
29
+ const resolvedModes = {
30
+ ...modes,
31
+ 'ChipSelect State': active ? 'Active' : 'Idle'
32
+ };
33
+
34
+ // --- Token Resolution ---
35
+ const gap = parseInt((0, _figmaVariablesResolver.getVariableByName)('chipSelect/gap', resolvedModes), 10) || 4;
36
+ const paddingHorizontal = parseInt((0, _figmaVariablesResolver.getVariableByName)('chipSelect/padding/horizontal', resolvedModes), 10) || 16;
37
+ const paddingVertical = parseInt((0, _figmaVariablesResolver.getVariableByName)('chipSelect/padding/vertical', resolvedModes), 10) || 0;
38
+ const radius = parseInt((0, _figmaVariablesResolver.getVariableByName)('chipSelect/radius', resolvedModes), 10) || 999;
39
+
40
+ // Background
41
+ const backgroundColor = (0, _figmaVariablesResolver.getVariableByName)('chipSelect/background', resolvedModes) || '#f5f5f5';
42
+
43
+ // Text Styles
44
+ const textColor = (0, _figmaVariablesResolver.getVariableByName)('chipSelect/foreground', resolvedModes) || '#0d0d0f';
45
+ const fontSize = parseInt((0, _figmaVariablesResolver.getVariableByName)('chipSelect/fontSize', resolvedModes), 10) || 14;
46
+ const fontFamily = (0, _figmaVariablesResolver.getVariableByName)('chipSelect/fontFamily', resolvedModes) || 'JioType Var';
47
+ const lineHeight = parseInt((0, _figmaVariablesResolver.getVariableByName)('chipSelect/lineHeight', resolvedModes), 10) || 32;
48
+ const fontWeight = (0, _figmaVariablesResolver.getVariableByName)('chipSelect/fontWeight', resolvedModes) || '700';
49
+
50
+ // Icon Styles
51
+ const iconSize = parseInt((0, _figmaVariablesResolver.getVariableByName)('chipSelect/icon/size', resolvedModes), 10) || 16;
52
+
53
+ // --- Styles ---
54
+ const containerStyle = {
55
+ flexDirection: 'row',
56
+ alignItems: 'center',
57
+ justifyContent: 'center',
58
+ backgroundColor: backgroundColor,
59
+ borderRadius: radius,
60
+ paddingHorizontal: paddingHorizontal,
61
+ paddingVertical: paddingVertical,
62
+ gap: gap
63
+ };
64
+ const textStyle = {
65
+ color: textColor,
66
+ fontFamily: fontFamily,
67
+ fontSize: fontSize,
68
+ lineHeight: lineHeight,
69
+ fontWeight: fontWeight,
70
+ textAlign: 'center'
71
+ };
72
+ const renderLabel = () => {
73
+ if (labelSlot) {
74
+ if (/*#__PURE__*/_react.default.isValidElement(labelSlot)) {
75
+ // Pass resolved modes to slot
76
+ return /*#__PURE__*/_react.default.cloneElement(labelSlot, {
77
+ modes: resolvedModes
78
+ });
79
+ }
80
+ return labelSlot;
81
+ }
82
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
83
+ style: textStyle,
84
+ children: label
85
+ });
86
+ };
87
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
88
+ style: [containerStyle, style],
89
+ onPress: onPress,
90
+ activeOpacity: 0.8,
91
+ children: [icon && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.default, {
92
+ name: icon,
93
+ size: iconSize,
94
+ color: textColor
95
+ }), renderLabel(), active && close && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.default, {
96
+ name: "ic_close",
97
+ size: iconSize,
98
+ color: textColor
99
+ })]
100
+ });
101
+ }
102
+ var _default = exports.default = ChipSelect;
103
+ //# sourceMappingURL=ChipSelect.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_figmaVariablesResolver","_Icon","_jsxRuntime","e","__esModule","default","ChipSelect","label","active","icon","close","modes","style","labelSlot","onPress","resolvedModes","gap","parseInt","getVariableByName","paddingHorizontal","paddingVertical","radius","backgroundColor","textColor","fontSize","fontFamily","lineHeight","fontWeight","iconSize","containerStyle","flexDirection","alignItems","justifyContent","borderRadius","textStyle","color","textAlign","renderLabel","React","isValidElement","cloneElement","jsx","Text","children","jsxs","TouchableOpacity","activeOpacity","name","size","_default","exports"],"sourceRoot":"../../../../src","sources":["components/ChipSelect/ChipSelect.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,uBAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAJ,sBAAA,CAAAC,OAAA;AAAoC,IAAAI,WAAA,GAAAJ,OAAA;AAAA,SAAAD,uBAAAM,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAyCpC;AACA;AACA;AACA;AACA,SAASG,UAAUA,CAAC;EAChBC,KAAK,GAAG,MAAM;EACdC,MAAM,GAAG,KAAK;EACdC,IAAI,GAAG,kBAAkB;EACzBC,KAAK,GAAG,IAAI;EACZC,KAAK,GAAG,CAAC,CAAC;EACVC,KAAK;EACLC,SAAS;EACTC;AACa,CAAC,EAAE;EAChB;EACA;EACA,MAAMC,aAAa,GAAG;IAClB,GAAGJ,KAAK;IACR,kBAAkB,EAAEH,MAAM,GAAG,QAAQ,GAAG;EAC5C,CAAC;;EAED;EACA,MAAMQ,GAAG,GAAGC,QAAQ,CAAC,IAAAC,yCAAiB,EAAC,gBAAgB,EAAEH,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AI;MAAC0C,IAAI,EAAC,UAAU;MAACC,IAAI,EAAEpB,QAAS;MAACO,KAAK,EAAEZ;IAAU,CAAE,CAC5D;EAAA,CACa,CAAC;AAE3B;AAAC,IAAA0B,QAAA,GAAAC,OAAA,CAAA7C,OAAA,GAEcC,UAAU","ignoreList":[]}
@@ -0,0 +1,80 @@
1
+ import { Meta, Title, Subtitle, Description, Primary, Controls, Stories } from '@storybook/blocks';
2
+ import * as ChipSelectStories from './ChipSelect.stories';
3
+
4
+ <Meta of={ChipSelectStories} />
5
+
6
+ <Title />
7
+ <Subtitle>
8
+ A selection chip component that toggles between Idle and Active states.
9
+ </Subtitle>
10
+
11
+ <Description>
12
+ The `ChipSelect` component is used for making selections, such as dates or filters.
13
+ It supports two states driven by the `active` prop:
14
+ - **Idle (`active={false}`)**: Customize with an icon and label.
15
+ - **Active (`active={true}`)**: Displays the label and a close icon. The start icon remains visible if provided.
16
+
17
+ Styling is driven by Figma tokens via `getVariableByName`.
18
+ </Description>
19
+
20
+ <Primary />
21
+
22
+ <Controls />
23
+
24
+
25
+ ## Available Collections and Modes
26
+
27
+ This component uses the following design token collections. Each collection supports multiple modes that can be configured via the `modes` prop.
28
+
29
+ ### ChipSelect State
30
+ - **Modes:** Idle | Active
31
+ - **Default:** Idle
32
+
33
+ ### Color Mode
34
+ - **Modes:** Light | Dark
35
+ - **Default:** Light
36
+
37
+ ### Colors Router
38
+ - **Modes:** POC | Old
39
+ - **Default:** POC
40
+ ## Usage
41
+
42
+ ```tsx
43
+ import ChipSelect from './ChipSelect';
44
+
45
+ // Idle State (Icon + Label)
46
+ <ChipSelect
47
+ label="Select Date"
48
+ active={false}
49
+ icon="ic_calendar_week"
50
+ />
51
+
52
+ // Active State (Icon + Label + Close Icon)
53
+ <ChipSelect
54
+ label="12 Oct 2023"
55
+ active={true}
56
+ icon="ic_calendar_week"
57
+ close={true}
58
+ />
59
+ ```
60
+
61
+ <Stories />
62
+
63
+
64
+ ## Design Tokens
65
+
66
+ This component uses the following design tokens, resolved through `getVariableByName`:
67
+
68
+ - **`chipSelect/background`**
69
+ - **`chipSelect/fontFamily`**
70
+ - **`chipSelect/fontSize`**
71
+ - **`chipSelect/fontWeight`**
72
+ - **`chipSelect/foreground`**
73
+ - **`chipSelect/gap`**
74
+ - **`chipSelect/icon/size`**
75
+ - **`chipSelect/lineHeight`**
76
+ - **`chipSelect/padding/horizontal`**
77
+ - **`chipSelect/padding/vertical`**
78
+ - **`chipSelect/radius`**
79
+
80
+ All tokens support mode-based theming through the `modes` prop.
@@ -10,6 +10,7 @@ var _figmaVariablesResolver = require("../../design-tokens/figma-variables-resol
10
10
  var _JFSThemeProvider = require("../../design-tokens/JFSThemeProvider");
11
11
  var _IconCapsule = _interopRequireDefault(require("../IconCapsule/IconCapsule"));
12
12
  var _Button = _interopRequireDefault(require("../Button/Button"));
13
+ var _reactUtils = require("../../utils/react-utils");
13
14
  var _jsxRuntime = require("react/jsx-runtime");
14
15
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
15
16
  /**
@@ -91,35 +92,21 @@ function CtaCard({
91
92
  lineHeight: bodyLineHeight,
92
93
  fontWeight: '400' // Regular
93
94
  };
94
-
95
- // --- Slot Helper ---
96
- // Helper to clone element with modes if no modes are already present on it (standard in this library)
97
- const renderSlot = slot => {
98
- if (/*#__PURE__*/_react.default.isValidElement(slot)) {
99
- return /*#__PURE__*/_react.default.cloneElement(slot, {
100
- modes: {
101
- ...modes,
102
- ...slot.props.modes
103
- }
104
- });
105
- }
106
- return slot;
107
- };
108
95
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
109
96
  style: [containerStyle, style],
110
97
  children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
111
98
  style: contentWrapStyle,
112
- children: [iconSlot ? renderSlot(iconSlot) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_IconCapsule.default, {
99
+ children: [iconSlot ? (0, _reactUtils.cloneChildrenWithModes)(iconSlot, modes) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_IconCapsule.default, {
113
100
  iconName: iconName,
114
101
  modes: modes
115
- }), titleSlot ? renderSlot(titleSlot) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
102
+ }), titleSlot ? (0, _reactUtils.cloneChildrenWithModes)(titleSlot, modes) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
116
103
  style: titleStyle,
117
104
  children: title
118
- }), bodySlot ? renderSlot(bodySlot) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
105
+ }), bodySlot ? (0, _reactUtils.cloneChildrenWithModes)(bodySlot, modes) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
119
106
  style: bodyStyle,
120
107
  children: body
121
108
  })]
122
- }), buttonSlot ? renderSlot(buttonSlot) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.default, {
109
+ }), buttonSlot ? (0, _reactUtils.cloneChildrenWithModes)(buttonSlot, modes) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.default, {
123
110
  label: buttonLabel,
124
111
  onPress: onPressButton || (() => {}),
125
112
  modes: modes
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_figmaVariablesResolver","_JFSThemeProvider","_IconCapsule","_Button","_jsxRuntime","e","__esModule","default","CtaCard","title","body","iconName","buttonLabel","onPressButton","modes","propModes","iconSlot","titleSlot","bodySlot","buttonSlot","style","globalModes","useTokens","backgroundColor","getVariableByName","radius","paddingHorizontal","paddingVertical","gap","contentGap","titleColor","titleFontFamily","titleFontSize","titleLineHeight","bodyColor","bodyFontFamily","bodyFontSize","bodyLineHeight","containerStyle","borderRadius","alignItems","width","overflow","contentWrapStyle","titleStyle","color","fontFamily","fontSize","lineHeight","fontWeight","bodyStyle","renderSlot","slot","React","isValidElement","cloneElement","props","jsxs","View","children","jsx","Text","label","onPress","_default","exports"],"sourceRoot":"../../../../src","sources":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AAQ,GACLiC,UAAU,CAACjC,QAAQ,CAAC,gBAEpB,IAAAd,WAAA,CAAAwD,GAAA,EAAC7D,YAAA,CAAA8D,IAAI;QAACzC,KAAK,EAAE8B,SAAU;QAAAS,QAAA,EAAEjD;MAAI,CAAO,CACvC;IAAA,CACC,CAAC,EAGNS,UAAU,GACPgC,UAAU,CAAChC,UAAU,CAAC,gBAEtB,IAAAf,WAAA,CAAAwD,GAAA,EAACzD,OAAA,CAAAI,OAAM;MACHuD,KAAK,EAAElD,WAAY;MACnBmD,OAAO,EAAElD,aAAa,KAAK,MAAM,CAAE,CAAC,CAAE;MACtCC,KAAK,EAAEA;IAAM,CAChB,CACJ;EAAA,CACC,CAAC;AAEf;AAAC,IAAAkD,QAAA,GAAAC,OAAA,CAAA1D,OAAA,GAEcC,OAAO","ignoreList":[]}
1
+ {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_figmaVariablesResolver","_JFSThemeProvider","_IconCapsule","_Button","_reactUtils","_jsxRuntime","e","__esModule","default","CtaCard","title","body","iconName","buttonLabel","onPressButton","modes","propModes","iconSlot","titleSlot","bodySlot","buttonSlot","style","globalModes","useTokens","backgroundColor","getVariableByName","radius","paddingHorizontal","paddingVertical","gap","contentGap","titleColor","titleFontFamily","titleFontSize","titleLineHeight","bodyColor","bodyFontFamily","bodyFontSize","bodyLineHeight","containerStyle","borderRadius","alignItems","width","overflow","contentWrapStyle","titleStyle","color","fontFamily","fontSize","lineHeight","fontWeight","bodyStyle","jsxs","View","children","cloneChildrenWithModes","jsx","Text","label","onPress","_default","exports"],"sourceRoot":"../../../../src","sources":["components/CtaCard/CtaCard.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,uBAAA,GAAAF,OAAA;AACA,IAAAG,iBAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,O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,CACC,CAAC;AAEf;AAAC,IAAA6C,QAAA,GAAAC,OAAA,CAAArD,OAAA,GAEcC,OAAO","ignoreList":[]}
@@ -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 CtaCardStories from './CtaCard.stories';
3
3
  import CtaCard from './CtaCard';
4
4
 
@@ -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 DisclaimerStories from './Disclaimer.stories';
3
3
  import Disclaimer from './Disclaimer';
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,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 DividerStories from './Divider.stories';
3
3
  import Divider from './Divider';
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
  ### Horizontal Divider
@@ -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 DrawerStories from './Drawer.stories';
3
3
  import Drawer from './Drawer';
4
4
  import { AccessibilitySection, AnatomySection, UsageConstraintsSection } from '../docs/DocSections';
@@ -13,9 +13,17 @@ Lightweight bottom drawer/sheet with a draggable handle.
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
+ ### Page type
17
+ - **Modes:** MainPage | SubPage
18
+ - **Default:** MainPage
19
+
16
20
  ### Color Mode
17
21
  - **Modes:** Light | Dark
18
22
  - **Default:** Light
23
+
24
+ ### Colors Router
25
+ - **Modes:** POC | Old
26
+ - **Default:** POC
19
27
  ## Usage
20
28
 
21
29
  <Canvas>
@@ -0,0 +1,138 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _react = _interopRequireWildcard(require("react"));
8
+ var _reactNative = require("react-native");
9
+ var _figmaVariablesResolver = require("../../design-tokens/figma-variables-resolver");
10
+ var _JFSThemeProvider = require("../../design-tokens/JFSThemeProvider");
11
+ var _IconCapsule = _interopRequireDefault(require("../IconCapsule/IconCapsule"));
12
+ var _Button = _interopRequireDefault(require("../Button/Button"));
13
+ var _jsxRuntime = require("react/jsx-runtime");
14
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
15
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
16
+ /**
17
+ * EmptyState component that displays an icon, title, description and an action button.
18
+ *
19
+ * @component
20
+ */
21
+ function EmptyState({
22
+ title = "No payments to show",
23
+ description = "Start by paying bills, recharge or your friends",
24
+ iconSlot,
25
+ buttonSlot,
26
+ modes: propModes = {},
27
+ style,
28
+ testID
29
+ }) {
30
+ const {
31
+ modes: globalModes
32
+ } = (0, _JFSThemeProvider.useTokens)();
33
+ const modes = {
34
+ ...globalModes,
35
+ ...propModes
36
+ };
37
+
38
+ // Container Tokens
39
+ const gap = (0, _figmaVariablesResolver.getVariableByName)('emptyState/gap', modes) || 24;
40
+ const padding = (0, _figmaVariablesResolver.getVariableByName)('emptyState/padding', modes) || 4;
41
+ const radius = (0, _figmaVariablesResolver.getVariableByName)('emptyState/radius', modes) || 16;
42
+
43
+ // Content Wrap Tokens
44
+ const contentGap = (0, _figmaVariablesResolver.getVariableByName)('emptyState/content/gap', modes) || 16;
45
+
46
+ // Title Tokens
47
+ const titleColor = (0, _figmaVariablesResolver.getVariableByName)('emptyState/title/color', modes) || '#0d0d0f';
48
+ const titleFontSize = (0, _figmaVariablesResolver.getVariableByName)('emptyState/title/fontSize', modes) || 16;
49
+ const titleFontFamily = (0, _figmaVariablesResolver.getVariableByName)('emptyState/title/fontFamily', modes) || 'System';
50
+ const titleLineHeight = (0, _figmaVariablesResolver.getVariableByName)('emptyState/title/lineHeight', modes) || 18;
51
+ const titleFontWeight = (0, _figmaVariablesResolver.getVariableByName)('emptyState/title/fontWeight', modes) || 700;
52
+
53
+ // Body Tokens
54
+ const bodyColor = (0, _figmaVariablesResolver.getVariableByName)('emptyState/body/color', modes) || '#1a1c1f';
55
+ const bodyFontSize = (0, _figmaVariablesResolver.getVariableByName)('emptyState/body/fontSize', modes) || 12;
56
+ const bodyFontFamily = (0, _figmaVariablesResolver.getVariableByName)('emptyState/body/fontFamily', modes) || 'System';
57
+ const bodyLineHeight = (0, _figmaVariablesResolver.getVariableByName)('emptyState/body/lineHeight', modes) || 16;
58
+ const bodyFontWeight = (0, _figmaVariablesResolver.getVariableByName)('emptyState/body/fontWeight', modes) || 400;
59
+ const containerStyle = {
60
+ flexDirection: 'column',
61
+ alignItems: 'center',
62
+ justifyContent: 'center',
63
+ gap: gap,
64
+ padding: padding,
65
+ borderRadius: radius
66
+ // Width is set in Figma as fixed 236, but typical practice is to let it be flexible or controlled by parent
67
+ // However, for strict adherence to "Maximize existing component usage" and specific styles, we can leave width
68
+ // to parent or default to auto.
69
+ };
70
+ const contentWrapStyle = {
71
+ flexDirection: 'column',
72
+ alignItems: 'center',
73
+ gap: contentGap,
74
+ width: '100%'
75
+ };
76
+ const titleStyle = {
77
+ color: titleColor,
78
+ fontSize: titleFontSize,
79
+ fontFamily: titleFontFamily,
80
+ lineHeight: titleLineHeight,
81
+ fontWeight: String(titleFontWeight),
82
+ textAlign: 'center'
83
+ };
84
+ const bodyStyle = {
85
+ color: bodyColor,
86
+ fontSize: bodyFontSize,
87
+ fontFamily: bodyFontFamily,
88
+ lineHeight: bodyLineHeight,
89
+ fontWeight: String(bodyFontWeight),
90
+ textAlign: 'center'
91
+ };
92
+ const defaultIconSlot = (0, _react.useMemo)(() => /*#__PURE__*/(0, _jsxRuntime.jsx)(_IconCapsule.default, {
93
+ modes: modes
94
+ }), [modes]);
95
+
96
+ // Checking if iconSlot is passed; if not use default.
97
+ // If it is passed, we assume the user handles everything or we inject props if it's a valid element?
98
+ // User instructions say: "whenever there is a slot, that's should be implemented as real react slot... manual passing down modes"
99
+ // So we just render what is passed, but for defaults we pass modes.
100
+ // Ideally, if iconSlot is a function we could pass modes, but ReactNode is static.
101
+ // The instruction "make sure modes are always passed to all slot children" implies we might need to cloneElement if possible,
102
+ // AND/OR user needs to pass it manually in usage.
103
+ // But for the DEFAULT slots we render, we definitely pass modes.
104
+
105
+ const iconContent = iconSlot || defaultIconSlot;
106
+ const defaultButtonSlot = (0, _react.useMemo)(() => /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.default, {
107
+ label: "Button",
108
+ modes: modes
109
+ }), [modes]);
110
+ const buttonContent = buttonSlot || defaultButtonSlot;
111
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
112
+ style: [containerStyle, style],
113
+ testID: testID,
114
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
115
+ style: contentWrapStyle,
116
+ children: [iconContent, /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
117
+ style: {
118
+ alignItems: 'center',
119
+ gap: 0
120
+ },
121
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
122
+ style: {
123
+ alignItems: 'center'
124
+ },
125
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
126
+ style: titleStyle,
127
+ children: title
128
+ }), description ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
129
+ style: bodyStyle,
130
+ children: description
131
+ }) : null]
132
+ })
133
+ })]
134
+ }), buttonContent]
135
+ });
136
+ }
137
+ var _default = exports.default = EmptyState;
138
+ //# sourceMappingURL=EmptyState.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_figmaVariablesResolver","_JFSThemeProvider","_IconCapsule","_interopRequireDefault","_Button","_jsxRuntime","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","EmptyState","title","description","iconSlot","buttonSlot","modes","propModes","style","testID","globalModes","useTokens","gap","getVariableByName","padding","radius","contentGap","titleColor","titleFontSize","titleFontFamily","titleLineHeight","titleFontWeight","bodyColor","bodyFontSize","bodyFontFamily","bodyLineHeight","bodyFontWeight","containerStyle","flexDirection","alignItems","justifyContent","borderRadius","contentWrapStyle","width","titleStyle","color","fontSize","fontFamily","lineHeight","fontWeight","String","textAlign","bodyStyle","defaultIconSlot","useMemo","jsx","iconContent","defaultButtonSlot","label","buttonContent","jsxs","View","children","Text","_default","exports"],"sourceRoot":"../../../../src","sources":["components/EmptyState/EmptyState.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,u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K,CAAO,CAAC,EACtCC,WAAW,gBAAG,IAAAtB,WAAA,CAAAgE,GAAA,EAACtE,YAAA,CAAA8E,IAAI;YAAC7C,KAAK,EAAEkC,SAAU;YAAAU,QAAA,EAAEjD;UAAW,CAAO,CAAC,GAAG,IAAI;QAAA,CAChE;MAAC,CACL,CAAC;IAAA,CACL,CAAC,EAGN8C,aAAa;EAAA,CACZ,CAAC;AAEf;AAAC,IAAAK,QAAA,GAAAC,OAAA,CAAAvE,OAAA,GAEciB,UAAU","ignoreList":[]}
@@ -0,0 +1,73 @@
1
+ import { Meta, Story, Canvas, Controls } from '@storybook/blocks';
2
+ import * as EmptyStateStories from './EmptyState.stories';
3
+ import EmptyState from './EmptyState';
4
+
5
+ <Meta of={EmptyStateStories} />
6
+
7
+ # EmptyState
8
+
9
+ The `EmptyState` component is used to display messages when there is no content to show, typically with an icon, title, description, and an action button.
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
+ ### Color Mode
17
+ - **Modes:** Light | Dark
18
+ - **Default:** Light
19
+
20
+ ### Colors Router
21
+ - **Modes:** POC | Old
22
+ - **Default:** POC
23
+ ## Usage
24
+
25
+ ```tsx
26
+ import { EmptyState } from 'jfs-components';
27
+
28
+ <EmptyState
29
+ title="No payments to show"
30
+ description="Start by paying bills, recharge or your friends"
31
+ modes={{}}
32
+ />
33
+ ```
34
+
35
+ ## Props
36
+
37
+ <Controls />
38
+
39
+ ## Examples
40
+
41
+ ### Default
42
+
43
+ <Canvas of={EmptyStateStories.Default} />
44
+
45
+ ### Custom Text
46
+
47
+ <Canvas of={EmptyStateStories.WithCustomText} />
48
+
49
+ ### Custom Slots
50
+
51
+ <Canvas of={EmptyStateStories.CustomSlots} />
52
+
53
+
54
+ ## Design Tokens
55
+
56
+ This component uses the following design tokens, resolved through `getVariableByName`:
57
+
58
+ - **`emptyState/body/color`**
59
+ - **`emptyState/body/fontFamily`**
60
+ - **`emptyState/body/fontSize`**
61
+ - **`emptyState/body/fontWeight`**
62
+ - **`emptyState/body/lineHeight`**
63
+ - **`emptyState/content/gap`**
64
+ - **`emptyState/gap`**
65
+ - **`emptyState/padding`**
66
+ - **`emptyState/radius`**
67
+ - **`emptyState/title/color`**
68
+ - **`emptyState/title/fontFamily`**
69
+ - **`emptyState/title/fontSize`**
70
+ - **`emptyState/title/fontWeight`**
71
+ - **`emptyState/title/lineHeight`**
72
+
73
+ All tokens support mode-based theming through the `modes` prop.
@@ -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 FilterBarStories from './FilterBar.stories';
3
3
  import FilterBar from './FilterBar';
4
4
  import { AccessibilitySection, AnatomySection, UsageConstraintsSection } from '../docs/DocSections';
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = exports.HStack = void 0;
7
+ var _react = _interopRequireDefault(require("react"));
8
+ var _reactNative = require("react-native");
9
+ var _figmaVariablesResolver = require("../../design-tokens/figma-variables-resolver");
10
+ var _JFSThemeProvider = require("../../design-tokens/JFSThemeProvider");
11
+ var _reactUtils = require("../../utils/react-utils");
12
+ var _jsxRuntime = require("react/jsx-runtime");
13
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
14
+ /**
15
+ * HStack component for horizontal layout using design token spacing.
16
+ */
17
+ const HStack = ({
18
+ children,
19
+ alignVertical,
20
+ justifyHorizontal,
21
+ wrap,
22
+ reverse = false,
23
+ as,
24
+ modes: propModes = {},
25
+ style,
26
+ ...rest
27
+ }) => {
28
+ const {
29
+ modes: globalModes
30
+ } = (0, _JFSThemeProvider.useTokens)();
31
+ const modes = {
32
+ ...globalModes,
33
+ ...propModes
34
+ };
35
+ const paddingTop = (0, _figmaVariablesResolver.getVariableByName)('hstack/padding/top', modes);
36
+ const paddingBottom = (0, _figmaVariablesResolver.getVariableByName)('hstack/padding/bottom', modes);
37
+ const paddingLeft = (0, _figmaVariablesResolver.getVariableByName)('hstack/padding/left', modes);
38
+ const paddingRight = (0, _figmaVariablesResolver.getVariableByName)('hstack/padding/right', modes);
39
+ const gap = (0, _figmaVariablesResolver.getVariableByName)('hstack/gap', modes);
40
+ const flexWrap = typeof wrap === 'boolean' ? wrap ? 'wrap' : 'nowrap' : wrap;
41
+ const containerStyle = {
42
+ flexDirection: reverse ? 'row-reverse' : 'row',
43
+ alignItems: alignVertical,
44
+ justifyContent: justifyHorizontal,
45
+ flexWrap,
46
+ paddingTop,
47
+ paddingBottom,
48
+ paddingLeft,
49
+ paddingRight,
50
+ gap
51
+ };
52
+
53
+ // Pass modes down to children
54
+ const processedChildren = children ? (0, _reactUtils.cloneChildrenWithModes)(children, modes) : null;
55
+ const viewProps = {
56
+ ...rest,
57
+ as
58
+ };
59
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
60
+ style: [containerStyle, style],
61
+ ...viewProps,
62
+ children: processedChildren
63
+ });
64
+ };
65
+ exports.HStack = HStack;
66
+ var _default = exports.default = HStack;
67
+ //# sourceMappingURL=HStack.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_figmaVariablesResolver","_JFSThemeProvider","_reactUtils","_jsxRuntime","e","__esModule","default","HStack","children","alignVertical","justifyHorizontal","wrap","reverse","as","modes","propModes","style","rest","globalModes","useTokens","paddingTop","getVariableByName","paddingBottom","paddingLeft","paddingRight","gap","flexWrap","containerStyle","flexDirection","alignItems","justifyContent","processedChildren","cloneChildrenWithModes","viewProps","jsx","View","exports","_default"],"sourceRoot":"../../../../src","sources":["components/HStack/HStack.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,uBAAA,GAA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