jfs-components 0.1.2 → 0.1.12

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 (287) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/lib/commonjs/components/Accordion/Accordion.js +2 -1
  3. package/lib/commonjs/components/AccordionCheckbox/AccordionCheckbox.js +4 -3
  4. package/lib/commonjs/components/AccountCard/AccountCard.js +4 -3
  5. package/lib/commonjs/components/AllocationComparisonChart/AllocationComparisonChart.js +9 -6
  6. package/lib/commonjs/components/AmountInput/AmountInput.js +8 -5
  7. package/lib/commonjs/components/AreaLineChart/AreaLineChart.js +11 -7
  8. package/lib/commonjs/components/Badge/Badge.js +47 -8
  9. package/lib/commonjs/components/BenefitCard/BenefitCard.js +231 -0
  10. package/lib/commonjs/components/BrandChip/BrandChip.js +3 -3
  11. package/lib/commonjs/components/Button/Button.js +2 -1
  12. package/lib/commonjs/components/CardAdvisory/CardAdvisory.js +2 -1
  13. package/lib/commonjs/components/CardBankAccount/CardBankAccount.js +3 -2
  14. package/lib/commonjs/components/CardCTA/CardCTA.js +197 -27
  15. package/lib/commonjs/components/CardInsight/CardInsight.js +5 -1
  16. package/lib/commonjs/components/CcCard/CcCard.js +470 -0
  17. package/lib/commonjs/components/Checkbox/Checkbox.js +4 -3
  18. package/lib/commonjs/components/CheckboxItem/CheckboxItem.js +4 -3
  19. package/lib/commonjs/components/CircularProgressBar/CircularProgressBar.js +7 -3
  20. package/lib/commonjs/components/CircularProgressBarDoted/CircularProgressBarDoted.js +3 -2
  21. package/lib/commonjs/components/CircularRating/CircularRating.js +2 -1
  22. package/lib/commonjs/components/ClusterBubble/ClusterBubble.js +3 -2
  23. package/lib/commonjs/components/CompareTable/CompareTable.js +401 -0
  24. package/lib/commonjs/components/ComparisonBar/ComparisonBar.js +266 -0
  25. package/lib/commonjs/components/CoverageBarComparison/CoverageBarComparison.js +3 -2
  26. package/lib/commonjs/components/DonutChart/DonutChart.js +4 -3
  27. package/lib/commonjs/components/Dropdown/Dropdown.js +3 -2
  28. package/lib/commonjs/components/DropdownInput/DropdownInput.js +38 -5
  29. package/lib/commonjs/components/ExpandableCheckbox/ExpandableCheckbox.js +2 -1
  30. package/lib/commonjs/components/FormField/FormField.js +45 -4
  31. package/lib/commonjs/components/Gauge/Gauge.js +1 -1
  32. package/lib/commonjs/components/HoldingsCard/HoldingsCard.js +3 -2
  33. package/lib/commonjs/components/InputSearch/InputSearch.js +6 -4
  34. package/lib/commonjs/components/InstitutionBadge/InstitutionBadge.js +2 -1
  35. package/lib/commonjs/components/ListGroup/ListGroup.js +2 -1
  36. package/lib/commonjs/components/ListItem/ListItem.js +3 -2
  37. package/lib/commonjs/components/MediaCard/MediaCard.js +4 -2
  38. package/lib/commonjs/components/MetricLegendItem/MetricLegendItem.js +3 -2
  39. package/lib/commonjs/components/MonthlyStatusGrid/MonthlyStatusGrid.js +6 -3
  40. package/lib/commonjs/components/NoteInput/NoteInput.js +6 -5
  41. package/lib/commonjs/components/PdpCcCard/PdpCcCard.js +273 -0
  42. package/lib/commonjs/components/PoweredByLabel/PoweredByLabel.js +3 -2
  43. package/lib/commonjs/components/ProductMerchandisingCard/ProductMerchandisingCard.js +427 -0
  44. package/lib/commonjs/components/ProductOverview/ProductOverview.js +4 -3
  45. package/lib/commonjs/components/ProgressBadge/ProgressBadge.js +2 -2
  46. package/lib/commonjs/components/ProjectionMarker/ProjectionMarker.js +162 -0
  47. package/lib/commonjs/components/Radio/Radio.js +5 -5
  48. package/lib/commonjs/components/Section/Section.js +3 -2
  49. package/lib/commonjs/components/Slider/Slider.js +474 -0
  50. package/lib/commonjs/components/Stack/Stack.js +86 -0
  51. package/lib/commonjs/components/SuggestiveSearch/SuggestiveSearch.js +10 -1
  52. package/lib/commonjs/components/SummaryTile/SummaryTile.js +3 -2
  53. package/lib/commonjs/components/Table/Table.js +324 -0
  54. package/lib/commonjs/components/Text/Text.js +2 -1
  55. package/lib/commonjs/components/TextInput/TextInput.js +22 -9
  56. package/lib/commonjs/components/TextSegment/TextSegment.js +119 -0
  57. package/lib/commonjs/components/ThreadHero/ThreadHero.js +4 -5
  58. package/lib/commonjs/components/Title/Title.js +2 -1
  59. package/lib/commonjs/components/Toast/Toast.js +3 -2
  60. package/lib/commonjs/components/TransactionBubble/TransactionBubble.js +2 -1
  61. package/lib/commonjs/components/TransactionStatus/TransactionStatus.js +3 -2
  62. package/lib/commonjs/components/UpiHandle/UpiHandle.js +2 -2
  63. package/lib/commonjs/components/index.js +107 -0
  64. package/lib/commonjs/design-tokens/Coin Variables-variables-full.json +1 -1
  65. package/lib/commonjs/design-tokens/figma-modes.generated.js +39 -9
  66. package/lib/commonjs/icons/registry.js +1 -1
  67. package/lib/commonjs/utils/GlassFill/GlassFill.js +271 -0
  68. package/lib/commonjs/utils/GlassFill/GlassFill.web.js +120 -0
  69. package/lib/commonjs/utils/react-utils.js +78 -0
  70. package/lib/commonjs/utils/web-platform-utils.js +59 -0
  71. package/lib/module/components/Accordion/Accordion.js +3 -2
  72. package/lib/module/components/AccordionCheckbox/AccordionCheckbox.js +5 -4
  73. package/lib/module/components/AccountCard/AccountCard.js +5 -4
  74. package/lib/module/components/AllocationComparisonChart/AllocationComparisonChart.js +10 -7
  75. package/lib/module/components/AmountInput/AmountInput.js +6 -4
  76. package/lib/module/components/AreaLineChart/AreaLineChart.js +12 -8
  77. package/lib/module/components/Badge/Badge.js +49 -10
  78. package/lib/module/components/BenefitCard/BenefitCard.js +225 -0
  79. package/lib/module/components/BrandChip/BrandChip.js +4 -4
  80. package/lib/module/components/Button/Button.js +3 -2
  81. package/lib/module/components/CardAdvisory/CardAdvisory.js +3 -2
  82. package/lib/module/components/CardBankAccount/CardBankAccount.js +4 -3
  83. package/lib/module/components/CardCTA/CardCTA.js +198 -28
  84. package/lib/module/components/CardInsight/CardInsight.js +5 -1
  85. package/lib/module/components/CcCard/CcCard.js +464 -0
  86. package/lib/module/components/Checkbox/Checkbox.js +5 -4
  87. package/lib/module/components/CheckboxItem/CheckboxItem.js +5 -4
  88. package/lib/module/components/CircularProgressBar/CircularProgressBar.js +8 -4
  89. package/lib/module/components/CircularProgressBarDoted/CircularProgressBarDoted.js +4 -3
  90. package/lib/module/components/CircularRating/CircularRating.js +3 -2
  91. package/lib/module/components/ClusterBubble/ClusterBubble.js +4 -3
  92. package/lib/module/components/CompareTable/CompareTable.js +396 -0
  93. package/lib/module/components/ComparisonBar/ComparisonBar.js +260 -0
  94. package/lib/module/components/CoverageBarComparison/CoverageBarComparison.js +4 -3
  95. package/lib/module/components/DonutChart/DonutChart.js +5 -4
  96. package/lib/module/components/Dropdown/Dropdown.js +4 -3
  97. package/lib/module/components/DropdownInput/DropdownInput.js +40 -7
  98. package/lib/module/components/ExpandableCheckbox/ExpandableCheckbox.js +2 -1
  99. package/lib/module/components/FormField/FormField.js +48 -7
  100. package/lib/module/components/Gauge/Gauge.js +1 -1
  101. package/lib/module/components/HoldingsCard/HoldingsCard.js +4 -3
  102. package/lib/module/components/InputSearch/InputSearch.js +6 -4
  103. package/lib/module/components/InstitutionBadge/InstitutionBadge.js +3 -2
  104. package/lib/module/components/ListGroup/ListGroup.js +3 -2
  105. package/lib/module/components/ListItem/ListItem.js +4 -3
  106. package/lib/module/components/MediaCard/MediaCard.js +4 -2
  107. package/lib/module/components/MetricLegendItem/MetricLegendItem.js +4 -3
  108. package/lib/module/components/MonthlyStatusGrid/MonthlyStatusGrid.js +7 -4
  109. package/lib/module/components/NoteInput/NoteInput.js +7 -6
  110. package/lib/module/components/PdpCcCard/PdpCcCard.js +267 -0
  111. package/lib/module/components/PoweredByLabel/PoweredByLabel.js +4 -3
  112. package/lib/module/components/ProductMerchandisingCard/ProductMerchandisingCard.js +421 -0
  113. package/lib/module/components/ProductOverview/ProductOverview.js +5 -4
  114. package/lib/module/components/ProgressBadge/ProgressBadge.js +3 -3
  115. package/lib/module/components/ProjectionMarker/ProjectionMarker.js +157 -0
  116. package/lib/module/components/Radio/Radio.js +5 -4
  117. package/lib/module/components/Section/Section.js +4 -3
  118. package/lib/module/components/Slider/Slider.js +469 -0
  119. package/lib/module/components/Stack/Stack.js +81 -0
  120. package/lib/module/components/SuggestiveSearch/SuggestiveSearch.js +10 -1
  121. package/lib/module/components/SummaryTile/SummaryTile.js +4 -3
  122. package/lib/module/components/Table/Table.js +315 -0
  123. package/lib/module/components/Text/Text.js +3 -2
  124. package/lib/module/components/TextInput/TextInput.js +24 -11
  125. package/lib/module/components/TextSegment/TextSegment.js +114 -0
  126. package/lib/module/components/ThreadHero/ThreadHero.js +5 -6
  127. package/lib/module/components/Title/Title.js +3 -2
  128. package/lib/module/components/Toast/Toast.js +4 -3
  129. package/lib/module/components/TransactionBubble/TransactionBubble.js +3 -2
  130. package/lib/module/components/TransactionStatus/TransactionStatus.js +4 -3
  131. package/lib/module/components/UpiHandle/UpiHandle.js +3 -3
  132. package/lib/module/components/index.js +11 -0
  133. package/lib/module/design-tokens/Coin Variables-variables-full.json +1 -1
  134. package/lib/module/design-tokens/figma-modes.generated.js +39 -9
  135. package/lib/module/icons/registry.js +1 -1
  136. package/lib/module/utils/GlassFill/GlassFill.js +265 -0
  137. package/lib/module/utils/GlassFill/GlassFill.web.js +115 -0
  138. package/lib/module/utils/react-utils.js +75 -0
  139. package/lib/module/utils/web-platform-utils.js +58 -0
  140. package/lib/typescript/src/components/Accordion/Accordion.d.ts +7 -1
  141. package/lib/typescript/src/components/AccordionCheckbox/AccordionCheckbox.d.ts +7 -1
  142. package/lib/typescript/src/components/AccountCard/AccountCard.d.ts +7 -1
  143. package/lib/typescript/src/components/AllocationComparisonChart/AllocationComparisonChart.d.ts +7 -1
  144. package/lib/typescript/src/components/AmountInput/AmountInput.d.ts +3 -2
  145. package/lib/typescript/src/components/AreaLineChart/AreaLineChart.d.ts +8 -1
  146. package/lib/typescript/src/components/Badge/Badge.d.ts +32 -2
  147. package/lib/typescript/src/components/BenefitCard/BenefitCard.d.ts +93 -0
  148. package/lib/typescript/src/components/BrandChip/BrandChip.d.ts +7 -1
  149. package/lib/typescript/src/components/Button/Button.d.ts +7 -1
  150. package/lib/typescript/src/components/CardAdvisory/CardAdvisory.d.ts +7 -1
  151. package/lib/typescript/src/components/CardBankAccount/CardBankAccount.d.ts +7 -1
  152. package/lib/typescript/src/components/CardCTA/CardCTA.d.ts +27 -5
  153. package/lib/typescript/src/components/CcCard/CcCard.d.ts +137 -0
  154. package/lib/typescript/src/components/Checkbox/Checkbox.d.ts +3 -2
  155. package/lib/typescript/src/components/CheckboxItem/CheckboxItem.d.ts +2 -2
  156. package/lib/typescript/src/components/CircularProgressBar/CircularProgressBar.d.ts +7 -1
  157. package/lib/typescript/src/components/CircularProgressBarDoted/CircularProgressBarDoted.d.ts +7 -1
  158. package/lib/typescript/src/components/CircularRating/CircularRating.d.ts +7 -1
  159. package/lib/typescript/src/components/ClusterBubble/ClusterBubble.d.ts +7 -1
  160. package/lib/typescript/src/components/CompareTable/CompareTable.d.ts +94 -0
  161. package/lib/typescript/src/components/ComparisonBar/ComparisonBar.d.ts +118 -0
  162. package/lib/typescript/src/components/CoverageBarComparison/CoverageBarComparison.d.ts +7 -1
  163. package/lib/typescript/src/components/DonutChart/DonutChart.d.ts +7 -1
  164. package/lib/typescript/src/components/Dropdown/Dropdown.d.ts +7 -1
  165. package/lib/typescript/src/components/DropdownInput/DropdownInput.d.ts +26 -1
  166. package/lib/typescript/src/components/ExpandableCheckbox/ExpandableCheckbox.d.ts +7 -1
  167. package/lib/typescript/src/components/FormField/FormField.d.ts +2 -2
  168. package/lib/typescript/src/components/HoldingsCard/HoldingsCard.d.ts +7 -1
  169. package/lib/typescript/src/components/InputSearch/InputSearch.d.ts +23 -2
  170. package/lib/typescript/src/components/InstitutionBadge/InstitutionBadge.d.ts +7 -1
  171. package/lib/typescript/src/components/ListGroup/ListGroup.d.ts +7 -1
  172. package/lib/typescript/src/components/ListItem/ListItem.d.ts +7 -1
  173. package/lib/typescript/src/components/MetricLegendItem/MetricLegendItem.d.ts +7 -1
  174. package/lib/typescript/src/components/MonthlyStatusGrid/MonthlyStatusGrid.d.ts +14 -2
  175. package/lib/typescript/src/components/NoteInput/NoteInput.d.ts +19 -2
  176. package/lib/typescript/src/components/PdpCcCard/PdpCcCard.d.ts +84 -0
  177. package/lib/typescript/src/components/PoweredByLabel/PoweredByLabel.d.ts +7 -1
  178. package/lib/typescript/src/components/ProductMerchandisingCard/ProductMerchandisingCard.d.ts +87 -0
  179. package/lib/typescript/src/components/ProductOverview/ProductOverview.d.ts +7 -1
  180. package/lib/typescript/src/components/ProgressBadge/ProgressBadge.d.ts +7 -1
  181. package/lib/typescript/src/components/ProjectionMarker/ProjectionMarker.d.ts +88 -0
  182. package/lib/typescript/src/components/Radio/Radio.d.ts +3 -2
  183. package/lib/typescript/src/components/RadioButton/RadioButton.d.ts +2 -2
  184. package/lib/typescript/src/components/Section/Section.d.ts +7 -1
  185. package/lib/typescript/src/components/Slider/Slider.d.ts +105 -0
  186. package/lib/typescript/src/components/Stack/Stack.d.ts +81 -0
  187. package/lib/typescript/src/components/SummaryTile/SummaryTile.d.ts +7 -1
  188. package/lib/typescript/src/components/Table/Table.d.ts +139 -0
  189. package/lib/typescript/src/components/Text/Text.d.ts +7 -1
  190. package/lib/typescript/src/components/TextInput/TextInput.d.ts +9 -29
  191. package/lib/typescript/src/components/TextSegment/TextSegment.d.ts +106 -0
  192. package/lib/typescript/src/components/ThreadHero/ThreadHero.d.ts +7 -1
  193. package/lib/typescript/src/components/Title/Title.d.ts +7 -1
  194. package/lib/typescript/src/components/Toast/Toast.d.ts +7 -1
  195. package/lib/typescript/src/components/TransactionBubble/TransactionBubble.d.ts +7 -1
  196. package/lib/typescript/src/components/TransactionStatus/TransactionStatus.d.ts +7 -1
  197. package/lib/typescript/src/components/UpiHandle/UpiHandle.d.ts +7 -1
  198. package/lib/typescript/src/components/index.d.ts +14 -3
  199. package/lib/typescript/src/design-tokens/figma-modes.generated.d.ts +22 -2
  200. package/lib/typescript/src/icons/registry.d.ts +1 -1
  201. package/lib/typescript/src/utils/GlassFill/GlassFill.d.ts +84 -0
  202. package/lib/typescript/src/utils/GlassFill/GlassFill.web.d.ts +43 -0
  203. package/lib/typescript/src/utils/react-utils.d.ts +47 -0
  204. package/lib/typescript/src/utils/web-platform-utils.d.ts +36 -0
  205. package/package.json +2 -1
  206. package/src/components/Accordion/Accordion.tsx +9 -2
  207. package/src/components/AccordionCheckbox/AccordionCheckbox.tsx +10 -3
  208. package/src/components/AccountCard/AccountCard.tsx +10 -3
  209. package/src/components/AllocationComparisonChart/AllocationComparisonChart.tsx +14 -4
  210. package/src/components/AmountInput/AmountInput.tsx +7 -5
  211. package/src/components/AreaLineChart/AreaLineChart.tsx +15 -5
  212. package/src/components/Badge/Badge.tsx +78 -8
  213. package/src/components/BenefitCard/BenefitCard.tsx +309 -0
  214. package/src/components/BrandChip/BrandChip.tsx +9 -3
  215. package/src/components/Button/Button.tsx +9 -2
  216. package/src/components/CardAdvisory/CardAdvisory.tsx +9 -2
  217. package/src/components/CardBankAccount/CardBankAccount.tsx +9 -2
  218. package/src/components/CardCTA/CardCTA.tsx +214 -41
  219. package/src/components/CardInsight/CardInsight.tsx +7 -1
  220. package/src/components/CcCard/CcCard.tsx +598 -0
  221. package/src/components/Checkbox/Checkbox.tsx +5 -4
  222. package/src/components/CheckboxItem/CheckboxItem.tsx +5 -4
  223. package/src/components/CircularProgressBar/CircularProgressBar.tsx +14 -4
  224. package/src/components/CircularProgressBarDoted/CircularProgressBarDoted.tsx +10 -3
  225. package/src/components/CircularRating/CircularRating.tsx +9 -2
  226. package/src/components/ClusterBubble/ClusterBubble.tsx +9 -2
  227. package/src/components/CompareTable/CompareTable.tsx +525 -0
  228. package/src/components/ComparisonBar/ComparisonBar.tsx +356 -0
  229. package/src/components/CoverageBarComparison/CoverageBarComparison.tsx +9 -2
  230. package/src/components/DonutChart/DonutChart.tsx +10 -3
  231. package/src/components/Dropdown/Dropdown.tsx +9 -2
  232. package/src/components/DropdownInput/DropdownInput.tsx +64 -5
  233. package/src/components/ExpandableCheckbox/ExpandableCheckbox.tsx +8 -1
  234. package/src/components/FormField/FormField.tsx +52 -6
  235. package/src/components/Gauge/Gauge.tsx +1 -1
  236. package/src/components/HoldingsCard/HoldingsCard.tsx +9 -2
  237. package/src/components/InputSearch/InputSearch.tsx +8 -5
  238. package/src/components/InstitutionBadge/InstitutionBadge.tsx +9 -2
  239. package/src/components/ListGroup/ListGroup.tsx +9 -2
  240. package/src/components/ListItem/ListItem.tsx +10 -3
  241. package/src/components/MediaCard/MediaCard.tsx +2 -2
  242. package/src/components/MetricLegendItem/MetricLegendItem.tsx +9 -2
  243. package/src/components/MonthlyStatusGrid/MonthlyStatusGrid.tsx +17 -2
  244. package/src/components/NoteInput/NoteInput.tsx +8 -6
  245. package/src/components/PdpCcCard/PdpCcCard.tsx +356 -0
  246. package/src/components/PoweredByLabel/PoweredByLabel.tsx +9 -2
  247. package/src/components/ProductMerchandisingCard/ProductMerchandisingCard.tsx +490 -0
  248. package/src/components/ProductOverview/ProductOverview.tsx +10 -3
  249. package/src/components/ProgressBadge/ProgressBadge.tsx +9 -3
  250. package/src/components/ProjectionMarker/ProjectionMarker.tsx +284 -0
  251. package/src/components/Radio/Radio.tsx +5 -4
  252. package/src/components/Section/Section.tsx +10 -3
  253. package/src/components/Slider/Slider.tsx +635 -0
  254. package/src/components/Stack/Stack.tsx +131 -0
  255. package/src/components/SuggestiveSearch/SuggestiveSearch.tsx +10 -1
  256. package/src/components/SummaryTile/SummaryTile.tsx +9 -2
  257. package/src/components/Table/Table.tsx +449 -0
  258. package/src/components/Text/Text.tsx +9 -2
  259. package/src/components/TextInput/TextInput.tsx +22 -12
  260. package/src/components/TextSegment/TextSegment.tsx +173 -0
  261. package/src/components/ThreadHero/ThreadHero.tsx +10 -3
  262. package/src/components/Title/Title.tsx +9 -2
  263. package/src/components/Toast/Toast.tsx +9 -2
  264. package/src/components/TransactionBubble/TransactionBubble.tsx +9 -2
  265. package/src/components/TransactionStatus/TransactionStatus.tsx +9 -2
  266. package/src/components/UpiHandle/UpiHandle.tsx +9 -3
  267. package/src/components/index.ts +33 -3
  268. package/src/design-tokens/Coin Variables-variables-full.json +1 -1
  269. package/src/design-tokens/figma-modes.generated.ts +39 -9
  270. package/src/icons/registry.ts +1 -1
  271. package/src/utils/GlassFill/GlassFill.tsx +305 -0
  272. package/src/utils/GlassFill/GlassFill.web.tsx +148 -0
  273. package/src/utils/react-utils.ts +84 -0
  274. package/src/utils/web-platform-utils.ts +68 -0
  275. package/lib/commonjs/components/MediaCard/GlassFill.js +0 -62
  276. package/lib/commonjs/components/MediaCard/GlassFill.web.js +0 -48
  277. package/lib/module/components/MediaCard/GlassFill.js +0 -57
  278. package/lib/module/components/MediaCard/GlassFill.web.js +0 -43
  279. package/lib/typescript/scripts/extract-component-tokens.d.ts +0 -9
  280. package/lib/typescript/scripts/generate-component-docs.d.ts +0 -9
  281. package/lib/typescript/scripts/generate-icon-registry.d.ts +0 -3
  282. package/lib/typescript/scripts/generate-mode-types.d.ts +0 -2
  283. package/lib/typescript/scripts/retype-modes.d.cts +0 -2
  284. package/lib/typescript/src/components/MediaCard/GlassFill.d.ts +0 -47
  285. package/lib/typescript/src/components/MediaCard/GlassFill.web.d.ts +0 -20
  286. package/src/components/MediaCard/GlassFill.tsx +0 -89
  287. package/src/components/MediaCard/GlassFill.web.tsx +0 -53
