@mx-cartographer/experiences 9.7.19 → 9.7.21

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.21] - 10-21-2026
2
+
3
+ - **FIXED** - The on-track money icon of the shared `status_on_track` tile (Payday Cash Left Over Status and Monthly Obligations Status) is drawn at 30px, the same size as the off-track tile's, so the two states match. `AccountBlock`'s confetti logo tile takes a per-variant `logo_icon_size` (default 24px), set on `status_on_track` only from the new `TILE_ICON_SIZE` constant that `IconComponent` also uses; other confetti tiles (Unified Deposit) are unchanged (WEC-2016)
4
+
1
5
  ## [9.7.19] - 10-21-2026
2
6
 
3
7
  - **ADDED** - `openActionDrawer` takes an optional `cta` (a `block` and `variant`) for the `inDescriptionCta` trigger. The drawer then runs that block and variant instead of the beat's own `in_description_cta`, so a host that opens a beat's action from other data (pulse, from the beat's micro envelope) does not have to rewrite the beat. It is typed to that trigger only, kept in `actionDrawer.cta` through close for the slide-out, and replaced by the next open. Documented in `docs/action-blocks/README.md` (WEC-2000)
@@ -1,7 +1,7 @@
1
1
  import { default as React } from 'react';
2
2
  interface AccountBoxProps {
3
- accountGuid: string;
4
3
  accountName: string;
4
+ institutionGuid?: string;
5
5
  }
6
6
  export declare const AccountBox: React.FC<AccountBoxProps>;
7
7
  export {};
@@ -3,7 +3,7 @@ import o from "@mui/material/Stack";
3
3
  import { InstitutionLogo as s, P as a } from "@mxenabled/mxui";
4
4
  import { jsx as t, jsxs as e } from "react/jsx-runtime";
5
5
  import c from "@mui/material/Box";
6
- var h = ({ accountGuid: i, accountName: n }) => /* @__PURE__ */ e(o, {
6
+ var h = ({ accountName: i, institutionGuid: n }) => /* @__PURE__ */ e(o, {
7
7
  className: "mx-insights-sdd-account-Card",
8
8
  sx: {
9
9
  gap: 4,
@@ -20,14 +20,14 @@ var h = ({ accountGuid: i, accountName: n }) => /* @__PURE__ */ e(o, {
20
20
  alt: "Financial Institution Logo",
21
21
  "data-ui-test": "mx-insights-sudd-full-feed-body-logo",
22
22
  height: 32,
23
- institutionGuid: i || "",
23
+ institutionGuid: n || "",
24
24
  width: 32
25
25
  })
26
26
  }), /* @__PURE__ */ t(a, {
27
27
  className: "mx-insights-sdd-account-account-name",
28
28
  sx: { textAlign: "center" },
29
29
  variant: "tiny",
30
- children: n
30
+ children: i
31
31
  })]
32
32
  });
33
33
  export {
@@ -1 +1 @@
1
- {"version":3,"file":"AccountBox.es.js","names":[],"sources":["../../../../../src/insights/components/insights/SwitchDirectDeposit/AccountBox.tsx"],"sourcesContent":["import React from 'react'\n\nimport { InstitutionLogo, P } from '@mxenabled/mxui'\n\nimport Box from '@mui/material/Box'\nimport Stack from '@mui/material/Stack'\n\ninterface AccountBoxProps {\n accountGuid: string\n accountName: string\n}\n\nexport const AccountBox: React.FC<AccountBoxProps> = ({ accountGuid, accountName }) => {\n return (\n <Stack\n className=\"mx-insights-sdd-account-Card\"\n sx={{\n gap: 4,\n width: 100,\n }}\n >\n <Box\n className=\"mx-insights-sdd-account-image-container\"\n sx={{ display: 'flex', justifyContent: 'center', width: '100%' }}\n >\n <InstitutionLogo\n alt=\"Financial Institution Logo\"\n data-ui-test=\"mx-insights-sudd-full-feed-body-logo\"\n height={32}\n institutionGuid={accountGuid || ''}\n width={32}\n />\n </Box>\n\n <P\n className=\"mx-insights-sdd-account-account-name\"\n sx={{ textAlign: 'center' }}\n variant=\"tiny\"\n >\n {accountName}\n </P>\n </Stack>\n )\n}\n"],"mappings":";;;;;AAYA,IAAa,IAAA,CAAyC,EAAE,aAAA,GAAa,aAAA,EAAA,MAEjE,gBAAA,EAAC,GAAD;AAAA,EACE,WAAU;AAAA,EACV,IAAI;AAAA,IACF,KAAK;AAAA,IACL,OAAO;AAAA,EACT;AAAA,EALF,UAAA,CAOE,gBAAA,EAAC,GAAD;AAAA,IACE,WAAU;AAAA,IACV,IAAI;AAAA,MAAE,SAAS;AAAA,MAAQ,gBAAgB;AAAA,MAAU,OAAO;AAAA,IAAO;AAAA,IAE/D,UAAA,gBAAA,EAAC,GAAD;AAAA,MACE,KAAI;AAAA,MACJ,gBAAa;AAAA,MACb,QAAQ;AAAA,MACR,iBAAiB,KAAe;AAAA,MAChC,OAAO;AAAA,IACR,CAAA;AAAA,EACE,CAAA,GAEL,gBAAA,EAAC,GAAD;AAAA,IACE,WAAU;AAAA,IACV,IAAI,EAAE,WAAW,SAAS;AAAA,IAC1B,SAAQ;AAAA,IAEP,UAAA;AAAA,EACA,CAAA,CACE"}
1
+ {"version":3,"file":"AccountBox.es.js","names":[],"sources":["../../../../../src/insights/components/insights/SwitchDirectDeposit/AccountBox.tsx"],"sourcesContent":["import React from 'react'\n\nimport { InstitutionLogo, P } from '@mxenabled/mxui'\n\nimport Box from '@mui/material/Box'\nimport Stack from '@mui/material/Stack'\n\ninterface AccountBoxProps {\n accountName: string\n // Must be an institution guid (INS-...). InstitutionLogo builds the logo URL from it,\n // so passing an account guid always falls back to the default bank icon.\n institutionGuid?: string\n}\n\nexport const AccountBox: React.FC<AccountBoxProps> = ({ accountName, institutionGuid }) => {\n return (\n <Stack\n className=\"mx-insights-sdd-account-Card\"\n sx={{\n gap: 4,\n width: 100,\n }}\n >\n <Box\n className=\"mx-insights-sdd-account-image-container\"\n sx={{ display: 'flex', justifyContent: 'center', width: '100%' }}\n >\n <InstitutionLogo\n alt=\"Financial Institution Logo\"\n data-ui-test=\"mx-insights-sudd-full-feed-body-logo\"\n height={32}\n institutionGuid={institutionGuid || ''}\n width={32}\n />\n </Box>\n\n <P\n className=\"mx-insights-sdd-account-account-name\"\n sx={{ textAlign: 'center' }}\n variant=\"tiny\"\n >\n {accountName}\n </P>\n </Stack>\n )\n}\n"],"mappings":";;;;;AAcA,IAAa,IAAA,CAAyC,EAAE,aAAA,GAAa,iBAAA,EAAA,MAEjE,gBAAA,EAAC,GAAD;AAAA,EACE,WAAU;AAAA,EACV,IAAI;AAAA,IACF,KAAK;AAAA,IACL,OAAO;AAAA,EACT;AAAA,EALF,UAAA,CAOE,gBAAA,EAAC,GAAD;AAAA,IACE,WAAU;AAAA,IACV,IAAI;AAAA,MAAE,SAAS;AAAA,MAAQ,gBAAgB;AAAA,MAAU,OAAO;AAAA,IAAO;AAAA,IAE/D,UAAA,gBAAA,EAAC,GAAD;AAAA,MACE,KAAI;AAAA,MACJ,gBAAa;AAAA,MACb,QAAQ;AAAA,MACR,iBAAiB,KAAmB;AAAA,MACpC,OAAO;AAAA,IACR,CAAA;AAAA,EACE,CAAA,GAEL,gBAAA,EAAC,GAAD;AAAA,IACE,WAAU;AAAA,IACV,IAAI,EAAE,WAAW,SAAS;AAAA,IAC1B,SAAQ;AAAA,IAEP,UAAA;AAAA,EACA,CAAA,CACE"}
@@ -2,9 +2,11 @@ import { default as React } from 'react';
2
2
  import { DepositBodyBaseProps } from '../../../types/DirectDeposit';
3
3
  interface SwitchDirectDepositBodyProps extends DepositBodyBaseProps {
4
4
  destinationAccountGuid: string;
5
+ destinationInstitutionGuid?: string;
5
6
  externalAccountName: string;
6
7
  heldAccountName: string;
7
8
  sourceAccountGuid: string;
9
+ sourceInstitutionGuid?: string;
8
10
  }
9
11
  export declare const SwitchDirectDepositBody: React.FC<SwitchDirectDepositBodyProps>;
10
12
  export {};
@@ -1,25 +1,27 @@
1
- import { DirectDeposit as d } from "../../shared/DirectDeposit/DirectDeposit.es.js";
1
+ import { DirectDeposit as g } from "../../shared/DirectDeposit/DirectDeposit.es.js";
2
2
  import { SwitchDirectDepositMainContainer as w } from "./SwitchDirectDepositMainContainer.es.js";
3
3
  import x from "react";
4
- import { jsx as r } from "react/jsx-runtime";
5
- var v = ({ account: i, animation: o, destinationAccountGuid: e, externalAccountName: m, heldAccountName: c, headerString: p, isComplete: t, isMini: n, leftLowerText: D, leftUpperText: a, rightLowerText: f, rightUpperText: h, sourceAccountGuid: s }) => /* @__PURE__ */ r(x.Fragment, { children: t ? /* @__PURE__ */ r(d, {
6
- account: i,
4
+ import { jsx as i } from "react/jsx-runtime";
5
+ var B = ({ account: t, animation: o, destinationAccountGuid: e, destinationInstitutionGuid: n, externalAccountName: m, heldAccountName: p, headerString: D, isComplete: r, isMini: a, leftLowerText: c, leftUpperText: d, rightLowerText: s, rightUpperText: f, sourceAccountGuid: h, sourceInstitutionGuid: u }) => /* @__PURE__ */ i(x.Fragment, { children: r ? /* @__PURE__ */ i(g, {
6
+ account: t,
7
7
  animation: o,
8
- headerString: p,
9
- isComplete: t,
10
- isMini: n,
11
- leftLowerText: D,
12
- leftUpperText: a,
13
- rightLowerText: f,
14
- rightUpperText: h
15
- }) : /* @__PURE__ */ r(w, {
8
+ headerString: D,
9
+ isComplete: r,
10
+ isMini: a,
11
+ leftLowerText: c,
12
+ leftUpperText: d,
13
+ rightLowerText: s,
14
+ rightUpperText: f
15
+ }) : /* @__PURE__ */ i(w, {
16
16
  destinationAccountGuid: e,
17
+ destinationInstitutionGuid: n || t?.guid,
17
18
  externalAccountName: m,
18
- heldAccountName: c,
19
- sourceAccountGuid: s
19
+ heldAccountName: p,
20
+ sourceAccountGuid: h,
21
+ sourceInstitutionGuid: u
20
22
  }) });
21
23
  export {
22
- v as SwitchDirectDepositBody
24
+ B as SwitchDirectDepositBody
23
25
  };
24
26
 
25
27
  //# sourceMappingURL=SwitchDirectDepositBody.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SwitchDirectDepositBody.es.js","names":[],"sources":["../../../../../src/insights/components/insights/SwitchDirectDeposit/SwitchDirectDepositBody.tsx"],"sourcesContent":["import React from 'react'\n\nimport { DirectDeposit } from '../..'\nimport { DepositBodyBaseProps } from '../../../types/DirectDeposit'\n\nimport { SwitchDirectDepositMainContainer } from './SwitchDirectDepositMainContainer'\n\ninterface SwitchDirectDepositBodyProps extends DepositBodyBaseProps {\n destinationAccountGuid: string\n externalAccountName: string\n heldAccountName: string\n sourceAccountGuid: string\n}\n\nexport const SwitchDirectDepositBody: React.FC<SwitchDirectDepositBodyProps> = ({\n account,\n animation,\n destinationAccountGuid,\n externalAccountName,\n heldAccountName,\n headerString,\n isComplete,\n isMini,\n leftLowerText,\n leftUpperText,\n rightLowerText,\n rightUpperText,\n sourceAccountGuid,\n}) => {\n return (\n <React.Fragment>\n {isComplete ? (\n <DirectDeposit\n account={account}\n animation={animation}\n headerString={headerString}\n isComplete={isComplete}\n isMini={isMini}\n leftLowerText={leftLowerText}\n leftUpperText={leftUpperText}\n rightLowerText={rightLowerText}\n rightUpperText={rightUpperText}\n />\n ) : (\n <SwitchDirectDepositMainContainer\n destinationAccountGuid={destinationAccountGuid}\n externalAccountName={externalAccountName}\n heldAccountName={heldAccountName}\n sourceAccountGuid={sourceAccountGuid}\n />\n )}\n </React.Fragment>\n )\n}\n"],"mappings":";;;;AAcA,IAAa,IAAA,CAAmE,EAC9E,SAAA,GACA,WAAA,GACA,wBAAA,GACA,qBAAA,GACA,iBAAA,GACA,cAAA,GACA,YAAA,GACA,QAAA,GACA,eAAA,GACA,eAAA,GACA,gBAAA,GACA,gBAAA,GACA,mBAAA,EAAA,MAGE,gBAAA,EAAC,EAAM,UAAP,EAAA,UACG,IACC,gBAAA,EAAC,GAAD;AAAA,EACW,SAAA;AAAA,EACE,WAAA;AAAA,EACG,cAAA;AAAA,EACF,YAAA;AAAA,EACJ,QAAA;AAAA,EACO,eAAA;AAAA,EACA,eAAA;AAAA,EACC,gBAAA;AAAA,EACA,gBAAA;AACjB,CAAA,IAED,gBAAA,EAAC,GAAD;AAAA,EAC0B,wBAAA;AAAA,EACH,qBAAA;AAAA,EACJ,iBAAA;AAAA,EACE,mBAAA;AACpB,CAAA,EAEW,CAAA"}
1
+ {"version":3,"file":"SwitchDirectDepositBody.es.js","names":[],"sources":["../../../../../src/insights/components/insights/SwitchDirectDeposit/SwitchDirectDepositBody.tsx"],"sourcesContent":["import React from 'react'\n\nimport { DirectDeposit } from '../..'\nimport { DepositBodyBaseProps } from '../../../types/DirectDeposit'\n\nimport { SwitchDirectDepositMainContainer } from './SwitchDirectDepositMainContainer'\n\ninterface SwitchDirectDepositBodyProps extends DepositBodyBaseProps {\n destinationAccountGuid: string\n // Institution guid of the held (destination) account. Defaults to `account.guid`,\n // which hosts already pass as the held account's institution guid.\n destinationInstitutionGuid?: string\n externalAccountName: string\n heldAccountName: string\n sourceAccountGuid: string\n // Institution guid of the external (source) account.\n sourceInstitutionGuid?: string\n}\n\nexport const SwitchDirectDepositBody: React.FC<SwitchDirectDepositBodyProps> = ({\n account,\n animation,\n destinationAccountGuid,\n destinationInstitutionGuid,\n externalAccountName,\n heldAccountName,\n headerString,\n isComplete,\n isMini,\n leftLowerText,\n leftUpperText,\n rightLowerText,\n rightUpperText,\n sourceAccountGuid,\n sourceInstitutionGuid,\n}) => {\n return (\n <React.Fragment>\n {isComplete ? (\n <DirectDeposit\n account={account}\n animation={animation}\n headerString={headerString}\n isComplete={isComplete}\n isMini={isMini}\n leftLowerText={leftLowerText}\n leftUpperText={leftUpperText}\n rightLowerText={rightLowerText}\n rightUpperText={rightUpperText}\n />\n ) : (\n <SwitchDirectDepositMainContainer\n destinationAccountGuid={destinationAccountGuid}\n destinationInstitutionGuid={destinationInstitutionGuid || account?.guid}\n externalAccountName={externalAccountName}\n heldAccountName={heldAccountName}\n sourceAccountGuid={sourceAccountGuid}\n sourceInstitutionGuid={sourceInstitutionGuid}\n />\n )}\n </React.Fragment>\n )\n}\n"],"mappings":";;;;AAmBA,IAAa,IAAA,CAAmE,EAC9E,SAAA,GACA,WAAA,GACA,wBAAA,GACA,4BAAA,GACA,qBAAA,GACA,iBAAA,GACA,cAAA,GACA,YAAA,GACA,QAAA,GACA,eAAA,GACA,eAAA,GACA,gBAAA,GACA,gBAAA,GACA,mBAAA,GACA,uBAAA,EAAA,MAGE,gBAAA,EAAC,EAAM,UAAP,EAAA,UACG,IACC,gBAAA,EAAC,GAAD;AAAA,EACW,SAAA;AAAA,EACE,WAAA;AAAA,EACG,cAAA;AAAA,EACF,YAAA;AAAA,EACJ,QAAA;AAAA,EACO,eAAA;AAAA,EACA,eAAA;AAAA,EACC,gBAAA;AAAA,EACA,gBAAA;AACjB,CAAA,IAED,gBAAA,EAAC,GAAD;AAAA,EAC0B,wBAAA;AAAA,EACxB,4BAA4B,KAA8B,GAAS;AAAA,EAC9C,qBAAA;AAAA,EACJ,iBAAA;AAAA,EACE,mBAAA;AAAA,EACI,uBAAA;AACxB,CAAA,EAEW,CAAA"}
@@ -1,9 +1,11 @@
1
1
  import { default as React } from 'react';
2
2
  interface SwitchDirectDepositMainContainerProps {
3
- destinationAccountGuid: string;
3
+ destinationAccountGuid?: string;
4
+ destinationInstitutionGuid?: string;
4
5
  externalAccountName: string;
5
6
  heldAccountName: string;
6
- sourceAccountGuid: string;
7
+ sourceAccountGuid?: string;
8
+ sourceInstitutionGuid?: string;
7
9
  }
8
10
  export declare const SwitchDirectDepositMainContainer: React.FC<SwitchDirectDepositMainContainerProps>;
9
11
  export {};
@@ -1,9 +1,9 @@
1
- import { AccountBox as r } from "./AccountBox.es.js";
1
+ import { AccountBox as i } from "./AccountBox.es.js";
2
2
  import "react";
3
- import n from "@mui/material/Stack";
3
+ import s from "@mui/material/Stack";
4
4
  import { Icon as m } from "@mxenabled/mx-icons";
5
- import { jsx as o, jsxs as e } from "react/jsx-runtime";
6
- var w = ({ destinationAccountGuid: t, externalAccountName: i, heldAccountName: a, sourceAccountGuid: c }) => /* @__PURE__ */ e(n, {
5
+ import { jsx as t, jsxs as c } from "react/jsx-runtime";
6
+ var w = ({ destinationInstitutionGuid: o, externalAccountName: r, heldAccountName: n, sourceInstitutionGuid: a }) => /* @__PURE__ */ c(s, {
7
7
  className: "mx-insights-sdd-main-container",
8
8
  direction: "row",
9
9
  sx: {
@@ -13,19 +13,19 @@ var w = ({ destinationAccountGuid: t, externalAccountName: i, heldAccountName: a
13
13
  width: "100%"
14
14
  },
15
15
  children: [
16
- /* @__PURE__ */ o(r, {
17
- accountGuid: c,
18
- accountName: i
16
+ /* @__PURE__ */ t(i, {
17
+ accountName: r,
18
+ institutionGuid: a
19
19
  }),
20
- /* @__PURE__ */ o(m, {
20
+ /* @__PURE__ */ t(m, {
21
21
  className: "mx-insights-sdd-arrow-forward-icon",
22
22
  name: "arrow_forward",
23
23
  size: 24,
24
24
  sx: { my: "auto" }
25
25
  }),
26
- /* @__PURE__ */ o(r, {
27
- accountGuid: t,
28
- accountName: a
26
+ /* @__PURE__ */ t(i, {
27
+ accountName: n,
28
+ institutionGuid: o
29
29
  })
30
30
  ]
31
31
  });
@@ -1 +1 @@
1
- {"version":3,"file":"SwitchDirectDepositMainContainer.es.js","names":[],"sources":["../../../../../src/insights/components/insights/SwitchDirectDeposit/SwitchDirectDepositMainContainer.tsx"],"sourcesContent":["import React from 'react'\n\nimport { Icon } from '@mxenabled/mx-icons'\n\nimport Stack from '@mui/material/Stack'\n\nimport { AccountBox } from './AccountBox'\n\ninterface SwitchDirectDepositMainContainerProps {\n destinationAccountGuid: string\n externalAccountName: string\n heldAccountName: string\n sourceAccountGuid: string\n}\n\nexport const SwitchDirectDepositMainContainer: React.FC<SwitchDirectDepositMainContainerProps> = ({\n destinationAccountGuid,\n externalAccountName,\n heldAccountName,\n sourceAccountGuid,\n}) => {\n return (\n <Stack\n className=\"mx-insights-sdd-main-container\"\n direction=\"row\"\n sx={{ gap: 8, justifyContent: 'center', py: 12, width: '100%' }}\n >\n <AccountBox accountGuid={sourceAccountGuid} accountName={externalAccountName} />\n <Icon\n className=\"mx-insights-sdd-arrow-forward-icon\"\n name=\"arrow_forward\"\n size={24}\n sx={{ my: 'auto' }}\n />\n <AccountBox accountGuid={destinationAccountGuid} accountName={heldAccountName} />\n </Stack>\n )\n}\n"],"mappings":";;;;;AAeA,IAAa,IAAA,CAAqF,EAChG,wBAAA,GACA,qBAAA,GACA,iBAAA,GACA,mBAAA,EAAA,MAGE,gBAAA,EAAC,GAAD;AAAA,EACE,WAAU;AAAA,EACV,WAAU;AAAA,EACV,IAAI;AAAA,IAAE,KAAK;AAAA,IAAG,gBAAgB;AAAA,IAAU,IAAI;AAAA,IAAI,OAAO;AAAA,EAAO;AAAA,EAHhE,UAAA;AAAA,IAKE,gBAAA,EAAC,GAAD;AAAA,MAAY,aAAa;AAAA,MAAmB,aAAa;AAAA,IAAsB,CAAA;AAAA,IAC/E,gBAAA,EAAC,GAAD;AAAA,MACE,WAAU;AAAA,MACV,MAAK;AAAA,MACL,MAAM;AAAA,MACN,IAAI,EAAE,IAAI,OAAO;AAAA,IAClB,CAAA;AAAA,IACD,gBAAA,EAAC,GAAD;AAAA,MAAY,aAAa;AAAA,MAAwB,aAAa;AAAA,IAAkB,CAAA;AAAA,EAC3E"}
1
+ {"version":3,"file":"SwitchDirectDepositMainContainer.es.js","names":[],"sources":["../../../../../src/insights/components/insights/SwitchDirectDeposit/SwitchDirectDepositMainContainer.tsx"],"sourcesContent":["import React from 'react'\n\nimport { Icon } from '@mxenabled/mx-icons'\n\nimport Stack from '@mui/material/Stack'\n\nimport { AccountBox } from './AccountBox'\n\ninterface SwitchDirectDepositMainContainerProps {\n destinationAccountGuid?: string\n destinationInstitutionGuid?: string\n externalAccountName: string\n heldAccountName: string\n sourceAccountGuid?: string\n sourceInstitutionGuid?: string\n}\n\nexport const SwitchDirectDepositMainContainer: React.FC<SwitchDirectDepositMainContainerProps> = ({\n destinationInstitutionGuid,\n externalAccountName,\n heldAccountName,\n sourceInstitutionGuid,\n}) => {\n return (\n <Stack\n className=\"mx-insights-sdd-main-container\"\n direction=\"row\"\n sx={{ gap: 8, justifyContent: 'center', py: 12, width: '100%' }}\n >\n <AccountBox accountName={externalAccountName} institutionGuid={sourceInstitutionGuid} />\n <Icon\n className=\"mx-insights-sdd-arrow-forward-icon\"\n name=\"arrow_forward\"\n size={24}\n sx={{ my: 'auto' }}\n />\n <AccountBox accountName={heldAccountName} institutionGuid={destinationInstitutionGuid} />\n </Stack>\n )\n}\n"],"mappings":";;;;;AAiBA,IAAa,IAAA,CAAqF,EAChG,4BAAA,GACA,qBAAA,GACA,iBAAA,GACA,uBAAA,EAAA,MAGE,gBAAA,EAAC,GAAD;AAAA,EACE,WAAU;AAAA,EACV,WAAU;AAAA,EACV,IAAI;AAAA,IAAE,KAAK;AAAA,IAAG,gBAAgB;AAAA,IAAU,IAAI;AAAA,IAAI,OAAO;AAAA,EAAO;AAAA,EAHhE,UAAA;AAAA,IAKE,gBAAA,EAAC,GAAD;AAAA,MAAY,aAAa;AAAA,MAAqB,iBAAiB;AAAA,IAAwB,CAAA;AAAA,IACvF,gBAAA,EAAC,GAAD;AAAA,MACE,WAAU;AAAA,MACV,MAAK;AAAA,MACL,MAAM;AAAA,MACN,IAAI,EAAE,IAAI,OAAO;AAAA,IAClB,CAAA;AAAA,IACD,gBAAA,EAAC,GAAD;AAAA,MAAY,aAAa;AAAA,MAAiB,iBAAiB;AAAA,IAA6B,CAAA;AAAA,EACnF"}
@@ -15,17 +15,17 @@ import { IconComponent as Q } from "./IconComponent.es.js";
15
15
  import { useRef as U } from "react";
16
16
  import e from "@mui/material/Stack";
17
17
  import { Text as l } from "@mxenabled/mxui";
18
- import { Icon as D } from "@mxenabled/mx-icons";
18
+ import { Icon as z } from "@mxenabled/mx-icons";
19
19
  import { jsx as o, jsxs as r } from "react/jsx-runtime";
20
20
  import { useTheme as X } from "@mui/material/styles";
21
- import a from "@mui/material/Box";
21
+ import s from "@mui/material/Box";
22
22
  var vo = ({ payload: x }) => {
23
- const g = X(), b = U(null), { height: y, width: v } = P(b), { instance_slot: n } = x, { variant: p, institution_guid: z, institution_name: A, icon_name: B, merchant_name: F } = n;
23
+ const g = X(), b = U(null), { height: y, width: v } = P(b), { instance_slot: n } = x, { variant: p, institution_guid: D, institution_name: A, icon_name: B, merchant_name: F } = n;
24
24
  if (q(p)) return /* @__PURE__ */ o(J, { payload: x });
25
- const { data: i } = n, m = i !== void 0, h = d(i, "amount"), u = m ? typeof h == "number" && Number.isFinite(h) ? h : void 0 : n.amount, w = d(i, "sub_text"), R = typeof w == "string" ? w : void 0, T = m ? R : n.sub_text, L = m ? R : n.label, C = d(i, "header_text"), s = m ? typeof C == "string" ? C : void 0 : n.header_text, c = d(i, "logo"), t = W(M(g), p, "default", "AccountBlock");
25
+ const { data: i } = n, m = i !== void 0, h = d(i, "amount"), u = m ? typeof h == "number" && Number.isFinite(h) ? h : void 0 : n.amount, w = d(i, "sub_text"), R = typeof w == "string" ? w : void 0, T = m ? R : n.sub_text, L = m ? R : n.label, _ = d(i, "header_text"), a = m ? typeof _ == "string" ? _ : void 0 : n.header_text, c = d(i, "logo"), t = W(M(g), p, "default", "AccountBlock");
26
26
  if (t?.isConfetti) {
27
27
  const f = O(c?.guid), V = {
28
- paidOffCard: /* @__PURE__ */ o(a, {
28
+ paidOffCard: /* @__PURE__ */ o(s, {
29
29
  sx: {
30
30
  flexShrink: 0,
31
31
  height: 32,
@@ -48,7 +48,7 @@ var vo = ({ payload: x }) => {
48
48
  role: "presentation",
49
49
  width: 55
50
50
  }),
51
- logo: /* @__PURE__ */ o(a, {
51
+ logo: /* @__PURE__ */ o(s, {
52
52
  sx: {
53
53
  borderRadius: "4px",
54
54
  flexShrink: 0,
@@ -65,10 +65,10 @@ var vo = ({ payload: x }) => {
65
65
  justifyContent: "center",
66
66
  width: "100%"
67
67
  },
68
- children: /* @__PURE__ */ o(D, {
68
+ children: /* @__PURE__ */ o(z, {
69
69
  "aria-hidden": !0,
70
70
  name: f,
71
- size: 24,
71
+ size: t.logo_icon_size ?? 24,
72
72
  sx: { color: "success.contrastText" }
73
73
  })
74
74
  }) : c?.guid ? /* @__PURE__ */ o(H, {
@@ -76,7 +76,7 @@ var vo = ({ payload: x }) => {
76
76
  size: 48
77
77
  }) : null
78
78
  })
79
- }[t.graphic ?? "logo"], _ = d(i, "secondary_text"), $ = typeof _ == "string" && _ || (F ?? A), k = t.secondarySource === "merchant" ? $ : L, I = k ? /* @__PURE__ */ o(l, {
79
+ }[t.graphic ?? "logo"], C = d(i, "secondary_text"), $ = typeof C == "string" && C || (F ?? A), k = t.secondarySource === "merchant" ? $ : L, I = k ? /* @__PURE__ */ o(l, {
80
80
  color: t.secondaryColor,
81
81
  variant: t.secondaryVariant,
82
82
  children: k
@@ -86,7 +86,7 @@ var vo = ({ payload: x }) => {
86
86
  variant: t.amountVariant,
87
87
  children: `${t.amountPrefix ?? ""}${S(u, "0,0.00")}`
88
88
  }) : null;
89
- return /* @__PURE__ */ r(a, {
89
+ return /* @__PURE__ */ r(s, {
90
90
  ref: b,
91
91
  sx: {
92
92
  backgroundImage: t.gradient,
@@ -96,7 +96,7 @@ var vo = ({ payload: x }) => {
96
96
  p: 16,
97
97
  width: "100%"
98
98
  },
99
- children: [/* @__PURE__ */ o(a, {
99
+ children: [/* @__PURE__ */ o(s, {
100
100
  sx: {
101
101
  inset: 0,
102
102
  pointerEvents: "none",
@@ -116,7 +116,7 @@ var vo = ({ payload: x }) => {
116
116
  width: "100%",
117
117
  zIndex: 2
118
118
  },
119
- children: [t.categoryStrip && s && /* @__PURE__ */ o(a, {
119
+ children: [t.categoryStrip && a && /* @__PURE__ */ o(s, {
120
120
  sx: {
121
121
  bgcolor: "success.main",
122
122
  px: 12,
@@ -125,7 +125,7 @@ var vo = ({ payload: x }) => {
125
125
  children: /* @__PURE__ */ o(l, {
126
126
  color: "success.contrastText",
127
127
  variant: "caption",
128
- children: s
128
+ children: a
129
129
  })
130
130
  }), /* @__PURE__ */ r(e, {
131
131
  sx: {
@@ -142,7 +142,7 @@ var vo = ({ payload: x }) => {
142
142
  flexDirection: "row",
143
143
  ...t.rowSx
144
144
  },
145
- children: [/* @__PURE__ */ o(a, {
145
+ children: [/* @__PURE__ */ o(s, {
146
146
  sx: {
147
147
  display: "flex",
148
148
  flexShrink: 0
@@ -174,7 +174,7 @@ var vo = ({ payload: x }) => {
174
174
  boxShadow: g.shadows[1],
175
175
  width: "100%"
176
176
  },
177
- children: [s && /* @__PURE__ */ o(K, { headerText: s }), /* @__PURE__ */ r(e, {
177
+ children: [a && /* @__PURE__ */ o(K, { headerText: a }), /* @__PURE__ */ r(e, {
178
178
  sx: {
179
179
  alignItems: "center",
180
180
  bgcolor: "background.paper",
@@ -183,11 +183,11 @@ var vo = ({ payload: x }) => {
183
183
  px: 16,
184
184
  py: 12,
185
185
  width: "100%",
186
- ...s && {
186
+ ...a && {
187
187
  borderTopLeftRadius: "0",
188
188
  borderTopRightRadius: "0"
189
189
  },
190
- ...(z || B || c?.guid) && { flexDirection: "row" }
190
+ ...(D || B || c?.guid) && { flexDirection: "row" }
191
191
  },
192
192
  children: [/* @__PURE__ */ o(Q, {
193
193
  logo: c,
@@ -202,7 +202,7 @@ var vo = ({ payload: x }) => {
202
202
  flexDirection: "row",
203
203
  alignItems: "center"
204
204
  },
205
- children: [t.sub_logo && /* @__PURE__ */ o(D, {
205
+ children: [t.sub_logo && /* @__PURE__ */ o(z, {
206
206
  color: "warning",
207
207
  fill: !0,
208
208
  name: t.sub_logo,
@@ -1 +1 @@
1
- {"version":3,"file":"AccountBlock.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ComponentBlocks/AccountBlock/AccountBlock.tsx"],"sourcesContent":["import Box from '@mui/material/Box'\nimport Stack from '@mui/material/Stack'\nimport { useRef } from 'react'\nimport { useTheme } from '@mui/material/styles'\n\nimport { Text } from '@mxenabled/mxui'\nimport { Icon } from '@mxenabled/mx-icons'\n\nimport { slot, type InsightsPayload, type LogoRef } from '../../../../core'\nimport { formatCurrency } from '../../../../core/utils/NumberFormatting'\nimport LogoFromGuid from '../../../components/LogoFromGuid'\nimport { Confetti } from '../../../components/shared/Confetti'\nimport { ReactComponent as PaidOffCardGraphic } from '../../../components/shared/images/PaidOffCard.svg'\nimport { ReactComponent as SavingsGraphic } from '../../../components/shared/images/SavingsAccountDeposit.svg'\nimport { statusIconName } from '../../../components/statusIcon'\nimport { useContainerDimensions } from '../../../hooks/useContainerDimensions'\n\nimport { resolveVariantConfig } from '../../resolveVariantConfig'\nimport { DetailedAccountBlock, isDetailedAccountVariant } from '../DetailedAccountBlock'\n\nimport { HeaderComponent } from './HeaderComponent'\nimport { IconComponent } from './IconComponent'\nimport { getLayoutConfig } from './layout'\n\nconst AccountBlock = ({ payload }: { payload: InsightsPayload; beatGuid?: string }) => {\n const theme = useTheme()\n const containerRef = useRef<HTMLDivElement>(null)\n const { height, width } = useContainerDimensions(containerRef)\n const { instance_slot } = payload\n const { variant, institution_guid, institution_name, icon_name, merchant_name } = instance_slot\n\n if (isDetailedAccountVariant(variant)) return <DetailedAccountBlock payload={payload} />\n\n // V2 variants fill `instance_slot.data` (ditto's account_block slots) and it is then the whole\n // truth: a slot it leaves empty, or sends with the wrong kind, draws nothing rather than falling\n // back to the stale flat field it supersedes. Beats not yet migrated send no `data` and keep the\n // flat fields.\n const { data } = instance_slot\n const v2 = data !== undefined\n const dataAmount = slot<unknown>(data, 'amount')\n const amount = v2\n ? typeof dataAmount === 'number' && Number.isFinite(dataAmount)\n ? dataAmount\n : undefined\n : instance_slot.amount\n // One V2 slot feeds the line under the amount on both tiles. V1 called it `sub_text` on the\n // standard tile and `label` on the confetti tile, so each keeps its own flat field.\n const dataSubText = slot<unknown>(data, 'sub_text')\n const v2SubText = typeof dataSubText === 'string' ? dataSubText : undefined\n const sub_text = v2 ? v2SubText : instance_slot.sub_text\n const label = v2 ? v2SubText : instance_slot.label\n const dataHeaderText = slot<unknown>(data, 'header_text')\n const header_text = v2\n ? typeof dataHeaderText === 'string'\n ? dataHeaderText\n : undefined\n : instance_slot.header_text\n const logo = slot<LogoRef>(data, 'logo')\n const layoutConfig = resolveVariantConfig(\n getLayoutConfig(theme),\n variant,\n 'default',\n 'AccountBlock',\n )\n\n // Confetti-backed celebration variants (deposits, payoff, savings) — a success-tinted card\n // on a gradient + confetti wash. Everything variant-specific is flat on `layoutConfig`.\n if (layoutConfig?.isConfetti) {\n const confettiIcon = statusIconName(logo?.guid)\n const graphics: Record<string, React.ReactNode> = {\n paidOffCard: (\n // SVG is 58x46 but the card sits at (0,14) with the check badge overflowing top-right.\n // Box it to the card's real 44x32 footprint and shift the SVG up so it aligns with the text.\n <Box sx={{ flexShrink: 0, height: 32, position: 'relative', width: 44 }}>\n <PaidOffCardGraphic\n aria-hidden={true}\n role=\"presentation\"\n style={{ left: 0, position: 'absolute', top: -14 }}\n />\n </Box>\n ),\n savings: <SavingsGraphic aria-hidden={true} height={55} role=\"presentation\" width={55} />,\n logo: (\n <Box\n sx={{\n borderRadius: '4px',\n flexShrink: 0,\n height: 48,\n overflow: 'hidden',\n width: 48,\n }}\n >\n {/* An ICO- icon keeps the tile's look: an outlined 24px glyph in success.contrastText on\n the success.main square. It is drawn with Icon, as IconComponent does, because\n LogoFromGuid fills every ICO- glyph. Any other guid renders via LogoFromGuid. */}\n {confettiIcon ? (\n <Stack\n data-icon={confettiIcon}\n sx={{\n alignItems: 'center',\n bgcolor: 'success.main',\n height: '100%',\n justifyContent: 'center',\n width: '100%',\n }}\n >\n <Icon\n aria-hidden={true}\n name={confettiIcon}\n size={24}\n sx={{ color: 'success.contrastText' }}\n />\n </Stack>\n ) : logo?.guid ? (\n <LogoFromGuid logo={logo} size={48} />\n ) : null}\n </Box>\n ),\n }\n const graphic = graphics[layoutConfig.graphic ?? 'logo']\n\n // Deposit cards show the payer name — a merchant when we have one, otherwise the institution.\n // V2 sends it resolved as `data.secondary_text`; the flat fields remain the fallback.\n const dataSecondaryText = slot<unknown>(data, 'secondary_text')\n const payer =\n (typeof dataSecondaryText === 'string' && dataSecondaryText) ||\n (merchant_name ?? institution_name)\n const secondaryText = layoutConfig.secondarySource === 'merchant' ? payer : label\n const secondary = secondaryText ? (\n <Text color={layoutConfig.secondaryColor} variant={layoutConfig.secondaryVariant}>\n {secondaryText}\n </Text>\n ) : null\n // No figure for a missing amount: `formatCurrency` would print a confident `$0.00`.\n const amountText =\n amount != null ? (\n <Text bold={true} color=\"success.dark\" variant={layoutConfig.amountVariant}>\n {`${layoutConfig.amountPrefix ?? ''}${formatCurrency(amount, '0,0.00')}`}\n </Text>\n ) : null\n\n return (\n <Box\n ref={containerRef}\n sx={{\n backgroundImage: layoutConfig.gradient,\n bgcolor: 'background.paper',\n overflow: 'hidden',\n position: 'relative',\n p: 16,\n width: '100%',\n }}\n >\n <Box\n sx={{\n inset: 0,\n pointerEvents: 'none',\n position: 'absolute',\n zIndex: 1,\n }}\n >\n <Confetti height={height} shouldRun={height > 0 && width > 0} width={width} />\n </Box>\n\n <Stack\n sx={{\n borderRadius: '8px',\n overflow: 'hidden',\n position: 'relative',\n width: '100%',\n zIndex: 2,\n }}\n >\n {layoutConfig.categoryStrip && header_text && (\n <Box sx={{ bgcolor: 'success.main', px: 12, py: 4 }}>\n <Text color=\"success.contrastText\" variant=\"caption\">\n {header_text}\n </Text>\n </Box>\n )}\n\n <Stack\n sx={{\n alignItems: 'center',\n bgcolor: 'success.lighter',\n border: '1px solid',\n borderColor: 'success.main',\n borderRadius: '8px',\n // With a strip above, the body's top corners tuck under it (no double border line).\n ...(layoutConfig.categoryStrip && {\n borderTopLeftRadius: 0,\n borderTopRightRadius: 0,\n borderTop: 0,\n }),\n flexDirection: 'row',\n ...layoutConfig.rowSx,\n }}\n >\n <Box sx={{ display: 'flex', flexShrink: 0 }}>{graphic}</Box>\n\n <Stack sx={{ flex: '1 0 0', minWidth: 0 }}>\n {layoutConfig.secondaryPosition === 'above' && secondary}\n {amountText}\n {layoutConfig.secondaryPosition === 'below' && secondary}\n </Stack>\n </Stack>\n </Stack>\n </Box>\n )\n }\n\n return (\n <Stack\n sx={{\n background: layoutConfig.background,\n p: 16,\n }}\n >\n <Stack\n sx={{\n borderRadius: '8px',\n boxShadow: theme.shadows[1],\n width: '100%',\n }}\n >\n {header_text && <HeaderComponent headerText={header_text} />}\n <Stack\n sx={{\n alignItems: 'center',\n bgcolor: 'background.paper',\n borderRadius: '8px',\n gap: 16,\n px: 16,\n py: 12,\n width: '100%',\n ...(header_text && {\n borderTopLeftRadius: '0',\n borderTopRightRadius: '0',\n }),\n ...((institution_guid || icon_name || logo?.guid) && {\n flexDirection: 'row',\n }),\n }}\n >\n <IconComponent logo={logo} slot={instance_slot} variant={variant} />\n\n <Stack>\n {amount != null && <Text variant=\"h2\">{formatCurrency(amount, '0,0.00')}</Text>}\n <Stack sx={{ gap: 8, flexDirection: 'row', alignItems: 'center' }}>\n {layoutConfig.sub_logo && (\n <Icon color=\"warning\" fill={true} name={layoutConfig.sub_logo} size={20} />\n )}\n {sub_text && (\n <Text color=\"text.secondary\" variant=\"caption\">\n {sub_text}\n </Text>\n )}\n </Stack>\n </Stack>\n </Stack>\n </Stack>\n </Stack>\n )\n}\n\nexport default AccountBlock\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAwBA,IAAM,KAAA,CAAgB,EAAE,SAAA,EAAA,MAA+D;AACrF,QAAM,IAAQ,EAAS,GACjB,IAAe,EAAuB,IAAI,GAC1C,EAAE,QAAA,GAAQ,OAAA,EAAA,IAAU,EAAuB,CAAY,GACvD,EAAE,eAAA,EAAA,IAAkB,GACpB,EAAE,SAAA,GAAS,kBAAA,GAAkB,kBAAA,GAAkB,WAAA,GAAW,eAAA,EAAA,IAAkB;AAElF,MAAI,EAAyB,CAAO,EAAG,QAAO,gBAAA,EAAC,GAAD,EAA+B,SAAA,EAAU,CAAA;AAMvF,QAAM,EAAE,MAAA,EAAA,IAAS,GACX,IAAK,MAAS,QACd,IAAa,EAAc,GAAM,QAAQ,GACzC,IAAS,IACX,OAAO,KAAe,YAAY,OAAO,SAAS,CAAU,IAC1D,IACA,SACF,EAAc,QAGZ,IAAc,EAAc,GAAM,UAAU,GAC5C,IAAY,OAAO,KAAgB,WAAW,IAAc,QAC5D,IAAW,IAAK,IAAY,EAAc,UAC1C,IAAQ,IAAK,IAAY,EAAc,OACvC,IAAiB,EAAc,GAAM,aAAa,GAClD,IAAc,IAChB,OAAO,KAAmB,WACxB,IACA,SACF,EAAc,aACZ,IAAO,EAAc,GAAM,MAAM,GACjC,IAAe,EACnB,EAAgB,CAAK,GACrB,GACA,WACA,cACF;AAIA,MAAI,GAAc,YAAY;AAC5B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AA,YACjB,qBAAqB;AAAA,YACrB,sBAAsB;AAAA,UACxB;AAAA,UACA,IAAK,KAAoB,KAAa,GAAM,SAAS,EACnD,eAAe,MACjB;AAAA,QACF;AAAA,QAhBF,UAAA,CAkBE,gBAAA,EAAC,GAAD;AAAA,UAAqB,MAAA;AAAA,UAAM,MAAM;AAAA,UAAwB,SAAA;AAAA,QAAU,CAAA,GAEnE,gBAAA,EAAC,GAAD,EAAA,UAAA,CACG,KAAU,QAAQ,gBAAA,EAAC,GAAD;AAAA,UAAM,SAAQ;AAAA,UAAM,UAAA,EAAe,GAAQ,QAAQ;AAAA,QAAQ,CAAA,GAC9E,gBAAA,EAAC,GAAD;AAAA,UAAO,IAAI;AAAA,YAAE,KAAK;AAAA,YAAG,eAAe;AAAA,YAAO,YAAY;AAAA,UAAS;AAAA,UAAhE,UAAA,CACG,EAAa,YACZ,gBAAA,EAAC,GAAD;AAAA,YAAM,OAAM;AAAA,YAAU,MAAM;AAAA,YAAM,MAAM,EAAa;AAAA,YAAU,MAAM;AAAA,UAAK,CAAA,GAE3E,KACC,gBAAA,EAAC,GAAD;AAAA,YAAM,OAAM;AAAA,YAAiB,SAAQ;AAAA,YAClC,UAAA;AAAA,UACG,CAAA,CAEH;AAAA,QACF,CAAA,CAAA,EAAA,CAAA,CACF;AAAA,MACF,CAAA,CAAA;AAAA;EACF,CAAA;AAEX"}
1
+ {"version":3,"file":"AccountBlock.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ComponentBlocks/AccountBlock/AccountBlock.tsx"],"sourcesContent":["import Box from '@mui/material/Box'\nimport Stack from '@mui/material/Stack'\nimport { useRef } from 'react'\nimport { useTheme } from '@mui/material/styles'\n\nimport { Text } from '@mxenabled/mxui'\nimport { Icon } from '@mxenabled/mx-icons'\n\nimport { slot, type InsightsPayload, type LogoRef } from '../../../../core'\nimport { formatCurrency } from '../../../../core/utils/NumberFormatting'\nimport LogoFromGuid from '../../../components/LogoFromGuid'\nimport { Confetti } from '../../../components/shared/Confetti'\nimport { ReactComponent as PaidOffCardGraphic } from '../../../components/shared/images/PaidOffCard.svg'\nimport { ReactComponent as SavingsGraphic } from '../../../components/shared/images/SavingsAccountDeposit.svg'\nimport { statusIconName } from '../../../components/statusIcon'\nimport { useContainerDimensions } from '../../../hooks/useContainerDimensions'\n\nimport { resolveVariantConfig } from '../../resolveVariantConfig'\nimport { DetailedAccountBlock, isDetailedAccountVariant } from '../DetailedAccountBlock'\n\nimport { HeaderComponent } from './HeaderComponent'\nimport { IconComponent } from './IconComponent'\nimport { getLayoutConfig } from './layout'\n\nconst AccountBlock = ({ payload }: { payload: InsightsPayload; beatGuid?: string }) => {\n const theme = useTheme()\n const containerRef = useRef<HTMLDivElement>(null)\n const { height, width } = useContainerDimensions(containerRef)\n const { instance_slot } = payload\n const { variant, institution_guid, institution_name, icon_name, merchant_name } = instance_slot\n\n if (isDetailedAccountVariant(variant)) return <DetailedAccountBlock payload={payload} />\n\n // V2 variants fill `instance_slot.data` (ditto's account_block slots) and it is then the whole\n // truth: a slot it leaves empty, or sends with the wrong kind, draws nothing rather than falling\n // back to the stale flat field it supersedes. Beats not yet migrated send no `data` and keep the\n // flat fields.\n const { data } = instance_slot\n const v2 = data !== undefined\n const dataAmount = slot<unknown>(data, 'amount')\n const amount = v2\n ? typeof dataAmount === 'number' && Number.isFinite(dataAmount)\n ? dataAmount\n : undefined\n : instance_slot.amount\n // One V2 slot feeds the line under the amount on both tiles. V1 called it `sub_text` on the\n // standard tile and `label` on the confetti tile, so each keeps its own flat field.\n const dataSubText = slot<unknown>(data, 'sub_text')\n const v2SubText = typeof dataSubText === 'string' ? dataSubText : undefined\n const sub_text = v2 ? v2SubText : instance_slot.sub_text\n const label = v2 ? v2SubText : instance_slot.label\n const dataHeaderText = slot<unknown>(data, 'header_text')\n const header_text = v2\n ? typeof dataHeaderText === 'string'\n ? dataHeaderText\n : undefined\n : instance_slot.header_text\n const logo = slot<LogoRef>(data, 'logo')\n const layoutConfig = resolveVariantConfig(\n getLayoutConfig(theme),\n variant,\n 'default',\n 'AccountBlock',\n )\n\n // Confetti-backed celebration variants (deposits, payoff, savings) — a success-tinted card\n // on a gradient + confetti wash. Everything variant-specific is flat on `layoutConfig`.\n if (layoutConfig?.isConfetti) {\n const confettiIcon = statusIconName(logo?.guid)\n const graphics: Record<string, React.ReactNode> = {\n paidOffCard: (\n // SVG is 58x46 but the card sits at (0,14) with the check badge overflowing top-right.\n // Box it to the card's real 44x32 footprint and shift the SVG up so it aligns with the text.\n <Box sx={{ flexShrink: 0, height: 32, position: 'relative', width: 44 }}>\n <PaidOffCardGraphic\n aria-hidden={true}\n role=\"presentation\"\n style={{ left: 0, position: 'absolute', top: -14 }}\n />\n </Box>\n ),\n savings: <SavingsGraphic aria-hidden={true} height={55} role=\"presentation\" width={55} />,\n logo: (\n <Box\n sx={{\n borderRadius: '4px',\n flexShrink: 0,\n height: 48,\n overflow: 'hidden',\n width: 48,\n }}\n >\n {/* An ICO- icon keeps the tile's look: an outlined glyph in success.contrastText on\n the success.main square. It is drawn with Icon, as IconComponent does, because\n LogoFromGuid fills every ICO- glyph. Any other guid renders via LogoFromGuid. */}\n {confettiIcon ? (\n <Stack\n data-icon={confettiIcon}\n sx={{\n alignItems: 'center',\n bgcolor: 'success.main',\n height: '100%',\n justifyContent: 'center',\n width: '100%',\n }}\n >\n <Icon\n aria-hidden={true}\n name={confettiIcon}\n size={layoutConfig.logo_icon_size ?? 24}\n sx={{ color: 'success.contrastText' }}\n />\n </Stack>\n ) : logo?.guid ? (\n <LogoFromGuid logo={logo} size={48} />\n ) : null}\n </Box>\n ),\n }\n const graphic = graphics[layoutConfig.graphic ?? 'logo']\n\n // Deposit cards show the payer name — a merchant when we have one, otherwise the institution.\n // V2 sends it resolved as `data.secondary_text`; the flat fields remain the fallback.\n const dataSecondaryText = slot<unknown>(data, 'secondary_text')\n const payer =\n (typeof dataSecondaryText === 'string' && dataSecondaryText) ||\n (merchant_name ?? institution_name)\n const secondaryText = layoutConfig.secondarySource === 'merchant' ? payer : label\n const secondary = secondaryText ? (\n <Text color={layoutConfig.secondaryColor} variant={layoutConfig.secondaryVariant}>\n {secondaryText}\n </Text>\n ) : null\n // No figure for a missing amount: `formatCurrency` would print a confident `$0.00`.\n const amountText =\n amount != null ? (\n <Text bold={true} color=\"success.dark\" variant={layoutConfig.amountVariant}>\n {`${layoutConfig.amountPrefix ?? ''}${formatCurrency(amount, '0,0.00')}`}\n </Text>\n ) : null\n\n return (\n <Box\n ref={containerRef}\n sx={{\n backgroundImage: layoutConfig.gradient,\n bgcolor: 'background.paper',\n overflow: 'hidden',\n position: 'relative',\n p: 16,\n width: '100%',\n }}\n >\n <Box\n sx={{\n inset: 0,\n pointerEvents: 'none',\n position: 'absolute',\n zIndex: 1,\n }}\n >\n <Confetti height={height} shouldRun={height > 0 && width > 0} width={width} />\n </Box>\n\n <Stack\n sx={{\n borderRadius: '8px',\n overflow: 'hidden',\n position: 'relative',\n width: '100%',\n zIndex: 2,\n }}\n >\n {layoutConfig.categoryStrip && header_text && (\n <Box sx={{ bgcolor: 'success.main', px: 12, py: 4 }}>\n <Text color=\"success.contrastText\" variant=\"caption\">\n {header_text}\n </Text>\n </Box>\n )}\n\n <Stack\n sx={{\n alignItems: 'center',\n bgcolor: 'success.lighter',\n border: '1px solid',\n borderColor: 'success.main',\n borderRadius: '8px',\n // With a strip above, the body's top corners tuck under it (no double border line).\n ...(layoutConfig.categoryStrip && {\n borderTopLeftRadius: 0,\n borderTopRightRadius: 0,\n borderTop: 0,\n }),\n flexDirection: 'row',\n ...layoutConfig.rowSx,\n }}\n >\n <Box sx={{ display: 'flex', flexShrink: 0 }}>{graphic}</Box>\n\n <Stack sx={{ flex: '1 0 0', minWidth: 0 }}>\n {layoutConfig.secondaryPosition === 'above' && secondary}\n {amountText}\n {layoutConfig.secondaryPosition === 'below' && secondary}\n </Stack>\n </Stack>\n </Stack>\n </Box>\n )\n }\n\n return (\n <Stack\n sx={{\n background: layoutConfig.background,\n p: 16,\n }}\n >\n <Stack\n sx={{\n borderRadius: '8px',\n boxShadow: theme.shadows[1],\n width: '100%',\n }}\n >\n {header_text && <HeaderComponent headerText={header_text} />}\n <Stack\n sx={{\n alignItems: 'center',\n bgcolor: 'background.paper',\n borderRadius: '8px',\n gap: 16,\n px: 16,\n py: 12,\n width: '100%',\n ...(header_text && {\n borderTopLeftRadius: '0',\n borderTopRightRadius: '0',\n }),\n ...((institution_guid || icon_name || logo?.guid) && {\n flexDirection: 'row',\n }),\n }}\n >\n <IconComponent logo={logo} slot={instance_slot} variant={variant} />\n\n <Stack>\n {amount != null && <Text variant=\"h2\">{formatCurrency(amount, '0,0.00')}</Text>}\n <Stack sx={{ gap: 8, flexDirection: 'row', alignItems: 'center' }}>\n {layoutConfig.sub_logo && (\n <Icon color=\"warning\" fill={true} name={layoutConfig.sub_logo} size={20} />\n )}\n {sub_text && (\n <Text color=\"text.secondary\" variant=\"caption\">\n {sub_text}\n </Text>\n )}\n </Stack>\n </Stack>\n </Stack>\n </Stack>\n </Stack>\n )\n}\n\nexport default AccountBlock\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAwBA,IAAM,KAAA,CAAgB,EAAE,SAAA,EAAA,MAA+D;AACrF,QAAM,IAAQ,EAAS,GACjB,IAAe,EAAuB,IAAI,GAC1C,EAAE,QAAA,GAAQ,OAAA,EAAA,IAAU,EAAuB,CAAY,GACvD,EAAE,eAAA,EAAA,IAAkB,GACpB,EAAE,SAAA,GAAS,kBAAA,GAAkB,kBAAA,GAAkB,WAAA,GAAW,eAAA,EAAA,IAAkB;AAElF,MAAI,EAAyB,CAAO,EAAG,QAAO,gBAAA,EAAC,GAAD,EAA+B,SAAA,EAAU,CAAA;AAMvF,QAAM,EAAE,MAAA,EAAA,IAAS,GACX,IAAK,MAAS,QACd,IAAa,EAAc,GAAM,QAAQ,GACzC,IAAS,IACX,OAAO,KAAe,YAAY,OAAO,SAAS,CAAU,IAC1D,IACA,SACF,EAAc,QAGZ,IAAc,EAAc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ources":["../../../../../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={30}\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,QAA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AAA,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"}
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, TILE_ICON_SIZE } 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={TILE_ICON_SIZE}\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,E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,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,MAAA;AAAA,MACA,IAAI,EAAE,OAAO,EAAa,WAAW;AAAA,IACtC,CAAA;AAAA,EACI,CAAA,IAIJ;AACT"}
@@ -6,6 +6,9 @@ export interface BlockLayoutConfig {
6
6
  logo_border_color?: string;
7
7
  /** Corner radius of the icon tile (`icon_name` or an `ICO-` logo). Defaults to 6px. */
8
8
  logo_border_radius?: string;
9
+ /** Glyph size in px for an `ICO-` logo on AccountBlock's confetti tile; nothing else reads it.
10
+ * Defaults to 24. */
11
+ logo_icon_size?: number;
9
12
  /** mx-icons glyph shown before `sub_text` (e.g. a warning icon on overdraft_warning). */
10
13
  sub_logo?: string;
11
14
  /** mx-icons glyph badged on the logo's corner (e.g. `error` on Low Account Balance's V2 tile). */
@@ -33,4 +36,6 @@ export interface BlockLayoutConfig {
33
36
  /** Theme color path for the secondary line. */
34
37
  secondaryColor?: string;
35
38
  }
39
+ /** Glyph size in px on the standard icon tile (IconComponent). */
40
+ export declare const TILE_ICON_SIZE = 30;
36
41
  export declare const getLayoutConfig: (theme: Theme) => Record<string, BlockLayoutConfig>;
@@ -42,6 +42,7 @@ var e = { background: "linear-gradient(256.82deg, rgba(255, 47, 40, 0.2) 1.86%,
42
42
  isConfetti: !0,
43
43
  gradient: a,
44
44
  graphic: "logo",
45
+ logo_icon_size: 30,
45
46
  amountVariant: "h2",
46
47
  rowSx: {
47
48
  gap: 16,
@@ -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'\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\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 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 // 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":";;AA4CA,IAAM,IAAsC,EAC1C,YACE,0FACJ,GAEa,IAAA,CAAmB,OACvB;AAAA,EACL,mBAAmB;AAAA,IACjB,YAAY,EAAM,QAAQ,QAAQ;AAAA,IAClC,UAAU;AAAA,EACZ;AAAA,EACA,mBAAmB;AAAA,EAEnB,aAAa;AAAA,IAAE,GAAG;AAAA,IAAkB,OAAO;AAAA,EAAQ;AAAA,EAGnD,kBAAkB;AAAA,IAChB,YAAY;AAAA,IACZ,cAAc;AAAA,IAEd,oBAAoB;AAAA,IACpB,YACE;AAAA,EACJ;AAAA,EACA,0BAA0B;AAAA,IACxB,YAAY;AAAA,IACZ,cAAc,EAAM,EAAM,QAAQ,YAAY,eAAe,IAAI,IAAI;AAAA,IACrE,mBAAmB;AAAA,IACnB,YACE;AAAA,EACJ;AAAA,EAGA,kBAAkB;AAAA,IAChB,YAAY;AAAA,IACZ,UAAU;AAAA,IACV,SAAS;AAAA,IACT,eAAe;AAAA,IACf,cAAc;AAAA,IACd,eAAe;AAAA,IACf,OAAO;AAAA,MAAE,KAAK;AAAA,MAAI,GAAG;AAAA,IAAG;AAAA,IACxB,iBAAiB;AAAA,IACjB,mBAAmB;AAAA,IACnB,kBAAkB;AAAA,IAClB,gBAAgB;AAAA,EAClB;AAAA,EACA,iBAAiB;AAAA,IACf,YAAY;AAAA,IACZ,UAAU;AAAA,IACV,SAAS;AAAA,IACT,eAAe;AAAA,IACf,OAAO;AAAA,MAAE,KAAK;AAAA,MAAI,GAAG;AAAA,IAAG;AAAA,IACxB,iBAAiB;AAAA,IACjB,mBAAmB;AAAA,IACnB,kBAAkB;AAAA,IAClB,gBAAgB;AAAA,EAClB;AAAA,EACA,oBAAoB;AAAA,IAClB,YAAY;AAAA,IACZ,UAAU;AAAA,IACV,SAAS;AAAA,IACT,eAAe;AAAA,IACf,OAAO;AAAA,MAAE,KAAK;AAAA,MAAI,IAAI;AAAA,MAAI,IAAI;AAAA,IAAG;AAAA,IACjC,iBAAiB;AAAA,IACjB,mBAAmB;AAAA,IACnB,kBAAkB;AAAA,IAClB,gBAAgB;AAAA,EAClB;AAAA,EACA,iBAAiB;AAAA,IACf,YAAY;AAAA,IACZ,UAAU;AAAA,IACV,SAAS;AAAA,IACT,eAAe;AAAA,IACf,OAAO;AAAA,MAAE,KAAK;AAAA,MAAI,GAAG;AAAA,IAAG;AAAA,IACxB,iBAAiB;AAAA,IACjB,mBAAmB;AAAA,IACnB,kBAAkB;AAAA,IAClB,gBAAgB;AAAA,EAClB;AAAA,EAGA,SAAS,CAAC;AACZ"}
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'\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 /** Glyph size in px for an `ICO-` logo on AccountBlock's confetti tile; nothing else reads it.\n * Defaults to 24. */\n logo_icon_size?: number\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\n/** Glyph size in px on the standard icon tile (IconComponent). */\nexport const TILE_ICON_SIZE = 30\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 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 logo_icon_size: TILE_ICON_SIZE,\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 // 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":";;AAkDA,IAAM,IAAsC,EAC1C,YACE,0FACJ,GAEa,IAAA,CAAmB,OACvB;AAAA,EACL,mBAAmB;AAAA,IACjB,YAAY,EAAM,QAAQ,QAAQ;AAAA,IAClC,UAAU;AAAA,EACZ;AAAA,EACA,mBAAmB;AAAA,EAEnB,aAAa;AAAA,IAAE,GAAG;AAAA,IAAkB,OAAO;AAAA,EAAQ;AAAA,EAGnD,kBAAkB;AAAA,IAChB,YAAY;AAAA,IACZ,cAAc;AAAA,IAEd,oBAAoB;AAAA,IACpB,YACE;AAAA,EACJ;AAAA,EACA,0BAA0B;AAAA,IACxB,YAAY;AAAA,IACZ,cAAc,EAAM,EAAM,QAAQ,YAAY,eAAe,IAAI,IAAI;AAAA,IACrE,mBAAmB;AAAA,IACnB,YACE;AAAA,EACJ;AAAA,EAGA,kBAAkB;AAAA,IAChB,YAAY;AAAA,IACZ,UAAU;AAAA,IACV,SAAS;AAAA,IACT,eAAe;AAAA,IACf,cAAc;AAAA,IACd,eAAe;AAAA,IACf,OAAO;AAAA,MAAE,KAAK;AAAA,MAAI,GAAG;AAAA,IAAG;AAAA,IACxB,iBAAiB;AAAA,IACjB,mBAAmB;AAAA,IACnB,kBAAkB;AAAA,IAClB,gBAAgB;AAAA,EAClB;AAAA,EACA,iBAAiB;AAAA,IACf,YAAY;AAAA,IACZ,UAAU;AAAA,IACV,SAAS;AAAA,IACT,gBAAA;AAAA,IACA,eAAe;AAAA,IACf,OAAO;AAAA,MAAE,KAAK;AAAA,MAAI,GAAG;AAAA,IAAG;AAAA,IACxB,iBAAiB;AAAA,IACjB,mBAAmB;AAAA,IACnB,kBAAkB;AAAA,IAClB,gBAAgB;AAAA,EAClB;AAAA,EACA,oBAAoB;AAAA,IAClB,YAAY;AAAA,IACZ,UAAU;AAAA,IACV,SAAS;AAAA,IACT,eAAe;AAAA,IACf,OAAO;AAAA,MAAE,KAAK;AAAA,MAAI,IAAI;AAAA,MAAI,IAAI;AAAA,IAAG;AAAA,IACjC,iBAAiB;AAAA,IACjB,mBAAmB;AAAA,IACnB,kBAAkB;AAAA,IAClB,gBAAgB;AAAA,EAClB;AAAA,EACA,iBAAiB;AAAA,IACf,YAAY;AAAA,IACZ,UAAU;AAAA,IACV,SAAS;AAAA,IACT,eAAe;AAAA,IACf,OAAO;AAAA,MAAE,KAAK;AAAA,MAAI,GAAG;AAAA,IAAG;AAAA,IACxB,iBAAiB;AAAA,IACjB,mBAAmB;AAAA,IACnB,kBAAkB;AAAA,IAClB,gBAAgB;AAAA,EAClB;AAAA,EAGA,SAAS,CAAC;AACZ"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mx-cartographer/experiences",
3
- "version": "9.7.19",
3
+ "version": "9.7.21",
4
4
  "description": "Library containing experience widgets",
5
5
  "author": "MX",
6
6
  "license": "MIT",