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
@@ -39,11 +39,12 @@ export const FIGMA_MODES = {
39
39
  "Attached / Output": ["Default"],
40
40
  "Avatar / Output": ["Default"],
41
41
  "Avatar Group / Output": ["Default"],
42
- "Avatar Size": ["L", "M", "S"],
42
+ "Avatar Size": ["L", "M", "S", "XS"],
43
43
  "Avatar Type": ["Avatar", "Icon", "Text"],
44
44
  "Axis / Output": ["Default"],
45
45
  "Background": ["False", "True"],
46
46
  "Badge / Output": ["Default"],
47
+ "Badge Size": ["Medium", "Small"],
47
48
  "Balance / Output": ["Default"],
48
49
  "BankAccountCard / Output": ["Default"],
49
50
  "Benefit Card": ["Default"],
@@ -69,6 +70,7 @@ export const FIGMA_MODES = {
69
70
  "cardsShared": ["Default"],
70
71
  "Carousel / Output": ["Default"],
71
72
  "CarouselCardAccounts / Output": ["Default"],
73
+ "ccCard / Output": ["Default"],
72
74
  "checkbox / Output": ["Default"],
73
75
  "Checkbox / Output": ["Default"],
74
76
  "Checkbox states": ["Idle", "Hover", "Focus", "Focus Selected", "Selected Hover", "Disabled/Active", "Disabled", "Selected"],
@@ -84,7 +86,12 @@ export const FIGMA_MODES = {
84
86
  "circularProgressBar / Output": ["Default"],
85
87
  "circularProgressBar Size": ["S", "M"],
86
88
  "clusterBubble / Output": ["Default"],
89
+ "coincard": ["Mode 1"],
87
90
  "Color Mode": ["Light", "Dark"],
91
+ "comparetablecell": ["Mode 1"],
92
+ "comparetableheader": ["Mode 1"],
93
+ "Comparison Floating card": ["Default"],
94
+ "ComparisonCardItem": ["Default"],
88
95
  "Confidence": ["High", "Medium", "Low", "None"],
89
96
  "ContentSheet / Output": ["Default"],
90
97
  "Context": ["Default", "Nudge&Alert", "CTACard", "ListItem"],
@@ -95,6 +102,7 @@ export const FIGMA_MODES = {
95
102
  "context7": ["Default", "Card"],
96
103
  "Contrast Context": ["on dark", "on light"],
97
104
  "Conversation Feed / Output": ["Default"],
105
+ "Counter Badge / Output": ["Mode 1"],
98
106
  "Coverage Bar Comparison / Output": ["Default"],
99
107
  "CoverageRing / Output": ["Mode 1"],
100
108
  "CTACard / Output": ["Default"],
@@ -123,6 +131,7 @@ export const FIGMA_MODES = {
123
131
  "FullScreenModal": ["Default"],
124
132
  "Gap": ["S", "M", "L", "None"],
125
133
  "Gauge / Output": ["Default"],
134
+ "Handle Boolean": ["False", "True"],
126
135
  "Heading / Output": ["Default"],
127
136
  "Heading text": ["Default", "Slot"],
128
137
  "Holdings card / Output": ["Default"],
@@ -130,7 +139,7 @@ export const FIGMA_MODES = {
130
139
  "Icon / Output": ["Default"],
131
140
  "Icon Button / Output": ["Default"],
132
141
  "Icon Capsule / Output": ["Default"],
133
- "Icon Capsule Size": ["M", "L", "S"],
142
+ "Icon Capsule Size": ["M", "L", "S", "XS"],
134
143
  "Image / Output": ["Default"],
135
144
  "Input / Output": ["Default"],
136
145
  "Input/PINSlot States": ["Idle", "Active", "Error"],
@@ -155,6 +164,7 @@ export const FIGMA_MODES = {
155
164
  "Message Direction": ["Incoming (Left)", "Outgoing (Right)"],
156
165
  "Message Row / Output": ["Default"],
157
166
  "MessageField / Output": ["Default"],
167
+ "metricdata": ["Mode 1"],
158
168
  "MetricLegendItem / Output": ["Default"],
159
169
  "Money Value / Output": ["Default"],
160
170
  "MonthlyStatusGrid / Output": ["Default"],
@@ -172,15 +182,18 @@ export const FIGMA_MODES = {
172
182
  "Page type": ["MainPage", "SubPage", "JioPlus"],
173
183
  "PageHero / Output": ["Default"],
174
184
  "PaymnetFeedback / Output": ["Default"],
185
+ "PDP cc card": ["Mode 1"],
175
186
  "peekOffset": ["Medium", "Small", "Large", "None"],
176
187
  "Placement": ["Prefix", "Suffix"],
177
188
  "PlanComparisonCard / Output": ["Default"],
178
189
  "Popup / Output": ["Default"],
179
190
  "PortfolioHero / Output": ["Default"],
180
191
  "PoweredByLabel": ["Default"],
192
+ "Product Merchandising card": ["Mode 1"],
181
193
  "ProductLabel / Output": ["Default"],
182
194
  "ProductOverview / Output": ["Default"],
183
195
  "ProgressBadge / Output": ["Default"],
196
+ "ProjectionMarker": ["Mode 1"],
184
197
  "QR code / Output": ["Idle"],
185
198
  "Radio / Output": ["Default"],
186
199
  "Radius": ["S", "M", "L", "None"],
@@ -198,8 +211,10 @@ export const FIGMA_MODES = {
198
211
  "SegmentedControl/Segment / Output": ["Default"],
199
212
  "SegmentedTrack / Output": ["Default"],
200
213
  "Selectable": ["False", "True"],
214
+ "selectioncard": ["Mode 1"],
201
215
  "Semantic Intent": ["Brand", "System"],
202
216
  "Skeleton": ["Mode 1"],
217
+ "Slider / Output": ["Default"],
203
218
  "Slot gap": ["S", "M", "L", "XL"],
204
219
  "special button": ["Default"],
205
220
  "Spinner / Output": ["Default"],
@@ -220,14 +235,19 @@ export const FIGMA_MODES = {
220
235
  "SwappableAmount / Output": ["Default"],
221
236
  "tabItem / Output": ["Default"],
222
237
  "Tabs / Output": ["Default"],
238
+ "TestimonialsCard": ["Default"],
223
239
  "Text / Output": ["Default"],
240
+ "Text Appearance": ["Neutral", "Primary", "Secondary", "Tertiary"],
241
+ "Text Sizes": ["Medium", "Small"],
224
242
  "textInput / Output": ["Default"],
243
+ "TextSegment / Output": ["Default"],
225
244
  "Thread Hero / Output": ["Default"],
226
245
  "Title / Output": ["Default"],
227
246
  "Title Level": ["Default", "Bold"],
228
247
  "Toggle / Output": ["Default"],
229
248
  "Toggle States": ["Off", "On", "Disabled Off", "Disabled On"],
230
249
  "ToggleIconButton / Output": ["Default"],
250
+ "Tooltip": ["True", "False"],
231
251
  "tooltip / Output": ["Default"],
232
252
  "Tost Output": ["Default"],
233
253
  "Transaction Status": ["Request", "Paid", "Declined", "Expired"],
@@ -258,29 +278,33 @@ export const FIGMA_COMPONENT_MODES: Record<string, readonly string[]> = {
258
278
  "Attached": ["Color Mode"],
259
279
  "Avatar": ["Avatar Size", "Color Mode", "Context4"],
260
280
  "AvatarGroup": ["Avatar Size", "Context4"],
261
- "Badge": ["AppearanceBrand", "AppearanceSystem", "Color Mode", "Emphasis", "Semantic Intent"],
281
+ "Badge": ["AppearanceBrand", "Badge Size", "Color Mode", "Emphasis"],
262
282
  "Balance": ["Color Mode", "Context3"],
283
+ "BenefitCard": ["AppearanceBrand", "AppearanceSystem", "Button / Size", "Button / State", "Color Mode", "Context", "Context2", "context5", "Emphasis", "List Item Style", "NavArrow Direction", "Page type", "Semantic Intent", "Text Appearance", "Text Sizes", "Weight"],
263
284
  "BottomNav": ["Color Mode"],
264
285
  "BottomNavItem": ["BottomNavItem / State", "Color Mode"],
265
286
  "BrandChip": ["Avatar Size", "Color Mode", "Context4"],
266
- "BubbleChart": ["Appearance / DataViz", "Color Mode", "Emphasis / DataViz"],
287
+ "BubbleChart": ["Appearance / DataViz", "Color Mode", "Emphasis / DataViz", "Text Appearance"],
267
288
  "Button": ["AppearanceBrand", "AppearanceSystem", "Button / Size", "Button / State", "Color Mode", "Context", "Emphasis", "Semantic Intent"],
268
289
  "Card": ["Color Mode", "Gap", "Page type"],
269
290
  "CardAdvisory": ["AppearanceBrand", "AppearanceSystem", "Button / Size", "Button / State", "circularProgressBar Size", "Color Mode", "Context", "Emphasis", "Nudge padding", "Semantic Intent", "Slot gap"],
270
- "CardBankAccount": ["AppearanceBrand", "AppearanceSystem", "Avatar Size", "Button / Size", "Button / State", "Color Mode", "Context", "Context4", "context5", "Emphasis", "List Item Style", "Semantic Intent", "Weight"],
271
- "CardCTA": ["AppearanceBrand", "AppearanceSystem", "Button / Size", "Button / State", "Color Mode", "Context", "Emphasis", "Icon Capsule Size", "MediaBlock", "Semantic Intent"],
291
+ "CardBankAccount": ["AppearanceBrand", "AppearanceSystem", "Avatar Size", "Badge Size", "Button / Size", "Button / State", "Color Mode", "Context", "Context4", "context5", "Emphasis", "List Item Style", "Semantic Intent", "Text Appearance", "Text Sizes", "Weight"],
292
+ "CardCTA": ["AppearanceBrand", "AppearanceSystem", "Badge Size", "Button / Size", "Button / State", "Color Mode", "Context", "Emphasis", "Icon Capsule Size", "MediaBlock", "Semantic Intent"],
272
293
  "CardFeedback": ["AppearanceBrand", "AppearanceSystem", "Color Mode"],
273
294
  "CardFinancialCondition": ["AppearanceBrand", "AppearanceSystem", "Button / Size", "Button / State", "circularProgressBar Size", "Color Mode", "Context", "Emphasis", "Nudge padding", "Semantic Intent", "Slot gap"],
274
- "CardInsight": ["Appearance / DataViz", "AppearanceBrand", "AppearanceSystem", "Button / Size", "Button / State", "Color Mode", "Context", "context7", "Emphasis", "Emphasis / DataViz", "LinearProgress Size", "Nudge padding", "Page type", "Semantic Intent", "Slot gap"],
295
+ "CardInsight": ["Appearance / DataViz", "AppearanceBrand", "AppearanceSystem", "Badge Size", "Button / Size", "Button / State", "Color Mode", "Context", "context7", "Emphasis", "Emphasis / DataViz", "LinearProgress Size", "Nudge padding", "Page type", "Semantic Intent", "Slot gap"],
275
296
  "CardProviderInfo": ["AppearanceBrand", "Avatar Size", "Color Mode", "Context4"],
276
297
  "Carousel": ["peekOffset"],
298
+ "CcCard": ["AppearanceBrand", "AppearanceSystem", "Avatar Size", "Badge Size", "Button / Size", "Button / State", "Color Mode", "Context", "Context2", "Context4", "context5", "context7", "Emphasis", "List Item Style", "NavArrow Direction", "Page type", "Radius", "Semantic Intent", "Text Appearance", "Text Sizes", "Weight"],
277
299
  "Checkbox": ["Color Mode"],
278
300
  "CheckboxGroup": ["Color Mode"],
279
301
  "CheckboxItem": ["Color Mode"],
280
302
  "ChipSelect": ["ChipSelect State", "Color Mode"],
281
303
  "CircularProgressBar": ["AppearanceBrand", "AppearanceSystem", "circularProgressBar Size", "Color Mode", "Emphasis", "Semantic Intent"],
282
304
  "CircularRating": ["AppearanceBrand", "AppearanceSystem", "Button / Size", "Button / State", "Color Mode", "Context", "Emphasis", "Nudge padding", "Semantic Intent", "Slot gap"],
283
- "ClusterBubble": ["Appearance / DataViz", "Color Mode", "Emphasis / DataViz"],
305
+ "ClusterBubble": ["Appearance / DataViz", "Color Mode", "Emphasis / DataViz", "Text Appearance"],
306
+ "CompareTable": ["Accordion States", "AppearanceBrand", "Button / Size", "Button / State", "Color Mode", "Emphasis", "Radius"],
307
+ "ComparisonBar": ["AppearanceBrand", "AppearanceSystem", "Button / Size", "Button / State", "Color Mode", "Context", "Emphasis", "Icon Capsule Size", "Radius", "Semantic Intent"],
284
308
  "CoverageBarComparison": ["Appearance / DataViz", "Color Mode", "Emphasis / DataViz"],
285
309
  "CoverageRing": ["AppearanceBrand", "AppearanceSystem", "Button / Size", "Button / State", "circularProgressBar Size", "Color Mode", "Context", "Emphasis", "Semantic Intent"],
286
310
  "DebitCard": ["DebitCard brand"],
@@ -321,11 +345,14 @@ export const FIGMA_COMPONENT_MODES: Record<string, readonly string[]> = {
321
345
  "OTP": ["AppearanceBrand", "AppearanceSystem", "Button / Size", "Button / State", "Color Mode", "Context", "Emphasis", "FormField States", "Input/PINSlot States", "Semantic Intent", "Status"],
322
346
  "PageHero": ["AppearanceBrand", "AppearanceSystem", "Button / Size", "Button / State", "Color Mode", "Context", "Emphasis", "Media / Output", "Semantic Intent"],
323
347
  "PaymentFeedback": ["AppearanceBrand", "AppearanceSystem", "Color Mode", "Context", "Emphasis", "Icon Capsule Size", "Semantic Intent"],
348
+ "PdpCcCard": ["AppearanceBrand", "AppearanceSystem", "Button / Size", "Button / State", "Color Mode", "Context", "context7", "Emphasis", "Page type", "Radius", "Semantic Intent"],
324
349
  "PlanComparisonCard": ["Color Mode"],
325
350
  "Popup": ["Color Mode", "Context", "Padding", "Page type", "Slot gap"],
326
351
  "PortfolioHero": ["Avatar Size", "Color Mode", "Context3", "Context4"],
327
352
  "ProductLabel": ["Avatar Size", "Color Mode", "Context4"],
353
+ "ProductMerchandisingCard": ["AppearanceBrand", "AppearanceSystem", "Avatar Size", "Badge Size", "Button / Size", "Button / State", "Color Mode", "Context", "Context4", "Emphasis", "Semantic Intent"],
328
354
  "ProductOverview": ["Avatar Size", "Color Mode", "Context4"],
355
+ "ProjectionMarker": ["Color Mode"],
329
356
  "Radio": ["Color Mode"],
330
357
  "RangeTrack": ["Appearance / DataViz", "Color Mode", "Emphasis / DataViz"],
331
358
  "RechargeCard": ["Avatar Size", "Color Mode", "Context3", "Context4"],
@@ -334,7 +361,9 @@ export const FIGMA_COMPONENT_MODES: Record<string, readonly string[]> = {
334
361
  "Section": ["AppearanceBrand", "AppearanceSystem", "Color Mode", "Context", "Context2", "context5", "Emphasis", "Icon Capsule Size", "List Item Style", "NavArrow Direction", "Padding", "Page type", "Semantic Intent", "Slot gap"],
335
362
  "SegmentedControl": ["SegmentedControl/Segment"],
336
363
  "SegmentedTrack": ["Appearance / DataViz", "Color Mode", "Emphasis / DataViz"],
364
+ "Slider": ["AppearanceBrand", "AppearanceSystem", "Color Mode", "Emphasis", "Semantic Intent", "Text Appearance", "Text Sizes", "Weight"],
337
365
  "Slot": ["Context", "Slot gap"],
366
+ "Stack": ["Context", "Slot gap"],
338
367
  "StatGroup": ["Color Mode", "StatItem Label Position "],
339
368
  "StatItem": ["StatItem Label Position "],
340
369
  "StatusHero": ["AppearanceBrand", "AppearanceSystem", "Color Mode", "Context", "Context3", "Emphasis", "Icon Capsule Size", "Semantic Intent"],
@@ -347,8 +376,9 @@ export const FIGMA_COMPONENT_MODES: Record<string, readonly string[]> = {
347
376
  "SwappableAmount": ["AppearanceBrand", "AppearanceSystem", "Button / Size", "Button / State", "Color Mode", "Context", "Emphasis", "Semantic Intent"],
348
377
  "TabItem": ["Color Mode"],
349
378
  "TestimonialsCard": ["Avatar Size", "Color Mode", "Context4"],
350
- "Text": ["Weight"],
379
+ "Text": ["Color Mode", "Text Appearance", "Text Sizes", "Weight"],
351
380
  "TextInput": ["Color Mode", "InputState"],
381
+ "TextSegment": ["Color Mode", "Text Appearance", "Text Sizes", "Weight"],
352
382
  "Title": ["Color Mode", "context7", "Page type"],
353
383
  "Toggle": ["Color Mode", "Toggle States"],
354
384
  "Tooltip": ["Color Mode"],
@@ -4,7 +4,7 @@
4
4
  * Auto-generated from SVG files in src/icons/
5
5
  * DO NOT EDIT MANUALLY - Run "npm run icons:generate" to regenerate
6
6
  *
7
- * Generated: 2026-06-10T14:28:21.260Z
7
+ * Generated: 2026-06-22T15:37:25.988Z
8
8
  */
9
9
 
10
10
  // Icon name to SVG data mapping
@@ -0,0 +1,305 @@
1
+ import React, { useId } from 'react'
2
+ import { View, StyleSheet, Platform, UIManager, type ViewStyle, type StyleProp } from 'react-native'
3
+ import { BlurView } from '@react-native-community/blur'
4
+ import MaskedView from '@react-native-masked-view/masked-view'
5
+ import Svg, { Defs, LinearGradient, Stop, Rect } from 'react-native-svg'
6
+
7
+ export type GlassTint = 'dark' | 'light'
8
+
9
+ export interface GlassFillProps {
10
+ /**
11
+ * Visual tint of the glass surface. Maps to `BlurView`'s `blurType`
12
+ * (`'dark'` | `'light'`) and drives the iOS
13
+ * `reducedTransparencyFallbackColor` so the surface degrades gracefully
14
+ * when "Reduce Transparency" is enabled in system accessibility settings.
15
+ */
16
+ tint?: GlassTint
17
+ /**
18
+ * Blur strength as a 0–100 "intensity" value. Internally mapped to
19
+ * `@react-native-community/blur`'s `blurAmount`. When `progressive` is set,
20
+ * this is the strength at the BOTTOM of the ramp (the strongest point); the
21
+ * ramp is kept intentionally gentle so the surface reads as subtle glass
22
+ * rather than a heavy frosted block.
23
+ */
24
+ intensity?: number
25
+ /**
26
+ * Token-derived color tint laid OVER the live blur. Painted as a
27
+ * translucent overlay so the glass keeps its color signature even when the
28
+ * platform blur quality varies (or realtime blur is unavailable).
29
+ */
30
+ overlayColor?: string
31
+ /**
32
+ * Render a *progressive* (variable) blur instead of a uniform one: fully
33
+ * clear at the top, easing into a soft blur toward the bottom. Implemented
34
+ * by stacking two `MaskedView` + `BlurView` layers (a faint base + a
35
+ * slightly stronger accent near the bottom), each revealed via an eased
36
+ * multi-stop SVG gradient mask so the blur swells smoothly rather than
37
+ * along a hard seam. Works on iOS and Android with no extra native module.
38
+ */
39
+ progressive?: boolean
40
+ /**
41
+ * Android-only: paint a barely-there white wash (`rgba(255,255,255,0.03)`)
42
+ * over the uniform blur to lift the community `RealtimeBlurView`, which
43
+ * otherwise reads slightly muddy. Defaults to `true` to match the
44
+ * media/merchandising card surfaces. Smaller surfaces (e.g. a Badge pill)
45
+ * pass `false` to keep the glass perfectly clear. No effect on iOS/web or
46
+ * on the progressive path.
47
+ */
48
+ androidTintWash?: boolean
49
+ /**
50
+ * Web-only: multiplier converting the 0–100 `intensity` to CSS blur px (see
51
+ * `GlassFill.web.tsx`). Declared here purely for prop-type parity across the
52
+ * platform split — native always uses the fixed `blurAmount` scale and
53
+ * ignores this value.
54
+ */
55
+ webBlurScale?: number
56
+ /**
57
+ * Web-only: upper clamp (px) on the resolved CSS blur. Declared here for
58
+ * parity with the web build; ignored on native.
59
+ */
60
+ webBlurMaxPx?: number
61
+ /** Container style overrides. Defaults to `StyleSheet.absoluteFill`. */
62
+ style?: StyleProp<ViewStyle>
63
+ }
64
+
65
+ const DEFAULT_FALLBACK_DARK = '#1414174a'
66
+ const DEFAULT_FALLBACK_LIGHT = '#ffffff66'
67
+
68
+ // The native view-manager name registered by `@react-native-community/blur`
69
+ // (`AndroidBlurView` on Android, `BlurView` on iOS).
70
+ const NATIVE_BLUR_NAME = Platform.OS === 'android' ? 'AndroidBlurView' : 'BlurView'
71
+
72
+ /**
73
+ * Alpha stop on a layer's vertical reveal mask. `offset` is the vertical
74
+ * position (0 = top of the surface, 1 = bottom); `opacity` is the mask alpha
75
+ * there (0 = layer hidden / fully clear, 1 = layer fully applied).
76
+ *
77
+ * Using several stops (rather than a single linear 0 → 1 ramp) lets each layer
78
+ * EASE in, so the blur swells smoothly toward the bottom instead of appearing
79
+ * along a hard horizontal seam. That soft S-curve is what gives the surface its
80
+ * "glass" feel rather than a flat translucent panel.
81
+ */
82
+ interface MaskStop {
83
+ offset: number
84
+ opacity: number
85
+ }
86
+
87
+ /**
88
+ * A single layer of the progressive ramp.
89
+ * - `stops` describe how this layer is revealed from top to bottom.
90
+ * - `amount` is this layer's share (0–1) of the max `blurAmount`.
91
+ *
92
+ * We stack just TWO layers on both platforms: a faint base blur that covers
93
+ * most of the footer and a slightly stronger accent concentrated near the
94
+ * bottom. Keeping the overlap shallow avoids compounding the dark tint of
95
+ * multiple `BlurView`s (which is what made the earlier 3-layer ramp read as a
96
+ * heavy block), while still giving a genuine variable-radius result — the blur
97
+ * radius grows toward the bottom where the two layers overlap.
98
+ */
99
+ interface ProgressiveLayer {
100
+ stops: MaskStop[]
101
+ amount: number
102
+ }
103
+
104
+ // Base reveal: a faint trace of blur begins near the very top and grows
105
+ // steadily downward, so the upper half still carries visible glass rather than
106
+ // snapping clear. Also reused for the no-native-blur fallback scrim.
107
+ const BASE_MASK_STOPS: MaskStop[] = [
108
+ { offset: 0.0, opacity: 0 },
109
+ { offset: 0.08, opacity: 0.12 },
110
+ { offset: 0.35, opacity: 0.4 },
111
+ { offset: 0.65, opacity: 0.8 },
112
+ { offset: 1.0, opacity: 1 },
113
+ ]
114
+
115
+ const PROGRESSIVE_LAYERS: ProgressiveLayer[] = [
116
+ { amount: 0.65, stops: BASE_MASK_STOPS },
117
+ // Accent: the strongest blur, gathering over the lower portion for depth.
118
+ {
119
+ amount: 1.0,
120
+ stops: [
121
+ { offset: 0.0, opacity: 0 },
122
+ { offset: 0.3, opacity: 0.15 },
123
+ { offset: 0.65, opacity: 0.65 },
124
+ { offset: 1.0, opacity: 1 },
125
+ ],
126
+ },
127
+ ]
128
+
129
+ /**
130
+ * Probe ONCE whether the native blur view is actually present in this binary.
131
+ *
132
+ * `@react-native-community/blur` is a peer dependency so its JS always imports,
133
+ * but on a build where the native module was never linked (e.g. `pod install`
134
+ * wasn't run on iOS) rendering `<BlurView>` shows React Native's red
135
+ * "Unimplemented component <BlurView>" placeholder. Detecting availability up
136
+ * front lets us fall back to a tinted scrim instead of crashing the surface.
137
+ *
138
+ * - New architecture (bridgeless): `getViewManagerConfig` raises a soft error,
139
+ * so we MUST use `hasViewManagerConfig` -> Fabric component registry.
140
+ * - Old architecture (Paper): `getViewManagerConfig` returns null when the
141
+ * view manager isn't registered.
142
+ */
143
+ const NATIVE_BLUR_SUPPORTED: boolean = (() => {
144
+ try {
145
+ const um = UIManager as unknown as {
146
+ hasViewManagerConfig?: (name: string) => boolean
147
+ getViewManagerConfig?: (name: string) => unknown
148
+ }
149
+ if (typeof um.hasViewManagerConfig === 'function') {
150
+ return um.hasViewManagerConfig(NATIVE_BLUR_NAME) === true
151
+ }
152
+ if (typeof um.getViewManagerConfig === 'function') {
153
+ return um.getViewManagerConfig(NATIVE_BLUR_NAME) != null
154
+ }
155
+ } catch {
156
+ // Any probe failure -> treat blur as unavailable and use the fallback.
157
+ }
158
+ return false
159
+ })()
160
+
161
+ /**
162
+ * Vertical alpha-gradient mask drawn with `react-native-svg`. `MaskedView`
163
+ * reveals its child in proportion to this mask's alpha, so feeding it an eased
164
+ * multi-stop gradient makes the layer's blur swell in smoothly from top to
165
+ * bottom instead of along a hard seam.
166
+ */
167
+ function GradientMask({ id, stops }: { id: string; stops: MaskStop[] }) {
168
+ return (
169
+ <Svg width="100%" height="100%">
170
+ <Defs>
171
+ <LinearGradient id={id} x1="0" y1="0" x2="0" y2="1">
172
+ {stops.map((s, i) => (
173
+ <Stop key={i} offset={s.offset} stopColor="#000000" stopOpacity={s.opacity} />
174
+ ))}
175
+ </LinearGradient>
176
+ </Defs>
177
+ <Rect x="0" y="0" width="100%" height="100%" fill={`url(#${id})`} />
178
+ </Svg>
179
+ )
180
+ }
181
+
182
+ /**
183
+ * Shared glass / frosted surface for native (iOS + Android).
184
+ *
185
+ * This is the single source of truth for the glass effect used by `MediaCard`,
186
+ * `ProductMerchandisingCard`, `Badge`, and any future consumer. It supersedes
187
+ * the per-component `GlassFill` copies that previously drifted apart.
188
+ *
189
+ * Why this lives in its own platform-split file:
190
+ * - `@react-native-community/blur` is a native-only module; importing it on
191
+ * web throws because it references native components not registered there.
192
+ * Metro's platform-extension resolution picks `GlassFill.tsx` for native
193
+ * and `GlassFill.web.tsx` for web, keeping the web bundle native-free.
194
+ * - Centralizes the `intensity` (0–100) -> `blurAmount` (0–32) mapping so the
195
+ * Figma `blur/minimal` token semantics survive across platforms.
196
+ *
197
+ * On iOS (with the pod installed) this is a real `UIVisualEffectView` (true
198
+ * OS-level live blur). On Android it uses the community blur view. When the
199
+ * native module isn't linked in the running binary, the component degrades to
200
+ * a translucent tinted scrim (`reducedTransparencyFallbackColor` / fallback
201
+ * color) instead of rendering the "Unimplemented component" placeholder.
202
+ *
203
+ * NOTE: the consumer MUST clip this with `overflow: 'hidden'` on a rounded
204
+ * parent — the native blur view does not honor `borderRadius` itself.
205
+ */
206
+ function GlassFill({
207
+ tint = 'dark',
208
+ intensity = 50,
209
+ overlayColor,
210
+ progressive = false,
211
+ androidTintWash = true,
212
+ style,
213
+ }: GlassFillProps) {
214
+ const rawId = useId()
215
+ const maskId = `glass-mask-${rawId.replace(/[^a-zA-Z0-9_-]/g, '')}`
216
+
217
+ const blurType: 'light' | 'dark' = tint === 'light' ? 'light' : 'dark'
218
+ const uniformBlurAmount = Math.max(0, Math.min(32, Math.round(intensity * 0.32)))
219
+ const fallbackColor = overlayColor ?? (tint === 'light' ? DEFAULT_FALLBACK_LIGHT : DEFAULT_FALLBACK_DARK)
220
+
221
+ // ----- Progressive (variable) blur -------------------------------------
222
+ if (progressive) {
223
+ // Peak blur radius (at the bottom). Full strength so the frosted glass
224
+ // is clearly engaged where the layers overlap, while the eased masks
225
+ // keep the top of the surface fully clear.
226
+ const peakBlur = Math.max(1, Math.min(32, Math.round(intensity * 0.32)))
227
+
228
+ // Native blur not linked -> tint eases from transparent (top) to a soft
229
+ // fallback color (bottom) so the surface still reads as gentle glass.
230
+ if (!NATIVE_BLUR_SUPPORTED) {
231
+ return (
232
+ <View style={[StyleSheet.absoluteFill, style]} pointerEvents="none">
233
+ <MaskedView
234
+ style={StyleSheet.absoluteFill}
235
+ maskElement={<GradientMask id={`${maskId}-fb`} stops={BASE_MASK_STOPS} />}
236
+ >
237
+ <View style={[StyleSheet.absoluteFill, { backgroundColor: fallbackColor }]} />
238
+ </MaskedView>
239
+ </View>
240
+ )
241
+ }
242
+
243
+ return (
244
+ <View style={[StyleSheet.absoluteFill, style]} pointerEvents="none">
245
+ {PROGRESSIVE_LAYERS.map((layer, i) => {
246
+ const amount = Math.max(1, Math.round(peakBlur * layer.amount))
247
+ return (
248
+ <MaskedView
249
+ key={i}
250
+ style={StyleSheet.absoluteFill}
251
+ maskElement={<GradientMask id={`${maskId}-${i}`} stops={layer.stops} />}
252
+ >
253
+ <BlurView
254
+ style={StyleSheet.absoluteFill}
255
+ blurType={blurType}
256
+ blurAmount={amount}
257
+ reducedTransparencyFallbackColor={fallbackColor}
258
+ />
259
+ </MaskedView>
260
+ )
261
+ })}
262
+ </View>
263
+ )
264
+ }
265
+
266
+ // ----- Uniform blur (default) ------------------------------------------
267
+ // Native blur not linked in this build -> render a translucent tinted scrim
268
+ // so the surface still reads as frosted glass and never shows RN's
269
+ // "Unimplemented component <BlurView>" box.
270
+ if (!NATIVE_BLUR_SUPPORTED) {
271
+ return (
272
+ <View
273
+ style={[StyleSheet.absoluteFill, { backgroundColor: fallbackColor }, style]}
274
+ pointerEvents="none"
275
+ />
276
+ )
277
+ }
278
+
279
+ return (
280
+ <View style={[StyleSheet.absoluteFill, style]} pointerEvents="none">
281
+ <BlurView
282
+ style={StyleSheet.absoluteFill}
283
+ blurType={blurType}
284
+ blurAmount={uniformBlurAmount}
285
+ reducedTransparencyFallbackColor={fallbackColor}
286
+ />
287
+ {overlayColor != null ? (
288
+ <View style={[StyleSheet.absoluteFill, { backgroundColor: overlayColor }]} />
289
+ ) : null}
290
+ {Platform.OS === 'android' && androidTintWash ? (
291
+ <View
292
+ style={[
293
+ StyleSheet.absoluteFill,
294
+ {
295
+ backgroundColor: 'rgba(255,255,255,0.03)',
296
+ opacity: 0.6,
297
+ },
298
+ ]}
299
+ />
300
+ ) : null}
301
+ </View>
302
+ )
303
+ }
304
+
305
+ export default GlassFill
@@ -0,0 +1,148 @@
1
+ import React from 'react'
2
+ import { View, StyleSheet, type ViewStyle, type StyleProp } from 'react-native'
3
+
4
+ export type GlassTint = 'dark' | 'light'
5
+
6
+ export interface GlassFillProps {
7
+ tint?: GlassTint
8
+ intensity?: number
9
+ overlayColor?: string
10
+ /**
11
+ * Render a *progressive* (variable) blur: fully clear at the top, easing
12
+ * into a soft blur toward the bottom. On web this mirrors the native
13
+ * technique — two `backdrop-filter` layers, each clipped with an eased
14
+ * multi-stop `mask-image` linear-gradient so the effective blur swells
15
+ * smoothly toward the bottom.
16
+ */
17
+ progressive?: boolean
18
+ /**
19
+ * Android-only knob on native; accepted on web for prop parity but unused
20
+ * (web has no equivalent realtime-blur muddiness to lift).
21
+ */
22
+ androidTintWash?: boolean
23
+ /**
24
+ * Multiplier converting the 0–100 `intensity` to CSS blur px. Defaults to
25
+ * `0.32` to mirror the native `blurAmount` scale. Exposed so a consumer can
26
+ * preserve a legacy mapping (e.g. `MediaCard` uses `0.3`).
27
+ */
28
+ webBlurScale?: number
29
+ /**
30
+ * Upper clamp (px) on the resolved CSS blur. Defaults to `32` to mirror the
31
+ * native cap. `MediaCard` passes `30` to preserve its historical value.
32
+ */
33
+ webBlurMaxPx?: number
34
+ style?: StyleProp<ViewStyle>
35
+ }
36
+
37
+ const DEFAULT_FALLBACK_DARK = '#1414174a'
38
+ const DEFAULT_FALLBACK_LIGHT = '#ffffff66'
39
+
40
+ const DEFAULT_WEB_BLUR_SCALE = 0.32
41
+ const DEFAULT_WEB_BLUR_MAX_PX = 32
42
+
43
+ // Mirror of the native ramp (see GlassFill.tsx). Each layer is a `mask-image`
44
+ // gradient whose alpha stops (0 = top, 1 = bottom) ease the blur in; `amount`
45
+ // is the layer's share of the max blur. Two gently-overlapping layers (faint
46
+ // base + bottom accent) keep the surface subtle and glass-like rather than a
47
+ // heavy frosted block.
48
+ interface WebLayer {
49
+ amount: number
50
+ stops: { offset: number; opacity: number }[]
51
+ }
52
+
53
+ const PROGRESSIVE_LAYERS: WebLayer[] = [
54
+ {
55
+ amount: 0.65,
56
+ stops: [
57
+ { offset: 0.0, opacity: 0 },
58
+ { offset: 0.08, opacity: 0.12 },
59
+ { offset: 0.35, opacity: 0.4 },
60
+ { offset: 0.65, opacity: 0.8 },
61
+ { offset: 1.0, opacity: 1 },
62
+ ],
63
+ },
64
+ {
65
+ amount: 1.0,
66
+ stops: [
67
+ { offset: 0.0, opacity: 0 },
68
+ { offset: 0.3, opacity: 0.15 },
69
+ { offset: 0.65, opacity: 0.65 },
70
+ { offset: 1.0, opacity: 1 },
71
+ ],
72
+ },
73
+ ]
74
+
75
+ function toGradient(stops: WebLayer['stops']): string {
76
+ const parts = stops
77
+ .map((s) => `rgba(0,0,0,${s.opacity}) ${Math.round(s.offset * 100)}%`)
78
+ .join(', ')
79
+ return `linear-gradient(to bottom, ${parts})`
80
+ }
81
+
82
+ /**
83
+ * Web counterpart of the shared `GlassFill`.
84
+ *
85
+ * `@react-native-community/blur` ships no web implementation, so on web we
86
+ * render a translucent `View` with `backdrop-filter: blur()`. Native bundles
87
+ * pick up `GlassFill.tsx` instead via Metro's platform resolver; the web
88
+ * bundle picks up this file, so the native-only module is never imported here.
89
+ */
90
+ function GlassFill({
91
+ tint = 'dark',
92
+ intensity = 50,
93
+ overlayColor,
94
+ progressive = false,
95
+ webBlurScale = DEFAULT_WEB_BLUR_SCALE,
96
+ webBlurMaxPx = DEFAULT_WEB_BLUR_MAX_PX,
97
+ style,
98
+ }: GlassFillProps) {
99
+ // intensity 0-100 -> ~0-maxPx CSS blur, kept in parity with the native scale.
100
+ const blurPx = Math.max(0, Math.min(webBlurMaxPx, Math.round(intensity * webBlurScale)))
101
+ const tintColor = overlayColor ?? (tint === 'light' ? DEFAULT_FALLBACK_LIGHT : DEFAULT_FALLBACK_DARK)
102
+
103
+ if (progressive) {
104
+ // Full peak blur (parity with native) so the frosted glass is clearly
105
+ // engaged at the bottom; the eased masks keep the top fully clear.
106
+ const peakPx = Math.max(1, Math.min(webBlurMaxPx, Math.round(intensity * webBlurScale)))
107
+ return (
108
+ <View style={[StyleSheet.absoluteFill, style]} pointerEvents="none">
109
+ {PROGRESSIVE_LAYERS.map((layer, i) => {
110
+ const px = Math.max(1, Math.round(peakPx * layer.amount))
111
+ const gradient = toGradient(layer.stops)
112
+ // web-only CSS (backdrop-filter / mask-image); cast because
113
+ // these keys aren't in RN's ViewStyle.
114
+ const webStyle = {
115
+ backdropFilter: `blur(${px}px)`,
116
+ WebkitBackdropFilter: `blur(${px}px)`,
117
+ maskImage: gradient,
118
+ WebkitMaskImage: gradient,
119
+ } as unknown as ViewStyle
120
+ return (
121
+ <View
122
+ key={i}
123
+ style={[StyleSheet.absoluteFill, webStyle]}
124
+ pointerEvents="none"
125
+ />
126
+ )
127
+ })}
128
+ </View>
129
+ )
130
+ }
131
+
132
+ return (
133
+ <View
134
+ style={[
135
+ StyleSheet.absoluteFill,
136
+ { backgroundColor: tintColor },
137
+ // backdrop-filter is web-only CSS; ignored by RN on native
138
+ // (we never bundle this file there anyway).
139
+ // @ts-ignore web-only style
140
+ { backdropFilter: `blur(${blurPx}px)`, WebkitBackdropFilter: `blur(${blurPx}px)` },
141
+ style,
142
+ ]}
143
+ pointerEvents="none"
144
+ />
145
+ )
146
+ }
147
+
148
+ export default GlassFill