@@ -0,0 +1,421 @@
1
+ "use strict";
2
+
3
+ import React, { useId, useMemo } from 'react';
4
+ import { View, Text, Pressable, StyleSheet, Platform, Image as RNImage } from 'react-native';
5
+ import MaskedView from '@react-native-masked-view/masked-view';
6
+ import Svg, { Defs, LinearGradient, Stop, Rect } from 'react-native-svg';
7
+ import { getVariableByName } from '../../design-tokens/figma-variables-resolver';
8
+ import { EMPTY_MODES, resolveTruncation } from '../../utils/react-utils';
9
+ import Avatar from '../Avatar/Avatar';
10
+ import Badge from '../Badge/Badge';
11
+ import Button from '../Button/Button';
12
+ import Image from '../Image/Image';
13
+ import GlassFill from '../../utils/GlassFill/GlassFill';
14
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
15
+ function normalizeImageSource(src) {
16
+ if (src == null) return undefined;
17
+ return typeof src === 'string' ? {
18
+ uri: src
19
+ } : src;
20
+ }
21
+ /**
22
+ * ProductMerchandisingCard — a full-bleed image card (Figma node 5277:317)
23
+ * with a top header (avatar + badge) and a bottom **glass footer** that
24
+ * combines a real native background blur with a transparent→black gradient
25
+ * scrim for legible text over any image.
26
+ *
27
+ * Glass footer implementation (works on iOS, Android and Web):
28
+ * - **iOS / Android:** `<GlassFill>` wraps `@react-native-community/blur`'s
29
+ * `BlurView` — iOS gets a real `UIVisualEffectView` (live OS blur),
30
+ * Android gets the community `RealtimeBlurView` with a tinted scrim
31
+ * fallback. The native-only module is isolated in `GlassFill.tsx`.
32
+ * - **Web:** the platform-extension `GlassFill.web.tsx` renders a translucent
33
+ * `View` with `backdrop-filter: blur()` — Metro picks the right file so the
34
+ * web bundle never imports the native blur module.
35
+ * - The gradient scrim is drawn with `react-native-svg` (one renderer for all
36
+ * platforms) so the fade is identical everywhere.
37
+ *
38
+ * The blur strength is driven by the Figma `blur/minimal` token, mapped to the
39
+ * `GlassFill` 0–100 intensity scale the same way `MediaCard` does.
40
+ */
41
+ function ProductMerchandisingCard({
42
+ imageSource,
43
+ title = 'Title',
44
+ subtitle = 'Subtitle',
45
+ badgeLabel,
46
+ badge,
47
+ showAvatar = true,
48
+ avatarSource,
49
+ avatarMonogram,
50
+ avatar,
51
+ specialBadgeLabel,
52
+ specialBadgeIcon,
53
+ specialBadge,
54
+ ctaLabel = 'CTA',
55
+ onCtaPress,
56
+ cta,
57
+ onPress,
58
+ height = 223,
59
+ modes = EMPTY_MODES,
60
+ style,
61
+ accessibilityLabel,
62
+ disableTruncation
63
+ }) {
64
+ // Unique gradient ids so multiple cards on one (web) document never collide.
65
+ const rawId = useId();
66
+ const safeId = rawId.replace(/[^a-zA-Z0-9_-]/g, '');
67
+ const scrimId = `pmc-footer-scrim-${safeId}`;
68
+ const blurMaskId = `pmc-footer-blurmask-${safeId}`;
69
+ const normalizedImageSource = useMemo(() => normalizeImageSource(imageSource), [imageSource]);
70
+ const tokens = useMemo(() => resolveTokens(modes), [modes]);
71
+ const containerStyle = {
72
+ height,
73
+ borderRadius: tokens.radius,
74
+ overflow: 'hidden',
75
+ position: 'relative',
76
+ flexDirection: 'column',
77
+ justifyContent: 'space-between'
78
+ };
79
+
80
+ // Header avatar defaults to the design's 36px (Avatar Size = M). A
81
+ // consumer-supplied `modes['Avatar Size']` still wins via spread order.
82
+ const avatarModes = useMemo(() => ({
83
+ 'Avatar Size': 'M',
84
+ ...modes
85
+ }), [modes]);
86
+
87
+ // The Figma node renders the header badge with the brand "Secondary"
88
+ // appearance at "Medium" emphasis (lilac fill + dark label). These are set
89
+ // as defaults so the card matches the design out of the box; a
90
+ // consumer-supplied `modes` value still wins via spread order.
91
+ const badgeModes = useMemo(() => ({
92
+ AppearanceBrand: 'Secondary',
93
+ Emphasis: 'Medium',
94
+ ...modes
95
+ }), [modes]);
96
+ const headerBadge = badge ?? (badgeLabel != null ? /*#__PURE__*/_jsx(Badge, {
97
+ label: badgeLabel,
98
+ modes: badgeModes
99
+ }) : null);
100
+ const headerAvatar = showAvatar ? avatar ?? /*#__PURE__*/_jsx(Avatar, {
101
+ style: avatarSource ? 'Image' : avatarMonogram ? 'Monogram' : 'Image',
102
+ imageSource: avatarSource,
103
+ monogram: avatarMonogram,
104
+ modes: avatarModes
105
+ }) : null;
106
+
107
+ // The footer "special badge" is now the shared <Badge type="glass">. The
108
+ // hardcoded literals that defined its look (warm frosted overlay, gentle
109
+ // 5px blur, 6/2 padding, 4px radius, weight-500 white label) are preserved
110
+ // 1:1 via the glass overrides + `style`/`labelStyle`, and the optional
111
+ // `specialBadgeIcon` maps to Badge's `leading` slot — so every existing
112
+ // instantiation renders byte-for-byte the same as before.
113
+ const footerSpecialBadge = specialBadge ?? (specialBadgeLabel != null ? /*#__PURE__*/_jsx(Badge, {
114
+ type: "glass",
115
+ label: specialBadgeLabel,
116
+ leading: specialBadgeIcon,
117
+ glassOverlayColor: SPECIAL_BADGE_BG,
118
+ glassIntensity: SPECIAL_BADGE_INTENSITY,
119
+ modes: modes,
120
+ style: styles.specialBadge,
121
+ labelStyle: tokens.specialBadgeText,
122
+ ...(disableTruncation != null ? {
123
+ disableTruncation
124
+ } : null)
125
+ }) : null);
126
+
127
+ // The Figma CTA uses the brand "Secondary" appearance (purple fill, white
128
+ // label) at the small size. Defaults match the design; consumer `modes`
129
+ // win via spread order.
130
+ const ctaModes = useMemo(() => ({
131
+ 'Button / Size': 'S',
132
+ AppearanceBrand: 'Secondary',
133
+ ...modes
134
+ }), [modes]);
135
+ const footerCta = cta ?? /*#__PURE__*/_jsx(Button, {
136
+ label: ctaLabel,
137
+ modes: ctaModes,
138
+ onPress: onCtaPress
139
+ });
140
+ const content = /*#__PURE__*/_jsxs(_Fragment, {
141
+ children: [imageSource != null ? /*#__PURE__*/_jsx(Image, {
142
+ imageSource: imageSource,
143
+ style: StyleSheet.absoluteFillObject,
144
+ width: "100%",
145
+ height: height,
146
+ resizeMode: "cover",
147
+ accessibilityElementsHidden: true,
148
+ importantForAccessibility: "no"
149
+ }) : null, /*#__PURE__*/_jsxs(View, {
150
+ style: tokens.header,
151
+ pointerEvents: "box-none",
152
+ children: [/*#__PURE__*/_jsx(View, {
153
+ style: styles.avatarContainer,
154
+ children: headerAvatar
155
+ }), headerBadge]
156
+ }), /*#__PURE__*/_jsxs(View, {
157
+ style: tokens.footer,
158
+ pointerEvents: "box-none",
159
+ children: [normalizedImageSource != null ? /*#__PURE__*/_jsx(View, {
160
+ style: StyleSheet.absoluteFill,
161
+ pointerEvents: "none",
162
+ children: /*#__PURE__*/_jsx(MaskedView, {
163
+ style: StyleSheet.absoluteFill,
164
+ maskElement: /*#__PURE__*/_jsxs(Svg, {
165
+ width: "100%",
166
+ height: "100%",
167
+ children: [/*#__PURE__*/_jsx(Defs, {
168
+ children: /*#__PURE__*/_jsxs(LinearGradient, {
169
+ id: blurMaskId,
170
+ x1: "0",
171
+ y1: "0",
172
+ x2: "0",
173
+ y2: "1",
174
+ children: [/*#__PURE__*/_jsx(Stop, {
175
+ offset: "0",
176
+ stopColor: "#000000",
177
+ stopOpacity: 0
178
+ }), /*#__PURE__*/_jsx(Stop, {
179
+ offset: "0.35",
180
+ stopColor: "#000000",
181
+ stopOpacity: 0.5
182
+ }), /*#__PURE__*/_jsx(Stop, {
183
+ offset: "0.7",
184
+ stopColor: "#000000",
185
+ stopOpacity: 0.92
186
+ }), /*#__PURE__*/_jsx(Stop, {
187
+ offset: "1",
188
+ stopColor: "#000000",
189
+ stopOpacity: 1
190
+ })]
191
+ })
192
+ }), /*#__PURE__*/_jsx(Rect, {
193
+ x: "0",
194
+ y: "0",
195
+ width: "100%",
196
+ height: "100%",
197
+ fill: `url(#${blurMaskId})`
198
+ })]
199
+ }),
200
+ children: /*#__PURE__*/_jsx(RNImage, {
201
+ source: normalizedImageSource,
202
+ blurRadius: tokens.imageBlurRadius,
203
+ resizeMode: "cover",
204
+ style: {
205
+ position: 'absolute',
206
+ left: 0,
207
+ right: 0,
208
+ bottom: 0,
209
+ width: '100%',
210
+ height
211
+ }
212
+ })
213
+ })
214
+ }) : /*#__PURE__*/_jsx(GlassFill, {
215
+ tint: "dark",
216
+ intensity: tokens.blurIntensity,
217
+ progressive: true
218
+ }), /*#__PURE__*/_jsx(View, {
219
+ style: [StyleSheet.absoluteFill, styles.scrim],
220
+ pointerEvents: "none",
221
+ children: /*#__PURE__*/_jsxs(Svg, {
222
+ width: "100%",
223
+ height: "100%",
224
+ children: [/*#__PURE__*/_jsx(Defs, {
225
+ children: /*#__PURE__*/_jsxs(LinearGradient, {
226
+ id: scrimId,
227
+ x1: "0",
228
+ y1: "0",
229
+ x2: "0",
230
+ y2: "1",
231
+ children: [/*#__PURE__*/_jsx(Stop, {
232
+ offset: "0.018",
233
+ stopColor: "#000000",
234
+ stopOpacity: 0
235
+ }), /*#__PURE__*/_jsx(Stop, {
236
+ offset: "0.974",
237
+ stopColor: "#000000",
238
+ stopOpacity: 1
239
+ })]
240
+ })
241
+ }), /*#__PURE__*/_jsx(Rect, {
242
+ x: "0",
243
+ y: "0",
244
+ width: "100%",
245
+ height: "100%",
246
+ fill: `url(#${scrimId})`
247
+ })]
248
+ })
249
+ }), footerSpecialBadge, /*#__PURE__*/_jsxs(View, {
250
+ style: styles.footerRow,
251
+ children: [/*#__PURE__*/_jsxs(View, {
252
+ style: tokens.textWrap,
253
+ children: [/*#__PURE__*/_jsx(Text, {
254
+ style: tokens.title,
255
+ ...resolveTruncation(disableTruncation, 1),
256
+ children: title
257
+ }), subtitle != null ? /*#__PURE__*/_jsx(Text, {
258
+ style: tokens.subtitle,
259
+ ...resolveTruncation(disableTruncation, 1),
260
+ children: subtitle
261
+ }) : null]
262
+ }), footerCta]
263
+ })]
264
+ })]
265
+ });
266
+ if (onPress) {
267
+ return /*#__PURE__*/_jsx(Pressable, {
268
+ style: ({
269
+ pressed
270
+ }) => [containerStyle, pressed ? styles.pressed : null, style],
271
+ accessibilityRole: "button",
272
+ accessibilityLabel: accessibilityLabel ?? title,
273
+ onPress: onPress,
274
+ children: content
275
+ });
276
+ }
277
+ return /*#__PURE__*/_jsx(View, {
278
+ style: [containerStyle, style],
279
+ accessibilityLabel: accessibilityLabel,
280
+ children: content
281
+ });
282
+ }
283
+
284
+ // ---------------------------------------------------------------------------
285
+ // Tokens / static styles
286
+ // ---------------------------------------------------------------------------
287
+
288
+ // Figma footer backdrop-blur token (`blur/minimal`). The footer uses a
289
+ // *progressive* blur, so this maps the token to the intensity at the BOTTOM of
290
+ // the ramp (the strongest point); the upper part fades to fully clear. Kept
291
+ // intentionally small to match the design's subtle "minimal" blur.
292
+ const BLUR_INTENSITY_FACTOR = 1.0;
293
+
294
+ // Special badge ("frosted" pill) — values are literals in the Figma node
295
+ // (no dedicated tokens): bg rgba(255,245,229,0.15), 5px backdrop blur.
296
+ const SPECIAL_BADGE_BG = 'rgba(255,245,229,0.15)';
297
+ const SPECIAL_BADGE_INTENSITY = 17; // ~5px CSS blur / ~2 native blurAmount
298
+
299
+ function asNum(raw, fallback) {
300
+ const n = typeof raw === 'number' ? raw : parseFloat(raw);
301
+ return Number.isFinite(n) ? n : fallback;
302
+ }
303
+ function asStr(raw, fallback) {
304
+ return raw != null ? String(raw) : fallback;
305
+ }
306
+ function resolveTokens(modes) {
307
+ // NOTE: token names are passed as string literals DIRECTLY to
308
+ // getVariableByName so the `extract-component-tokens` script can statically
309
+ // collect them for the generated docs. Do not refactor these into a helper
310
+ // that receives the name as a variable.
311
+ const radius = asNum(getVariableByName('productMerchandisingcard/radius', modes), 12);
312
+ const headerPadH = asNum(getVariableByName('productMerchandisingcard/header/padding/horizontal', modes), 12);
313
+ const headerPadV = asNum(getVariableByName('productMerchandisingcard/header/padding/vertical', modes), 12);
314
+ const footerGap = asNum(getVariableByName('productMerchandisingcard/footer/gap', modes), 8);
315
+ const footerPadH = asNum(getVariableByName('productMerchandisingcard/footer/padding/horizontal', modes), 16);
316
+ const footerPadV = asNum(getVariableByName('productMerchandisingcard/footer/padding/vertical', modes), 16);
317
+ const textGap = asNum(getVariableByName('productMerchandisingcard/footer/text/gap', modes), 2);
318
+ const blurRadius = asNum(getVariableByName('blur/minimal', modes), 29);
319
+ const titleColor = asStr(getVariableByName('productMerchandisingcard/footer/title/font/color', modes), '#ffffff');
320
+ const titleSize = asNum(getVariableByName('productMerchandisingcard/footer/title/fontsize', modes), 14);
321
+ const titleFamily = asStr(getVariableByName('productMerchandisingcard/footer/title/fontfamily', modes), 'JioType Var');
322
+ const titleWeight = asStr(getVariableByName('productMerchandisingcard/footer/title/fontweight', modes), '700');
323
+ const subtitleColor = asStr(getVariableByName('productMerchandisingcard/footer/subtitle/font/color', modes), '#c5bcb5');
324
+ const subtitleSize = asNum(getVariableByName('productMerchandisingcard/footer/subtitle/fontsize', modes), 12);
325
+ const subtitleFamily = asStr(getVariableByName('productMerchandisingcard/footer/subtitle/fontfamily', modes), 'JioType Var');
326
+ const subtitleWeight = asStr(getVariableByName('productMerchandisingcard/footer/subtitle/fontweight', modes), '400');
327
+ const sbSize = asNum(getVariableByName('productMerchandisingcard/specialbadge/text/fontsize', modes), 12);
328
+ const sbFamily = asStr(getVariableByName('productMerchandisingcard/specialbadge/text/fontfamily', modes), 'JioType Var');
329
+ const sbWeight = asStr(getVariableByName('productMerchandisingcard/specialbadge/text/fontweight', modes), '500');
330
+
331
+ // `Image.blurRadius` is interpreted differently per platform — iOS applies a
332
+ // strong Gaussian while Android's IterativeBoxBlur is gentler at the same
333
+ // numeric radius — so we tune each platform to land on the same perceived
334
+ // "minimal" frosted strength as the Figma design.
335
+ const imageBlurRadius = Platform.select({
336
+ ios: Math.max(6, Math.round(blurRadius * 0.5)),
337
+ android: Math.max(12, Math.round(blurRadius * 0.95)),
338
+ default: Math.max(8, Math.round(blurRadius * 0.6))
339
+ });
340
+ return {
341
+ radius,
342
+ blurIntensity: Math.max(0, Math.min(100, Math.round(blurRadius * BLUR_INTENSITY_FACTOR))),
343
+ imageBlurRadius,
344
+ header: {
345
+ flexDirection: 'row',
346
+ alignItems: 'flex-start',
347
+ justifyContent: 'space-between',
348
+ paddingHorizontal: headerPadH,
349
+ paddingVertical: headerPadV,
350
+ zIndex: 1
351
+ },
352
+ footer: {
353
+ paddingHorizontal: footerPadH,
354
+ paddingVertical: footerPadV,
355
+ gap: footerGap,
356
+ overflow: 'hidden',
357
+ zIndex: 2
358
+ },
359
+ textWrap: {
360
+ flex: 1,
361
+ gap: textGap,
362
+ justifyContent: 'center'
363
+ },
364
+ title: {
365
+ color: titleColor,
366
+ fontSize: titleSize,
367
+ fontFamily: titleFamily,
368
+ fontWeight: titleWeight,
369
+ lineHeight: Math.round(titleSize * 1.2),
370
+ includeFontPadding: false
371
+ },
372
+ subtitle: {
373
+ color: subtitleColor,
374
+ fontSize: subtitleSize,
375
+ fontFamily: subtitleFamily,
376
+ fontWeight: subtitleWeight,
377
+ lineHeight: Math.round(subtitleSize * 1.2),
378
+ includeFontPadding: false
379
+ },
380
+ specialBadgeText: {
381
+ color: '#ffffff',
382
+ fontSize: sbSize,
383
+ fontFamily: sbFamily,
384
+ fontWeight: sbWeight,
385
+ lineHeight: Math.round(sbSize * 1.2),
386
+ includeFontPadding: false
387
+ }
388
+ };
389
+ }
390
+ const styles = StyleSheet.create({
391
+ avatarContainer: {
392
+ flexShrink: 1,
393
+ justifyContent: 'center'
394
+ },
395
+ footerRow: {
396
+ flexDirection: 'row',
397
+ alignItems: 'center',
398
+ justifyContent: 'space-between',
399
+ gap: 8
400
+ },
401
+ scrim: {
402
+ // The footer node sits at 90% opacity in Figma; applying it to the
403
+ // scrim (not the content) keeps the title/CTA crisp while preserving
404
+ // the intended fade strength.
405
+ opacity: 0.9
406
+ },
407
+ // Overrides layered on top of <Badge type="glass">. Badge already supplies
408
+ // the row layout + 4px gap (when a leading icon is present), `overflow:
409
+ // 'hidden'`, `alignSelf: 'flex-start'` and `alignItems: 'center'`; these
410
+ // pin the special badge's literal Figma box (6/2 padding, 4px radius)
411
+ // regardless of the badge size tokens resolved by the active modes.
412
+ specialBadge: {
413
+ paddingHorizontal: 6,
414
+ paddingVertical: 2,
415
+ borderRadius: 4
416
+ },
417
+ pressed: {
418
+ opacity: 0.92
419
+ }
420
+ });
421
+ export default ProductMerchandisingCard;
@@ -3,7 +3,7 @@
3
3
  import React from 'react';
