@mx-cartographer/experiences 9.7.5 → 9.7.6

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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## [9.7.6] - 10-20-2026
2
+
3
+ - **FIXED** - Payday Cash Left Over Status's off-track full and mini tile draws its money icon (white on the red square), from the `ICO-` logo ditto sends (WEC-1916)
4
+
1
5
  ## [9.7.5] - 10-19-2026
2
6
 
3
7
  - **ADDED** - `GlobalDataProvider` takes an optional `onHostMessage` handler for messages to the host app, and the account filter sends `focusTrap` through it (`trapped: true` on open, `trapped: false` on close), so a native host can hide its own views from the screen reader (MEW-4257)
@@ -1,36 +1,37 @@
1
- import l from "../../../../common/components/IconBacking.es.js";
2
- import { resolveVariantConfig as a } from "../../resolveVariantConfig.es.js";
3
- import { getLayoutConfig as m } from "./layout.es.js";
4
- import u from "../../../components/LogoFromGuid.es.js";
5
- import { InstitutionLogo as g } from "@mxenabled/mxui";
6
- import { Icon as e } from "@mxenabled/mx-icons";
7
- import { jsx as o, jsxs as s } from "react/jsx-runtime";
8
- import { useTheme as f } from "@mui/material/styles";
9
- import { Stack as t } from "@mui/material";
10
- var k = ({ slot: i, variant: c, logo: n }) => {
11
- const d = f(), r = a(m(d), c, "default", "AccountBlock");
12
- return /^INS-[A-Za-z0-9-]+$/.test(n?.guid ?? "") ? /* @__PURE__ */ s(t, {
1
+ import c from "../../../../common/components/IconBacking.es.js";
2
+ import { resolveVariantConfig as u } from "../../resolveVariantConfig.es.js";
3
+ import { getLayoutConfig as g } from "./layout.es.js";
4
+ import f from "../../../components/LogoFromGuid.es.js";
5
+ import { statusIconName as d } from "../../../components/statusIcon.es.js";
6
+ import { InstitutionLogo as p } from "@mxenabled/mxui";
7
+ import { Icon as n } from "@mxenabled/mx-icons";
8
+ import { jsx as r, jsxs as l } from "react/jsx-runtime";
9
+ import { useTheme as b } from "@mui/material/styles";
10
+ import { Stack as a } from "@mui/material";
11
+ var y = ({ slot: i, variant: s, logo: e }) => {
12
+ const m = b(), o = u(g(m), s, "default", "AccountBlock");
13
+ if (/^INS-[A-Za-z0-9-]+$/.test(e?.guid ?? "")) return /* @__PURE__ */ l(a, {
13
14
  sx: {
14
15
  alignItems: "center",
15
16
  flexDirection: "row",
16
17
  position: "relative"
17
18
  },
18
- children: [/* @__PURE__ */ o(u, {
19
- logo: n,
19
+ children: [/* @__PURE__ */ r(f, {
20
+ logo: e,
20
21
  size: 48
21
- }), r.badge && /* @__PURE__ */ o(l, {
22
+ }), o.badge && /* @__PURE__ */ r(c, {
22
23
  size: 20,
23
24
  sx: {
24
25
  position: "absolute",
25
26
  right: -8,
26
27
  top: -8
27
28
  },
28
- children: /* @__PURE__ */ o(e, {
29
+ children: /* @__PURE__ */ r(n, {
29
30
  "aria-hidden": !0,
30
31
  color: "error",
31
32
  "data-testid": "account-block-error-badge",
32
33
  fill: !0,
33
- name: r.badge,
34
+ name: o.badge,
34
35
  size: 20,
35
36
  sx: {
36
37
  gridColumn: 1,
@@ -39,24 +40,25 @@ var k = ({ slot: i, variant: c, logo: n }) => {
39
40
  }
40
41
  })
41
42
  })]
42
- }) : i.institution_guid ? /* @__PURE__ */ s(t, {
43
+ });
44
+ if (i.institution_guid) return /* @__PURE__ */ l(a, {
43
45
  sx: {
44
46
  alignItems: "center",
45
47
  flexDirection: "row",
46
48
  position: "relative"
47
49
  },
48
- children: [/* @__PURE__ */ o(g, {
50
+ children: [/* @__PURE__ */ r(p, {
49
51
  alt: `${i.institution_name}`,
50
52
  institutionGuid: `${i.institution_guid}`,
51
53
  size: 48
52
- }), /* @__PURE__ */ o(l, {
54
+ }), /* @__PURE__ */ r(c, {
53
55
  size: 20,
54
56
  sx: {
55
57
  position: "absolute",
56
58
  right: -8,
57
59
  top: -8
58
60
  },
59
- children: /* @__PURE__ */ o(e, {
61
+ children: /* @__PURE__ */ r(n, {
60
62
  color: "error",
61
63
  fill: !0,
62
64
  name: "error",
@@ -68,29 +70,35 @@ var k = ({ slot: i, variant: c, logo: n }) => {
68
70
  }
69
71
  })
70
72
  })]
71
- }) : i.icon_name ? /* @__PURE__ */ o(t, {
73
+ });
74
+ const t = d(i.icon_name && `ICO-${i.icon_name}`) ?? (o.logo_bGcolor ? d(e?.guid) : void 0);
75
+ return t ? /* @__PURE__ */ r(a, {
76
+ "data-icon": t,
77
+ "data-testid": "account-block-icon-tile",
72
78
  sx: {
73
79
  alignItems: "center",
74
- bgcolor: r.logo_bGcolor,
75
- borderRadius: "6px",
80
+ bgcolor: o.logo_bGcolor,
81
+ borderRadius: o.logo_border_radius ?? "6px",
82
+ flexShrink: 0,
76
83
  height: 48,
77
84
  justifyContent: "center",
78
85
  width: 48,
79
- ...r.logo_border_color && {
80
- borderColor: r.logo_border_color,
86
+ ...o.logo_border_color && {
87
+ borderColor: o.logo_border_color,
81
88
  borderStyle: "solid",
82
89
  borderWidth: 1.5
83
90
  }
84
91
  },
85
- children: /* @__PURE__ */ o(e, {
86
- name: i.icon_name,
92
+ children: /* @__PURE__ */ r(n, {
93
+ "aria-hidden": !0,
94
+ name: t,
87
95
  size: 24,
88
- sx: { color: r.logo_color }
96
+ sx: { color: o.logo_color }
89
97
  })
90
98
  }) : null;
91
99
  };
92
100
  export {
93
- k as IconComponent
101
+ y as IconComponent
94
102
  };
95
103
 
96
104
  //# sourceMappingURL=IconComponent.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"IconComponent.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ComponentBlocks/AccountBlock/IconComponent.tsx"],"sourcesContent":["import { Stack } from '@mui/material'\nimport { Icon } from '@mxenabled/mx-icons'\nimport { InstitutionLogo } from '@mxenabled/mxui'\nimport { IconBacking } from '../../../../common'\nimport { resolveVariantConfig } from '../../resolveVariantConfig'\nimport { getLayoutConfig } from './layout'\nimport { useTheme } from '@mui/material/styles'\nimport type { InstanceSlot, LogoRef } from '../../../../core'\nimport LogoFromGuid from '../../../components/LogoFromGuid'\n\ninterface IconComponentProps {\n slot: InstanceSlot\n variant?: string | null\n /** V2: the slot's logo object (`instance_slot.data.logo`), badged with the layout's `badge`. */\n logo?: LogoRef\n}\n\nexport const IconComponent = ({ slot, variant, logo }: IconComponentProps) => {\n const theme = useTheme()\n const layoutConfig = resolveVariantConfig(\n getLayoutConfig(theme),\n variant,\n 'default',\n 'AccountBlock',\n )\n\n // V2 slot logo: an institution guid only; anything else falls through to the legacy fields.\n if (/^INS-[A-Za-z0-9-]+$/.test(logo?.guid ?? '')) {\n return (\n <Stack sx={{ alignItems: 'center', flexDirection: 'row', position: 'relative' }}>\n <LogoFromGuid logo={logo} size={48} />\n {layoutConfig.badge && (\n <IconBacking size={20} sx={{ position: 'absolute', right: -8, top: -8 }}>\n <Icon\n aria-hidden={true}\n color=\"error\"\n data-testid=\"account-block-error-badge\"\n fill={true}\n name={layoutConfig.badge}\n size={20}\n sx={{ gridColumn: 1, gridRow: 1, zIndex: 2 }}\n />\n </IconBacking>\n )}\n </Stack>\n )\n }\n\n if (slot.institution_guid) {\n return (\n <Stack sx={{ alignItems: 'center', flexDirection: 'row', position: 'relative' }}>\n <InstitutionLogo\n alt={`${slot.institution_name}`}\n institutionGuid={`${slot.institution_guid}`}\n size={48}\n />\n <IconBacking size={20} sx={{ position: 'absolute', right: -8, top: -8 }}>\n <Icon\n color=\"error\"\n fill={true}\n name=\"error\"\n size={20}\n sx={{ gridColumn: 1, gridRow: 1, zIndex: 2 }}\n />\n </IconBacking>\n </Stack>\n )\n }\n\n if (slot.icon_name) {\n return (\n <Stack\n sx={{\n alignItems: 'center',\n bgcolor: layoutConfig.logo_bGcolor,\n borderRadius: '6px',\n height: 48,\n justifyContent: 'center',\n width: 48,\n ...(layoutConfig.logo_border_color && {\n borderColor: layoutConfig.logo_border_color,\n borderStyle: 'solid',\n borderWidth: 1.5,\n }),\n }}\n >\n <Icon\n name={slot.icon_name}\n size={24}\n sx={{\n color: layoutConfig.logo_color,\n }}\n />\n </Stack>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,OAAO;AAAA,QAAI,KAAK;AAAA,MAAG;AAAA,MACpE,UAAA,gBAAA,EAAC,GAAD;AAAA,QACE,OAAM;AAAA,QACN,MAAM;AAAA,QACN,MAAK;AAAA,QACL,MAAM;AAAA,QACN,IAAI;AAAA,UAAE,YAAY;AAAA,UAAG,SAAS;AAAA,UAAG,QAAQ;AAAA,QAAE;AAAA,MAC5C,CAAA;AAAA,IACU,CAAA,CACR;AAAA,OAIP,EAAK,YAEL,gBAAA,EAAC,GAAD;AAAA,IACE,IAAI;AAAA,MACF,YAAY;AAAA,MACZ,SAAS,EAAa;AAAA,MACtB,cAAc;AAAA,MACd,QAAQ;AAAA,MACR,gBAAgB;AAAA,MAChB,OAAO;AAAA,MACP,GAAI,EAAa,qBAAqB;AAAA,QACpC,aAAa,EAAa;AAAA,QAC1B,aAAa;AAAA,QACb,aAAa;AAAA,MACf;AAAA,IACF;AAAA,IAEA,UAAA,gBAAA,EAAC,GAAD;AAAA,MACE,MAAM,EAAK;AAAA,MACX,MAAM;AAAA,MACN,IAAI,EACF,OAAO,EAAa,WACtB;AAAA,IACD,CAAA;AAAA,EACI,CAAA,IAIJ;AACT"}
1
+ {"version":3,"file":"IconComponent.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ComponentBlocks/AccountBlock/IconComponent.tsx"],"sourcesContent":["import { Stack } from '@mui/material'\nimport { Icon } from '@mxenabled/mx-icons'\nimport { InstitutionLogo } from '@mxenabled/mxui'\nimport { IconBacking } from '../../../../common'\nimport { resolveVariantConfig } from '../../resolveVariantConfig'\nimport { getLayoutConfig } from './layout'\nimport { useTheme } from '@mui/material/styles'\nimport type { InstanceSlot, LogoRef } from '../../../../core'\nimport LogoFromGuid from '../../../components/LogoFromGuid'\nimport { statusIconName } from '../../../components/statusIcon'\n\ninterface IconComponentProps {\n slot: InstanceSlot\n variant?: string | null\n /** V2: the slot's logo object (`instance_slot.data.logo`), badged with the layout's `badge`. */\n logo?: LogoRef\n}\n\nexport const IconComponent = ({ slot, variant, logo }: IconComponentProps) => {\n const theme = useTheme()\n const layoutConfig = resolveVariantConfig(\n getLayoutConfig(theme),\n variant,\n 'default',\n 'AccountBlock',\n )\n\n // V2 slot logo: an institution guid only; anything else falls through to the legacy fields.\n if (/^INS-[A-Za-z0-9-]+$/.test(logo?.guid ?? '')) {\n return (\n <Stack sx={{ alignItems: 'center', flexDirection: 'row', position: 'relative' }}>\n <LogoFromGuid logo={logo} size={48} />\n {layoutConfig.badge && (\n <IconBacking size={20} sx={{ position: 'absolute', right: -8, top: -8 }}>\n <Icon\n aria-hidden={true}\n color=\"error\"\n data-testid=\"account-block-error-badge\"\n fill={true}\n name={layoutConfig.badge}\n size={20}\n sx={{ gridColumn: 1, gridRow: 1, zIndex: 2 }}\n />\n </IconBacking>\n )}\n </Stack>\n )\n }\n\n if (slot.institution_guid) {\n return (\n <Stack sx={{ alignItems: 'center', flexDirection: 'row', position: 'relative' }}>\n <InstitutionLogo\n alt={`${slot.institution_name}`}\n institutionGuid={`${slot.institution_guid}`}\n size={48}\n />\n <IconBacking size={20} sx={{ position: 'absolute', right: -8, top: -8 }}>\n <Icon\n color=\"error\"\n fill={true}\n name=\"error\"\n size={20}\n sx={{ gridColumn: 1, gridRow: 1, zIndex: 2 }}\n />\n </IconBacking>\n </Stack>\n )\n }\n\n // The flat `icon_name`, else a V2 `ICO-` logo, both through statusIconName's mx-icons allowlist so\n // an unknown name draws nothing. Drawn here rather than through LogoFromGuid, which fills every\n // `ICO-` glyph. An `ICO-` logo needs a variant that styles the tile, or it would be a bare glyph.\n const iconName =\n statusIconName(slot.icon_name && `ICO-${slot.icon_name}`) ??\n (layoutConfig.logo_bGcolor ? statusIconName(logo?.guid) : undefined)\n if (iconName) {\n return (\n <Stack\n data-icon={iconName}\n data-testid=\"account-block-icon-tile\"\n sx={{\n alignItems: 'center',\n bgcolor: layoutConfig.logo_bGcolor,\n borderRadius: layoutConfig.logo_border_radius ?? '6px',\n flexShrink: 0,\n height: 48,\n justifyContent: 'center',\n width: 48,\n ...(layoutConfig.logo_border_color && {\n borderColor: layoutConfig.logo_border_color,\n borderStyle: 'solid',\n borderWidth: 1.5,\n }),\n }}\n >\n <Icon\n aria-hidden={true}\n name={iconName}\n size={24}\n sx={{ color: layoutConfig.logo_color }}\n />\n </Stack>\n )\n }\n\n return null\n}\n"],"mappings":";;;;;;;;;;AAkBA,IAAa,IAAA,CAAiB,EAAE,MAAA,GAAM,SAAA,GAAS,MAAA,EAAA,MAA+B;AAC5E,QAAM,IAAQ,EAAS,GACjB,IAAe,EACnB,EAAgB,CAAK,GACrB,GACA,WACA,cACF;AAGA,MAAI,sBAAsB,KAAK,GAAM,QAAQ,EAAE,EAC7C,QACE,gBAAA,EAAC,GAAD;AAAA,IAAO,IAAI;AAAA,MAAE,YAAY;AAAA,MAAU,eAAe;AAAA,MAAO,UAAU;AAAA,IAAW;AAAA,IAA9E,UAAA,CACE,gBAAA,EAAC,GAAD;AAAA,MAAoB,MAAA;AAAA,MAAM,MAAM;AAAA,IAAK,CAAA,GACpC,EAAa,SACZ,gBAAA,EAAC,GAAD;AAAA,MAAa,MAAM;AAAA,MAAI,IAAI;AAAA,QAAE,UAAU;AAAA,QAAY,OAAO;AAAA,QAAI,KAAK;AAAA,MAAG;AAAA,MACpE,UAAA,gBAAA,EAAC,GAAD;AAAA,QACE,eAAa;AAAA,QACb,OAAM;AAAA,QACN,eAAY;AAAA,QACZ,MAAM;AAAA,QACN,MAAM,EAAa;AAAA,QACnB,MAAM;AAAA,QACN,IAAI;AAAA,UAAE,YAAY;AAAA,UAAG,SAAS;AAAA,UAAG,QAAQ;AAAA,QAAE;AAAA,MAC5C,CAAA;AAAA,IACU,CAAA,CAEV;AAAA;AAIX,MAAI,EAAK,iBACP,QACE,gBAAA,EAAC,GAAD;AAAA,IAAO,IAAI;AAAA,MAAE,YAAY;AAAA,MAAU,eAAe;AAAA,MAAO,UAAU;AAAA,IAAW;AAAA,IAA9E,UAAA,CACE,gBAAA,EAAC,GAAD;AAAA,MACE,KAAK,GAAG,EAAK,gBAAA;AAAA,MACb,iBAAiB,GAAG,EAAK,gBAAA;AAAA,MACzB,MAAM;AAAA,IACP,CAAA,GACD,gBAAA,EAAC,GAAD;AAAA,MAAa,MAAM;AAAA,MAAI,IAAI;AAAA,QAAE,UAAU;AAAA,QAAY,OAAO;AAAA,QAAI,KAAK;AAAA,MAAG;AAAA,MACpE,UAAA,gBAAA,EAAC,GAAD;AAAA,QACE,OAAM;AAAA,QACN,MAAM;AAAA,QACN,MAAK;AAAA,QACL,MAAM;AAAA,QACN,IAAI;AAAA,UAAE,YAAY;AAAA,UAAG,SAAS;AAAA,UAAG,QAAQ;AAAA,QAAE;AAAA,MAC5C,CAAA;AAAA,IACU,CAAA,CACR;AAAA;AAOX,QAAM,IACJ,EAAe,EAAK,aAAa,OAAO,EAAK,SAAA,EAAW,MACvD,EAAa,eAAe,EAAe,GAAM,IAAI,IAAI;AAC5D,SAAI,IAEA,gBAAA,EAAC,GAAD;AAAA,IACE,aAAW;AAAA,IACX,eAAY;AAAA,IACZ,IAAI;AAAA,MACF,YAAY;AAAA,MACZ,SAAS,EAAa;AAAA,MACtB,cAAc,EAAa,sBAAsB;AAAA,MACjD,YAAY;AAAA,MACZ,QAAQ;AAAA,MACR,gBAAgB;AAAA,MAChB,OAAO;AAAA,MACP,GAAI,EAAa,qBAAqB;AAAA,QACpC,aAAa,EAAa;AAAA,QAC1B,aAAa;AAAA,QACb,aAAa;AAAA,MACf;AAAA,IACF;AAAA,IAEA,UAAA,gBAAA,EAAC,GAAD;AAAA,MACE,eAAa;AAAA,MACb,MAAM;AAAA,MACN,MAAM;AAAA,MACN,IAAI,EAAE,OAAO,EAAa,WAAW;AAAA,IACtC,CAAA;AAAA,EACI,CAAA,IAIJ;AACT"}
@@ -5,6 +5,8 @@ export interface BlockLayoutConfig {
5
5
  logo_color?: string;
6
6
  logo_bGcolor?: string;
7
7
  logo_border_color?: string;
8
+ /** Corner radius of the icon tile (`icon_name` or an `ICO-` logo). Defaults to 6px. */
9
+ logo_border_radius?: string;
8
10
  /** mx-icons glyph shown before `sub_text` (e.g. a warning icon on overdraft_warning). */
9
11
  sub_logo?: string;
10
12
  /** mx-icons glyph badged on the logo's corner (e.g. `error` on Low Account Balance's V2 tile). */
@@ -16,6 +16,7 @@ var i = { background: "linear-gradient(256.82deg, rgba(255, 47, 40, 0.2) 1.86%,
16
16
  status_off_track: {
17
17
  logo_color: "background.paper",
18
18
  logo_bGcolor: "error.main",
19
+ logo_border_radius: "4px",
19
20
  background: "linear-gradient(256.82deg, rgba(255, 47, 40, 0.2) 1.86%, rgba(255, 0, 72, 0.2) 101.54%)"
20
21
  },
21
22
  interest_charges_summary: {
@@ -1 +1 @@
1
- {"version":3,"file":"layout.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ComponentBlocks/AccountBlock/layout.ts"],"sourcesContent":["import { alpha, type SxProps, type Theme } from '@mui/material/styles'\n\nimport {\n CELEBRATION_GRADIENT,\n WARM_LIME_ACCENT_GRADIENT,\n} from '../../../components/celebrationGradients'\nimport type { DirectDepositCardStyleProps } from '../../../components/DirectDepositCard'\n\nimport {\n directDepositVariant,\n getLayoutConfig as getDirectDepositLayoutConfig,\n} from '../DirectDepositBlock/layout'\n\nexport interface BlockLayoutConfig {\n background?: string\n logo_color?: string\n logo_bGcolor?: string\n logo_border_color?: string\n /** mx-icons glyph shown before `sub_text` (e.g. a warning icon on overdraft_warning). */\n sub_logo?: string\n /** mx-icons glyph badged on the logo's corner (e.g. `error` on Low Account Balance's V2 tile). */\n badge?: string\n /** When true, AccountBlock renders the confetti-backed celebration card using the fields below. */\n isConfetti?: boolean\n /** Gradient wash layered over `background.paper` for the confetti card. */\n gradient?: string\n /** Which illustration sits left of the text. `logo` is the data-driven merchant/institution logo. */\n graphic?: 'paidOffCard' | 'savings' | 'logo'\n /** Amount typography variant — `h2` for milestones, `h3` for deposits. */\n amountVariant?: 'h2' | 'h3'\n /** Prefix prepended to the formatted amount, e.g. `+` for deposits. */\n amountPrefix?: string\n /** Render the colored category strip (`header_text`) at the top of the card. */\n categoryStrip?: boolean\n /** Layout overrides for the graphic+text row (padding, gap). */\n rowSx?: SxProps\n /** Which payload field feeds the secondary line beside the amount. */\n secondarySource?: 'merchant' | 'label'\n /** Whether the secondary line sits above or below the amount. */\n secondaryPosition?: 'above' | 'below'\n /** Typography variant for the secondary line. */\n secondaryVariant?: 'body2' | 'caption'\n /** Theme color path for the secondary line. */\n secondaryColor?: string\n /**\n * When true, AccountBlock renders the \"Detailed\" account hero (overhanging institution logo,\n * account name + type, status pill) through `DirectDepositCard`, styled by `detailed`.\n */\n isDetailed?: boolean\n /** Hero card style props for the detailed variants. */\n detailed?: DirectDepositCardStyleProps\n}\n\n// Low Account Balance's red tile, shared by its legacy (`low_balance_alert`) and V2 (`low_balance`)\n// variant names.\nconst LOW_BALANCE_TILE: BlockLayoutConfig = {\n background:\n 'linear-gradient(256.82deg, rgba(255, 47, 40, 0.2) 1.86%, rgba(255, 0, 72, 0.2) 101.54%)',\n}\n\nexport const getLayoutConfig = (theme: Theme): Record<string, BlockLayoutConfig> => {\n const directDepositLayout = getDirectDepositLayoutConfig(theme)\n\n return {\n overdraft_warning: {\n background: theme.palette.warning.light,\n sub_logo: 'error',\n },\n low_balance_alert: LOW_BALANCE_TILE,\n // V2 name for the same tile: content from `instance_slot.data`, the logo badged with `badge`.\n low_balance: { ...LOW_BALANCE_TILE, badge: 'error' },\n // Shared on/off-track status pair — used by Monthly Obligations Status and\n // Payday Cash Left Over Status (identical designs, different copy).\n status_off_track: {\n logo_color: 'background.paper',\n logo_bGcolor: 'error.main',\n background:\n 'linear-gradient(256.82deg, rgba(255, 47, 40, 0.2) 1.86%, rgba(255, 0, 72, 0.2) 101.54%)',\n },\n interest_charges_summary: {\n logo_color: 'text.primary',\n logo_bGcolor: alpha(theme.palette.categories?.feesCharges || '', 0.25),\n logo_border_color: 'categories.feesCharges',\n background:\n 'linear-gradient(256.82deg, rgba(227, 39, 39, 0.2) 1.86%, rgba(255, 123, 0, 0.2) 101.54%)',\n },\n // Shared deposit-celebration card — used by both the standard deposit and the emergency-fund\n // deposit beats (identical design, different copy), so one design-named variant serves both.\n deposit_received: {\n isConfetti: true,\n gradient: WARM_LIME_ACCENT_GRADIENT,\n graphic: 'logo',\n amountVariant: 'h3',\n amountPrefix: '+',\n categoryStrip: true,\n rowSx: { gap: 12, p: 12 },\n secondarySource: 'merchant',\n secondaryPosition: 'below',\n secondaryVariant: 'body2',\n secondaryColor: 'text.primary',\n },\n status_on_track: {\n isConfetti: true,\n gradient: WARM_LIME_ACCENT_GRADIENT,\n graphic: 'logo',\n amountVariant: 'h2',\n rowSx: { gap: 16, p: 16 },\n secondarySource: 'label',\n secondaryPosition: 'below',\n secondaryVariant: 'caption',\n secondaryColor: 'text.secondary',\n },\n payoff_celebration: {\n isConfetti: true,\n gradient: CELEBRATION_GRADIENT,\n graphic: 'paidOffCard',\n amountVariant: 'h2',\n rowSx: { gap: 24, px: 24, py: 16 },\n secondarySource: 'label',\n secondaryPosition: 'below',\n secondaryVariant: 'caption',\n secondaryColor: 'text.secondary',\n },\n savings_deposit: {\n isConfetti: true,\n gradient: CELEBRATION_GRADIENT,\n graphic: 'savings',\n amountVariant: 'h2',\n rowSx: { gap: 16, p: 16 },\n secondarySource: 'label',\n secondaryPosition: 'above',\n secondaryVariant: 'body2',\n secondaryColor: 'text.primary',\n },\n // \"Detailed\" hero pair from the Insights UI Toolkit (architecture doc: Account -> Detailed -\n // Primary / Detailed - Success). It is the same hero the Direct Deposit block renders for its\n // beats, so the styling is read from that block's table rather than duplicated here:\n // primary = blue slot gradient + primary-tinted pill, success = green slot gradient + solid\n // success pill.\n detailed_primary: {\n isDetailed: true,\n detailed: directDepositLayout[directDepositVariant.MissingInterestRate],\n },\n detailed_success: {\n isDetailed: true,\n detailed: directDepositLayout[directDepositVariant.InterestRateAdded],\n },\n // Neutral fallback for an unknown/unmatched variant: renders the plain standard card (no\n // confetti, no special background). `resolve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I,IAAI;AAAA,QAAI,IAAI;AAAA,MAAG;AAAA,MACjC,iBAAiB;AAAA,MACjB,mBAAmB;AAAA,MACnB,kBAAkB;AAAA,MAClB,gBAAgB;AAAA,IAClB;AAAA,IACA,iBAAiB;AAAA,MACf,YAAY;AAAA,MACZ,UAAU;AAAA,MACV,SAAS;AAAA,MACT,eAAe;AAAA,MACf,OAAO;AAAA,QAAE,KAAK;AAAA,QAAI,GAAG;AAAA,MAAG;AAAA,MACxB,iBAAiB;AAAA,MACjB,mBAAmB;AAAA,MACnB,kBAAkB;AAAA,MAClB,gBAAgB;AAAA,IAClB;AAAA,IAMA,kBAAkB;AAAA,MAChB,YAAY;AAAA,MACZ,UAAU,EAAoB,EAAqB,mBAAA;AAAA,IACrD;AAAA,IACA,kBAAkB;AAAA,MAChB,YAAY;AAAA,MACZ,UAAU,EAAoB,EAAqB,iBAAA;AAAA,IACrD;AAAA,IAGA,SAAS,CAAC;AAAA,EACZ;AACF"}
1
+ {"version":3,"file":"layout.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ComponentBlocks/AccountBlock/layout.ts"],"sourcesContent":["import { alpha, type SxProps, type Theme } from '@mui/material/styles'\n\nimport {\n CELEBRATION_GRADIENT,\n WARM_LIME_ACCENT_GRADIENT,\n} from '../../../components/celebrationGradients'\nimport type { DirectDepositCardStyleProps } from '../../../components/DirectDepositCard'\n\nimport {\n directDepositVariant,\n getLayoutConfig as getDirectDepositLayoutConfig,\n} from '../DirectDepositBlock/layout'\n\nexport interface BlockLayoutConfig {\n background?: string\n logo_color?: string\n logo_bGcolor?: string\n logo_border_color?: string\n /** Corner radius of the icon tile (`icon_name` or an `ICO-` logo). Defaults to 6px. */\n logo_border_radius?: string\n /** mx-icons glyph shown before `sub_text` (e.g. a warning icon on overdraft_warning). */\n sub_logo?: string\n /** mx-icons glyph badged on the logo's corner (e.g. `error` on Low Account Balance's V2 tile). */\n badge?: string\n /** When true, AccountBlock renders the confetti-backed celebration card using the fields below. */\n isConfetti?: boolean\n /** Gradient wash layered over `background.paper` for the confetti card. */\n gradient?: string\n /** Which illustration sits left of the text. `logo` is the data-driven merchant/institution logo. */\n graphic?: 'paidOffCard' | 'savings' | 'logo'\n /** Amount typography variant — `h2` for milestones, `h3` for deposits. */\n amountVariant?: 'h2' | 'h3'\n /** Prefix prepended to the formatted amount, e.g. `+` for deposits. */\n amountPrefix?: string\n /** Render the colored category strip (`header_text`) at the top of the card. */\n categoryStrip?: boolean\n /** Layout overrides for the graphic+text row (padding, gap). */\n rowSx?: SxProps\n /** Which payload field feeds the secondary line beside the amount. */\n secondarySource?: 'merchant' | 'label'\n /** Whether the secondary line sits above or below the amount. */\n secondaryPosition?: 'above' | 'below'\n /** Typography variant for the secondary line. */\n secondaryVariant?: 'body2' | 'caption'\n /** Theme color path for the secondary line. */\n secondaryColor?: string\n /**\n * When true, AccountBlock renders the \"Detailed\" account hero (overhanging institution logo,\n * account name + type, status pill) through `DirectDepositCard`, styled by `detailed`.\n */\n isDetailed?: boolean\n /** Hero card style props for the detailed variants. */\n detailed?: DirectDepositCardStyleProps\n}\n\n// Low Account Balance's red tile, shared by its legacy (`low_balance_alert`) and V2 (`low_balance`)\n// variant names.\nconst LOW_BALANCE_TILE: BlockLayoutConfig = {\n background:\n 'linear-gradient(256.82deg, rgba(255, 47, 40, 0.2) 1.86%, rgba(255, 0, 72, 0.2) 101.54%)',\n}\n\nexport const getLayoutConfig = (theme: Theme): Record<string, BlockLayoutConfig> => {\n const directDepositLayout = getDirectDepositLayoutConfig(theme)\n\n return {\n overdraft_warning: {\n background: theme.palette.warning.light,\n sub_logo: 'error',\n },\n low_balance_alert: LOW_BALANCE_TILE,\n // V2 name for the same tile: content from `instance_slot.data`, the logo badged with `badge`.\n low_balance: { ...LOW_BALANCE_TILE, badge: 'error' },\n // Shared on/off-track status pair — used by Monthly Obligations Status and\n // Payday Cash Left Over Status (identical designs, different copy).\n status_off_track: {\n logo_color: 'background.paper',\n logo_bGcolor: 'error.main',\n // Figma 9936:39145: the money icon's tile has 4px corners.\n logo_border_radius: '4px',\n background:\n 'linear-gradient(256.82deg, rgba(255, 47, 40, 0.2) 1.86%, rgba(255, 0, 72, 0.2) 101.54%)',\n },\n interest_charges_summary: {\n logo_color: 'text.primary',\n logo_bGcolor: alpha(theme.palette.categories?.feesCharges || '', 0.25),\n logo_border_color: 'categories.feesCharges',\n background:\n 'linear-gradient(256.82deg, rgba(227, 39, 39, 0.2) 1.86%, rgba(255, 123, 0, 0.2) 101.54%)',\n },\n // Shared deposit-celebration card — used by both the standard deposit and the emergency-fund\n // deposit beats (identical design, different copy), so one design-named variant serves both.\n deposit_received: {\n isConfetti: true,\n gradient: WARM_LIME_ACCENT_GRADIENT,\n graphic: 'logo',\n amountVariant: 'h3',\n amountPrefix: '+',\n categoryStrip: true,\n rowSx: { gap: 12, p: 12 },\n secondarySource: 'merchant',\n secondaryPosition: 'below',\n secondaryVariant: 'body2',\n secondaryColor: 'text.primary',\n },\n status_on_track: {\n isConfetti: true,\n gradient: WARM_LIME_ACCENT_GRADIENT,\n graphic: 'logo',\n amountVariant: 'h2',\n rowSx: { gap: 16, p: 16 },\n secondarySource: 'label',\n secondaryPosition: 'below',\n secondaryVariant: 'caption',\n secondaryColor: 'text.secondary',\n },\n payoff_celebration: {\n isConfetti: true,\n gradient: CELEBRATION_GRADIENT,\n graphic: 'paidOffCard',\n amountVariant: 'h2',\n rowSx: { gap: 24, px: 24, py: 16 },\n secondarySource: 'label',\n secondaryPosition: 'below',\n secondaryVariant: 'caption',\n secondaryColor: 'text.secondary',\n },\n savings_deposit: {\n isConfetti: true,\n gradient: CELEBRATION_GRADIENT,\n graphic: 'savings',\n amountVariant: 'h2',\n rowSx: { gap: 16, p: 16 },\n secondarySource: 'label',\n secondaryPosition: 'above',\n secondaryVariant: 'body2',\n secondaryColor: 'text.primary',\n },\n // \"Detailed\" hero pair from the Insights UI Toolkit (architecture doc: Account -> Detailed -\n // Primary / Detailed - Success). It is the same hero the Direct Deposit block renders for its\n // beats, so the styling is read from that block's table rather than duplicated here:\n // primary = blue slot gradient + primary-tinted pill, success = green slot gradient + solid\n // success pill.\n detailed_primary: {\n isDetailed: true,\n detailed: directDepositLayout[directDepositVariant.MissingInterestRate],\n },\n detailed_success: {\n isDetailed: true,\n detailed: directDepositLayout[directDepositVariant.InterestRateAdded],\n },\n // Neutral fallback for an unknown/unmatched variant: renders the plain standard card (no\n // confetti, no special background). `resolveVariantConfig` warns before falling back here.\n default: {},\n }\n}\n"],"mappings":";;;AAyDA,IAAM,IAAsC,EAC1C,YACE,0FACJ,GAEa,IAAA,CAAmB,MAAoD;AAClF,QAAM,IAAsB,EAA6B,CAAK;AAE9D,SAAO;AAAA,IACL,mBAAmB;AAAA,MACjB,YAAY,EAAM,QAAQ,QAAQ;AAAA,MAClC,UAAU;AAAA,IACZ;AAAA,IACA,mBAAmB;AAAA,IAEnB,aAAa;AAAA,MAAE,GAAG;AAAA,MAAkB,OAAO;AAAA,IAAQ;AAAA,IAGnD,kBAAkB;AAAA,MAChB,YAAY;AAAA,MACZ,cAAc;AAAA,MAEd,oBAAoB;AAAA,MACpB,YACE;AAAA,IACJ;AAAA,IACA,0BAA0B;AAAA,MACxB,YAAY;AAAA,MACZ,cAAc,EAAM,EAAM,QAAQ,YAAY,eAAe,IAAI,IAAI;AAAA,MACrE,mBAAmB;AAAA,MACnB,YACE;AAAA,IACJ;AAAA,IAGA,kBAAkB;AAAA,MAChB,YAAY;AAAA,MACZ,UAAU;AAAA,MACV,SAAS;AAAA,MACT,eAAe;AAAA,MACf,cAAc;AAAA,MACd,eAAe;AAAA,MACf,OAAO;AAAA,QAAE,KAAK;AAAA,QAAI,GAAG;AAAA,MAAG;AAAA,MACxB,iBAAiB;AAAA,MACjB,mBAAmB;AAAA,MACnB,kBAAkB;AAAA,MAClB,gBAAgB;AAAA,IAClB;AAAA,IACA,iBAAiB;AAAA,MACf,YAAY;AAAA,MACZ,UAAU;AAAA,MACV,SAAS;AAAA,MACT,eAAe;AAAA,MACf,OAAO;AAAA,QAAE,KAAK;AAAA,QAAI,GAAG;AAAA,MAAG;AAAA,MACxB,iBAAiB;AAAA,MACjB,mBAAmB;AAAA,MACnB,kBAAkB;AAAA,MAClB,gBAAgB;AAAA,IAClB;AAAA,IACA,oBAAoB;AAAA,MAClB,YAAY;AAAA,MACZ,UAAU;AAAA,MACV,SAAS;AAAA,MACT,eAAe;AAAA,MACf,OAAO;AAAA,QAAE,KAAK;AAAA,QAAI,IAAI;AAAA,QAAI,IAAI;AAAA,MAAG;AAAA,MACjC,iBAAiB;AAAA,MACjB,mBAAmB;AAAA,MACnB,kBAAkB;AAAA,MAClB,gBAAgB;AAAA,IAClB;AAAA,IACA,iBAAiB;AAAA,MACf,YAAY;AAAA,MACZ,UAAU;AAAA,MACV,SAAS;AAAA,MACT,eAAe;AAAA,MACf,OAAO;AAAA,QAAE,KAAK;AAAA,QAAI,GAAG;AAAA,MAAG;AAAA,MACxB,iBAAiB;AAAA,MACjB,mBAAmB;AAAA,MACnB,kBAAkB;AAAA,MAClB,gBAAgB;AAAA,IAClB;AAAA,IAMA,kBAAkB;AAAA,MAChB,YAAY;AAAA,MACZ,UAAU,EAAoB,EAAqB,mBAAA;AAAA,IACrD;AAAA,IACA,kBAAkB;AAAA,MAChB,YAAY;AAAA,MACZ,UAAU,EAAoB,EAAqB,iBAAA;AAAA,IACrD;AAAA,IAGA,SAAS,CAAC;AAAA,EACZ;AACF"}
@@ -1,28 +1,28 @@
1
1
  import { slot as T } from "../../core/types/Insights.es.js";
2
2
  import { resolveInsightRender as S } from "../../insights-v2/resolveInsightRender.es.js";
3
3
  import F from "../../insights-v2/components/LogoFromGuid.es.js";
4
- import { ON_CLICK_EVENT as O, ON_VIEW_EVENT as v, ON_VIEW_FIRST_TIME_EVENT as A } from "../constants/Analytics.es.js";
4
+ import { statusIconName as O, statusIconPalette as v } from "../../insights-v2/components/statusIcon.es.js";
5
+ import { ON_CLICK_EVENT as A, ON_VIEW_EVENT as L, ON_VIEW_FIRST_TIME_EVENT as j } from "../constants/Analytics.es.js";
5
6
  import V from "../beaticons/BeatMaterialIcon.es.js";
6
- import { BeatIcon as L } from "../beaticons/BeatIcon.es.js";
7
- import { useCopyStore as j, useEvent as w, useInsightsMicroWidgetStore as z } from "../context/hooks.es.js";
7
+ import { BeatIcon as w } from "../beaticons/BeatIcon.es.js";
8
+ import { useCopyStore as z, useEvent as G, useInsightsMicroWidgetStore as K } from "../context/hooks.es.js";
8
9
  import k from "../MicroCardTemplate.es.js";
9
- import G from "../../insights-v2/components/InsightErrorCard.es.js";
10
- import { statusIconName as K, statusIconPalette as Z } from "../../insights-v2/components/statusIcon.es.js";
10
+ import Z from "../../insights-v2/components/InsightErrorCard.es.js";
11
11
  import { useEffect as x } from "react";
12
12
  import { jsx as o } from "react/jsx-runtime";
13
13
  import { alpha as B, useTheme as $ } from "@mui/material/styles";
14
14
  import q from "@mui/material/Box";
15
15
  import { useInView as D } from "react-intersection-observer";
16
16
  var H = 32, li = ({ ariaLabel: a, beat: i, elevation: g, index: c, isActiveCard: l, onCardClick: u, posthog: r, widthOverrides: n, variant: f, showIcon: h, heightOverrides: p }) => {
17
- const { ref: _, inView: m } = D({ threshold: 1 }), I = $(), { cardsCopy: M } = j(), { onEvent: d } = w(), { updateBeat: P, updateOffer: R } = z();
17
+ const { ref: _, inView: m } = D({ threshold: 1 }), I = $(), { cardsCopy: M } = z(), { onEvent: d } = G(), { updateBeat: P, updateOffer: R } = K();
18
18
  x(() => {
19
- m && (i.has_been_displayed ? d(v(i.template)) : (i.guid.startsWith("OFR") ? R({
19
+ m && (i.has_been_displayed ? d(L(i.template)) : (i.guid.startsWith("OFR") ? R({
20
20
  ...i,
21
21
  has_been_displayed: !0
22
22
  }) : P({
23
23
  ...i,
24
24
  has_been_displayed: !0
25
- }), d(A(i.template))));
25
+ }), d(j(i.template))));
26
26
  }, [m]), x(() => {
27
27
  if (m && i) if (i.template === "MarketingOffer") {
28
28
  const t = i;
@@ -44,7 +44,7 @@ var H = 32, li = ({ ariaLabel: a, beat: i, elevation: g, index: c, isActiveCard:
44
44
  m
45
45
  ]);
46
46
  const s = () => {
47
- if (u && u(i), d(O(i.template)), i.template === "MarketingOffer") {
47
+ if (u && u(i), d(A(i.template)), i.template === "MarketingOffer") {
48
48
  const t = i;
49
49
  r?.capture("clicked_messaging_insight", {
50
50
  template: i.template,
@@ -70,10 +70,10 @@ var H = 32, li = ({ ariaLabel: a, beat: i, elevation: g, index: c, isActiveCard:
70
70
  minWidth: n ? `${n}px` : "100%",
71
71
  my: 1
72
72
  },
73
- children: /* @__PURE__ */ o(G, { beat: i })
73
+ children: /* @__PURE__ */ o(Z, { beat: i })
74
74
  });
75
75
  if (e) {
76
- const t = T(e.instance_slot.data, "logo"), E = T(e.instance_slot.data, "icon"), C = K(E?.guid), N = Z(E?.color), W = e.primary_cta?.label || e.in_description_cta?.label || void 0;
76
+ const t = T(e.instance_slot.data, "logo"), E = T(e.instance_slot.data, "icon"), C = O(E?.guid), N = v(E?.color), W = e.primary_cta?.label || e.in_description_cta?.label || void 0;
77
77
  return /* @__PURE__ */ o(k, {
78
78
  "aria-roledescription": "slide",
79
79
  ariaLabel: a,
@@ -107,7 +107,7 @@ var H = 32, li = ({ ariaLabel: a, beat: i, elevation: g, index: c, isActiveCard:
107
107
  description: i?.html_micro_description && i?.html_micro_description.length > 0 ? i.html_micro_description : i.html_description || "",
108
108
  elevation: g,
109
109
  heightOverrides: p,
110
- icon: h && /* @__PURE__ */ o(L, { beat: i }),
110
+ icon: h && /* @__PURE__ */ o(w, { beat: i }),
111
111
  isActiveCard: l,
112
112
  onCardClick: s,
113
113
  onPrimaryAction: s,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mx-cartographer/experiences",
3
- "version": "9.7.5",
3
+ "version": "9.7.6",
4
4
  "description": "Library containing experience widgets",
5
5
  "author": "MX",
6
6
  "license": "MIT",