jfs-components 0.1.0 → 0.1.8

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 (392) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/lib/commonjs/components/AmountInput/AmountInput.js +8 -5
  3. package/lib/commonjs/components/AreaLineChart/AreaLineChart.js +1 -1
  4. package/lib/commonjs/components/Balance/Balance.js +17 -12
  5. package/lib/commonjs/components/BenefitCard/BenefitCard.js +231 -0
  6. package/lib/commonjs/components/Card/Card.js +2 -1
  7. package/lib/commonjs/components/CardFeedback/CardFeedback.js +2 -1
  8. package/lib/commonjs/components/CcCard/CcCard.js +470 -0
  9. package/lib/commonjs/components/Checkbox/Checkbox.js +6 -4
  10. package/lib/commonjs/components/CheckboxItem/CheckboxItem.js +4 -3
  11. package/lib/commonjs/components/CompareTable/CompareTable.js +372 -0
  12. package/lib/commonjs/components/ComparisonBar/ComparisonBar.js +266 -0
  13. package/lib/commonjs/components/Drawer/Drawer.js +13 -4
  14. package/lib/commonjs/components/DropdownInput/DropdownInput.js +36 -4
  15. package/lib/commonjs/components/FormField/FormField.js +4 -3
  16. package/lib/commonjs/components/FullscreenModal/FullscreenModal.js +62 -2
  17. package/lib/commonjs/components/Image/Image.js +11 -5
  18. package/lib/commonjs/components/InputSearch/InputSearch.js +6 -4
  19. package/lib/commonjs/components/LottiePlayer/loadNativeLottieView.js +8 -13
  20. package/lib/commonjs/components/NoteInput/NoteInput.js +6 -5
  21. package/lib/commonjs/components/Overlay/Overlay.js +92 -0
  22. package/lib/commonjs/components/PdpCcCard/PdpCcCard.js +273 -0
  23. package/lib/commonjs/components/PlanComparisonCard/PlanComparisonCard.js +2 -1
  24. package/lib/commonjs/components/ProductMerchandisingCard/GlassFill.js +263 -0
  25. package/lib/commonjs/components/ProductMerchandisingCard/GlassFill.web.js +116 -0
  26. package/lib/commonjs/components/ProductMerchandisingCard/ProductMerchandisingCard.js +353 -0
  27. package/lib/commonjs/components/ProjectionMarker/ProjectionMarker.js +161 -0
  28. package/lib/commonjs/components/Radio/Radio.js +5 -5
  29. package/lib/commonjs/components/Slider/Slider.js +473 -0
  30. package/lib/commonjs/components/TextInput/TextInput.js +15 -9
  31. package/lib/commonjs/components/TextSegment/TextSegment.js +118 -0
  32. package/lib/commonjs/components/docs/modeControls.js +116 -0
  33. package/lib/commonjs/components/index.js +70 -0
  34. package/lib/commonjs/design-tokens/Coin Variables-variables-full.json +1 -1
  35. package/lib/commonjs/design-tokens/JFSThemeProvider.js +1 -1
  36. package/lib/commonjs/design-tokens/figma-modes.generated.js +420 -0
  37. package/lib/commonjs/design-tokens/index.js +11 -0
  38. package/lib/commonjs/icons/registry.js +1 -1
  39. package/lib/commonjs/utils/react-utils.js +22 -0
  40. package/lib/module/components/Accordion/Accordion.js +1 -2
  41. package/lib/module/components/AmountInput/AmountInput.js +6 -4
  42. package/lib/module/components/AreaLineChart/AreaLineChart.js +1 -1
  43. package/lib/module/components/Balance/Balance.js +18 -13
  44. package/lib/module/components/BenefitCard/BenefitCard.js +225 -0
  45. package/lib/module/components/Card/Card.js +1 -2
  46. package/lib/module/components/CardFeedback/CardFeedback.js +1 -2
  47. package/lib/module/components/CcCard/CcCard.js +464 -0
  48. package/lib/module/components/Checkbox/Checkbox.js +6 -6
  49. package/lib/module/components/CheckboxItem/CheckboxItem.js +5 -4
  50. package/lib/module/components/CompareTable/CompareTable.js +367 -0
  51. package/lib/module/components/ComparisonBar/ComparisonBar.js +260 -0
  52. package/lib/module/components/Drawer/Drawer.js +12 -4
  53. package/lib/module/components/DropdownInput/DropdownInput.js +37 -5
  54. package/lib/module/components/FormField/FormField.js +5 -4
  55. package/lib/module/components/FullscreenModal/FullscreenModal.js +64 -5
  56. package/lib/module/components/Image/Image.js +11 -5
  57. package/lib/module/components/InputSearch/InputSearch.js +6 -4
  58. package/lib/module/components/InstitutionBadge/InstitutionBadge.js +1 -2
  59. package/lib/module/components/LottiePlayer/loadNativeLottieView.js +8 -13
  60. package/lib/module/components/MoneyValue/MoneyValue.js +1 -2
  61. package/lib/module/components/NoteInput/NoteInput.js +7 -6
  62. package/lib/module/components/OTP/OTP.js +1 -2
  63. package/lib/module/components/Overlay/Overlay.js +87 -0
  64. package/lib/module/components/PdpCcCard/PdpCcCard.js +267 -0
  65. package/lib/module/components/PlanComparisonCard/PlanComparisonCard.js +1 -2
  66. package/lib/module/components/PoweredByLabel/PoweredByLabel.js +1 -2
  67. package/lib/module/components/ProductMerchandisingCard/GlassFill.js +257 -0
  68. package/lib/module/components/ProductMerchandisingCard/GlassFill.web.js +111 -0
  69. package/lib/module/components/ProductMerchandisingCard/ProductMerchandisingCard.js +347 -0
  70. package/lib/module/components/ProjectionMarker/ProjectionMarker.js +156 -0
  71. package/lib/module/components/Radio/Radio.js +5 -4
  72. package/lib/module/components/RechargeCard/RechargeCard.js +1 -2
  73. package/lib/module/components/Section/Section.js +1 -2
  74. package/lib/module/components/Slider/Slider.js +468 -0
  75. package/lib/module/components/TextInput/TextInput.js +16 -12
  76. package/lib/module/components/TextSegment/TextSegment.js +113 -0
  77. package/lib/module/components/UpiHandle/UpiHandle.js +1 -2
  78. package/lib/module/components/docs/modeControls.js +111 -0
  79. package/lib/module/components/index.js +10 -0
  80. package/lib/module/design-tokens/Coin Variables-variables-full.json +1 -1
  81. package/lib/module/design-tokens/JFSThemeProvider.js +1 -1
  82. package/lib/module/design-tokens/figma-modes.generated.js +416 -0
  83. package/lib/module/design-tokens/index.js +2 -1
  84. package/lib/module/icons/registry.js +1 -1
  85. package/lib/module/utils/react-utils.js +21 -1
  86. package/lib/typescript/src/components/Accordion/Accordion.d.ts +2 -1
  87. package/lib/typescript/src/components/AccordionCheckbox/AccordionCheckbox.d.ts +2 -1
  88. package/lib/typescript/src/components/AccountCard/AccountCard.d.ts +2 -1
  89. package/lib/typescript/src/components/ActionFooter/ActionFooter.d.ts +2 -1
  90. package/lib/typescript/src/components/ActionTile/ActionTile.d.ts +2 -1
  91. package/lib/typescript/src/components/AllocationComparisonChart/AllocationComparisonChart.d.ts +2 -1
  92. package/lib/typescript/src/components/AmountInput/AmountInput.d.ts +5 -3
  93. package/lib/typescript/src/components/AppBar/AppBar.d.ts +2 -1
  94. package/lib/typescript/src/components/AreaLineChart/AreaLineChart.d.ts +3 -2
  95. package/lib/typescript/src/components/Attached/Attached.d.ts +2 -1
  96. package/lib/typescript/src/components/Avatar/Avatar.d.ts +2 -1
  97. package/lib/typescript/src/components/AvatarGroup/AvatarGroup.d.ts +2 -1
  98. package/lib/typescript/src/components/Badge/Badge.d.ts +2 -1
  99. package/lib/typescript/src/components/Balance/Balance.d.ts +2 -1
  100. package/lib/typescript/src/components/BenefitCard/BenefitCard.d.ts +93 -0
  101. package/lib/typescript/src/components/BottomNav/BottomNav.d.ts +2 -1
  102. package/lib/typescript/src/components/BottomNavItem/BottomNavItem.d.ts +2 -1
  103. package/lib/typescript/src/components/BrandChip/BrandChip.d.ts +2 -1
  104. package/lib/typescript/src/components/BubbleChart/BubbleChart.d.ts +2 -1
  105. package/lib/typescript/src/components/Button/Button.d.ts +2 -1
  106. package/lib/typescript/src/components/ButtonGroup/ButtonGroup.d.ts +2 -1
  107. package/lib/typescript/src/components/Card/Card.d.ts +3 -2
  108. package/lib/typescript/src/components/CardAdvisory/CardAdvisory.d.ts +2 -1
  109. package/lib/typescript/src/components/CardBankAccount/CardBankAccount.d.ts +2 -1
  110. package/lib/typescript/src/components/CardCTA/CardCTA.d.ts +2 -1
  111. package/lib/typescript/src/components/CardFeedback/CardFeedback.d.ts +7 -6
  112. package/lib/typescript/src/components/CardFinancialCondition/CardFinancialCondition.d.ts +2 -1
  113. package/lib/typescript/src/components/CardInsight/CardInsight.d.ts +2 -1
  114. package/lib/typescript/src/components/CardProviderInfo/CardProviderInfo.d.ts +2 -1
  115. package/lib/typescript/src/components/Carousel/Carousel.d.ts +4 -3
  116. package/lib/typescript/src/components/CcCard/CcCard.d.ts +137 -0
  117. package/lib/typescript/src/components/Checkbox/Checkbox.d.ts +5 -3
  118. package/lib/typescript/src/components/CheckboxGroup/CheckboxGroup.d.ts +2 -1
  119. package/lib/typescript/src/components/CheckboxItem/CheckboxItem.d.ts +4 -3
  120. package/lib/typescript/src/components/ChipGroup/ChipGroup.d.ts +2 -1
  121. package/lib/typescript/src/components/ChipSelect/ChipSelect.d.ts +2 -1
  122. package/lib/typescript/src/components/CircularProgressBar/CircularProgressBar.d.ts +2 -1
  123. package/lib/typescript/src/components/CircularProgressBarDoted/CircularProgressBarDoted.d.ts +2 -1
  124. package/lib/typescript/src/components/CircularRating/CircularRating.d.ts +2 -1
  125. package/lib/typescript/src/components/ClusterBubble/ClusterBubble.d.ts +2 -1
  126. package/lib/typescript/src/components/CompareTable/CompareTable.d.ts +88 -0
  127. package/lib/typescript/src/components/ComparisonBar/ComparisonBar.d.ts +118 -0
  128. package/lib/typescript/src/components/CoverageBarComparison/CoverageBarComparison.d.ts +3 -2
  129. package/lib/typescript/src/components/CoverageRing/CoverageRing.d.ts +2 -1
  130. package/lib/typescript/src/components/DebitCard/DebitCard.d.ts +2 -1
  131. package/lib/typescript/src/components/Disclaimer/Disclaimer.d.ts +2 -1
  132. package/lib/typescript/src/components/Divider/Divider.d.ts +2 -1
  133. package/lib/typescript/src/components/DonutChart/DonutChart.d.ts +4 -3
  134. package/lib/typescript/src/components/DonutChartSummary/DonutChartSummary.d.ts +3 -2
  135. package/lib/typescript/src/components/Drawer/Drawer.d.ts +15 -1
  136. package/lib/typescript/src/components/Dropdown/Dropdown.d.ts +3 -2
  137. package/lib/typescript/src/components/DropdownInput/DropdownInput.d.ts +22 -2
  138. package/lib/typescript/src/components/EmptyState/EmptyState.d.ts +2 -1
  139. package/lib/typescript/src/components/ExpandableCheckbox/ExpandableCheckbox.d.ts +2 -1
  140. package/lib/typescript/src/components/FilterBar/FilterBar.d.ts +3 -2
  141. package/lib/typescript/src/components/Form/Form.d.ts +2 -1
  142. package/lib/typescript/src/components/FormField/FormField.d.ts +4 -3
  143. package/lib/typescript/src/components/FullscreenModal/FullscreenModal.d.ts +2 -1
  144. package/lib/typescript/src/components/Gauge/Gauge.d.ts +2 -1
  145. package/lib/typescript/src/components/HStack/HStack.d.ts +2 -1
  146. package/lib/typescript/src/components/HoldingsCard/HoldingsCard.d.ts +2 -1
  147. package/lib/typescript/src/components/Icon/Icon.d.ts +2 -1
  148. package/lib/typescript/src/components/IconButton/IconButton.d.ts +2 -1
  149. package/lib/typescript/src/components/IconCapsule/IconCapsule.d.ts +2 -1
  150. package/lib/typescript/src/components/Image/Image.d.ts +17 -1
  151. package/lib/typescript/src/components/InputSearch/InputSearch.d.ts +25 -3
  152. package/lib/typescript/src/components/InstitutionBadge/InstitutionBadge.d.ts +2 -1
  153. package/lib/typescript/src/components/LazyList/LazyList.d.ts +2 -1
  154. package/lib/typescript/src/components/LinearMeter/LinearMeter.d.ts +3 -2
  155. package/lib/typescript/src/components/LinearProgress/LinearProgress.d.ts +2 -1
  156. package/lib/typescript/src/components/ListGroup/ListGroup.d.ts +2 -1
  157. package/lib/typescript/src/components/ListItem/ListItem.d.ts +2 -1
  158. package/lib/typescript/src/components/LottieIntroBlock/LottieIntroBlock.d.ts +2 -1
  159. package/lib/typescript/src/components/LottiePlayer/LottiePlayer.d.ts +2 -1
  160. package/lib/typescript/src/components/LottiePlayer/LottiePlayer.web.d.ts +2 -1
  161. package/lib/typescript/src/components/MediaCard/MediaCard.d.ts +6 -5
  162. package/lib/typescript/src/components/MerchantProfile/MerchantProfile.d.ts +2 -1
  163. package/lib/typescript/src/components/MessageField/MessageField.d.ts +2 -1
  164. package/lib/typescript/src/components/MetricLegendItem/MetricLegendItem.d.ts +2 -1
  165. package/lib/typescript/src/components/MoneyValue/MoneyValue.d.ts +2 -1
  166. package/lib/typescript/src/components/MonthlyStatusGrid/MonthlyStatusGrid.d.ts +4 -3
  167. package/lib/typescript/src/components/NavArrow/NavArrow.d.ts +2 -1
  168. package/lib/typescript/src/components/NoteInput/NoteInput.d.ts +21 -3
  169. package/lib/typescript/src/components/Nudge/Nudge.d.ts +2 -1
  170. package/lib/typescript/src/components/Numpad/Numpad.d.ts +2 -1
  171. package/lib/typescript/src/components/OTP/OTP.d.ts +3 -2
  172. package/lib/typescript/src/components/Overlay/Overlay.d.ts +52 -0
  173. package/lib/typescript/src/components/PageHero/PageHero.d.ts +2 -1
  174. package/lib/typescript/src/components/PaymentFeedback/PaymentFeedback.d.ts +2 -1
  175. package/lib/typescript/src/components/PdpCcCard/PdpCcCard.d.ts +84 -0
  176. package/lib/typescript/src/components/PlanComparisonCard/PlanComparisonCard.d.ts +2 -1
  177. package/lib/typescript/src/components/Popup/Popup.d.ts +2 -1
  178. package/lib/typescript/src/components/PortfolioHero/PortfolioHero.d.ts +2 -1
  179. package/lib/typescript/src/components/PoweredByLabel/PoweredByLabel.d.ts +2 -1
  180. package/lib/typescript/src/components/ProductLabel/ProductLabel.d.ts +2 -1
  181. package/lib/typescript/src/components/ProductMerchandisingCard/GlassFill.d.ts +56 -0
  182. package/lib/typescript/src/components/ProductMerchandisingCard/GlassFill.web.d.ts +27 -0
  183. package/lib/typescript/src/components/ProductMerchandisingCard/ProductMerchandisingCard.d.ts +81 -0
  184. package/lib/typescript/src/components/ProductOverview/ProductOverview.d.ts +2 -1
  185. package/lib/typescript/src/components/ProgressBadge/ProgressBadge.d.ts +2 -1
  186. package/lib/typescript/src/components/ProjectionMarker/ProjectionMarker.d.ts +82 -0
  187. package/lib/typescript/src/components/Radio/Radio.d.ts +5 -3
  188. package/lib/typescript/src/components/RadioButton/RadioButton.d.ts +2 -2
  189. package/lib/typescript/src/components/RangeTrack/RangeTrack.d.ts +3 -2
  190. package/lib/typescript/src/components/RechargeCard/RechargeCard.d.ts +2 -1
  191. package/lib/typescript/src/components/SavingsGoalSummary/SavingsGoalSummary.d.ts +2 -1
  192. package/lib/typescript/src/components/Screen/Screen.d.ts +2 -1
  193. package/lib/typescript/src/components/Section/Section.d.ts +3 -2
  194. package/lib/typescript/src/components/SegmentedControl/SegmentedControl.d.ts +2 -1
  195. package/lib/typescript/src/components/SegmentedTrack/SegmentedTrack.d.ts +4 -3
  196. package/lib/typescript/src/components/Slider/Slider.d.ts +99 -0
  197. package/lib/typescript/src/components/Slot/Slot.d.ts +2 -1
  198. package/lib/typescript/src/components/Spinner/Spinner.d.ts +2 -1
  199. package/lib/typescript/src/components/StatGroup/StatGroup.d.ts +2 -1
  200. package/lib/typescript/src/components/StatItem/StatItem.d.ts +2 -1
  201. package/lib/typescript/src/components/StatusHero/StatusHero.d.ts +2 -1
  202. package/lib/typescript/src/components/Stepper/Step.d.ts +2 -1
  203. package/lib/typescript/src/components/Stepper/StepLabel.d.ts +2 -1
  204. package/lib/typescript/src/components/Stepper/Stepper.d.ts +2 -1
  205. package/lib/typescript/src/components/StrengthIndicator/StrengthIndicator.d.ts +2 -1
  206. package/lib/typescript/src/components/SuggestiveSearch/SuggestiveSearch.d.ts +2 -1
  207. package/lib/typescript/src/components/SummaryTile/SummaryTile.d.ts +2 -1
  208. package/lib/typescript/src/components/SupportText/SupportText.d.ts +2 -1
  209. package/lib/typescript/src/components/SupportText/SupportTextIcon.d.ts +2 -1
  210. package/lib/typescript/src/components/SwappableAmount/SwappableAmount.d.ts +2 -1
  211. package/lib/typescript/src/components/Tabs/TabItem.d.ts +2 -1
  212. package/lib/typescript/src/components/Tabs/Tabs.d.ts +2 -1
  213. package/lib/typescript/src/components/TestimonialsCard/TestimonialsCard.d.ts +2 -1
  214. package/lib/typescript/src/components/Text/Text.d.ts +2 -1
  215. package/lib/typescript/src/components/TextInput/TextInput.d.ts +12 -31
  216. package/lib/typescript/src/components/TextSegment/TextSegment.d.ts +100 -0
  217. package/lib/typescript/src/components/ThreadHero/ThreadHero.d.ts +2 -1
  218. package/lib/typescript/src/components/Title/Title.d.ts +2 -1
  219. package/lib/typescript/src/components/Toast/Toast.d.ts +2 -1
  220. package/lib/typescript/src/components/Toast/ToastProvider.d.ts +2 -1
  221. package/lib/typescript/src/components/Toast/useToast.d.ts +3 -2
  222. package/lib/typescript/src/components/Toggle/Toggle.d.ts +2 -1
  223. package/lib/typescript/src/components/Tooltip/Tooltip.d.ts +2 -1
  224. package/lib/typescript/src/components/TransactionBubble/TransactionBubble.d.ts +2 -1
  225. package/lib/typescript/src/components/TransactionDetails/TransactionDetails.d.ts +3 -2
  226. package/lib/typescript/src/components/TransactionStatus/TransactionStatus.d.ts +2 -1
  227. package/lib/typescript/src/components/UpiHandle/UpiHandle.d.ts +2 -1
  228. package/lib/typescript/src/components/VStack/VStack.d.ts +2 -1
  229. package/lib/typescript/src/components/docs/modeControls.d.ts +28 -0
  230. package/lib/typescript/src/components/index.d.ts +11 -1
  231. package/lib/typescript/src/design-tokens/JFSThemeProvider.d.ts +4 -3
  232. package/lib/typescript/src/design-tokens/figma-modes.generated.d.ts +284 -0
  233. package/lib/typescript/src/design-tokens/index.d.ts +1 -0
  234. package/lib/typescript/src/icons/registry.d.ts +1 -1
  235. package/lib/typescript/src/skeleton/Skeleton.d.ts +2 -1
  236. package/lib/typescript/src/utils/react-utils.d.ts +12 -1
  237. package/package.json +4 -2
  238. package/src/components/Accordion/Accordion.tsx +2 -1
  239. package/src/components/AccordionCheckbox/AccordionCheckbox.tsx +2 -1
  240. package/src/components/AccountCard/AccountCard.tsx +2 -1
  241. package/src/components/ActionFooter/ActionFooter.tsx +2 -1
  242. package/src/components/ActionTile/ActionTile.tsx +2 -1
  243. package/src/components/AllocationComparisonChart/AllocationComparisonChart.tsx +2 -1
  244. package/src/components/AmountInput/AmountInput.tsx +9 -6
  245. package/src/components/AppBar/AppBar.tsx +2 -1
  246. package/src/components/AreaLineChart/AreaLineChart.tsx +8 -7
  247. package/src/components/Attached/Attached.tsx +2 -1
  248. package/src/components/Avatar/Avatar.tsx +3 -2
  249. package/src/components/AvatarGroup/AvatarGroup.tsx +2 -1
  250. package/src/components/Badge/Badge.tsx +2 -1
  251. package/src/components/Balance/Balance.tsx +18 -12
  252. package/src/components/BenefitCard/BenefitCard.tsx +309 -0
  253. package/src/components/BottomNav/BottomNav.tsx +2 -1
  254. package/src/components/BottomNavItem/BottomNavItem.tsx +3 -2
  255. package/src/components/BrandChip/BrandChip.tsx +3 -2
  256. package/src/components/BubbleChart/BubbleChart.tsx +2 -1
  257. package/src/components/Button/Button.tsx +3 -2
  258. package/src/components/ButtonGroup/ButtonGroup.tsx +2 -1
  259. package/src/components/Card/Card.tsx +4 -3
  260. package/src/components/CardAdvisory/CardAdvisory.tsx +3 -2
  261. package/src/components/CardBankAccount/CardBankAccount.tsx +2 -1
  262. package/src/components/CardCTA/CardCTA.tsx +3 -2
  263. package/src/components/CardFeedback/CardFeedback.tsx +11 -10
  264. package/src/components/CardFinancialCondition/CardFinancialCondition.tsx +3 -2
  265. package/src/components/CardInsight/CardInsight.tsx +2 -1
  266. package/src/components/CardProviderInfo/CardProviderInfo.tsx +2 -1
  267. package/src/components/Carousel/Carousel.tsx +5 -4
  268. package/src/components/CcCard/CcCard.tsx +598 -0
  269. package/src/components/Checkbox/Checkbox.tsx +7 -5
  270. package/src/components/CheckboxGroup/CheckboxGroup.tsx +2 -1
  271. package/src/components/CheckboxItem/CheckboxItem.tsx +7 -5
  272. package/src/components/ChipGroup/ChipGroup.tsx +2 -1
  273. package/src/components/ChipSelect/ChipSelect.tsx +2 -1
  274. package/src/components/CircularProgressBar/CircularProgressBar.tsx +2 -1
  275. package/src/components/CircularProgressBarDoted/CircularProgressBarDoted.tsx +2 -1
  276. package/src/components/CircularRating/CircularRating.tsx +3 -2
  277. package/src/components/ClusterBubble/ClusterBubble.tsx +2 -1
  278. package/src/components/CompareTable/CompareTable.tsx +477 -0
  279. package/src/components/ComparisonBar/ComparisonBar.tsx +356 -0
  280. package/src/components/CoverageBarComparison/CoverageBarComparison.tsx +3 -2
  281. package/src/components/CoverageRing/CoverageRing.tsx +2 -1
  282. package/src/components/DebitCard/DebitCard.tsx +2 -1
  283. package/src/components/Disclaimer/Disclaimer.tsx +2 -1
  284. package/src/components/Divider/Divider.tsx +2 -1
  285. package/src/components/DonutChart/DonutChart.tsx +6 -5
  286. package/src/components/DonutChartSummary/DonutChartSummary.tsx +3 -2
  287. package/src/components/Drawer/Drawer.tsx +21 -1
  288. package/src/components/Dropdown/Dropdown.tsx +4 -3
  289. package/src/components/DropdownInput/DropdownInput.tsx +60 -7
  290. package/src/components/EmptyState/EmptyState.tsx +2 -1
  291. package/src/components/ExpandableCheckbox/ExpandableCheckbox.tsx +2 -1
  292. package/src/components/FilterBar/FilterBar.tsx +3 -2
  293. package/src/components/Form/Form.tsx +2 -1
  294. package/src/components/FormField/FormField.tsx +8 -6
  295. package/src/components/FullscreenModal/FullscreenModal.tsx +68 -10
  296. package/src/components/Gauge/Gauge.tsx +2 -1
  297. package/src/components/HStack/HStack.tsx +2 -1
  298. package/src/components/HoldingsCard/HoldingsCard.tsx +2 -1
  299. package/src/components/Icon/Icon.tsx +3 -2
  300. package/src/components/IconButton/IconButton.tsx +3 -2
  301. package/src/components/IconCapsule/IconCapsule.tsx +3 -2
  302. package/src/components/Image/Image.tsx +29 -5
  303. package/src/components/InputSearch/InputSearch.tsx +11 -7
  304. package/src/components/InstitutionBadge/InstitutionBadge.tsx +3 -2
  305. package/src/components/LazyList/LazyList.tsx +2 -1
  306. package/src/components/LinearMeter/LinearMeter.tsx +3 -2
  307. package/src/components/LinearProgress/LinearProgress.tsx +2 -1
  308. package/src/components/ListGroup/ListGroup.tsx +2 -1
  309. package/src/components/ListItem/ListItem.tsx +3 -2
  310. package/src/components/LottieIntroBlock/LottieIntroBlock.tsx +2 -1
  311. package/src/components/LottiePlayer/LottiePlayer.tsx +3 -2
  312. package/src/components/LottiePlayer/LottiePlayer.web.tsx +3 -2
  313. package/src/components/LottiePlayer/loadNativeLottieView.tsx +9 -13
  314. package/src/components/MediaCard/MediaCard.tsx +7 -6
  315. package/src/components/MerchantProfile/MerchantProfile.tsx +2 -1
  316. package/src/components/MessageField/MessageField.tsx +3 -2
  317. package/src/components/MetricLegendItem/MetricLegendItem.tsx +2 -1
  318. package/src/components/MoneyValue/MoneyValue.tsx +2 -1
  319. package/src/components/MonthlyStatusGrid/MonthlyStatusGrid.tsx +5 -4
  320. package/src/components/NavArrow/NavArrow.tsx +3 -2
  321. package/src/components/NoteInput/NoteInput.tsx +10 -7
  322. package/src/components/Nudge/Nudge.tsx +3 -2
  323. package/src/components/Numpad/Numpad.tsx +2 -1
  324. package/src/components/OTP/OTP.tsx +3 -2
  325. package/src/components/Overlay/Overlay.tsx +114 -0
  326. package/src/components/PageHero/PageHero.tsx +2 -1
  327. package/src/components/PaymentFeedback/PaymentFeedback.tsx +2 -1
  328. package/src/components/PdpCcCard/PdpCcCard.tsx +356 -0
  329. package/src/components/PlanComparisonCard/PlanComparisonCard.tsx +2 -1
  330. package/src/components/Popup/Popup.tsx +2 -1
  331. package/src/components/PortfolioHero/PortfolioHero.tsx +2 -1
  332. package/src/components/PoweredByLabel/PoweredByLabel.tsx +2 -1
  333. package/src/components/ProductLabel/ProductLabel.tsx +2 -1
  334. package/src/components/ProductMerchandisingCard/GlassFill.tsx +276 -0
  335. package/src/components/ProductMerchandisingCard/GlassFill.web.tsx +127 -0
  336. package/src/components/ProductMerchandisingCard/ProductMerchandisingCard.tsx +423 -0
  337. package/src/components/ProductOverview/ProductOverview.tsx +2 -1
  338. package/src/components/ProgressBadge/ProgressBadge.tsx +2 -1
  339. package/src/components/ProjectionMarker/ProjectionMarker.tsx +277 -0
  340. package/src/components/Radio/Radio.tsx +7 -5
  341. package/src/components/RangeTrack/RangeTrack.tsx +3 -2
  342. package/src/components/RechargeCard/RechargeCard.tsx +2 -1
  343. package/src/components/SavingsGoalSummary/SavingsGoalSummary.tsx +2 -1
  344. package/src/components/Screen/Screen.tsx +2 -1
  345. package/src/components/Section/Section.tsx +6 -5
  346. package/src/components/SegmentedControl/SegmentedControl.tsx +3 -2
  347. package/src/components/SegmentedTrack/SegmentedTrack.tsx +5 -4
  348. package/src/components/Slider/Slider.tsx +628 -0
  349. package/src/components/Slot/Slot.tsx +2 -1
  350. package/src/components/Spinner/Spinner.tsx +2 -1
  351. package/src/components/StatGroup/StatGroup.tsx +3 -2
  352. package/src/components/StatItem/StatItem.tsx +2 -1
  353. package/src/components/StatusHero/StatusHero.tsx +2 -1
  354. package/src/components/Stepper/Step.tsx +2 -1
  355. package/src/components/Stepper/StepLabel.tsx +2 -1
  356. package/src/components/Stepper/Stepper.tsx +2 -1
  357. package/src/components/StrengthIndicator/StrengthIndicator.tsx +2 -1
  358. package/src/components/SuggestiveSearch/SuggestiveSearch.tsx +4 -3
  359. package/src/components/SummaryTile/SummaryTile.tsx +2 -1
  360. package/src/components/SupportText/SupportText.tsx +2 -1
  361. package/src/components/SupportText/SupportTextIcon.tsx +2 -1
  362. package/src/components/SwappableAmount/SwappableAmount.tsx +2 -1
  363. package/src/components/Tabs/TabItem.tsx +2 -1
  364. package/src/components/Tabs/Tabs.tsx +2 -1
  365. package/src/components/TestimonialsCard/TestimonialsCard.tsx +2 -1
  366. package/src/components/Text/Text.tsx +2 -1
  367. package/src/components/TextInput/TextInput.tsx +18 -13
  368. package/src/components/TextSegment/TextSegment.tsx +166 -0
  369. package/src/components/ThreadHero/ThreadHero.tsx +2 -1
  370. package/src/components/Title/Title.tsx +2 -1
  371. package/src/components/Toast/Toast.tsx +2 -1
  372. package/src/components/Toast/ToastProvider.tsx +2 -1
  373. package/src/components/Toast/useToast.ts +3 -2
  374. package/src/components/Toggle/Toggle.tsx +2 -1
  375. package/src/components/Tooltip/Tooltip.tsx +3 -2
  376. package/src/components/TransactionBubble/TransactionBubble.tsx +2 -1
  377. package/src/components/TransactionDetails/TransactionDetails.tsx +3 -2
  378. package/src/components/TransactionStatus/TransactionStatus.tsx +3 -2
  379. package/src/components/UpiHandle/UpiHandle.tsx +3 -2
  380. package/src/components/VStack/VStack.tsx +2 -1
  381. package/src/components/docs/modeControls.tsx +122 -0
  382. package/src/components/index.ts +11 -1
  383. package/src/design-tokens/Coin Variables-variables-full.json +1 -1
  384. package/src/design-tokens/JFSThemeProvider.tsx +4 -3
  385. package/src/design-tokens/figma-modes.generated.ts +425 -0
  386. package/src/design-tokens/index.ts +1 -0
  387. package/src/icons/registry.ts +1 -1
  388. package/src/skeleton/Skeleton.tsx +2 -1
  389. package/src/utils/react-utils.ts +26 -2
  390. package/lib/typescript/scripts/extract-component-tokens.d.ts +0 -9
  391. package/lib/typescript/scripts/generate-component-docs.d.ts +0 -9
  392. package/lib/typescript/scripts/generate-icon-registry.d.ts +0 -3
