@mx-cartographer/experiences 9.7.191 → 9.7.192
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/IconComponent.es.js +13 -11
- package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/IconComponent.es.js.map +1 -1
- package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/layout.d.ts +2 -0
- package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/layout.es.js +6 -5
- package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/layout.es.js.map +1 -1
- package/dist/insights-v2/components/CategoryTile.d.ts +6 -1
- package/dist/insights-v2/components/CategoryTile.es.js +14 -14
- package/dist/insights-v2/components/CategoryTile.es.js.map +1 -1
- package/dist/insights-v2/components/celebrationGradients.d.ts +2 -2
- package/dist/insights-v2/components/celebrationGradients.es.js +1 -1
- 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.192] - 11-19-2026
|
|
2
|
+
|
|
3
|
+
- **FIXED** - Monthly Credit Card Interest Summary V2 card: the fees wash and the category tile's 1.5px border match Figma (WEC-2336)
|
|
4
|
+
|
|
1
5
|
## [9.7.191] - 11-19-2026
|
|
2
6
|
|
|
3
7
|
- **ADDED** - Category Budget V2 card: `budget_block` renders the Insights 2.0 slots with the bar coloured by status (on track, near, off track) (WEC-2326)
|
|
@@ -4,25 +4,26 @@ import { resolveVariantConfig as f } from "../../resolveVariantConfig.es.js";
|
|
|
4
4
|
import p from "../../../components/CategoryTile.es.js";
|
|
5
5
|
import b from "../../../components/LogoFromGuid.es.js";
|
|
6
6
|
import { statusIconName as m } from "../../../components/statusIcon.es.js";
|
|
7
|
-
import { getLayoutConfig as
|
|
8
|
-
import { useEffect as
|
|
9
|
-
import { observer as
|
|
7
|
+
import { getLayoutConfig as _ } from "./layout.es.js";
|
|
8
|
+
import { useEffect as h } from "react";
|
|
9
|
+
import { observer as x } from "mobx-react-lite";
|
|
10
10
|
import { InstitutionLogo as C } from "@mxenabled/mxui";
|
|
11
11
|
import { Icon as s } from "@mxenabled/mx-icons";
|
|
12
12
|
import { jsx as r, jsxs as u } from "react/jsx-runtime";
|
|
13
13
|
import { useTheme as z } from "@mui/material/styles";
|
|
14
14
|
import { Stack as d } from "@mui/material";
|
|
15
|
-
var I =
|
|
16
|
-
const { categoriesLoaded:
|
|
17
|
-
return
|
|
18
|
-
|
|
19
|
-
}, [
|
|
20
|
-
|
|
15
|
+
var I = x(({ borderWidth: i, categoryGuid: n, tint: e }) => {
|
|
16
|
+
const { categoriesLoaded: t, loadCategories: o } = g();
|
|
17
|
+
return h(() => {
|
|
18
|
+
t || o();
|
|
19
|
+
}, [t, o]), /* @__PURE__ */ r(p, {
|
|
20
|
+
borderWidth: i,
|
|
21
|
+
categoryGuid: n,
|
|
21
22
|
size: 48,
|
|
22
|
-
tint:
|
|
23
|
+
tint: e
|
|
23
24
|
});
|
|
24
25
|
}), D = ({ slot: i, variant: n, logo: e }) => {
|
|
25
|
-
const t = z(), o = f(
|
|
26
|
+
const t = z(), o = f(_(t), n, "default", "AccountBlock");
|
|
26
27
|
if (/^INS-[A-Za-z0-9-]+$/.test(e?.guid ?? "")) return /* @__PURE__ */ u(d, {
|
|
27
28
|
sx: {
|
|
28
29
|
alignItems: "center",
|
|
@@ -56,6 +57,7 @@ var I = h(({ categoryGuid: i, tint: n }) => {
|
|
|
56
57
|
});
|
|
57
58
|
const a = e?.guid;
|
|
58
59
|
if (a && /^CAT-[A-Za-z0-9-]+$/.test(a)) return /* @__PURE__ */ r(I, {
|
|
60
|
+
borderWidth: o.category_border_width,
|
|
59
61
|
categoryGuid: a,
|
|
60
62
|
tint: o.category_tint
|
|
61
63
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconComponent.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ComponentBlocks/AccountBlock/IconComponent.tsx"],"sourcesContent":["import { observer } from 'mobx-react-lite'\nimport { useEffect } from 'react'\n\nimport { Stack } from '@mui/material'\nimport { Icon } from '@mxenabled/mx-icons'\nimport { InstitutionLogo } from '@mxenabled/mxui'\nimport { IconBacking, useCategoryStore } 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 CategoryTile from '../../../components/CategoryTile'\nimport LogoFromGuid from '../../../components/LogoFromGuid'\nimport { statusIconName } from '../../../components/statusIcon'\n\n/**\n * The tile for a `CAT-` icon (charges_summary). tupac sends a sub-category (Finance Charge), which only draws\n * as its top-level category once categories are loaded, and an insight card on its own may be the first\n * thing to need them.\n */\nconst AccountCategoryTile = observer(\n ({
|
|
1
|
+
{"version":3,"file":"IconComponent.es.js","names":[],"sources":["../../../../../src/insights-v2/blocks/ComponentBlocks/AccountBlock/IconComponent.tsx"],"sourcesContent":["import { observer } from 'mobx-react-lite'\nimport { useEffect } from 'react'\n\nimport { Stack } from '@mui/material'\nimport { Icon } from '@mxenabled/mx-icons'\nimport { InstitutionLogo } from '@mxenabled/mxui'\nimport { IconBacking, useCategoryStore } 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 CategoryTile from '../../../components/CategoryTile'\nimport LogoFromGuid from '../../../components/LogoFromGuid'\nimport { statusIconName } from '../../../components/statusIcon'\n\n/**\n * The tile for a `CAT-` icon (charges_summary). tupac sends a sub-category (Finance Charge), which only draws\n * as its top-level category once categories are loaded, and an insight card on its own may be the first\n * thing to need them.\n */\nconst AccountCategoryTile = observer(\n ({\n borderWidth,\n categoryGuid,\n tint,\n }: {\n borderWidth?: number\n categoryGuid: string\n tint?: number\n }) => {\n const { categoriesLoaded, loadCategories } = useCategoryStore()\n\n useEffect(() => {\n if (!categoriesLoaded) void loadCategories()\n }, [categoriesLoaded, loadCategories])\n\n return (\n <CategoryTile borderWidth={borderWidth} categoryGuid={categoryGuid} size={48} tint={tint} />\n )\n },\n)\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 // A category guid draws its top-level category's tile, tinted when the variant names a wash\n // (charges_summary: Figma's 25% category colour with a category-colour border).\n const categoryGuid = logo?.guid\n if (categoryGuid && /^CAT-[A-Za-z0-9-]+$/.test(categoryGuid)) {\n return (\n <AccountCategoryTile\n borderWidth={layoutConfig.category_border_width}\n categoryGuid={categoryGuid}\n tint={layoutConfig.category_tint}\n />\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={layoutConfig.logo_icon_size ?? TILE_ICON_SIZE}\n sx={{ color: layoutConfig.logo_color }}\n />\n </Stack>\n )\n }\n\n return null\n}\n"],"mappings":"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"}
|
|
@@ -3,6 +3,8 @@ export interface BlockLayoutConfig {
|
|
|
3
3
|
background?: string;
|
|
4
4
|
/** Opacity of the category colour behind a `CAT-` tile, with a category-colour border; none = mxui's tile. */
|
|
5
5
|
category_tint?: number;
|
|
6
|
+
/** Width in px of that tinted tile's category-colour border. Defaults to 1. */
|
|
7
|
+
category_border_width?: number;
|
|
6
8
|
logo_color?: string;
|
|
7
9
|
logo_bGcolor?: string;
|
|
8
10
|
logo_border_color?: string;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { CELEBRATION_GRADIENT as o, DIRECT_DEPOSIT_COMPLETE_GRADIENT as t, ERROR_WASH_GRADIENT as
|
|
2
|
-
var
|
|
1
|
+
import { CELEBRATION_GRADIENT as o, DIRECT_DEPOSIT_COMPLETE_GRADIENT as t, ERROR_WASH_GRADIENT as a, FEES_WASH_GRADIENT as n, WARM_LIME_ACCENT_GRADIENT as i } from "../../../components/celebrationGradients.es.js";
|
|
2
|
+
var r = { background: a }, s = (e) => ({
|
|
3
3
|
overdraft_warning: {
|
|
4
4
|
background: e.palette.warning.light,
|
|
5
5
|
sub_logo: "error"
|
|
6
6
|
},
|
|
7
|
-
low_balance_alert:
|
|
7
|
+
low_balance_alert: r,
|
|
8
8
|
low_balance: {
|
|
9
|
-
...
|
|
9
|
+
...r,
|
|
10
10
|
badge: "error"
|
|
11
11
|
},
|
|
12
12
|
status_off_track: {
|
|
@@ -14,10 +14,11 @@ var a = { background: r }, s = (e) => ({
|
|
|
14
14
|
logo_bGcolor: "error.main",
|
|
15
15
|
logo_border_radius: "4px",
|
|
16
16
|
logo_icon_size: 24,
|
|
17
|
-
background:
|
|
17
|
+
background: a
|
|
18
18
|
},
|
|
19
19
|
charges_summary: {
|
|
20
20
|
category_tint: 0.25,
|
|
21
|
+
category_border_width: 1.5,
|
|
21
22
|
background: n
|
|
22
23
|
},
|
|
23
24
|
deposit_received: {
|
|
@@ -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 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":";
|
|
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 /** Width in px of that tinted tile's category-colour border. Defaults to 1. */\n category_border_width?: 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 // Figma 1365:301242 <Categories>: a 1.5px category-colour border.\n category_border_width: 1.5,\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":";AA+DA,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;AAAA,EAAQ;AAAA,EAGnD,kBAAkB;AAAA,IAChB,YAAY;AAAA,IACZ,cAAc;AAAA,IAEd,oBAAoB;AAAA,IAEpB,gBAAgB;AAAA,IAChB,YAAY;AAAA,EACd;AAAA,EAGA,iBAAiB;AAAA,IACf,eAAe;AAAA,IAEf,uBAAuB;AAAA,IACvB,YAAY;AAAA,EACd;AAAA,EAEA,kBAAkB;AAAA,IAChB,YAAY;AAAA,IACZ,UAAU;AAAA,IACV,SAAS;AAAA,IACT,eAAe;AAAA,IACf,0BAA0B;AAAA,IAC1B,cAAc;AAAA,IACd,eAAe;AAAA,IACf,YAAY;AAAA,IACZ,OAAO;AAAA,MAAE,KAAK;AAAA,MAAI,GAAG;AAAA,IAAG;AAAA,IACxB,iBAAiB;AAAA,IACjB,mBAAmB;AAAA,IACnB,kBAAkB;AAAA,IAClB,gBAAgB;AAAA,IAChB,kBAAkB;AAAA,EACpB;AAAA,EACA,iBAAiB;AAAA,IACf,YAAY;AAAA,IACZ,UAAU;AAAA,IACV,SAAS;AAAA,IACT,eAAe;AAAA,IACf,0BAA0B;AAAA,IAC1B,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"}
|
|
@@ -3,12 +3,17 @@ interface CategoryTileProps {
|
|
|
3
3
|
size: number;
|
|
4
4
|
/** Opacity of the category colour behind the glyph, with a category-colour border; none = mxui's tile. */
|
|
5
5
|
tint?: number;
|
|
6
|
+
/**
|
|
7
|
+
* Width in px of the tinted tile's category-colour border (default: a 1px `border`). Drawn as an inset ring,
|
|
8
|
+
* because Chromium snaps a fractional `border-width` (Figma's 1.5px) down to whole pixels.
|
|
9
|
+
*/
|
|
10
|
+
borderWidth?: number;
|
|
6
11
|
}
|
|
7
12
|
/**
|
|
8
13
|
* A category's icon tile. The guid walks up to its top-level parent first: `CategoryIcon` and
|
|
9
14
|
* `getCategoryColor` only know those, and draw a sub-category as Uncategorized.
|
|
10
15
|
*/
|
|
11
|
-
declare const CategoryTile: (({ categoryGuid, size, tint }: CategoryTileProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
16
|
+
declare const CategoryTile: (({ borderWidth, categoryGuid, size, tint }: CategoryTileProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
12
17
|
displayName: string;
|
|
13
18
|
};
|
|
14
19
|
export default CategoryTile;
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { useCategoryStore as
|
|
2
|
-
import { getCategoryColor as
|
|
3
|
-
import { observer as
|
|
1
|
+
import { useCategoryStore as c } from "../../common/context/hooks.es.js";
|
|
2
|
+
import { getCategoryColor as d } from "../../core/utils/CategoryUtil.es.js";
|
|
3
|
+
import { observer as g } from "mobx-react-lite";
|
|
4
4
|
import { CategoryIcon as l } from "@mxenabled/mxui";
|
|
5
|
-
import { jsx as
|
|
6
|
-
import { alpha as
|
|
7
|
-
import
|
|
8
|
-
var
|
|
9
|
-
const
|
|
10
|
-
return /* @__PURE__ */
|
|
5
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
6
|
+
import { alpha as x, useTheme as f } from "@mui/material/styles";
|
|
7
|
+
import n from "@mui/material/Box";
|
|
8
|
+
var T = g(({ borderWidth: e, categoryGuid: a, size: m, tint: t }) => {
|
|
9
|
+
const s = f(), o = c().getTopLevelCategoryGuid(a), r = d(o, s), p = e === void 0 ? { border: `1px solid ${r}` } : { boxShadow: `inset 0 0 0 ${e}px ${r}` };
|
|
10
|
+
return /* @__PURE__ */ i(n, {
|
|
11
11
|
"data-testid": `category-icon-${o}`,
|
|
12
12
|
sx: { display: "flex" },
|
|
13
|
-
children: /* @__PURE__ */
|
|
13
|
+
children: /* @__PURE__ */ i(l, {
|
|
14
14
|
categoryGuid: o,
|
|
15
15
|
size: m,
|
|
16
|
-
sx:
|
|
17
|
-
bgcolor:
|
|
18
|
-
|
|
16
|
+
sx: t === void 0 ? void 0 : {
|
|
17
|
+
bgcolor: x(r, t),
|
|
18
|
+
...p,
|
|
19
19
|
color: "text.primary"
|
|
20
20
|
}
|
|
21
21
|
})
|
|
22
22
|
});
|
|
23
23
|
});
|
|
24
24
|
export {
|
|
25
|
-
|
|
25
|
+
T as default
|
|
26
26
|
};
|
|
27
27
|
|
|
28
28
|
//# sourceMappingURL=CategoryTile.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CategoryTile.es.js","names":[],"sources":["../../../src/insights-v2/components/CategoryTile.tsx"],"sourcesContent":["import { observer } from 'mobx-react-lite'\n\nimport Box from '@mui/material/Box'\nimport { alpha, useTheme } from '@mui/material/styles'\n\nimport { CategoryIcon } from '@mxenabled/mxui'\n\nimport { useCategoryStore } from '../../common/context/hooks'\nimport { getCategoryColor } from '../../core/utils/CategoryUtil'\n\ninterface CategoryTileProps {\n categoryGuid: string\n size: number\n /** Opacity of the category colour behind the glyph, with a category-colour border; none = mxui's tile. */\n tint?: number\n}\n\n/**\n * A category's icon tile. The guid walks up to its top-level parent first: `CategoryIcon` and\n * `getCategoryColor` only know those, and draw a sub-category as Uncategorized.\n */\nconst CategoryTile = observer(({ categoryGuid, size, tint }: CategoryTileProps) => {\n const theme = useTheme()\n const guid = useCategoryStore().getTopLevelCategoryGuid(categoryGuid)\n const color = getCategoryColor(guid, theme)\n\n return (\n <Box data-testid={`category-icon-${guid}`} sx={{ display: 'flex' }}>\n <CategoryIcon\n categoryGuid={guid}\n size={size}\n sx={\n tint === undefined\n ? undefined\n : { bgcolor: alpha(color, tint),
|
|
1
|
+
{"version":3,"file":"CategoryTile.es.js","names":[],"sources":["../../../src/insights-v2/components/CategoryTile.tsx"],"sourcesContent":["import { observer } from 'mobx-react-lite'\n\nimport Box from '@mui/material/Box'\nimport { alpha, useTheme } from '@mui/material/styles'\n\nimport { CategoryIcon } from '@mxenabled/mxui'\n\nimport { useCategoryStore } from '../../common/context/hooks'\nimport { getCategoryColor } from '../../core/utils/CategoryUtil'\n\ninterface CategoryTileProps {\n categoryGuid: string\n size: number\n /** Opacity of the category colour behind the glyph, with a category-colour border; none = mxui's tile. */\n tint?: number\n /**\n * Width in px of the tinted tile's category-colour border (default: a 1px `border`). Drawn as an inset ring,\n * because Chromium snaps a fractional `border-width` (Figma's 1.5px) down to whole pixels.\n */\n borderWidth?: number\n}\n\n/**\n * A category's icon tile. The guid walks up to its top-level parent first: `CategoryIcon` and\n * `getCategoryColor` only know those, and draw a sub-category as Uncategorized.\n */\nconst CategoryTile = observer(({ borderWidth, categoryGuid, size, tint }: CategoryTileProps) => {\n const theme = useTheme()\n const guid = useCategoryStore().getTopLevelCategoryGuid(categoryGuid)\n const color = getCategoryColor(guid, theme)\n const ring =\n borderWidth === undefined\n ? { border: `1px solid ${color}` }\n : { boxShadow: `inset 0 0 0 ${borderWidth}px ${color}` }\n\n return (\n <Box data-testid={`category-icon-${guid}`} sx={{ display: 'flex' }}>\n <CategoryIcon\n categoryGuid={guid}\n size={size}\n sx={\n tint === undefined\n ? undefined\n : { bgcolor: alpha(color, tint), ...ring, color: 'text.primary' }\n }\n />\n </Box>\n )\n})\n\nexport default CategoryTile\n"],"mappings":";;;;;;;AA0BA,IAAM,IAAe,EAAA,CAAU,EAAE,aAAA,GAAa,cAAA,GAAc,MAAA,GAAM,MAAA,EAAA,MAA8B;AAC9F,QAAM,IAAQ,EAAS,GACjB,IAAO,EAAiB,EAAE,wBAAwB,CAAY,GAC9D,IAAQ,EAAiB,GAAM,CAAK,GACpC,IACJ,MAAgB,SACZ,EAAE,QAAQ,aAAa,CAAA,GAAQ,IAC/B,EAAE,WAAW,eAAe,CAAA,MAAiB,CAAA,GAAQ;AAE3D,SACE,gBAAA,EAAC,GAAD;AAAA,IAAK,eAAa,iBAAiB,CAAA;AAAA,IAAQ,IAAI,EAAE,SAAS,OAAO;AAAA,IAC/D,UAAA,gBAAA,EAAC,GAAD;AAAA,MACE,cAAc;AAAA,MACR,MAAA;AAAA,MACN,IACE,MAAS,SACL,SACA;AAAA,QAAE,SAAS,EAAM,GAAO,CAAI;AAAA,QAAG,GAAG;AAAA,QAAM,OAAO;AAAA,MAAe;AAAA,IAErE,CAAA;AAAA,EACE,CAAA;AAET,CAAC"}
|
|
@@ -45,8 +45,8 @@ export declare const ACCOUNT_CONNECTED_GRADIENT: string;
|
|
|
45
45
|
export declare const WARNING_WASH_GRADIENT = "linear-gradient(201deg, rgba(255, 170, 0, 0.25) 1.86%, rgba(255, 68, 0, 0.25) 101.54%)";
|
|
46
46
|
/** Red wash at 20%: low balance, off-track status. */
|
|
47
47
|
export declare const ERROR_WASH_GRADIENT = "linear-gradient(256.82deg, rgba(255, 47, 40, 0.2) 1.86%, rgba(255, 0, 72, 0.2) 101.54%)";
|
|
48
|
-
/** Red → orange wash at
|
|
49
|
-
export declare const FEES_WASH_GRADIENT = "linear-gradient(
|
|
48
|
+
/** Red → orange wash at 25%: fees and interest charges (Figma 1365:301242, error.main → warning.main). */
|
|
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
52
|
readonly light: "linear-gradient(180deg, #A0B9F8 0%, #2C64EF 100%)";
|
|
@@ -1,5 +1,5 @@
|
|
|
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(
|
|
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
3
|
light: "linear-gradient(180deg, #A0B9F8 0%, #2C64EF 100%)",
|
|
4
4
|
dark: "linear-gradient(180deg, #1F46A7 0%, #6B92F4 100%)"
|
|
5
5
|
}, I = {
|
|
@@ -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
|
|
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"}
|