@mx-cartographer/experiences 9.7.198 → 9.7.199-alpha-moratorium

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 (83) hide show
  1. package/CHANGELOG.md +7 -1
  2. package/dist/core/types/Insights.d.ts +1 -1
  3. package/dist/core/types/Insights.es.js.map +1 -1
  4. package/dist/core/types/localization/InsightsFeedCopy.d.ts +2 -0
  5. package/dist/insights/components/insights/BillAmountNotStandard/BillAmountNotStandard.es.js +4 -4
  6. package/dist/insights/components/insights/BillAmountNotStandard/BillAmountNotStandardMUI.es.js +4 -4
  7. package/dist/insights/components/insights/MonthlySpendingComparisonV2/MonthlySpendingComparisonV2.es.js +4 -4
  8. package/dist/insights/components/insights/WeeklyNoSpendDays/WeeklyNoSpendDays.es.js +8 -8
  9. package/dist/insights/components/shared/Charts/EmptyBarChart.es.js +4 -4
  10. package/dist/insights/components/shared/ZeroState/LinedCardZeroState.es.js +4 -4
  11. package/dist/insights/index.es.js +84 -84
  12. package/dist/insights-v2/actionBlocks/EmergencySavingsBlock/EmergencySavingsV2.es.js +17 -17
  13. package/dist/insights-v2/actionBlocks/EmergencySavingsBlock/EmergencySavingsV2.es.js.map +1 -1
  14. package/dist/insights-v2/actionBlocks/TopMerchantsBlock/TopMerchantsBlock.d.ts +1 -5
  15. package/dist/insights-v2/actionBlocks/TopMerchantsBlock/TopMerchantsBlock.es.js +37 -36
  16. package/dist/insights-v2/actionBlocks/TopMerchantsBlock/TopMerchantsBlock.es.js.map +1 -1
  17. package/dist/insights-v2/actionBlocks/TransactionDetailsBlock/layout.d.ts +9 -11
  18. package/dist/insights-v2/actionBlocks/TransactionDetailsBlock/layout.es.js +12 -6
  19. package/dist/insights-v2/actionBlocks/TransactionDetailsBlock/layout.es.js.map +1 -1
  20. package/dist/insights-v2/actionBlocks/TransactionListBlock/TransactionListHeaderIconTile.d.ts +3 -1
  21. package/dist/insights-v2/actionBlocks/TransactionListBlock/TransactionListHeaderIconTile.es.js +12 -11
  22. package/dist/insights-v2/actionBlocks/TransactionListBlock/TransactionListHeaderIconTile.es.js.map +1 -1
  23. package/dist/insights-v2/actionBlocks/TransactionListBlock/TransactionListSummaryCard.d.ts +2 -2
  24. package/dist/insights-v2/actionBlocks/TransactionListBlock/TransactionListSummaryCard.es.js +13 -13
  25. package/dist/insights-v2/actionBlocks/TransactionListBlock/TransactionListSummaryCard.es.js.map +1 -1
  26. package/dist/insights-v2/actionBlocks/TransactionListBlock/layout.d.ts +10 -4
  27. package/dist/insights-v2/actionBlocks/TransactionListBlock/layout.es.js +78 -71
  28. package/dist/insights-v2/actionBlocks/TransactionListBlock/layout.es.js.map +1 -1
  29. package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/variants/MilestoneProgress.d.ts +2 -4
  30. package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/variants/MilestoneProgress.es.js +78 -82
  31. package/dist/insights-v2/blocks/ChartBlocks/StepChartBlock/variants/MilestoneProgress.es.js.map +1 -1
  32. package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/layout.es.js +30 -24
  33. package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/layout.es.js.map +1 -1
  34. package/dist/insights-v2/blocks/ComponentBlocks/CompactDirectDepositBlock/CompactDirectDepositBlock.d.ts +7 -0
  35. package/dist/insights-v2/blocks/ComponentBlocks/CompactDirectDepositBlock/CompactDirectDepositBlock.es.js +46 -0
  36. package/dist/insights-v2/blocks/ComponentBlocks/CompactDirectDepositBlock/CompactDirectDepositBlock.es.js.map +1 -0
  37. package/dist/insights-v2/blocks/ComponentBlocks/CompactDirectDepositBlock/index.d.ts +3 -0
  38. package/dist/insights-v2/blocks/ComponentBlocks/CompactDirectDepositBlock/layout.d.ts +10 -0
  39. package/dist/insights-v2/blocks/ComponentBlocks/CompactDirectDepositBlock/layout.es.js +17 -0
  40. package/dist/insights-v2/blocks/ComponentBlocks/CompactDirectDepositBlock/layout.es.js.map +1 -0
  41. package/dist/insights-v2/blocks/ComponentBlocks/DetailedAccountBlock/DetailedAccountBlock.es.js +25 -25
  42. package/dist/insights-v2/blocks/ComponentBlocks/DetailedAccountBlock/DetailedAccountBlock.es.js.map +1 -1
  43. package/dist/insights-v2/blocks/ComponentBlocks/DetailedAccountBlock/layout.d.ts +0 -2
  44. package/dist/insights-v2/blocks/ComponentBlocks/DetailedAccountBlock/layout.es.js +17 -21
  45. package/dist/insights-v2/blocks/ComponentBlocks/DetailedAccountBlock/layout.es.js.map +1 -1
  46. package/dist/insights-v2/blocks/ComponentBlocks/MerchantBlock/MerchantBlock.es.js +46 -63
  47. package/dist/insights-v2/blocks/ComponentBlocks/MerchantBlock/MerchantBlock.es.js.map +1 -1
  48. package/dist/insights-v2/blocks/ComponentBlocks/MerchantBlock/layout.d.ts +3 -3
  49. package/dist/insights-v2/blocks/ComponentBlocks/MerchantBlock/layout.es.js +44 -53
  50. package/dist/insights-v2/blocks/ComponentBlocks/MerchantBlock/layout.es.js.map +1 -1
  51. package/dist/insights-v2/blocks/ComponentBlocks/QuizBlock/QuizBlock.d.ts +1 -1
  52. package/dist/insights-v2/blocks/ComponentBlocks/QuizBlock/QuizBlock.es.js +30 -31
  53. package/dist/insights-v2/blocks/ComponentBlocks/QuizBlock/QuizBlock.es.js.map +1 -1
  54. package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/TransactionBlock.es.js +54 -53
  55. package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/TransactionBlock.es.js.map +1 -1
  56. package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/layout.d.ts +5 -3
  57. package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/layout.es.js +11 -9
  58. package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/layout.es.js.map +1 -1
  59. package/dist/insights-v2/blocks/ComponentBlocks/WeeklySmallPurchasesBlock/WeeklySmallPurchasesBlock.es.js +28 -27
  60. package/dist/insights-v2/blocks/ComponentBlocks/WeeklySmallPurchasesBlock/WeeklySmallPurchasesBlock.es.js.map +1 -1
  61. package/dist/insights-v2/blocks/ComponentBlocks/index.d.ts +1 -0
  62. package/dist/insights-v2/components/AccountHeroCard.d.ts +3 -1
  63. package/dist/insights-v2/components/AccountHeroCard.es.js.map +1 -1
  64. package/dist/insights-v2/components/CompactDirectDepositCard.d.ts +26 -0
  65. package/dist/insights-v2/components/CompactDirectDepositCard.es.js +73 -0
  66. package/dist/insights-v2/components/CompactDirectDepositCard.es.js.map +1 -0
  67. package/dist/insights-v2/components/DirectDepositCard.d.ts +6 -1
  68. package/dist/insights-v2/components/DirectDepositCard.es.js +22 -20
  69. package/dist/insights-v2/components/DirectDepositCard.es.js.map +1 -1
  70. package/dist/insights-v2/components/LogoFromGuid.d.ts +1 -1
  71. package/dist/insights-v2/components/LogoFromGuid.es.js.map +1 -1
  72. package/dist/insights-v2/components/MerchantHighlightCard.es.js +4 -4
  73. package/dist/insights-v2/components/TransactionListCard.d.ts +3 -1
  74. package/dist/insights-v2/components/TransactionListCard.es.js +25 -25
  75. package/dist/insights-v2/components/TransactionListCard.es.js.map +1 -1
  76. package/dist/insights-v2/components/TransferLogoCard.es.js +1 -0
  77. package/dist/insights-v2/components/TransferLogoCard.es.js.map +1 -1
  78. package/dist/insights-v2/index.es.js +120 -116
  79. package/dist/insights-v2/mappings/blocks.es.js +118 -116
  80. package/dist/insights-v2/mappings/blocks.es.js.map +1 -1
  81. package/dist/microinsights/cards/InsightCard.es.js +53 -53
  82. package/dist/microinsights/cards/InsightCard.es.js.map +1 -1
  83. package/package.json +1 -1