@@ -0,0 +1,372 @@
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 _reactUtils = require("../../utils/react-utils");
11
+ var _Accordion = _interopRequireDefault(require("../Accordion/Accordion"));
12
+ var _Image = _interopRequireDefault(require("../Image/Image"));
13
+ var _IconButton = _interopRequireDefault(require("../IconButton/IconButton"));
14
+ var _Icon = _interopRequireDefault(require("../../icons/Icon"));
15
+ var _jsxRuntime = require("react/jsx-runtime");
16
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
17
+ /**
18
+ * Brand link colour used by the selection-card CTA. The Figma node resolves
19
+ * `button/foreground` to this value, but no reproducible token mode currently
20
+ * produces it (the published token store is out of sync), so it is pinned here
21
+ * to stay faithful to the design.
22
+ */
23
+ const BRAND_LINK_COLOR = '#5d00b5';
24
+
25
+ /**
26
+ * Selection-card close control (Figma node 5568:3492). It is an `IconButton`
27
+ * pinned to the card's top-right corner. The Figma node resolves its
28
+ * `iconButton/background` and border to fully transparent (`#ebebed00` /
29
+ * `#ffffff00`) — values no token mode reproduces — so they are overridden here.
30
+ * Size (40px) and icon are left to the `IconButton`'s own token resolution
31
+ * (padding 11 · 2 + icon 18).
32
+ */
33
+ /** Add-a-card icon button fill + icon (Figma node 5568:3494 direct overrides). */
34
+ const ADD_BUTTON_BG = '#545961';
35
+ const ADD_BUTTON_ICON_COLOR = '#ffffff';
36
+ const closeButtonStyle = {
37
+ position: 'absolute',
38
+ top: 1,
39
+ right: 0,
40
+ backgroundColor: 'transparent',
41
+ borderColor: 'transparent'
42
+ };
43
+
44
+ /** Keeps every text layer on a single line on web. */
45
+ const NO_WRAP_TEXT = {
46
+ flexShrink: 0,
47
+ ...(_reactNative.Platform.OS === 'web' ? {
48
+ whiteSpace: 'nowrap'
49
+ } : {})
50
+ };
51
+ const toWeight = w => typeof w === 'number' ? `${w}` : w;
52
+
53
+ /**
54
+ * A single product/plan column rendered as a selection card at the top of the
55
+ * table. The card order maps 1:1 to each {@link CompareTableRow}'s `values`.
56
+ */
57
+
58
+ /**
59
+ * Value rendered inside a comparison cell.
60
+ * - `string` / `number` → rendered as value text.
61
+ * - `false` → renders the muted "not available" cross icon.
62
+ * - any React element → rendered as-is (e.g. a `Badge`, `MoneyValue`, icon…).
63
+ * - `null` / `undefined` / `true` → empty cell.
64
+ */
65
+
66
+ /**
67
+ * A collapsible section. Each section renders as an `Accordion` whose body is a
68
+ * comparison table that spans the same columns as the selection cards.
69
+ */
70
+
71
+ const DEFAULT_COLUMNS = [{
72
+ label: 'Plan A',
73
+ actionLabel: 'View details',
74
+ onRemove: () => {}
75
+ }, {
76
+ label: 'Plan B',
77
+ actionLabel: 'View details',
78
+ onRemove: () => {}
79
+ }];
80
+ const DEFAULT_SECTIONS = [{
81
+ title: 'Fees & charges',
82
+ header: 'Annual fees',
83
+ defaultExpanded: true,
84
+ rows: [{
85
+ values: ['₹0', '₹499']
86
+ }, {
87
+ values: ['Free', 'Up to ₹1,300']
88
+ }, {
89
+ values: ['1x', '1.25x']
90
+ }]
91
+ }];
92
+
93
+ /**
94
+ * CompareTable renders a product comparison surface: a row of selection cards
95
+ * (one per column) followed by one or more collapsible sections, each holding a
96
+ * comparison table whose cells line up beneath their column.
97
+ *
98
+ * The selection card is an internal sub-component and is intentionally not
99
+ * exported — it should only be used through `CompareTable`. Implementation of
100
+ * Figma node `5568:3496` (`Compare table`) with sub-component `5568:3487`
101
+ * (`selectioncard`).
102
+ *
103
+ * @component
104
+ */
105
+ function CompareTable({
106
+ columns = DEFAULT_COLUMNS,
107
+ sections = DEFAULT_SECTIONS,
108
+ onAddColumn,
109
+ addColumnLabel = 'Add a card',
110
+ maxColumns = 4,
111
+ modes = _reactUtils.EMPTY_MODES,
112
+ style
113
+ }) {
114
+ // --- selection card tokens ------------------------------------------------
115
+ const cardBg = (0, _figmaVariablesResolver.getVariableByName)('selectionCard/background/color', modes) ?? '#ffffff';
116
+ const cardBorderColor = (0, _figmaVariablesResolver.getVariableByName)('selectionCard/border/color', modes) ?? '#eeeeee';
117
+ const cardBorderSize = (0, _figmaVariablesResolver.getVariableByName)('selectionCard/border/size', modes) ?? 1;
118
+ const cardGap = (0, _figmaVariablesResolver.getVariableByName)('selectionCard/gap', modes) ?? 12;
119
+ const cardPaddingH = (0, _figmaVariablesResolver.getVariableByName)('selectionCard/padding/horizontal', modes) ?? 20;
120
+ const cardPaddingV = (0, _figmaVariablesResolver.getVariableByName)('selectionCard/padding/vertical', modes) ?? 20;
121
+ const cardLabelColor = (0, _figmaVariablesResolver.getVariableByName)('selectionCard/label/color', modes) ?? '#000000';
122
+ const cardLabelFontSize = (0, _figmaVariablesResolver.getVariableByName)('selectionCard/label/fontsize', modes) ?? 14;
123
+ const cardLabelFontFamily = (0, _figmaVariablesResolver.getVariableByName)('selectionCard/label/fontfamily', modes) ?? 'JioType Var';
124
+ const cardLabelFontWeight = (0, _figmaVariablesResolver.getVariableByName)('selectionCard/label/fontweight', modes) ?? 700;
125
+ const imageRadius = (0, _figmaVariablesResolver.getVariableByName)('image/radius', modes) ?? 8;
126
+
127
+ // --- add-a-card icon button tokens ---------------------------------------
128
+ // padding/size/border come from the shared iconButton tokens; the filled
129
+ // background (#545961) and white icon are the Figma node's direct overrides
130
+ // (no token mode reproduces them), so they are pinned to match the design.
131
+ const addBorderColor = (0, _figmaVariablesResolver.getVariableByName)('iconButton/border/color', modes) ?? 'rgba(255,255,255,0)';
132
+ const addBorderSize = (0, _figmaVariablesResolver.getVariableByName)('iconButton/border/size', modes) ?? 1;
133
+ const addPadding = (0, _figmaVariablesResolver.getVariableByName)('iconButton/padding', modes) ?? 11;
134
+ const addIconSize = (0, _figmaVariablesResolver.getVariableByName)('iconButton/icon/size', modes) ?? 18;
135
+ const addBg = ADD_BUTTON_BG;
136
+ const addIconColor = ADD_BUTTON_ICON_COLOR;
137
+
138
+ // --- table header tokens --------------------------------------------------
139
+ const headerBg = (0, _figmaVariablesResolver.getVariableByName)('comparetableHeader/background/color', modes) ?? '#f5f5f5';
140
+ const headerLabelColor = (0, _figmaVariablesResolver.getVariableByName)('comparetableHeader/label/color', modes) ?? '#000000';
141
+ const headerFontSize = (0, _figmaVariablesResolver.getVariableByName)('comparetableHeader/label/fontsize', modes) ?? 14;
142
+ const headerFontFamily = (0, _figmaVariablesResolver.getVariableByName)('comparetableHeader/label/fontfamily', modes) ?? 'JioType Var';
143
+ const headerFontWeight = (0, _figmaVariablesResolver.getVariableByName)('comparetableHeader/label/fontweight', modes) ?? 600;
144
+ const headerPaddingH = (0, _figmaVariablesResolver.getVariableByName)('comparetableHeader/padding/horizontal', modes) ?? 12;
145
+ const headerPaddingV = (0, _figmaVariablesResolver.getVariableByName)('comparetableHeader/padding/vertical', modes) ?? 12;
146
+
147
+ // --- table cell tokens ----------------------------------------------------
148
+ const cellBorderColor = (0, _figmaVariablesResolver.getVariableByName)('compareTableCell/border/color', modes) ?? '#eeeeee';
149
+ const cellBorderSize = (0, _figmaVariablesResolver.getVariableByName)('compareTableCell/border/size', modes) ?? 1;
150
+ const cellBg = (0, _figmaVariablesResolver.getVariableByName)('compareTableCell/background/color', modes) ?? '#ffffff';
151
+ const cellLabelColor = (0, _figmaVariablesResolver.getVariableByName)('compareTableCell/label/color', modes) ?? '#000000';
152
+ const cellFontSize = (0, _figmaVariablesResolver.getVariableByName)('compareTableCell/label/fontsize', modes) ?? 14;
153
+ const cellFontFamily = (0, _figmaVariablesResolver.getVariableByName)('compareTableCell/label/fontfamily', modes) ?? 'JioType Var';
154
+ const cellFontWeight = (0, _figmaVariablesResolver.getVariableByName)('compareTableCell/label/fontweight', modes) ?? 400;
155
+ const cellPaddingH = (0, _figmaVariablesResolver.getVariableByName)('compareTableCell/padding/horizontal', modes) ?? 12;
156
+ const cellPaddingV = (0, _figmaVariablesResolver.getVariableByName)('compareTableCell/padding/vertical', modes) ?? 12;
157
+ const columnCount = columns.length;
158
+ const showAddCard = onAddColumn != null && columnCount < maxColumns;
159
+ const cardLabelStyle = {
160
+ ...NO_WRAP_TEXT,
161
+ color: cardLabelColor,
162
+ fontSize: cardLabelFontSize,
163
+ fontFamily: cardLabelFontFamily,
164
+ fontWeight: toWeight(cardLabelFontWeight),
165
+ lineHeight: cardLabelFontSize * 1.1,
166
+ textAlign: 'center'
167
+ };
168
+ const linkStyle = {
169
+ ...NO_WRAP_TEXT,
170
+ color: BRAND_LINK_COLOR,
171
+ fontFamily: cardLabelFontFamily,
172
+ fontSize: 14,
173
+ fontWeight: '700',
174
+ lineHeight: 22
175
+ };
176
+ const headerTextStyle = {
177
+ color: headerLabelColor,
178
+ fontSize: headerFontSize,
179
+ fontFamily: headerFontFamily,
180
+ fontWeight: toWeight(headerFontWeight)
181
+ };
182
+ const cellTextStyle = {
183
+ color: cellLabelColor,
184
+ fontSize: cellFontSize,
185
+ fontFamily: cellFontFamily,
186
+ fontWeight: toWeight(cellFontWeight)
187
+ };
188
+ const cardStyle = {
189
+ flex: 1,
190
+ minWidth: 0,
191
+ minHeight: 147,
192
+ backgroundColor: cardBg,
193
+ alignItems: 'center',
194
+ justifyContent: 'center',
195
+ gap: cardGap,
196
+ paddingHorizontal: cardPaddingH,
197
+ paddingVertical: cardPaddingV
198
+ };
199
+ const renderCard = (column, index) => {
200
+ const isLast = index === columnCount - 1 && !showAddCard;
201
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
202
+ style: [cardStyle, {
203
+ borderBottomWidth: cardBorderSize,
204
+ borderBottomColor: cardBorderColor,
205
+ borderRightWidth: isLast ? 0 : cardBorderSize,
206
+ borderRightColor: cardBorderColor
207
+ }],
208
+ children: [column.imageSource != null && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Image.default, {
209
+ imageSource: column.imageSource,
210
+ width: 66,
211
+ height: 44,
212
+ borderRadius: imageRadius,
213
+ resizeMode: "cover",
214
+ accessibilityLabel: column.label
215
+ }), column.label != null && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
216
+ style: cardLabelStyle,
217
+ numberOfLines: 2,
218
+ children: column.label
219
+ }), column.actionLabel != null && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
220
+ onPress: column.onActionPress,
221
+ accessibilityRole: "button",
222
+ accessibilityLabel: column.actionLabel,
223
+ hitSlop: 6,
224
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
225
+ style: linkStyle,
226
+ children: column.actionLabel
227
+ })
228
+ }), column.onRemove != null &&
229
+ /*#__PURE__*/
230
+ // Figma node 5568:3492 — an Icon Button (not a capsule):
231
+ // padding 11 + icon 18 → 40px circle, transparent background,
232
+ // absolutely pinned to the card's top-right (right:0, top:1).
233
+ (0, _jsxRuntime.jsx)(_IconButton.default, {
234
+ iconName: "ic_close",
235
+ onPress: column.onRemove,
236
+ modes: modes,
237
+ accessibilityLabel: `Remove ${column.label ?? 'column'}`,
238
+ style: closeButtonStyle
239
+ })]
240
+ }, column.key ?? column.label ?? index);
241
+ };
242
+ const renderAddCard = () => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Pressable, {
243
+ onPress: onAddColumn,
244
+ accessibilityRole: "button",
245
+ accessibilityLabel: addColumnLabel,
246
+ style: [cardStyle, {
247
+ borderBottomWidth: cardBorderSize,
248
+ borderBottomColor: cardBorderColor
249
+ }],
250
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
251
+ style: {
252
+ width: addPadding * 2 + addIconSize,
253
+ height: addPadding * 2 + addIconSize,
254
+ borderRadius: 9999,
255
+ borderWidth: addBorderSize,
256
+ borderColor: addBorderColor,
257
+ backgroundColor: addBg,
258
+ alignItems: 'center',
259
+ justifyContent: 'center'
260
+ },
261
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.default, {
262
+ name: "ic_add",
263
+ size: addIconSize,
264
+ color: addIconColor,
265
+ accessibilityElementsHidden: true,
266
+ importantForAccessibility: "no"
267
+ })
268
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
269
+ style: cardLabelStyle,
270
+ numberOfLines: 1,
271
+ children: addColumnLabel
272
+ })]
273
+ }, "__add_card__");
274
+ const renderCellContent = (value, cellKey) => {
275
+ if (value === false) {
276
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.default, {
277
+ name: "ic_close",
278
+ size: cellFontSize + 2,
279
+ color: cellBorderColor
280
+ }, cellKey);
281
+ }
282
+ if (value === null || value === undefined || value === true) {
283
+ return null;
284
+ }
285
+ if (typeof value === 'string' || typeof value === 'number') {
286
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
287
+ style: cellTextStyle,
288
+ children: value
289
+ }, cellKey);
290
+ }
291
+ return (0, _reactUtils.cloneChildrenWithModes)(value, modes);
292
+ };
293
+ const renderTable = section => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
294
+ style: {
295
+ width: '100%',
296
+ borderWidth: cellBorderSize,
297
+ borderColor: cellBorderColor,
298
+ overflow: 'hidden'
299
+ },
300
+ children: [section.header != null && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
301
+ style: {
302
+ backgroundColor: headerBg,
303
+ paddingHorizontal: headerPaddingH,
304
+ paddingVertical: headerPaddingV,
305
+ borderBottomWidth: cellBorderSize,
306
+ borderBottomColor: cellBorderColor
307
+ },
308
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
309
+ style: headerTextStyle,
310
+ children: section.header
311
+ })
312
+ }), section.rows.map((row, rowIndex) => {
313
+ const isLastRow = rowIndex === section.rows.length - 1;
314
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
315
+ style: {
316
+ flexDirection: 'row',
317
+ width: '100%'
318
+ },
319
+ children: Array.from({
320
+ length: columnCount
321
+ }).map((_, colIndex) => {
322
+ const isLastCol = colIndex === columnCount - 1;
323
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
324
+ style: {
325
+ flex: 1,
326
+ minWidth: 0,
327
+ backgroundColor: cellBg,
328
+ justifyContent: 'center',
329
+ paddingHorizontal: cellPaddingH,
330
+ paddingVertical: cellPaddingV,
331
+ borderRightWidth: isLastCol ? 0 : cellBorderSize,
332
+ borderRightColor: cellBorderColor,
333
+ borderBottomWidth: isLastRow ? 0 : cellBorderSize,
334
+ borderBottomColor: cellBorderColor
335
+ },
336
+ children: renderCellContent(row.values?.[colIndex], `${rowIndex}-${colIndex}`)
337
+ }, colIndex);
338
+ })
339
+ }, row.key ?? rowIndex);
340
+ })]
341
+ });
342
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
343
+ style: [{
344
+ width: '100%',
345
+ backgroundColor: cardBg,
346
+ borderWidth: 1,
347
+ borderColor: '#e8e8e8',
348
+ overflow: 'hidden'
349
+ }, style],
350
+ children: [(columnCount > 0 || showAddCard) && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
351
+ style: {
352
+ flexDirection: 'row',
353
+ width: '100%'
354
+ },
355
+ children: [columns.map(renderCard), showAddCard && renderAddCard()]
356
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
357
+ style: {
358
+ width: '100%'
359
+ },
360
+ children: sections.map((section, index) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_Accordion.default, {
361
+ title: section.title,
362
+ defaultExpanded: section.defaultExpanded ?? index === 0,
363
+ modes: modes,
364
+ style: {
365
+ paddingHorizontal: headerPaddingH
366
+ },
367
+ children: renderTable(section)
368
+ }, section.key ?? section.title ?? index))
369
+ })]
370
+ });
371
+ }
372
+ var _default = exports.default = CompareTable;
@@ -0,0 +1,266 @@
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 _reactUtils = require("../../utils/react-utils");
12
+ var _webPlatformUtils = require("../../utils/web-platform-utils");
13
+ var _Button = _interopRequireDefault(require("../Button/Button"));
14
+ var _Image = _interopRequireDefault(require("../Image/Image"));
15
+ var _IconCapsule = _interopRequireDefault(require("../IconCapsule/IconCapsule"));
16
+ var _jsxRuntime = require("react/jsx-runtime");
17
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
18
+ 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); }
19
+ /**
20
+ * A single slot in the {@link ComparisonBar}. Each item is either empty (the
21
+ * "Add" state — a tappable `+` capsule) or filled with an image (the
22
+ * "Image Added" state — the image plus a dismiss capsule in the corner).
23
+ *
24
+ * The presence of {@link ComparisonBarItem.imageSource} is what toggles the
25
+ * state: provide a source to show the image, leave it `undefined`/`null` to
26
+ * show the empty add slot. This keeps the component fully controlled — the
27
+ * `ComparisonBar` never owns the image state itself, so the consumer decides
28
+ * (e.g. after opening a file/asset picker) when and how an item flips between
29
+ * the two states.
30
+ */
31
+
32
+ const ITEM_WIDTH = 45;
33
+ const ITEM_HEIGHT = 44;
34
+ function resolveTokens(modes) {
35
+ const cardGap = (0, _figmaVariablesResolver.getVariableByName)('compareFloatCard/gap', modes) ?? 12;
36
+ const cardPadH = (0, _figmaVariablesResolver.getVariableByName)('compareFloatCard/padding/horizontal', modes) ?? 12;
37
+ const cardPadV = (0, _figmaVariablesResolver.getVariableByName)('compareFloatCard/padding/vertical', modes) ?? 10;
38
+ const cardRadius = (0, _figmaVariablesResolver.getVariableByName)('compareFloatCard/radius', modes) ?? 12;
39
+ const cardBackground = (0, _figmaVariablesResolver.getVariableByName)('compareFloatCard/background', modes) ?? '#ffffff';
40
+ const cardBorderColor = (0, _figmaVariablesResolver.getVariableByName)('compareFloatCard/border/color', modes) ?? '#f5f5f5';
41
+ const itemPadH = (0, _figmaVariablesResolver.getVariableByName)('compareCardItem/padding/horizontal', modes) ?? 6;
42
+ const itemPadV = (0, _figmaVariablesResolver.getVariableByName)('compareCardItem/padding/vertical', modes) ?? 8;
43
+ const itemRadius = (0, _figmaVariablesResolver.getVariableByName)('compareCardItem/radius', modes) ?? 8;
44
+ const itemBackground = (0, _figmaVariablesResolver.getVariableByName)('compareCardItem/background', modes) ?? '#ebebed';
45
+ const imageRadius = (0, _figmaVariablesResolver.getVariableByName)('image/radius', modes) ?? 8;
46
+ return {
47
+ card: {
48
+ flexDirection: 'row',
49
+ alignItems: 'center',
50
+ gap: cardGap,
51
+ paddingHorizontal: cardPadH,
52
+ paddingVertical: cardPadV,
53
+ borderRadius: cardRadius,
54
+ borderWidth: 1,
55
+ borderColor: cardBorderColor,
56
+ backgroundColor: cardBackground,
57
+ alignSelf: 'flex-start'
58
+ },
59
+ item: {
60
+ width: ITEM_WIDTH,
61
+ height: ITEM_HEIGHT,
62
+ borderRadius: itemRadius,
63
+ backgroundColor: itemBackground,
64
+ paddingHorizontal: itemPadH,
65
+ paddingVertical: itemPadV,
66
+ alignItems: 'center',
67
+ justifyContent: 'center'
68
+ },
69
+ itemImageState: {
70
+ paddingHorizontal: itemPadH,
71
+ paddingVertical: itemPadV
72
+ },
73
+ imageRadius
74
+ };
75
+ }
76
+ /**
77
+ * Internal slot renderer for {@link ComparisonBar}. Intentionally NOT exported
78
+ * — it is meaningless outside of a `ComparisonBar` (its layout, sizing and
79
+ * remove affordance all assume the surrounding card) and is kept private so
80
+ * the public surface stays a single, cohesive component.
81
+ */
82
+ function Additem({
83
+ item,
84
+ index,
85
+ tokens,
86
+ addCapsuleModes,
87
+ closeCapsuleModes,
88
+ onPress,
89
+ onRemove
90
+ }) {
91
+ const hasImage = item.imageSource != null && item.imageSource !== '';
92
+ const id = item.id ?? index;
93
+ const addWebProps = (0, _webPlatformUtils.usePressableWebSupport)({
94
+ restProps: {},
95
+ onPress: () => onPress?.(id, index),
96
+ disabled: false,
97
+ accessibilityLabel: item.accessibilityLabel ?? 'Add item to comparison'
98
+ });
99
+ const removeWebProps = (0, _webPlatformUtils.usePressableWebSupport)({
100
+ restProps: {},
101
+ onPress: () => onRemove?.(id, index),
102
+ disabled: false,
103
+ accessibilityLabel: item.accessibilityLabel ?? 'Remove item from comparison'
104
+ });
105
+ if (!hasImage) {
106
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
107
+ style: tokens.item,
108
+ accessibilityRole: "button",
109
+ accessibilityLabel: item.accessibilityLabel ?? 'Add item to comparison',
110
+ onPress: () => onPress?.(id, index),
111
+ ...addWebProps,
112
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_IconCapsule.default, {
113
+ iconName: "ic_add",
114
+ modes: addCapsuleModes,
115
+ style: ADD_CAPSULE_STYLE
116
+ })
117
+ });
118
+ }
119
+
120
+ // Mobile-first: the entire filled slot is the remove target, not just the
121
+ // tiny close capsule (which a fingertip struggles to hit). The capsule stays
122
+ // purely as a visual affordance and is marked non-interactive so it never
123
+ // intercepts the press from the surrounding Pressable.
124
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Pressable, {
125
+ style: [tokens.item, tokens.itemImageState],
126
+ accessibilityRole: "button",
127
+ accessibilityLabel: item.accessibilityLabel ?? 'Remove item from comparison',
128
+ onPress: () => onRemove?.(id, index),
129
+ ...removeWebProps,
130
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Image.default, {
131
+ imageSource: item.imageSource,
132
+ width: "100%",
133
+ height: "100%",
134
+ borderRadius: tokens.imageRadius,
135
+ resizeMode: "cover",
136
+ accessibilityLabel: item.accessibilityLabel ?? 'Comparison item image'
137
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
138
+ style: CLOSE_CAPSULE_WRAPPER_STYLE,
139
+ pointerEvents: "none",
140
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_IconCapsule.default, {
141
+ iconName: "ic_close",
142
+ modes: closeCapsuleModes
143
+ })
144
+ })]
145
+ });
146
+ }
147
+
148
+ // The Add capsule is the transparent IconCapsule variant from Figma (the gray
149
+ // item box is the visible surface); its size/icon come from the resolved
150
+ // `Icon Capsule Size: S` tokens, we only flatten the background/border here.
151
+ const ADD_CAPSULE_STYLE = {
152
+ backgroundColor: 'transparent',
153
+ borderColor: 'transparent'
154
+ };
155
+
156
+ // Positions the dismiss IconCapsule in the slot's top-right corner. The capsule
157
+ // itself (size/background/icon) is fully token-driven via `closeCapsuleModes`.
158
+ const CLOSE_CAPSULE_WRAPPER_STYLE = {
159
+ position: 'absolute',
160
+ top: 1,
161
+ right: 1
162
+ };
163
+
164
+ // Mode overrides applied on top of the consumer's `modes` for each capsule.
165
+ // These mirror the Figma component's IconCapsule variant selections so the
166
+ // sizing and colours come from design tokens instead of magic numbers.
167
+ const ADD_CAPSULE_MODE_OVERRIDES = {
168
+ 'Icon Capsule Size': 'XS'
169
+ };
170
+ const CLOSE_CAPSULE_MODE_OVERRIDES = {
171
+ AppearanceBrand: 'Neutral',
172
+ Emphasis: 'Medium',
173
+ 'Icon Capsule Size': 'XS'
174
+ };
175
+
176
+ /**
177
+ * ComparisonBar — a floating card that lets a user assemble a set of items to
178
+ * compare, then trigger the comparison.
179
+ *
180
+ * Each slot is fully controlled via its `imageSource`: an empty slot shows a
181
+ * tappable `+` (the "Add" state) and a filled slot shows the image with a
182
+ * dismiss capsule (the "Image Added" state). The component never sources or
183
+ * stores images itself — when an empty slot is pressed it fires `onItemPress`
184
+ * with the item's id/index so the consumer can open whatever picker is
185
+ * appropriate and then update that item's `imageSource` to flip its state.
186
+ * Tapping a filled slot (anywhere on it — a mobile-friendly hit target, with
187
+ * the dismiss capsule as a visual affordance) fires `onItemRemove` so the
188
+ * consumer can clear the source again.
189
+ *
190
+ * @example
191
+ * ```tsx
192
+ * const [items, setItems] = useState<ComparisonBarItem[]>([
193
+ * { id: 'a' }, { id: 'b' }, { id: 'c' }, { id: 'd' },
194
+ * ])
195
+ *
196
+ * <ComparisonBar
197
+ * items={items}
198
+ * onItemPress={async (id) => {
199
+ * const uri = await openImagePicker()
200
+ * setItems(prev => prev.map(it => it.id === id ? { ...it, imageSource: uri } : it))
201
+ * }}
202
+ * onItemRemove={(id) =>
203
+ * setItems(prev => prev.map(it => it.id === id ? { ...it, imageSource: null } : it))
204
+ * }
205
+ * onCompare={runComparison}
206
+ * />
207
+ * ```
208
+ */
209
+ function ComparisonBar({
210
+ items,
211
+ onItemPress,
212
+ onItemRemove,
213
+ onCompare,
214
+ compareLabel = 'Compare',
215
+ compareDisabled,
216
+ disableCompareWhenEmpty = true,
217
+ modes: propModes = _reactUtils.EMPTY_MODES,
218
+ style
219
+ }) {
220
+ const {
221
+ modes: globalModes
222
+ } = (0, _JFSThemeProvider.useTokens)();
223
+ const modes = (0, _react.useMemo)(() => globalModes === _reactUtils.EMPTY_MODES && propModes === _reactUtils.EMPTY_MODES ? _reactUtils.EMPTY_MODES : {
224
+ ...globalModes,
225
+ ...propModes
226
+ }, [globalModes, propModes]);
227
+ const tokens = (0, _react.useMemo)(() => resolveTokens(modes), [modes]);
228
+
229
+ // Capsule modes = consumer modes + this component's fixed IconCapsule variant
230
+ // selections. Memoized so each `Additem`'s `IconCapsule` keeps a stable
231
+ // `modes` identity and hits the resolver cache.
232
+ const addCapsuleModes = (0, _react.useMemo)(() => ({
233
+ ...modes,
234
+ ...ADD_CAPSULE_MODE_OVERRIDES
235
+ }), [modes]);
236
+ const closeCapsuleModes = (0, _react.useMemo)(() => ({
237
+ ...modes,
238
+ ...CLOSE_CAPSULE_MODE_OVERRIDES
239
+ }), [modes]);
240
+
241
+ // An explicit `compareDisabled` always wins (functional disable — the tap is
242
+ // truly blocked, not merely dimmed). Otherwise auto-disable while no slot has
243
+ // an image, since there is nothing to compare yet.
244
+ const hasAnyImage = (0, _react.useMemo)(() => items.some(it => it.imageSource != null && it.imageSource !== ''), [items]);
245
+ const isCompareDisabled = compareDisabled ?? (disableCompareWhenEmpty && !hasAnyImage);
246
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
247
+ style: [tokens.card, style],
248
+ children: [items.map((item, index) => /*#__PURE__*/(0, _jsxRuntime.jsx)(Additem, {
249
+ item: item,
250
+ index: index,
251
+ tokens: tokens,
252
+ addCapsuleModes: addCapsuleModes,
253
+ closeCapsuleModes: closeCapsuleModes,
254
+ onPress: onItemPress,
255
+ onRemove: onItemRemove
256
+ }, item.id ?? index)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.default, {
257
+ label: compareLabel,
258
+ modes: modes,
259
+ disabled: isCompareDisabled,
260
+ ...(onCompare !== undefined ? {
261
+ onPress: onCompare
262
+ } : {})
263
+ })]
264
+ });
265
+ }
266
+ var _default = exports.default = /*#__PURE__*/_react.default.memo(ComparisonBar);
@@ -10,7 +10,9 @@ var _reactNativeGestureHandler = require("react-native-gesture-handler");
10
10
  var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
