@mx-cartographer/experiences 9.7.206 → 10.0.0

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 (259) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsChart.d.ts +2 -0
  3. package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsChart.es.js +39 -23
  4. package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsChart.es.js.map +1 -1
  5. package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsHeader.d.ts +3 -1
  6. package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsHeader.es.js +37 -33
  7. package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsHeader.es.js.map +1 -1
  8. package/dist/accounts/utils/AccountFields.d.ts +3 -1
  9. package/dist/accounts/utils/AccountFields.es.js +39 -39
  10. package/dist/accounts/utils/AccountFields.es.js.map +1 -1
  11. package/dist/common/components/charts/LineChart.d.ts +4 -0
  12. package/dist/common/components/charts/LineChart.es.js +114 -112
  13. package/dist/common/components/charts/LineChart.es.js.map +1 -1
  14. package/dist/common/components/charts/linechart/CustomLegend.es.js +24 -21
  15. package/dist/common/components/charts/linechart/CustomLegend.es.js.map +1 -1
  16. package/dist/core/types/Insights.d.ts +9 -1
  17. package/dist/core/types/Insights.es.js.map +1 -1
  18. package/dist/core/types/localization/InsightsFeedCopy.d.ts +42 -0
  19. package/dist/core/types/localization/index.d.ts +1 -1
  20. package/dist/insights-v2/actionBlocks/AccountDetailsBlock/AccountDetailsBlock.d.ts +7 -1
  21. package/dist/insights-v2/actionBlocks/AccountDetailsBlock/AccountDetailsBlock.es.js +39 -20
  22. package/dist/insights-v2/actionBlocks/AccountDetailsBlock/AccountDetailsBlock.es.js.map +1 -1
  23. package/dist/insights-v2/actionBlocks/AccountDetailsBlock/SpendVsIncomeChart.d.ts +4 -0
  24. package/dist/insights-v2/actionBlocks/AccountDetailsBlock/SpendVsIncomeChart.es.js +42 -0
  25. package/dist/insights-v2/actionBlocks/AccountDetailsBlock/SpendVsIncomeChart.es.js.map +1 -0
  26. package/dist/insights-v2/actionBlocks/AccountDetailsBlock/SpendVsPaymentChart.d.ts +7 -0
  27. package/dist/insights-v2/actionBlocks/AccountDetailsBlock/SpendVsPaymentChart.es.js +54 -0
  28. package/dist/insights-v2/actionBlocks/AccountDetailsBlock/SpendVsPaymentChart.es.js.map +1 -0
  29. package/dist/insights-v2/actionBlocks/AmountInputModalBlock/AmountInputModalBlock.es.js +10 -10
  30. package/dist/insights-v2/actionBlocks/AmountInputModalBlock/CreateBudgetDialog.es.js +24 -23
  31. package/dist/insights-v2/actionBlocks/AmountInputModalBlock/CreateBudgetDialog.es.js.map +1 -1
  32. package/dist/insights-v2/actionBlocks/BudgetDetailsBlock/BudgetDetailsBlock.es.js +75 -73
  33. package/dist/insights-v2/actionBlocks/BudgetDetailsBlock/BudgetDetailsBlock.es.js.map +1 -1
  34. package/dist/insights-v2/actionBlocks/BudgetDetailsBlock/BudgetSummary.d.ts +5 -1
  35. package/dist/insights-v2/actionBlocks/BudgetDetailsBlock/BudgetSummary.es.js +21 -21
  36. package/dist/insights-v2/actionBlocks/BudgetDetailsBlock/BudgetSummary.es.js.map +1 -1
  37. package/dist/insights-v2/actionBlocks/BudgetDetailsBlock/layout.d.ts +11 -0
  38. package/dist/insights-v2/actionBlocks/BudgetDetailsBlock/layout.es.js +65 -58
  39. package/dist/insights-v2/actionBlocks/BudgetDetailsBlock/layout.es.js.map +1 -1
  40. package/dist/insights-v2/actionBlocks/EmergencySavingsBlock/EmergencySavingsV2.es.js +17 -17
  41. package/dist/insights-v2/actionBlocks/EmergencySavingsBlock/EmergencySavingsV2.es.js.map +1 -1
  42. package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/BalanceStepper.es.js +9 -10
  43. package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/BalanceStepper.es.js.map +1 -1
  44. package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/SaveEnoughToLiveOnBottomSection.es.js +21 -22
  45. package/dist/insights-v2/actionBlocks/MakeTransferActionBlock/SaveEnoughToLiveOnBottomSection.es.js.map +1 -1
  46. package/dist/insights-v2/actionBlocks/PayoffCalculatorBlock/PayoffCalculatorBlock.es.js +35 -35
  47. package/dist/insights-v2/actionBlocks/PayoffCalculatorBlock/PayoffCalculatorBlock.es.js.map +1 -1
  48. package/dist/insights-v2/actionBlocks/PayoffCalculatorBlock/PayoffResults.d.ts +1 -1
  49. package/dist/insights-v2/actionBlocks/PayoffCalculatorBlock/PayoffResults.es.js +44 -49
  50. package/dist/insights-v2/actionBlocks/PayoffCalculatorBlock/PayoffResults.es.js.map +1 -1
  51. package/dist/insights-v2/actionBlocks/PayoffStrategiesBlock/PayoffStrategiesBlock.d.ts +1 -1
  52. package/dist/insights-v2/actionBlocks/PayoffStrategiesBlock/PayoffStrategiesBlock.es.js +19 -16
  53. package/dist/insights-v2/actionBlocks/PayoffStrategiesBlock/PayoffStrategiesBlock.es.js.map +1 -1
  54. package/dist/insights-v2/actionBlocks/PayoffStrategiesBlock/PayoffStrategiesContent.d.ts +2 -2
  55. package/dist/insights-v2/actionBlocks/PayoffStrategiesBlock/PayoffStrategiesContent.es.js +212 -166
  56. package/dist/insights-v2/actionBlocks/PayoffStrategiesBlock/PayoffStrategiesContent.es.js.map +1 -1
  57. package/dist/insights-v2/actionBlocks/PayoffStrategiesBlock/StepIcon.d.ts +4 -0
  58. package/dist/insights-v2/actionBlocks/PayoffStrategiesBlock/StepIcon.es.js +24 -0
  59. package/dist/insights-v2/actionBlocks/PayoffStrategiesBlock/StepIcon.es.js.map +1 -0
  60. package/dist/insights-v2/actionBlocks/PayoffStrategiesBlock/layout.d.ts +6 -5
  61. package/dist/insights-v2/actionBlocks/PayoffStrategiesBlock/layout.es.js +38 -38
  62. package/dist/insights-v2/actionBlocks/PayoffStrategiesBlock/layout.es.js.map +1 -1
  63. package/dist/insights-v2/actionBlocks/SubscriptionStatusModalBlock.es.js +1 -1
  64. package/dist/insights-v2/actionBlocks/TopMerchantsBlock/TopMerchantsBlock.d.ts +1 -5
  65. package/dist/insights-v2/actionBlocks/TopMerchantsBlock/TopMerchantsBlock.es.js +37 -36
  66. package/dist/insights-v2/actionBlocks/TopMerchantsBlock/TopMerchantsBlock.es.js.map +1 -1
  67. package/dist/insights-v2/actionBlocks/TransactionDetailsBlock/layout.d.ts +9 -11
  68. package/dist/insights-v2/actionBlocks/TransactionDetailsBlock/layout.es.js +12 -6
  69. package/dist/insights-v2/actionBlocks/TransactionDetailsBlock/layout.es.js.map +1 -1
  70. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionDrillDown.es.js +46 -40
  71. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionDrillDown.es.js.map +1 -1
  72. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionHistoryBlock.es.js +141 -126
  73. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionHistoryBlock.es.js.map +1 -1
  74. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/layout.d.ts +8 -1
  75. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/layout.es.js +243 -200
  76. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/layout.es.js.map +1 -1
  77. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/utils.d.ts +2 -0
  78. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/utils.es.js.map +1 -1
  79. package/dist/insights-v2/actionBlocks/TransactionListBlock/TransactionListBlock.es.js +54 -53
  80. package/dist/insights-v2/actionBlocks/TransactionListBlock/TransactionListBlock.es.js.map +1 -1
  81. package/dist/insights-v2/actionBlocks/TransactionListBlock/TransactionListHeaderIconTile.d.ts +6 -1
  82. package/dist/insights-v2/actionBlocks/TransactionListBlock/TransactionListHeaderIconTile.es.js +14 -13
  83. package/dist/insights-v2/actionBlocks/TransactionListBlock/TransactionListHeaderIconTile.es.js.map +1 -1
  84. package/dist/insights-v2/actionBlocks/TransactionListBlock/TransactionListSummaryCard.d.ts +4 -3
  85. package/dist/insights-v2/actionBlocks/TransactionListBlock/TransactionListSummaryCard.es.js +24 -21
  86. package/dist/insights-v2/actionBlocks/TransactionListBlock/TransactionListSummaryCard.es.js.map +1 -1
  87. package/dist/insights-v2/actionBlocks/TransactionListBlock/layout.d.ts +14 -4
  88. package/dist/insights-v2/actionBlocks/TransactionListBlock/layout.es.js +79 -67
  89. package/dist/insights-v2/actionBlocks/TransactionListBlock/layout.es.js.map +1 -1
  90. package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/DonutChart.d.ts +3 -1
  91. package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/DonutChart.es.js +48 -32
  92. package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/DonutChart.es.js.map +1 -1
  93. package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/DonutChartBlock.es.js +19 -14
  94. package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/DonutChartBlock.es.js.map +1 -1
  95. package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/layout.d.ts +4 -0
  96. package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/layout.es.js +19 -15
  97. package/dist/insights-v2/blocks/ChartBlocks/DonutChartBlock/layout.es.js.map +1 -1
  98. package/dist/insights-v2/blocks/ChartBlocks/DoubleBarChartBlock/DoubleBarChartBlock.es.js +26 -19
  99. package/dist/insights-v2/blocks/ChartBlocks/DoubleBarChartBlock/DoubleBarChartBlock.es.js.map +1 -1
  100. package/dist/insights-v2/blocks/ChartBlocks/DoubleBarChartBlock/layout.d.ts +1 -0
  101. package/dist/insights-v2/blocks/ChartBlocks/DoubleBarChartBlock/layout.es.js +17 -21
  102. package/dist/insights-v2/blocks/ChartBlocks/DoubleBarChartBlock/layout.es.js.map +1 -1
  103. package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/StepChartBlock.d.ts +1 -1
  104. package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/StepChartBlock.es.js +11 -11
  105. package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/StepChartBlock.es.js.map +1 -1
  106. package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/index.es.js +15 -11
  107. package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/index.es.js.map +1 -1
  108. package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/layout.d.ts +20 -0
  109. package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/layout.es.js +21 -0
  110. package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/layout.es.js.map +1 -0
  111. package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/variants/MilestoneProgress.d.ts +2 -4
  112. package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/variants/MilestoneProgress.es.js +78 -82
  113. package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/variants/MilestoneProgress.es.js.map +1 -1
  114. package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/variants/WithText.d.ts +10 -2
  115. package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/variants/WithText.es.js +115 -54
  116. package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/variants/WithText.es.js.map +1 -1
  117. package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/AccountBlock.d.ts +1 -1
  118. package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/AccountBlock.es.js +37 -36
  119. package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/AccountBlock.es.js.map +1 -1
  120. package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/layout.es.js +27 -22
  121. package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/layout.es.js.map +1 -1
  122. package/dist/insights-v2/blocks/ComponentBlocks/BudgetBlock/BudgetBlock.es.js +8 -8
  123. package/dist/insights-v2/blocks/ComponentBlocks/CompactDirectDepositBlock/CompactDirectDepositBlock.d.ts +7 -0
  124. package/dist/insights-v2/blocks/ComponentBlocks/CompactDirectDepositBlock/CompactDirectDepositBlock.es.js +46 -0
  125. package/dist/insights-v2/blocks/ComponentBlocks/CompactDirectDepositBlock/CompactDirectDepositBlock.es.js.map +1 -0
  126. package/dist/insights-v2/blocks/ComponentBlocks/CompactDirectDepositBlock/index.d.ts +3 -0
  127. package/dist/insights-v2/blocks/ComponentBlocks/CompactDirectDepositBlock/layout.d.ts +13 -0
  128. package/dist/insights-v2/blocks/ComponentBlocks/CompactDirectDepositBlock/layout.es.js +22 -0
  129. package/dist/insights-v2/blocks/ComponentBlocks/CompactDirectDepositBlock/layout.es.js.map +1 -0
  130. package/dist/insights-v2/blocks/ComponentBlocks/DetailedAccountBlock/DetailedAccountBlock.es.js +29 -21
  131. package/dist/insights-v2/blocks/ComponentBlocks/DetailedAccountBlock/DetailedAccountBlock.es.js.map +1 -1
  132. package/dist/insights-v2/blocks/ComponentBlocks/DetailedAccountBlock/layout.d.ts +0 -2
  133. package/dist/insights-v2/blocks/ComponentBlocks/DetailedAccountBlock/layout.es.js +17 -21
  134. package/dist/insights-v2/blocks/ComponentBlocks/DetailedAccountBlock/layout.es.js.map +1 -1
  135. package/dist/insights-v2/blocks/ComponentBlocks/FeeChargedBlock/FeeChargedBlock.es.js +5 -6
  136. package/dist/insights-v2/blocks/ComponentBlocks/FeeChargedBlock/FeeChargedBlock.es.js.map +1 -1
  137. package/dist/insights-v2/blocks/ComponentBlocks/FeedbackBlock/FeedbackBlock.d.ts +3 -7
  138. package/dist/insights-v2/blocks/ComponentBlocks/FeedbackBlock/FeedbackBlock.es.js +120 -306
  139. package/dist/insights-v2/blocks/ComponentBlocks/FeedbackBlock/FeedbackBlock.es.js.map +1 -1
  140. package/dist/insights-v2/blocks/ComponentBlocks/FeedbackBlock/RatingScale.d.ts +17 -0
  141. package/dist/insights-v2/blocks/ComponentBlocks/FeedbackBlock/RatingScale.es.js +93 -0
  142. package/dist/insights-v2/blocks/ComponentBlocks/FeedbackBlock/RatingScale.es.js.map +1 -0
  143. package/dist/insights-v2/blocks/ComponentBlocks/FeedbackBlock/StepBar.d.ts +5 -0
  144. package/dist/insights-v2/blocks/ComponentBlocks/FeedbackBlock/StepBar.es.js +21 -0
  145. package/dist/insights-v2/blocks/ComponentBlocks/FeedbackBlock/StepBar.es.js.map +1 -0
  146. package/dist/insights-v2/blocks/ComponentBlocks/FeedbackBlock/SurveyResult.d.ts +18 -0
  147. package/dist/insights-v2/blocks/ComponentBlocks/FeedbackBlock/SurveyResult.es.js +71 -0
  148. package/dist/insights-v2/blocks/ComponentBlocks/FeedbackBlock/SurveyResult.es.js.map +1 -0
  149. package/dist/insights-v2/blocks/ComponentBlocks/FeedbackBlock/survey.d.ts +82 -8
  150. package/dist/insights-v2/blocks/ComponentBlocks/FeedbackBlock/survey.es.js +66 -15
  151. package/dist/insights-v2/blocks/ComponentBlocks/FeedbackBlock/survey.es.js.map +1 -1
  152. package/dist/insights-v2/blocks/ComponentBlocks/MerchantBlock/MerchantBlock.es.js +46 -63
  153. package/dist/insights-v2/blocks/ComponentBlocks/MerchantBlock/MerchantBlock.es.js.map +1 -1
  154. package/dist/insights-v2/blocks/ComponentBlocks/MerchantBlock/layout.d.ts +3 -3
  155. package/dist/insights-v2/blocks/ComponentBlocks/MerchantBlock/layout.es.js +44 -53
  156. package/dist/insights-v2/blocks/ComponentBlocks/MerchantBlock/layout.es.js.map +1 -1
  157. package/dist/insights-v2/blocks/ComponentBlocks/QuizBlock/QuizBlock.d.ts +1 -1
  158. package/dist/insights-v2/blocks/ComponentBlocks/QuizBlock/QuizBlock.es.js +30 -31
  159. package/dist/insights-v2/blocks/ComponentBlocks/QuizBlock/QuizBlock.es.js.map +1 -1
  160. package/dist/insights-v2/blocks/ComponentBlocks/SaveExtraBlock/SaveExtraBlock.es.js +25 -20
  161. package/dist/insights-v2/blocks/ComponentBlocks/SaveExtraBlock/SaveExtraBlock.es.js.map +1 -1
  162. package/dist/insights-v2/blocks/ComponentBlocks/SaveExtraBlock/layout.d.ts +22 -0
  163. package/dist/insights-v2/blocks/ComponentBlocks/SaveExtraBlock/layout.es.js +24 -0
  164. package/dist/insights-v2/blocks/ComponentBlocks/SaveExtraBlock/layout.es.js.map +1 -0
  165. package/dist/insights-v2/blocks/ComponentBlocks/StrategiesBlock/StrategiesBlock.d.ts +7 -0
  166. package/dist/insights-v2/blocks/ComponentBlocks/StrategiesBlock/StrategiesBlock.es.js +89 -0
  167. package/dist/insights-v2/blocks/ComponentBlocks/StrategiesBlock/StrategiesBlock.es.js.map +1 -0
  168. package/dist/insights-v2/blocks/ComponentBlocks/StrategiesBlock/index.d.ts +1 -0
  169. package/dist/insights-v2/blocks/ComponentBlocks/StrategiesBlock/layout.d.ts +43 -0
  170. package/dist/insights-v2/blocks/ComponentBlocks/StrategiesBlock/layout.es.js +28 -0
  171. package/dist/insights-v2/blocks/ComponentBlocks/StrategiesBlock/layout.es.js.map +1 -0
  172. package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/TransactionBlock.es.js +54 -53
  173. package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/TransactionBlock.es.js.map +1 -1
  174. package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/layout.d.ts +7 -3
  175. package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/layout.es.js +20 -11
  176. package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/layout.es.js.map +1 -1
  177. package/dist/insights-v2/blocks/ComponentBlocks/WeeklySmallPurchasesBlock/WeeklySmallPurchasesBlock.es.js +29 -28
  178. package/dist/insights-v2/blocks/ComponentBlocks/WeeklySmallPurchasesBlock/WeeklySmallPurchasesBlock.es.js.map +1 -1
  179. package/dist/insights-v2/blocks/ComponentBlocks/index.d.ts +2 -0
  180. package/dist/insights-v2/blocks/ImageBlocks/ImageBlock.es.js +6 -5
  181. package/dist/insights-v2/blocks/ImageBlocks/ImageBlock.es.js.map +1 -1
  182. package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/images/FederalBankHoliday.es.js +117 -71
  183. package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/images/FederalBankHoliday.es.js.map +1 -1
  184. package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/layout.d.ts +1 -1
  185. package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/layout.es.js +10 -7
  186. package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/layout.es.js.map +1 -1
  187. package/dist/insights-v2/components/AccountHeroCard.d.ts +3 -1
  188. package/dist/insights-v2/components/AccountHeroCard.es.js.map +1 -1
  189. package/dist/insights-v2/components/BaseLayout.d.ts +3 -1
  190. package/dist/insights-v2/components/BaseLayout.es.js +134 -119
  191. package/dist/insights-v2/components/BaseLayout.es.js.map +1 -1
  192. package/dist/insights-v2/components/CompactDirectDepositCard.d.ts +28 -0
  193. package/dist/insights-v2/components/CompactDirectDepositCard.es.js +78 -0
  194. package/dist/insights-v2/components/CompactDirectDepositCard.es.js.map +1 -0
  195. package/dist/insights-v2/components/CompactInsightCard.es.js +122 -118
  196. package/dist/insights-v2/components/CompactInsightCard.es.js.map +1 -1
  197. package/dist/insights-v2/components/DirectDepositCard.d.ts +6 -1
  198. package/dist/insights-v2/components/DirectDepositCard.es.js +24 -22
  199. package/dist/insights-v2/components/DirectDepositCard.es.js.map +1 -1
  200. package/dist/insights-v2/components/LoadingCard.es.js +13 -9
  201. package/dist/insights-v2/components/LoadingCard.es.js.map +1 -1
  202. package/dist/insights-v2/components/LogoFromGuid.d.ts +1 -1
  203. package/dist/insights-v2/components/LogoFromGuid.es.js.map +1 -1
  204. package/dist/insights-v2/components/MerchantHighlightCard.es.js +4 -4
  205. package/dist/insights-v2/components/SaveAnExtraCard.d.ts +4 -1
  206. package/dist/insights-v2/components/SaveAnExtraCard.es.js +32 -20
  207. package/dist/insights-v2/components/SaveAnExtraCard.es.js.map +1 -1
  208. package/dist/insights-v2/components/SubTabs.d.ts +2 -1
  209. package/dist/insights-v2/components/SubTabs.es.js +29 -24
  210. package/dist/insights-v2/components/SubTabs.es.js.map +1 -1
  211. package/dist/insights-v2/components/TransactionListCard.d.ts +3 -1
  212. package/dist/insights-v2/components/TransactionListCard.es.js +39 -37
  213. package/dist/insights-v2/components/TransactionListCard.es.js.map +1 -1
  214. package/dist/insights-v2/components/TransferLogoCard.es.js +1 -0
  215. package/dist/insights-v2/components/TransferLogoCard.es.js.map +1 -1
  216. package/dist/insights-v2/components/UpcomingBillCard.es.js +39 -35
  217. package/dist/insights-v2/components/UpcomingBillCard.es.js.map +1 -1
  218. package/dist/insights-v2/components/celebrationGradients.d.ts +17 -8
  219. package/dist/insights-v2/components/celebrationGradients.es.js +14 -14
  220. package/dist/insights-v2/components/celebrationGradients.es.js.map +1 -1
  221. package/dist/insights-v2/components/chartblocks/ChartLegend.es.js +16 -10
  222. package/dist/insights-v2/components/chartblocks/ChartLegend.es.js.map +1 -1
  223. package/dist/insights-v2/components/chartblocks/DoubleBarChart.d.ts +10 -4
  224. package/dist/insights-v2/components/chartblocks/DoubleBarChart.es.js +62 -61
  225. package/dist/insights-v2/components/chartblocks/DoubleBarChart.es.js.map +1 -1
  226. package/dist/insights-v2/components/chartblocks/EmptyBarChart.es.js +13 -6
  227. package/dist/insights-v2/components/chartblocks/EmptyBarChart.es.js.map +1 -1
  228. package/dist/insights-v2/components/shared/images/DesignateEmergencySavings.es.js +2 -3
  229. package/dist/insights-v2/components/shared/images/DesignateEmergencySavings.es.js.map +1 -1
  230. package/dist/insights-v2/components/statusIcon.d.ts +2 -1
  231. package/dist/insights-v2/components/statusIcon.es.js +10 -8
  232. package/dist/insights-v2/components/statusIcon.es.js.map +1 -1
  233. package/dist/insights-v2/ctaActions/ctaConfig.es.js +19 -17
  234. package/dist/insights-v2/ctaActions/ctaConfig.es.js.map +1 -1
  235. package/dist/insights-v2/ctaActions/ctaHandlers.d.ts +5 -1
  236. package/dist/insights-v2/ctaActions/ctaHandlers.es.js +71 -54
  237. package/dist/insights-v2/ctaActions/ctaHandlers.es.js.map +1 -1
  238. package/dist/insights-v2/ctaActions/ctaPostMessages.es.js +41 -24
  239. package/dist/insights-v2/ctaActions/ctaPostMessages.es.js.map +1 -1
  240. package/dist/insights-v2/ctaActions/feedbackSurvey.d.ts +9 -0
  241. package/dist/insights-v2/ctaActions/feedbackSurvey.es.js +51 -0
  242. package/dist/insights-v2/ctaActions/feedbackSurvey.es.js.map +1 -0
  243. package/dist/insights-v2/ctaActions/runCtaAction.es.js +36 -35
  244. package/dist/insights-v2/ctaActions/runCtaAction.es.js.map +1 -1
  245. package/dist/insights-v2/ctaActions/types.d.ts +7 -0
  246. package/dist/insights-v2/index.es.js +126 -120
  247. package/dist/insights-v2/mappings/actionBlocksKey.d.ts +1 -1
  248. package/dist/insights-v2/mappings/actionBlocksKey.es.js +1 -1
  249. package/dist/insights-v2/mappings/actionBlocksKey.es.js.map +1 -1
  250. package/dist/insights-v2/mappings/blocks.es.js +126 -122
  251. package/dist/insights-v2/mappings/blocks.es.js.map +1 -1
  252. package/dist/microinsights/MicroCardTemplate.es.js +1 -1
  253. package/dist/microinsights/MicroCardTemplate.es.js.map +1 -1
  254. package/dist/microinsights/cards/InsightCard.es.js +53 -53
  255. package/dist/microinsights/cards/InsightCard.es.js.map +1 -1
  256. package/package.json +1 -1
  257. package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/index.d.ts +0 -13
  258. package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/images/DesignateEmergencySavingsAccount.es.js +0 -296
  259. package/dist/insights-v2/blocks/ImageBlocks/SVGImageBlock/images/DesignateEmergencySavingsAccount.es.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"CompactInsightCard.es.js","names":[],"sources":["../../../src/insights-v2/components/CompactInsightCard.tsx"],"sourcesContent":["import type { KeyboardEvent, MouseEvent } from 'react'\n\nimport { useTheme } from '@mui/material/styles'\n\nimport Box from '@mui/material/Box'\nimport Button from '@mui/material/Button'\nimport Card from '@mui/material/Card'\nimport Stack from '@mui/material/Stack'\n\nimport { Icon } from '@mxenabled/mx-icons'\nimport { P, Text } from '@mxenabled/mxui'\n\nimport { useGlobalStore, useInsightsV2Store } from '../../common'\nimport { TinyBarChart } from '../../common/components/TinyBarChart'\nimport { slot } from '../../core'\nimport type {\n Beat,\n DataSeries,\n InsightsPayload,\n InstanceSlotData,\n InstanceSlotRow,\n LogoRef,\n PrimaryCTA,\n} from '../../core'\nimport type { ActionDrawerTrigger } from '../../core/stores'\nimport type { AccountSwitchBlockV2Data } from '../../core/types/InsightsInstanceSlotData'\nimport { getCategoryColor } from '../../core/utils/CategoryUtil'\nimport { CURRENCY_FORMAT, formatCurrency } from '../../core/utils/NumberFormatting'\nimport {\n BAR_ARIA_LABEL,\n buildChartData,\n buildDataSeries,\n} from '../blocks/ChartBlocks/BarchartBlock/utils'\nimport DonutChartV2 from '../blocks/ChartBlocks/DonutChartBlock/DonutChart'\nimport { donutChartVariant } from '../blocks/ChartBlocks/DonutChartBlock/layout'\nimport { getDonutSegments } from '../blocks/ChartBlocks/DonutChartBlock/utils'\nimport { formatValueByType } from '../CommonUtils'\nimport { ActionBlockLayer } from '../actionBlocks/ActionBlockLayer'\nimport { createVariantBlock } from '../blocks/createVariantBlock'\nimport { postCtaMessage } from '../ctaActions'\nimport { asLogoRef, asNonEmptyText, asNumber } from '../blocks/slotReaders'\nimport BadgedTile from './BadgedTile'\nimport InsightOptionsMenu from './InsightOptionsMenu'\nimport LogoFromGuid from './LogoFromGuid'\nimport { ReactComponent as FeeDetectedIllustration } from './shared/images/FeeDetected.svg'\nimport { ThemedSVGImage } from './chartblocks/ThemedSVGImage'\nimport StatusBadge from './StatusBadge'\n\nconst DESCRIPTION_MAX_LINES = 2\n\n/** Figma 1941:111897: the tile the logo fills is 44px (rows are 32, the notification row 33). */\nconst ICON_SIZE = 44\n\ninterface InsightVisualProps {\n /** The slot's `logo`, when ditto's variant declares and fills one. */\n logo?: LogoRef | null\n /** The slot's whole `data`, for a visual drawn from more than the logo (`category_color`, `linked_logos`). */\n data?: InstanceSlotData\n /** The envelope's template, for a beat's own badge on `linked_logos`. */\n template?: string\n}\n\n// Figma 1943:219189: 36px logos at opposite corners of a 75×74 box, the badge and rings centred.\nconst LINKED_LOGO_SIZE = 36\nconst LINKED_BOX_WIDTH = 75\nconst LINKED_BOX_HEIGHT = 74\n\nconst CENTRED = {\n left: '50%',\n position: 'absolute',\n top: '50%',\n transform: 'translate(-50%, -50%)',\n} as const\n\n/** Figma 222:33404 (Embedded | Bill Amount Not Standard) shows the latest three bars. */\nconst BAR_CHART_BAR_COUNT = 3\n\nconst EMBEDDED_BAR_CHART_HEIGHT = 54\nconst EMBEDDED_BAR_CHART_WIDTH = 75\n\n/** The slot's logo, or the neutral insight glyph when the slot carries none. */\nconst LogoOrFallback = ({ logo }: InsightVisualProps) =>\n logo ? (\n <LogoFromGuid logo={logo} size={ICON_SIZE} />\n ) : (\n <Box\n data-testid=\"compact-insight-card-fallback-icon\"\n sx={{\n alignItems: 'center',\n bgcolor: 'primary.lighter',\n display: 'flex',\n height: ICON_SIZE,\n justifyContent: 'center',\n width: ICON_SIZE,\n }}\n >\n <Icon color=\"primary\" fill={true} name=\"lightbulb\" size={24} />\n </Box>\n )\n\n/** Micro, and any variant not registered below: the logo alone. */\nconst PlainVisual = ({ logo }: InsightVisualProps) => (\n <BadgedTile center={<LogoOrFallback logo={logo} />} size={ICON_SIZE} sx={{ flexShrink: 0 }} />\n)\n\n/** ditto `with_warning_badge`: the logo badged with a status glyph (Figma 1941:111897). */\nconst WarningBadgeVisual = ({ logo }: InsightVisualProps) => (\n <BadgedTile\n center={<LogoOrFallback logo={logo} />}\n size={ICON_SIZE}\n sx={{ flexShrink: 0 }}\n topRight={<StatusBadge tone=\"warning\" />}\n />\n)\n\nconst STACKED_LOGO_SIZE = 24\n\n/** ditto `stacked_logos`: the row logo twice, plus an error badge. The copy is `aria-hidden`, so the logo is named once. */\nconst StackedLogosVisual = ({ logo }: InsightVisualProps) => (\n <BadgedTile\n bottomLeft={\n logo ? (\n <Box\n aria-hidden={true}\n sx={{\n borderRadius: '6px',\n display: 'flex',\n outline: '2px solid',\n outlineColor: 'background.paper',\n overflow: 'hidden',\n }}\n >\n <LogoFromGuid logo={{ ...logo, alt: undefined }} size={STACKED_LOGO_SIZE} />\n </Box>\n ) : undefined\n }\n center={<LogoOrFallback logo={logo} />}\n size={ICON_SIZE}\n sx={{ flexShrink: 0 }}\n topRight={<StatusBadge tone=\"error\" />}\n />\n)\n\n/**\n * ditto `with_illustration`: artwork in place of the logo tile (Fee Detected's search illustration).\n * A single SVG themed at runtime by `ThemedSVGImage`: its `brand300` elements are recolored to the\n * theme's `primary.main` (so it follows dark mode), while `fill=\"white\"` areas stay white. The\n * slot's `logo` is deliberately unused: the illustration replaces the tile.\n */\nconst IllustrationVisual = () => {\n return (\n <ThemedSVGImage\n divProps={{ style: { flexShrink: 0, lineHeight: 0, width: 'max-content' } }}\n image={FeeDetectedIllustration}\n />\n )\n}\n\nconst SWAP_BADGE_SIZE = 24\n\nconst LinkBadge = () => (\n <Box\n aria-hidden={true}\n data-testid=\"linked-logos-badge\"\n sx={{\n ...CENTRED,\n alignItems: 'center',\n bgcolor: 'primary.main',\n border: '2px solid',\n borderColor: 'primary.contrastText',\n borderRadius: '12px',\n display: 'flex',\n justifyContent: 'center',\n p: 2,\n zIndex: 1,\n }}\n >\n <Icon name=\"link\" size={16} sx={{ color: 'primary.contrastText' }} />\n </Box>\n)\n\n/**\n * Switch Direct Deposit (Figma 1941:167601): the outlined `swap_vertical_circle`, turned horizontal,\n * over a contrast disc: a primary ring and arrows on white. Drawn 1.2× so its circle fills 24px.\n */\nconst SwapBadge = () => (\n <Box\n aria-hidden={true}\n data-testid=\"linked-logos-badge\"\n sx={{\n ...CENTRED,\n alignItems: 'center',\n bgcolor: 'primary.contrastText',\n borderRadius: '50%',\n display: 'flex',\n height: SWAP_BADGE_SIZE,\n justifyContent: 'center',\n overflow: 'hidden',\n width: SWAP_BADGE_SIZE,\n zIndex: 1,\n }}\n >\n <Icon\n name=\"swap_vertical_circle\"\n size={SWAP_BADGE_SIZE * 1.2}\n sx={{ color: 'primary.main', flexShrink: 0, transform: 'rotate(-90deg)' }}\n />\n </Box>\n)\n\n/**\n * ditto `linked_logos` (Figma 1943:219189, Embedded | Discovered Accounts): the two institutions at\n * opposite corners of a 75×74 box — `from_logo` top-left, `to_logo` bottom-right — meeting on the\n * diagonal, with a badge over two rings at the centre (Switch Direct Deposit: the swap badge on an\n * outlined inner ring). The rings and badge are decorative (`aria-hidden`); each logo's accessible\n * name is its `alt`.\n */\nconst LinkedLogosVisual = ({ data, template }: InsightVisualProps) => {\n const { from_logo, to_logo } = (data ?? {}) as AccountSwitchBlockV2Data\n const isSwap = template === 'SwitchDirectDeposit'\n\n return (\n <Box\n sx={{\n flexShrink: 0,\n height: LINKED_BOX_HEIGHT,\n position: 'relative',\n width: LINKED_BOX_WIDTH,\n }}\n >\n <Box\n aria-hidden={true}\n data-testid=\"linked-logos-ring\"\n sx={{\n ...CENTRED,\n borderRadius: '50%',\n height: 36,\n width: 36,\n ...(isSwap\n ? { border: '2px solid', borderColor: 'primary.light' }\n : { bgcolor: 'primary.light' }),\n }}\n />\n <Box\n aria-hidden={true}\n data-testid=\"linked-logos-ring\"\n sx={{\n ...CENTRED,\n border: '1px solid',\n borderColor: 'divider',\n borderRadius: '50%',\n height: 48,\n width: 48,\n }}\n />\n <Box sx={{ borderRadius: '4px', left: 0, overflow: 'hidden', position: 'absolute', top: 0 }}>\n <LogoFromGuid logo={from_logo} size={LINKED_LOGO_SIZE} />\n </Box>\n <Box\n sx={{ borderRadius: '4px', bottom: 0, overflow: 'hidden', position: 'absolute', right: 0 }}\n >\n <LogoFromGuid logo={to_logo} size={LINKED_LOGO_SIZE} />\n </Box>\n {isSwap ? <SwapBadge /> : <LinkBadge />}\n </Box>\n )\n}\n\n/**\n * ditto `category_color`: a tiny bar chart of the latest bars in place of the logo tile, tinted by\n * the slot's category, the newest bar solid (Figma 222:33404). Draws nothing without a series.\n */\nconst BarChartVisual = ({ data }: InsightVisualProps) => {\n const series = buildDataSeries(slot<DataSeries>(data, 'series'))\n if (!series.length) return null\n\n const categoryGuid = slot<string>(data, 'category_guid')\n const bars = buildChartData(series, BAR_ARIA_LABEL).slice(-BAR_CHART_BAR_COUNT)\n\n return (\n <Box data-testid=\"compact-insight-card-bar-chart\" sx={{ flexShrink: 0 }}>\n <TinyBarChart\n color={(theme) =>\n categoryGuid ? getCategoryColor(categoryGuid, theme) : theme.palette.primary.main\n }\n data={bars}\n height={EMBEDDED_BAR_CHART_HEIGHT}\n width={EMBEDDED_BAR_CHART_WIDTH}\n />\n </Box>\n )\n}\n\n/**\n * ditto `with_donut`: the `credit_limit` donut, small, with no legend; another beat needs its own variant.\n * Captioned by `main.compact_label` only (\"Remains\"), never the full donut's `main.label`.\n */\nconst DonutVisual = ({ data }: InsightVisualProps) => {\n const theme = useTheme()\n const main = slot<{ compact_label?: unknown; value?: unknown; value_type?: unknown }>(\n data,\n 'main',\n )\n const legends = slot<{ value?: unknown }[]>(data, 'legends')\n const centre = asNumber(main?.value)\n const values = (Array.isArray(legends) ? legends : []).map((legend) => asNumber(legend?.value))\n if (centre === undefined || values.length !== 2 || values.some((v) => v === undefined))\n return null\n\n const { colors, arcs } = getDonutSegments(\n donutChartVariant.CreditLimit,\n {},\n values.map((value) => ({ value: value as number })),\n theme,\n )\n const valueType = typeof main?.value_type === 'string' ? main.value_type : 'amount'\n\n return (\n <Box data-testid=\"compact-insight-card-donut\" sx={{ flexShrink: 0 }}>\n <DonutChartV2\n centerLabel={asNonEmptyText(main?.compact_label)}\n centerValue={formatValueByType(centre, valueType, CURRENCY_FORMAT.whole)}\n compact={true}\n data={arcs.map((value, index) => ({ color: colors[index], value }))}\n />\n </Box>\n )\n}\n\nconst COMPARISON_WIDTH = 75\nconst COMPARISON_HEIGHT = 50\n\nconst asComparisonBar = (row: InstanceSlotRow | undefined) => {\n const label = asNonEmptyText(row?.primary_text)\n const value = asNumber(row?.amount)\n if (label === undefined || value === undefined) return undefined\n const formattedAmount = formatCurrency(value, CURRENCY_FORMAT.cents)\n return { ariaLabel: `${label}: ${formattedAmount}`, formattedAmount, label, value }\n}\n\n/**\n * ditto `compact_comparison` (Subscription Price Increase, Figma 1286:25608): the previous and new amounts as two labelled bars,\n * the new one solid, in the full card's progress-bar colour. Draws nothing without two distinct labelled rows.\n */\nconst ComparisonVisual = ({ data }: InsightVisualProps) => {\n const series = slot<InstanceSlotRow[]>(data, 'compact_series')\n const [previous, latest] = (Array.isArray(series) ? series.slice(0, 2) : []).map(asComparisonBar)\n // Equal labels share one band on the chart's x axis, so the bars would overlap.\n if (!previous || !latest || previous.label === latest.label) return null\n const bars = [previous, latest]\n\n return (\n <Box data-testid=\"compact-insight-card-comparison\" sx={{ flexShrink: 0 }}>\n <TinyBarChart\n color={(theme) => theme.palette.warning.main}\n data={bars}\n height={COMPARISON_HEIGHT}\n width={COMPARISON_WIDTH}\n />\n </Box>\n )\n}\n\n/**\n * The card's right-hand visual, one component per ditto layout variant.\n *\n * A variant names a rendering *shape*, not an insight or a surface — `with_header` already serves\n * both Large Transaction and Fee Detected — so an insight wanting the badged logo reuses\n * `with_warning_badge`. Only a genuinely different visual registers a new entry, and existing ones\n * are never touched.\n *\n * `minimal` draws the plain logo and is registered explicitly even though it matches the fallback:\n * micro and notification resolve it on every render, and an unregistered variant warns. The\n * fallback is for variants we genuinely do not know.\n */\nconst InsightVisual = createVariantBlock<InsightVisualProps>({\n variants: {\n category_color: BarChartVisual,\n compact_comparison: ComparisonVisual,\n linked_logos: LinkedLogosVisual,\n minimal: PlainVisual,\n // account_block's logo-only compact card (its `minimal` draws the `icon`).\n minimal_logo: PlainVisual,\n stacked_logos: StackedLogosVisual,\n with_donut: DonutVisual,\n with_illustration: IllustrationVisual,\n with_warning_badge: WarningBadgeVisual,\n },\n fallback: PlainVisual,\n name: 'InsightVisual',\n})\n\n/**\n * Beats whose embedded CTA the card reads from its own envelope key and opens in this card's\n * `ActionBlockLayer`, as a bar click does on the full card. The trigger names that key, so the layer\n * resolves the same CTA. Without a trigger the link posts its host message instead (Switch Direct\n * Deposit's op_1: Atomic runs only in pulse). Every other beat keeps `primary_cta` and hands it to\n * the host's `onCtaClick` (e.g. `contact_support_block`). A new beat adds its template here.\n * `boldCopy` bolds the description's `.bold-copy` spans, as Figma draws them; off for every other beat.\n */\nconst BEAT_CTA_CONFIG: Record<\n string,\n { key: 'primary_cta' | 'in_description_cta'; trigger?: ActionDrawerTrigger; boldCopy?: boolean }\n> = {\n BillAmountNotStandard: { key: 'in_description_cta', trigger: 'inDescriptionCta' },\n CreditCardCloseToLimit: {\n key: 'in_description_cta',\n trigger: 'inDescriptionCta',\n boldCopy: true,\n },\n ConnectDiscoveredAccountsV2: { key: 'in_description_cta', trigger: 'inDescriptionCta' },\n DuplicatePaymentV2: { key: 'in_description_cta', trigger: 'inDescriptionCta' },\n SwitchDirectDeposit: { key: 'in_description_cta' },\n}\n\nexport interface CompactInsightCardProps {\n /** A `micro` or `embedded` envelope. */\n payload: InsightsPayload\n /** The envelope's beat; when given, the card mounts its `ActionBlockLayer` for CTA drawers. */\n beat?: Beat\n /**\n * Makes the whole card the tap target. What a tap does is the host's decision (post to the\n * host app, open a drawer, …); the card never opens anything itself. Omit for a static card.\n */\n onTap?: () => void\n /** Receives the primary CTA when tapped. The card does not resolve the CTA's block itself. */\n onCtaClick?: (cta: PrimaryCTA) => void\n /**\n * Renders the CTA disabled — label shown, `aria-disabled`, not tappable — for a host that cannot\n * honour it (e.g. `contact_support_block` when the client's `enable_support_requests` is off).\n */\n isCtaDisabled?: boolean\n}\n\nconst stopPropagation = (event: MouseEvent) => event.stopPropagation()\n\n/**\n * The one compact renderer the micro and embedded envelopes share (`insights_v2.2.md` §8.3).\n *\n * Figma 1941:111897 (Embedded | Large Transaction): a title row with the overflow slot, the HTML\n * description with the primary CTA under it, and on the right the slot's `logo` in a\n * `<BadgedTile>`. Under ditto's `with_warning_badge` variant the tile takes a status badge; under\n * `minimal` it draws the logo alone. The card lays out from the envelope alone and never reads\n * `widget_type`.\n *\n * The icon falls back to the neutral insight glyph **here**, not in `LogoFromGuid`, when the slot\n * carries no logo. The `pill` on the same envelope is the transaction row's, not the card's.\n */\nconst CompactInsightCard = ({\n beat,\n isCtaDisabled = false,\n onCtaClick,\n onTap,\n payload,\n}: CompactInsightCardProps) => {\n const stores = useGlobalStore()\n const { openActionDrawer } = useInsightsV2Store()\n const { description, instance_slot, primary_cta, title } = payload\n const beatCta = BEAT_CTA_CONFIG[payload.template ?? '']\n const cta = beatCta ? payload[beatCta.key] : primary_cta\n const message = payload.in_description_cta?.post_message_metadata\n // A link that posts needs its beat and message; without them it draws nothing.\n const canAct = !beatCta || !!beatCta.trigger || (!!beat && !!message)\n // Reduced variants (`minimal`, `with_warning_badge`) declare a bare `logo` slot.\n const rowLogo = asLogoRef(slot(instance_slot.data, 'logo'))\n\n const handleCtaClick = (event: MouseEvent<HTMLButtonElement>) => {\n event.stopPropagation()\n if (isCtaDisabled || !cta) return\n\n if (beatCta) {\n if (beat && beatCta.trigger) openActionDrawer({ guid: beat.guid, trigger: beatCta.trigger })\n else if (beat && message) {\n const { action, ...extras } = message\n postCtaMessage({ beat, stores }, { action, payload: extras })\n }\n return\n }\n if (primary_cta) onCtaClick?.(primary_cta)\n }\n\n const handleKeyDown = (event: KeyboardEvent<HTMLDivElement>) => {\n // Only the card itself: Enter on the CTA button is the button's own click.\n if (event.target !== event.currentTarget) return\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault()\n onTap?.()\n }\n }\n\n const interactiveProps = onTap\n ? { onClick: onTap, onKeyDown: handleKeyDown, role: 'button', tabIndex: 0 }\n : {}\n\n return (\n <>\n <Card\n data-testid=\"compact-insight-card\"\n {...interactiveProps}\n sx={{\n minWidth: 288,\n pb: 12,\n pl: 8,\n pr: 16,\n pt: 8,\n ...(onTap && { cursor: 'pointer' }),\n }}\n >\n <Stack\n sx={{\n alignItems: 'center',\n flexDirection: 'row',\n gap: 8,\n justifyContent: 'space-between',\n pl: 8,\n pt: 4,\n }}\n >\n <Text bold={true} variant=\"body1\">\n {title ?? ''}\n </Text>\n {/* The menu renders only when the host wired `onMenuAction` (BeatActionsProvider). */}\n <Box onClick={stopPropagation} sx={{ display: 'flex' }}>\n <InsightOptionsMenu />\n </Box>\n </Stack>\n\n <Stack sx={{ alignItems: 'center', flexDirection: 'row', gap: 16, pl: 8 }}>\n <Stack sx={{ alignSelf: 'stretch', flex: 1, gap: 8, minWidth: 0, pt: 2 }}>\n {/* `html_text` is rendered server-side by mrs_content from the ditto copy template (bold\n amount / merchant), not user-authored input; painted the same way `BaseLayout` paints\n the full card's description. */}\n <P\n dangerouslySetInnerHTML={{ __html: description.html_text }}\n data-testid=\"compact-insight-card-description\"\n sx={{\n display: '-webkit-box',\n fontWeight: 'fontWeightRegular',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n WebkitBoxOrient: 'vertical',\n WebkitLineClamp: DESCRIPTION_MAX_LINES,\n ...(beatCta?.boldCopy && {\n '& .bold-copy': { fontFamily: 'inherit', fontWeight: 'fontWeightBold' },\n }),\n }}\n variant=\"subtitle2\"\n />\n {cta?.label && canAct && (\n <Button\n aria-disabled={isCtaDisabled}\n onClick={handleCtaClick}\n size=\"small\"\n sx={{\n alignSelf: 'flex-start',\n // The label lines up with the description (the column pads 8; the tap target keeps\n // its padding). `my: 0` drops the theme's -12px text-button margin.\n ml: -8,\n my: 0,\n px: 8,\n ...(isCtaDisabled && {\n color: 'text.disabled',\n cursor: 'default',\n }),\n }}\n variant=\"text\"\n >\n <Text bold={true} variant=\"body2\">\n {cta.label}\n </Text>\n </Button>\n )}\n </Stack>\n\n <InsightVisual\n data={instance_slot.data}\n logo={rowLogo}\n template={payload.template}\n variant={instance_slot.variant}\n />\n </Stack>\n </Card>\n {/* Outside the Card: the drawer is a portal, and its clicks would otherwise bubble to `onTap`. */}\n {beat && <ActionBlockLayer beat={beat} />}\n </>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,UACf,SAAS;AAAA,UACT,MAAK;AAAA,UACL,IAAI;AAAA,YACF,WAAW;AAAA,YAGX,IAAI;AAAA,YACJ,IAAI;AAAA,YACJ,IAAI;AAAA,YACJ,GAAI,KAAiB;AAAA,cACnB,OAAO;AAAA,cACP,QAAQ;AAAA,YACV;AAAA,UACF;AAAA,UACA,SAAQ;AAAA,UAER,UAAA,gBAAA,EAAC,GAAD;AAAA,YAAM,MAAM;AAAA,YAAM,SAAQ;AAAA,YACvB,UAAA,EAAI;AAAA,UACD,CAAA;AAAA,QACA,CAAA,CAEL;AAAA,MAEP,CAAA,GAAA,gBAAA,EAAC,IAAD;AAAA,QACE,MAAM,EAAc;AAAA,QACpB,MAAM;AAAA,QACN,UAAU,EAAQ;AAAA,QAClB,SAAS,EAAc;AAAA,MACxB,CAAA,CACI;AAAA,IACH,CAAA,CAAA;AAAA,EAEL,CAAA,GAAA,KAAQ,gBAAA,EAAC,IAAD,EAAwB,MAAA,EAAO,CAAA,CACxC,EAAA,CAAA;AAEN"}
