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

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.
@@ -1,38 +1,46 @@
1
- import { buildDynamicCopy as m } from "../../../../core/utils/Localization.es.js";
2
- import { GlobalDataContext as u } from "../../../../common/context/GlobalDataProvider.es.js";
3
- import { slot as c } from "../../../../core/types/Insights.es.js";
4
- import { resolveVariantConfig as d } from "../../resolveVariantConfig.es.js";
5
- import { asLogoRef as g, asText as f, slotOrFlat as p } from "../../slotReaders.es.js";
6
- import _ from "../../../components/LogoFromGuid.es.js";
7
- import v from "../../../components/DirectDepositCard.es.js";
8
- import { detailedAccountVariant as y, getLayoutConfig as L } from "./layout.es.js";
9
- import { useContext as x } from "react";
1
+ import { buildDynamicCopy as l } from "../../../../core/utils/Localization.es.js";
2
+ import { GlobalDataContext as c } from "../../../../common/context/GlobalDataProvider.es.js";
3
+ import { slot as u } from "../../../../core/types/Insights.es.js";
4
+ import { resolveVariantConfig as f } from "../../resolveVariantConfig.es.js";
5
+ import { asLogoRef as g, asText as p, slotOrFlat as d } from "../../slotReaders.es.js";
6
+ import y from "../../../components/LogoFromGuid.es.js";
7
+ import _ from "../../../components/DirectDepositCard.es.js";
8
+ import { detailedAccountVariant as x, getLayoutConfig as v } from "./layout.es.js";
9
+ import { useContext as L } from "react";
10
10
  import { jsx as s } from "react/jsx-runtime";