4
4
  import { View, Text } from 'react-native';
5
5
  import { getVariableByName } from '../../design-tokens/figma-variables-resolver';
6
- import { EMPTY_MODES, cloneChildrenWithModes } from '../../utils/react-utils';
6
+ import { EMPTY_MODES, cloneChildrenWithModes, resolveTruncation } from '../../utils/react-utils';
7
7
  import Image from '../Image/Image';
8
8
  import ProductLabel from '../ProductLabel/ProductLabel';
9
9
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
@@ -24,7 +24,8 @@ const ProductOverview = ({
24
24
  stats = DEFAULT_STATS,
25
25
  modes = EMPTY_MODES,
26
26
  style,
27
- children
27
+ children,
28
+ disableTruncation
28
29
  }) => {
29
30
  const padding = getVariableByName('productOverview/padding', modes) ?? 24;
30
31
  const gap = getVariableByName('productOverview/gap', modes) ?? 12;
@@ -128,11 +129,11 @@ const ProductOverview = ({
128
129
  },
129
130
  children: [/*#__PURE__*/_jsx(Text, {
130
131
  style: statValueStyle,
131
- numberOfLines: 1,
132
+ ...resolveTruncation(disableTruncation, 1),
132
133
  children: stat.value
133
134
  }), /*#__PURE__*/_jsx(Text, {
134
135
  style: statLabelStyle,
135
- numberOfLines: 1,
136
+ ...resolveTruncation(disableTruncation, 1),
136
137
  children: stat.label
137
138
  })]
138
139
  }, `${stat.label}-${index}`))