1
+ {"version":3,"file":"CompactInsightCard.es.js","names":[],"sources":["../../../src/insights-v2/components/CompactInsightCard.tsx"],"sourcesContent":["import type { KeyboardEvent, MouseEvent } from 'react'\n\nimport { useTheme } from '@mui/material/styles'\n\nimport Box from '@mui/material/Box'\nimport Button from '@mui/material/Button'\nimport Card from '@mui/material/Card'\nimport Stack from '@mui/material/Stack'\n\nimport { Icon } from '@mxenabled/mx-icons'\nimport { P, Text } from '@mxenabled/mxui'\n\nimport { useGlobalStore, useInsightsV2Store } from '../../common'\nimport { TinyBarChart } from '../../common/components/TinyBarChart'\nimport { slot } from '../../core'\nimport type {\n Beat,\n DataSeries,\n InsightsPayload,\n InstanceSlotData,\n InstanceSlotRow,\n LogoRef,\n PrimaryCTA,\n} from '../../core'\nimport type { ActionDrawerTrigger } from '../../core/stores'\nimport type { AccountSwitchBlockV2Data } from '../../core/types/InsightsInstanceSlotData'\nimport { getCategoryColor } from '../../core/utils/CategoryUtil'\nimport { CURRENCY_FORMAT, formatCurrency } from '../../core/utils/NumberFormatting'\nimport {\n BAR_ARIA_LABEL,\n buildChartData,\n buildDataSeries,\n} from '../blocks/ChartBlocks/BarchartBlock/utils'\nimport DonutChartV2 from '../blocks/ChartBlocks/DonutChartBlock/DonutChart'\nimport { donutChartVariant } from '../blocks/ChartBlocks/DonutChartBlock/layout'\nimport { getDonutSegments } from '../blocks/ChartBlocks/DonutChartBlock/utils'\nimport { formatValueByType } from '../CommonUtils'\nimport { ActionBlockLayer } from '../actionBlocks/ActionBlockLayer'\nimport { createVariantBlock } from '../blocks/createVariantBlock'\nimport { postCtaMessage } from '../ctaActions'\nimport { asLogoRef, asNonEmptyText, asNumber } from '../blocks/slotReaders'\nimport BadgedTile from './BadgedTile'\nimport InsightOptionsMenu from './InsightOptionsMenu'\nimport LogoFromGuid from './LogoFromGuid'\nimport { ReactComponent as FeeDetectedIllustration } from './shared/images/FeeDetected.svg'\nimport { ThemedSVGImage } from './chartblocks/ThemedSVGImage'\nimport StatusBadge from './StatusBadge'\n\nconst DESCRIPTION_MAX_LINES = 2\n\n/** Figma 1941:111897: the tile the logo fills is 44px (rows are 32, the notification row 33). */\nconst ICON_SIZE = 44\n\ninterface InsightVisualProps {\n /** The slot's `logo`, when ditto's variant declares and fills one. */\n logo?: LogoRef | null\n /** The slot's whole `data`, for a visual drawn from more than the logo (`category_color`, `linked_logos`). */\n data?: InstanceSlotData\n /** The envelope's template, for a beat's own badge on `linked_logos`. */\n template?: string\n}\n\n// Figma 1943:219189: 36px logos at opposite corners of a 75×74 box, the badge and rings centred.\nconst LINKED_LOGO_SIZE = 36\nconst LINKED_BOX_WIDTH = 75\nconst LINKED_BOX_HEIGHT = 74\n\nconst CENTRED = {\n left: '50%',\n position: 'absolute',\n top: '50%',\n transform: 'translate(-50%, -50%)',\n} as const\n\n/** Figma 222:33404 (Embedded | Bill Amount Not Standard) shows the latest three bars. */\nconst BAR_CHART_BAR_COUNT = 3\n\nconst EMBEDDED_BAR_CHART_HEIGHT = 54\nconst EMBEDDED_BAR_CHART_WIDTH = 75\n\n/** The slot's logo, or the neutral insight glyph when the slot carries none. */\nconst LogoOrFallback = ({ logo }: InsightVisualProps) =>\n logo ? (\n <LogoFromGuid logo={logo} size={ICON_SIZE} />\n ) : (\n <Box\n data-testid=\"compact-insight-card-fallback-icon\"\n sx={{\n alignItems: 'center',\n bgcolor: 'primary.lighter',\n display: 'flex',\n height: ICON_SIZE,\n justifyContent: 'center',\n width: ICON_SIZE,\n }}\n >\n <Icon color=\"primary\" fill={true} name=\"lightbulb\" size={24} />\n </Box>\n )\n\n/** Micro, and any variant not registered below: the logo alone. */\nconst PlainVisual = ({ logo }: InsightVisualProps) => (\n <BadgedTile center={<LogoOrFallback logo={logo} />} size={ICON_SIZE} sx={{ flexShrink: 0 }} />\n)\n\n/** ditto `with_warning_badge`: the logo badged with a status glyph (Figma 1941:111897). */\nconst WarningBadgeVisual = ({ logo }: InsightVisualProps) => (\n <BadgedTile\n center={<LogoOrFallback logo={logo} />}\n size={ICON_SIZE}\n sx={{ flexShrink: 0 }}\n topRight={<StatusBadge tone=\"warning\" />}\n />\n)\n\nconst STACKED_LOGO_SIZE = 24\n\n/** ditto `stacked_logos`: the row logo twice, plus an error badge. The copy is `aria-hidden`, so the logo is named once. */\nconst StackedLogosVisual = ({ logo }: InsightVisualProps) => (\n <BadgedTile\n bottomLeft={\n logo ? (\n <Box\n aria-hidden={true}\n sx={{\n borderRadius: '6px',\n display: 'flex',\n outline: '2px solid',\n outlineColor: 'background.paper',\n overflow: 'hidden',\n }}\n >\n <LogoFromGuid logo={{ ...logo, alt: undefined }} size={STACKED_LOGO_SIZE} />\n </Box>\n ) : undefined\n }\n center={<LogoOrFallback logo={logo} />}\n size={ICON_SIZE}\n sx={{ flexShrink: 0 }}\n topRight={<StatusBadge tone=\"error\" />}\n />\n)\n\n/**\n * ditto `with_illustration`: artwork in place of the logo tile (Fee Detected's search illustration).\n * A single SVG themed at runtime by `ThemedSVGImage`: its `brand300` elements are recolored to the\n * theme's `primary.main` (so it follows dark mode), while `fill=\"white\"` areas stay white. The\n * slot's `logo` is deliberately unused: the illustration replaces the tile.\n */\nconst IllustrationVisual = () => {\n return (\n <ThemedSVGImage\n divProps={{ style: { flexShrink: 0, lineHeight: 0, width: 'max-content' } }}\n image={FeeDetectedIllustration}\n />\n )\n}\n\nconst SWAP_BADGE_SIZE = 24\n\nconst LinkBadge = () => (\n <Box\n aria-hidden={true}\n data-testid=\"linked-logos-badge\"\n sx={{\n ...CENTRED,\n alignItems: 'center',\n bgcolor: 'primary.main',\n border: '2px solid',\n borderColor: 'primary.contrastText',\n borderRadius: '12px',\n display: 'flex',\n justifyContent: 'center',\n p: 2,\n zIndex: 1,\n }}\n >\n <Icon name=\"link\" size={16} sx={{ color: 'primary.contrastText' }} />\n </Box>\n)\n\n/**\n * Switch Direct Deposit (Figma 1941:167601): the outlined `swap_vertical_circle`, turned horizontal,\n * over a contrast disc: a primary ring and arrows on white. Drawn 1.2× so its circle fills 24px.\n */\nconst SwapBadge = () => (\n <Box\n aria-hidden={true}\n data-testid=\"linked-logos-badge\"\n sx={{\n ...CENTRED,\n alignItems: 'center',\n bgcolor: 'primary.contrastText',\n borderRadius: '50%',\n display: 'flex',\n height: SWAP_BADGE_SIZE,\n justifyContent: 'center',\n overflow: 'hidden',\n width: SWAP_BADGE_SIZE,\n zIndex: 1,\n }}\n >\n <Icon\n name=\"swap_vertical_circle\"\n size={SWAP_BADGE_SIZE * 1.2}\n sx={{ color: 'primary.main', flexShrink: 0, transform: 'rotate(-90deg)' }}\n />\n </Box>\n)\n\n/**\n * ditto `linked_logos` (Figma 1943:219189, Embedded | Discovered Accounts): the two institutions at\n * opposite corners of a 75×74 box — `from_logo` top-left, `to_logo` bottom-right — meeting on the\n * diagonal, with a badge over two rings at the centre (Switch Direct Deposit: the swap badge on an\n * outlined inner ring). The rings and badge are decorative (`aria-hidden`); each logo's accessible\n * name is its `alt`.\n */\nconst LinkedLogosVisual = ({ data, template }: InsightVisualProps) => {\n const { from_logo, to_logo } = (data ?? {}) as AccountSwitchBlockV2Data\n const isSwap = template === 'SwitchDirectDeposit'\n\n return (\n <Box\n sx={{\n flexShrink: 0,\n height: LINKED_BOX_HEIGHT,\n position: 'relative',\n width: LINKED_BOX_WIDTH,\n }}\n >\n <Box\n aria-hidden={true}\n data-testid=\"linked-logos-ring\"\n sx={{\n ...CENTRED,\n borderRadius: '50%',\n height: 36,\n width: 36,\n ...(isSwap\n ? { border: '2px solid', borderColor: 'primary.light' }\n : { bgcolor: 'primary.light' }),\n }}\n />\n <Box\n aria-hidden={true}\n data-testid=\"linked-logos-ring\"\n sx={{\n ...CENTRED,\n border: '1px solid',\n borderColor: 'divider',\n borderRadius: '50%',\n height: 48,\n width: 48,\n }}\n />\n <Box sx={{ borderRadius: '4px', left: 0, overflow: 'hidden', position: 'absolute', top: 0 }}>\n <LogoFromGuid logo={from_logo} size={LINKED_LOGO_SIZE} />\n </Box>\n <Box\n sx={{ borderRadius: '4px', bottom: 0, overflow: 'hidden', position: 'absolute', right: 0 }}\n >\n <LogoFromGuid logo={to_logo} size={LINKED_LOGO_SIZE} />\n </Box>\n {isSwap ? <SwapBadge /> : <LinkBadge />}\n </Box>\n )\n}\n\n/**\n * ditto `category_color`: a tiny bar chart of the latest bars in place of the logo tile, tinted by\n * the slot's category, the newest bar solid (Figma 222:33404). Draws nothing without a series.\n */\nconst BarChartVisual = ({ data }: InsightVisualProps) => {\n const series = buildDataSeries(slot<DataSeries>(data, 'series'))\n if (!series.length) return null\n\n const categoryGuid = slot<string>(data, 'category_guid')\n const bars = buildChartData(series, BAR_ARIA_LABEL).slice(-BAR_CHART_BAR_COUNT)\n\n return (\n <Box data-testid=\"compact-insight-card-bar-chart\" sx={{ flexShrink: 0 }}>\n <TinyBarChart\n color={(theme) =>\n categoryGuid ? getCategoryColor(categoryGuid, theme) : theme.palette.primary.main\n }\n data={bars}\n height={EMBEDDED_BAR_CHART_HEIGHT}\n width={EMBEDDED_BAR_CHART_WIDTH}\n />\n </Box>\n )\n}\n\n// The 72px donut's amount: whole dollars under $1,000, else numeral's K / M / B ($999.50 abbreviates its rounded $1K).\nconst compactDonutAmount = (amount: number) => {\n const whole = Math.round(amount)\n if (Math.abs(whole) < 1000) return formatCurrency(whole, CURRENCY_FORMAT.whole)\n return formatCurrency(Math.abs(amount) < 1000 ? whole : amount, '0.[00]a').toUpperCase()\n}\n\n/**\n * ditto `with_donut`: the `credit_limit` donut, small, with no legend; another beat needs its own variant.\n * Captioned by `main.compact_label` only (\"Remains\"), never the full donut's `main.label`.\n */\nconst DonutVisual = ({ data }: InsightVisualProps) => {\n const theme = useTheme()\n const main = slot<{ compact_label?: unknown; value?: unknown; value_type?: unknown }>(\n data,\n 'main',\n )\n const legends = slot<{ value?: unknown }[]>(data, 'legends')\n const centre = asNumber(main?.value)\n const values = (Array.isArray(legends) ? legends : []).map((legend) => asNumber(legend?.value))\n if (centre === undefined || values.length !== 2 || values.some((v) => v === undefined))\n return null\n\n const { colors, arcs } = getDonutSegments(\n donutChartVariant.CreditLimit,\n {},\n values.map((value) => ({ value: value as number })),\n theme,\n )\n const valueType = typeof main?.value_type === 'string' ? main.value_type : 'amount'\n\n return (\n <Box data-testid=\"compact-insight-card-donut\" sx={{ flexShrink: 0 }}>\n <DonutChartV2\n centerLabel={asNonEmptyText(main?.compact_label)}\n centerValue={\n valueType === 'amount'\n ? compactDonutAmount(centre)\n : formatValueByType(centre, valueType, CURRENCY_FORMAT.whole)\n }\n // Only an abbreviated amount ($1,000 and up) needs the full value spoken; $843 already reads in full.\n centerValueLabel={\n valueType === 'amount' && Math.abs(Math.round(centre)) >= 1000\n ? formatCurrency(centre, CURRENCY_FORMAT.cents)\n : undefined\n }\n compact={true}\n data={arcs.map((value, index) => ({ color: colors[index], value }))}\n />\n </Box>\n )\n}\n\nconst COMPARISON_WIDTH = 75\nconst COMPARISON_HEIGHT = 50\n\nconst asComparisonBar = (row: InstanceSlotRow | undefined) => {\n const label = asNonEmptyText(row?.primary_text)\n const value = asNumber(row?.amount)\n if (label === undefined || value === undefined) return undefined\n const formattedAmount = formatCurrency(value, CURRENCY_FORMAT.cents)\n return { ariaLabel: `${label}: ${formattedAmount}`, formattedAmount, label, value }\n}\n\n/**\n * ditto `compact_comparison` (Subscription Price Increase, Figma 1286:25608): the previous and new amounts as two labelled bars,\n * the new one solid, in the full card's progress-bar colour. Draws nothing without two distinct labelled rows.\n */\nconst ComparisonVisual = ({ data }: InsightVisualProps) => {\n const series = slot<InstanceSlotRow[]>(data, 'compact_series')\n const [previous, latest] = (Array.isArray(series) ? series.slice(0, 2) : []).map(asComparisonBar)\n // Equal labels share one band on the chart's x axis, so the bars would overlap.\n if (!previous || !latest || previous.label === latest.label) return null\n const bars = [previous, latest]\n\n return (\n <Box data-testid=\"compact-insight-card-comparison\" sx={{ flexShrink: 0 }}>\n <TinyBarChart\n color={(theme) => theme.palette.warning.main}\n data={bars}\n height={COMPARISON_HEIGHT}\n width={COMPARISON_WIDTH}\n />\n </Box>\n )\n}\n\n/**\n * The card's right-hand visual, one component per ditto layout variant.\n *\n * A variant names a rendering *shape*, not an insight or a surface — `with_header` already serves\n * both Large Transaction and Fee Detected — so an insight wanting the badged logo reuses\n * `with_warning_badge`. Only a genuinely different visual registers a new entry, and existing ones\n * are never touched.\n *\n * `minimal` draws the plain logo and is registered explicitly even though it matches the fallback:\n * micro and notification resolve it on every render, and an unregistered variant warns. The\n * fallback is for variants we genuinely do not know.\n */\nconst InsightVisual = createVariantBlock<InsightVisualProps>({\n variants: {\n category_color: BarChartVisual,\n compact_comparison: ComparisonVisual,\n linked_logos: LinkedLogosVisual,\n minimal: PlainVisual,\n // account_block's logo-only compact card (its `minimal` draws the `icon`).\n minimal_logo: PlainVisual,\n stacked_logos: StackedLogosVisual,\n with_donut: DonutVisual,\n with_illustration: IllustrationVisual,\n with_warning_badge: WarningBadgeVisual,\n },\n fallback: PlainVisual,\n name: 'InsightVisual',\n})\n\n/**\n * Beats whose embedded CTA the card reads from its own envelope key and opens in this card's\n * `ActionBlockLayer`, as a bar click does on the full card. The trigger names that key, so the layer\n * resolves the same CTA. Without a trigger the link posts its host message instead (Switch Direct\n * Deposit's op_1: Atomic runs only in pulse). Every other beat keeps `primary_cta` and hands it to\n * the host's `onCtaClick` (e.g. `contact_support_block`). A new beat adds its template here.\n * `boldCopy` bolds the description's `.bold-copy` spans, as Figma draws them; off for every other beat.\n */\nconst BEAT_CTA_CONFIG: Record<\n string,\n { key: 'primary_cta' | 'in_description_cta'; trigger?: ActionDrawerTrigger; boldCopy?: boolean }\n> = {\n BillAmountNotStandard: { key: 'in_description_cta', trigger: 'inDescriptionCta' },\n CreditCardCloseToLimit: {\n key: 'in_description_cta',\n trigger: 'inDescriptionCta',\n boldCopy: true,\n },\n ConnectDiscoveredAccountsV2: { key: 'in_description_cta', trigger: 'inDescriptionCta' },\n DuplicatePaymentV2: { key: 'in_description_cta', trigger: 'inDescriptionCta' },\n SwitchDirectDeposit: { key: 'in_description_cta' },\n}\n\nexport interface CompactInsightCardProps {\n /** A `micro` or `embedded` envelope. */\n payload: InsightsPayload\n /** The envelope's beat; when given, the card mounts its `ActionBlockLayer` for CTA drawers. */\n beat?: Beat\n /**\n * Makes the whole card the tap target. What a tap does is the host's decision (post to the\n * host app, open a drawer, …); the card never opens anything itself. Omit for a static card.\n */\n onTap?: () => void\n /** Receives the primary CTA when tapped. The card does not resolve the CTA's block itself. */\n onCtaClick?: (cta: PrimaryCTA) => void\n /**\n * Renders the CTA disabled — label shown, `aria-disabled`, not tappable — for a host that cannot\n * honour it (e.g. `contact_support_block` when the client's `enable_support_requests` is off).\n */\n isCtaDisabled?: boolean\n}\n\nconst stopPropagation = (event: MouseEvent) => event.stopPropagation()\n\n/**\n * The one compact renderer the micro and embedded envelopes share (`insights_v2.2.md` §8.3).\n *\n * Figma 1941:111897 (Embedded | Large Transaction): a title row with the overflow slot, the HTML\n * description with the primary CTA under it, and on the right the slot's `logo` in a\n * `<BadgedTile>`. Under ditto's `with_warning_badge` variant the tile takes a status badge; under\n * `minimal` it draws the logo alone. The card lays out from the envelope alone and never reads\n * `widget_type`.\n *\n * The icon falls back to the neutral insight glyph **here**, not in `LogoFromGuid`, when the slot\n * carries no logo. The `pill` on the same envelope is the transaction row's, not the card's.\n */\nconst CompactInsightCard = ({\n beat,\n isCtaDisabled = false,\n onCtaClick,\n onTap,\n payload,\n}: CompactInsightCardProps) => {\n const stores = useGlobalStore()\n const { openActionDrawer } = useInsightsV2Store()\n const { description, instance_slot, primary_cta, title } = payload\n const beatCta = BEAT_CTA_CONFIG[payload.template ?? '']\n const cta = beatCta ? payload[beatCta.key] : primary_cta\n const message = payload.in_description_cta?.post_message_metadata\n // A link that posts needs its beat and message; without them it draws nothing.\n const canAct = !beatCta || !!beatCta.trigger || (!!beat && !!message)\n // Reduced variants (`minimal`, `with_warning_badge`) declare a bare `logo` slot.\n const rowLogo = asLogoRef(slot(instance_slot.data, 'logo'))\n\n const handleCtaClick = (event: MouseEvent<HTMLButtonElement>) => {\n event.stopPropagation()\n if (isCtaDisabled || !cta) return\n\n if (beatCta) {\n if (beat && beatCta.trigger) openActionDrawer({ guid: beat.guid, trigger: beatCta.trigger })\n else if (beat && message) {\n const { action, ...extras } = message\n postCtaMessage({ beat, stores }, { action, payload: extras })\n }\n return\n }\n if (primary_cta) onCtaClick?.(primary_cta)\n }\n\n const handleKeyDown = (event: KeyboardEvent<HTMLDivElement>) => {\n // Only the card itself: Enter on the CTA button is the button's own click.\n if (event.target !== event.currentTarget) return\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault()\n onTap?.()\n }\n }\n\n const interactiveProps = onTap\n ? { onClick: onTap, onKeyDown: handleKeyDown, role: 'button', tabIndex: 0 }\n : {}\n\n return (\n <>\n <Card\n data-testid=\"compact-insight-card\"\n {...interactiveProps}\n sx={{\n minWidth: 288,\n pb: 12,\n pl: 8,\n pr: 16,\n pt: 8,\n ...(onTap && { cursor: 'pointer' }),\n }}\n >\n <Stack\n sx={{\n alignItems: 'center',\n flexDirection: 'row',\n gap: 8,\n justifyContent: 'space-between',\n pl: 8,\n pt: 4,\n }}\n >\n <Text bold={true} variant=\"body1\">\n {title ?? ''}\n </Text>\n {/* The menu renders only when the host wired `onMenuAction` (BeatActionsProvider). */}\n <Box onClick={stopPropagation} sx={{ display: 'flex' }}>\n <InsightOptionsMenu />\n </Box>\n </Stack>\n\n <Stack sx={{ alignItems: 'center', flexDirection: 'row', gap: 16, pl: 8 }}>\n <Stack sx={{ alignSelf: 'stretch', flex: 1, gap: 8, minWidth: 0, pt: 2 }}>\n {/* `html_text` is rendered server-side by mrs_content from the ditto copy template (bold\n amount / merchant), not user-authored input; painted the same way `BaseLayout` paints\n the full card's description. */}\n <P\n dangerouslySetInnerHTML={{ __html: description.html_text }}\n data-testid=\"compact-insight-card-description\"\n sx={{\n display: '-webkit-box',\n fontWeight: 'fontWeightRegular',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n WebkitBoxOrient: 'vertical',\n WebkitLineClamp: DESCRIPTION_MAX_LINES,\n ...(beatCta?.boldCopy && {\n '& .bold-copy': { fontFamily: 'inherit', fontWeight: 'fontWeightBold' },\n }),\n }}\n variant=\"subtitle2\"\n />\n {cta?.label && canAct && (\n <Button\n aria-disabled={isCtaDisabled}\n onClick={handleCtaClick}\n size=\"small\"\n sx={{\n alignSelf: 'flex-start',\n // The label lines up with the description (the column pads 8; the tap target keeps\n // its padding). `my: 0` drops the theme's -12px text-button margin.\n ml: -8,\n my: 0,\n px: 8,\n ...(isCtaDisabled && {\n color: 'text.disabled',\n cursor: 'default',\n }),\n }}\n variant=\"text\"\n >\n <Text bold={true} variant=\"body2\">\n {cta.label}\n </Text>\n </Button>\n )}\n </Stack>\n\n <InsightVisual\n data={instance_slot.data}\n logo={rowLogo}\n template={payload.template}\n variant={instance_slot.variant}\n />\n </Stack>\n </Card>\n {/* Outside the Card: the drawer is a portal, and its clicks would otherwise bubble to `onTap`. */}\n {be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AAyB,EAAE,QAAQ,EAAY,UAAU;AAAA,UACzD,eAAY;AAAA,UACZ,IAAI;AAAA,YACF,SAAS;AAAA,YACT,YAAY;AAAA,YACZ,UAAU;AAAA,YACV,cAAc;AAAA,YACd,iBAAiB;AAAA,YACjB,iBAAiB;AAAA,YACjB,GAAI,GAAS,YAAY,EACvB,gBAAgB;AAAA,cAAE,YAAY;AAAA,cAAW,YAAY;AAAA,YAAiB,EACxE;AAAA,UACF;AAAA,UACA,SAAQ;AAAA,QACT,CAAA,GACA,GAAK,SAAS,KACb,gBAAA,EAAC,IAAD;AAAA,UACE,iBAAe;AAAA,UACf,SAAS;AAAA,UACT,MAAK;AAAA,UACL,IAAI;AAAA,YACF,WAAW;AAAA,YAGX,IAAI;AAAA,YACJ,IAAI;AAAA,YACJ,IAAI;AAAA,YACJ,GAAI,KAAiB;AAAA,cACnB,OAAO;AAAA,cACP,QAAQ;AAAA,YACV;AAAA,UACF;AAAA,UACA,SAAQ;AAAA,UAER,UAAA,gBAAA,EAAC,GAAD;AAAA,YAAM,MAAM;AAAA,YAAM,SAAQ;AAAA,YACvB,UAAA,EAAI;AAAA,UACD,CAAA;AAAA,QACA,CAAA,CAEL;AAAA,MAEP,CAAA,GAAA,gBAAA,EAAC,IAAD;AAAA,QACE,MAAM,EAAc;AAAA,QACpB,MAAM;AAAA,QACN,UAAU,EAAQ;AAAA,QAClB,SAAS,EAAc;AAAA,MACxB,CAAA,CACI;AAAA,IACH,CAAA,CAAA;AAAA,EAEL,CAAA,GAAA,KAAQ,gBAAA,EAAC,IAAD,EAAwB,MAAA,EAAO,CAAA,CACxC,EAAA,CAAA;AAEN"}
@@ -25,6 +25,10 @@ export interface DirectDepositCardStyleProps {
25
25
  /** Status pill color tokens + optional leading glyph. */
26
26
  pill?: DirectDepositPillConfig;
27
27
  }
28
+ /** The default pill when a caller passes none, shared by `DirectDepositCard` and `CompactDirectDepositCard`. */
29
+ export declare const DIRECT_DEPOSIT_NEUTRAL_PILL: DirectDepositPillConfig;
30
+ /** The pill's leading glyph, shared by `DirectDepositCard` and `CompactDirectDepositCard`. */
31
+ export declare const directDepositPillIcon: (pill: DirectDepositPillConfig) => import("react/jsx-runtime").JSX.Element | undefined;
28
32
  interface DirectDepositCardProps extends DirectDepositCardStyleProps {
29
33
  /** Institution/account logo, rendered overhanging the hero card's top edge. */
30
34
  logo: ReactNode;
@@ -42,7 +46,8 @@ interface DirectDepositCardProps extends DirectDepositCardStyleProps {
42
46
  *
43
47
  * Purely presentational — it knows nothing about beats or variants. The Direct
44
48
  * Deposit block resolves `instance_slot.variant` to these style props via its
45
- * `layout.ts` (`getLayoutConfig`).
49
+ * `layout.ts` (`getLayoutConfig`). The mini tile is `CompactDirectDepositCard`,
50
+ * a separate component — not a mode of this one.
46
51
  */
47
52
  declare const DirectDepositCard: ({ backgroundImage, bgcolor, logo, name, nameVariant, pill, showConfetti, statusLabel, subtitle, }: DirectDepositCardProps) => import("react/jsx-runtime").JSX.Element;
48
53
  export default DirectDepositCard;
@@ -1,41 +1,43 @@
1
1
  import m from "./StatusPill.es.js";
2
- import n from "./AccountHeroCard.es.js";
3
- import { ConfettiOverlay as C } from "./shared/ConfettiOverlay.es.js";
2
+ import { ConfettiOverlay as n } from "./shared/ConfettiOverlay.es.js";
3
+ import C from "./AccountHeroCard.es.js";
4
4
  import { Icon as s } from "@mxenabled/mx-icons";
5
- import { jsx as r } from "react/jsx-runtime";
6
- var f = {
5
+ import { jsx as e } from "react/jsx-runtime";
6
+ var p = {
7
7
  bgcolor: "grey.200",
8
8
  borderColor: "grey.200",
9
9
  labelColor: "text.primary"
10
- }, u = ({ backgroundImage: a, bgcolor: t = "primary.lighter", logo: i, name: l, nameVariant: d = "body2", pill: o = f, showConfetti: b = !1, statusLabel: e, subtitle: c }) => /* @__PURE__ */ r(n, {
11
- backdrop: b ? /* @__PURE__ */ r(C, {}) : void 0,
12
- backgroundImage: a,
13
- bgcolor: t,
10
+ }, f = (o) => o.icon ? /* @__PURE__ */ e(s, {
11
+ "aria-hidden": !0,
12
+ "data-testid": "pill-icon",
13
+ name: o.icon,
14
+ size: 16,
15
+ sx: { color: o.labelColor }
16
+ }) : void 0, D = ({ backgroundImage: o, bgcolor: a = "primary.lighter", logo: i, name: l, nameVariant: d = "body2", pill: r = p, showConfetti: c = !1, statusLabel: t, subtitle: b }) => /* @__PURE__ */ e(C, {
17
+ backdrop: c ? /* @__PURE__ */ e(n, {}) : void 0,
18
+ backgroundImage: o,
19
+ bgcolor: a,
14
20
  logo: i,
15
21
  name: l,
16
22
  nameVariant: d,
17
- status: e ? /* @__PURE__ */ r(m, {
18
- bgcolor: o.bgcolor,
19
- borderColor: o.borderColor,
20
- icon: o.icon ? /* @__PURE__ */ r(s, {
21
- "aria-hidden": !0,
22
- "data-testid": "pill-icon",
23
- name: o.icon,
24
- size: 16,
25
- sx: { color: o.labelColor }
26
- }) : void 0,
27
- label: e,
28
- labelColor: o.labelColor,
23
+ status: t ? /* @__PURE__ */ e(m, {
24
+ bgcolor: r.bgcolor,
25
+ borderColor: r.borderColor,
26
+ icon: f(r),
27
+ label: t,
28
+ labelColor: r.labelColor,
29
29
  sx: {
30
30
  border: "none",
31
31
  gap: 4,
32
32
  px: 12
33
33
  }
34
34
  }) : void 0,
35
- subtitle: c
35
+ subtitle: b
36
36
  });
37
37
  export {
38
- u as default
38
+ p as DIRECT_DEPOSIT_NEUTRAL_PILL,
39
+ D as default,
40
+ f as directDepositPillIcon
39
41
  };
40
42
 
41
43
  //# sourceMappingURL=DirectDepositCard.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DirectDepositCard.es.js","names":[],"sources":["../../../src/insights-v2/components/DirectDepositCard.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\n\nimport { Icon } from '@mxenabled/mx-icons'\n\nimport AccountHeroCard from './AccountHeroCard'\nimport StatusPill from './StatusPill'\n\nimport { ConfettiOverlay } from './shared/ConfettiOverlay'\n\nexport interface DirectDepositPillConfig {\n /** Pill background color token. */\n bgcolor: string\n /** Pill border color token. */\n borderColor: string\n /** Pill label color token. */\n labelColor: string\n /** Optional mx-icons glyph rendered before the label (e.g. `check_circle`). */\n icon?: string\n}\n\n/**\n * Style props for the card. Variant-specific values live in the Direct Deposit\n * block's `layout.ts` (`getLayoutConfig`) — the card itself is variant-agnostic.\n */\nexport interface DirectDepositCardStyleProps {\n /** Slot surface token behind the white hero card. Default `primary.lighter`. */\n bgcolor?: string\n /** Decorative wash layered over `bgcolor` (celebration/gradient slots). */\n backgroundImage?: string\n /** Confetti burst behind the hero card (complete states). */\n showConfetti?: boolean\n /** Hero name typography. Default `body2` (13/16); rate variants use `body1` (15/20). */\n nameVariant?: 'body1' | 'body2'\n /** Status pill color tokens + optional leading glyph. */\n pill?: DirectDepositPillConfig\n}\n\nconst NEUTRAL_PILL: DirectDepositPillConfig = {\n bgcolor: 'grey.200',\n borderColor: 'grey.200',\n labelColor: 'text.primary',\n}\n\ninterface DirectDepositCardProps extends DirectDepositCardStyleProps {\n /** Institution/account logo, rendered overhanging the hero card's top edge. */\n logo: ReactNode\n /** Primary line, e.g. \"Epic Bank Checking, *1234\". */\n name: ReactNode\n /** Optional secondary line, e.g. \"Checking Account\" / \"Credit Card\". */\n subtitle?: ReactNode\n /** Optional status pill label, e.g. \"Direct Deposit Not Set Up\". */\n statusLabel?: ReactNode\n}\n\n/**\n * The basic Direct Deposit hero card: an overhanging logo above a white card\n * with a name, optional subtitle, and a status pill, over a tinted/gradient\n * slot with an optional confetti backdrop.\n *\n * Purely presentational — it knows nothing about beats or variants. The Direct\n * Deposit block resolves `instance_slot.variant` to these style props via its\n * `layout.ts` (`getLayoutConfig`).\n */\nconst DirectDepositCard = ({\n backgroundImage,\n bgcolor = 'primary.lighter',\n logo,\n name,\n nameVariant = 'body2',\n pill = NEUTRAL_PILL,\n showConfetti = false,\n statusLabel,\n subtitle,\n}: DirectDepositCardProps) => {\n return (\n <AccountHeroCard\n backdrop={showConfetti ? <ConfettiOverlay /> : undefined}\n backgroundImage={backgroundImage}\n bgcolor={bgcolor}\n logo={logo}\n name={name}\n nameVariant={nameVariant}\n status={\n statusLabel ? (\n <StatusPill\n bgcolor={pill.bgcolor}\n borderColor={pill.borderColor}\n icon={\n pill.icon ? (\n <Icon\n aria-hidden={true}\n data-testid=\"pill-icon\"\n name={pill.icon}\n size={16}\n sx={{ color: pill.labelColor }}\n />\n ) : undefined\n }\n label={statusLabel}\n labelColor={pill.labelColor}\n // Figma pill geometry: 24px tall, 12px side padding, 4px glyph gap, no stroke\n // (StatusPill defaults draw a 1px border, 16px padding and a 6px gap).\n sx={{ border: 'none', gap: 4, px: 12 }}\n />\n ) : undefined\n }\n subtitle={subtitle}\n />\n )\n}\n\nexport default DirectDepositCard\n"],"mappings":";;;;;AAqCA,IAAM,IAAwC;AAAA,EAC5C,SAAS;AAAA,EACT,aAAa;AAAA,EACb,YAAY;AACd,GAsBM,IAAA,CAAqB,EACzB,iBAAA,GACA,SAAA,IAAU,mBACV,MAAA,GACA,MAAA,GACA,aAAA,IAAc,SACd,MAAA,IAAO,GACP,cAAA,IAAe,IACf,aAAA,GACA,UAAA,EAAA,MAGE,gBAAA,EAAC,GAAD;AAAA,EACE,UAAU,IAAe,gBAAA,EAAC,GAAD,CAAkB,CAAA,IAAI;AAAA,EAC9B,iBAAA;AAAA,EACR,SAAA;AAAA,EACH,MAAA;AAAA,EACA,MAAA;AAAA,EACO,aAAA;AAAA,EACb,QACE,IACE,gBAAA,EAAC,GAAD;AAAA,IACE,SAAS,EAAK;AAAA,IACd,aAAa,EAAK;AAAA,IAClB,MACE,EAAK,OACH,gBAAA,EAAC,GAAD;AAAA,MACE,eAAa;AAAA,MACb,eAAY;AAAA,MACZ,MAAM,EAAK;AAAA,MACX,MAAM;AAAA,MACN,IAAI,EAAE,OAAO,EAAK,WAAW;AAAA,IAC9B,CAAA,IACC;AAAA,IAEN,OAAO;AAAA,IACP,YAAY,EAAK;AAAA,IAGjB,IAAI;AAAA,MAAE,QAAQ;AAAA,MAAQ,KAAK;AAAA,MAAG,IAAI;AAAA,IAAG;AAAA,EACtC,CAAA,IACC;AAAA,EAEI,UAAA;AACX,CAAA"}
1
+ {"version":3,"file":"DirectDepositCard.es.js","names":[],"sources":["../../../src/insights-v2/components/DirectDepositCard.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\n\nimport { Icon } from '@mxenabled/mx-icons'\n\nimport AccountHeroCard from './AccountHeroCard'\nimport StatusPill from './StatusPill'\n\nimport { ConfettiOverlay } from './shared/ConfettiOverlay'\n\nexport interface DirectDepositPillConfig {\n /** Pill background color token. */\n bgcolor: string\n /** Pill border color token. */\n borderColor: string\n /** Pill label color token. */\n labelColor: string\n /** Optional mx-icons glyph rendered before the label (e.g. `check_circle`). */\n icon?: string\n}\n\n/**\n * Style props for the card. Variant-specific values live in the Direct Deposit\n * block's `layout.ts` (`getLayoutConfig`) — the card itself is variant-agnostic.\n */\nexport interface DirectDepositCardStyleProps {\n /** Slot surface token behind the white hero card. Default `primary.lighter`. */\n bgcolor?: string\n /** Decorative wash layered over `bgcolor` (celebration/gradient slots). */\n backgroundImage?: string\n /** Confetti burst behind the hero card (complete states). */\n showConfetti?: boolean\n /** Hero name typography. Default `body2` (13/16); rate variants use `body1` (15/20). */\n nameVariant?: 'body1' | 'body2'\n /** Status pill color tokens + optional leading glyph. */\n pill?: DirectDepositPillConfig\n}\n\n/** The default pill when a caller passes none, shared by `DirectDepositCard` and `CompactDirectDepositCard`. */\nexport const DIRECT_DEPOSIT_NEUTRAL_PILL: DirectDepositPillConfig = {\n bgcolor: 'grey.200',\n borderColor: 'grey.200',\n labelColor: 'text.primary',\n}\n\n/** The pill's leading glyph, shared by `DirectDepositCard` and `CompactDirectDepositCard`. */\nexport const directDepositPillIcon = (pill: DirectDepositPillConfig) =>\n pill.icon ? (\n <Icon\n aria-hidden={true}\n data-testid=\"pill-icon\"\n name={pill.icon}\n size={16}\n sx={{ color: pill.labelColor }}\n />\n ) : undefined\n\ninterface DirectDepositCardProps extends DirectDepositCardStyleProps {\n /** Institution/account logo, rendered overhanging the hero card's top edge. */\n logo: ReactNode\n /** Primary line, e.g. \"Epic Bank Checking, *1234\". */\n name: ReactNode\n /** Optional secondary line, e.g. \"Checking Account\" / \"Credit Card\". */\n subtitle?: ReactNode\n /** Optional status pill label, e.g. \"Direct Deposit Not Set Up\". */\n statusLabel?: ReactNode\n}\n\n/**\n * The basic Direct Deposit hero card: an overhanging logo above a white card\n * with a name, optional subtitle, and a status pill, over a tinted/gradient\n * slot with an optional confetti backdrop.\n *\n * Purely presentational — it knows nothing about beats or variants. The Direct\n * Deposit block resolves `instance_slot.variant` to these style props via its\n * `layout.ts` (`getLayoutConfig`). The mini tile is `CompactDirectDepositCard`,\n * a separate component — not a mode of this one.\n */\nconst DirectDepositCard = ({\n backgroundImage,\n bgcolor = 'primary.lighter',\n logo,\n name,\n nameVariant = 'body2',\n pill = DIRECT_DEPOSIT_NEUTRAL_PILL,\n showConfetti = false,\n statusLabel,\n subtitle,\n}: DirectDepositCardProps) => {\n return (\n <AccountHeroCard\n backdrop={showConfetti ? <ConfettiOverlay /> : undefined}\n backgroundImage={backgroundImage}\n bgcolor={bgcolor}\n logo={logo}\n name={name}\n nameVariant={nameVariant}\n status={\n statusLabel ? (\n <StatusPill\n bgcolor={pill.bgcolor}\n borderColor={pill.borderColor}\n icon={directDepositPillIcon(pill)}\n label={statusLabel}\n labelColor={pill.labelColor}\n // Figma pill geometry: 24px tall, 12px side padding, 4px glyph gap, no stroke\n // (StatusPill defaults draw a 1px border, 16px padding and a 6px gap).\n sx={{ border: 'none', gap: 4, px: 12 }}\n />\n ) : undefined\n }\n subtitle={subtitle}\n />\n )\n}\n\nexport default DirectDepositCard\n"],"mappings":";;;;;AAsCA,IAAa,IAAuD;AAAA,EAClE,SAAS;AAAA,EACT,aAAa;AAAA,EACb,YAAY;AACd,GAGa,IAAA,CAAyB,MACpC,EAAK,OACH,gBAAA,EAAC,GAAD;AAAA,EACE,eAAa;AAAA,EACb,eAAY;AAAA,EACZ,MAAM,EAAK;AAAA,EACX,MAAM;AAAA,EACN,IAAI,EAAE,OAAO,EAAK,WAAW;AAC9B,CAAA,IACC,QAuBA,IAAA,CAAqB,EACzB,iBAAA,GACA,SAAA,IAAU,mBACV,MAAA,GACA,MAAA,GACA,aAAA,IAAc,SACd,MAAA,IAAO,GACP,cAAA,IAAe,IACf,aAAA,GACA,UAAA,EAAA,MAGE,gBAAA,EAAC,GAAD;AAAA,EACE,UAAU,IAAe,gBAAA,EAAC,GAAD,CAAkB,CAAA,IAAI;AAAA,EAC9B,iBAAA;AAAA,EACR,SAAA;AAAA,EACH,MAAA;AAAA,EACA,MAAA;AAAA,EACO,aAAA;AAAA,EACb,QACE,IACE,gBAAA,EAAC,GAAD;AAAA,IACE,SAAS,EAAK;AAAA,IACd,aAAa,EAAK;AAAA,IAClB,MAAM,EAAsB,CAAI;AAAA,IAChC,OAAO;AAAA,IACP,YAAY,EAAK;AAAA,IAGjB,IAAI;AAAA,MAAE,QAAQ;AAAA,MAAQ,KAAK;AAAA,MAAG,IAAI;AAAA,IAAG;AAAA,EACtC,CAAA,IACC;AAAA,EAEI,UAAA;AACX,CAAA"}
@@ -1,14 +1,18 @@
1
1
  import { useGlobalCopyStore as e } from "../../common/context/hooks.es.js";
2
- import { observer as r } from "mobx-react-lite";
3
- import a from "@mui/material/Stack";
2
+ import { observer as a } from "mobx-react-lite";
3
+ import n from "@mui/material/Stack";
4
4
  import { jsx as t } from "react/jsx-runtime";
5
- var i = "https://content.moneydesktop.com/storage/MD_Assets/md/common/loading.gif", d = r(() => {
6
- const o = e().insights_feed?.general?.loading;
7
- return /* @__PURE__ */ t(a, {
5
+ var s = "https://content.moneydesktop.com/storage/MD_Assets/md/common/Loading.gif", l = a(() => {
6
+ const r = e().insights_feed?.general?.loading;
7
+ return /* @__PURE__ */ t(n, {
8
+ role: "status",
8
9
  sx: { alignItems: "center" },
9
10
  children: /* @__PURE__ */ t("img", {
10
- alt: o,
11
- src: i,
11
+ alt: r,
12
+ onError: (o) => {
13
+ o.currentTarget.hidden = !0;
14
+ },
15
+ src: s,
12
16
  style: {
13
17
  marginBottom: 25,
14
18
  height: 64,
@@ -18,8 +22,8 @@ var i = "https://content.moneydesktop.com/storage/MD_Assets/md/common/loading.gi
18
22
  });
19
23
  });
20
24
  export {
21
- d as LoadingCard,
22
- d as default
25
+ l as LoadingCard,
26
+ l as default
23
27
  };
24
28
 
25
29
  //# sourceMappingURL=LoadingCard.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"LoadingCard.es.js","names":[],"sources":["../../../src/insights-v2/components/LoadingCard.tsx"],"sourcesContent":["import { observer } from 'mobx-react-lite'\n\nimport Stack from '@mui/material/Stack'\n\nimport { useGlobalCopyStore } from '../../common'\n\nconst LOADING_GIF_URL = 'https://content.moneydesktop.com/storage/MD_Assets/md/common/loading.gif'\n\n/**\n * Loading/placeholder state for the InsightsV2 feed.\n *\n * Mirrors the existing `insights/.../CardLoading` design: a centered loading\n * animation (gif). The accessible alt text is read from the experiences copy\n * store so it stays localized — the host only has to signal that it is loading.\n */\nexport const LoadingCard = observer(() => {\n const copy = useGlobalCopyStore()\n const altLoadingText = copy.insights_feed?.general?.loading\n\n return (\n <Stack sx={{ alignItems: 'center' }}>\n <img\n alt={altLoadingText}\n src={LOADING_GIF_URL}\n style={{\n marginBottom: 25,\n height: 64,\n width: 64,\n }}\n />\n </Stack>\n )\n})\n\nexport default LoadingCard\n"],"mappings":";;;;AAMA,IAAM,IAAkB,4EASX,IAAc,EAAA,MAAe;AAExC,QAAM,IADO,EACU,EAAK,eAAe,SAAS;AAEpD,SACE,gBAAA,EAAC,GAAD;AAAA,IAAO,IAAI,EAAE,YAAY,SAAS;AAAA,IAChC,UAAA,gBAAA,EAAC,OAAD;AAAA,MACE,KAAK;AAAA,MACL,KAAK;AAAA,MACL,OAAO;AAAA,QACL,cAAc;AAAA,QACd,QAAQ;AAAA,QACR,OAAO;AAAA,MACT;AAAA,IACD,CAAA;AAAA,EACI,CAAA;AAEX,CAAC"}
1
+ {"version":3,"file":"LoadingCard.es.js","names":[],"sources":["../../../src/insights-v2/components/LoadingCard.tsx"],"sourcesContent":["import { observer } from 'mobx-react-lite'\n\nimport Stack from '@mui/material/Stack'\n\nimport { useGlobalCopyStore } from '../../common'\n\nconst LOADING_GIF_URL = 'https://content.moneydesktop.com/storage/MD_Assets/md/common/Loading.gif'\n\n/**\n * Loading/placeholder state for the InsightsV2 feed.\n *\n * Mirrors the existing `insights/.../CardLoading` design: a centered loading\n * animation (gif). The accessible alt text is read from the experiences copy\n * store so it stays localized — the host only has to signal that it is loading.\n */\nexport const LoadingCard = observer(() => {\n const copy = useGlobalCopyStore()\n const altLoadingText = copy.insights_feed?.general?.loading\n\n return (\n <Stack role=\"status\" sx={{ alignItems: 'center' }}>\n <img\n alt={altLoadingText}\n onError={(event) => {\n event.currentTarget.hidden = true\n }}\n src={LOADING_GIF_URL}\n style={{\n marginBottom: 25,\n height: 64,\n width: 64,\n }}\n />\n </Stack>\n )\n})\n\nexport default LoadingCard\n"],"mappings":";;;;AAMA,IAAM,IAAkB,4EASX,IAAc,EAAA,MAAe;AAExC,QAAM,IADO,EACU,EAAK,eAAe,SAAS;AAEpD,SACE,gBAAA,EAAC,GAAD;AAAA,IAAO,MAAK;AAAA,IAAS,IAAI,EAAE,YAAY,SAAS;AAAA,IAC9C,UAAA,gBAAA,EAAC,OAAD;AAAA,MACE,KAAK;AAAA,MACL,SAAA,CAAU,MAAU;AAClB,QAAA,EAAM,cAAc,SAAS;AAAA,MAC/B;AAAA,MACA,KAAK;AAAA,MACL,OAAO;AAAA,QACL,cAAc;AAAA,QACd,QAAQ;AAAA,QACR,OAAO;AAAA,MACT;AAAA,IACD,CAAA;AAAA,EACI,CAAA;AAEX,CAAC"}
@@ -3,7 +3,7 @@ export declare const isLogoGuid: (guid?: string | null) => guid is string;
3
3
  export interface LogoFromGuidProps {
4
4
  /** The envelope's logo object: `{ guid, fallback_guid?, alt?, color? }` (`color` is read for `ICO-` icons). */
5
5
  logo?: Pick<LogoRef, 'alt' | 'color' | 'fallback_guid' | 'guid'> | null;
6
- /** Rendered square size in px (32 on rows, 40 on the compact card, 33 on the notification row). */
6
+ /** Rendered square size in px (32 on rows and the mini direct deposit tile, 33 on the notification row). */
7
7
  size: number;
8
8
  className?: string;
9
9
  /** A category tile's tint: its colour at this opacity behind the glyph, bordered in it (budget tiles). */
@@ -1 +1 @@
1
- {"version":3,"file":"LogoFromGuid.es.js","names":[],"sources":["../../../src/insights-v2/components/LogoFromGuid.tsx"],"sourcesContent":["import Box from '@mui/material/Box'\n\nimport type { LogoRef } from '../../core'\nimport LogoMark, { isKnownIcon } from './LogoMark'\nimport { logoFromRef } from './shared/EntityLogo'\n\n/**\n * The guid prefixes that name a logo entity. A prefix heuristic by design: the V2 envelope carries\n * the entity only in the guid, and the notification row relies on non-insight rows carrying account\n * or budget guids and legacy insight rows carrying the `\"PARENT-ENTITY\"` sentinel. Exported beside\n * the component so a caller's branch (`NotificationCard`) and the dispatch here cannot drift apart.\n */\nconst LOGO_GUID_PREFIX = /^(MCH|CAT|INS)-|^ICO-[a-z0-9_-]+$/\n\nexport const isLogoGuid = (guid?: string | null): guid is string =>\n !!guid && LOGO_GUID_PREFIX.test(guid)\n\nexport interface LogoFromGuidProps {\n /** The envelope's logo object: `{ guid, fallback_guid?, alt?, color? }` (`color` is read for `ICO-` icons). */\n logo?: Pick<LogoRef, 'alt' | 'color' | 'fallback_guid' | 'guid'> | null\n /** Rendered square size in px (32 on rows, 40 on the compact card, 33 on the notification row). */\n size: number\n className?: string\n /** A category tile's tint: its colour at this opacity behind the glyph, bordered in it (budget tiles). */\n categoryTint?: number\n}\n\n/**\n * One component for every V2 logo. The envelope sends a single `{ guid, fallback_guid?, alt? }`\n * object whose prefix says what it is; anything else (`PARENT-ENTITY`, an `ACT-`/`BGT-` guid, an\n * empty guid) renders nothing, never a guess. The asset → category tile → `alt` fallback is mxui's.\n */\nconst LogoFromGuid = ({ categoryTint, className, logo, size }: LogoFromGuidProps) => {\n if (!logo || !isLogoGuid(logo.guid)) return null\n\n // Guid-only on purpose: `logoFromRef` lets a status `icon` win over `guid`, which is right for a\n // row but would silently turn this component into an icon renderer.\n const resolved = logoFromRef({\n alt: logo.alt,\n color: logo.color,\n fallback_guid: logo.fallback_guid,\n guid: logo.guid,\n })\n\n if (!resolved) return null\n\n // Checked before the sized box, so an unknown icon leaves no empty gap.\n if (resolved.logo_name && !isKnownIcon(resolved.logo_name)) return null\n\n return (\n <Box\n className={className}\n data-testid=\"logo-from-guid\"\n sx={{\n alignItems: 'center',\n display: 'flex',\n flexShrink: 0,\n height: size,\n justifyContent: 'center',\n width: size,\n }}\n >\n <LogoMark categoryTint={categoryTint} logo={resolved} size={size} />\n </Box>\n )\n}\n\nexport default LogoFromGuid\n"],"mappings":";;;;AAYA,IAAM,IAAmB,qCAEZ,IAAA,CAAc,MACzB,CAAC,CAAC,KAAQ,EAAiB,KAAK,CAAI,GAiBhC,IAAA,CAAgB,EAAE,cAAA,GAAc,WAAA,GAAW,MAAA,GAAM,MAAA,EAAA,MAA8B;AACnF,MAAI,CAAC,KAAQ,CAAC,EAAW,EAAK,IAAI,EAAG,QAAO;AAI5C,QAAM,IAAW,EAAY;AAAA,IAC3B,KAAK,EAAK;AAAA,IACV,OAAO,EAAK;AAAA,IACZ,eAAe,EAAK;AAAA,IACpB,MAAM,EAAK;AAAA,EACb,CAAC;AAKD,SAHI,CAAC,KAGD,EAAS,aAAa,CAAC,EAAY,EAAS,SAAS,IAAU,OAGjE,gBAAA,EAAC,GAAD;AAAA,IACa,WAAA;AAAA,IACX,eAAY;AAAA,IACZ,IAAI;AAAA,MACF,YAAY;AAAA,MACZ,SAAS;AAAA,MACT,YAAY;AAAA,MACZ,QAAQ;AAAA,MACR,gBAAgB;AAAA,MAChB,OAAO;AAAA,IACT;AAAA,IAEA,UAAA,gBAAA,EAAC,GAAD;AAAA,MAAwB,cAAA;AAAA,MAAc,MAAM;AAAA,MAAgB,MAAA;AAAA,IAAO,CAAA;AAAA,EAChE,CAAA;AAET"}
1
+ {"version":3,"file":"LogoFromGuid.es.js","names":[],"sources":["../../../src/insights-v2/components/LogoFromGuid.tsx"],"sourcesContent":["import Box from '@mui/material/Box'\n\nimport type { LogoRef } from '../../core'\nimport LogoMark, { isKnownIcon } from './LogoMark'\nimport { logoFromRef } from './shared/EntityLogo'\n\n/**\n * The guid prefixes that name a logo entity. A prefix heuristic by design: the V2 envelope carries\n * the entity only in the guid, and the notification row relies on non-insight rows carrying account\n * or budget guids and legacy insight rows carrying the `\"PARENT-ENTITY\"` sentinel. Exported beside\n * the component so a caller's branch (`NotificationCard`) and the dispatch here cannot drift apart.\n */\nconst LOGO_GUID_PREFIX = /^(MCH|CAT|INS)-|^ICO-[a-z0-9_-]+$/\n\nexport const isLogoGuid = (guid?: string | null): guid is string =>\n !!guid && LOGO_GUID_PREFIX.test(guid)\n\nexport interface LogoFromGuidProps {\n /** The envelope's logo object: `{ guid, fallback_guid?, alt?, color? }` (`color` is read for `ICO-` icons). */\n logo?: Pick<LogoRef, 'alt' | 'color' | 'fallback_guid' | 'guid'> | null\n /** Rendered square size in px (32 on rows and the mini direct deposit tile, 33 on the notification row). */\n size: number\n className?: string\n /** A category tile's tint: its colour at this opacity behind the glyph, bordered in it (budget tiles). */\n categoryTint?: number\n}\n\n/**\n * One component for every V2 logo. The envelope sends a single `{ guid, fallback_guid?, alt? }`\n * object whose prefix says what it is; anything else (`PARENT-ENTITY`, an `ACT-`/`BGT-` guid, an\n * empty guid) renders nothing, never a guess. The asset → category tile → `alt` fallback is mxui's.\n */\nconst LogoFromGuid = ({ categoryTint, className, logo, size }: LogoFromGuidProps) => {\n if (!logo || !isLogoGuid(logo.guid)) return null\n\n // Guid-only on purpose: `logoFromRef` lets a status `icon` win over `guid`, which is right for a\n // row but would silently turn this component into an icon renderer.\n const resolved = logoFromRef({\n alt: logo.alt,\n color: logo.color,\n fallback_guid: logo.fallback_guid,\n guid: logo.guid,\n })\n\n if (!resolved) return null\n\n // Checked before the sized box, so an unknown icon leaves no empty gap.\n if (resolved.logo_name && !isKnownIcon(resolved.logo_name)) return null\n\n return (\n <Box\n className={className}\n data-testid=\"logo-from-guid\"\n sx={{\n alignItems: 'center',\n display: 'flex',\n flexShrink: 0,\n height: size,\n justifyContent: 'center',\n width: size,\n }}\n >\n <LogoMark categoryTint={categoryTint} logo={resolved} size={size} />\n </Box>\n )\n}\n\nexport default LogoFromGuid\n"],"mappings":";;;;AAYA,IAAM,IAAmB,qCAEZ,IAAA,CAAc,MACzB,CAAC,CAAC,KAAQ,EAAiB,KAAK,CAAI,GAiBhC,IAAA,CAAgB,EAAE,cAAA,GAAc,WAAA,GAAW,MAAA,GAAM,MAAA,EAAA,MAA8B;AACnF,MAAI,CAAC,KAAQ,CAAC,EAAW,EAAK,IAAI,EAAG,QAAO;AAI5C,QAAM,IAAW,EAAY;AAAA,IAC3B,KAAK,EAAK;AAAA,IACV,OAAO,EAAK;AAAA,IACZ,eAAe,EAAK;AAAA,IACpB,MAAM,EAAK;AAAA,EACb,CAAC;AAKD,SAHI,CAAC,KAGD,EAAS,aAAa,CAAC,EAAY,EAAS,SAAS,IAAU,OAGjE,gBAAA,EAAC,GAAD;AAAA,IACa,WAAA;AAAA,IACX,eAAY;AAAA,IACZ,IAAI;AAAA,MACF,YAAY;AAAA,MACZ,SAAS;AAAA,MACT,YAAY;AAAA,MACZ,QAAQ;AAAA,MACR,gBAAgB;AAAA,MAChB,OAAO;AAAA,IACT;AAAA,IAEA,UAAA,gBAAA,EAAC,GAAD;AAAA,MAAwB,cAAA;AAAA,MAAc,MAAM;AAAA,MAAgB,MAAA;AAAA,IAAO,CAAA;AAAA,EAChE,CAAA;AAET"}
@@ -1,12 +1,12 @@
1
- import N from "./LogoTile.es.js";
2
- import R from "./AmountPill.es.js";
1
+ import N from "./AmountPill.es.js";
2
+ import R from "./LogoTile.es.js";
3
3
  import i from "@mui/material/Stack";
4
4
  import { Text as o } from "@mxenabled/mxui";
5
5
  import { jsx as r, jsxs as s } from "react/jsx-runtime";
6
6
  var H = ({ amount: t, amountPill: n, amountVariant: l = "text", background: d, bgcolor: x = "grey.200", borderColor: a, eyebrow: h, fullBleed: c = !1, gap: p = 16, logo: f, logoBorderColor: m, logoRadius: g, logoShadow: u = !0, logoSize: v, name: W, nameVariant: w, trailing: y, sx: b }) => {
7
7
  const j = w ?? (l === "pill" ? "h2" : "h3");
8
8
  let e = y;
9
- return e == null && t != null && (e = l === "pill" ? /* @__PURE__ */ r(R, {
9
+ return e == null && t != null && (e = l === "pill" ? /* @__PURE__ */ r(N, {
10
10
  fontWeight: n?.fontWeight,
11
11
  px: n?.px,
12
12
  children: t
@@ -34,7 +34,7 @@ var H = ({ amount: t, amountPill: n, amountVariant: l = "text", background: d, b
34
34
  p: 16,
35
35
  width: "100%"
36
36
  },
37
- children: [/* @__PURE__ */ r(N, {
37
+ children: [/* @__PURE__ */ r(R, {
38
38
  borderColor: m,
39
39
  borderRadius: g,
40
40
  shadow: u,
@@ -1,9 +1,12 @@
1
1
  import { SxProps, Theme } from '@mui/material/styles';
2
2
  interface SaveAnExtraCardProps {
3
3
  primaryText?: string[];
4
+ /** The white footer's projected amount and caption; omit for the green tile alone (the mini, Figma 17031:312158). */
4
5
  secondaryText?: string[];
5
6
  bgcolor?: string;
7
+ /** Grow to the parent's height, borderless, with the green tile's copy centered (the mini). */
8
+ fill?: boolean;
6
9
  sx?: SxProps<Theme>;
7
10
  }
8
- declare const SaveAnExtraCard: ({ primaryText, secondaryText, bgcolor, sx, }: SaveAnExtraCardProps) => import("react/jsx-runtime").JSX.Element;
11
+ declare const SaveAnExtraCard: ({ primaryText, secondaryText, bgcolor, fill, sx, }: SaveAnExtraCardProps) => import("react/jsx-runtime").JSX.Element;
9
12
  export default SaveAnExtraCard;
@@ -1,58 +1,70 @@
1
- import { CURRENCY_FORMAT as h, formatCurrency as m } from "../../core/utils/NumberFormatting.es.js";
2
- import { P as u, Text as o } from "@mxenabled/mxui";
3
- import { jsx as r, jsxs as e } from "react/jsx-runtime";
1
+ import { CURRENCY_FORMAT as u, formatCurrency as f } from "../../core/utils/NumberFormatting.es.js";
2
+ import { P as h, Text as e } from "@mxenabled/mxui";
3
+ import { jsx as r, jsxs as o } from "react/jsx-runtime";
4
4
  import t from "@mui/material/Box";
5
- var g = ({ primaryText: n = [], secondaryText: i = [], bgcolor: c = "success.main", sx: a }) => {
6
- const [l, s, d] = n, [p, x] = i;
7
- return /* @__PURE__ */ e(t, {
5
+ var g = ({ primaryText: c = [], secondaryText: n, bgcolor: l = "success.main", fill: i = !1, sx: a }) => {
6
+ const [s, d, p] = c, [x, m] = n ?? [];
7
+ return /* @__PURE__ */ o(t, {
8
8
  sx: {
9
9
  border: "1px solid",
10
10
  borderColor: "success.main",
11
11
  borderRadius: 2,
12
12
  overflow: "hidden",
13
+ ...i && {
14
+ border: "none",
15
+ display: "flex",
16
+ flex: 1,
17
+ flexDirection: "column"
18
+ },
13
19
  ...a
14
20
  },
15
- children: [/* @__PURE__ */ e(t, {
21
+ children: [/* @__PURE__ */ o(t, {
16
22
  sx: {
17
- bgcolor: c,
23
+ bgcolor: l,
18
24
  color: "success.contrastText",
19
25
  p: 16,
20
26
  pt: 12,
21
- textAlign: "center"
27
+ textAlign: "center",
28
+ ...i && {
29
+ display: "flex",
30
+ flex: 1,
31
+ flexDirection: "column",
32
+ justifyContent: "center"
33
+ }
22
34
  },
23
35
  children: [
24
- /* @__PURE__ */ r(u, {
36
+ /* @__PURE__ */ r(h, {
25
37
  color: "inherit",
26
38
  variant: "subtitle1",
27
- children: l
39
+ children: s
28
40
  }),
29
- /* @__PURE__ */ r(o, {
41
+ /* @__PURE__ */ r(e, {
30
42
  bold: !0,
31
43
  color: "inherit",
32
44
  variant: "h1",
33
- children: m(Number(s ?? "0"), h.cents)
45
+ children: f(Number(d ?? "0"), u.cents)
34
46
  }),
35
- /* @__PURE__ */ r(o, {
47
+ /* @__PURE__ */ r(e, {
36
48
  color: "inherit",
37
49
  sx: { display: "block" },
38
50
  variant: "caption",
39
- children: d
51
+ children: p
40
52
  })
41
53
  ]
42
- }), /* @__PURE__ */ e(t, {
54
+ }), n && /* @__PURE__ */ o(t, {
43
55
  sx: {
44
56
  bgcolor: "background.paper",
45
57
  px: 16,
46
58
  py: 12,
47
59
  textAlign: "center"
48
60
  },
49
- children: [/* @__PURE__ */ r(o, {
61
+ children: [/* @__PURE__ */ r(e, {
50
62
  variant: "h3",
51
- children: p
52
- }), /* @__PURE__ */ r(o, {
63
+ children: x
64
+ }), /* @__PURE__ */ r(e, {
53
65
  color: "text.secondary",
54
66
  variant: "caption",
55
- children: x
67
+ children: m
56
68
  })]
57
69
  })]
58
70
  });
@@ -1 +1 @@
1
- {"version":3,"file":"SaveAnExtraCard.es.js","names":[],"sources":["../../../src/insights-v2/components/SaveAnExtraCard.tsx"],"sourcesContent":["import Box from '@mui/material/Box'\nimport type { SxProps, Theme } from '@mui/material/styles'\n\nimport { P, Text } from '@mxenabled/mxui'\n\nimport { CURRENCY_FORMAT, formatCurrency } from '../../core/utils/NumberFormatting'\n\ninterface SaveAnExtraCardProps {\n primaryText?: string[]\n secondaryText?: string[]\n bgcolor?: string\n sx?: SxProps<Theme>\n}\n\nconst SaveAnExtraCard = ({\n primaryText = [],\n secondaryText = [],\n bgcolor = 'success.main',\n sx,\n}: SaveAnExtraCardProps) => {\n const [leadIn, amount, trailingCopy] = primaryText\n const [projected, projectedCaption] = secondaryText\n\n return (\n <Box\n sx={{\n border: '1px solid',\n borderColor: 'success.main',\n borderRadius: 2,\n\n overflow: 'hidden',\n ...sx,\n }}\n >\n {/* Green header */}\n <Box\n sx={{\n bgcolor,\n color: 'success.contrastText',\n p: 16,\n pt: 12,\n textAlign: 'center',\n }}\n >\n <P color=\"inherit\" variant=\"subtitle1\">\n {leadIn}\n </P>\n <Text bold={true} color=\"inherit\" variant=\"h1\">\n {formatCurrency(Number(amount ?? '0'), CURRENCY_FORMAT.cents)}\n </Text>\n {/* A block, as in Figma: inline, the caption sat on a text line 5px below the amount. */}\n <Text color=\"inherit\" sx={{ display: 'block' }} variant=\"caption\">\n {trailingCopy}\n </Text>\n </Box>\n\n {/* White footer with projected amount. The projected balance arrives\n pre-formatted from the backend (e.g. \"$3,320\"), so render it as-is. */}\n <Box\n sx={{\n bgcolor: 'background.paper',\n px: 16,\n py: 12,\n textAlign: 'center',\n }}\n >\n <Text variant=\"h3\">{projected}</Text>\n <Text color=\"text.secondary\" variant=\"caption\">\n {projectedCaption}\n </Text>\n </Box>\n </Box>\n )\n}\n\nexport default SaveAnExtraCard\n"],"mappings":";;;;AAcA,IAAM,IAAA,CAAmB,EACvB,aAAA,IAAc,CAAC,GACf,eAAA,IAAgB,CAAC,GACjB,SAAA,IAAU,gBACV,IAAA,EAAA,MAC0B;AAC1B,QAAM,CAAC,GAAQ,GAAQ,CAAA,IAAgB,GACjC,CAAC,GAAW,CAAA,IAAoB;AAEtC,SACE,gBAAA,EAAC,GAAD;AAAA,IACE,IAAI;AAAA,MACF,QAAQ;AAAA,MACR,aAAa;AAAA,MACb,cAAc;AAAA,MAEd,UAAU;AAAA,MACV,GAAG;AAAA,IACL;AAAA,IARF,UAAA,CAWE,gBAAA,EAAC,GAAD;AAAA,MACE,IAAI;AAAA,QACF,SAAA;AAAA,QACA,OAAO;AAAA,QACP,GAAG;AAAA,QACH,IAAI;AAAA,QACJ,WAAW;AAAA,MACb;AAAA,MAPF,UAAA;AAAA,QASE,gBAAA,EAAC,GAAD;AAAA,UAAG,OAAM;AAAA,UAAU,SAAQ;AAAA,UACxB,UAAA;AAAA,QACA,CAAA;AAAA,QACH,gBAAA,EAAC,GAAD;AAAA,UAAM,MAAM;AAAA,UAAM,OAAM;AAAA,UAAU,SAAQ;AAAA,UACvC,UAAA,EAAe,OAAO,KAAU,GAAG,GAAG,EAAgB,KAAK;AAAA,QACxD,CAAA;AAAA,QAEN,gBAAA,EAAC,GAAD;AAAA,UAAM,OAAM;AAAA,UAAU,IAAI,EAAE,SAAS,QAAQ;AAAA,UAAG,SAAQ;AAAA,UACrD,UAAA;AAAA,QACG,CAAA;AAAA,MACH;AAAA,IAIL,CAAA,GAAA,gBAAA,EAAC,GAAD;AAAA,MACE,IAAI;AAAA,QACF,SAAS;AAAA,QACT,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,WAAW;AAAA,MACb;AAAA,MANF,UAAA,CAQE,gBAAA,EAAC,GAAD;AAAA,QAAM,SAAQ;AAAA,QAAM,UAAA;AAAA,MAAgB,CAAA,GACpC,gBAAA,EAAC,GAAD;AAAA,QAAM,OAAM;AAAA,QAAiB,SAAQ;AAAA,QAClC,UAAA;AAAA,MACG,CAAA,CACH;AAAA,IACF,CAAA,CAAA;AAAA;AAET"}
1
+ {"version":3,"file":"SaveAnExtraCard.es.js","names":[],"sources":["../../../src/insights-v2/components/SaveAnExtraCard.tsx"],"sourcesContent":["import Box from '@mui/material/Box'\nimport type { SxProps, Theme } from '@mui/material/styles'\n\nimport { P, Text } from '@mxenabled/mxui'\n\nimport { CURRENCY_FORMAT, formatCurrency } from '../../core/utils/NumberFormatting'\n\ninterface SaveAnExtraCardProps {\n primaryText?: string[]\n /** The white footer's projected amount and caption; omit for the green tile alone (the mini, Figma 17031:312158). */\n secondaryText?: string[]\n bgcolor?: string\n /** Grow to the parent's height, borderless, with the green tile's copy centered (the mini). */\n fill?: boolean\n sx?: SxProps<Theme>\n}\n\nconst SaveAnExtraCard = ({\n primaryText = [],\n secondaryText,\n bgcolor = 'success.main',\n fill = false,\n sx,\n}: SaveAnExtraCardProps) => {\n const [leadIn, amount, trailingCopy] = primaryText\n const [projected, projectedCaption] = secondaryText ?? []\n\n return (\n <Box\n sx={{\n border: '1px solid',\n borderColor: 'success.main',\n borderRadius: 2,\n\n overflow: 'hidden',\n ...(fill && { border: 'none', display: 'flex', flex: 1, flexDirection: 'column' }),\n ...sx,\n }}\n >\n {/* Green header */}\n <Box\n sx={{\n bgcolor,\n color: 'success.contrastText',\n p: 16,\n pt: 12,\n textAlign: 'center',\n ...(fill && {\n display: 'flex',\n flex: 1,\n flexDirection: 'column',\n justifyContent: 'center',\n }),\n }}\n >\n <P color=\"inherit\" variant=\"subtitle1\">\n {leadIn}\n </P>\n <Text bold={true} color=\"inherit\" variant=\"h1\">\n {formatCurrency(Number(amount ?? '0'), CURRENCY_FORMAT.cents)}\n </Text>\n {/* A block, as in Figma: inline, the caption sat on a text line 5px below the amount. */}\n <Text color=\"inherit\" sx={{ display: 'block' }} variant=\"caption\">\n {trailingCopy}\n </Text>\n </Box>\n\n {/* White footer with projected amount. The projected balance arrives\n pre-formatted from the backend (e.g. \"$3,320\"), so render it as-is. */}\n {secondaryText && (\n <Box\n sx={{\n bgcolor: 'background.paper',\n px: 16,\n py: 12,\n textAlign: 'center',\n }}\n >\n <Text variant=\"h3\">{projected}</Text>\n <Text color=\"text.secondary\" variant=\"caption\">\n {projectedCaption}\n </Text>\n </Box>\n )}\n </Box>\n )\n}\n\nexport default SaveAnExtraCard\n"],"mappings":";;;;AAiBA,IAAM,IAAA,CAAmB,EACvB,aAAA,IAAc,CAAC,GACf,eAAA,GACA,SAAA,IAAU,gBACV,MAAA,IAAO,IACP,IAAA,EAAA,MAC0B;AAC1B,QAAM,CAAC,GAAQ,GAAQ,CAAA,IAAgB,GACjC,CAAC,GAAW,CAAA,IAAoB,KAAiB,CAAC;AAExD,SACE,gBAAA,EAAC,GAAD;AAAA,IACE,IAAI;AAAA,MACF,QAAQ;AAAA,MACR,aAAa;AAAA,MACb,cAAc;AAAA,MAEd,UAAU;AAAA,MACV,GAAI,KAAQ;AAAA,QAAE,QAAQ;AAAA,QAAQ,SAAS;AAAA,QAAQ,MAAM;AAAA,QAAG,eAAe;AAAA,MAAS;AAAA,MAChF,GAAG;AAAA,IACL;AAAA,IATF,UAAA,CAYE,gBAAA,EAAC,GAAD;AAAA,MACE,IAAI;AAAA,QACF,SAAA;AAAA,QACA,OAAO;AAAA,QACP,GAAG;AAAA,QACH,IAAI;AAAA,QACJ,WAAW;AAAA,QACX,GAAI,KAAQ;AAAA,UACV,SAAS;AAAA,UACT,MAAM;AAAA,UACN,eAAe;AAAA,UACf,gBAAgB;AAAA,QAClB;AAAA,MACF;AAAA,MAbF,UAAA;AAAA,QAeE,gBAAA,EAAC,GAAD;AAAA,UAAG,OAAM;AAAA,UAAU,SAAQ;AAAA,UACxB,UAAA;AAAA,QACA,CAAA;AAAA,QACH,gBAAA,EAAC,GAAD;AAAA,UAAM,MAAM;AAAA,UAAM,OAAM;AAAA,UAAU,SAAQ;AAAA,UACvC,UAAA,EAAe,OAAO,KAAU,GAAG,GAAG,EAAgB,KAAK;AAAA,QACxD,CAAA;AAAA,QAEN,gBAAA,EAAC,GAAD;AAAA,UAAM,OAAM;AAAA,UAAU,IAAI,EAAE,SAAS,QAAQ;AAAA,UAAG,SAAQ;AAAA,UACrD,UAAA;AAAA,QACG,CAAA;AAAA,MACH;AAAA,IAIJ,CAAA,GAAA,KACC,gBAAA,EAAC,GAAD;AAAA,MACE,IAAI;AAAA,QACF,SAAS;AAAA,QACT,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,WAAW;AAAA,MACb;AAAA,MANF,UAAA,CAQE,gBAAA,EAAC,GAAD;AAAA,QAAM,SAAQ;AAAA,QAAM,UAAA;AAAA,MAAgB,CAAA,GACpC,gBAAA,EAAC,GAAD;AAAA,QAAM,OAAM;AAAA,QAAiB,SAAQ;AAAA,QAClC,UAAA;AAAA,MACG,CAAA,CACH;AAAA,IAEJ,CAAA,CAAA;AAAA;AAET"}
@@ -9,6 +9,7 @@ export interface SubTabsProps {
9
9
  onChange: (index: number) => void;
10
10
  ariaLabel?: string;
11
11
  isTypeFilter?: boolean;
12
+ tabHeight?: number;
12
13
  }
13
14
  /** The tabpanel attributes for the content the sub-tabs control, labelled by the selected tab. */
14
15
  export declare const subTabPanelProps: (id: string, selectedIndex: number) => {
@@ -20,4 +21,4 @@ export declare const subTabPanelProps: (id: string, selectedIndex: number) => {
20
21
  * The drill-down drawers' second tab row (e.g. Spend / Income). Fires pulse's
21
22
  * "Transactions Filtered By Type" on a change, so every drawer that uses it keeps legacy analytics.
22
23
  */
23
- export declare const SubTabs: ({ id, tabs, selectedIndex, onChange, ariaLabel, isTypeFilter, }: SubTabsProps) => import("react/jsx-runtime").JSX.Element | null;
24
+ export declare const SubTabs: ({ id, tabs, selectedIndex, onChange, ariaLabel, isTypeFilter, tabHeight, }: SubTabsProps) => import("react/jsx-runtime").JSX.Element | null;
@@ -1,37 +1,42 @@
1
- import { ANALYTICS_EVENTS_CONFIG as T } from "../analytics/analyticsEventsConfig.es.js";
2
- import { useAnalyticsEvent as f } from "../analytics/useAnalyticsEvent.es.js";
3
- import { jsx as n } from "react/jsx-runtime";
4
- import v from "@mui/material/Tab";
5
- import E from "@mui/material/Tabs";
6
- var i = (a, l) => `${a}-tab-${l}`, o = (a) => `${a}-panel`, _ = (a, l) => ({
7
- "aria-labelledby": i(a, l),
8
- id: o(a),
1
+ import { ANALYTICS_EVENTS_CONFIG as f } from "../analytics/analyticsEventsConfig.es.js";
2
+ import { useAnalyticsEvent as h } from "../analytics/useAnalyticsEvent.es.js";
3
+ import { jsx as o } from "react/jsx-runtime";
4
+ import E from "@mui/material/Tab";
5
+ import d from "@mui/material/Tabs";
6
+ var t = (a, l) => `${a}-tab-${l}`, b = (a) => `${a}-panel`, _ = (a, l) => ({
7
+ "aria-labelledby": t(a, l),
8
+ id: b(a),
9
9
  role: "tabpanel"
10
- }), x = ({ id: a, tabs: l, selectedIndex: t, onChange: b, ariaLabel: m, isTypeFilter: p = !0 }) => {
11
- const s = f();
10
+ }), g = ({ id: a, tabs: l, selectedIndex: m, onChange: s, ariaLabel: p, isTypeFilter: u = !0, tabHeight: i }) => {
11
+ const v = h();
12
12
  if (!l.length) return null;
13
- const u = (r, e) => {
14
- p && s(T.TYPE_FILTER_SELECTED), b(e);
13
+ const r = i != null ? { minHeight: i } : void 0, T = (e, n) => {
14
+ u && v(f.TYPE_FILTER_SELECTED), s(n);
15
15
  };
16
- return /* @__PURE__ */ n(E, {
17
- "aria-label": m ?? l.map((r) => r.label).join(" / "),
18
- onChange: u,
19
- value: t,
16
+ return /* @__PURE__ */ o(d, {
17
+ "aria-label": p ?? l.map((e) => e.label).join(" / "),
18
+ onChange: T,
19
+ sx: r,
20
+ value: m,
20
21
  variant: "fullWidth",
21
- children: l.map((r, e) => /* @__PURE__ */ n(v, {
22
- "aria-controls": o(a),
23
- "aria-label": r.ariaLabel,
24
- id: i(a, e),
25
- label: r.label,
22
+ children: l.map((e, n) => /* @__PURE__ */ o(E, {
23
+ "aria-controls": b(a),
24
+ "aria-label": e.ariaLabel,
25
+ id: t(a, n),
26
+ label: e.label,
26
27
  sx: {
27
28
  minWidth: "auto",
28
- px: 0
29
+ px: 0,
30
+ ...r && {
31
+ ...r,
32
+ py: 0
33
+ }
29
34
  }
30
- }, r.label))
35
+ }, e.label))
31
36
  });
32
37
  };
33
38
  export {
34
- x as SubTabs,
39
+ g as SubTabs,
35
40
  _ as subTabPanelProps
36
41
  };
37
42