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,72 @@
1
+ "use strict";
2
+
3
+ import React from 'react';
4
+ import { View, Text } from 'react-native';
5
+ import { getVariableByName } from '../../design-tokens/figma-variables-resolver';
6
+ import MoneyValue from '../MoneyValue/MoneyValue';
7
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
8
+ /**
9
+ * Balance component that displays a title and a monetary value.
10
+ *
11
+ * @component
12
+ * @example
13
+ * ```jsx
14
+ * <Balance title="Total Balance" amount="12500" />
15
+ * ```
16
+ */
17
+ function Balance({
18
+ title = "Total owed to people",
19
+ amount = "500",
20
+ currency = "₹",
21
+ modes = {},
22
+ style,
23
+ children
24
+ }) {
25
+ // Resolve design tokens
26
+ const gap = getVariableByName('balance/gap', modes) ?? 6;
27
+
28
+ // Title styles
29
+ const titleColor = getVariableByName('balance/title/foreground', modes) ?? '#0c0d10';
30
+ const titleFontSize = getVariableByName('balance/title/fontSize', modes) ?? 14;
31
+ const titleFontFamily = getVariableByName('balance/title/fontFamily', modes) ?? 'System';
32
+ const titleLineHeight = getVariableByName('balance/title/lineHeight', modes) ?? 18;
33
+ const titleFontWeightValue = getVariableByName('balance/title/fontWeight', modes) ?? 500;
34
+ const titleFontWeight = typeof titleFontWeightValue === 'number' ? titleFontWeightValue.toString() : titleFontWeightValue;
35
+ const containerStyle = {
36
+ flexDirection: 'column',
37
+ alignItems: 'flex-start',
38
+ gap: gap
39
+ };
40
+ const titleStyle = {
41
+ color: titleColor,
42
+ fontSize: titleFontSize,
43
+ fontFamily: titleFontFamily,
44
+ lineHeight: titleLineHeight,
45
+ fontWeight: titleFontWeight
46
+ };
47
+
48
+ // Handle slot children or default content
49
+ const content = React.Children.map(children, child => {
50
+ if (/*#__PURE__*/React.isValidElement(child)) {
51
+ return /*#__PURE__*/React.cloneElement(child, {
52
+ modes
53
+ });
54
+ }
55
+ return child;
56
+ });
57
+ return /*#__PURE__*/_jsxs(View, {
58
+ style: [containerStyle, style],
59
+ "data-node-id": "1986:6203",
60
+ children: [/*#__PURE__*/_jsx(Text, {
61
+ style: titleStyle,
62
+ "data-node-id": "1986:2613",
63
+ children: title
64
+ }), children ? content : /*#__PURE__*/_jsx(MoneyValue, {
65
+ value: amount,
66
+ currency: currency,
67
+ modes: modes
68
+ })]
69
+ });
70
+ }
71
+ export default Balance;
72
+ //# sourceMappingURL=Balance.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","View","Text","getVariableByName","MoneyValue","jsx","_jsx","jsxs","_jsxs","Balance","title","amount","currency","modes","style","children","gap","titleColor","titleFontSize","titleFontFamily","titleLineHeight","titleFontWeightValue","titleFontWeight","toString","containerStyle","flexDirection","alignItems","titleStyle","color","fontSize","fontFamily","lineHeight","fontWeight","content","Children","map","child","isValidElement","cloneElement","value"],"sourceRoot":"../../../../src","sources":["components/Balance/Balance.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,QAAwD,cAAc;AACzF,SAASC,iBAAiB,QAAQ,8CAA8C;AAChF,OAAOC,UAAU,MAAM,0BAA0B;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAiCjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,OAAOA,CAAC;EACbC,KAAK,GAAG,sBAAsB;EAC9BC,MAAM,GAAG,KAAK;EACdC,QAAQ,GAAG,GAAG;EACdC,KAAK,GAAG,CAAC,CAAC;EACVC,KAAK;EACLC;AACU,CAAC,EAAE;EACb;EACA,MAAMC,GAAG,GAAGb,iBAAiB,CAAC,aAAa,EAAEU,KAAK,CAAC,IAAI,CAAC;;EAExD;EACA,MAAMI,UAAU,GAAGd,iBAAiB,CAAC,0BAA0B,EAAEU,KAAK,CAAC,IAAI,SAAS;EACpF,MAAMK,aAAa,GAAGf,iBAAiB,CAAC,wBAAwB,EAAEU,KAAK,CAAC,IAAI,EAAE;EAC9E,MAAMM,eAAe,GAAGhB,iBAAiB,CAAC,0BAA0B,EAAEU,KAA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ChB,CACJ;EAAA,CACC,CAAC;AAEf;AAEA,eAAeJ,OAAO","ignoreList":[]}
@@ -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.
@@ -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 BottomNavStories from './BottomNav.stories';
3
3
  import BottomNav from './BottomNav';
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 BottomNavItemStories from './BottomNavItem.stories';
3
3
  import BottomNavItem from './BottomNavItem';