@@ -4,7 +4,7 @@ import React from 'react';
4
4
  import { View, Text } from 'react-native';
5
5
  import { getVariableByName } from '../../design-tokens/figma-variables-resolver';
6
6
  import Icon from '../../icons/Icon';
7
- import { EMPTY_MODES } from '../../utils/react-utils';
7
+ import { EMPTY_MODES, resolveTruncation } from '../../utils/react-utils';
8
8
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
9
9
  /**
10
10
  * ProgressBadge component that displays an icon, text, and an internal progress bar.
@@ -29,6 +29,7 @@ function ProgressBadge({
29
29
  style,
30
30
  textStyle: textStyleOverride,
31
31
  accessibilityLabel,
32
+ disableTruncation,
32
33
  ...rest
33
34
  }) {
34
35
  // Resolve layout tokens
@@ -114,8 +115,7 @@ function ProgressBadge({
114
115
  importantForAccessibility: "no"
115
116
  }) : null, /*#__PURE__*/_jsx(Text, {
116
117
  style: [textStyle, textStyleOverride],
117
- numberOfLines: 1,
118
- ellipsizeMode: "tail",
118
+ ...resolveTruncation(disableTruncation, 1, 'tail'),
119
119
  accessibilityElementsHidden: true,
120
120
  importantForAccessibility: "no",
121
121
  children: taskName
@@ -0,0 +1,157 @@
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 { EMPTY_MODES, cloneChildrenWithModes, resolveTruncation } from '../../utils/react-utils';
7
+ import Divider from '../Divider/Divider';
8
+
9
+ /**
10
+ * A value rendered at either end of the marker. A `string`/`number` is rendered
11
+ * with the built-in title typography; any other `ReactNode` (e.g. a
12
+ * `MoneyValue`) is rendered as-is so consumers can fully control presentation.
13
+ */
14
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
15
+ const isTextValue = value => typeof value === 'string' || typeof value === 'number';
16
+
17
+ /**
18
+ * ProjectionMarker renders a start value and an end value connected to a
19
+ * centered badge that summarizes the projection (e.g. a tenure and interest
20
+ * rate). It mirrors the Figma `projectionMarker` component and is commonly used
21
+ * inside "Potential returns" style cards.
22
+ *
23
+ * @example
24
+ * ```tsx
25
+ * <ProjectionMarker
26
+ * startValue="₹1,00,000"
27
+ * endValue="₹1,25,101"
28
+ * duration="1Y 10M"
29
+ * rate="@ 8.25 %"
30
+ * />
31
+ * ```
32
+ *
33
+ * @example Custom end values via MoneyValue
34
+ * ```tsx
35
+ * <ProjectionMarker
36
+ * startValue={<MoneyValue value="1,00,000" />}
37
+ * endValue={<MoneyValue value="1,25,101" />}
38
+ * duration="1Y 10M"
39
+ * rate="@ 8.25 %"
40
+ * />
41
+ * ```
42
+ */
43
+ function ProjectionMarker({
44
+ startValue = '₹1,00,000',
45
+ endValue = '₹1,25,101',
46
+ duration = '1Y 10M',
47
+ rate = '@ 8.25 %',
48
+ showConnectors = true,
49
+ modes = EMPTY_MODES,
50
+ style,
51
+ startValueStyle,
52
+ endValueStyle,
53
+ badgeStyle,
54
+ durationStyle,
55
+ rateStyle,
56
+ accessibilityLabel,
57
+ disableTruncation
58
+ }) {
59
+ const titleColor = getVariableByName('projectionMarker/title/color', modes) ?? '#000000';
60
+ const titleFontFamily = getVariableByName('projectionMarker/title/fontfamily', modes) ?? 'JioType Var';
61
+ const titleFontSize = getVariableByName('projectionMarker/title/fontsize', modes) ?? 14;
62
+ const titleFontWeight = String(getVariableByName('projectionMarker/title/fontweight', modes) ?? 600);
63
+ const durationColor = getVariableByName('projectionMarker/duration/color', modes) ?? '#000000';
64
+ const durationFontFamily = getVariableByName('projectionMarker/duration/fontfamily', modes) ?? 'JioType Var';
65
+ const durationFontSize = getVariableByName('projectionMarker/duration/fontsize', modes) ?? 12;
66
+ const durationFontWeight = String(getVariableByName('projectionMarker/duration/fontweight', modes) ?? 500);
67
+ const rateColor = getVariableByName('projectionMarker/rate/color', modes) ?? '#6b6b6b';
68
+ const rateFontFamily = getVariableByName('metricdata/rate/fontfamily', modes) ?? 'JioType Var';
69
+ const rateFontSize = getVariableByName('metricdata/rate/fontsize', modes) ?? 11;
70
+ const rateFontWeight = String(getVariableByName('metricdata/rate/fontweight', modes) ?? 400);
71
+ const badgeBg = getVariableByName('projectionMarker/durationWrap/bg/color', modes) ?? '#f5f5f5';
72
+ const badgeBorderColor = getVariableByName('projectionMarker/durationWrap/border/color', modes) ?? '#ebebed';
73
+ const badgeBorderWidth = getVariableByName('metricdata/durationWrap/stroke', modes) ?? 1;
74
+ const badgeRadius = getVariableByName('metricdata/durationWrap/radius', modes) ?? 8;
75
+ const badgePaddingHorizontal = getVariableByName('metricdata/durationWrap/padding/horizontal', modes) ?? 16;
76
+ const badgePaddingVertical = getVariableByName('metricdata/durationWrap/padding/vertical', modes) ?? 8;
77
+ const titleTextStyle = {
78
+ color: titleColor,
79
+ fontFamily: titleFontFamily,
80
+ fontSize: titleFontSize,
81
+ fontWeight: titleFontWeight,
82
+ lineHeight: titleFontSize * 1.3
83
+ };
84
+ const renderEndValue = (value, overrideStyle) => {
85
+ if (value === null || value === undefined) return null;
86
+ if (isTextValue(value)) {
87
+ return /*#__PURE__*/_jsx(Text, {
88
+ style: [titleTextStyle, overrideStyle],
89
+ ...resolveTruncation(disableTruncation, 1),
90
+ children: value
91
+ });
92
+ }
93
+ return cloneChildrenWithModes(value, modes);
94
+ };
95
+ return /*#__PURE__*/_jsxs(View, {
96
+ style: [styles.container, style],
97
+ accessibilityRole: "summary",
98
+ accessibilityLabel: accessibilityLabel,
99
+ children: [renderEndValue(startValue, startValueStyle), showConnectors && /*#__PURE__*/_jsx(Divider, {
100
+ direction: "horizontal",
101
+ modes: modes,
102
+ style: styles.connector
103
+ }), /*#__PURE__*/_jsxs(View, {
104
+ style: [styles.badge, {
105
+ backgroundColor: badgeBg,
106
+ borderColor: badgeBorderColor,
107
+ borderWidth: badgeBorderWidth,
108
+ borderRadius: badgeRadius,
109
+ paddingHorizontal: badgePaddingHorizontal,
110
+ paddingVertical: badgePaddingVertical
111
+ }, badgeStyle],
112
+ children: [duration !== null && duration !== undefined ? isTextValue(duration) ? /*#__PURE__*/_jsx(Text, {
113
+ style: [{
114
+ color: durationColor,
115
+ fontFamily: durationFontFamily,
116
+ fontSize: durationFontSize,
117
+ fontWeight: durationFontWeight,
118
+ lineHeight: durationFontSize * 1.2,
119
+ textAlign: 'center'
120
+ }, durationStyle],
121
+ children: duration
122
+ }) : cloneChildrenWithModes(duration, modes) : null, rate !== null && rate !== undefined ? isTextValue(rate) ? /*#__PURE__*/_jsx(Text, {
123
+ style: [{
124
+ color: rateColor,
125
+ fontFamily: rateFontFamily,
126
+ fontSize: rateFontSize,
127
+ fontWeight: rateFontWeight,
128
+ lineHeight: rateFontSize * 1.3,
129
+ textAlign: 'center'
130
+ }, rateStyle],
131
+ children: rate
132
+ }) : cloneChildrenWithModes(rate, modes) : null]
133
+ }), showConnectors && /*#__PURE__*/_jsx(Divider, {
134
+ direction: "horizontal",
135
+ modes: modes,
136
+ style: styles.connector
137
+ }), renderEndValue(endValue, endValueStyle)]
138
+ });
139
+ }
140
+ const styles = {
141
+ container: {
142
+ flexDirection: 'row',
143
+ alignItems: 'center',
144
+ width: '100%'
145
+ },
146
+ connector: {
147
+ flex: 1,
148
+ alignSelf: 'center',
149
+ marginHorizontal: 16
150
+ },
151
+ badge: {
152
+ flexDirection: 'column',
153
+ alignItems: 'center',
154
+ justifyContent: 'center'
155
+ }
156
+ };
157
+ export default ProjectionMarker;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- import React, { useState } from 'react';
3
+ import React, { forwardRef, useState } from 'react';
4
4
  import { Pressable, View, Platform } from 'react-native';
5
5
  import { getVariableByName } from '../../design-tokens/figma-variables-resolver';
6
6
  import { EMPTY_MODES } from '../../utils/react-utils';
@@ -13,14 +13,14 @@ import { jsx as _jsx } from "react/jsx-runtime";
13
13
  // Radio
14
14
  // ---------------------------------------------------------------------------
15
15
 
16
- export function Radio({
16
+ export const Radio = /*#__PURE__*/forwardRef(function Radio({
17
17
  selected = false,
18
18
  disabled = false,
19
19
  onPress,
20
20
  modes = EMPTY_MODES,
21
21
  style,
22
22
  testID
23
- }) {
23
+ }, ref) {
24
24
  // ---- Refs & State ----
25
25
  const [hovered, setHovered] = useState(false);
26
26
  const [focused, setFocused] = useState(false);
@@ -168,6 +168,7 @@ export function Radio({
168
168
  getVariableByName('radio/disabledSelected/border/color');
169
169
  }
170
170
  return /*#__PURE__*/_jsx(Pressable, {
171
+ ref: ref,
171
172
  testID: testID,
172
173
  disabled: disabled,
173
174
  onPress: onPress,
@@ -184,5 +185,5 @@ export function Radio({
184
185
  style: selectorStyle
185
186
  })
186
187
  });
187
- }
188
+ });
188
189
  export default Radio;