@mx-cartographer/experiences 9.7.189 → 9.7.190
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 +4 -0
- package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/AccountBlock.es.js +31 -30
- package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/AccountBlock.es.js.map +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/layout.d.ts +3 -1
- package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/layout.es.js +11 -9
- package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/layout.es.js.map +1 -1
- package/dist/insights-v2/components/celebrationGradients.d.ts +5 -4
- package/dist/insights-v2/components/celebrationGradients.es.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
## [9.7.190] - 11-19-2026
|
|
2
|
+
|
|
3
|
+
- **FIXED** - Insights 2.0 Unified Deposit and the deposit templates: the tile's amount is bold, the payer line is a one-line caption in secondary text, and the wash matches Figma (WEC-2367)
|
|
4
|
+
|
|
1
5
|
## [9.7.189] - 11-19-2026
|
|
2
6
|
|
|
3
7
|
- **FIXED** - Budget Details drawer header matches Figma: back arrow, larger month, divider, no status dot, thinner bar and larger labels (WEC-2366)
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { slot as
|
|
1
|
+
import { slot as a } from "../../../../core/types/Insights.es.js";
|
|
2
2
|
import { CURRENCY_FORMAT as T, formatCurrency as k } from "../../../../core/utils/NumberFormatting.es.js";
|
|
3
3
|
import { resolveVariantConfig as j } from "../../resolveVariantConfig.es.js";
|
|
4
4
|
import { asLogoRef as I, asNumber as N, asText as x } from "../../slotReaders.es.js";
|
|
5
|
-
import { useContainerDimensions as
|
|
6
|
-
import
|
|
7
|
-
import { Confetti as
|
|
8
|
-
import { ReactComponent as
|
|
5
|
+
import { useContainerDimensions as O } from "../../../hooks/useContainerDimensions.es.js";
|
|
6
|
+
import P from "../../../components/LogoFromGuid.es.js";
|
|
7
|
+
import { Confetti as W } from "../../../components/shared/Confetti.es.js";
|
|
8
|
+
import { ReactComponent as E } from "../../../components/shared/images/PaidOffCard.es.js";
|
|
9
9
|
import { ReactComponent as G } from "../../../components/shared/images/SavingsAccountDeposit.es.js";
|
|
10
10
|
import { statusIconName as H } from "../../../components/statusIcon.es.js";
|
|
11
11
|
import { isDetailedAccountVariant as K } from "../DetailedAccountBlock/layout.es.js";
|
|
@@ -14,26 +14,26 @@ import { HeaderComponent as U } from "./HeaderComponent.es.js";
|
|
|
14
14
|
import { getLayoutConfig as Y } from "./layout.es.js";
|
|
15
15
|
import { IconComponent as q } from "./IconComponent.es.js";
|
|
16
16
|
import { useRef as J } from "react";
|
|
17
|
-
import
|
|
17
|
+
import r from "@mui/material/Stack";
|
|
18
18
|
import { Text as l } from "@mxenabled/mxui";
|
|
19
19
|
import { Icon as S } from "@mxenabled/mx-icons";
|
|
20
|
-
import { jsx as o, jsxs as
|
|
20
|
+
import { jsx as o, jsxs as t } from "react/jsx-runtime";
|
|
21
21
|
import { useTheme as Q } from "@mui/material/styles";
|
|
22
|
-
import
|
|
22
|
+
import s from "@mui/material/Box";
|
|
23
23
|
var vo = ({ payload: g }) => {
|
|
24
|
-
const h = Q(), b = J(null), { height: w, width: R } =
|
|
24
|
+
const h = Q(), b = J(null), { height: w, width: R } = O(b), { instance_slot: n } = g, { variant: p, institution_guid: z, institution_name: D, icon_name: L, merchant_name: A } = n;
|
|
25
25
|
if (K(p)) return /* @__PURE__ */ o(M, { payload: g });
|
|
26
|
-
const { data: i } = n, m = i !== void 0, u = m ? N(
|
|
26
|
+
const { data: i } = n, m = i !== void 0, u = m ? N(a(i, "amount")) : n.amount, v = x(a(i, "sub_text")), y = m ? v : n.sub_text, V = m ? v : n.label, c = m ? x(a(i, "header_text")) : n.header_text, d = I(a(i, "logo")) ?? I(a(i, "icon")), e = j(Y(h), p, "default", "AccountBlock");
|
|
27
27
|
if (e?.isConfetti) {
|
|
28
28
|
const f = H(d?.guid), B = {
|
|
29
|
-
paidOffCard: /* @__PURE__ */ o(
|
|
29
|
+
paidOffCard: /* @__PURE__ */ o(s, {
|
|
30
30
|
sx: {
|
|
31
31
|
flexShrink: 0,
|
|
32
32
|
height: 32,
|
|
33
33
|
position: "relative",
|
|
34
34
|
width: 48
|
|
35
35
|
},
|
|
36
|
-
children: /* @__PURE__ */ o(
|
|
36
|
+
children: /* @__PURE__ */ o(E, {
|
|
37
37
|
"aria-hidden": !0,
|
|
38
38
|
role: "presentation",
|
|
39
39
|
style: {
|
|
@@ -49,7 +49,7 @@ var vo = ({ payload: g }) => {
|
|
|
49
49
|
role: "presentation",
|
|
50
50
|
width: 55
|
|
51
51
|
}),
|
|
52
|
-
logo: /* @__PURE__ */ o(
|
|
52
|
+
logo: /* @__PURE__ */ o(s, {
|
|
53
53
|
sx: {
|
|
54
54
|
borderRadius: "4px",
|
|
55
55
|
flexShrink: 0,
|
|
@@ -57,7 +57,7 @@ var vo = ({ payload: g }) => {
|
|
|
57
57
|
overflow: "hidden",
|
|
58
58
|
width: 48
|
|
59
59
|
},
|
|
60
|
-
children: f ? /* @__PURE__ */ o(
|
|
60
|
+
children: f ? /* @__PURE__ */ o(r, {
|
|
61
61
|
"data-icon": f,
|
|
62
62
|
sx: {
|
|
63
63
|
alignItems: "center",
|
|
@@ -72,13 +72,14 @@ var vo = ({ payload: g }) => {
|
|
|
72
72
|
size: e.logo_icon_size ?? 24,
|
|
73
73
|
sx: { color: "success.contrastText" }
|
|
74
74
|
})
|
|
75
|
-
}) : d?.guid ? /* @__PURE__ */ o(
|
|
75
|
+
}) : d?.guid ? /* @__PURE__ */ o(P, {
|
|
76
76
|
logo: d,
|
|
77
77
|
size: 48
|
|
78
78
|
}) : null
|
|
79
79
|
})
|
|
80
|
-
}[e.graphic ?? "logo"], F = x(
|
|
80
|
+
}[e.graphic ?? "logo"], F = x(a(i, "secondary_text")) || (A ?? D), C = e.secondarySource === "merchant" ? F : V, _ = C ? /* @__PURE__ */ o(l, {
|
|
81
81
|
color: e.secondaryColor,
|
|
82
|
+
noWrap: e.secondaryOneLine,
|
|
82
83
|
variant: e.secondaryVariant,
|
|
83
84
|
children: C
|
|
84
85
|
}) : null, $ = u != null ? /* @__PURE__ */ o(l, {
|
|
@@ -87,7 +88,7 @@ var vo = ({ payload: g }) => {
|
|
|
87
88
|
variant: e.amountVariant,
|
|
88
89
|
children: `${e.amountPrefix ?? ""}${k(u, T.cents)}`
|
|
89
90
|
}) : null;
|
|
90
|
-
return /* @__PURE__ */
|
|
91
|
+
return /* @__PURE__ */ t(s, {
|
|
91
92
|
ref: b,
|
|
92
93
|
sx: {
|
|
93
94
|
backgroundImage: e.gradient,
|
|
@@ -97,19 +98,19 @@ var vo = ({ payload: g }) => {
|
|
|
97
98
|
p: 16,
|
|
98
99
|
width: "100%"
|
|
99
100
|
},
|
|
100
|
-
children: [/* @__PURE__ */ o(
|
|
101
|
+
children: [/* @__PURE__ */ o(s, {
|
|
101
102
|
sx: {
|
|
102
103
|
inset: 0,
|
|
103
104
|
pointerEvents: "none",
|
|
104
105
|
position: "absolute",
|
|
105
106
|
zIndex: 1
|
|
106
107
|
},
|
|
107
|
-
children: /* @__PURE__ */ o(
|
|
108
|
+
children: /* @__PURE__ */ o(W, {
|
|
108
109
|
height: w,
|
|
109
110
|
shouldRun: w > 0 && R > 0,
|
|
110
111
|
width: R
|
|
111
112
|
})
|
|
112
|
-
}), /* @__PURE__ */ r
|
|
113
|
+
}), /* @__PURE__ */ t(r, {
|
|
113
114
|
sx: {
|
|
114
115
|
borderRadius: "8px",
|
|
115
116
|
...e.cardShadow && { boxShadow: h.shadows[1] },
|
|
@@ -118,7 +119,7 @@ var vo = ({ payload: g }) => {
|
|
|
118
119
|
width: "100%",
|
|
119
120
|
zIndex: 2
|
|
120
121
|
},
|
|
121
|
-
children: [e.categoryStrip && c && /* @__PURE__ */ o(
|
|
122
|
+
children: [e.categoryStrip && c && /* @__PURE__ */ o(s, {
|
|
122
123
|
sx: {
|
|
123
124
|
bgcolor: "success.main",
|
|
124
125
|
px: 12,
|
|
@@ -129,7 +130,7 @@ var vo = ({ payload: g }) => {
|
|
|
129
130
|
variant: "caption",
|
|
130
131
|
children: c
|
|
131
132
|
})
|
|
132
|
-
}), /* @__PURE__ */ r
|
|
133
|
+
}), /* @__PURE__ */ t(r, {
|
|
133
134
|
sx: {
|
|
134
135
|
alignItems: "center",
|
|
135
136
|
bgcolor: "success.lighter",
|
|
@@ -144,13 +145,13 @@ var vo = ({ payload: g }) => {
|
|
|
144
145
|
flexDirection: "row",
|
|
145
146
|
...e.rowSx
|
|
146
147
|
},
|
|
147
|
-
children: [/* @__PURE__ */ o(
|
|
148
|
+
children: [/* @__PURE__ */ o(s, {
|
|
148
149
|
sx: {
|
|
149
150
|
display: "flex",
|
|
150
151
|
flexShrink: 0
|
|
151
152
|
},
|
|
152
153
|
children: B
|
|
153
|
-
}), /* @__PURE__ */ r
|
|
154
|
+
}), /* @__PURE__ */ t(r, {
|
|
154
155
|
sx: {
|
|
155
156
|
flex: "1 0 0",
|
|
156
157
|
minWidth: 0
|
|
@@ -165,18 +166,18 @@ var vo = ({ payload: g }) => {
|
|
|
165
166
|
})]
|
|
166
167
|
});
|
|
167
168
|
}
|
|
168
|
-
return /* @__PURE__ */ o(
|
|
169
|
+
return /* @__PURE__ */ o(r, {
|
|
169
170
|
sx: {
|
|
170
171
|
background: e.background,
|
|
171
172
|
p: 16
|
|
172
173
|
},
|
|
173
|
-
children: /* @__PURE__ */ r
|
|
174
|
+
children: /* @__PURE__ */ t(r, {
|
|
174
175
|
sx: {
|
|
175
176
|
borderRadius: "8px",
|
|
176
177
|
boxShadow: h.shadows[1],
|
|
177
178
|
width: "100%"
|
|
178
179
|
},
|
|
179
|
-
children: [c && /* @__PURE__ */ o(U, { headerText: c }), /* @__PURE__ */ r
|
|
180
|
+
children: [c && /* @__PURE__ */ o(U, { headerText: c }), /* @__PURE__ */ t(r, {
|
|
180
181
|
sx: {
|
|
181
182
|
alignItems: "center",
|
|
182
183
|
bgcolor: "background.paper",
|
|
@@ -188,16 +189,16 @@ var vo = ({ payload: g }) => {
|
|
|
188
189
|
borderTopLeftRadius: "0",
|
|
189
190
|
borderTopRightRadius: "0"
|
|
190
191
|
},
|
|
191
|
-
...(z ||
|
|
192
|
+
...(z || L || d?.guid) && { flexDirection: "row" }
|
|
192
193
|
},
|
|
193
194
|
children: [/* @__PURE__ */ o(q, {
|
|
194
195
|
logo: d,
|
|
195
196
|
slot: n,
|
|
196
197
|
variant: p
|
|
197
|
-
}), /* @__PURE__ */ r
|
|
198
|
+
}), /* @__PURE__ */ t(r, { children: [u != null && /* @__PURE__ */ o(l, {
|
|
198
199
|
variant: "h2",
|
|
199
200
|
children: k(u, T.cents)
|
|
200
|
-
}), /* @__PURE__ */ r
|
|
201
|
+
}), /* @__PURE__ */ t(r, {
|
|
201
202
|
sx: {
|
|
202
203
|
gap: 8,
|
|
203
204
|
flexDirection: "row",
|
|
@@ -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 } from '../../../../core'\nimport { CURRENCY_FORMAT, 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 { asLogoRef, asNumber, asText } from '../../slotReaders'\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 // V1 beats send no `data`. V2 reads only `data` (no `slotOrFlat`): its stale flat fields must never show.\n const { data } = instance_slot\n const v2 = data !== undefined\n const amount = v2 ? asNumber(slot(data, 'amount')) : instance_slot.amount\n // One V2 slot; V1 named it `sub_text` on the standard tile and `label` on the confetti one.\n const v2SubText = asText(slot(data, 'sub_text'))\n const sub_text = v2 ? v2SubText : instance_slot.sub_text\n const label = v2 ? v2SubText : instance_slot.label\n const header_text = v2 ? asText(slot(data, 'header_text')) : instance_slot.header_text\n // `icon` carries the tile glyph when the beat's `logo` is kept for its compact card (charges_summary).\n const logo = asLogoRef(slot(data, 'logo')) ?? asLogoRef(slot(data, 'icon'))\n const layoutConfig = resolveVariantConfig(\n getLayoutConfig(theme),\n variant,\n 'default',\n 'AccountBlock',\n )\n\n if (layoutConfig?.isConfetti) {\n const confettiIcon = statusIconName(logo?.guid)\n const graphics: Record<string, React.ReactNode> = {\n paidOffCard: (\n // The 58x46 SVG's card sits 14px down (its check badge overflows top-right); box it to the\n // 48x32 frame so it lines up with the text.\n <Box sx={{ flexShrink: 0, height: 32, position: 'relative', width: 48 }}>\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 // The payer: V2's `secondary_text`, else the merchant, else the institution.\n const payer = asText(slot(data, 'secondary_text')) || (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\n bold={!layoutConfig.amountKeepsVariantWeight}\n color=\"success.dark\"\n variant={layoutConfig.amountVariant}\n >\n {`${layoutConfig.amountPrefix ?? ''}${formatCurrency(amount, CURRENCY_FORMAT.cents)}`}\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 ...(layoutConfig.cardShadow && { boxShadow: theme.shadows[1] }),\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 // Figma's standard tile: 16px on every side, 80px tall in the 112px slot.\n p: 16,\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 && (\n <Text variant=\"h2\">{formatCurrency(amount, CURRENCY_FORMAT.cents)}</Text>\n )}\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":";;;;;;;;;;;;;;;;;;;;;;AAyBA,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;AAGvF,QAAM,EAAE,MAAA,EAAA,IAAS,GACX,IAAK,MAAS,QACd,IAAS,IAAK,EAAS,EAAK,GAAM,QAAQ,CAAC,IAAI,EAAc,QAE7D,IAAY,EAAO,EAAK,GAAM,UAAU,CAAC,GACzC,IAAW,IAAK,IAAY,EAAc,UAC1C,IAAQ,IAAK,IAAY,EAAc,OACvC,IAAc,IAAK,EAAO,EAAK,GAAM,aAAa,CAAC,IAAI,EAAc,aAErE,IAAO,EAAU,EAAK,GAAM,MAAM,CAAC,KAAK,EAAU,EAAK,GAAM,MAAM,CAAC,GACpE,IAAe,EACnB,EAAgB,CAAK,GACrB,GACA,WACA,cACF;AAEA,MAAI,GAAc,YAAY;AAC5B,UAAM,IAAe,EAAe,GAAM,IAAI,GAmDxC,IAAU;AAAA,MAjDd,aAGE,gBAAA,EAAC,GAAD;AAAA,QAAK,IAAI;AAAA,UAAE,YAAY;AAAA,UAAG,QAAQ;AA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Aa,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,QACT,gBAAA,EAAC,GAAD;AAAA,UAAM,SAAQ;AAAA,UAAM,UAAA,EAAe,GAAQ,EAAgB,KAAK;AAAA,QAAQ,CAAA,GAE1E,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 } from '../../../../core'\nimport { CURRENCY_FORMAT, 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 { asLogoRef, asNumber, asText } from '../../slotReaders'\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 // V1 beats send no `data`. V2 reads only `data` (no `slotOrFlat`): its stale flat fields must never show.\n const { data } = instance_slot\n const v2 = data !== undefined\n const amount = v2 ? asNumber(slot(data, 'amount')) : instance_slot.amount\n // One V2 slot; V1 named it `sub_text` on the standard tile and `label` on the confetti one.\n const v2SubText = asText(slot(data, 'sub_text'))\n const sub_text = v2 ? v2SubText : instance_slot.sub_text\n const label = v2 ? v2SubText : instance_slot.label\n const header_text = v2 ? asText(slot(data, 'header_text')) : instance_slot.header_text\n // `icon` carries the tile glyph when the beat's `logo` is kept for its compact card (charges_summary).\n const logo = asLogoRef(slot(data, 'logo')) ?? asLogoRef(slot(data, 'icon'))\n const layoutConfig = resolveVariantConfig(\n getLayoutConfig(theme),\n variant,\n 'default',\n 'AccountBlock',\n )\n\n if (layoutConfig?.isConfetti) {\n const confettiIcon = statusIconName(logo?.guid)\n const graphics: Record<string, React.ReactNode> = {\n paidOffCard: (\n // The 58x46 SVG's card sits 14px down (its check badge overflows top-right); box it to the\n // 48x32 frame so it lines up with the text.\n <Box sx={{ flexShrink: 0, height: 32, position: 'relative', width: 48 }}>\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 // The payer: V2's `secondary_text`, else the merchant, else the institution.\n const payer = asText(slot(data, 'secondary_text')) || (merchant_name ?? institution_name)\n const secondaryText = layoutConfig.secondarySource === 'merchant' ? payer : label\n const secondary = secondaryText ? (\n <Text\n color={layoutConfig.secondaryColor}\n noWrap={layoutConfig.secondaryOneLine}\n variant={layoutConfig.secondaryVariant}\n >\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\n bold={!layoutConfig.amountKeepsVariantWeight}\n color=\"success.dark\"\n variant={layoutConfig.amountVariant}\n >\n {`${layoutConfig.amountPrefix ?? ''}${formatCurrency(amount, CURRENCY_FORMAT.cents)}`}\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 ...(layoutConfig.cardShadow && { boxShadow: theme.shadows[1] }),\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 // Figma's standard tile: 16px on every side, 80px tall in the 112px slot.\n p: 16,\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 && (\n <Text variant=\"h2\">{formatCurrency(amount, CURRENCY_FORMAT.cents)}</Text>\n )}\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":";;;;;;;;;;;;;;;;;;;;;;AAyBA,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;AAGvF,QAAM,EAAE,MAAA,EAAA,IAAS,GACX,IAAK,MAAS,QACd,IAAS,IAAK,EAAS,EAAK,GAAM,QAAQ,CAAC,IAAI,EAAc,QAE7D,IAAY,EAAO,EAAK,GAAM,UAAU,CAAC,GACzC,IAAW,IAAK,IAAY,EAAc,UAC1C,IAAQ,IAAK,IAAY,EAAc,OACvC,IAAc,IAAK,EAAO,EAAK,GAAM,aAAa,CAAC,IAAI,EAAc,aAErE,IAAO,EAAU,EAAK,GAAM,MAAM,CAAC,KAAK,EAAU,EAAK,GAAM,MAAM,CAAC,GACpE,IAAe,EACnB,EAAgB,CAAK,GACrB,GACA,WACA,cACF;AAEA,MAAI,GAAc,YAAY;AAC5B,UAA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AAc;AAAA,UACd,KAAK;AAAA,UAEL,GAAG;AAAA,UACH,OAAO;AAAA,UACP,GAAI,KAAe;AAAA,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,QACT,gBAAA,EAAC,GAAD;AAAA,UAAM,SAAQ;AAAA,UAAM,UAAA,EAAe,GAAQ,EAAgB,KAAK;AAAA,QAAQ,CAAA,GAE1E,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"}
|
|
@@ -21,7 +21,7 @@ export interface BlockLayoutConfig {
|
|
|
21
21
|
gradient?: string;
|
|
22
22
|
/** Which illustration sits left of the text. `logo` is the data-driven merchant/institution logo. */
|
|
23
23
|
graphic?: 'paidOffCard' | 'savings' | 'logo';
|
|
24
|
-
/** Amount typography variant
|
|
24
|
+
/** Amount typography variant. */
|
|
25
25
|
amountVariant?: 'h2' | 'h3';
|
|
26
26
|
/** Prefix prepended to the formatted amount, e.g. `+` for deposits. */
|
|
27
27
|
amountPrefix?: string;
|
|
@@ -41,6 +41,8 @@ export interface BlockLayoutConfig {
|
|
|
41
41
|
secondaryVariant?: 'body2' | 'caption';
|
|
42
42
|
/** Theme color path for the secondary line. */
|
|
43
43
|
secondaryColor?: string;
|
|
44
|
+
/** Truncate the secondary line to one line with an ellipsis. */
|
|
45
|
+
secondaryOneLine?: boolean;
|
|
44
46
|
}
|
|
45
47
|
/** Glyph size in px on the standard icon tile (IconComponent). */
|
|
46
48
|
export declare const TILE_ICON_SIZE = 30;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { CELEBRATION_GRADIENT as o, ERROR_WASH_GRADIENT as
|
|
2
|
-
var a = { background:
|
|
1
|
+
import { CELEBRATION_GRADIENT as o, DIRECT_DEPOSIT_COMPLETE_GRADIENT as t, ERROR_WASH_GRADIENT as r, FEES_WASH_GRADIENT as n, WARM_LIME_ACCENT_GRADIENT as i } from "../../../components/celebrationGradients.es.js";
|
|
2
|
+
var a = { background: r }, s = (e) => ({
|
|
3
3
|
overdraft_warning: {
|
|
4
|
-
background:
|
|
4
|
+
background: e.palette.warning.light,
|
|
5
5
|
sub_logo: "error"
|
|
6
6
|
},
|
|
7
7
|
low_balance_alert: a,
|
|
@@ -14,7 +14,7 @@ var a = { background: e }, c = (t) => ({
|
|
|
14
14
|
logo_bGcolor: "error.main",
|
|
15
15
|
logo_border_radius: "4px",
|
|
16
16
|
logo_icon_size: 24,
|
|
17
|
-
background:
|
|
17
|
+
background: r
|
|
18
18
|
},
|
|
19
19
|
charges_summary: {
|
|
20
20
|
category_tint: 0.25,
|
|
@@ -22,9 +22,10 @@ var a = { background: e }, c = (t) => ({
|
|
|
22
22
|
},
|
|
23
23
|
deposit_received: {
|
|
24
24
|
isConfetti: !0,
|
|
25
|
-
gradient:
|
|
25
|
+
gradient: t,
|
|
26
26
|
graphic: "logo",
|
|
27
27
|
amountVariant: "h2",
|
|
28
|
+
amountKeepsVariantWeight: !0,
|
|
28
29
|
amountPrefix: "+",
|
|
29
30
|
categoryStrip: !0,
|
|
30
31
|
cardShadow: !0,
|
|
@@ -34,12 +35,13 @@ var a = { background: e }, c = (t) => ({
|
|
|
34
35
|
},
|
|
35
36
|
secondarySource: "merchant",
|
|
36
37
|
secondaryPosition: "below",
|
|
37
|
-
secondaryVariant: "
|
|
38
|
-
secondaryColor: "text.
|
|
38
|
+
secondaryVariant: "caption",
|
|
39
|
+
secondaryColor: "text.secondary",
|
|
40
|
+
secondaryOneLine: !0
|
|
39
41
|
},
|
|
40
42
|
status_on_track: {
|
|
41
43
|
isConfetti: !0,
|
|
42
|
-
gradient:
|
|
44
|
+
gradient: i,
|
|
43
45
|
graphic: "logo",
|
|
44
46
|
amountVariant: "h2",
|
|
45
47
|
amountKeepsVariantWeight: !0,
|
|
@@ -84,7 +86,7 @@ var a = { background: e }, c = (t) => ({
|
|
|
84
86
|
default: {}
|
|
85
87
|
});
|
|
86
88
|
export {
|
|
87
|
-
|
|
89
|
+
s as getLayoutConfig
|
|
88
90
|
};
|
|
89
91
|
|
|
90
92
|
//# sourceMappingURL=layout.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ComponentBlocks/AccountBlock/layout.ts"],"sourcesContent":["import { type SxProps, type Theme } from '@mui/material/styles'\n\nimport {\n CELEBRATION_GRADIENT,\n ERROR_WASH_GRADIENT,\n FEES_WASH_GRADIENT,\n WARM_LIME_ACCENT_GRADIENT,\n} from '../../../components/celebrationGradients'\n\nexport interface BlockLayoutConfig {\n background?: string\n /** Opacity of the category colour behind a `CAT-` tile, with a category-colour border; none = mxui's tile. */\n category_tint?: number\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 the confetti tile (default 24) and on the standard\n * icon tile (default `TILE_ICON_SIZE`). */\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
|
|
1
|
+
{"version":3,"file":"layout.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ComponentBlocks/AccountBlock/layout.ts"],"sourcesContent":["import { type SxProps, type Theme } from '@mui/material/styles'\n\nimport {\n CELEBRATION_GRADIENT,\n DIRECT_DEPOSIT_COMPLETE_GRADIENT,\n ERROR_WASH_GRADIENT,\n FEES_WASH_GRADIENT,\n WARM_LIME_ACCENT_GRADIENT,\n} from '../../../components/celebrationGradients'\n\nexport interface BlockLayoutConfig {\n background?: string\n /** Opacity of the category colour behind a `CAT-` tile, with a category-colour border; none = mxui's tile. */\n category_tint?: number\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 the confetti tile (default 24) and on the standard\n * icon tile (default `TILE_ICON_SIZE`). */\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. */\n amountVariant?: 'h2' | 'h3'\n /** Prefix prepended to the formatted amount, e.g. `+` for deposits. */\n amountPrefix?: string\n /** Keep the variant's own weight (h2 is 700) instead of the confetti tile's semi bold. */\n amountKeepsVariantWeight?: boolean\n /** Render the colored category strip (`header_text`) at the top of the card. */\n categoryStrip?: boolean\n /** Raise the strip and body together with elevation/1. */\n cardShadow?: 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 /** Truncate the secondary line to one line with an ellipsis. */\n secondaryOneLine?: boolean\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: ERROR_WASH_GRADIENT,\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 // Figma draws the money glyph at 24px in both status tiles (9936:39156).\n logo_icon_size: 24,\n background: ERROR_WASH_GRADIENT,\n },\n // Monthly Credit Card Interest Summary's fees tile (ditto account_block `charges_summary`); its category\n // glyph rides in `icon`.\n charges_summary: {\n category_tint: 0.25,\n background: FEES_WASH_GRADIENT,\n },\n // Unified Deposit and its standalone deposit templates; Figma draws every state alike.\n deposit_received: {\n isConfetti: true,\n gradient: DIRECT_DEPOSIT_COMPLETE_GRADIENT,\n graphic: 'logo',\n amountVariant: 'h2',\n amountKeepsVariantWeight: true,\n amountPrefix: '+',\n categoryStrip: true,\n cardShadow: true,\n rowSx: { gap: 12, p: 12 },\n secondarySource: 'merchant',\n secondaryPosition: 'below',\n secondaryVariant: 'caption',\n secondaryColor: 'text.secondary',\n secondaryOneLine: true,\n },\n status_on_track: {\n isConfetti: true,\n gradient: WARM_LIME_ACCENT_GRADIENT,\n graphic: 'logo',\n amountVariant: 'h2',\n amountKeepsVariantWeight: true,\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: 16, 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":";AA6DA,IAAM,IAAsC,EAC1C,YAAY,EACd,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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IAAG;AAAA,IACxB,iBAAiB;AAAA,IACjB,mBAAmB;AAAA,IACnB,kBAAkB;AAAA,IAClB,gBAAgB;AAAA,EAClB;AAAA,EAGA,SAAS,CAAC;AACZ"}
|
|
@@ -4,8 +4,8 @@ import { Theme } from '@mui/material/styles';
|
|
|
4
4
|
* one source holds each gradient. The 20%–25% washes layer over `background.paper` via
|
|
5
5
|
* `backgroundImage`; `DISCOVERED_ACCOUNTS_GRADIENT` and the tile gradients are opaque and stand alone.
|
|
6
6
|
*
|
|
7
|
-
* - WARM_LIME_ACCENT_GRADIENT: merchant categorization and
|
|
8
|
-
* - DIRECT_DEPOSIT_COMPLETE_GRADIENT: the direct deposit complete tile.
|
|
7
|
+
* - WARM_LIME_ACCENT_GRADIENT: merchant categorization and on-track states.
|
|
8
|
+
* - DIRECT_DEPOSIT_COMPLETE_GRADIENT: the direct deposit complete tile and the deposit tile.
|
|
9
9
|
* - CELEBRATION_GRADIENT / ACCOUNT_CONNECTED_GRADIENT: balance milestones, account connected.
|
|
10
10
|
* - celebrateGradient(angle): Figma's Celebrate Gradient at any angle.
|
|
11
11
|
* - WARNING_WASH_GRADIENT: a flagged charge (Unexpected Subscription Payment).
|
|
@@ -16,11 +16,12 @@ import { Theme } from '@mui/material/styles';
|
|
|
16
16
|
*/
|
|
17
17
|
/**
|
|
18
18
|
* Warm → lime accent wash at 20% opacity. Used as a tinted background behind
|
|
19
|
-
* merchant categorization highlights and
|
|
19
|
+
* merchant categorization highlights and on-track states.
|
|
20
20
|
*/
|
|
21
21
|
export declare const WARM_LIME_ACCENT_GRADIENT = "linear-gradient(200.73deg, rgba(255, 223, 152, 0.2) 1.86%, rgba(173, 248, 43, 0.2) 101.54%)";
|
|
22
22
|
/**
|
|
23
|
-
* Warm → lime wash at 20% behind the Direct Deposit complete tile (Set Up / Switch Direct Deposit)
|
|
23
|
+
* Warm → lime wash at 20% behind the Direct Deposit complete tile (Set Up / Switch Direct Deposit) and
|
|
24
|
+
* the deposit tile (Unified Deposit).
|
|
24
25
|
* Figma gives it its own angle and stops, so it does not reuse WARM_LIME_ACCENT_GRADIENT.
|
|
25
26
|
*/
|
|
26
27
|
export declare const DIRECT_DEPOSIT_COMPLETE_GRADIENT = "linear-gradient(257deg, rgba(255, 224, 153, 0.2) 1.86%, rgba(173, 248, 44, 0.2) 101.54%)";
|
|
@@ -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
|
|
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 20%: fees and interest charges. */\nexport const FEES_WASH_GRADIENT =\n 'linear-gradient(256.82deg, rgba(227, 39, 39, 0.2) 1.86%, rgba(255, 123, 0, 0.2) 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,4FAGW,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"}
|