4
4
  import { AccessibilitySection, AnatomySection, UsageConstraintsSection } from '../docs/DocSections';
@@ -20,6 +20,10 @@ This component uses the following design token collections. Each collection supp
20
20
  ### Color Mode
21
21
  - **Modes:** Light | Dark
22
22
  - **Default:** Light
23
+
24
+ ### Colors Router
25
+ - **Modes:** POC | Old
26
+ - **Default:** POC
23
27
  ## Usage
24
28
 
25
29
  <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 ButtonStories from './Button.stories';
3
3
  import Button from './Button';
4
4
  import { AccessibilitySection, AnatomySection, UsageConstraintsSection } from '../docs/DocSections';
@@ -29,6 +29,10 @@ This component uses the following design token collections. Each collection supp
29
29
  - **Modes:** Light | Dark
30
30
  - **Default:** Light
31
31
 
32
+ ### Colors Router
33
+ - **Modes:** POC | Old
34
+ - **Default:** POC
35
+
32
36
  ### Appearance.System
33
37
  - **Modes:** positive | warning | negative
34
38
  - **Default:** positive
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+
3
+ import React from 'react';
4
+ import { View } from 'react-native';
5
+ import { getVariableByName } from '../../design-tokens/figma-variables-resolver';
6
+ import { jsx as _jsx } from "react/jsx-runtime";
7
+ /**
8
+ * ButtonGroup component that aggregates multiple buttons (e.g., IconButton)
9
+ * and handles their layout and styling/theming via design tokens.
10
+ *
11
+ * It passes the provided `modes` to all its immediate React Element children.
12
+ *
13
+ * @component
14
+ * @example
15
+ * ```jsx
16
+ * <ButtonGroup modes={{"Appearance": "light"}}>
17
+ * <IconButton iconName="ic_qr_code" />
18
+ * <IconButton iconName="ic_photo" />
19
+ * </ButtonGroup>
20
+ * ```
21
+ */
22
+ function ButtonGroup({
23
+ children,
24
+ modes = {},
25
+ style
26
+ }) {
27
+ // Resolve design tokens
28
+ const gap = getVariableByName('buttonGroup/padding/gap', modes) ?? 12;
29
+ const paddingHorizontal = getVariableByName('buttonGroup/padding/horizontal', modes) ?? 0;
30
+ const paddingVertical = getVariableByName('buttonGroup/padding/vertical', modes) ?? 0;
31
+
32
+ // Container style
33
+ const containerStyle = {
34
+ flexDirection: 'row',
35
+ alignItems: 'center',
36
+ gap: gap,
37
+ paddingHorizontal: paddingHorizontal,
38
+ paddingVertical: paddingVertical
39
+ };
40
+
41
+ // Clone children to pass `modes` prop
42
+ const childrenWithModes = React.Children.map(children, child => {
43
+ if (/*#__PURE__*/React.isValidElement(child)) {
44
+ // We safely try to pass `modes` to the child.
45
+ // If the child doesn't accept `modes`, it will just be an extra prop which is usually fine in React,
46
+ // but ideally children should be components that respect `modes`.
47
+ return /*#__PURE__*/React.cloneElement(child, {
48
+ modes: modes
49
+ });
50
+ }
51
+ return child;
52
+ });
53
+ return /*#__PURE__*/_jsx(View, {
54
+ style: [containerStyle, style],
55
+ children: childrenWithModes
56
+ });
57
+ }
58
+ export default ButtonGroup;
59
+ //# sourceMappingURL=ButtonGroup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","View","getVariableByName","jsx","_jsx","ButtonGroup","children","modes","style","gap","paddingHorizontal","paddingVertical","containerStyle","flexDirection","alignItems","childrenWithModes","Children","map","child","isValidElement","cloneElement"],"sourceRoot":"../../../../src","sources":["components/ButtonGroup/ButtonGroup.tsx"],"mappings":";;AAAA,OAAOA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{ Canvas, Meta, Story, Controls } from '@storybook/blocks';
4
+ import * as ButtonGroupStories from './ButtonGroup.stories';
5
+
6
+ <Meta of={ButtonGroupStories} />
7
+
8
+ # Button Group
9
+
10
+ A layout container that organizes multiple buttons (typically `IconButton`) in a horizontal row with consistent spacing as defined by design tokens.
11
+
12
+ The `ButtonGroup` component automatically passes its `modes` prop down to all valid React children, ensuring that the entire group responds to theme or mode changes in unison.
13
+
14
+
15
+ ## Available Collections and Modes
16
+
17
+ This component does not use any design token collections with multiple modes.
18
+ ## Usage
19
+
20
+ ```tsx
21
+ import { ButtonGroup, IconButton } from 'jfs-components';
22
+
23
+ function MyHeader() {
24
+ return (
25
+ <ButtonGroup modes={{ "Appearance": "dark" }}>
26
+ <IconButton iconName="ic_qr_code" />
27
+ <IconButton iconName="ic_photo" />
28
+ </ButtonGroup>
29
+ );
30
+ }
31
+ ```
32
+
33
+ ## Props
34
+
35
+ <Controls />
36
+
37
+ ## Examples
38
+
39
+ ### Default
40
+
41
+ <Canvas of={ButtonGroupStories.Default} />
42
+
43
+ ### With Custom Modes
44
+
45
+ <Canvas of={ButtonGroupStories.WithModes} />
46
+
47
+
48
+ ## Design Tokens
49
+
50
+ This component uses the following design tokens, resolved through `getVariableByName`:
51
+
52
+ - **`buttonGroup/padding/gap`**
53
+ - **`buttonGroup/padding/horizontal`**
54
+ - **`buttonGroup/padding/vertical`**
55
+
56
+ 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 CardStories from './Card.stories';
3
3
  import Card from './Card';