11
11
  var _figmaVariablesResolver = require("../../design-tokens/figma-variables-resolver");
12
12
  var _reactUtils = require("../../utils/react-utils");
13
+ var _Overlay = _interopRequireDefault(require("../Overlay/Overlay"));
13
14
  var _jsxRuntime = require("react/jsx-runtime");
15
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
14
16
  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); }
15
17
  const AnimatedScrollView = _reactNativeReanimated.default.createAnimatedComponent(_reactNativeGestureHandler.ScrollView);
16
18
 
@@ -72,7 +74,9 @@ function DrawerInner({
72
74
  contentContainerStyle,
73
75
  showsVerticalScrollIndicator = false,
74
76
  bottomInset = 80,
75
- onStateChange
77
+ onStateChange,
78
+ showOverlay = false,
79
+ onOverlayPress
76
80
  }, ref) {
77
81
  const {
78
82
  height: screenHeight
@@ -370,10 +374,15 @@ function DrawerInner({
370
374
  // Per the standard react-native-gesture-handler architecture, a single
371
375
  // GestureHandlerRootView must wrap the app root; this overlay only needs to
372
376
  // let touches fall through where the sheet isn't.
373
- (0, _jsxRuntime.jsx)(_reactNative.View, {
377
+ (0, _jsxRuntime.jsxs)(_reactNative.View, {
374
378
  style: [styles.host, style],
375
379
  pointerEvents: "box-none",
376
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeGestureHandler.GestureDetector, {
380
+ children: [showOverlay ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Overlay.default, {
381
+ modes: modes,
382
+ ...(onOverlayPress ? {
383
+ onPress: onOverlayPress
384
+ } : {})
385
+ }) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeGestureHandler.GestureDetector, {
377
386
  gesture: gesture,
378
387
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
379
388
  style: [styles.sheet, {
@@ -446,7 +455,7 @@ function DrawerInner({
446
455
  })]
447
456
  })
448
457
  })
449
- })
458
+ })]
450
459
  })
451
460
  );
452
461
  }