@@ -1,20 +1,21 @@
1
1
  import { buildDynamicCopy as x } from "../../../../core/utils/Localization.es.js";
2
2
  import { useGlobalCopyStore as y } from "../../../../common/context/hooks.es.js";
3
- import { CURRENCY_FORMAT as C, formatCurrency as R } from "../../../../core/utils/NumberFormatting.es.js";
4
- import { asNumber as _, slotOrFlat as h } from "../../slotReaders.es.js";
5
- import w, { isLogoGuid as L } from "../../../components/LogoFromGuid.es.js";
3
+ import { slot as C } from "../../../../core/types/Insights.es.js";
4
+ import { CURRENCY_FORMAT as _, formatCurrency as R } from "../../../../core/utils/NumberFormatting.es.js";
5
+ import { asNonEmptyText as w, asNumber as L, slotOrFlat as h } from "../../slotReaders.es.js";
6
+ import O, { isLogoGuid as S } from "../../../components/LogoFromGuid.es.js";
6
7
  import f from "../../../components/LogoTile.es.js";
7
8
  import i from "@mui/material/Stack";
8
9
  import { Text as n } from "@mxenabled/mxui";
9
- import { Icon as O } from "@mxenabled/mx-icons";
10
- import { jsx as o, jsxs as l } from "react/jsx-runtime";
11
- var g = 6, d = 32, S = (r) => typeof r == "object" && r !== null, G = ({ row: r }) => {
12
- if (L(r.logo?.guid)) return /* @__PURE__ */ o(w, {
10
+ import { Icon as G } from "@mxenabled/mx-icons";
11
+ import { jsx as o, jsxs as a } from "react/jsx-runtime";
12
+ var g = 6, c = 32, j = (r) => typeof r == "object" && r !== null, z = ({ row: r }) => {
13
+ if (S(r.logo?.guid)) return /* @__PURE__ */ o(O, {
13
14
  logo: r.logo,
14
- size: d
15
+ size: c
15
16
  });
16
17
  const e = r.logo?.alt;
17
- return /* @__PURE__ */ o(O, {
18
+ return /* @__PURE__ */ o(G, {
18
19
  "aria-hidden": e ? void 0 : !0,
19
20
  "aria-label": e,
20
21
  "data-icon": "storefront",
@@ -23,16 +24,16 @@ var g = 6, d = 32, S = (r) => typeof r == "object" && r !== null, G = ({ row: r
23
24
  size: 20,
24
25
  sx: { color: "text.secondary" }
25
26
  });
26
- }, W = ({ payload: r }) => {
27
- const e = y().insights_feed?.general, { instance_slot: c = {} } = r, m = _(h(c, "amount"));
27
+ }, D = ({ payload: r }) => {
28
+ const e = y().insights_feed?.general, { instance_slot: l = {} } = r, m = L(h(l, "amount"));
28
29
  if (m === void 0) return null;
29
- const p = h(c, "data_series"), t = (Array.isArray(p) ? p : []).filter(S), u = t.length > g ? t.slice(0, 5) : t, a = t.length - u.length, s = x(e?.more_merchants ?? "", `${a}`) || void 0;
30
+ const p = h(l, "data_series"), t = (Array.isArray(p) ? p : []).filter(j), u = t.length > g ? t.slice(0, 5) : t, s = t.length - u.length, d = x(e?.more_merchants ?? "", `${s}`) || void 0;
30
31
  return /* @__PURE__ */ o(i, {
31
32
  sx: {
32
33
  px: 16,
33
34
  width: "100%"
34
35
  },
35
- children: /* @__PURE__ */ l(i, {
36
+ children: /* @__PURE__ */ a(i, {
36
37
  sx: {
37
38
  border: 1,
38
39
  borderColor: "divider",
@@ -42,7 +43,7 @@ var g = 6, d = 32, S = (r) => typeof r == "object" && r !== null, G = ({ row: r
42
43
  pt: 12,
43
44
  px: 16
44
45
  },
45
- children: [/* @__PURE__ */ l(i, {
46
+ children: [/* @__PURE__ */ a(i, {
46
47
  direction: "row",
47
48
  sx: {
48
49
  alignItems: "baseline",
@@ -51,13 +52,13 @@ var g = 6, d = 32, S = (r) => typeof r == "object" && r !== null, G = ({ row: r
51
52
  children: [/* @__PURE__ */ o(n, {
52
53
  component: "p",
53
54
  variant: "h2",
54
- children: R(m, C.cents)
55
+ children: R(m, _.cents)
55
56
  }), /* @__PURE__ */ o(n, {
56
57
  color: "text.secondary",
57
58
  variant: "caption",
58
- children: e?.total
59
+ children: w(C(l.data, "amount_label")) ?? e?.total
59
60
  })]
60
- }), t.length ? /* @__PURE__ */ l(i, {
61
+ }), t.length ? /* @__PURE__ */ a(i, {
61
62
  component: "ul",
62
63
  direction: "row",
63
64
  sx: {
@@ -71,22 +72,22 @@ var g = 6, d = 32, S = (r) => typeof r == "object" && r !== null, G = ({ row: r
71
72
  children: [u.map((b, v) => /* @__PURE__ */ o("li", { children: /* @__PURE__ */ o(f, {
72
73
  borderColor: "divider",
73
74
  borderRadius: 4,
74
- size: d,
75
- children: /* @__PURE__ */ o(G, { row: b })
76
- }) }, v)), a > 0 && /* @__PURE__ */ o("li", { children: /* @__PURE__ */ o(f, {
75
+ size: c,
76
+ children: /* @__PURE__ */ o(z, { row: b })
77
+ }) }, v)), s > 0 && /* @__PURE__ */ o("li", { children: /* @__PURE__ */ o(f, {
77
78
  bgcolor: "action.hover",
78
79
  borderColor: null,
79
80
  borderRadius: 4,
80
- size: d,
81
+ size: c,
81
82
  children: /* @__PURE__ */ o(n, {
82
- "aria-label": s,
83
+ "aria-label": d,
83
84
  bold: !0,
84
85
  color: "text.secondary",
85
- role: s ? "img" : void 0,
86
+ role: d ? "img" : void 0,
86
87
  variant: "body2",
87
- children: /* @__PURE__ */ l("span", {
88
- "aria-hidden": s ? !0 : void 0,
89
- children: ["+", a]
88
+ children: /* @__PURE__ */ a("span", {
89
+ "aria-hidden": d ? !0 : void 0,
90
+ children: ["+", s]
90
91
  })
91
92
  })
92
93
  }) })]
@@ -99,7 +100,7 @@ var g = 6, d = 32, S = (r) => typeof r == "object" && r !== null, G = ({ row: r
99
100
  });
100
101
  };
101
102
  export {
102
- W as default
103
+ D as default
103
104
  };
104
105
 
105
106
  //# sourceMappingURL=WeeklySmallPurchasesBlock.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"WeeklySmallPurchasesBlock.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ComponentBlocks/WeeklySmallPurchasesBlock/WeeklySmallPurchasesBlock.tsx"],"sourcesContent":["import Stack from '@mui/material/Stack'\n\nimport { Text } from '@mxenabled/mxui'\nimport { Icon } from '@mxenabled/mx-icons'\n\nimport { useGlobalCopyStore } from '../../../../common'\nimport type { InstanceSlotRow } from '../../../../core'\nimport { buildDynamicCopy } from '../../../../core/utils/Localization'\nimport { CURRENCY_FORMAT, formatCurrency } from '../../../../core/utils/NumberFormatting'\nimport LogoFromGuid, { isLogoGuid } from '../../../components/LogoFromGuid'\nimport LogoTile from '../../../components/LogoTile'\nimport { asNumber, slotOrFlat } from '../../slotReaders'\nimport type { BlockProps } from '../../types'\n\nconst MAX_LOGOS = 6\nconst LOGO_SIZE = 32\n\nconst isRow = (row: unknown): row is InstanceSlotRow => typeof row === 'object' && row !== null\n\nconst RowLogo = ({ row }: { row: InstanceSlotRow }) => {\n if (isLogoGuid(row.logo?.guid)) return <LogoFromGuid logo={row.logo} size={LOGO_SIZE} />\n\n const alt = row.logo?.alt\n return (\n <Icon\n aria-hidden={alt ? undefined : true}\n aria-label={alt}\n data-icon=\"storefront\"\n name=\"storefront\"\n role={alt ? 'img' : undefined}\n size={20}\n sx={{ color: 'text.secondary' }}\n />\n )\n}\n\nconst WeeklySmallPurchasesBlock = ({ payload }: BlockProps) => {\n const generalCopy = useGlobalCopyStore().insights_feed?.general\n\n const { instance_slot = {} } = payload\n const amount = asNumber(slotOrFlat(instance_slot, 'amount'))\n if (amount === undefined) return null\n\n const rawRows = slotOrFlat(instance_slot, 'data_series')\n const rows = (Array.isArray(rawRows) ? rawRows : []).filter(isRow)\n // Past 6, the last tile becomes \"+N\" so the row stays at 6 tiles like Figma.\n const visibleRows = rows.length > MAX_LOGOS ? rows.slice(0, MAX_LOGOS - 1) : rows\n const overflowCount = rows.length - visibleRows.length\n const moreLabel =\n (buildDynamicCopy(generalCopy?.more_merchants ?? '', `${overflowCount}`) as string) || undefined\n\n return (\n <Stack sx={{ px: 16, width: '100%' }}>\n <Stack\n sx={{\n border: 1,\n borderColor: 'divider',\n borderRadius: '8px',\n gap: 12,\n pb: 16,\n pt: 12,\n px: 16,\n }}\n >\n <Stack direction=\"row\" sx={{ alignItems: 'baseline', gap: 6 }}>\n <Text component=\"p\" variant=\"h2\">\n {formatCurrency(amount, CURRENCY_FORMAT.cents)}\n </Text>\n <Text color=\"text.secondary\" variant=\"caption\">\n {generalCopy?.total}\n </Text>\n </Stack>\n {rows.length ? (\n <Stack\n component=\"ul\"\n direction=\"row\"\n sx={{\n flexWrap: 'wrap',\n gap: 8,\n justifyContent: rows.length >= MAX_LOGOS ? 'space-between' : 'flex-start',\n listStyle: 'none',\n m: 0,\n p: 0,\n }}\n >\n {visibleRows.map((row, index) => (\n // eslint-disable-next-line react/no-array-index-key\n <li key={index}>\n <LogoTile borderColor=\"divider\" borderRadius={4} size={LOGO_SIZE}>\n <RowLogo row={row} />\n </LogoTile>\n </li>\n ))}\n {overflowCount > 0 && (\n <li>\n <LogoTile\n bgcolor=\"action.hover\"\n borderColor={null}\n borderRadius={4}\n size={LOGO_SIZE}\n >\n <Text\n aria-label={moreLabel}\n bold={true}\n color=\"text.secondary\"\n role={moreLabel ? 'img' : undefined}\n variant=\"body2\"\n >\n <span aria-hidden={moreLabel ? true : undefined}>+{overflowCount}</span>\n </Text>\n </LogoTile>\n </li>\n )}\n </Stack>\n ) : (\n <Text color=\"text.secondary\" variant=\"body2\">\n {generalCopy?.no_small_purchases_found}\n </Text>\n )}\n </Stack>\n </Stack>\n )\n}\n\nexport default WeeklySmallPurchasesBlock\n"],"mappings":"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"}
1
+ {"version":3,"file":"WeeklySmallPurchasesBlock.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ComponentBlocks/WeeklySmallPurchasesBlock/WeeklySmallPurchasesBlock.tsx"],"sourcesContent":["import Stack from '@mui/material/Stack'\n\nimport { Text } from '@mxenabled/mxui'\nimport { Icon } from '@mxenabled/mx-icons'\n\nimport { useGlobalCopyStore } from '../../../../common'\nimport { slot, type InstanceSlotRow } from '../../../../core'\nimport { buildDynamicCopy } from '../../../../core/utils/Localization'\nimport { CURRENCY_FORMAT, formatCurrency } from '../../../../core/utils/NumberFormatting'\nimport LogoFromGuid, { isLogoGuid } from '../../../components/LogoFromGuid'\nimport LogoTile from '../../../components/LogoTile'\nimport { asNonEmptyText, asNumber, slotOrFlat } from '../../slotReaders'\nimport type { BlockProps } from '../../types'\n\nconst MAX_LOGOS = 6\nconst LOGO_SIZE = 32\n\nconst isRow = (row: unknown): row is InstanceSlotRow => typeof row === 'object' && row !== null\n\nconst RowLogo = ({ row }: { row: InstanceSlotRow }) => {\n if (isLogoGuid(row.logo?.guid)) return <LogoFromGuid logo={row.logo} size={LOGO_SIZE} />\n\n const alt = row.logo?.alt\n return (\n <Icon\n aria-hidden={alt ? undefined : true}\n aria-label={alt}\n data-icon=\"storefront\"\n name=\"storefront\"\n role={alt ? 'img' : undefined}\n size={20}\n sx={{ color: 'text.secondary' }}\n />\n )\n}\n\nconst WeeklySmallPurchasesBlock = ({ payload }: BlockProps) => {\n const generalCopy = useGlobalCopyStore().insights_feed?.general\n\n const { instance_slot = {} } = payload\n const amount = asNumber(slotOrFlat(instance_slot, 'amount'))\n if (amount === undefined) return null\n\n const rawRows = slotOrFlat(instance_slot, 'data_series')\n const rows = (Array.isArray(rawRows) ? rawRows : []).filter(isRow)\n // Past 6, the last tile becomes \"+N\" so the row stays at 6 tiles like Figma.\n const visibleRows = rows.length > MAX_LOGOS ? rows.slice(0, MAX_LOGOS - 1) : rows\n const overflowCount = rows.length - visibleRows.length\n const moreLabel =\n (buildDynamicCopy(generalCopy?.more_merchants ?? '', `${overflowCount}`) as string) || undefined\n\n return (\n <Stack sx={{ px: 16, width: '100%' }}>\n <Stack\n sx={{\n border: 1,\n borderColor: 'divider',\n borderRadius: '8px',\n gap: 12,\n pb: 16,\n pt: 12,\n px: 16,\n }}\n >\n <Stack direction=\"row\" sx={{ alignItems: 'baseline', gap: 6 }}>\n <Text component=\"p\" variant=\"h2\">\n {formatCurrency(amount, CURRENCY_FORMAT.cents)}\n </Text>\n <Text color=\"text.secondary\" variant=\"caption\">\n {/* V2 only: V1 payloads never carried the label, so there is no flat fallback. */}\n {asNonEmptyText(slot(instance_slot.data, 'amount_label')) ?? generalCopy?.total}\n </Text>\n </Stack>\n {rows.length ? (\n <Stack\n component=\"ul\"\n direction=\"row\"\n sx={{\n flexWrap: 'wrap',\n gap: 8,\n justifyContent: rows.length >= MAX_LOGOS ? 'space-between' : 'flex-start',\n listStyle: 'none',\n m: 0,\n p: 0,\n }}\n >\n {visibleRows.map((row, index) => (\n // eslint-disable-next-line react/no-array-index-key\n <li key={index}>\n <LogoTile borderColor=\"divider\" borderRadius={4} size={LOGO_SIZE}>\n <RowLogo row={row} />\n </LogoTile>\n </li>\n ))}\n {overflowCount > 0 && (\n <li>\n <LogoTile\n bgcolor=\"action.hover\"\n borderColor={null}\n borderRadius={4}\n size={LOGO_SIZE}\n >\n <Text\n aria-label={moreLabel}\n bold={true}\n color=\"text.secondary\"\n role={moreLabel ? 'img' : undefined}\n variant=\"body2\"\n >\n <span aria-hidden={moreLabel ? true : undefined}>+{overflowCount}</span>\n </Text>\n </LogoTile>\n </li>\n )}\n </Stack>\n ) : (\n <Text color=\"text.secondary\" variant=\"body2\">\n {generalCopy?.no_small_purchases_found}\n </Text>\n )}\n </Stack>\n </Stack>\n )\n}\n\nexport default WeeklySmallPurchasesBlock\n"],"mappings":"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"}
@@ -1,6 +1,7 @@
1
1
  export * from './AccountBlock';
2
2
  export * from './AccountSwitchBlock';
3
3
  export * from './BudgetBlock';
4
+ export * from './CompactDirectDepositBlock';
4
5
  export * from './DebtsBlock';
5
6
  export * from './DetailedAccountBlock';
6
7
  export * from './GasPurchaseBlock';
@@ -35,7 +35,9 @@ interface AccountHeroCardProps {
35
35
  * gradient + confetti) slot.
36
36
  *
37
37
  * Figma: Set Up Direct Deposit (default + complete) and Switch Direct Deposit
38
- * (complete) Content. Scope is the Content section only.
38
+ * (complete) Content. Scope is the Content section only. The mini (compact)
39
+ * layout is a separate component, `CompactDirectDepositCard` — not a mode of
40
+ * this one.
39
41
  */
40
42
  declare const AccountHeroCard: ({ backdrop, backgroundImage, bgcolor, logo, name, nameVariant, status, subtitle, sx, }: AccountHeroCardProps) => import("react/jsx-runtime").JSX.Element;
41
43
  export default AccountHeroCard;
@@ -1 +1 @@
1
- {"version":3,"file":"AccountHeroCard.es.js","names":[],"sources":["../../../src/insights-v2/components/AccountHeroCard.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\n\nimport Box from '@mui/material/Box'\nimport Stack from '@mui/material/Stack'\nimport type { SxProps } from '@mui/material/styles'\n\nimport { Text } from '@mxenabled/mxui'\n\nimport { getLogoElevation } from './logoShadow'\n\n// Figma: the logo overhangs the white card's top edge by 25px and the slot pads\n// 16px above that overhang (so `pt = overhang + 16`).\nconst LOGO_OVERHANG = 25\n\ninterface AccountHeroCardProps {\n /** Central account/institution logo, rendered overhanging the card's top edge. */\n logo: ReactNode\n /** Primary line, e.g. \"Epic Bank Checking, *1234\". */\n name: ReactNode\n /** Optional secondary line beneath the name, e.g. \"Checking Account\". */\n subtitle?: ReactNode\n /**\n * Name typography. Figma: Set Up/Switch Direct Deposit use body2 metrics\n * (13px / lh 16, default); Missing Interest Rate uses body1 (15px / lh 20).\n * Both render at weight 600.\n */\n nameVariant?: 'body1' | 'body2'\n /** Status element beneath the text (e.g. a `<StatusPill>`). */\n status?: ReactNode\n /** Decorative backdrop behind the card (e.g. a `<Confetti>` burst). */\n backdrop?: ReactNode\n /** Slot surface color token. Default `primary.lighter` (Figma's tinted slot,\n * theme-aware: light-blue in light mode, navy in dark). */\n bgcolor?: string\n /**\n * Optional decorative wash layered over `bgcolor` (e.g. a celebration\n * gradient). Figma's gradient is ~20% opacity over a white base, so this is a\n * `backgroundImage` on top of `bgcolor`, not a replacement — pass\n * `bgcolor=\"background.paper\"` with it for the complete state.\n */\n backgroundImage?: string\n sx?: SxProps\n}\n\n/**\n * A centered account hero: an overhanging institution logo above a white card\n * with a name, optional subtitle, and a status slot, over a tinted (or\n * gradient + confetti) slot.\n *\n * Figma: Set Up Direct Deposit (default + complete) and Switch Direct Deposit\n * (complete) Content. Scope is the Content section only.\n */\nconst AccountHeroCard = ({\n backdrop,\n backgroundImage,\n bgcolor = 'primary.lighter',\n logo,\n name,\n nameVariant = 'body2',\n status,\n subtitle,\n sx,\n}: AccountHeroCardProps) => (\n <Box\n sx={{\n alignItems: 'center',\n bgcolor,\n ...(backgroundImage && { backgroundImage }),\n display: 'flex',\n flexDirection: 'column',\n pb: 16,\n position: 'relative',\n pt: LOGO_OVERHANG + 16,\n px: 16,\n width: '100%',\n ...sx,\n }}\n >\n {backdrop && (\n <Box aria-hidden={true} sx={{ inset: 0, position: 'absolute', zIndex: 0 }}>\n {backdrop}\n </Box>\n )}\n <Stack\n sx={{\n alignItems: 'center',\n // Theme-aware card surface (white in light, dark surface in dark) — not\n // `common.white`, which stays white and breaks dark mode.\n bgcolor: 'background.paper',\n borderRadius: '8px',\n // Figma: soft card drop-shadow (0 2px 8px rgba(0,0,0,0.12)).\n boxShadow: getLogoElevation,\n gap: 16,\n pb: 16,\n position: 'relative',\n pt: 36,\n px: 16,\n width: '100%',\n zIndex: 1,\n }}\n >\n <Box\n sx={{\n display: 'flex',\n left: '50%',\n position: 'absolute',\n top: -LOGO_OVERHANG,\n transform: 'translateX(-50%)',\n }}\n >\n {logo}\n </Box>\n <Stack sx={{ alignItems: 'center', gap: 12, minWidth: 0, width: '100%' }}>\n <Stack sx={{ alignItems: 'center', minWidth: 0, width: '100%' }}>\n {/* Figma name style: body2 (13/16) or body1 (15/20) metrics at weight\n 600. MXUI `bold` renders 700, so set fontWeight explicitly. A long name\n wraps, centred, across the card's width. */}\n <Text sx={{ fontWeight: 600, textAlign: 'center' }} variant={nameVariant}>\n {name}\n </Text>\n {subtitle && (\n <Text color=\"text.secondary\" truncate={true} variant=\"caption\">\n {subtitle}\n </Text>\n )}\n </Stack>\n {/* Center the status regardless of its own alignment (StatusPill\n defaults to `alignSelf: flex-start` for left-aligned contexts). */}\n {status && (\n <Box sx={{ display: 'flex', justifyContent: 'center', width: '100%' }}>{status}</Box>\n )}\n </Stack>\n </Stack>\n </Box>\n)\n\nexport default AccountHeroCard\n"],"mappings":";;;;;AAoDA,IAAM,IAAA,CAAmB,EACvB,UAAA,GACA,iBAAA,GACA,SAAA,IAAU,mBACV,MAAA,GACA,MAAA,GACA,aAAA,IAAc,SACd,QAAA,GACA,UAAA,GACA,IAAA,EAAA,MAEA,gBAAA,EAAC,GAAD;AAAA,EACE,IAAI;AAAA,IACF,YAAY;AAAA,IACZ,SAAA;AAAA,IACA,GAAI,KAAmB,EAAE,iBAAA,EAAgB;AAAA,IACzC,SAAS;AAAA,IACT,eAAe;AAAA,IACf,IAAI;AAAA,IACJ,UAAU;AAAA,IACV,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,OAAO;AAAA,IACP,GAAG;AAAA,EACL;AAAA,EAbF,UAAA,CAeG,KACC,gBAAA,EAAC,GAAD;AAAA,IAAK,eAAa;AAAA,IAAM,IAAI;AAAA,MAAE,OAAO;AAAA,MAAG,UAAU;AAAA,MAAY,QAAQ;AAAA,IAAE;AAAA,IACrE,UAAA;AAAA,EACE,CAAA,GAEP,gBAAA,EAAC,GAAD;AAAA,IACE,IAAI;AAAA,MACF,YAAY;AAAA,MAGZ,SAAS;AAAA,MACT,cAAc;AAAA,MAEd,WAAW;AAAA,MACX,KAAK;AAAA,MACL,IAAI;AAAA,MACJ,UAAU;AAAA,MACV,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,OAAO;AAAA,MACP,QAAQ;AAAA,IACV;AAAA,IAhBF,UAAA,CAkBE,gBAAA,EAAC,GAAD;AAAA,MACE,IAAI;AAAA,QACF,SAAS;AAAA,QACT,MAAM;AAAA,QACN,UAAU;AAAA,QACV,KAAK;AAAA,QACL,WAAW;AAAA,MACb;AAAA,MAEC,UAAA;AAAA,IACE,CAAA,GACL,gBAAA,EAAC,GAAD;AAAA,MAAO,IAAI;AAAA,QAAE,YAAY;AAAA,QAAU,KAAK;AAAA,QAAI,UAAU;AAAA,QAAG,OAAO;AAAA,MAAO;AAAA,MAAvE,UAAA,CACE,gBAAA,EAAC,GAAD;AAAA,QAAO,IAAI;AAAA,UAAE,YAAY;AAAA,UAAU,UAAU;AAAA,UAAG,OAAO;AAAA,QAAO;AAAA,QAA9D,UAAA,CAIE,gBAAA,EAAC,GAAD;AAAA,UAAM,IAAI;AAAA,YAAE,YAAY;AAAA,YAAK,WAAW;AAAA,UAAS;AAAA,UAAG,SAAS;AAAA,UAC1D,UAAA;AAAA,QACG,CAAA,GACL,KACC,gBAAA,EAAC,GAAD;AAAA,UAAM,OAAM;AAAA,UAAiB,UAAU;AAAA,UAAM,SAAQ;AAAA,UAClD,UAAA;AAAA,QACG,CAAA,CAEH;AAAA,MAGN,CAAA,GAAA,KACC,gBAAA,EAAC,GAAD;AAAA,QAAK,IAAI;AAAA,UAAE,SAAS;AAAA,UAAQ,gBAAgB;AAAA,UAAU,OAAO;AAAA,QAAO;AAAA,QAAI,UAAA;AAAA,MAAY,CAAA,CAEjF;AAAA,IACF,CAAA,CAAA;AAAA,EACJ,CAAA,CAAA"}
1
+ {"version":3,"file":"AccountHeroCard.es.js","names":[],"sources":["../../../src/insights-v2/components/AccountHeroCard.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\n\nimport Box from '@mui/material/Box'\nimport Stack from '@mui/material/Stack'\nimport type { SxProps } from '@mui/material/styles'\n\nimport { Text } from '@mxenabled/mxui'\n\nimport { getLogoElevation } from './logoShadow'\n\n// Figma: the logo overhangs the white card's top edge by 25px and the slot pads\n// 16px above that overhang (so `pt = overhang + 16`).\nconst LOGO_OVERHANG = 25\n\ninterface AccountHeroCardProps {\n /** Central account/institution logo, rendered overhanging the card's top edge. */\n logo: ReactNode\n /** Primary line, e.g. \"Epic Bank Checking, *1234\". */\n name: ReactNode\n /** Optional secondary line beneath the name, e.g. \"Checking Account\". */\n subtitle?: ReactNode\n /**\n * Name typography. Figma: Set Up/Switch Direct Deposit use body2 metrics\n * (13px / lh 16, default); Missing Interest Rate uses body1 (15px / lh 20).\n * Both render at weight 600.\n */\n nameVariant?: 'body1' | 'body2'\n /** Status element beneath the text (e.g. a `<StatusPill>`). */\n status?: ReactNode\n /** Decorative backdrop behind the card (e.g. a `<Confetti>` burst). */\n backdrop?: ReactNode\n /** Slot surface color token. Default `primary.lighter` (Figma's tinted slot,\n * theme-aware: light-blue in light mode, navy in dark). */\n bgcolor?: string\n /**\n * Optional decorative wash layered over `bgcolor` (e.g. a celebration\n * gradient). Figma's gradient is ~20% opacity over a white base, so this is a\n * `backgroundImage` on top of `bgcolor`, not a replacement — pass\n * `bgcolor=\"background.paper\"` with it for the complete state.\n */\n backgroundImage?: string\n sx?: SxProps\n}\n\n/**\n * A centered account hero: an overhanging institution logo above a white card\n * with a name, optional subtitle, and a status slot, over a tinted (or\n * gradient + confetti) slot.\n *\n * Figma: Set Up Direct Deposit (default + complete) and Switch Direct Deposit\n * (complete) Content. Scope is the Content section only. The mini (compact)\n * layout is a separate component, `CompactDirectDepositCard` — not a mode of\n * this one.\n */\nconst AccountHeroCard = ({\n backdrop,\n backgroundImage,\n bgcolor = 'primary.lighter',\n logo,\n name,\n nameVariant = 'body2',\n status,\n subtitle,\n sx,\n}: AccountHeroCardProps) => (\n <Box\n sx={{\n alignItems: 'center',\n bgcolor,\n ...(backgroundImage && { backgroundImage }),\n display: 'flex',\n flexDirection: 'column',\n pb: 16,\n position: 'relative',\n pt: LOGO_OVERHANG + 16,\n px: 16,\n width: '100%',\n ...sx,\n }}\n >\n {backdrop && (\n <Box aria-hidden={true} sx={{ inset: 0, position: 'absolute', zIndex: 0 }}>\n {backdrop}\n </Box>\n )}\n <Stack\n sx={{\n alignItems: 'center',\n // Theme-aware card surface (white in light, dark surface in dark) — not\n // `common.white`, which stays white and breaks dark mode.\n bgcolor: 'background.paper',\n borderRadius: '8px',\n // Figma: soft card drop-shadow (0 2px 8px rgba(0,0,0,0.12)).\n boxShadow: getLogoElevation,\n gap: 16,\n pb: 16,\n position: 'relative',\n pt: 36,\n px: 16,\n width: '100%',\n zIndex: 1,\n }}\n >\n <Box\n sx={{\n display: 'flex',\n left: '50%',\n position: 'absolute',\n top: -LOGO_OVERHANG,\n transform: 'translateX(-50%)',\n }}\n >\n {logo}\n </Box>\n <Stack sx={{ alignItems: 'center', gap: 12, minWidth: 0, width: '100%' }}>\n <Stack sx={{ alignItems: 'center', minWidth: 0, width: '100%' }}>\n {/* Figma name style: body2 (13/16) or body1 (15/20) metrics at weight\n 600. MXUI `bold` renders 700, so set fontWeight explicitly. A long name\n wraps, centred, across the card's width. */}\n <Text sx={{ fontWeight: 600, textAlign: 'center' }} variant={nameVariant}>\n {name}\n </Text>\n {subtitle && (\n <Text color=\"text.secondary\" truncate={true} variant=\"caption\">\n {subtitle}\n </Text>\n )}\n </Stack>\n {/* Center the status regardless of its own alignment (StatusPill\n defaults to `alignSelf: flex-start` for left-aligned contexts). */}\n {status && (\n <Box sx={{ display: 'flex', justifyContent: 'center', width: '100%' }}>{status}</Box>\n )}\n </Stack>\n </Stack>\n </Box>\n)\n\nexport default AccountHeroCard\n"],"mappings":";;;;;AAsDA,IAAM,IAAA,CAAmB,EACvB,UAAA,GACA,iBAAA,GACA,SAAA,IAAU,mBACV,MAAA,GACA,MAAA,GACA,aAAA,IAAc,SACd,QAAA,GACA,UAAA,GACA,IAAA,EAAA,MAEA,gBAAA,EAAC,GAAD;AAAA,EACE,IAAI;AAAA,IACF,YAAY;AAAA,IACZ,SAAA;AAAA,IACA,GAAI,KAAmB,EAAE,iBAAA,EAAgB;AAAA,IACzC,SAAS;AAAA,IACT,eAAe;AAAA,IACf,IAAI;AAAA,IACJ,UAAU;AAAA,IACV,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,OAAO;AAAA,IACP,GAAG;AAAA,EACL;AAAA,EAbF,UAAA,CAeG,KACC,gBAAA,EAAC,GAAD;AAAA,IAAK,eAAa;AAAA,IAAM,IAAI;AAAA,MAAE,OAAO;AAAA,MAAG,UAAU;AAAA,MAAY,QAAQ;AAAA,IAAE;AAAA,IACrE,UAAA;AAAA,EACE,CAAA,GAEP,gBAAA,EAAC,GAAD;AAAA,IACE,IAAI;AAAA,MACF,YAAY;AAAA,MAGZ,SAAS;AAAA,MACT,cAAc;AAAA,MAEd,WAAW;AAAA,MACX,KAAK;AAAA,MACL,IAAI;AAAA,MACJ,UAAU;AAAA,MACV,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,OAAO;AAAA,MACP,QAAQ;AAAA,IACV;AAAA,IAhBF,UAAA,CAkBE,gBAAA,EAAC,GAAD;AAAA,MACE,IAAI;AAAA,QACF,SAAS;AAAA,QACT,MAAM;AAAA,QACN,UAAU;AAAA,QACV,KAAK;AAAA,QACL,WAAW;AAAA,MACb;AAAA,MAEC,UAAA;AAAA,IACE,CAAA,GACL,gBAAA,EAAC,GAAD;AAAA,MAAO,IAAI;AAAA,QAAE,YAAY;AAAA,QAAU,KAAK;AAAA,QAAI,UAAU;AAAA,QAAG,OAAO;AAAA,MAAO;AAAA,MAAvE,UAAA,CACE,gBAAA,EAAC,GAAD;AAAA,QAAO,IAAI;AAAA,UAAE,YAAY;AAAA,UAAU,UAAU;AAAA,UAAG,OAAO;AAAA,QAAO;AAAA,QAA9D,UAAA,CAIE,gBAAA,EAAC,GAAD;AAAA,UAAM,IAAI;AAAA,YAAE,YAAY;AAAA,YAAK,WAAW;AAAA,UAAS;AAAA,UAAG,SAAS;AAAA,UAC1D,UAAA;AAAA,QACG,CAAA,GACL,KACC,gBAAA,EAAC,GAAD;AAAA,UAAM,OAAM;AAAA,UAAiB,UAAU;AAAA,UAAM,SAAQ;AAAA,UAClD,UAAA;AAAA,QACG,CAAA,CAEH;AAAA,MAGN,CAAA,GAAA,KACC,gBAAA,EAAC,GAAD;AAAA,QAAK,IAAI;AAAA,UAAE,SAAS;AAAA,UAAQ,gBAAgB;AAAA,UAAU,OAAO;AAAA,QAAO;AAAA,QAAI,UAAA;AAAA,MAAY,CAAA,CAEjF;AAAA,IACF,CAAA,CAAA;AAAA,EACJ,CAAA,CAAA"}
@@ -0,0 +1,26 @@
1
+ import { ReactNode } from 'react';
2
+ import { DirectDepositPillConfig } from './DirectDepositCard';
3
+ export interface CompactDirectDepositCardProps {
4
+ /** Institution/account logo, drawn inline (not overhanging). */
5
+ logo: ReactNode;
6
+ /** Primary line, e.g. "Epic Bank Credit *0987". */
7
+ name: ReactNode;
8
+ /** Optional secondary line, e.g. "Credit Card". */
9
+ subtitle?: ReactNode;
10
+ /** Hero name typography; Missing Interest Rate's mini tile uses `body1`. */
11
+ nameVariant?: 'body1' | 'body2';
12
+ /** Status pill color tokens + optional leading glyph. */
13
+ pill?: DirectDepositPillConfig;
14
+ /** Optional status pill label, e.g. "Unknown Interest Rate (APR)%". */
15
+ statusLabel?: ReactNode;
16
+ /** Slot surface token behind the white card. Default `primary.lighter`. */
17
+ bgcolor?: string;
18
+ /** Decorative wash layered over `bgcolor` (gradient slots). */
19
+ backgroundImage?: string;
20
+ }
21
+ /**
22
+ * The mini-tile Direct Deposit card, rendered by `compact_direct_deposit_block`: the logo inline left
23
+ * of the name, the status pill full width below (Figma: Missing Interest Rate mini, 16769:167465).
24
+ */
25
+ declare const CompactDirectDepositCard: ({ backgroundImage, bgcolor, logo, name, nameVariant, pill, statusLabel, subtitle, }: CompactDirectDepositCardProps) => import("react/jsx-runtime").JSX.Element;
26
+ export default CompactDirectDepositCard;
@@ -0,0 +1,73 @@
1
+ import s from "./StatusPill.es.js";
2
+ import { getLogoElevation as h } from "./logoShadow.es.js";
3
+ import { DIRECT_DEPOSIT_NEUTRAL_PILL as f, directDepositPillIcon as g } from "./DirectDepositCard.es.js";
4
+ import t from "@mui/material/Stack";
5
+ import { Text as n } from "@mxenabled/mxui";
6
+ import { jsx as r, jsxs as e } from "react/jsx-runtime";
7
+ import d from "@mui/material/Box";
8
+ var w = ({ backgroundImage: i, bgcolor: l = "primary.lighter", logo: p, name: x, nameVariant: m = "body2", pill: o = f, statusLabel: a, subtitle: c }) => /* @__PURE__ */ r(d, {
9
+ "data-testid": "compact-direct-deposit-card",
10
+ sx: {
11
+ bgcolor: l,
12
+ ...i && { backgroundImage: i },
13
+ px: 16,
14
+ py: 19,
15
+ width: "100%"
16
+ },
17
+ children: /* @__PURE__ */ e(t, {
18
+ sx: {
19
+ bgcolor: "background.paper",
20
+ borderRadius: "8px",
21
+ boxShadow: h,
22
+ gap: 12,
23
+ p: 16,
24
+ width: "100%"
25
+ },
26
+ children: [/* @__PURE__ */ e(t, {
27
+ sx: {
28
+ alignItems: "center",
29
+ flexDirection: "row",
30
+ gap: 12,
31
+ minWidth: 0
32
+ },
33
+ children: [/* @__PURE__ */ r(d, {
34
+ sx: {
35
+ display: "flex",
36
+ flexShrink: 0
37
+ },
38
+ children: p
39
+ }), /* @__PURE__ */ e(t, {
40
+ sx: { minWidth: 0 },
41
+ children: [/* @__PURE__ */ r(n, {
42
+ sx: { fontWeight: 600 },
43
+ truncate: !0,
44
+ variant: m,
45
+ children: x
46
+ }), c && /* @__PURE__ */ r(n, {
47
+ color: "text.secondary",
48
+ truncate: !0,
49
+ variant: "caption",
50
+ children: c
51
+ })]
52
+ })]
53
+ }), a && /* @__PURE__ */ r(s, {
54
+ bgcolor: o.bgcolor,
55
+ borderColor: o.borderColor,
56
+ icon: g(o),
57
+ label: a,
58
+ labelColor: o.labelColor,
59
+ sx: {
60
+ alignSelf: "stretch",
61
+ border: "none",
62
+ gap: 4,
63
+ justifyContent: "center",
64
+ px: 12
65
+ }
66
+ })]
67
+ })
68
+ });
69
+ export {
70
+ w as default
71
+ };
72
+
73
+ //# sourceMappingURL=CompactDirectDepositCard.es.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CompactDirectDepositCard.es.js","names":[],"sources":["../../../src/insights-v2/components/CompactDirectDepositCard.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\n\nimport Box from '@mui/material/Box'\nimport Stack from '@mui/material/Stack'\n\nimport { Text } from '@mxenabled/mxui'\n\nimport {\n DIRECT_DEPOSIT_NEUTRAL_PILL,\n directDepositPillIcon,\n type DirectDepositPillConfig,\n} from './DirectDepositCard'\nimport { getLogoElevation } from './logoShadow'\nimport StatusPill from './StatusPill'\n\nexport interface CompactDirectDepositCardProps {\n /** Institution/account logo, drawn inline (not overhanging). */\n logo: ReactNode\n /** Primary line, e.g. \"Epic Bank Credit *0987\". */\n name: ReactNode\n /** Optional secondary line, e.g. \"Credit Card\". */\n subtitle?: ReactNode\n /** Hero name typography; Missing Interest Rate's mini tile uses `body1`. */\n nameVariant?: 'body1' | 'body2'\n /** Status pill color tokens + optional leading glyph. */\n pill?: DirectDepositPillConfig\n /** Optional status pill label, e.g. \"Unknown Interest Rate (APR)%\". */\n statusLabel?: ReactNode\n /** Slot surface token behind the white card. Default `primary.lighter`. */\n bgcolor?: string\n /** Decorative wash layered over `bgcolor` (gradient slots). */\n backgroundImage?: string\n}\n\n/**\n * The mini-tile Direct Deposit card, rendered by `compact_direct_deposit_block`: the logo inline left\n * of the name, the status pill full width below (Figma: Missing Interest Rate mini, 16769:167465).\n */\nconst CompactDirectDepositCard = ({\n backgroundImage,\n bgcolor = 'primary.lighter',\n logo,\n name,\n nameVariant = 'body2',\n pill = DIRECT_DEPOSIT_NEUTRAL_PILL,\n statusLabel,\n subtitle,\n}: CompactDirectDepositCardProps) => (\n <Box\n data-testid=\"compact-direct-deposit-card\"\n sx={{\n bgcolor,\n ...(backgroundImage && { backgroundImage }),\n px: 16,\n py: 19,\n width: '100%',\n }}\n >\n <Stack\n sx={{\n bgcolor: 'background.paper',\n borderRadius: '8px',\n boxShadow: getLogoElevation,\n gap: 12,\n p: 16,\n width: '100%',\n }}\n >\n <Stack sx={{ alignItems: 'center', flexDirection: 'row', gap: 12, minWidth: 0 }}>\n <Box sx={{ display: 'flex', flexShrink: 0 }}>{logo}</Box>\n <Stack sx={{ minWidth: 0 }}>\n <Text sx={{ fontWeight: 600 }} truncate={true} variant={nameVariant}>\n {name}\n </Text>\n {subtitle && (\n <Text color=\"text.secondary\" truncate={true} variant=\"caption\">\n {subtitle}\n </Text>\n )}\n </Stack>\n </Stack>\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, full\n // width and centred on the tile (vs. DirectDepositCard's left-aligned, intrinsic-width pill).\n sx={{ alignSelf: 'stretch', border: 'none', gap: 4, justifyContent: 'center', px: 12 }}\n />\n )}\n </Stack>\n </Box>\n)\n\nexport default CompactDirectDepositCard\n"],"mappings":";;;;;;;AAsCA,IAAM,IAAA,CAA4B,EAChC,iBAAA,GACA,SAAA,IAAU,mBACV,MAAA,GACA,MAAA,GACA,aAAA,IAAc,SACd,MAAA,IAAO,GACP,aAAA,GACA,UAAA,EAAA,MAEA,gBAAA,EAAC,GAAD;AAAA,EACE,eAAY;AAAA,EACZ,IAAI;AAAA,IACF,SAAA;AAAA,IACA,GAAI,KAAmB,EAAE,iBAAA,EAAgB;AAAA,IACzC,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,OAAO;AAAA,EACT;AAAA,EAEA,UAAA,gBAAA,EAAC,GAAD;AAAA,IACE,IAAI;AAAA,MACF,SAAS;AAAA,MACT,cAAc;AAAA,MACd,WAAW;AAAA,MACX,KAAK;AAAA,MACL,GAAG;AAAA,MACH,OAAO;AAAA,IACT;AAAA,IARF,UAAA,CAUE,gBAAA,EAAC,GAAD;AAAA,MAAO,IAAI;AAAA,QAAE,YAAY;AAAA,QAAU,eAAe;AAAA,QAAO,KAAK;AAAA,QAAI,UAAU;AAAA,MAAE;AAAA,MAA9E,UAAA,CACE,gBAAA,EAAC,GAAD;AAAA,QAAK,IAAI;AAAA,UAAE,SAAS;AAAA,UAAQ,YAAY;AAAA,QAAE;AAAA,QAAI,UAAA;AAAA,MAAU,CAAA,GACxD,gBAAA,EAAC,GAAD;AAAA,QAAO,IAAI,EAAE,UAAU,EAAE;AAAA,QAAzB,UAAA,CACE,gBAAA,EAAC,GAAD;AAAA,UAAM,IAAI,EAAE,YAAY,IAAI;AAAA,UAAG,UAAU;AAAA,UAAM,SAAS;AAAA,UACrD,UAAA;AAAA,QACG,CAAA,GACL,KACC,gBAAA,EAAC,GAAD;AAAA,UAAM,OAAM;AAAA,UAAiB,UAAU;AAAA,UAAM,SAAQ;AAAA,UAClD,UAAA;AAAA,QACG,CAAA,CAEH;AAAA,MACF,CAAA,CAAA;AAAA,IACN,CAAA,GAAA,KACC,gBAAA,EAAC,GAAD;AAAA,MACE,SAAS,EAAK;AAAA,MACd,aAAa,EAAK;AAAA,MAClB,MAAM,EAAsB,CAAI;AAAA,MAChC,OAAO;AAAA,MACP,YAAY,EAAK;AAAA,MAGjB,IAAI;AAAA,QAAE,WAAW;AAAA,QAAW,QAAQ;AAAA,QAAQ,KAAK;AAAA,QAAG,gBAAgB;AAAA,QAAU,IAAI;AAAA,MAAG;AAAA,IACtF,CAAA,CAEE;AAAA;AACJ,CAAA"}
@@ -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;
@@ -2,40 +2,42 @@ import m from "./StatusPill.es.js";
2
2
  import n from "./AccountHeroCard.es.js";
3
3
  import { ConfettiOverlay as C } from "./shared/ConfettiOverlay.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(n, {
17
+ backdrop: c ? /* @__PURE__ */ e(C, {}) : 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"}
@@ -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,
@@ -12,6 +12,8 @@ interface TransactionListCardProps {
12
12
  header?: ReactNode;
13
13
  /** Theme colour for the header label, over the variant's own. */
14
14
  headerColor?: string;
15
+ /** The header label in the regular weight instead of the `default` variant's bold; no effect on `primary`. */
16
+ headerRegular?: boolean;
15
17
  /** One or more transaction rows. */
16
18
  rows: InsightTransactionRowProps[];
17
19
  /** Optional summary/total row rendered beneath a divider. */
@@ -49,5 +51,5 @@ interface TransactionListCardProps {
49
51
  *
50
52
  * Scope is the Content section only; Header/Description are out of scope.
51
53
  */
52
- declare const TransactionListCard: ({ background, badge, elevated, footer, header, headerColor, raised, rows, variant, sx, }: TransactionListCardProps) => import("react/jsx-runtime").JSX.Element | null;
54
+ declare const TransactionListCard: ({ background, badge, elevated, footer, header, headerColor, headerRegular, raised, rows, variant, sx, }: TransactionListCardProps) => import("react/jsx-runtime").JSX.Element | null;
53
55
  export default TransactionListCard;