4
4
  import { AnatomySection, UsageConstraintsSection } from '../docs/DocSections';
@@ -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 CardFeedbackStories from './CardFeedback.stories';
3
3
  import CardFeedback from './CardFeedback';
4
4
  import { AccessibilitySection, AnatomySection, UsageConstraintsSection } from '../docs/DocSections';
@@ -21,6 +21,10 @@ This component uses the following design token collections. Each collection supp
21
21
  - **Modes:** Light | Dark
22
22
  - **Default:** Light
23
23
 
24
+ ### Colors Router
25
+ - **Modes:** POC | Old
26
+ - **Default:** POC
27
+
24
28
  ### Appearance.Brand
25
29
  - **Modes:** Primary | Secondary | Neutral
26
30
  - **Default:** Primary
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+
3
+ import React from 'react';
4
+ import { View } from 'react-native';
5
+ import { getVariableByName } from '../../design-tokens/figma-variables-resolver';
6
+ import { jsx as _jsx } from "react/jsx-runtime";
7
+ /**
8
+ * ChipGroup component that handles layout and spacing for ChipSelect components.
9
+ * Based on Figma Node 1905-5123.
10
+ */
11
+ function ChipGroup({
12
+ children,
13
+ modes = {},
14
+ style,
15
+ testID
16
+ }) {
17
+ // --- Token Resolution ---
18
+ const gap = parseInt(getVariableByName('chipGroup/gap', modes), 10) || 8;
19
+
20
+ // --- Styles ---
21
+ const containerStyle = {
22
+ flexDirection: 'row',
23
+ alignItems: 'flex-start',
24
+ flexWrap: 'wrap',
25
+ gap: gap
26
+ };
27
+
28
+ // Clone children to pass `modes` prop
29
+ const childrenWithModes = React.Children.map(children, child => {
30
+ if (/*#__PURE__*/React.isValidElement(child)) {
31
+ // Pass merged modes (parent modes + child modes)
32
+ // Note: We don't have access to child's existing props here to merge modes perfectly if they were passed directly to child
33
+ // But usually we want parent modes to override or augment.
34
+ // For now, simpler approach: just pass the parent modes, assuming child will handle merging if it needs to.
35
+ // Actually, based on previous ButtonGroup example, we just pass { modes: modes }.
36
+ return /*#__PURE__*/React.cloneElement(child, {
37
+ modes: modes
38
+ });
39
+ }
40
+ return child;
41
+ });
42
+ return /*#__PURE__*/_jsx(View, {
43
+ style: [containerStyle, style],
44
+ testID: testID,
45
+ children: childrenWithModes
46
+ });
47
+ }
48
+ export default ChipGroup;
49
+ //# sourceMappingURL=ChipGroup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","View","getVariableByName","jsx","_jsx","ChipGroup","children","modes","style","testID","gap","parseInt","containerStyle","flexDirection","alignItems","flexWrap","childrenWithModes","Children","map","child","isValidElement","cloneElement"],"sourceRoot":"../../../../src","sources":["components/ChipGroup/ChipGroup.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAwC,cAAc;AACnE,SAASC,iBAAiB,QAAQ,8CAA8C;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAuBjF;AACA;AACA;AACA;AACA,SAASC,SAASA,CAAC;EACfC,QAAQ;EACRC,KAAK,GAAG,CAAC,CAAC;EACVC,KAAK;EACLC;AACY,CAAC,EAAE;EACf;EACA,MAAMC,GAAG,GAAGC,QAAQ,CAACT,iBAAiB,CAAC,eAAe,EAAEK,KAAK,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC;;EAExE;EACA,MAAMK,cAAyB,GAAG;IAC9BC,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE,YAAY;IACxBC,QAAQ,EAAE,MAAM;IAChBL,GAAG,EAAEA;EACT,CAAC;;EAED;EACA,MAAMM,iBAAiB,GAAGhB,KAAK,CAACiB,QAAQ,CAACC,GAAG,CAACZ,QAAQ,EAAGa,KAAK,IAAK;IAC9D,iBAAInB,KAAK,CAACoB,cAAc,CAACD,KAAK,CAAC,EAAE;MAC7B;MACA;MACA;MACA;MACA;MACA,oBAAOnB,KAAK,CAACqB,YAAY,CAACF,KAAK,EAAE;QAAEZ,KAAK,EAAEA;MAAM,CAAQ,CAAC;IAC7D;IACA,OAAOY,KAAK;EAChB,CAAC,CAAC;EAEF,oBACIf,IAAA,CAACH,IAAI;IAACO,KAAK,EAAE,CAACI,cAAc,EAAEJ,KAAK,CAAE;IAACC,MAAM,EAAEA,MAAO;IAAAH,QAAA,EAChDU;EAAiB,CAChB,CAAC;AAEf;AAEA,eAAeX,SAAS","ignoreList":[]}
@@ -0,0 +1,40 @@
1
+ import { Meta, Title, Subtitle, Description, Primary, Controls, Stories, Story } from '@storybook/addon-docs';
2
+ import * as ChipGroupStories from './ChipGroup.stories';
3
+
4
+ <Meta of={ChipGroupStories} />
5
+
6
+ <Title />
7
+ <Subtitle />
8
+ <Description />
9
+
10
+
11
+ ## Available Collections and Modes
12
+
13
+ This component does not use any design token collections with multiple modes.
14
+ ## Usage
15
+
16
+ ```tsx
17
+ import { ChipGroup } from 'jfs-components';
18
+ import { ChipSelect } from 'jfs-components';
19
+
20
+ const MyComponent = () => (
21
+ <ChipGroup>
22
+ <ChipSelect label="Option 1" />
23
+ <ChipSelect label="Option 2" />
24
+ <ChipSelect label="Option 3" />
25
+ </ChipGroup>
26
+ );
27
+ ```
28
+
29
+ <Primary />
30
+ <Controls />
31
+ <Stories />
32
+
33
+
34
+ ## Design Tokens
35
+
36
+ This component uses the following design tokens, resolved through `getVariableByName`:
37
+
38
+ - **`chipGroup/gap`**
39
+
40
+ All tokens support mode-based theming through the `modes` prop.
@@ -0,0 +1,98 @@
1
+ "use strict";
2
+
3
+ import React from 'react';
4
+ import { Text, TouchableOpacity } from 'react-native';
5
+ import { getVariableByName } from '../../design-tokens/figma-variables-resolver';
6
+ import Icon from '../../icons/Icon';
7
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
8
+ /**
9
+ * ChipSelect component for selecting options (e.g. Date selection).
10
+ * Based on Figma Node 1901-4727.
11
+ */
12
+ function ChipSelect({
13
+ label = 'Date',
14
+ active = false,
15
+ icon = 'ic_calendar_week',
16
+ close = true,
17
+ modes = {},
18
+ style,
19
+ labelSlot,
20
+ onPress
21
+ }) {
22
+ // Force control of the 'ChipSelect State' mode based on the active prop
23
+ // This overrides any 'ChipSelect State' passed from outside, but preserves other modes
24
+ const resolvedModes = {
25
+ ...modes,
26
+ 'ChipSelect State': active ? 'Active' : 'Idle'
27
+ };
28
+
29
+ // --- Token Resolution ---
30
+ const gap = parseInt(getVariableByName('chipSelect/gap', resolvedModes), 10) || 4;
31
+ const paddingHorizontal = parseInt(getVariableByName('chipSelect/padding/horizontal', resolvedModes), 10) || 16;
32
+ const paddingVertical = parseInt(getVariableByName('chipSelect/padding/vertical', resolvedModes), 10) || 0;
33
+ const radius = parseInt(getVariableByName('chipSelect/radius', resolvedModes), 10) || 999;
34
+
35
+ // Background
36
+ const backgroundColor = getVariableByName('chipSelect/background', resolvedModes) || '#f5f5f5';
37
+
38
+ // Text Styles
39
+ const textColor = getVariableByName('chipSelect/foreground', resolvedModes) || '#0d0d0f';
40
+ const fontSize = parseInt(getVariableByName('chipSelect/fontSize', resolvedModes), 10) || 14;
41
+ const fontFamily = getVariableByName('chipSelect/fontFamily', resolvedModes) || 'JioType Var';
42
+ const lineHeight = parseInt(getVariableByName('chipSelect/lineHeight', resolvedModes), 10) || 32;
43
+ const fontWeight = getVariableByName('chipSelect/fontWeight', resolvedModes) || '700';
44
+
45
+ // Icon Styles
46
+ const iconSize = parseInt(getVariableByName('chipSelect/icon/size', resolvedModes), 10) || 16;
47
+
48
+ // --- Styles ---
49
+ const containerStyle = {
50
+ flexDirection: 'row',
51
+ alignItems: 'center',
52
+ justifyContent: 'center',
53
+ backgroundColor: backgroundColor,
54
+ borderRadius: radius,
55
+ paddingHorizontal: paddingHorizontal,
56
+ paddingVertical: paddingVertical,
57
+ gap: gap
58
+ };
59
+ const textStyle = {
60
+ color: textColor,
61
+ fontFamily: fontFamily,
62
+ fontSize: fontSize,
63
+ lineHeight: lineHeight,
64
+ fontWeight: fontWeight,
65
+ textAlign: 'center'
66
+ };
67
+ const renderLabel = () => {
68
+ if (labelSlot) {
69
+ if (/*#__PURE__*/React.isValidElement(labelSlot)) {
70
+ // Pass resolved modes to slot
71
+ return /*#__PURE__*/React.cloneElement(labelSlot, {
72
+ modes: resolvedModes
73
+ });
74
+ }
75
+ return labelSlot;
76
+ }
77
+ return /*#__PURE__*/_jsx(Text, {
78
+ style: textStyle,
79
+ children: label
80
+ });
81
+ };
82
+ return /*#__PURE__*/_jsxs(TouchableOpacity, {
83
+ style: [containerStyle, style],
84
+ onPress: onPress,
85
+ activeOpacity: 0.8,
86
+ children: [icon && /*#__PURE__*/_jsx(Icon, {
87
+ name: icon,
88
+ size: iconSize,
89
+ color: textColor
90
+ }), renderLabel(), active && close && /*#__PURE__*/_jsx(Icon, {
91
+ name: "ic_close",
92
+ size: iconSize,
93
+ color: textColor
94
+ })]
95
+ });
96
+ }
97
+ export default ChipSelect;
98
+ //# sourceMappingURL=ChipSelect.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","Text","TouchableOpacity","getVariableByName","Icon","jsx","_jsx","jsxs","_jsxs","ChipSelect","label","active","icon","close","modes","style","labelSlot","onPress","resolvedModes","gap","parseInt","paddingHorizontal","paddingVertical","radius","backgroundColor","textColor","fontSize","fontFamily","lineHeight","fontWeight","iconSize","containerStyle","flexDirection","alignItems","justifyContent","borderRadius","textStyle","color","textAlign","renderLabel","isValidElement","cloneElement","children","activeOpacity","name","size"],"sourceRoot":"../../../../src","sources":["components/ChipSelect/ChipSelect.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAAeC,IAAI,EAAEC,gBAAgB,QAAwD,cAAc;AAC3G,SAASC,iBAAiB,QAAQ,8CAA8C;AAChF,OAAOC,IAAI,MAAM,kBAAkB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAyCpC;AACA;AACA;AACA;AACA,SAASC,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,kBAAk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CAC5D;EAAA,CACa,CAAC;AAE3B;AAEA,eAAehB,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.
@@ -6,6 +6,7 @@ import { getVariableByName } from '../../design-tokens/figma-variables-resolver'
6
6
  import { useTokens } from '../../design-tokens/JFSThemeProvider';