11
- import { useTheme as C } from "@mui/material/styles";
12
- var n = (o, r) => f(p(o, r)), D = (o, r) => {
13
- const t = g(c(o.data, "logo")), i = n(o, "institution_guid"), e = t?.alt ?? n(o, "institution_name"), a = t ?? (i ? {
11
+ import { useTheme as h } from "@mui/material/styles";
12
+ import b from "@mui/material/Box";
13
+ var n = (t, r) => p(d(t, r)), C = (t, r) => {
14
+ const o = g(u(t.data, "logo")), i = n(t, "institution_guid"), e = o?.alt ?? n(t, "institution_name"), a = o ?? (i ? {
14
15
  guid: i,
15
16
  alt: e ?? i
16
17
  } : void 0);
17
18
  return !a || !e ? a : {
18
19
  ...a,
19
- alt: r ? m(r, e) : e
20
+ alt: r ? l(r, e) : e
20
21
  };
21
- }, H = ({ payload: o }) => {
22
- const r = C(), { instance_slot: t } = o, i = x(u)?.globalStore.copyStore.copy.insights_feed?.general?.institution_Logo, e = D(t, i), a = n(t, "status_text"), l = d(L(r), t.variant, y.Neutral, "DetailedAccountBlock");
23
- return /* @__PURE__ */ s(v, {
24
- ...l,
25
- logo: e?.guid ? /* @__PURE__ */ s(_, {
22
+ }, I = ({ payload: t }) => {
23
+ const r = h(), { instance_slot: o } = t, i = L(c)?.globalStore.copyStore.copy.insights_feed?.general?.institution_Logo, e = C(o, i), a = n(o, "status_text"), m = f(v(r), o.variant, x.Neutral, "DetailedAccountBlock");
24
+ return /* @__PURE__ */ s(_, {
25
+ ...m,
26
+ logo: e?.guid ? /* @__PURE__ */ s(y, {
26
27
  logo: e,
27
28
  size: 48
28
29
  }) : null,
29
- name: n(t, "account_name"),
30
- statusLabel: a ? /* @__PURE__ */ s("div", { dangerouslySetInnerHTML: { __html: a } }) : void 0,
31
- subtitle: n(t, "account_type")
30
+ name: n(o, "account_name"),
31
+ statusLabel: a ? /* @__PURE__ */ s(b, {
32
+ component: "span",
33
+ dangerouslySetInnerHTML: { __html: a },
34
+ sx: { "& .bold-copy": {
35
+ fontFamily: "inherit",
36
+ fontWeight: "fontWeightBold"
37
+ } }
38
+ }) : void 0,
39
+ subtitle: n(o, "account_type")
32
40
  });
33
41
  };
34
42
  export {
35
- H as default
43
+ I as default
36
44
  };
37
45
 
38
46
  //# sourceMappingURL=DetailedAccountBlock.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DetailedAccountBlock.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ComponentBlocks/DetailedAccountBlock/DetailedAccountBlock.tsx"],"sourcesContent":["import { useContext } from 'react'\n\n// import Box from '@mui/material/Box'\nimport { useTheme } from '@mui/material/styles'\n\nimport { GlobalDataContext } from '../../../../common/context/GlobalDataProvider'\nimport { slot, type InsightsPayload, type LogoRef } from '../../../../core'\nimport { buildDynamicCopy } from '../../../../core/utils/Localization'\nimport DirectDepositCard from '../../../components/DirectDepositCard'\nimport LogoFromGuid from '../../../components/LogoFromGuid'\n\nimport { resolveVariantConfig } from '../../resolveVariantConfig'\nimport { asLogoRef, asText, slotOrFlat, type FlatSlotKey } from '../../slotReaders'\n\nimport { detailedAccountVariant, getLayoutConfig } from './layout'\n\ninterface DetailedAccountBlockProps {\n payload: InsightsPayload\n}\n\ntype InstanceSlot = InsightsPayload['instance_slot']\n\nconst readFact = (instanceSlot: InstanceSlot, name: FlatSlotKey): string | undefined =>\n asText(slotOrFlat(instanceSlot, name))\n\n/** The slot's logo, else one built from the guid; the alt is worded as legacy (\"{institution} Institution Logo\"). */\nconst resolveLogo = (instanceSlot: InstanceSlot, altCopy?: string): LogoRef | undefined => {\n const dataLogo = asLogoRef(slot(instanceSlot.data, 'logo'))\n const guid = readFact(instanceSlot, 'institution_guid')\n const name = dataLogo?.alt ?? readFact(instanceSlot, 'institution_name')\n\n const logo = dataLogo ?? (guid ? { guid, alt: name ?? guid } : undefined)\n if (!logo || !name) return logo\n\n return { ...logo, alt: altCopy ? (buildDynamicCopy(altCopy, name) as string) : name }\n}\n\nconst DetailedAccountBlock = ({ payload }: DetailedAccountBlockProps) => {\n const theme = useTheme()\n const { instance_slot } = payload\n // Optional: the micro widget renders this block without a GlobalDataProvider.\n const altCopy =\n useContext(GlobalDataContext)?.globalStore.copyStore.copy.insights_feed?.general\n ?.institution_Logo\n const logo = resolveLogo(instance_slot, altCopy)\n const statusText = readFact(instance_slot, 'status_text')\n const layout = resolveVariantConfig(\n getLayoutConfig(theme),\n instance_slot.variant,\n detailedAccountVariant.Neutral,\n 'DetailedAccountBlock',\n )\n\n return (\n <DirectDepositCard\n {...layout}\n logo={logo?.guid ? <LogoFromGuid logo={logo} size={48} /> : null}\n name={readFact(instance_slot, 'account_name')}\n statusLabel={\n statusText ? (\n // Server-rendered mrs_content copy (bold-copy span around a formatted rate), not user\n // input; painted as BudgetBlock paints sub_text.\n // <Box\n // component=\"span\"\n // dangerouslySetInnerHTML={{ __html: statusText }}\n // sx={{ '& .bold-copy': { fontFamily: 'inherit', fontWeight: 'fontWeightBold' } }}\n // />\n <div dangerouslySetInnerHTML={{ __html: statusText }} />\n ) : undefined\n }\n subtitle={readFact(instance_slot, 'account_type')}\n />\n )\n}\n\nexport default DetailedAccountBlock\n"],"mappings":";;;;;;;;;;;AAsBA,IAAM,IAAA,CAAY,GAA4B,MAC5C,EAAO,EAAW,GAAc,CAAI,CAAC,GAGjC,IAAA,CAAe,GAA4B,MAA0C;AACzF,QAAM,IAAW,EAAU,EAAK,EAAa,MAAM,MAAM,CAAC,GACpD,IAAO,EAAS,GAAc,kBAAkB,GAChD,IAAO,GAAU,OAAO,EAAS,GAAc,kBAAkB,GAEjE,IAAO,MAAa,IAAO;AAAA,IAAE,MAAA;AAAA,IAAM,KAAK,KAAQ;AAAA,EAAK,IAAI;AAC/D,SAAI,CAAC,KAAQ,CAAC,IAAa,IAEpB;AAAA,IAAE,GAAG;AAAA,IAAM,KAAK,IAAW,EAAiB,GAAS,CAAI,IAAe;AAAA,EAAK;AACtF,GAEM,IAAA,CAAwB,EAAE,SAAA,EAAA,MAAyC;AACvE,QAAM,IAAQ,EAAS,GACjB,EAAE,eAAA,EAAA,IAAkB,GAEpB,IACJ,EAAW,CAAiB,GAAG,YAAY,UAAU,KAAK,eAAe,SACrE,kBACA,IAAO,EAAY,GAAe,CAAO,GACzC,IAAa,EAAS,GAAe,aAAa,GAClD,IAAS,EACb,EAAgB,CAAK,GACrB,EAAc,SACd,EAAuB,SACvB,sBACF;AAEA,SACE,gBAAA,EAAC,GAAD;AAAA,IACE,GAAI;AAAA,IACJ,MAAM,GAAM,OAAO,gBAAA,EAAC,GAAD;AAAA,MAAoB,MAAA;AAAA,MAAM,MAAM;AAAA,IAAK,CAAA,IAAI;AAAA,IAC5D,MAAM,EAAS,GAAe,cAAc;AAAA,IAC5C,aACE,IAQE,gBAAA,EAAC,OAAD,EAAK,yBAAyB,EAAE,QAAQ,EAAW,EAAI,CAAA,IACrD;AAAA,IAEN,UAAU,EAAS,GAAe,cAAc;AAAA,EACjD,CAAA;AAEL"}
1
+ {"version":3,"file":"DetailedAccountBlock.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ComponentBlocks/DetailedAccountBlock/DetailedAccountBlock.tsx"],"sourcesContent":["import { useContext } from 'react'\n\nimport Box from '@mui/material/Box'\nimport { useTheme } from '@mui/material/styles'\n\nimport { GlobalDataContext } from '../../../../common/context/GlobalDataProvider'\nimport { slot, type InsightsPayload, type LogoRef } from '../../../../core'\nimport { buildDynamicCopy } from '../../../../core/utils/Localization'\nimport DirectDepositCard from '../../../components/DirectDepositCard'\nimport LogoFromGuid from '../../../components/LogoFromGuid'\n\nimport { resolveVariantConfig } from '../../resolveVariantConfig'\nimport { asLogoRef, asText, slotOrFlat, type FlatSlotKey } from '../../slotReaders'\n\nimport { detailedAccountVariant, getLayoutConfig } from './layout'\n\ninterface DetailedAccountBlockProps {\n payload: InsightsPayload\n}\n\ntype InstanceSlot = InsightsPayload['instance_slot']\n\nconst readFact = (instanceSlot: InstanceSlot, name: FlatSlotKey): string | undefined =>\n asText(slotOrFlat(instanceSlot, name))\n\n/** The slot's logo, else one built from the guid; the alt is worded as legacy (\"{institution} Institution Logo\"). */\nconst resolveLogo = (instanceSlot: InstanceSlot, altCopy?: string): LogoRef | undefined => {\n const dataLogo = asLogoRef(slot(instanceSlot.data, 'logo'))\n const guid = readFact(instanceSlot, 'institution_guid')\n const name = dataLogo?.alt ?? readFact(instanceSlot, 'institution_name')\n\n const logo = dataLogo ?? (guid ? { guid, alt: name ?? guid } : undefined)\n if (!logo || !name) return logo\n\n return { ...logo, alt: altCopy ? (buildDynamicCopy(altCopy, name) as string) : name }\n}\n\nconst DetailedAccountBlock = ({ payload }: DetailedAccountBlockProps) => {\n const theme = useTheme()\n const { instance_slot } = payload\n // Optional: the micro widget renders this block without a GlobalDataProvider.\n const altCopy =\n useContext(GlobalDataContext)?.globalStore.copyStore.copy.insights_feed?.general\n ?.institution_Logo\n const logo = resolveLogo(instance_slot, altCopy)\n const statusText = readFact(instance_slot, 'status_text')\n const layout = resolveVariantConfig(\n getLayoutConfig(theme),\n instance_slot.variant,\n detailedAccountVariant.Neutral,\n 'DetailedAccountBlock',\n )\n\n return (\n <DirectDepositCard\n {...layout}\n logo={logo?.guid ? <LogoFromGuid logo={logo} size={48} /> : null}\n name={readFact(instance_slot, 'account_name')}\n statusLabel={\n statusText ? (\n // Server-rendered mrs_content copy (bold-copy span around a formatted rate), not user\n // input; painted as BudgetBlock paints sub_text.\n <Box\n component=\"span\"\n dangerouslySetInnerHTML={{ __html: statusText }}\n sx={{ '& .bold-copy': { fontFamily: 'inherit', fontWeight: 'fontWeightBold' } }}\n />\n ) : undefined\n }\n subtitle={readFact(instance_slot, 'account_type')}\n />\n )\n}\n\nexport default DetailedAccountBlock\n"],"mappings":";;;;;;;;;;;;AAsBA,IAAM,IAAA,CAAY,GAA4B,MAC5C,EAAO,EAAW,GAAc,CAAI,CAAC,GAGjC,IAAA,CAAe,GAA4B,MAA0C;AACzF,QAAM,IAAW,EAAU,EAAK,EAAa,MAAM,MAAM,CAAC,GACpD,IAAO,EAAS,GAAc,kBAAkB,GAChD,IAAO,GAAU,OAAO,EAAS,GAAc,kBAAkB,GAEjE,IAAO,MAAa,IAAO;AAAA,IAAE,MAAA;AAAA,IAAM,KAAK,KAAQ;AAAA,EAAK,IAAI;AAC/D,SAAI,CAAC,KAAQ,CAAC,IAAa,IAEpB;AAAA,IAAE,GAAG;AAAA,IAAM,KAAK,IAAW,EAAiB,GAAS,CAAI,IAAe;AAAA,EAAK;AACtF,GAEM,IAAA,CAAwB,EAAE,SAAA,EAAA,MAAyC;AACvE,QAAM,IAAQ,EAAS,GACjB,EAAE,eAAA,EAAA,IAAkB,GAEpB,IACJ,EAAW,CAAiB,GAAG,YAAY,UAAU,KAAK,eAAe,SACrE,kBACA,IAAO,EAAY,GAAe,CAAO,GACzC,IAAa,EAAS,GAAe,aAAa,GAClD,IAAS,EACb,EAAgB,CAAK,GACrB,EAAc,SACd,EAAuB,SACvB,sBACF;AAEA,SACE,gBAAA,EAAC,GAAD;AAAA,IACE,GAAI;AAAA,IACJ,MAAM,GAAM,OAAO,gBAAA,EAAC,GAAD;AAAA,MAAoB,MAAA;AAAA,MAAM,MAAM;AAAA,IAAK,CAAA,IAAI;AAAA,IAC5D,MAAM,EAAS,GAAe,cAAc;AAAA,IAC5C,aACE,IAGE,gBAAA,EAAC,GAAD;AAAA,MACE,WAAU;AAAA,MACV,yBAAyB,EAAE,QAAQ,EAAW;AAAA,MAC9C,IAAI,EAAE,gBAAgB;AAAA,QAAE,YAAY;AAAA,QAAW,YAAY;AAAA,MAAiB,EAAE;AAAA,IAC/E,CAAA,IACC;AAAA,IAEN,UAAU,EAAS,GAAe,cAAc;AAAA,EACjD,CAAA;AAEL"}
@@ -49,8 +49,8 @@ export declare const ERROR_WASH_GRADIENT = "linear-gradient(256.82deg, rgba(255,
49
49
  export declare const FEES_WASH_GRADIENT = "linear-gradient(239.66deg, rgba(227, 39, 39, 0.25) 1.86%, rgba(255, 123, 0, 0.25) 101.54%)";
50
50
  /** Blue tile, per theme mode (Missing Interest Rate before the rate is added). */
51
51
  export declare const PRIMARY_TILE_GRADIENTS: {
52
- readonly light: "linear-gradient(180deg, #A0B9F8 0%, #2C64EF 100%)";
53
- readonly dark: "linear-gradient(180deg, #1F46A7 0%, #6B92F4 100%)";
52
+ readonly light: "linear-gradient(127deg, rgba(160, 185, 248, 0.75) 46.41%, rgba(44, 100, 239, 0.75) 78.14%, #FFF)";
53
+ readonly dark: "linear-gradient(127deg, rgba(160, 185, 248, 0.75) 46.41%, rgba(44, 100, 239, 0.75) 78.14%, #FFF)";
54
54
  };
55
55
  /** Green tile, per theme mode (Missing Interest Rate once the rate is added). */
56
56
  export declare const SUCCESS_TILE_GRADIENTS: {
@@ -1,23 +1,23 @@
1
1
  import { alpha as a } from "@mui/material/styles";
2
- var d = "linear-gradient(200.73deg, rgba(255, 223, 152, 0.2) 1.86%, rgba(173, 248, 43, 0.2) 101.54%)", E = "linear-gradient(257deg, rgba(255, 224, 153, 0.2) 1.86%, rgba(173, 248, 44, 0.2) 101.54%)", n = "linear-gradient(200.73deg, rgba(255, 223, 152, 0.2) 1.86%, rgba(255, 128, 229, 0.2) 101.54%)", e = (r) => `linear-gradient(${r}deg, rgba(255, 224, 153, 0.2) 1.86%, rgba(255, 129, 230, 0.2) 101.54%)`, A = e(200.73), t = "linear-gradient(201deg, rgba(255, 170, 0, 0.25) 1.86%, rgba(255, 68, 0, 0.25) 101.54%)", _ = "linear-gradient(256.82deg, rgba(255, 47, 40, 0.2) 1.86%, rgba(255, 0, 72, 0.2) 101.54%)", R = "linear-gradient(239.66deg, rgba(227, 39, 39, 0.25) 1.86%, rgba(255, 123, 0, 0.25) 101.54%)", T = {
3
- light: "linear-gradient(180deg, #A0B9F8 0%, #2C64EF 100%)",
4
- dark: "linear-gradient(180deg, #1F46A7 0%, #6B92F4 100%)"
5
- }, I = {
2
+ var d = "linear-gradient(200.73deg, rgba(255, 223, 152, 0.2) 1.86%, rgba(173, 248, 43, 0.2) 101.54%)", n = "linear-gradient(257deg, rgba(255, 224, 153, 0.2) 1.86%, rgba(173, 248, 44, 0.2) 101.54%)", E = "linear-gradient(200.73deg, rgba(255, 223, 152, 0.2) 1.86%, rgba(255, 128, 229, 0.2) 101.54%)", e = (r) => `linear-gradient(${r}deg, rgba(255, 224, 153, 0.2) 1.86%, rgba(255, 129, 230, 0.2) 101.54%)`, b = e(200.73), t = "linear-gradient(201deg, rgba(255, 170, 0, 0.25) 1.86%, rgba(255, 68, 0, 0.25) 101.54%)", A = "linear-gradient(256.82deg, rgba(255, 47, 40, 0.2) 1.86%, rgba(255, 0, 72, 0.2) 101.54%)", _ = "linear-gradient(239.66deg, rgba(227, 39, 39, 0.25) 1.86%, rgba(255, 123, 0, 0.25) 101.54%)", R = {
3
+ light: "linear-gradient(127deg, rgba(160, 185, 248, 0.75) 46.41%, rgba(44, 100, 239, 0.75) 78.14%, #FFF)",
4
+ dark: "linear-gradient(127deg, rgba(160, 185, 248, 0.75) 46.41%, rgba(44, 100, 239, 0.75) 78.14%, #FFF)"
5
+ }, T = {
6
6
  light: "linear-gradient(180deg, #94C9B7 0%, #12875E 100%)",
7
7
  dark: "linear-gradient(180deg, #0D5F42 0%, #59AB8E 100%)"
8
- }, l = ({ palette: r }, g = 173) => `linear-gradient(${g}deg, ${a(r.primary.light, 0.75)} 46.41%, ${a(r.primary.main, 0.75)} 78.14%)`;
8
+ }, I = ({ palette: r }, g = 173) => `linear-gradient(${g}deg, ${a(r.primary.light, 0.75)} 46.41%, ${a(r.primary.main, 0.75)} 78.14%)`;
9
9
  export {
10
- A as ACCOUNT_CONNECTED_GRADIENT,
11
- n as CELEBRATION_GRADIENT,
12
- E as DIRECT_DEPOSIT_COMPLETE_GRADIENT,
13
- _ as ERROR_WASH_GRADIENT,
14
- R as FEES_WASH_GRADIENT,
15
- T as PRIMARY_TILE_GRADIENTS,
16
- I as SUCCESS_TILE_GRADIENTS,
10
+ b as ACCOUNT_CONNECTED_GRADIENT,
11
+ E as CELEBRATION_GRADIENT,
12
+ n as DIRECT_DEPOSIT_COMPLETE_GRADIENT,
13
+ A as ERROR_WASH_GRADIENT,
14
+ _ as FEES_WASH_GRADIENT,
15
+ R as PRIMARY_TILE_GRADIENTS,
16
+ T as SUCCESS_TILE_GRADIENTS,
17
17
  d as WARM_LIME_ACCENT_GRADIENT,
18
18
  t as WARNING_WASH_GRADIENT,
19
19
  e as celebrateGradient,
20
- l as getPrimaryWashGradient
20
+ I as getPrimaryWashGradient
21
21
  };
22
22
 
23
23
  //# sourceMappingURL=celebrationGradients.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"celebrationGradients.es.js","names":[],"sources":["../../../src/insights-v2/components/celebrationGradients.ts"],"sourcesContent":["import { alpha, type Theme } from '@mui/material/styles'\n\n/**\n * Decorative slot washes shared by the block layouts and the presentational components, so\n * one source holds each gradient. The 20%–25% washes layer over `background.paper` via\n * `backgroundImage`; `DISCOVERED_ACCOUNTS_GRADIENT` and the tile gradients are opaque and stand alone.\n *\n * - WARM_LIME_ACCENT_GRADIENT: merchant categorization and on-track states.\n * - DIRECT_DEPOSIT_COMPLETE_GRADIENT: the direct deposit complete tile and the deposit tile.\n * - CELEBRATION_GRADIENT / ACCOUNT_CONNECTED_GRADIENT: balance milestones, account connected.\n * - celebrateGradient(angle): Figma's Celebrate Gradient at any angle.\n * - WARNING_WASH_GRADIENT: a flagged charge (Unexpected Subscription Payment).\n * - ERROR_WASH_GRADIENT: low balance, off-track status.\n * - FEES_WASH_GRADIENT: fees and interest charges.\n * - PRIMARY_TILE_GRADIENTS / SUCCESS_TILE_GRADIENTS: blue and green tiles, per theme mode.\n * - getPrimaryWashGradient(theme, angle?): pending connect / detected subscription, from the palette.\n */\n\n/**\n * Warm → lime accent wash at 20% opacity. Used as a tinted background behind\n * merchant categorization highlights and on-track states.\n */\nexport const WARM_LIME_ACCENT_GRADIENT =\n 'linear-gradient(200.73deg, rgba(255, 223, 152, 0.2) 1.86%, rgba(173, 248, 43, 0.2) 101.54%)'\n\n/**\n * Warm → lime wash at 20% behind the Direct Deposit complete tile (Set Up / Switch Direct Deposit) and\n * the deposit tile (Unified Deposit).\n * Figma gives it its own angle and stops, so it does not reuse WARM_LIME_ACCENT_GRADIENT.\n */\nexport const DIRECT_DEPOSIT_COMPLETE_GRADIENT =\n 'linear-gradient(257deg, rgba(255, 224, 153, 0.2) 1.86%, rgba(173, 248, 44, 0.2) 101.54%)'\n\n/** Warm → pink wash behind balance/savings milestones. */\nexport const CELEBRATION_GRADIENT =\n 'linear-gradient(200.73deg, rgba(255, 223, 152, 0.2) 1.86%, rgba(255, 128, 229, 0.2) 101.54%)'\n\n/** Figma Celebrate Gradient; its angle varies per slot. */\nexport const celebrateGradient = (angleDeg: number) =>\n `linear-gradient(${angleDeg}deg, rgba(255, 224, 153, 0.2) 1.86%, rgba(255, 129, 230, 0.2) 101.54%)`\n\n/** Peach → pink gradient for Discovered Accounts success state. */\nexport const DISCOVERED_ACCOUNTS_GRADIENT =\n 'linear-gradient(200.73deg, rgba(255, 224, 153, 1) 1.86%, rgba(255, 129, 230, 1) 101.54%)'\n\n/**\n * Warm → pink wash at 20% opacity for the account-connected success state.\n * Layer over `background.paper` (the Figma spec's `#FFF` base), not the\n * `background` shorthand — a 20% gradient over transparency renders wrong.\n */\nexport const ACCOUNT_CONNECTED_GRADIENT = celebrateGradient(200.73)\n\n/**\n * Orange → red-orange wash at 25% opacity behind a flagged charge (Unexpected Subscription\n * Payment). Figma \"Warning Gradient 1\": a bespoke two-stop blend with no palette token, so it\n * stays a literal like the other washes here rather than being derived from `palette.warning`.\n */\nexport const WARNING_WASH_GRADIENT =\n 'linear-gradient(201deg, rgba(255, 170, 0, 0.25) 1.86%, rgba(255, 68, 0, 0.25) 101.54%)'\n\n/** Red wash at 20%: low balance, off-track status. */\nexport const ERROR_WASH_GRADIENT =\n 'linear-gradient(256.82deg, rgba(255, 47, 40, 0.2) 1.86%, rgba(255, 0, 72, 0.2) 101.54%)'\n\n/** Red → orange wash at 25%: fees and interest charges (Figma 1365:301242, error.main → warning.main). */\nexport const FEES_WASH_GRADIENT =\n 'linear-gradient(239.66deg, rgba(227, 39, 39, 0.25) 1.86%, rgba(255, 123, 0, 0.25) 101.54%)'\n\n/** Blue tile, per theme mode (Missing Interest Rate before the rate is added). */\nexport const PRIMARY_TILE_GRADIENTS = {\n light: 'linear-gradient(180deg, #A0B9F8 0%, #2C64EF 100%)',\n dark: 'linear-gradient(180deg, #1F46A7 0%, #6B92F4 100%)',\n} as const\n\n/** Green tile, per theme mode (Missing Interest Rate once the rate is added). */\nexport const SUCCESS_TILE_GRADIENTS = {\n light: 'linear-gradient(180deg, #94C9B7 0%, #12875E 100%)',\n dark: 'linear-gradient(180deg, #0D5F42 0%, #59AB8E 100%)',\n} as const\n\n/**\n * Blue slot wash behind a pending connect / detected-subscription row: `primary.light` →\n * `primary.main` at 75% over paper, built from the live palette so it follows the theme. Figma's\n * angle follows the slot's shape, so a slot passes its own.\n */\nexport const getPrimaryWashGradient = ({ palette }: Theme, angleDeg = 173) =>\n `linear-gradient(${angleDeg}deg, ${alpha(palette.primary.light, 0.75)} 46.41%, ${alpha(palette.primary.main, 0.75)} 78.14%)`\n"],"mappings":";AAsBA,IAAa,IACX,+FAOW,IACX,4FAGW,IACX,gGAGW,IAAA,CAAqB,MAChC,mBAAmB,CAAA,0EAWR,IAA6B,EAAkB,MAAM,GAOrD,IACX,0FAGW,IACX,2FAGW,IACX,8FAGW,IAAyB;AAAA,EACpC,OAAO;AAAA,EACP,MAAM;AACR,GAGa,IAAyB;AAAA,EACpC,OAAO;AAAA,EACP,MAAM;AACR,GAOa,IAAA,CAA0B,EAAE,SAAA,EAAA,GAAkB,IAAW,QACpE,mBAAmB,CAAA,QAAgB,EAAM,EAAQ,QAAQ,OAAO,IAAI,CAAA,YAAa,EAAM,EAAQ,QAAQ,MAAM,IAAI,CAAA"}
1
+ {"version":3,"file":"celebrationGradients.es.js","names":[],"sources":["../../../src/insights-v2/components/celebrationGradients.ts"],"sourcesContent":["import { alpha, type Theme } from '@mui/material/styles'\n\n/**\n * Decorative slot washes shared by the block layouts and the presentational components, so\n * one source holds each gradient. The 20%–25% washes layer over `background.paper` via\n * `backgroundImage`; `DISCOVERED_ACCOUNTS_GRADIENT` and the tile gradients are opaque and stand alone.\n *\n * - WARM_LIME_ACCENT_GRADIENT: merchant categorization and on-track states.\n * - DIRECT_DEPOSIT_COMPLETE_GRADIENT: the direct deposit complete tile and the deposit tile.\n * - CELEBRATION_GRADIENT / ACCOUNT_CONNECTED_GRADIENT: balance milestones, account connected.\n * - celebrateGradient(angle): Figma's Celebrate Gradient at any angle.\n * - WARNING_WASH_GRADIENT: a flagged charge (Unexpected Subscription Payment).\n * - ERROR_WASH_GRADIENT: low balance, off-track status.\n * - FEES_WASH_GRADIENT: fees and interest charges.\n * - PRIMARY_TILE_GRADIENTS / SUCCESS_TILE_GRADIENTS: blue and green tiles, per theme mode.\n * - getPrimaryWashGradient(theme, angle?): pending connect / detected subscription, from the palette.\n */\n\n/**\n * Warm → lime accent wash at 20% opacity. Used as a tinted background behind\n * merchant categorization highlights and on-track states.\n */\nexport const WARM_LIME_ACCENT_GRADIENT =\n 'linear-gradient(200.73deg, rgba(255, 223, 152, 0.2) 1.86%, rgba(173, 248, 43, 0.2) 101.54%)'\n\n/**\n * Warm → lime wash at 20% behind the Direct Deposit complete tile (Set Up / Switch Direct Deposit) and\n * the deposit tile (Unified Deposit).\n * Figma gives it its own angle and stops, so it does not reuse WARM_LIME_ACCENT_GRADIENT.\n */\nexport const DIRECT_DEPOSIT_COMPLETE_GRADIENT =\n 'linear-gradient(257deg, rgba(255, 224, 153, 0.2) 1.86%, rgba(173, 248, 44, 0.2) 101.54%)'\n\n/** Warm → pink wash behind balance/savings milestones. */\nexport const CELEBRATION_GRADIENT =\n 'linear-gradient(200.73deg, rgba(255, 223, 152, 0.2) 1.86%, rgba(255, 128, 229, 0.2) 101.54%)'\n\n/** Figma Celebrate Gradient; its angle varies per slot. */\nexport const celebrateGradient = (angleDeg: number) =>\n `linear-gradient(${angleDeg}deg, rgba(255, 224, 153, 0.2) 1.86%, rgba(255, 129, 230, 0.2) 101.54%)`\n\n/** Peach → pink gradient for Discovered Accounts success state. */\nexport const DISCOVERED_ACCOUNTS_GRADIENT =\n 'linear-gradient(200.73deg, rgba(255, 224, 153, 1) 1.86%, rgba(255, 129, 230, 1) 101.54%)'\n\n/**\n * Warm → pink wash at 20% opacity for the account-connected success state.\n * Layer over `background.paper` (the Figma spec's `#FFF` base), not the\n * `background` shorthand — a 20% gradient over transparency renders wrong.\n */\nexport const ACCOUNT_CONNECTED_GRADIENT = celebrateGradient(200.73)\n\n/**\n * Orange → red-orange wash at 25% opacity behind a flagged charge (Unexpected Subscription\n * Payment). Figma \"Warning Gradient 1\": a bespoke two-stop blend with no palette token, so it\n * stays a literal like the other washes here rather than being derived from `palette.warning`.\n */\nexport const WARNING_WASH_GRADIENT =\n 'linear-gradient(201deg, rgba(255, 170, 0, 0.25) 1.86%, rgba(255, 68, 0, 0.25) 101.54%)'\n\n/** Red wash at 20%: low balance, off-track status. */\nexport const ERROR_WASH_GRADIENT =\n 'linear-gradient(256.82deg, rgba(255, 47, 40, 0.2) 1.86%, rgba(255, 0, 72, 0.2) 101.54%)'\n\n/** Red → orange wash at 25%: fees and interest charges (Figma 1365:301242, error.main → warning.main). */\nexport const FEES_WASH_GRADIENT =\n 'linear-gradient(239.66deg, rgba(227, 39, 39, 0.25) 1.86%, rgba(255, 123, 0, 0.25) 101.54%)'\n\n/** Blue tile, per theme mode (Missing Interest Rate before the rate is added). */\nexport const PRIMARY_TILE_GRADIENTS = {\n light:\n 'linear-gradient(127deg, rgba(160, 185, 248, 0.75) 46.41%, rgba(44, 100, 239, 0.75) 78.14%, #FFF)',\n dark: 'linear-gradient(127deg, rgba(160, 185, 248, 0.75) 46.41%, rgba(44, 100, 239, 0.75) 78.14%, #FFF)',\n} as const\n\n/** Green tile, per theme mode (Missing Interest Rate once the rate is added). */\nexport const SUCCESS_TILE_GRADIENTS = {\n light: 'linear-gradient(180deg, #94C9B7 0%, #12875E 100%)',\n dark: 'linear-gradient(180deg, #0D5F42 0%, #59AB8E 100%)',\n} as const\n\n/**\n * Blue slot wash behind a pending connect / detected-subscription row: `primary.light` →\n * `primary.main` at 75% over paper, built from the live palette so it follows the theme. Figma's\n * angle follows the slot's shape, so a slot passes its own.\n */\nexport const getPrimaryWashGradient = ({ palette }: Theme, angleDeg = 173) =>\n `linear-gradient(${angleDeg}deg, ${alpha(palette.primary.light, 0.75)} 46.41%, ${alpha(palette.primary.main, 0.75)} 78.14%)`\n"],"mappings":";AAsBA,IAAa,IACX,+FAOW,IACX,4FAGW,IACX,gGAGW,IAAA,CAAqB,MAChC,mBAAmB,CAAA,0EAWR,IAA6B,EAAkB,MAAM,GAOrD,IACX,0FAGW,IACX,2FAGW,IACX,8FAGW,IAAyB;AAAA,EACpC,OACE;AAAA,EACF,MAAM;AACR,GAGa,IAAyB;AAAA,EACpC,OAAO;AAAA,EACP,MAAM;AACR,GAOa,IAAA,CAA0B,EAAE,SAAA,EAAA,GAAkB,IAAW,QACpE,mBAAmB,CAAA,QAAgB,EAAM,EAAQ,QAAQ,OAAO,IAAI,CAAA,YAAa,EAAM,EAAQ,QAAQ,MAAM,IAAI,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mx-cartographer/experiences",
3
- "version": "9.7.199-alpha-moratorium",
3
+ "version": "9.7.199-alpha-moratorium-v3",
4
4
  "description": "Library containing experience widgets",
5
5
  "author": "MX",
6
6
  "license": "MIT",