7
7
  import IconCapsule from '../IconCapsule/IconCapsule';
8
8
  import Button from '../Button/Button';
9
+ import { cloneChildrenWithModes } from '../../utils/react-utils';
9
10
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
10
11
  /**
11
12
  * CtaCard component that maps directly to the Figma design using design tokens.
@@ -86,35 +87,21 @@ function CtaCard({
86
87
  lineHeight: bodyLineHeight,
87
88
  fontWeight: '400' // Regular
88
89
  };
89
-
90
- // --- Slot Helper ---
91
- // Helper to clone element with modes if no modes are already present on it (standard in this library)
92
- const renderSlot = slot => {
93
- if (/*#__PURE__*/React.isValidElement(slot)) {
94
- return /*#__PURE__*/React.cloneElement(slot, {
95
- modes: {
96
- ...modes,
97
- ...slot.props.modes
98
- }
99
- });
100
- }
101
- return slot;
102
- };
103
90
  return /*#__PURE__*/_jsxs(View, {
104
91
  style: [containerStyle, style],
105
92
  children: [/*#__PURE__*/_jsxs(View, {
106
93
  style: contentWrapStyle,
107
- children: [iconSlot ? renderSlot(iconSlot) : /*#__PURE__*/_jsx(IconCapsule, {
94
+ children: [iconSlot ? cloneChildrenWithModes(iconSlot, modes) : /*#__PURE__*/_jsx(IconCapsule, {
108
95
  iconName: iconName,
109
96
  modes: modes
110
- }), titleSlot ? renderSlot(titleSlot) : /*#__PURE__*/_jsx(Text, {
97
+ }), titleSlot ? cloneChildrenWithModes(titleSlot, modes) : /*#__PURE__*/_jsx(Text, {
111
98
  style: titleStyle,
112
99
  children: title
113
- }), bodySlot ? renderSlot(bodySlot) : /*#__PURE__*/_jsx(Text, {
100
+ }), bodySlot ? cloneChildrenWithModes(bodySlot, modes) : /*#__PURE__*/_jsx(Text, {
114
101
  style: bodyStyle,
115
102
  children: body
116
103
  })]
117
- }), buttonSlot ? renderSlot(buttonSlot) : /*#__PURE__*/_jsx(Button, {
104
+ }), buttonSlot ? cloneChildrenWithModes(buttonSlot, modes) : /*#__PURE__*/_jsx(Button, {
118
105
  label: buttonLabel,
119
106
  onPress: onPressButton || (() => {}),
120
107
  modes: modes